Repository: madMAx43v3r/mmx-node Branch: master Commit: 427e929b3790 Files: 1559 Total size: 9.0 MB Directory structure: gitextract_ky7_skd4/ ├── .dockerignore ├── .github/ │ └── workflows/ │ ├── debian.yml │ ├── docker.yml │ └── windows.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── CMakePresets.json ├── Dockerfile ├── LICENSE ├── README.md ├── activate.sh ├── clean_all.sh ├── cmake/ │ ├── build_version_json.cmake │ ├── custom-triplets/ │ │ └── x64-windows-mmx.cmake │ ├── debian/ │ │ ├── generic/ │ │ │ └── control │ │ ├── mmx_node.desktop │ │ ├── mmx_wallet.desktop │ │ ├── ubuntu-20.04/ │ │ │ └── control │ │ ├── ubuntu-22.04/ │ │ │ └── control │ │ └── ubuntu-24.04/ │ │ └── control │ ├── nsis/ │ │ └── NSIS.template.in │ ├── product_version/ │ │ ├── LICENSE │ │ ├── VersionInfo.in │ │ ├── VersionResource.rc │ │ └── generate_product_version.cmake │ ├── use_cuda.cmake │ └── win_pack.cmake ├── codegen.sh ├── config/ │ ├── default/ │ │ ├── Farmer.json │ │ ├── Harvester.json │ │ ├── HttpServer.json │ │ ├── Node.json │ │ ├── Router.json │ │ ├── TimeLord.json │ │ ├── Wallet.json │ │ ├── WebAPI.json │ │ ├── mmx_farmer.json │ │ ├── mmx_harvester.json │ │ ├── mmx_node.json │ │ ├── timelord │ │ └── vnx/ │ │ ├── authentication.json │ │ └── protected_config+ │ ├── farmer/ │ │ └── Proxy.json │ ├── local_init/ │ │ ├── Farmer.json │ │ ├── Harvester.json │ │ ├── HttpServer.json │ │ ├── Node.json │ │ ├── Router.json │ │ ├── TimeLord.json │ │ ├── Wallet.json │ │ ├── allow_remote │ │ ├── cuda.json │ │ ├── opencl.json │ │ ├── remote_compute │ │ └── timelord │ ├── mainnet/ │ │ ├── Router.json │ │ ├── chain/ │ │ │ ├── params/ │ │ │ │ ├── escrow_binary │ │ │ │ ├── nft_binary │ │ │ │ ├── offer_binary │ │ │ │ ├── plot_binary │ │ │ │ ├── plot_nft_binary │ │ │ │ ├── relay_binary │ │ │ │ ├── swap_binary │ │ │ │ ├── template_binary │ │ │ │ ├── time_lock_binary │ │ │ │ └── token_binary │ │ │ └── params.json │ │ └── parent │ ├── mainnet-rc/ │ │ ├── Node.json │ │ ├── Router.json │ │ ├── Wallet.json │ │ ├── chain/ │ │ │ └── params.json │ │ └── parent │ ├── node/ │ │ └── .gitkeep │ ├── server/ │ │ ├── HttpServer.json │ │ ├── Node.json │ │ ├── Router.json │ │ ├── TimeLord.json │ │ └── wapi_threads │ ├── slave/ │ │ ├── Node.json │ │ ├── Router.json │ │ └── farmer │ ├── testnet12/ │ │ ├── Node.json │ │ ├── Router.json │ │ ├── Wallet.json │ │ ├── chain/ │ │ │ └── params.json │ │ └── parent │ ├── testnet13/ │ │ ├── Router.json │ │ ├── chain/ │ │ │ ├── params/ │ │ │ │ ├── escrow_binary │ │ │ │ ├── nft_binary │ │ │ │ ├── offer_binary │ │ │ │ ├── plot_nft_binary │ │ │ │ ├── relay_binary │ │ │ │ ├── swap_binary │ │ │ │ ├── template_binary │ │ │ │ ├── time_lock_binary │ │ │ │ └── token_binary │ │ │ └── params.json │ │ └── parent │ ├── timelord/ │ │ └── Proxy.json │ └── wallet/ │ └── Proxy.json ├── data/ │ ├── mainnet/ │ │ ├── project_relay.json │ │ └── tx_testnet_rewards.json │ ├── mainnet-rc/ │ │ ├── rewards.json │ │ ├── rewards.txt │ │ ├── timelord_rewards.json │ │ └── timelord_rewards.txt │ ├── testnet10/ │ │ ├── rewards.json │ │ └── rewards.txt │ ├── testnet12/ │ │ ├── rewards.json │ │ └── rewards.txt │ ├── testnet8/ │ │ ├── fix.js │ │ ├── rewards.json │ │ └── rewards.txt │ └── testnet9/ │ ├── rewards.json │ └── rewards.txt ├── docker-entrypoint.sh ├── docs/ │ ├── README.md │ ├── TODO.txt │ ├── astro.config.mjs │ ├── package.json │ ├── public/ │ │ ├── resources/ │ │ │ └── code/ │ │ │ └── timelord/ │ │ │ ├── architecture/ │ │ │ │ └── Intel_15th-gen_E-core/ │ │ │ │ └── sha256_ni_rec.cpp │ │ │ └── optimize/ │ │ │ └── sample/ │ │ │ └── sha256_ni_rec_sample.cpp │ │ └── robots.txt │ ├── security/ │ │ └── checklist.txt │ ├── src/ │ │ ├── components/ │ │ │ ├── MMXCardGrid.astro │ │ │ ├── MMXLEDBars.astro │ │ │ ├── MMXLinkCard.astro │ │ │ ├── MMXLinkCardT.astro │ │ │ ├── MarkdownContent.astro │ │ │ └── SocialIcons.astro │ │ ├── content/ │ │ │ └── docs/ │ │ │ ├── articles/ │ │ │ │ ├── general/ │ │ │ │ │ ├── mmx-tldr.md │ │ │ │ │ └── mmx-whitepaper.mdx │ │ │ │ ├── plotting/ │ │ │ │ │ ├── plot-format.md │ │ │ │ │ └── plot-size.mdx │ │ │ │ ├── timelord/ │ │ │ │ │ ├── timelord-optimizations.md │ │ │ │ │ └── timelord-predictions.md │ │ │ │ └── wallets/ │ │ │ │ └── wallets-mnemonic-passphrase.md │ │ │ ├── faq/ │ │ │ │ ├── general.md │ │ │ │ ├── node.md │ │ │ │ ├── plotting.md │ │ │ │ ├── timelord.md │ │ │ │ ├── vdf.md │ │ │ │ ├── wallet.md │ │ │ │ └── webgui.md │ │ │ ├── guides/ │ │ │ │ ├── docker.md │ │ │ │ ├── getting-started.md │ │ │ │ ├── installation.md │ │ │ │ ├── mmx-plotter.mdx │ │ │ │ ├── optimize-vdf.md │ │ │ │ └── remote-services.md │ │ │ ├── index.mdx │ │ │ ├── reference/ │ │ │ │ ├── MMX_wallet.md │ │ │ │ ├── NFT_standard.md │ │ │ │ ├── Token_standard.md │ │ │ │ ├── blockchain.md │ │ │ │ └── pooling_protocol.md │ │ │ └── software/ │ │ │ ├── MMX_script.md │ │ │ ├── RPC_protocol.md │ │ │ ├── cli-commands.md │ │ │ └── web_wallet_api.md │ │ ├── content.config.ts │ │ ├── pages/ │ │ │ └── tools/ │ │ │ └── time-calculator.astro │ │ └── styles/ │ │ └── style.css │ └── tsconfig.json ├── generated/ │ ├── contract/ │ │ ├── include/ │ │ │ └── mmx/ │ │ │ └── contract/ │ │ │ ├── Binary.hxx │ │ │ ├── Data.hxx │ │ │ ├── Executable.hxx │ │ │ ├── MultiSig.hxx │ │ │ ├── PubKey.hxx │ │ │ ├── TokenBase.hxx │ │ │ ├── WebData.hxx │ │ │ ├── accept_generic.hxx │ │ │ ├── method_t.hxx │ │ │ └── package.hxx │ │ └── src/ │ │ ├── Binary.cpp │ │ ├── Data.cpp │ │ ├── Executable.cpp │ │ ├── MultiSig.cpp │ │ ├── PubKey.cpp │ │ ├── TokenBase.cpp │ │ ├── WebData.cpp │ │ ├── method_t.cpp │ │ └── package.cpp │ ├── include/ │ │ └── mmx/ │ │ ├── Block.hxx │ │ ├── BlockHeader.hxx │ │ ├── ChainParams.hxx │ │ ├── Challenge.hxx │ │ ├── Contract.hxx │ │ ├── FarmInfo.hxx │ │ ├── FarmerAsyncClient.hxx │ │ ├── FarmerBase.hxx │ │ ├── FarmerClient.hxx │ │ ├── Farmer_get_farm_info.hxx │ │ ├── Farmer_get_farm_info_return.hxx │ │ ├── Farmer_get_farmer_keys.hxx │ │ ├── Farmer_get_farmer_keys_return.hxx │ │ ├── Farmer_get_mac_addr.hxx │ │ ├── Farmer_get_mac_addr_return.hxx │ │ ├── Farmer_get_partial_diff.hxx │ │ ├── Farmer_get_partial_diff_return.hxx │ │ ├── Farmer_get_partial_diffs.hxx │ │ ├── Farmer_get_partial_diffs_return.hxx │ │ ├── Farmer_sign_block.hxx │ │ ├── Farmer_sign_block_return.hxx │ │ ├── Farmer_sign_vote.hxx │ │ ├── Farmer_sign_vote_return.hxx │ │ ├── HarvesterAsyncClient.hxx │ │ ├── HarvesterBase.hxx │ │ ├── HarvesterClient.hxx │ │ ├── Harvester_add_plot_dir.hxx │ │ ├── Harvester_add_plot_dir_return.hxx │ │ ├── Harvester_get_farm_info.hxx │ │ ├── Harvester_get_farm_info_return.hxx │ │ ├── Harvester_get_total_bytes.hxx │ │ ├── Harvester_get_total_bytes_return.hxx │ │ ├── Harvester_reload.hxx │ │ ├── Harvester_reload_return.hxx │ │ ├── Harvester_rem_plot_dir.hxx │ │ ├── Harvester_rem_plot_dir_return.hxx │ │ ├── IntervalRequest.hxx │ │ ├── KeyFile.hxx │ │ ├── LookupInfo.hxx │ │ ├── NetworkInfo.hxx │ │ ├── NodeAsyncClient.hxx │ │ ├── NodeBase.hxx │ │ ├── NodeClient.hxx │ │ ├── Node_add_block.hxx │ │ ├── Node_add_block_return.hxx │ │ ├── Node_add_transaction.hxx │ │ ├── Node_add_transaction_return.hxx │ │ ├── Node_call_contract.hxx │ │ ├── Node_call_contract_return.hxx │ │ ├── Node_dump_storage.hxx │ │ ├── Node_dump_storage_return.hxx │ │ ├── Node_fetch_offers.hxx │ │ ├── Node_fetch_offers_return.hxx │ │ ├── Node_get_all_balances.hxx │ │ ├── Node_get_all_balances_return.hxx │ │ ├── Node_get_balance.hxx │ │ ├── Node_get_balance_return.hxx │ │ ├── Node_get_balances.hxx │ │ ├── Node_get_balances_return.hxx │ │ ├── Node_get_block.hxx │ │ ├── Node_get_block_at.hxx │ │ ├── Node_get_block_at_return.hxx │ │ ├── Node_get_block_hash.hxx │ │ ├── Node_get_block_hash_ex.hxx │ │ ├── Node_get_block_hash_ex_return.hxx │ │ ├── Node_get_block_hash_return.hxx │ │ ├── Node_get_block_return.hxx │ │ ├── Node_get_contract.hxx │ │ ├── Node_get_contract_balances.hxx │ │ ├── Node_get_contract_balances_return.hxx │ │ ├── Node_get_contract_for.hxx │ │ ├── Node_get_contract_for_return.hxx │ │ ├── Node_get_contract_return.hxx │ │ ├── Node_get_contracts.hxx │ │ ├── Node_get_contracts_by.hxx │ │ ├── Node_get_contracts_by_return.hxx │ │ ├── Node_get_contracts_owned_by.hxx │ │ ├── Node_get_contracts_owned_by_return.hxx │ │ ├── Node_get_contracts_return.hxx │ │ ├── Node_get_exec_history.hxx │ │ ├── Node_get_exec_history_return.hxx │ │ ├── Node_get_farmed_block_summary.hxx │ │ ├── Node_get_farmed_block_summary_return.hxx │ │ ├── Node_get_farmed_blocks.hxx │ │ ├── Node_get_farmed_blocks_return.hxx │ │ ├── Node_get_farmer_ranking.hxx │ │ ├── Node_get_farmer_ranking_return.hxx │ │ ├── Node_get_genesis_hash.hxx │ │ ├── Node_get_genesis_hash_return.hxx │ │ ├── Node_get_header.hxx │ │ ├── Node_get_header_at.hxx │ │ ├── Node_get_header_at_return.hxx │ │ ├── Node_get_header_return.hxx │ │ ├── Node_get_height.hxx │ │ ├── Node_get_height_return.hxx │ │ ├── Node_get_history.hxx │ │ ├── Node_get_history_memo.hxx │ │ ├── Node_get_history_memo_return.hxx │ │ ├── Node_get_history_return.hxx │ │ ├── Node_get_network_info.hxx │ │ ├── Node_get_network_info_return.hxx │ │ ├── Node_get_offer.hxx │ │ ├── Node_get_offer_return.hxx │ │ ├── Node_get_offers.hxx │ │ ├── Node_get_offers_by.hxx │ │ ├── Node_get_offers_by_return.hxx │ │ ├── Node_get_offers_return.hxx │ │ ├── Node_get_params.hxx │ │ ├── Node_get_params_return.hxx │ │ ├── Node_get_plot_nft_info.hxx │ │ ├── Node_get_plot_nft_info_return.hxx │ │ ├── Node_get_plot_nft_target.hxx │ │ ├── Node_get_plot_nft_target_return.hxx │ │ ├── Node_get_recent_offers.hxx │ │ ├── Node_get_recent_offers_for.hxx │ │ ├── Node_get_recent_offers_for_return.hxx │ │ ├── Node_get_recent_offers_return.hxx │ │ ├── Node_get_swap_equivalent_liquidity.hxx │ │ ├── Node_get_swap_equivalent_liquidity_return.hxx │ │ ├── Node_get_swap_fees_earned.hxx │ │ ├── Node_get_swap_fees_earned_return.hxx │ │ ├── Node_get_swap_history.hxx │ │ ├── Node_get_swap_history_return.hxx │ │ ├── Node_get_swap_info.hxx │ │ ├── Node_get_swap_info_return.hxx │ │ ├── Node_get_swap_liquidity_by.hxx │ │ ├── Node_get_swap_liquidity_by_return.hxx │ │ ├── Node_get_swap_trade_estimate.hxx │ │ ├── Node_get_swap_trade_estimate_return.hxx │ │ ├── Node_get_swap_user_info.hxx │ │ ├── Node_get_swap_user_info_return.hxx │ │ ├── Node_get_swaps.hxx │ │ ├── Node_get_swaps_return.hxx │ │ ├── Node_get_synced_height.hxx │ │ ├── Node_get_synced_height_return.hxx │ │ ├── Node_get_synced_vdf_height.hxx │ │ ├── Node_get_synced_vdf_height_return.hxx │ │ ├── Node_get_total_balance.hxx │ │ ├── Node_get_total_balance_return.hxx │ │ ├── Node_get_total_balances.hxx │ │ ├── Node_get_total_balances_return.hxx │ │ ├── Node_get_total_supply.hxx │ │ ├── Node_get_total_supply_return.hxx │ │ ├── Node_get_trade_history.hxx │ │ ├── Node_get_trade_history_for.hxx │ │ ├── Node_get_trade_history_for_return.hxx │ │ ├── Node_get_trade_history_return.hxx │ │ ├── Node_get_transaction.hxx │ │ ├── Node_get_transaction_return.hxx │ │ ├── Node_get_transactions.hxx │ │ ├── Node_get_transactions_return.hxx │ │ ├── Node_get_tx_height.hxx │ │ ├── Node_get_tx_height_return.hxx │ │ ├── Node_get_tx_ids.hxx │ │ ├── Node_get_tx_ids_at.hxx │ │ ├── Node_get_tx_ids_at_return.hxx │ │ ├── Node_get_tx_ids_return.hxx │ │ ├── Node_get_tx_ids_since.hxx │ │ ├── Node_get_tx_ids_since_return.hxx │ │ ├── Node_get_tx_info.hxx │ │ ├── Node_get_tx_info_for.hxx │ │ ├── Node_get_tx_info_for_return.hxx │ │ ├── Node_get_tx_info_return.hxx │ │ ├── Node_get_vdf_height.hxx │ │ ├── Node_get_vdf_height_return.hxx │ │ ├── Node_get_vdf_peak.hxx │ │ ├── Node_get_vdf_peak_return.hxx │ │ ├── Node_read_storage.hxx │ │ ├── Node_read_storage_array.hxx │ │ ├── Node_read_storage_array_return.hxx │ │ ├── Node_read_storage_entry_addr.hxx │ │ ├── Node_read_storage_entry_addr_return.hxx │ │ ├── Node_read_storage_entry_string.hxx │ │ ├── Node_read_storage_entry_string_return.hxx │ │ ├── Node_read_storage_entry_var.hxx │ │ ├── Node_read_storage_entry_var_return.hxx │ │ ├── Node_read_storage_field.hxx │ │ ├── Node_read_storage_field_return.hxx │ │ ├── Node_read_storage_map.hxx │ │ ├── Node_read_storage_map_return.hxx │ │ ├── Node_read_storage_object.hxx │ │ ├── Node_read_storage_object_return.hxx │ │ ├── Node_read_storage_return.hxx │ │ ├── Node_read_storage_var.hxx │ │ ├── Node_read_storage_var_return.hxx │ │ ├── Node_revert_sync.hxx │ │ ├── Node_revert_sync_return.hxx │ │ ├── Node_start_sync.hxx │ │ ├── Node_start_sync_return.hxx │ │ ├── Node_validate.hxx │ │ ├── Node_validate_return.hxx │ │ ├── Node_verify_partial.hxx │ │ ├── Node_verify_partial_return.hxx │ │ ├── Node_verify_plot_nft_target.hxx │ │ ├── Node_verify_plot_nft_target_return.hxx │ │ ├── Operation.hxx │ │ ├── Partial.hxx │ │ ├── PeerInfo.hxx │ │ ├── PlotHeader.hxx │ │ ├── ProofOfSpace.hxx │ │ ├── ProofOfSpaceNFT.hxx │ │ ├── ProofOfSpaceOG.hxx │ │ ├── ProofOfTime.hxx │ │ ├── ProofResponse.hxx │ │ ├── ProofServerAsyncClient.hxx │ │ ├── ProofServerBase.hxx │ │ ├── ProofServerClient.hxx │ │ ├── ProofServer_compute.hxx │ │ ├── ProofServer_compute_return.hxx │ │ ├── ReceiveNote.hxx │ │ ├── Request.hxx │ │ ├── Return.hxx │ │ ├── RouterAsyncClient.hxx │ │ ├── RouterBase.hxx │ │ ├── RouterClient.hxx │ │ ├── Router_discover.hxx │ │ ├── Router_discover_return.hxx │ │ ├── Router_fetch_block.hxx │ │ ├── Router_fetch_block_at.hxx │ │ ├── Router_fetch_block_at_return.hxx │ │ ├── Router_fetch_block_return.hxx │ │ ├── Router_get_blocks_at.hxx │ │ ├── Router_get_blocks_at_return.hxx │ │ ├── Router_get_connected_peers.hxx │ │ ├── Router_get_connected_peers_return.hxx │ │ ├── Router_get_id.hxx │ │ ├── Router_get_id_return.hxx │ │ ├── Router_get_info.hxx │ │ ├── Router_get_info_return.hxx │ │ ├── Router_get_known_peers.hxx │ │ ├── Router_get_known_peers_return.hxx │ │ ├── Router_get_peer_info.hxx │ │ ├── Router_get_peer_info_return.hxx │ │ ├── Router_get_peers.hxx │ │ ├── Router_get_peers_return.hxx │ │ ├── Router_kick_peer.hxx │ │ ├── Router_kick_peer_return.hxx │ │ ├── Router_sign_msg.hxx │ │ ├── Router_sign_msg_return.hxx │ │ ├── Solution.hxx │ │ ├── TimeLordAsyncClient.hxx │ │ ├── TimeLordBase.hxx │ │ ├── TimeLordClient.hxx │ │ ├── TimeLord_stop_vdf.hxx │ │ ├── TimeLord_stop_vdf_return.hxx │ │ ├── Transaction.hxx │ │ ├── TransactionBase.hxx │ │ ├── VDF_Point.hxx │ │ ├── ValidatorVote.hxx │ │ ├── WalletAsyncClient.hxx │ │ ├── WalletBase.hxx │ │ ├── WalletClient.hxx │ │ ├── WalletFile.hxx │ │ ├── Wallet_accept_offer.hxx │ │ ├── Wallet_accept_offer_return.hxx │ │ ├── Wallet_add_account.hxx │ │ ├── Wallet_add_account_return.hxx │ │ ├── Wallet_add_token.hxx │ │ ├── Wallet_add_token_return.hxx │ │ ├── Wallet_cancel_offer.hxx │ │ ├── Wallet_cancel_offer_return.hxx │ │ ├── Wallet_complete.hxx │ │ ├── Wallet_complete_return.hxx │ │ ├── Wallet_create_account.hxx │ │ ├── Wallet_create_account_return.hxx │ │ ├── Wallet_create_wallet.hxx │ │ ├── Wallet_create_wallet_return.hxx │ │ ├── Wallet_deploy.hxx │ │ ├── Wallet_deploy_return.hxx │ │ ├── Wallet_deposit.hxx │ │ ├── Wallet_deposit_return.hxx │ │ ├── Wallet_execute.hxx │ │ ├── Wallet_execute_return.hxx │ │ ├── Wallet_export_wallet.hxx │ │ ├── Wallet_export_wallet_return.hxx │ │ ├── Wallet_find_wallet_by_addr.hxx │ │ ├── Wallet_find_wallet_by_addr_return.hxx │ │ ├── Wallet_gather_inputs_for.hxx │ │ ├── Wallet_gather_inputs_for_return.hxx │ │ ├── Wallet_get_account.hxx │ │ ├── Wallet_get_account_return.hxx │ │ ├── Wallet_get_address.hxx │ │ ├── Wallet_get_address_return.hxx │ │ ├── Wallet_get_all_accounts.hxx │ │ ├── Wallet_get_all_accounts_return.hxx │ │ ├── Wallet_get_all_addresses.hxx │ │ ├── Wallet_get_all_addresses_return.hxx │ │ ├── Wallet_get_all_farmer_keys.hxx │ │ ├── Wallet_get_all_farmer_keys_return.hxx │ │ ├── Wallet_get_balance.hxx │ │ ├── Wallet_get_balance_return.hxx │ │ ├── Wallet_get_balances.hxx │ │ ├── Wallet_get_balances_return.hxx │ │ ├── Wallet_get_contract_balances.hxx │ │ ├── Wallet_get_contract_balances_return.hxx │ │ ├── Wallet_get_contracts.hxx │ │ ├── Wallet_get_contracts_owned.hxx │ │ ├── Wallet_get_contracts_owned_return.hxx │ │ ├── Wallet_get_contracts_return.hxx │ │ ├── Wallet_get_farmer_keys.hxx │ │ ├── Wallet_get_farmer_keys_return.hxx │ │ ├── Wallet_get_history.hxx │ │ ├── Wallet_get_history_return.hxx │ │ ├── Wallet_get_master_seed.hxx │ │ ├── Wallet_get_master_seed_return.hxx │ │ ├── Wallet_get_mnemonic_seed.hxx │ │ ├── Wallet_get_mnemonic_seed_return.hxx │ │ ├── Wallet_get_mnemonic_wordlist.hxx │ │ ├── Wallet_get_mnemonic_wordlist_return.hxx │ │ ├── Wallet_get_offers.hxx │ │ ├── Wallet_get_offers_return.hxx │ │ ├── Wallet_get_swap_liquidity.hxx │ │ ├── Wallet_get_swap_liquidity_return.hxx │ │ ├── Wallet_get_token_list.hxx │ │ ├── Wallet_get_token_list_return.hxx │ │ ├── Wallet_get_total_balances.hxx │ │ ├── Wallet_get_total_balances_return.hxx │ │ ├── Wallet_get_tx_log.hxx │ │ ├── Wallet_get_tx_log_return.hxx │ │ ├── Wallet_import_wallet.hxx │ │ ├── Wallet_import_wallet_return.hxx │ │ ├── Wallet_is_locked.hxx │ │ ├── Wallet_is_locked_return.hxx │ │ ├── Wallet_lock.hxx │ │ ├── Wallet_lock_return.hxx │ │ ├── Wallet_make_offer.hxx │ │ ├── Wallet_make_offer_return.hxx │ │ ├── Wallet_mark_spent.hxx │ │ ├── Wallet_mark_spent_return.hxx │ │ ├── Wallet_offer_trade.hxx │ │ ├── Wallet_offer_trade_return.hxx │ │ ├── Wallet_offer_withdraw.hxx │ │ ├── Wallet_offer_withdraw_return.hxx │ │ ├── Wallet_plotnft_create.hxx │ │ ├── Wallet_plotnft_create_return.hxx │ │ ├── Wallet_plotnft_exec.hxx │ │ ├── Wallet_plotnft_exec_return.hxx │ │ ├── Wallet_release.hxx │ │ ├── Wallet_release_all.hxx │ │ ├── Wallet_release_all_return.hxx │ │ ├── Wallet_release_return.hxx │ │ ├── Wallet_rem_token.hxx │ │ ├── Wallet_rem_token_return.hxx │ │ ├── Wallet_remove_account.hxx │ │ ├── Wallet_remove_account_return.hxx │ │ ├── Wallet_reserve.hxx │ │ ├── Wallet_reserve_return.hxx │ │ ├── Wallet_reset_cache.hxx │ │ ├── Wallet_reset_cache_return.hxx │ │ ├── Wallet_send.hxx │ │ ├── Wallet_send_from.hxx │ │ ├── Wallet_send_from_return.hxx │ │ ├── Wallet_send_many.hxx │ │ ├── Wallet_send_many_return.hxx │ │ ├── Wallet_send_off.hxx │ │ ├── Wallet_send_off_return.hxx │ │ ├── Wallet_send_return.hxx │ │ ├── Wallet_set_address_count.hxx │ │ ├── Wallet_set_address_count_return.hxx │ │ ├── Wallet_sign_msg.hxx │ │ ├── Wallet_sign_msg_return.hxx │ │ ├── Wallet_sign_off.hxx │ │ ├── Wallet_sign_off_return.hxx │ │ ├── Wallet_swap_add_liquid.hxx │ │ ├── Wallet_swap_add_liquid_return.hxx │ │ ├── Wallet_swap_rem_liquid.hxx │ │ ├── Wallet_swap_rem_liquid_return.hxx │ │ ├── Wallet_swap_trade.hxx │ │ ├── Wallet_swap_trade_return.hxx │ │ ├── Wallet_unlock.hxx │ │ ├── Wallet_unlock_return.hxx │ │ ├── Wallet_update_cache.hxx │ │ ├── Wallet_update_cache_return.hxx │ │ ├── WebAPIAsyncClient.hxx │ │ ├── WebAPIBase.hxx │ │ ├── WebAPIClient.hxx │ │ ├── WebAPI_shutdown.hxx │ │ ├── WebAPI_shutdown_return.hxx │ │ ├── accept_generic.hxx │ │ ├── account_info_t.hxx │ │ ├── account_t.hxx │ │ ├── balance_t.hxx │ │ ├── block_index_t.hxx │ │ ├── compile_flags_t.hxx │ │ ├── error_code_e.hxx │ │ ├── exec_entry_t.hxx │ │ ├── exec_error_t.hxx │ │ ├── exec_result_t.hxx │ │ ├── farmed_block_info_t.hxx │ │ ├── farmed_block_summary_t.hxx │ │ ├── node_info_t.hxx │ │ ├── node_type_e.hxx │ │ ├── offer_data_t.hxx │ │ ├── package.hxx │ │ ├── peer_info_t.hxx │ │ ├── permission_e.hxx │ │ ├── plot_nft_info_t.hxx │ │ ├── pooling_error_e.hxx │ │ ├── pooling_info_t.hxx │ │ ├── pooling_stats_t.hxx │ │ ├── query_filter_t.hxx │ │ ├── spend_options_t.hxx │ │ ├── swap_entry_t.hxx │ │ ├── swap_info_t.hxx │ │ ├── swap_pool_info_t.hxx │ │ ├── swap_user_info_t.hxx │ │ ├── table_entry_t.hxx │ │ ├── trade_entry_t.hxx │ │ ├── trade_log_t.hxx │ │ ├── tx_entry_t.hxx │ │ ├── tx_index_t.hxx │ │ ├── tx_info_t.hxx │ │ ├── tx_log_entry_t.hxx │ │ ├── tx_note_e.hxx │ │ ├── tx_type_e.hxx │ │ ├── txin_t.hxx │ │ ├── txio_entry_t.hxx │ │ ├── txio_t.hxx │ │ ├── txout_t.hxx │ │ ├── uint_fraction_t.hxx │ │ ├── ulong_fraction_t.hxx │ │ └── virtual_plot_info_t.hxx │ ├── operation/ │ │ ├── include/ │ │ │ └── mmx/ │ │ │ └── operation/ │ │ │ ├── Deposit.hxx │ │ │ ├── Execute.hxx │ │ │ ├── accept_generic.hxx │ │ │ └── package.hxx │ │ └── src/ │ │ ├── Deposit.cpp │ │ ├── Execute.cpp │ │ └── package.cpp │ ├── solution/ │ │ ├── include/ │ │ │ └── mmx/ │ │ │ └── solution/ │ │ │ ├── MultiSig.hxx │ │ │ ├── PubKey.hxx │ │ │ ├── accept_generic.hxx │ │ │ └── package.hxx │ │ └── src/ │ │ ├── MultiSig.cpp │ │ ├── PubKey.cpp │ │ └── package.cpp │ ├── src/ │ │ ├── Block.cpp │ │ ├── BlockHeader.cpp │ │ ├── ChainParams.cpp │ │ ├── Challenge.cpp │ │ ├── Contract.cpp │ │ ├── FarmInfo.cpp │ │ ├── FarmerAsyncClient.cpp │ │ ├── FarmerBase.cpp │ │ ├── FarmerClient.cpp │ │ ├── Farmer_get_farm_info.cpp │ │ ├── Farmer_get_farm_info_return.cpp │ │ ├── Farmer_get_farmer_keys.cpp │ │ ├── Farmer_get_farmer_keys_return.cpp │ │ ├── Farmer_get_mac_addr.cpp │ │ ├── Farmer_get_mac_addr_return.cpp │ │ ├── Farmer_get_partial_diff.cpp │ │ ├── Farmer_get_partial_diff_return.cpp │ │ ├── Farmer_get_partial_diffs.cpp │ │ ├── Farmer_get_partial_diffs_return.cpp │ │ ├── Farmer_sign_block.cpp │ │ ├── Farmer_sign_block_return.cpp │ │ ├── Farmer_sign_vote.cpp │ │ ├── Farmer_sign_vote_return.cpp │ │ ├── HarvesterAsyncClient.cpp │ │ ├── HarvesterBase.cpp │ │ ├── HarvesterClient.cpp │ │ ├── Harvester_add_plot_dir.cpp │ │ ├── Harvester_add_plot_dir_return.cpp │ │ ├── Harvester_get_farm_info.cpp │ │ ├── Harvester_get_farm_info_return.cpp │ │ ├── Harvester_get_total_bytes.cpp │ │ ├── Harvester_get_total_bytes_return.cpp │ │ ├── Harvester_reload.cpp │ │ ├── Harvester_reload_return.cpp │ │ ├── Harvester_rem_plot_dir.cpp │ │ ├── Harvester_rem_plot_dir_return.cpp │ │ ├── IntervalRequest.cpp │ │ ├── KeyFile.cpp │ │ ├── LookupInfo.cpp │ │ ├── NetworkInfo.cpp │ │ ├── NodeAsyncClient.cpp │ │ ├── NodeBase.cpp │ │ ├── NodeClient.cpp │ │ ├── Node_add_block.cpp │ │ ├── Node_add_block_return.cpp │ │ ├── Node_add_transaction.cpp │ │ ├── Node_add_transaction_return.cpp │ │ ├── Node_call_contract.cpp │ │ ├── Node_call_contract_return.cpp │ │ ├── Node_dump_storage.cpp │ │ ├── Node_dump_storage_return.cpp │ │ ├── Node_fetch_offers.cpp │ │ ├── Node_fetch_offers_return.cpp │ │ ├── Node_get_all_balances.cpp │ │ ├── Node_get_all_balances_return.cpp │ │ ├── Node_get_balance.cpp │ │ ├── Node_get_balance_return.cpp │ │ ├── Node_get_balances.cpp │ │ ├── Node_get_balances_return.cpp │ │ ├── Node_get_block.cpp │ │ ├── Node_get_block_at.cpp │ │ ├── Node_get_block_at_return.cpp │ │ ├── Node_get_block_hash.cpp │ │ ├── Node_get_block_hash_ex.cpp │ │ ├── Node_get_block_hash_ex_return.cpp │ │ ├── Node_get_block_hash_return.cpp │ │ ├── Node_get_block_return.cpp │ │ ├── Node_get_contract.cpp │ │ ├── Node_get_contract_balances.cpp │ │ ├── Node_get_contract_balances_return.cpp │ │ ├── Node_get_contract_for.cpp │ │ ├── Node_get_contract_for_return.cpp │ │ ├── Node_get_contract_return.cpp │ │ ├── Node_get_contracts.cpp │ │ ├── Node_get_contracts_by.cpp │ │ ├── Node_get_contracts_by_return.cpp │ │ ├── Node_get_contracts_owned_by.cpp │ │ ├── Node_get_contracts_owned_by_return.cpp │ │ ├── Node_get_contracts_return.cpp │ │ ├── Node_get_exec_history.cpp │ │ ├── Node_get_exec_history_return.cpp │ │ ├── Node_get_farmed_block_summary.cpp │ │ ├── Node_get_farmed_block_summary_return.cpp │ │ ├── Node_get_farmed_blocks.cpp │ │ ├── Node_get_farmed_blocks_return.cpp │ │ ├── Node_get_farmer_ranking.cpp │ │ ├── Node_get_farmer_ranking_return.cpp │ │ ├── Node_get_genesis_hash.cpp │ │ ├── Node_get_genesis_hash_return.cpp │ │ ├── Node_get_header.cpp │ │ ├── Node_get_header_at.cpp │ │ ├── Node_get_header_at_return.cpp │ │ ├── Node_get_header_return.cpp │ │ ├── Node_get_height.cpp │ │ ├── Node_get_height_return.cpp │ │ ├── Node_get_history.cpp │ │ ├── Node_get_history_memo.cpp │ │ ├── Node_get_history_memo_return.cpp │ │ ├── Node_get_history_return.cpp │ │ ├── Node_get_network_info.cpp │ │ ├── Node_get_network_info_return.cpp │ │ ├── Node_get_offer.cpp │ │ ├── Node_get_offer_return.cpp │ │ ├── Node_get_offers.cpp │ │ ├── Node_get_offers_by.cpp │ │ ├── Node_get_offers_by_return.cpp │ │ ├── Node_get_offers_return.cpp │ │ ├── Node_get_params.cpp │ │ ├── Node_get_params_return.cpp │ │ ├── Node_get_plot_nft_info.cpp │ │ ├── Node_get_plot_nft_info_return.cpp │ │ ├── Node_get_plot_nft_target.cpp │ │ ├── Node_get_plot_nft_target_return.cpp │ │ ├── Node_get_recent_offers.cpp │ │ ├── Node_get_recent_offers_for.cpp │ │ ├── Node_get_recent_offers_for_return.cpp │ │ ├── Node_get_recent_offers_return.cpp │ │ ├── Node_get_swap_equivalent_liquidity.cpp │ │ ├── Node_get_swap_equivalent_liquidity_return.cpp │ │ ├── Node_get_swap_fees_earned.cpp │ │ ├── Node_get_swap_fees_earned_return.cpp │ │ ├── Node_get_swap_history.cpp │ │ ├── Node_get_swap_history_return.cpp │ │ ├── Node_get_swap_info.cpp │ │ ├── Node_get_swap_info_return.cpp │ │ ├── Node_get_swap_liquidity_by.cpp │ │ ├── Node_get_swap_liquidity_by_return.cpp │ │ ├── Node_get_swap_trade_estimate.cpp │ │ ├── Node_get_swap_trade_estimate_return.cpp │ │ ├── Node_get_swap_user_info.cpp │ │ ├── Node_get_swap_user_info_return.cpp │ │ ├── Node_get_swaps.cpp │ │ ├── Node_get_swaps_return.cpp │ │ ├── Node_get_synced_height.cpp │ │ ├── Node_get_synced_height_return.cpp │ │ ├── Node_get_synced_vdf_height.cpp │ │ ├── Node_get_synced_vdf_height_return.cpp │ │ ├── Node_get_total_balance.cpp │ │ ├── Node_get_total_balance_return.cpp │ │ ├── Node_get_total_balances.cpp │ │ ├── Node_get_total_balances_return.cpp │ │ ├── Node_get_total_supply.cpp │ │ ├── Node_get_total_supply_return.cpp │ │ ├── Node_get_trade_history.cpp │ │ ├── Node_get_trade_history_for.cpp │ │ ├── Node_get_trade_history_for_return.cpp │ │ ├── Node_get_trade_history_return.cpp │ │ ├── Node_get_transaction.cpp │ │ ├── Node_get_transaction_return.cpp │ │ ├── Node_get_transactions.cpp │ │ ├── Node_get_transactions_return.cpp │ │ ├── Node_get_tx_height.cpp │ │ ├── Node_get_tx_height_return.cpp │ │ ├── Node_get_tx_ids.cpp │ │ ├── Node_get_tx_ids_at.cpp │ │ ├── Node_get_tx_ids_at_return.cpp │ │ ├── Node_get_tx_ids_return.cpp │ │ ├── Node_get_tx_ids_since.cpp │ │ ├── Node_get_tx_ids_since_return.cpp │ │ ├── Node_get_tx_info.cpp │ │ ├── Node_get_tx_info_for.cpp │ │ ├── Node_get_tx_info_for_return.cpp │ │ ├── Node_get_tx_info_return.cpp │ │ ├── Node_get_vdf_height.cpp │ │ ├── Node_get_vdf_height_return.cpp │ │ ├── Node_get_vdf_peak.cpp │ │ ├── Node_get_vdf_peak_return.cpp │ │ ├── Node_read_storage.cpp │ │ ├── Node_read_storage_array.cpp │ │ ├── Node_read_storage_array_return.cpp │ │ ├── Node_read_storage_entry_addr.cpp │ │ ├── Node_read_storage_entry_addr_return.cpp │ │ ├── Node_read_storage_entry_string.cpp │ │ ├── Node_read_storage_entry_string_return.cpp │ │ ├── Node_read_storage_entry_var.cpp │ │ ├── Node_read_storage_entry_var_return.cpp │ │ ├── Node_read_storage_field.cpp │ │ ├── Node_read_storage_field_return.cpp │ │ ├── Node_read_storage_map.cpp │ │ ├── Node_read_storage_map_return.cpp │ │ ├── Node_read_storage_object.cpp │ │ ├── Node_read_storage_object_return.cpp │ │ ├── Node_read_storage_return.cpp │ │ ├── Node_read_storage_var.cpp │ │ ├── Node_read_storage_var_return.cpp │ │ ├── Node_revert_sync.cpp │ │ ├── Node_revert_sync_return.cpp │ │ ├── Node_start_sync.cpp │ │ ├── Node_start_sync_return.cpp │ │ ├── Node_validate.cpp │ │ ├── Node_validate_return.cpp │ │ ├── Node_verify_partial.cpp │ │ ├── Node_verify_partial_return.cpp │ │ ├── Node_verify_plot_nft_target.cpp │ │ ├── Node_verify_plot_nft_target_return.cpp │ │ ├── Operation.cpp │ │ ├── Partial.cpp │ │ ├── PeerInfo.cpp │ │ ├── PlotHeader.cpp │ │ ├── ProofOfSpace.cpp │ │ ├── ProofOfSpaceNFT.cpp │ │ ├── ProofOfSpaceOG.cpp │ │ ├── ProofOfTime.cpp │ │ ├── ProofResponse.cpp │ │ ├── ProofServerAsyncClient.cpp │ │ ├── ProofServerBase.cpp │ │ ├── ProofServerClient.cpp │ │ ├── ProofServer_compute.cpp │ │ ├── ProofServer_compute_return.cpp │ │ ├── ReceiveNote.cpp │ │ ├── Request.cpp │ │ ├── Return.cpp │ │ ├── RouterAsyncClient.cpp │ │ ├── RouterBase.cpp │ │ ├── RouterClient.cpp │ │ ├── Router_discover.cpp │ │ ├── Router_discover_return.cpp │ │ ├── Router_fetch_block.cpp │ │ ├── Router_fetch_block_at.cpp │ │ ├── Router_fetch_block_at_return.cpp │ │ ├── Router_fetch_block_return.cpp │ │ ├── Router_get_blocks_at.cpp │ │ ├── Router_get_blocks_at_return.cpp │ │ ├── Router_get_connected_peers.cpp │ │ ├── Router_get_connected_peers_return.cpp │ │ ├── Router_get_id.cpp │ │ ├── Router_get_id_return.cpp │ │ ├── Router_get_info.cpp │ │ ├── Router_get_info_return.cpp │ │ ├── Router_get_known_peers.cpp │ │ ├── Router_get_known_peers_return.cpp │ │ ├── Router_get_peer_info.cpp │ │ ├── Router_get_peer_info_return.cpp │ │ ├── Router_get_peers.cpp │ │ ├── Router_get_peers_return.cpp │ │ ├── Router_kick_peer.cpp │ │ ├── Router_kick_peer_return.cpp │ │ ├── Router_sign_msg.cpp │ │ ├── Router_sign_msg_return.cpp │ │ ├── Solution.cpp │ │ ├── TimeLordAsyncClient.cpp │ │ ├── TimeLordBase.cpp │ │ ├── TimeLordClient.cpp │ │ ├── TimeLord_stop_vdf.cpp │ │ ├── TimeLord_stop_vdf_return.cpp │ │ ├── Transaction.cpp │ │ ├── TransactionBase.cpp │ │ ├── VDF_Point.cpp │ │ ├── ValidatorVote.cpp │ │ ├── WalletAsyncClient.cpp │ │ ├── WalletBase.cpp │ │ ├── WalletClient.cpp │ │ ├── WalletFile.cpp │ │ ├── Wallet_accept_offer.cpp │ │ ├── Wallet_accept_offer_return.cpp │ │ ├── Wallet_add_account.cpp │ │ ├── Wallet_add_account_return.cpp │ │ ├── Wallet_add_token.cpp │ │ ├── Wallet_add_token_return.cpp │ │ ├── Wallet_cancel_offer.cpp │ │ ├── Wallet_cancel_offer_return.cpp │ │ ├── Wallet_complete.cpp │ │ ├── Wallet_complete_return.cpp │ │ ├── Wallet_create_account.cpp │ │ ├── Wallet_create_account_return.cpp │ │ ├── Wallet_create_wallet.cpp │ │ ├── Wallet_create_wallet_return.cpp │ │ ├── Wallet_deploy.cpp │ │ ├── Wallet_deploy_return.cpp │ │ ├── Wallet_deposit.cpp │ │ ├── Wallet_deposit_return.cpp │ │ ├── Wallet_execute.cpp │ │ ├── Wallet_execute_return.cpp │ │ ├── Wallet_export_wallet.cpp │ │ ├── Wallet_export_wallet_return.cpp │ │ ├── Wallet_find_wallet_by_addr.cpp │ │ ├── Wallet_find_wallet_by_addr_return.cpp │ │ ├── Wallet_gather_inputs_for.cpp │ │ ├── Wallet_gather_inputs_for_return.cpp │ │ ├── Wallet_get_account.cpp │ │ ├── Wallet_get_account_return.cpp │ │ ├── Wallet_get_address.cpp │ │ ├── Wallet_get_address_return.cpp │ │ ├── Wallet_get_all_accounts.cpp │ │ ├── Wallet_get_all_accounts_return.cpp │ │ ├── Wallet_get_all_addresses.cpp │ │ ├── Wallet_get_all_addresses_return.cpp │ │ ├── Wallet_get_all_farmer_keys.cpp │ │ ├── Wallet_get_all_farmer_keys_return.cpp │ │ ├── Wallet_get_balance.cpp │ │ ├── Wallet_get_balance_return.cpp │ │ ├── Wallet_get_balances.cpp │ │ ├── Wallet_get_balances_return.cpp │ │ ├── Wallet_get_contract_balances.cpp │ │ ├── Wallet_get_contract_balances_return.cpp │ │ ├── Wallet_get_contracts.cpp │ │ ├── Wallet_get_contracts_owned.cpp │ │ ├── Wallet_get_contracts_owned_return.cpp │ │ ├── Wallet_get_contracts_return.cpp │ │ ├── Wallet_get_farmer_keys.cpp │ │ ├── Wallet_get_farmer_keys_return.cpp │ │ ├── Wallet_get_history.cpp │ │ ├── Wallet_get_history_return.cpp │ │ ├── Wallet_get_master_seed.cpp │ │ ├── Wallet_get_master_seed_return.cpp │ │ ├── Wallet_get_mnemonic_seed.cpp │ │ ├── Wallet_get_mnemonic_seed_return.cpp │ │ ├── Wallet_get_mnemonic_wordlist.cpp │ │ ├── Wallet_get_mnemonic_wordlist_return.cpp │ │ ├── Wallet_get_offers.cpp │ │ ├── Wallet_get_offers_return.cpp │ │ ├── Wallet_get_swap_liquidity.cpp │ │ ├── Wallet_get_swap_liquidity_return.cpp │ │ ├── Wallet_get_token_list.cpp │ │ ├── Wallet_get_token_list_return.cpp │ │ ├── Wallet_get_total_balances.cpp │ │ ├── Wallet_get_total_balances_return.cpp │ │ ├── Wallet_get_tx_log.cpp │ │ ├── Wallet_get_tx_log_return.cpp │ │ ├── Wallet_import_wallet.cpp │ │ ├── Wallet_import_wallet_return.cpp │ │ ├── Wallet_is_locked.cpp │ │ ├── Wallet_is_locked_return.cpp │ │ ├── Wallet_lock.cpp │ │ ├── Wallet_lock_return.cpp │ │ ├── Wallet_make_offer.cpp │ │ ├── Wallet_make_offer_return.cpp │ │ ├── Wallet_mark_spent.cpp │ │ ├── Wallet_mark_spent_return.cpp │ │ ├── Wallet_offer_trade.cpp │ │ ├── Wallet_offer_trade_return.cpp │ │ ├── Wallet_offer_withdraw.cpp │ │ ├── Wallet_offer_withdraw_return.cpp │ │ ├── Wallet_plotnft_create.cpp │ │ ├── Wallet_plotnft_create_return.cpp │ │ ├── Wallet_plotnft_exec.cpp │ │ ├── Wallet_plotnft_exec_return.cpp │ │ ├── Wallet_release.cpp │ │ ├── Wallet_release_all.cpp │ │ ├── Wallet_release_all_return.cpp │ │ ├── Wallet_release_return.cpp │ │ ├── Wallet_rem_token.cpp │ │ ├── Wallet_rem_token_return.cpp │ │ ├── Wallet_remove_account.cpp │ │ ├── Wallet_remove_account_return.cpp │ │ ├── Wallet_reserve.cpp │ │ ├── Wallet_reserve_return.cpp │ │ ├── Wallet_reset_cache.cpp │ │ ├── Wallet_reset_cache_return.cpp │ │ ├── Wallet_send.cpp │ │ ├── Wallet_send_from.cpp │ │ ├── Wallet_send_from_return.cpp │ │ ├── Wallet_send_many.cpp │ │ ├── Wallet_send_many_return.cpp │ │ ├── Wallet_send_off.cpp │ │ ├── Wallet_send_off_return.cpp │ │ ├── Wallet_send_return.cpp │ │ ├── Wallet_set_address_count.cpp │ │ ├── Wallet_set_address_count_return.cpp │ │ ├── Wallet_sign_msg.cpp │ │ ├── Wallet_sign_msg_return.cpp │ │ ├── Wallet_sign_off.cpp │ │ ├── Wallet_sign_off_return.cpp │ │ ├── Wallet_swap_add_liquid.cpp │ │ ├── Wallet_swap_add_liquid_return.cpp │ │ ├── Wallet_swap_rem_liquid.cpp │ │ ├── Wallet_swap_rem_liquid_return.cpp │ │ ├── Wallet_swap_trade.cpp │ │ ├── Wallet_swap_trade_return.cpp │ │ ├── Wallet_unlock.cpp │ │ ├── Wallet_unlock_return.cpp │ │ ├── Wallet_update_cache.cpp │ │ ├── Wallet_update_cache_return.cpp │ │ ├── WebAPIAsyncClient.cpp │ │ ├── WebAPIBase.cpp │ │ ├── WebAPIClient.cpp │ │ ├── WebAPI_shutdown.cpp │ │ ├── WebAPI_shutdown_return.cpp │ │ ├── account_info_t.cpp │ │ ├── account_t.cpp │ │ ├── balance_t.cpp │ │ ├── block_index_t.cpp │ │ ├── compile_flags_t.cpp │ │ ├── error_code_e.cpp │ │ ├── exec_entry_t.cpp │ │ ├── exec_error_t.cpp │ │ ├── exec_result_t.cpp │ │ ├── farmed_block_info_t.cpp │ │ ├── farmed_block_summary_t.cpp │ │ ├── node_info_t.cpp │ │ ├── node_type_e.cpp │ │ ├── offer_data_t.cpp │ │ ├── package.cpp │ │ ├── peer_info_t.cpp │ │ ├── permission_e.cpp │ │ ├── plot_nft_info_t.cpp │ │ ├── pooling_error_e.cpp │ │ ├── pooling_info_t.cpp │ │ ├── pooling_stats_t.cpp │ │ ├── query_filter_t.cpp │ │ ├── spend_options_t.cpp │ │ ├── swap_entry_t.cpp │ │ ├── swap_info_t.cpp │ │ ├── swap_pool_info_t.cpp │ │ ├── swap_user_info_t.cpp │ │ ├── table_entry_t.cpp │ │ ├── trade_entry_t.cpp │ │ ├── trade_log_t.cpp │ │ ├── tx_entry_t.cpp │ │ ├── tx_index_t.cpp │ │ ├── tx_info_t.cpp │ │ ├── tx_log_entry_t.cpp │ │ ├── tx_note_e.cpp │ │ ├── tx_type_e.cpp │ │ ├── txin_t.cpp │ │ ├── txio_entry_t.cpp │ │ ├── txio_t.cpp │ │ ├── txout_t.cpp │ │ ├── uint_fraction_t.cpp │ │ ├── ulong_fraction_t.cpp │ │ └── virtual_plot_info_t.cpp │ └── vm/ │ ├── include/ │ │ └── mmx/ │ │ └── vm/ │ │ ├── accept_generic.hxx │ │ └── package.hxx │ └── src/ │ └── package.cpp ├── include/ │ ├── cuda_sha512.h │ ├── hmac_sha512.h │ ├── mmx/ │ │ ├── DataBase.h │ │ ├── ECDSA_Wallet.h │ │ ├── Farmer.h │ │ ├── Harvester.h │ │ ├── Node.h │ │ ├── OCL_VDF.h │ │ ├── ProofServer.h │ │ ├── Qt_GUI.h │ │ ├── Router.h │ │ ├── TimeLord.h │ │ ├── TimeLordRewards.h │ │ ├── Wallet.h │ │ ├── WebAPI.h │ │ ├── WebRender.h │ │ ├── addr_t.hpp │ │ ├── balance_cache_t.h │ │ ├── bls_pubkey_t.hpp │ │ ├── bls_signature_t.hpp │ │ ├── bytes_t.hpp │ │ ├── exception.h │ │ ├── fixed128.hpp │ │ ├── hash_512_t.hpp │ │ ├── hash_t.hpp │ │ ├── helpers.h │ │ ├── hmac_sha512.hpp │ │ ├── http_request.h │ │ ├── mnemonic.h │ │ ├── multi_table.h │ │ ├── pos/ │ │ │ ├── Prover.h │ │ │ ├── config.h │ │ │ ├── cuda_recompute.h │ │ │ ├── encoding.h │ │ │ ├── mem_hash.h │ │ │ ├── util.h │ │ │ └── verify.h │ │ ├── pubkey_t.hpp │ │ ├── secp256k1.hpp │ │ ├── signature_t.hpp │ │ ├── skey_t.hpp │ │ ├── table.h │ │ ├── tree_hash.h │ │ ├── tx_entry_t.hpp │ │ ├── txio_entry_t.hpp │ │ ├── txio_t.hpp │ │ ├── uint128.hpp │ │ ├── utils.h │ │ ├── vm/ │ │ │ ├── Compiler.h │ │ │ ├── Engine.h │ │ │ ├── Storage.h │ │ │ ├── StorageCache.h │ │ │ ├── StorageDB.h │ │ │ ├── StorageProxy.h │ │ │ ├── StorageRAM.h │ │ │ ├── instr_t.h │ │ │ ├── var_t.h │ │ │ └── varptr_t.hpp │ │ ├── vm_interface.h │ │ └── write_bytes.h │ ├── sha256_arm.h │ ├── sha256_avx2.h │ ├── sha256_ni.h │ ├── sha512.h │ └── upnp_mapper.h ├── interface/ │ ├── Block.vni │ ├── BlockHeader.vni │ ├── ChainParams.vni │ ├── Challenge.vni │ ├── Contract.vni │ ├── FarmInfo.vni │ ├── IntervalRequest.vni │ ├── KeyFile.vni │ ├── LookupInfo.vni │ ├── NetworkInfo.vni │ ├── Operation.vni │ ├── Partial.vni │ ├── PeerInfo.vni │ ├── PlotHeader.vni │ ├── ProofOfSpace.vni │ ├── ProofOfSpaceNFT.vni │ ├── ProofOfSpaceOG.vni │ ├── ProofOfTime.vni │ ├── ProofResponse.vni │ ├── ReceiveNote.vni │ ├── Request.vni │ ├── Return.vni │ ├── Solution.vni │ ├── Transaction.vni │ ├── TransactionBase.vni │ ├── VDF_Point.vni │ ├── ValidatorVote.vni │ ├── WalletFile.vni │ ├── account_info_t.vni │ ├── account_t.vni │ ├── balance_t.vni │ ├── block_index_t.vni │ ├── compile_flags_t.vni │ ├── contract/ │ │ ├── Binary.vni │ │ ├── Data.vni │ │ ├── Executable.vni │ │ ├── MultiSig.vni │ │ ├── PubKey.vni │ │ ├── TokenBase.vni │ │ ├── WebData.vni │ │ └── method_t.vni │ ├── error_code_e.vni │ ├── exec_entry_t.vni │ ├── exec_error_t.vni │ ├── exec_result_t.vni │ ├── farmed_block_info_t.vni │ ├── farmed_block_summary_t.vni │ ├── node_info_t.vni │ ├── node_type_e.vni │ ├── offer_data_t.vni │ ├── operation/ │ │ ├── Deposit.vni │ │ └── Execute.vni │ ├── package.vni │ ├── peer_info_t.vni │ ├── permission_e.vni │ ├── plot_nft_info_t.vni │ ├── pooling_error_e.vni │ ├── pooling_info_t.vni │ ├── pooling_stats_t.vni │ ├── query_filter_t.vni │ ├── solution/ │ │ ├── MultiSig.vni │ │ └── PubKey.vni │ ├── spend_options_t.vni │ ├── swap_entry_t.vni │ ├── swap_info_t.vni │ ├── swap_pool_info_t.vni │ ├── swap_user_info_t.vni │ ├── table_entry_t.vni │ ├── trade_entry_t.vni │ ├── trade_log_t.vni │ ├── tx_entry_t.vni │ ├── tx_index_t.vni │ ├── tx_info_t.vni │ ├── tx_log_entry_t.vni │ ├── tx_note_e.vni │ ├── tx_type_e.vni │ ├── txin_t.vni │ ├── txio_entry_t.vni │ ├── txio_t.vni │ ├── txout_t.vni │ ├── uint_fraction_t.vni │ ├── ulong_fraction_t.vni │ ├── virtual_plot_info_t.vni │ └── vm/ │ └── package.vni ├── kernel/ │ ├── rsha256.cl │ └── sha256.cl ├── lib/ │ ├── .gitignore │ ├── bip-0039/ │ │ ├── english.txt │ │ └── generate_cpp.sh │ └── make_all.sh ├── make_Debug.cmd ├── make_RelWithDebInfo.cmd ├── make_Release.cmd ├── make_Release_pack.cmd ├── make_coverage.sh ├── make_debian.sh ├── make_debug.sh ├── make_devel.sh ├── make_release.sh ├── modules/ │ ├── Farmer.vni │ ├── Harvester.vni │ ├── Node.vni │ ├── ProofServer.vni │ ├── Router.vni │ ├── TimeLord.vni │ ├── Wallet.vni │ └── WebAPI.vni ├── run_farmer.sh ├── run_gdb_node.sh ├── run_harvester.sh ├── run_node.sh ├── run_timelord.sh ├── run_valgrind_node.sh ├── run_wallet.sh ├── run_wallet_gui.sh ├── scripts/ │ ├── bench/ │ │ └── test_iops.sh │ ├── docker/ │ │ └── mmx-testnet/ │ │ ├── README.md │ │ ├── compose.yml │ │ └── nvidia.yml │ ├── gen_coverage.sh │ ├── gen_seed_peers.js │ ├── genesis_setup.sh │ ├── kill_high_mem.sh │ ├── move_storage.sh │ ├── reset_coverage.sh │ ├── show_log_stats.sh │ ├── stats/ │ │ └── max_space_fork_len.sh │ └── win/ │ ├── activate.cmd │ ├── mmx_cmd.cmd │ ├── mmx_help.cmd │ ├── run_farmer.cmd │ ├── run_harvester.cmd │ ├── run_node.cmd │ ├── run_timelord.cmd │ └── run_wallet.cmd ├── src/ │ ├── Block.cpp │ ├── BlockHeader.cpp │ ├── ChainParams.cpp │ ├── Contract.cpp │ ├── DataBase.cpp │ ├── Farmer.cpp │ ├── Harvester.cpp │ ├── Node.cpp │ ├── Node_api.cpp │ ├── Node_control.cpp │ ├── Node_tests.cpp │ ├── Node_update.cpp │ ├── Node_validate.cpp │ ├── Node_verify.cpp │ ├── OCL_VDF.cpp │ ├── Operation.cpp │ ├── Partial.cpp │ ├── ProofOfSpace.cpp │ ├── ProofOfSpaceNFT.cpp │ ├── ProofOfSpaceOG.cpp │ ├── ProofOfTime.cpp │ ├── ProofResponse.cpp │ ├── ProofServer.cpp │ ├── Qt_GUI.cpp │ ├── Router.cpp │ ├── Solution.cpp │ ├── TimeLord.cpp │ ├── Transaction.cpp │ ├── VDF_Point.cpp │ ├── ValidatorVote.cpp │ ├── Wallet.cpp │ ├── WebAPI.cpp │ ├── account_info_t.cpp │ ├── addr_t.cpp │ ├── contract/ │ │ ├── Binary.cpp │ │ ├── Data.cpp │ │ ├── Executable.cpp │ │ ├── MultiSig.cpp │ │ ├── PubKey.cpp │ │ ├── TokenBase.cpp │ │ ├── WebData.cpp │ │ ├── crypto_horse_race.js │ │ ├── escrow.js │ │ ├── fixed_price_liquid_token.js │ │ ├── fixed_price_token.js │ │ ├── method_t.cpp │ │ ├── nft.js │ │ ├── nft_offer.js │ │ ├── offer.js │ │ ├── plot_nft.js │ │ ├── poker.js │ │ ├── relay.js │ │ ├── smart_wallet.js │ │ ├── swap.js │ │ ├── template.js │ │ ├── time_lock.js │ │ ├── token.js │ │ ├── transfer.js │ │ └── virtual_plot.js │ ├── exec_error_t.cpp │ ├── exec_result_t.cpp │ ├── fixed128.cpp │ ├── hash_512_t.cpp │ ├── hash_t.cpp │ ├── hmac_sha512.cpp │ ├── http_request.cpp │ ├── mmx.cpp │ ├── mmx_farmer.cpp │ ├── mmx_harvester.cpp │ ├── mmx_node.cpp │ ├── mmx_timelord.cpp │ ├── mmx_wallet.cpp │ ├── mnemonic.cpp │ ├── offer_data_t.cpp │ ├── operation/ │ │ ├── Deposit.cpp │ │ └── Execute.cpp │ ├── pos/ │ │ ├── Prover.cpp │ │ ├── cuda_recompute.cu │ │ ├── encoding.cpp │ │ ├── mem_hash.cpp │ │ ├── verify.cpp │ │ └── verify_full.cpp │ ├── pubkey_t.cpp │ ├── secp256k1.cpp │ ├── sha256_64_x8.cpp │ ├── sha256_arm.cpp │ ├── sha256_arm_rec.cpp │ ├── sha256_avx2.cpp │ ├── sha256_ni.cpp │ ├── sha256_ni_rec.cpp │ ├── sha512.cpp │ ├── signature_t.cpp │ ├── solution/ │ │ ├── MultiSig.cpp │ │ └── PubKey.cpp │ ├── table.cpp │ ├── uint128.cpp │ ├── upnp_mapper.cpp │ ├── utils.cpp │ ├── vm/ │ │ ├── Compiler.cpp │ │ ├── Engine.cpp │ │ ├── StorageCache.cpp │ │ ├── StorageDB.cpp │ │ ├── StorageProxy.cpp │ │ ├── StorageRAM.cpp │ │ ├── instr_t.cpp │ │ ├── std/ │ │ │ ├── compare.js │ │ │ ├── compile.sh │ │ │ ├── embedded.h │ │ │ ├── equals.js │ │ │ ├── reverse.js │ │ │ └── sort.js │ │ ├── var_t.cpp │ │ └── varptr_t.cpp │ ├── vm_interface.cpp │ └── wordlist_en.cpp ├── start_harvester.sh ├── start_node.sh ├── start_wallet.sh ├── stop_harvester.sh ├── stop_node.sh ├── stop_wallet.sh ├── test/ │ ├── CMakeLists.txt │ ├── README.md │ ├── attacks/ │ │ └── cross_site_access.html │ ├── code/ │ │ ├── contract_01.js │ │ ├── contract_02.js │ │ ├── instr_loop.js │ │ └── test.js │ ├── contracts/ │ │ ├── MMX_USDM_swap.json │ │ ├── MultiSig.json │ │ ├── PlotNFT.json │ │ ├── TEST_token.json │ │ ├── contract_01.json │ │ ├── contract_02.json │ │ ├── fixed_price_token.json │ │ └── test_Data.json │ ├── database_fill.cpp │ ├── http/ │ │ └── test_pipeline.txt │ ├── mmx_tests.cpp │ ├── test_challenge_grind.cpp │ ├── test_compiler.cpp │ ├── test_cuda_recompute.cpp │ ├── test_database.cpp │ ├── test_database_reads.cpp │ ├── test_encoding.cpp │ ├── test_engine.cpp │ ├── test_hash_vdl.cpp │ ├── test_mem_hash.cpp │ ├── test_mnemonic.cpp │ ├── test_pos_compute.cpp │ ├── test_proof_grind.cpp │ ├── test_score_target.cpp │ ├── test_secp256k1.cpp │ ├── test_space_diff.cpp │ ├── test_swap_algo.cpp │ ├── test_transactions.cpp │ ├── test_validation.cpp │ ├── test_write_bytes_vitest_gen.cpp │ └── vm/ │ ├── AFL/ │ │ ├── compile_all.sh │ │ └── inputs/ │ │ ├── js/ │ │ │ ├── compiler_tests.js │ │ │ ├── engine_tests.js │ │ │ └── test_plot_nft.js │ │ └── json/ │ │ └── engine_tests.js.json │ ├── compiler_tests.js │ ├── contract_tests.sh │ ├── engine_tests.cpp │ ├── engine_tests.js │ ├── engine_tests.sh │ ├── fails/ │ │ ├── assert.js │ │ ├── assert_code.js │ │ ├── assert_msg.js │ │ ├── commit_out_of_gas.js │ │ ├── div_by_zero.js │ │ ├── endless_loop.js │ │ ├── erase_recursion_overflow.js │ │ ├── integer_overflow_0.js │ │ ├── integer_overflow_1.js │ │ ├── integer_overflow_2.js │ │ ├── invalid_array_index.js │ │ ├── invalid_bech32_0.js │ │ ├── invalid_bech32_1.js │ │ ├── invalid_binary_and.js │ │ ├── invalid_binary_hex.js │ │ ├── invalid_binary_or.js │ │ ├── invalid_binary_xor.js │ │ ├── invalid_bitwise_and.js │ │ ├── invalid_bitwise_and2.js │ │ ├── invalid_bitwise_not.js │ │ ├── invalid_bitwise_or.js │ │ ├── invalid_bitwise_or2.js │ │ ├── invalid_bitwise_xor.js │ │ ├── invalid_bitwise_xor2.js │ │ ├── invalid_concat_0.js │ │ ├── invalid_concat_1.js │ │ ├── invalid_conv_integer_256_bit.js │ │ ├── invalid_conv_integer_negative.js │ │ ├── invalid_conv_integer_string_10.js │ │ ├── invalid_conv_integer_string_11.js │ │ ├── invalid_conv_integer_string_16.js │ │ ├── invalid_conv_integer_string_2.js │ │ ├── invalid_erase.js │ │ ├── invalid_fail.js │ │ ├── invalid_greater_equal.js │ │ ├── invalid_greater_than.js │ │ ├── invalid_hex_string_0.js │ │ ├── invalid_hex_string_1.js │ │ ├── invalid_less_equal.js │ │ ├── invalid_less_than.js │ │ ├── invalid_mint.js │ │ ├── invalid_neg_0.js │ │ ├── invalid_neg_1.js │ │ ├── invalid_op_add.js │ │ ├── invalid_op_div.js │ │ ├── invalid_op_mod.js │ │ ├── invalid_op_mul.js │ │ ├── invalid_op_set.js │ │ ├── invalid_op_sub.js │ │ ├── invalid_rcall.js │ │ ├── invalid_read.js │ │ ├── invalid_send_0.js │ │ ├── invalid_send_1.js │ │ ├── invalid_size.js │ │ ├── key_size_overflow.js │ │ ├── mod_by_zero.js │ │ ├── modify_balance.js │ │ ├── modify_user.js │ │ ├── null_map_key.js │ │ ├── out_of_bounds_array_set.js │ │ ├── out_of_bounds_memcpy.js │ │ ├── read_fail.js │ │ ├── recursive_loop.js │ │ └── value_size_overflow.js │ ├── storage_tests.cpp │ ├── test_execute.cpp │ ├── test_nft.js │ ├── test_nft_n.js │ ├── test_offer.js │ ├── test_plot_nft.js │ ├── test_poker.js │ └── test_std.js ├── test_all.sh ├── tools/ │ ├── CMakeLists.txt │ ├── calc_test_rewards.cpp │ ├── dump_binary.cpp │ ├── dump_table.cpp │ ├── generate_passwd.cpp │ ├── mmx_compile.cpp │ ├── mmx_posbench.cpp │ ├── mmx_postool.cpp │ └── tx_bench.cpp ├── update.sh ├── vcpkg.json └── www/ ├── .gitignore ├── explorer/ │ └── public/ │ ├── assets/ │ │ └── fonts/ │ │ ├── material-icons/ │ │ │ └── material-icons.css │ │ └── roboto/ │ │ └── roboto.css │ ├── explorer.js │ ├── i18n.utils.js │ ├── index.html │ ├── index.js │ ├── locales/ │ │ ├── common.js │ │ └── en.js │ └── mount.js ├── old/ │ └── explorer/ │ ├── index.js │ ├── package.json │ ├── public/ │ │ └── js/ │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.js │ │ └── theme_switcher.js │ └── views/ │ ├── address.ejs │ ├── block.ejs │ ├── index.ejs │ ├── recent.ejs │ ├── recent_transactions.ejs │ └── transaction.ejs ├── pool-server/ │ ├── README.md │ ├── account.js │ ├── config.js │ ├── package.json │ ├── schema.js │ ├── server.js │ ├── start.sh │ ├── utils.js │ └── verify.js ├── rpc-server/ │ ├── .gitignore │ ├── README.md │ ├── index.js │ ├── package.json │ └── start.sh └── web-gui/ └── public/ ├── assets/ │ └── fonts/ │ ├── material-icons/ │ │ └── material-icons.css │ └── roboto/ │ └── roboto.css ├── components/ │ └── seed.js ├── explorer.js ├── farmer.js ├── i18n.utils.js ├── index.html ├── index.js ├── locales/ │ ├── common.js │ ├── de.json │ ├── en.js │ ├── es.json │ ├── id.json │ ├── nl.json │ ├── pt.json │ ├── ru.json │ ├── template.json │ ├── uk.json │ └── zh.json ├── market.js ├── mount.js ├── node.js ├── robots.txt ├── settings.js ├── swap.js ├── vue-plotly.js └── wallet.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ /build ================================================ FILE: .github/workflows/debian.yml ================================================ name: Debian on: push: branches: - '**' tags: - '**' concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: build: strategy: matrix: ubuntu-version: [22.04, 24.04] runs-on: ubuntu-${{ matrix.ubuntu-version }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true submodules: "recursive" - name: Set up build environment run: | sudo apt-get update sudo apt-get install -y git cmake build-essential automake libtool pkg-config curl libminiupnpc-dev libjemalloc-dev libzstd-dev zlib1g-dev ocl-icd-opencl-dev qtwebengine5-dev fakeroot devscripts debhelper dpkg-dev - name: Install CUDA Toolkit uses: Jimver/cuda-toolkit@v0.2.21 with: cuda: ${{ matrix.ubuntu-version == '24.04' && '12.5.0' || '11.8.0' }} method: network sub-packages: '["nvcc"]' - name: Build Debian package run: | ARCH=amd64 DIST=ubuntu-${{ matrix.ubuntu-version }} ./make_debian.sh - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ubuntu-${{ matrix.ubuntu-version }} path: ./mmx-node-*.deb - name: Upload a Build Artifact to release if: startsWith(github.ref, 'refs/tags/v') uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./mmx-node-*.deb file_glob: true tag: ${{ github.ref }} overwrite: true ================================================ FILE: .github/workflows/docker.yml ================================================ name: Docker on: push: branches: - '**' tags: - '**' # Automatically cancel previous runs for the same ref (i.e. branch) and event type. The latter component prevents # manually dispatched events from being cancelled by pushes to the `master` branch. concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true jobs: build-and-push-image: name: Build and push image runs-on: ubuntu-latest env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} strategy: fail-fast: false matrix: include: - final-build-stage: 'base' latest-tag-behaviour: auto version-suffix: '' suffix-onlatest: false - final-build-stage: amd latest-tag-behaviour: auto version-suffix: '-amd' suffix-onlatest: true - final-build-stage: nvidia latest-tag-behaviour: auto version-suffix: '-nvidia' suffix-onlatest: true - final-build-stage: intel latest-tag-behaviour: auto version-suffix: '-intel' suffix-onlatest: true steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true submodules: "recursive" - name: Extract metadata for Docker id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | latest=${{ matrix.latest-tag-behaviour }} suffix=${{ matrix.version-suffix }},onlatest=${{ matrix.suffix-onlatest }} tags: | type=edge type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to the container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 with: context: . target: ${{ matrix.final-build-stage }} push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max ================================================ FILE: .github/workflows/windows.yml ================================================ name: Windows on: push: branches: - '**' tags: - '**' # schedule: # - cron: "0 4 * * *" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true env: CMAKE_BUILD_PRESET: "windows-default" MMX_VERSION: ${{ github.ref_name }} MMX_WIN_PACK: "TRUE" MMX_TELEGRAM_TOKEN: ${{ secrets.MMX_TELEGRAM_TOKEN }} MMX_TELEGRAM_TO_1: ${{ secrets.MMX_TELEGRAM_TO_1 }} MMX_TELEGRAM_TO_2: ${{ secrets.MMX_TELEGRAM_TO_2 }} DISCORD_WEBHOOK: ${{ secrets.MMX_DISCORD_WEBHOOK }} jobs: msvc: runs-on: windows-2022 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 fetch-tags: true submodules: "recursive" - uses: Jimver/cuda-toolkit@v0.2.21 id: cuda-toolkit with: cuda: '12.5.0' method: 'network' sub-packages: '["nvcc", "cudart"]' - run: | echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}" echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}" nvcc -V - uses: lukka/get-cmake@latest with: cmakeVersion: "~3" - name: Restore artifacts, or setup vcpkg (do not install any package) uses: lukka/run-vcpkg@v11 - name: Run CMake consuming CMakePreset.json and vcpkg.json by mean of vcpkg. uses: lukka/run-cmake@v10 with: configurePreset: ${{ env.CMAKE_BUILD_PRESET }} buildPreset: ${{ env.CMAKE_BUILD_PRESET }} - name: Upload a Build Artifact uses: actions/upload-artifact@v4 with: name: "build" include-hidden-files: true path: ./build/${{ env.CMAKE_BUILD_PRESET }}/!bin/Release/ - name: Run CPack run: cpack -C Release --config build/${{ env.CMAKE_BUILD_PRESET }}/CPackConfig.cmake -B build/${{ env.CMAKE_BUILD_PRESET }}/!package - name: Zip files run: Get-ChildItem "./build/${{ env.CMAKE_BUILD_PRESET }}/!package" -Filter *.exe | Foreach-Object { 7z a ( (Convert-Path $_.PSParentPath) + "\" + $_.BaseName + ".zip") $_.FullName } - name: Upload a Build Artifact uses: actions/upload-artifact@v4 with: name: "package" path: ./build/${{ env.CMAKE_BUILD_PRESET }}/!package/*.exe - name: Upload a Build Artifact to release if: startsWith(github.ref, 'refs/tags/v') uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: ./build/${{ env.CMAKE_BUILD_PRESET }}/!package/*.zip file_glob: true tag: ${{ github.ref }} overwrite: true notify: if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest needs: [msvc] steps: - name: Get the version id: get_version run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT - name: Telegram notification if: ${{ env.MMX_TELEGRAM_TO_1 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }} uses: appleboy/telegram-action@master with: to: ${{ env.MMX_TELEGRAM_TO_1 }} token: ${{ env.MMX_TELEGRAM_TOKEN }} format: html message: | MMX Node release ${{ steps.get_version.outputs.VERSION }} https://github.com/${{ github.repository }}/releases/${{ steps.get_version.outputs.VERSION }} Telegram channel Telegram chat Telegram chat[RU] Discord - name: Telegram notification if: ${{ env.MMX_TELEGRAM_TO_2 != '' }} && ${{ env.MMX_TELEGRAM_TOKEN != '' }} uses: appleboy/telegram-action@master with: to: ${{ env.MMX_TELEGRAM_TO_2 }} token: ${{ env.MMX_TELEGRAM_TOKEN }} format: html message: | MMX Node release ${{ steps.get_version.outputs.VERSION }} https://github.com/${{ github.repository }}/releases/${{ steps.get_version.outputs.VERSION }} Telegram channel Telegram chat Telegram chat[RU] Discord - name: Discord notification if: ${{ env.DISCORD_WEBHOOK != '' }} uses: Ilshidur/action-discord@master with: args: | MMX Node release ${{ steps.get_version.outputs.VERSION }} https://github.com/${{ github.repository }}/releases/${{ steps.get_version.outputs.VERSION }} ================================================ FILE: .gitignore ================================================ # Prerequisites *.d # Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod *.smod # Compiled Static libraries *.lai *.la *.a *.lib # Executables *.exe *.out *.app *.bak CMakeUserPresets.json /build /.settings /.project /.cproject /.pydevproject /config/local /PASSWD /NETWORK /DB_VERSION /testnet* /mainnet* /tmp /coverage.info /.idea /_deps /*.dat /*.deb /config/default/build.json /test/vm/AFL/outputs/* /docs/dist /docs/.astro /docs/node_modules /.vscode ================================================ FILE: .gitmodules ================================================ [submodule "secp256k1"] path = lib/secp256k1 url = https://github.com/bitcoin-core/secp256k1.git [submodule "uint256_t"] path = uint256_t url = https://github.com/madMAx43v3r/uint256_t.git [submodule "libbech32"] path = lib/libbech32 url = https://github.com/dcdpr/libbech32.git [submodule "vnx-addons"] path = vnx-addons url = https://github.com/madMAx43v3r/vnx-addons.git [submodule "basic-opencl"] path = basic-opencl url = https://github.com/automyinc/basic-opencl.git [submodule "vnx-base"] path = vnx-base url = https://github.com/madMAx43v3r/vnx-base.git [submodule "lib/lexy"] path = lib/lexy url = https://github.com/foonathan/lexy.git ================================================ FILE: CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.13) project(mmx-node C CXX ASM) include(FetchContent) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_CXX_STANDARD 17) if(MSVC) include(GenerateExportHeader) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_compile_definitions(TARGET_FILENAME=$(TargetName)$(TargetExt)) add_compile_options(/openmp /EHsc /MP) set(MSVC_DEBUG_OPTIONS /Od /FS) set(MSVC_RELEASE_OPTIONS /W1 /O2) add_compile_options( "$<$:${MSVC_DEBUG_OPTIONS}>" "$<$:${MSVC_RELEASE_OPTIONS}>" "$<$:${MSVC_RELEASE_OPTIONS}>" "$<$:${MSVC_RELEASE_OPTIONS}>" ) set(MSVC_DEBUG_LINK_OPTIONS /NODEFAULTLIB:LIBCMT) set(MSVC_RELEASE_LINK_OPTIONS /NODEFAULTLIB:LIBCMT) add_link_options( "$<$:${MSVC_DEBUG_LINK_OPTIONS}>" "$<$:${MSVC_RELEASE_LINK_OPTIONS}>" "$<$:${MSVC_RELEASE_LINK_OPTIONS}>" "$<$:${MSVC_RELEASE_LINK_OPTIONS}>" ) find_library(secp256k1_LIBRARY secp256k1 HINTS ${secp256k1_LIBRARIES}) else() message(STATUS "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") find_package(OpenMP REQUIRED) find_library(JEMALLOC_LIB NAMES jemalloc) add_compile_options(-Wall -Wno-unused-function -Wno-parentheses -Wno-unused-local-typedefs -Wno-unknown-pragmas) if(WITH_COVERAGE) message(STATUS "Enabling -O0 -coverage") add_compile_options(-O0 --coverage) add_link_options(-lgcov --coverage) endif() set_source_files_properties(src/vm/Compiler.cpp PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable) find_library(secp256k1_LIBRARY NAMES secp256k1 PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib/secp256k1/.libs" NO_DEFAULT_PATH) if(ENABLE_MEM_SANITIZE) message(STATUS "Compiling with -fsanitize=address") add_compile_options(-fsanitize=address) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address") set(DISABLE_OPENCL 1) elseif(ENABLE_THREAD_SANITIZE) message(STATUS "Compiling with -fsanitize=thread") add_compile_options(-fsanitize=thread) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=thread") set(DISABLE_OPENCL 1) endif() endif() include(cmake/build_version_json.cmake) add_library(secp256k1 INTERFACE IMPORTED) set_target_properties(secp256k1 PROPERTIES INTERFACE_LINK_LIBRARIES ${secp256k1_LIBRARY}) get_filename_component(secp256k1_IMPORT_PREFIX "${secp256k1_LIBRARY}" PATH) get_filename_component(secp256k1_IMPORT_PREFIX "${secp256k1_IMPORT_PREFIX}" PATH) set_target_properties(secp256k1 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${secp256k1_IMPORT_PREFIX}/include" ) file(GLOB secp256k1_LIBRARY_FILES ${secp256k1_LIBRARY}*) set(LIBBECH32_BUILD_TESTS OFF CACHE BOOL "LIBBECH32_BUILD_TESTS") set(LIBBECH32_BUILD_EXAMPLES OFF CACHE BOOL "LIBBECH32_BUILD_EXAMPLES") set(DIRENT_BUILD_TESTS OFF CACHE STRING "DIRENT_BUILD_TESTS") set(VNX_BUILD_TOOLS ON CACHE STRING "VNX_BUILD_TOOLS") set(MMX_BUILD_TOOLS ON CACHE STRING "MMX_BUILD_TOOLS") set(MMX_BUILD_TESTS ON CACHE STRING "MMX_BUILD_TESTS") set(NODE_INSTALL_PATH "." CACHE STRING "Where to install scripts") add_subdirectory(vnx-base) add_subdirectory(vnx-addons) add_subdirectory(lib/libbech32) find_package(Threads REQUIRED) find_library(MINIUPNPC_LIB NAMES miniupnpc) if(NOT DISABLE_OPENCL) find_package(OpenCL) endif() if(NOT DISABLE_CUDA) include(cmake/use_cuda.cmake) endif() if(NOT DISABLE_QT) find_package(Qt5 QUIET COMPONENTS Widgets WebEngine WebEngineWidgets) endif() file(GLOB GENERATED_SOURCE_FILES generated/src/*.cpp generated/vm/src/*.cpp generated/contract/src/*.cpp generated/operation/src/*.cpp generated/solution/src/*.cpp ) add_library(mmx_iface SHARED ${GENERATED_SOURCE_FILES} src/Block.cpp src/BlockHeader.cpp src/Transaction.cpp src/Operation.cpp src/Contract.cpp src/Solution.cpp src/ProofOfTime.cpp src/ProofOfSpace.cpp src/ProofOfSpaceOG.cpp src/ProofOfSpaceNFT.cpp src/ProofResponse.cpp src/secp256k1.cpp src/uint128.cpp src/fixed128.cpp src/hash_t.cpp src/hash_512_t.cpp src/addr_t.cpp src/pubkey_t.cpp src/signature_t.cpp src/exec_result_t.cpp src/exec_error_t.cpp src/vm/var_t.cpp src/vm/varptr_t.cpp src/contract/Data.cpp src/contract/WebData.cpp src/contract/PubKey.cpp src/contract/MultiSig.cpp src/contract/TokenBase.cpp src/contract/Binary.cpp src/contract/Executable.cpp src/contract/method_t.cpp src/solution/PubKey.cpp src/solution/MultiSig.cpp src/operation/Deposit.cpp src/operation/Execute.cpp src/sha256_avx2.cpp src/sha256_64_x8.cpp src/sha256_ni.cpp src/sha256_ni_rec.cpp src/sha256_arm.cpp src/sha256_arm_rec.cpp src/sha512.cpp src/hmac_sha512.cpp src/wordlist_en.cpp src/mnemonic.cpp src/offer_data_t.cpp src/account_info_t.cpp src/VDF_Point.cpp src/Partial.cpp src/ChainParams.cpp src/utils.cpp src/ValidatorVote.cpp ) add_library(mmx_vm STATIC src/vm/Engine.cpp src/vm/Compiler.cpp src/vm/StorageProxy.cpp src/vm/StorageRAM.cpp src/vm/StorageCache.cpp src/vm/StorageDB.cpp src/vm/instr_t.cpp src/vm_interface.cpp ) add_library(mmx_db STATIC src/DataBase.cpp src/table.cpp ) add_library(mmx_pos STATIC src/pos/mem_hash.cpp src/pos/verify.cpp src/pos/encoding.cpp src/pos/Prover.cpp ) add_library(mmx_pos_verify STATIC src/pos/verify_full.cpp ) add_library(mmx_modules STATIC src/TimeLord.cpp src/Node.cpp src/Node_api.cpp src/Node_update.cpp src/Node_verify.cpp src/Node_validate.cpp src/Node_control.cpp src/Node_tests.cpp src/Wallet.cpp src/Farmer.cpp src/Harvester.cpp src/Router.cpp src/WebAPI.cpp src/OCL_VDF.cpp src/upnp_mapper.cpp src/http_request.cpp src/ProofServer.cpp ) add_library(mmx_qtgui STATIC src/Qt_GUI.cpp ) add_library(uint256_t STATIC uint256_t/uint128_t/uint128_t.cpp uint256_t/uint256_t.cpp ) target_include_directories(mmx_vm PUBLIC lib/lexy/include ) target_include_directories(mmx_pos PUBLIC include ) target_include_directories(mmx_iface PUBLIC include generated/include generated/vm/include generated/contract/include generated/operation/include generated/solution/include ) target_include_directories(mmx_qtgui PUBLIC include ) target_include_directories(uint256_t PUBLIC uint256_t uint256_t/uint128_t ) target_compile_definitions(uint256_t PUBLIC _UINT256_T_STATIC _UINT128_T_STATIC) target_link_libraries(mmx_iface vnx_base vnx_addons uint256_t bech32 secp256k1) target_link_libraries(mmx_db mmx_iface) target_link_libraries(mmx_pos mmx_pos_verify mmx_iface) target_link_libraries(mmx_pos_verify mmx_iface) target_link_libraries(mmx_vm mmx_db mmx_iface) target_link_libraries(mmx_modules mmx_pos mmx_vm mmx_db mmx_iface) target_link_libraries(mmx_qtgui vnx_base) if(MSVC) set_target_properties(vnx_base_static PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) GENERATE_EXPORT_HEADER(mmx_iface) set_target_properties(mmx_iface PROPERTIES ENABLE_EXPORTS 1) set_target_properties(mmx_iface PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1) # Workaround for: # LNK1189: library limit of 65535 objects exceeded set(MSVC_MMX_IFACE_DEBUG_OPTIONS /Ob1) target_compile_options(mmx_iface PRIVATE "$<$:${MSVC_MMX_IFACE_DEBUG_OPTIONS}>" ) else() target_link_libraries(mmx_db OpenMP::OpenMP_CXX) target_link_libraries(mmx_modules OpenMP::OpenMP_CXX) if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") message(STATUS "Enabling -mavx2 -msha") set_source_files_properties(src/sha256_ni.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha") set_source_files_properties(src/sha256_ni_rec.cpp PROPERTIES COMPILE_FLAGS "-msse4.2 -msha") set_source_files_properties(src/sha256_avx2.cpp PROPERTIES COMPILE_FLAGS "-mavx2") endif() if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64") message(STATUS "Enabling -march=armv8-a+crypto") set_source_files_properties(src/sha256_arm.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") set_source_files_properties(src/sha256_arm_rec.cpp PROPERTIES COMPILE_FLAGS "-march=armv8-a+crypto") endif() endif() if(OpenCL_FOUND) message(STATUS "Found OpenCL") add_subdirectory(basic-opencl) target_compile_definitions(automy_basic_opencl PUBLIC CL_TARGET_OPENCL_VERSION=120 ) target_link_libraries(mmx_modules automy_basic_opencl) target_compile_definitions(mmx_modules PUBLIC WITH_OPENCL) endif() if(CUDA_FOUND) message(STATUS "Found CUDA") add_compile_definitions(WITH_CUDA) cuda_add_library(mmx_pos_cuda STATIC src/pos/cuda_recompute.cu) target_include_directories(mmx_pos_cuda PUBLIC include) target_link_libraries(mmx_pos mmx_pos_cuda) target_link_libraries(mmx_pos_cuda mmx_pos_verify mmx_iface) if(MSVC) # Copy CUDA DLLs to the output folder add_custom_command(TARGET mmx_modules POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CUDA_TOOLKIT_ROOT_DIR}/bin/cudart64_12.dll" $ ) endif() endif() if(JEMALLOC_LIB) message(STATUS "Found jemalloc") target_link_libraries(mmx_modules ${JEMALLOC_LIB}) target_compile_definitions(mmx_modules PUBLIC WITH_JEMALLOC) endif() if(MINIUPNPC_LIB) message(STATUS "Found miniupnpc") target_link_libraries(mmx_modules ${MINIUPNPC_LIB}) target_compile_definitions(mmx_modules PRIVATE WITH_MINIUPNPC) endif() if(Qt5_FOUND) message(STATUS "Found Qt5") add_compile_definitions(WITH_QT) target_link_libraries(mmx_qtgui Qt5::Widgets Qt5::WebEngine Qt5::WebEngineWidgets) endif() add_executable(mmx src/mmx.cpp) add_executable(mmx_node src/mmx_node.cpp) add_executable(mmx_farmer src/mmx_farmer.cpp) add_executable(mmx_wallet src/mmx_wallet.cpp) add_executable(mmx_timelord src/mmx_timelord.cpp) add_executable(mmx_harvester src/mmx_harvester.cpp) target_link_libraries(mmx mmx_iface mmx_vm) target_link_libraries(mmx_node mmx_modules mmx_qtgui) target_link_libraries(mmx_farmer mmx_modules) target_link_libraries(mmx_wallet mmx_modules mmx_qtgui) target_link_libraries(mmx_timelord mmx_modules) target_link_libraries(mmx_harvester mmx_modules) install(TARGETS mmx_iface DESTINATION lib) install(TARGETS mmx DESTINATION bin) install(TARGETS mmx_node DESTINATION bin) install(TARGETS mmx_farmer DESTINATION bin) install(TARGETS mmx_wallet DESTINATION bin) install(TARGETS mmx_timelord DESTINATION bin) install(TARGETS mmx_harvester DESTINATION bin) install(DIRECTORY config data kernel scripts DESTINATION ${NODE_INSTALL_PATH} PATTERN "config/local" EXCLUDE ) install(DIRECTORY www/web-gui DESTINATION ${NODE_INSTALL_PATH}/www PATTERN "node_modules" EXCLUDE ) install(FILES activate.sh run_node.sh run_farmer.sh run_wallet.sh run_wallet_gui.sh run_timelord.sh run_harvester.sh start_node.sh start_harvester.sh start_wallet.sh stop_node.sh stop_harvester.sh stop_wallet.sh PERMISSIONS OWNER_EXECUTE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${NODE_INSTALL_PATH} ) install(FILES cmake/debian/mmx_node.desktop cmake/debian/mmx_wallet.desktop PERMISSIONS OWNER_EXECUTE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION share/applications ) if(MMX_BUILD_TOOLS) add_subdirectory(tools) endif() if(MMX_BUILD_TESTS) add_subdirectory(test) endif() if(MSVC) include(cmake/win_pack.cmake) endif() ================================================ FILE: CMakePresets.json ================================================ { "version": 4, "cmakeMinimumRequired": { "major": 3, "minor": 11, "patch": 0 }, "configurePresets": [ { "name": "windows-base", "hidden": true, "description": "Sets Visual Studio generator, build directory", "generator": "Visual Studio 17 2022", "binaryDir": "${sourceDir}/build/${presetName}", "cacheVariables": { "CMAKE_TOOLCHAIN_FILE": { "value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", "type": "FILEPATH" }, "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/custom-triplets", "VCPKG_TARGET_TRIPLET": "x64-windows-mmx", "CMAKE_LIBRARY_OUTPUT_DIRECTORY": "${sourceDir}/build/${presetName}/!bin", "CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/${presetName}/!bin", "MMX_WIN_PACK": "$env{MMX_WIN_PACK}" } }, { "name": "windows-default", "displayName": "Windows x64", "inherits": "windows-base", "cacheVariables": { "MMX_VERSION": "$env{MMX_VERSION}" }, "warnings": { "dev": false } } ], "buildPresets": [ { "name": "windows-default", "configurePreset": "windows-default", "configuration": "Release" } ] } ================================================ FILE: Dockerfile ================================================ FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 AS builder ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y upgrade \ && apt-get install -y \ apt-utils \ git \ cmake \ automake \ libtool \ build-essential \ libminiupnpc-dev \ libjemalloc-dev \ zlib1g-dev \ libzstd-dev \ ocl-icd-opencl-dev \ ccache \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY . . RUN git submodule update --init --recursive RUN --mount=type=cache,target=/root/.cache/ccache sh make_release.sh "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" FROM ubuntu:22.04 AS base ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y upgrade \ && apt-get install -y \ apt-utils \ curl \ libminiupnpc17 \ libjemalloc2 \ zlib1g \ libzstd1 \ libgomp1 \ ocl-icd-libopencl1 \ tzdata \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --from=builder /app/build/dist ./ COPY ["docker-entrypoint.sh", "./"] ENV MMX_HOME="/data/" VOLUME /data # node p2p port EXPOSE 11337/tcp # http api port EXPOSE 11380/tcp ENTRYPOINT ["./docker-entrypoint.sh"] CMD ["./run_node.sh"] FROM base AS amd ARG AMD_DRIVER=amdgpu-install_5.4.50400-1_all.deb ARG AMD_DRIVER_URL=https://repo.radeon.com/amdgpu-install/5.4/ubuntu/jammy RUN mkdir -p /tmp/opencl-driver-amd \ && cd /tmp/opencl-driver-amd \ && curl --referer $AMD_DRIVER_URL -O $AMD_DRIVER_URL/$AMD_DRIVER \ && dpkg -i $AMD_DRIVER \ && rm -rf /tmp/opencl-driver-amd RUN apt-get update && apt-get -y upgrade \ && apt-get install -y \ rocm-opencl \ && rm -rf /var/lib/apt/lists/* FROM base AS nvidia RUN mkdir -p /etc/OpenCL/vendors \ && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES compute,utility FROM base AS intel RUN apt-get update && apt-get install --no-install-recommends -y intel-opencl-icd \ && rm -rf /var/lib/apt/lists/* ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ # mmx-node _“ MMX – fast, low cost, feature rich, decentralized – with tokenomics of an actual currency ”_ A blockchain written from scratch, doing most things differently. Website: https://mmx.network \ Whitepaper: [MMX_Whitepaper_290125.pdf](https://docs.mmx.network/MMX_Whitepaper_290125.pdf) Design - Variable token supply governed by consensus (1 block = 1 vote) - High throughput L1 with consistent block interval (500 TPS, 10 sec) - Novel Smart Contract VM for ease of development and high performance - Energy efficient Proof of Space and Time - Block reward is adjusted to stabilize price, a key property of any currency - Minimum transaction fee to allow large block size without spam - Limited external library usage to keep codebase clean and secure - No pre-mine, no ICO, no investors - Account based model Elements - High performance C++ code (can handle over 1000 TPS easily) - Transactions are executed in parallel when possible - Custom high-level VM for Smart Contracts - Native support for variants, arrays, maps, and objects - Unified memory with automatic persistence and state updates - A restricted subset of JavaScript is compiled into bytecode - Average of two machine instructions per line of code - Native token support (no "approvals" needed, NFT = 1 mojo) - Smart contract offer based trading (fixed price, OTC) - Liquidity pool swap based trading (AMM, multi-fee tiers, similar to Uniswap v3) - ECDSA signatures for seamless integration (same as Bitcoin) - Custom blockchain database engine (much faster than RocksDB or LevelDB overall) - Adaptive SHA256 VDF to govern block interval - Feature rich Node with built-in Block Explorer, Wallet, Market, Swap, RPC, etc Roadmap | Release | Date | Description | | :--- | :--- | :--- | | testnet7 | Sep 2022 | Finished. [1] | | testnet8 | Oct 2022 | Finished. Incentivized testnet, height 25k-425k. [2] | | testnet9 | Dec 2022 | Finished. Incentivized testnet, height 25k-1220k. [2] | | testnet10 | Apr 2023 | Finished. Incentivized testnet, height 40k-3200k. [2] | | testnet11 | May 2024 | Finished. New plot format, compression resistant. | | testnet12 | June 2024 | Finished. Incentivized testnet, height 25k-1720k. [2] | | mainnet-rc | Jan 2025 | Finished. Incentivized testnet, height 10k-110k. [2] | | mainnet | 17th Jan 2025 | Live | _[1] Coins farmed on testnets are not worth anything, now or later._\ _[2] A fixed reward of 0.5 MMX per block win on incentivized testnets will be given on mainnet genesis._ See `#mmx-news` and `#mmx-general` on Discord: https://discord.gg/BswFhNkMzY ## Installation / Setup / Usage See documentation: https://docs.mmx.network/ - [Installation](https://docs.mmx.network/guides/installation/) - [Getting Started](https://docs.mmx.network/guides/getting-started/) - [CLI Commands](https://docs.mmx.network/software/cli-commands/) - [Plotting Guide](https://docs.mmx.network/guides/mmx-plotter/) ## WebGUI To access WebGUI, go to: http://localhost:11380/gui/ It's only available on localhost by default. \ The login password is auto-generated at first launch, located in `mmx-node/PASSWD` file (`$MMX_HOME/PASSWD`). ## Release Notes ### Mainnet - Transactions are no longer limited to odd or even blocks - Validators are now previous block winners, starting at 24 blocks prior - Increased validator count to 33 - Committing blocks is paused when proofs found is less than 80% expected - VDF checks during sync are obsolete - Added maximum proof limit of 20 per block - Faster difficulty adjustment - Changed VDF reward payout interval to 20 blocks (with each being 0.2 MMX) - Changed VDF block infusion delay to 1 - Added remote call recursion limit of 3 - Added maximum contract dependencies of 5 ### Mainnet-RC - New VDF scheme: - Single VDF stream with infused Timelord reward - No longer possible to steal or disable Timelord reward - Proof challenges are now deterministic, apart from random infusions every 256 blocks on average - If a proof's hash passes a filter, it will change future challenges and update difficutly - Timelord rewards are now paid out every 50 blocks in bulk to fastest TL - There are no more dummy blocks (blocks without proof) - VDF segment count is now dynamic, depending on TL speed: - This means VDF verify time wont increase unless the GPU is at it's compute limit - Previously VDF verify time would increase even if the GPU is not maxed out, due to fixed parallel work - CPU verify is unchanged - All proofs found are now included in blocks - Yields accurate netspace estimation - Supports extra security (see below) - Recent blocks are further secured via a new voting scheme: - Up to 31 farmers who found a lesser proof (didn't make a block) recently can act as a validator - These validators vote on the first block received per height - Only blocks made with the best known proof are voted for - This prevents reverting recent blocks via double signing in most cases - Previously it was always possible to replace the current peak via double signing, this is now impossible - Previously if a farmer got lucky to find multiple blocks in a row: - He could also replace them at will until another farmer found the next block - This is now also impossible, unless the farmer has close to 50% or more netspace - 50% TX fee burn (to avoid farmer spam attack + allow supply contraction) - Project fee is taken from burned amount - Virtual Plots have been removed due to an attack vector - Together with the un-bounded block reward voting it was possible to generate a heavier chain with minimal real netspace - Improved block reward voting: Majority vote out of 8640 blocks wins, 1% change up/down per day, >50% participation required. - Offer contract now supports price update (at most every 1080 blocks) - Pooling support + Reference Pool implementation - Improved difficulty adjustment algorithm (targets 4 proofs per block) - VM improvements to reduce transaction costs - Send amount can now be up to 128-bit (was limited to 64-bit before) - Mint amount can now be up to 80-bit (was limited to 64-bit before) - Added block timestamps - Smart Contract unit test framework ### Testnet12 - Fixed Virtual Plots, they now win blocks at the expected rate. On TN11 it was ~20 times less. - Fixed block reward formula, average tx fee is subtracted from minimum reward again. ### Testnet11 - New plot format: - k29 to k32 max - 9 tables - very low compression only - CPU farming only - SSD and HDD plot types - Old format no longer valid - Transaction output memo support - Block reward voting support - Swap algorithm improved - Swap fee levels changed to: 0.05%, 0.25%, 1% and 5% - Using zstd compression for network traffic - NFT plot support (testing only) ================================================ FILE: activate.sh ================================================ #!/bin/bash set -e export PATH=$PATH:$PWD/bin:$PWD/build:$PWD/build/tools:$PWD/build/vnx-base/tools:/usr/share/mmx-node/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib:$PWD/lib64:$PWD/build:$PWD/build/vnx-base:$PWD/build/vnx-addons:$PWD/build/basic-opencl if [[ -z "${MMX_HOME}" ]]; then export MMX_HOME="$PWD/" else mkdir -p ${MMX_HOME} echo MMX_HOME=${MMX_HOME} fi mkdir -p ${MMX_HOME}config/local if cp --update=none /dev/null /dev/null 2> /dev/null; then cp -rv --update=none config/local_init/. ${MMX_HOME}config/local else cp -rnv config/local_init/. ${MMX_HOME}config/local fi PASSWD_PATH="${MMX_HOME}config/local/passwd" if [ ! -f "${PASSWD_PATH}" ] || [[ $(cat "${PASSWD_PATH}" | wc -c) -lt 64 ]]; then generate_passwd > "${PASSWD_PATH}" vnxpasswd -c config/default/ "${MMX_HOME}config/local/" -u mmx-admin -p $(cat "${PASSWD_PATH}") echo "PASSWD=$(cat "${PASSWD_PATH}")" fi chmod 600 "${PASSWD_PATH}" cp "${PASSWD_PATH}" "${MMX_HOME}PASSWD" if [ -f "${MMX_HOME}NETWORK" ]; then NETWORK=$(cat "${MMX_HOME}NETWORK") else NETWORK=mainnet echo ${NETWORK} > "${MMX_HOME}NETWORK" fi if [ -f "${MMX_HOME}config/local/MMX_DATA" ]; then MMX_DATA=$(cat "${MMX_HOME}config/local/MMX_DATA") fi if [[ -z "${MMX_DATA}" ]]; then MMX_DATA=${MMX_HOME} fi echo NETWORK=${NETWORK} if [ "${MMX_DATA}" != "${MMX_HOME}" ]; then echo MMX_DATA=${MMX_DATA} fi export MMX_NETWORK=${MMX_DATA}${NETWORK}/ set +e ================================================ FILE: clean_all.sh ================================================ #!/bin/bash rm -rf build rm -rf lib/.cache ================================================ FILE: cmake/build_version_json.cmake ================================================ find_package(Git) execute_process( COMMAND ${GIT_EXECUTABLE} describe --tags --match "v[0-9]*.[0-9]*.[0-9]*" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_BUILD_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE ) execute_process( COMMAND ${GIT_EXECUTABLE} log -1 --format=%H WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_BUILD_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE ) string(LENGTH "${GIT_BUILD_VERSION}" GIT_BUILD_VERSION_LEN) if(NOT GIT_BUILD_VERSION MATCHES "^v[0-9]+\\.[0-9]+\\.[0-9]+$|^v[0-9]+\\.[0-9]+\\.[0-9]+\\-[0-9]+\\-g[0-9a-f]+$" OR GIT_BUILD_VERSION_LEN GREATER 80) string(TIMESTAMP GIT_BUILD_TIMESTAMP "%Y%m%d") set(GIT_BUILD_VERSION "v0.0.0.${GIT_BUILD_TIMESTAMP}") endif() string(LENGTH "${GIT_BUILD_COMMIT}" GIT_BUILD_COMMIT_LEN) if(NOT GIT_BUILD_COMMIT MATCHES "^[0-9a-f]+$" OR NOT GIT_BUILD_COMMIT_LEN EQUAL 40) set(GIT_BUILD_COMMIT "0000000000000000000000000000000000000000") endif() message(STATUS "GIT_BUILD_VERSION=${GIT_BUILD_VERSION}") message(STATUS "GIT_BUILD_COMMIT=${GIT_BUILD_COMMIT}") file(WRITE config/default/build.json "{\n\t\"version\": \"${GIT_BUILD_VERSION}\",\n\t\"commit\": \"${GIT_BUILD_COMMIT}\"\n}\n") ================================================ FILE: cmake/custom-triplets/x64-windows-mmx.cmake ================================================ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE dynamic) set(VCPKG_BUILD_TYPE release) if(PORT MATCHES "secp256k1") set(VCPKG_LIBRARY_LINKAGE static) endif() ================================================ FILE: cmake/debian/generic/control ================================================ Package: mmx-node Section: base Priority: optional Depends: curl, screen, zenity, libminiupnpc-dev, libjemalloc-dev, libzstd-dev, zlib1g-dev, ocl-icd-opencl-dev, qtwebengine5-dev Maintainer: Max Wittal Description: MMX Node Homepage: https://mmx.network ================================================ FILE: cmake/debian/mmx_node.desktop ================================================ [Desktop Entry] Type=Application Name=MMX Node Exec=sh -c "MMX_HOME=~/.mmx/ /usr/share/mmx-node/run_node.sh --gui" Path=/usr/share/mmx-node Icon=/usr/share/mmx-node/www/web-gui/public/assets/img/logo_circle_color_cy256.png Terminal=false Categories=Utility;Application; ================================================ FILE: cmake/debian/mmx_wallet.desktop ================================================ [Desktop Entry] Type=Application Name=MMX Wallet Exec=sh -c "MMX_HOME=~/.mmx/ /usr/share/mmx-node/run_wallet_gui.sh" Path=/usr/share/mmx-node Icon=/usr/share/mmx-node/www/web-gui/public/assets/img/logo_circle_color_cy256.png Terminal=false Categories=Utility;Application; ================================================ FILE: cmake/debian/ubuntu-20.04/control ================================================ Package: mmx-node Section: base Priority: optional Depends: curl, screen, zenity, libminiupnpc17, libjemalloc2, libzstd1, zlib1g, ocl-icd-libopencl1, libgomp1, qtwebengine5-dev Maintainer: Max Wittal Description: MMX Node Homepage: https://mmx.network ================================================ FILE: cmake/debian/ubuntu-22.04/control ================================================ Package: mmx-node Section: base Priority: optional Depends: curl, screen, zenity, libminiupnpc17, libjemalloc2, libzstd1, zlib1g, ocl-icd-libopencl1, libgomp1, qtwebengine5-dev Maintainer: Max Wittal Description: MMX Node Homepage: https://mmx.network ================================================ FILE: cmake/debian/ubuntu-24.04/control ================================================ Package: mmx-node Section: base Priority: optional Depends: curl, screen, zenity, libminiupnpc17, libjemalloc2, libzstd1, zlib1g, ocl-icd-libopencl1, libgomp1, qtwebengine5-dev Maintainer: Max Wittal Description: MMX Node Homepage: https://mmx.network ================================================ FILE: cmake/nsis/NSIS.template.in ================================================ ; CPack install script designed for a nmake build ;-------------------------------- ; You must define these values !define VERSION "@CPACK_PACKAGE_VERSION@" !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@" !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@" ;-------------------------------- ;Variables Var MUI_TEMP Var STARTMENU_FOLDER Var SV_ALLUSERS Var START_MENU Var DO_NOT_ADD_TO_PATH Var ADD_TO_PATH_ALL_USERS Var ADD_TO_PATH_CURRENT_USER Var INSTALL_DESKTOP Var IS_DEFAULT_INSTALLDIR Var mmxDataDir Var mmxDataDir_default ;-------------------------------- ;Include Modern UI !include "MUI.nsh" ;Default installation folder InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ;-------------------------------- ;General ;Name and file Name "@CPACK_NSIS_PACKAGE_NAME@" OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@" ;Set compression SetCompressor @CPACK_NSIS_COMPRESSOR@ ;Require administrator access RequestExecutionLevel admin @CPACK_NSIS_DEFINES@ @CPACK_NSIS_MANIFEST_DPI_AWARE_CODE@ @CPACK_NSIS_BRANDING_TEXT_CODE@ !include Sections.nsh ;--- Component support macros: --- ; The code for the add/remove functionality is from: ; https://nsis.sourceforge.io/Add/Remove_Functionality ; It has been modified slightly and extended to provide ; inter-component dependencies. Var AR_SecFlags Var AR_RegFlags @CPACK_NSIS_SECTION_SELECTED_VARS@ ; Loads the "selected" flag for the section named SecName into the ; variable VarName. !macro LoadSectionSelectedIntoVar SecName VarName SectionGetFlags ${${SecName}} $${VarName} IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits !macroend ; Loads the value of a variable... can we get around this? !macro LoadVar VarName IntOp $R0 0 + $${VarName} !macroend ; Sets the value of a variable !macro StoreVar VarName IntValue IntOp $${VarName} 0 + ${IntValue} !macroend !macro InitSection SecName ; This macro reads component installed flag from the registry and ;changes checked state of the section on the components page. ;Input: section index constant name specified in Section command. ClearErrors ;Reading component status from registry ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed" IfErrors "default_${SecName}" ;Status will stay default if registry value not found ;(component was never installed) IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit ; Note whether this component was installed before !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags IntOp $R0 $AR_RegFlags & $AR_RegFlags ;Writing modified flags SectionSetFlags ${${SecName}} $AR_SecFlags "default_${SecName}:" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected !macroend !macro FinishSection SecName ; This macro reads section flag set by user and removes the section ;if it is not selected. ;Then it writes component installed flag to registry ;Input: section index constant name specified in Section command. SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags ;Checking lowest bit: IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED} IntCmp $AR_SecFlags 1 "leave_${SecName}" ;Section is not selected: ;Calling Section uninstall macro and writing zero installed flag !insertmacro "Remove_${${SecName}}" WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 0 Goto "exit_${SecName}" "leave_${SecName}:" ;Section is selected: WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \ "Installed" 1 "exit_${SecName}:" !macroend !macro RemoveSection_CPack SecName ; This macro is used to call section's Remove_... macro ;from the uninstaller. ;Input: section index constant name specified in Section command. !insertmacro "Remove_${${SecName}}" !macroend ; Determine whether the selection of SecName changed !macro MaybeSelectionChanged SecName !insertmacro LoadVar ${SecName}_selected SectionGetFlags ${${SecName}} $R1 IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits ; See if the status has changed: IntCmp $R0 $R1 "${SecName}_unchanged" !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected" !insertmacro "Deselect_required_by_${SecName}" goto "${SecName}_unchanged" "${SecName}_was_selected:" !insertmacro "Select_${SecName}_depends" "${SecName}_unchanged:" !macroend ;--- End of Add/Remove macros --- ;-------------------------------- ;Interface Settings !define MUI_HEADERIMAGE !define MUI_ABORTWARNING ;---------------------------------------- ; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02" ;---------------------------------------- !verbose 3 !include "WinMessages.NSH" !verbose 4 ;==================================================== ; get_NT_environment ; Returns: the selected environment ; Output : head of the stack ;==================================================== !macro select_NT_profile UN Function ${UN}select_NT_profile StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single DetailPrint "Selected environment for all users" Push "all" Return environment_single: DetailPrint "Selected environment for current user only." Push "current" Return FunctionEnd !macroend !insertmacro select_NT_profile "" !insertmacro select_NT_profile "un." ;---------------------------------------------------- !define NT_current_env 'HKCU "Environment"' !define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !ifndef WriteEnvStr_RegKey !ifdef ALL_USERS !define WriteEnvStr_RegKey \ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' !else !define WriteEnvStr_RegKey 'HKCU "Environment"' !endif !endif ; AddToPath - Adds the given dir to the search path. ; Input - head of the stack ; Note - Win9x systems requires reboot Function AddToPath Exch $0 Push $1 Push $2 Push $3 # don't add if the path doesn't exist IfFileExists "$0\*.*" "" AddToPath_done ReadEnvStr $1 PATH ; if the path is too long for a NSIS variable NSIS will return a 0 ; length string. If we find that, then warn and skip any path ; modification as it will trash the existing path. StrLen $2 $1 IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done CheckPathLength_ShowPathWarning: Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!" Goto AddToPath_done CheckPathLength_Done: Push "$1;" Push "$0;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Push "$1;" Push "$0\;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done GetFullPathName /SHORT $3 $0 Push "$1;" Push "$3;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Push "$1;" Push "$3\;" Call StrStr Pop $2 StrCmp $2 "" "" AddToPath_done Call IsNT Pop $1 StrCmp $1 1 AddToPath_NT ; Not on NT StrCpy $1 $WINDIR 2 FileOpen $1 "$1\autoexec.bat" a FileSeek $1 -1 END FileReadByte $1 $2 IntCmp $2 26 0 +2 +2 # DOS EOF FileSeek $1 -1 END # write over EOF FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n" FileClose $1 SetRebootFlag true Goto AddToPath_done AddToPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" Goto DoTrim ReadAllKey: ReadRegStr $1 ${NT_all_env} "PATH" DoTrim: StrCmp $1 "" AddToPath_NTdoIt Push $1 Call Trim Pop $1 StrCpy $0 "$1;$0" AddToPath_NTdoIt: StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $0 Goto DoSend WriteAllKey: WriteRegExpandStr ${NT_all_env} "PATH" $0 DoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 AddToPath_done: Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd ; RemoveFromPath - Remove a given dir from the path ; Input: head of the stack Function un.RemoveFromPath Exch $0 Push $1 Push $2 Push $3 Push $4 Push $5 Push $6 IntFmt $6 "%c" 26 # DOS EOF Call un.IsNT Pop $1 StrCmp $1 1 unRemoveFromPath_NT ; Not on NT StrCpy $1 $WINDIR 2 FileOpen $1 "$1\autoexec.bat" r GetTempFileName $4 FileOpen $2 $4 w GetFullPathName /SHORT $0 $0 StrCpy $0 "SET PATH=%PATH%;$0" Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoop: FileRead $1 $3 StrCpy $5 $3 1 -1 # read last char StrCmp $5 $6 0 +2 # if DOS EOF StrCpy $3 $3 -1 # remove DOS EOF so we can compare StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine StrCmp $3 "" unRemoveFromPath_dosLoopEnd FileWrite $2 $3 Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoopRemoveLine: SetRebootFlag true Goto unRemoveFromPath_dosLoop unRemoveFromPath_dosLoopEnd: FileClose $2 FileClose $1 StrCpy $1 $WINDIR 2 Delete "$1\autoexec.bat" CopyFiles /SILENT $4 "$1\autoexec.bat" Delete $4 Goto unRemoveFromPath_done unRemoveFromPath_NT: StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey ReadRegStr $1 ${NT_current_env} "PATH" Goto unDoTrim unReadAllKey: ReadRegStr $1 ${NT_all_env} "PATH" unDoTrim: StrCpy $5 $1 1 -1 # copy last char StrCmp $5 ";" +2 # if last char != ; StrCpy $1 "$1;" # append ; Push $1 Push "$0;" Call un.StrStr ; Find `$0;` in $1 Pop $2 ; pos of our dir StrCmp $2 "" unRemoveFromPath_done ; else, it is in path # $0 - path to add # $1 - path var StrLen $3 "$0;" StrLen $4 $2 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove StrCpy $3 $5$6 StrCpy $5 $3 1 -1 # copy last char StrCmp $5 ";" 0 +2 # if last char == ; StrCpy $3 $3 -1 # remove last char StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey WriteRegExpandStr ${NT_current_env} "PATH" $3 Goto unDoSend unWriteAllKey: WriteRegExpandStr ${NT_all_env} "PATH" $3 unDoSend: SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 unRemoveFromPath_done: Pop $6 Pop $5 Pop $4 Pop $3 Pop $2 Pop $1 Pop $0 FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Uninstall stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ########################################### # Utility Functions # ########################################### ;==================================================== ; IsNT - Returns 1 if the current system is NT, 0 ; otherwise. ; Output: head of the stack ;==================================================== ; IsNT ; no input ; output, top of the stack = 1 if NT or 0 if not ; ; Usage: ; Call IsNT ; Pop $R0 ; ($R0 at this point is 1 or 0) !macro IsNT un Function ${un}IsNT Push $0 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion StrCmp $0 "" 0 IsNT_yes ; we are not NT. Pop $0 Push 0 Return IsNT_yes: ; NT!!! Pop $0 Push 1 FunctionEnd !macroend !insertmacro IsNT "" !insertmacro IsNT "un." ; StrStr ; input, top of stack = string to search for ; top of stack-1 = string to search in ; output, top of stack (replaces with the portion of the string remaining) ; modifies no other variables. ; ; Usage: ; Push "this is a long ass string" ; Push "ass" ; Call StrStr ; Pop $R0 ; ($R0 at this point is "ass string") !macro StrStr un Function ${un}StrStr Exch $R1 ; st=haystack,old$R1, $R1=needle Exch ; st=old$R1,haystack Exch $R2 ; st=old$R1,old$R2, $R2=haystack Push $R3 Push $R4 Push $R5 StrLen $R3 $R1 StrCpy $R4 0 ; $R1=needle ; $R2=haystack ; $R3=len(needle) ; $R4=cnt ; $R5=tmp loop: StrCpy $R5 $R2 $R3 $R4 StrCmp $R5 $R1 done StrCmp $R5 "" done IntOp $R4 $R4 + 1 Goto loop done: StrCpy $R1 $R2 "" $R4 Pop $R5 Pop $R4 Pop $R3 Pop $R2 Exch $R1 FunctionEnd !macroend !insertmacro StrStr "" !insertmacro StrStr "un." Function Trim ; Added by Pelaca Exch $R1 Push $R2 Loop: StrCpy $R2 "$R1" 1 -1 StrCmp "$R2" " " RTrim StrCmp "$R2" "$\n" RTrim StrCmp "$R2" "$\r" RTrim StrCmp "$R2" ";" RTrim GoTo Done RTrim: StrCpy $R1 "$R1" -1 Goto Loop Done: Pop $R2 Exch $R1 FunctionEnd Function ConditionalAddToRegistry Pop $0 Pop $1 StrCmp "$0" "" ConditionalAddToRegistry_EmptyString WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \ "$1" "$0" ;MessageBox MB_OK "Set Registry: '$1' to '$0'" DetailPrint "Set install registry entry: '$1' to '$0'" ConditionalAddToRegistry_EmptyString: FunctionEnd ;-------------------------------- !ifdef CPACK_USES_DOWNLOAD Function DownloadFile IfFileExists $INSTDIR\* +2 CreateDirectory $INSTDIR Pop $0 ; Skip if already downloaded IfFileExists $INSTDIR\$0 0 +2 Return StrCpy $1 "@CPACK_DOWNLOAD_SITE@" try_again: NSISdl::download "$1/$0" "$INSTDIR\$0" Pop $1 StrCmp $1 "success" success StrCmp $1 "Cancelled" cancel MessageBox MB_OK "Download failed: $1" cancel: Return success: FunctionEnd !endif ;-------------------------------- ; Define some macro setting for the gui @CPACK_NSIS_INSTALLER_MUI_ICON_CODE@ @CPACK_NSIS_INSTALLER_ICON_CODE@ @CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@ @CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@ @CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@ ;-------------------------------- ;Pages @CPACK_NSIS_INSTALLER_WELCOME_TITLE_CODE@ @CPACK_NSIS_INSTALLER_WELCOME_TITLE_3LINES_CODE@ !insertmacro MUI_PAGE_WELCOME @CPACK_NSIS_LICENSE_PAGE@ Page custom InstallOptionsPage !insertmacro MUI_PAGE_DIRECTORY !define MUI_DIRECTORYPAGE_VARIABLE $mmxDataDir !define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install $(^NameDA) blockchain data (MMX_DATA) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK" !define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Data folder" !insertmacro MUI_PAGE_DIRECTORY ;Start Menu Folder Page Configuration !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER @CPACK_NSIS_PAGE_COMPONENTS@ !insertmacro MUI_PAGE_INSTFILES @CPACK_NSIS_INSTALLER_FINISH_TITLE_CODE@ @CPACK_NSIS_INSTALLER_FINISH_TITLE_3LINES_CODE@ !insertmacro MUI_PAGE_FINISH !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;first language is the default language !insertmacro MUI_LANGUAGE "Afrikaans" !insertmacro MUI_LANGUAGE "Albanian" !insertmacro MUI_LANGUAGE "Arabic" !insertmacro MUI_LANGUAGE "Asturian" !insertmacro MUI_LANGUAGE "Basque" !insertmacro MUI_LANGUAGE "Belarusian" !insertmacro MUI_LANGUAGE "Bosnian" !insertmacro MUI_LANGUAGE "Breton" !insertmacro MUI_LANGUAGE "Bulgarian" !insertmacro MUI_LANGUAGE "Catalan" !insertmacro MUI_LANGUAGE "Corsican" !insertmacro MUI_LANGUAGE "Croatian" !insertmacro MUI_LANGUAGE "Czech" !insertmacro MUI_LANGUAGE "Danish" !insertmacro MUI_LANGUAGE "Dutch" !insertmacro MUI_LANGUAGE "Esperanto" !insertmacro MUI_LANGUAGE "Estonian" !insertmacro MUI_LANGUAGE "Farsi" !insertmacro MUI_LANGUAGE "Finnish" !insertmacro MUI_LANGUAGE "French" !insertmacro MUI_LANGUAGE "Galician" !insertmacro MUI_LANGUAGE "German" !insertmacro MUI_LANGUAGE "Greek" !insertmacro MUI_LANGUAGE "Hebrew" !insertmacro MUI_LANGUAGE "Hungarian" !insertmacro MUI_LANGUAGE "Icelandic" !insertmacro MUI_LANGUAGE "Indonesian" !insertmacro MUI_LANGUAGE "Irish" !insertmacro MUI_LANGUAGE "Italian" !insertmacro MUI_LANGUAGE "Japanese" !insertmacro MUI_LANGUAGE "Korean" !insertmacro MUI_LANGUAGE "Kurdish" !insertmacro MUI_LANGUAGE "Latvian" !insertmacro MUI_LANGUAGE "Lithuanian" !insertmacro MUI_LANGUAGE "Luxembourgish" !insertmacro MUI_LANGUAGE "Macedonian" !insertmacro MUI_LANGUAGE "Malay" !insertmacro MUI_LANGUAGE "Mongolian" !insertmacro MUI_LANGUAGE "Norwegian" !insertmacro MUI_LANGUAGE "NorwegianNynorsk" !insertmacro MUI_LANGUAGE "Pashto" !insertmacro MUI_LANGUAGE "Polish" !insertmacro MUI_LANGUAGE "Portuguese" !insertmacro MUI_LANGUAGE "PortugueseBR" !insertmacro MUI_LANGUAGE "Romanian" !insertmacro MUI_LANGUAGE "Russian" !insertmacro MUI_LANGUAGE "ScotsGaelic" !insertmacro MUI_LANGUAGE "Serbian" !insertmacro MUI_LANGUAGE "SerbianLatin" !insertmacro MUI_LANGUAGE "SimpChinese" !insertmacro MUI_LANGUAGE "Slovak" !insertmacro MUI_LANGUAGE "Slovenian" !insertmacro MUI_LANGUAGE "Spanish" !insertmacro MUI_LANGUAGE "SpanishInternational" !insertmacro MUI_LANGUAGE "Swedish" !insertmacro MUI_LANGUAGE "Tatar" !insertmacro MUI_LANGUAGE "Thai" !insertmacro MUI_LANGUAGE "TradChinese" !insertmacro MUI_LANGUAGE "Turkish" !insertmacro MUI_LANGUAGE "Ukrainian" !insertmacro MUI_LANGUAGE "Uzbek" !insertmacro MUI_LANGUAGE "Vietnamese" !insertmacro MUI_LANGUAGE "Welsh" ;-------------------------------- ;Reserve Files ;These files should be inserted before other files in the data block ;Keep these lines before any File command ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA) ReserveFile "NSIS.InstallOptions.ini" !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ; for UserInfo::GetName and UserInfo::GetAccountType ReserveFile /plugin 'UserInfo.dll' ;-------------------------------- ; Installation types @CPACK_NSIS_INSTALLATION_TYPES@ ;-------------------------------- ; Component sections @CPACK_NSIS_COMPONENT_SECTIONS@ @CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@ ;-------------------------------- ;Installer Sections Section "-Core installation" WriteRegExpandStr ${NT_current_env} MMX_DATA "$mmxDataDir\" SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 ;Use the entire tree produced by the INSTALL target. Keep the ;list of directories here in sync with the RMDir commands below. SetOutPath "$INSTDIR" @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@ @CPACK_NSIS_FULL_INSTALL@ ;Store installation folder WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR ;Create uninstaller WriteUninstaller "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" Push "DisplayName" Push "@CPACK_NSIS_DISPLAY_NAME@" Call ConditionalAddToRegistry Push "DisplayVersion" Push "@CPACK_PACKAGE_VERSION@" Call ConditionalAddToRegistry Push "Publisher" Push "@CPACK_PACKAGE_VENDOR@" Call ConditionalAddToRegistry Push "UninstallString" Push "$\"$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe$\"" Call ConditionalAddToRegistry Push "NoRepair" Push "1" Call ConditionalAddToRegistry !ifdef CPACK_NSIS_ADD_REMOVE ;Create add/remove functionality Push "ModifyPath" Push "$INSTDIR\AddRemove.exe" Call ConditionalAddToRegistry !else Push "NoModify" Push "1" Call ConditionalAddToRegistry !endif ; Optional registration Push "DisplayIcon" Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@" Call ConditionalAddToRegistry Push "HelpLink" Push "@CPACK_NSIS_HELP_LINK@" Call ConditionalAddToRegistry Push "URLInfoAbout" Push "@CPACK_NSIS_URL_INFO_ABOUT@" Call ConditionalAddToRegistry Push "Contact" Push "@CPACK_NSIS_CONTACT@" Call ConditionalAddToRegistry !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application ;Create shortcuts CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" @CPACK_NSIS_CREATE_ICONS@ @CPACK_NSIS_CREATE_ICONS_EXTRA@ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" ;Read a value from an InstallOptions INI file !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State" !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State" !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State" ; Write special uninstall registry entries Push "StartMenu" Push "$STARTMENU_FOLDER" Call ConditionalAddToRegistry Push "DoNotAddToPath" Push "$DO_NOT_ADD_TO_PATH" Call ConditionalAddToRegistry Push "AddToPathAllUsers" Push "$ADD_TO_PATH_ALL_USERS" Call ConditionalAddToRegistry Push "AddToPathCurrentUser" Push "$ADD_TO_PATH_CURRENT_USER" Call ConditionalAddToRegistry Push "InstallToDesktop" Push "$INSTALL_DESKTOP" Call ConditionalAddToRegistry !insertmacro MUI_STARTMENU_WRITE_END @CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ SectionEnd Section "-Add to path" Push $INSTDIR\bin StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 Call AddToPath doNotAddToPath: SectionEnd ;-------------------------------- ; Create custom pages Function InstallOptionsPage !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini" FunctionEnd ;-------------------------------- ; determine admin versus local install Function un.onInit ClearErrors UserInfo::GetName IfErrors noLM Pop $0 UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Admin group' Goto done StrCmp $1 "Power" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' Goto done noLM: ;Get installation folder from registry if available done: FunctionEnd ;--- Add/Remove callback functions: --- !macro SectionList MacroName ;This macro used to perform operation on multiple sections. ;List all of your components in following manner here. @CPACK_NSIS_COMPONENT_SECTION_LIST@ !macroend Section -FinishComponents ;Removes unselected components and writes component status to registry !insertmacro SectionList "FinishSection" !ifdef CPACK_NSIS_ADD_REMOVE ; Get the name of the installer executable System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1' StrCpy $R3 $R0 ; Strip off the last 13 characters, to see if we have AddRemove.exe StrLen $R1 $R0 IntOp $R1 $R0 - 13 StrCpy $R2 $R0 13 $R1 StrCmp $R2 "AddRemove.exe" addremove_installed ; We're not running AddRemove.exe, so install it CopyFiles $R3 $INSTDIR\AddRemove.exe addremove_installed: !endif SectionEnd ;--- End of Add/Remove callback functions --- ;-------------------------------- ; Component dependencies Function .onSelChange !insertmacro SectionList MaybeSelectionChanged FunctionEnd ;-------------------------------- ;Uninstaller Section Section "Uninstall" ReadRegStr $START_MENU SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu" ;MessageBox MB_OK "Start menu is in: $START_MENU" ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath" ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers" ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser" ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS" ReadRegStr $INSTALL_DESKTOP SHCTX \ "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop" ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP " @CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@ ;Remove files we installed. ;Keep the list of directories here in sync with the File commands above. @CPACK_NSIS_DELETE_FILES@ @CPACK_NSIS_DELETE_DIRECTORIES@ !ifdef CPACK_NSIS_ADD_REMOVE ;Remove the add/remove program Delete "$INSTDIR\AddRemove.exe" !endif ;Remove the uninstaller itself. Delete "$INSTDIR\@CPACK_NSIS_UNINSTALL_NAME@.exe" DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ;Remove the installation directory if it is empty. RMDir "$INSTDIR" ; Remove the registry entries. DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" ; DeleteRegValue ${NT_current_env} MMX_DATA ; Removes all optional components !insertmacro SectionList "RemoveSection_CPack" !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS@ @CPACK_NSIS_DELETE_ICONS_EXTRA@ ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" startMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." IfErrors startMenuDeleteLoopDone StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop startMenuDeleteLoopDone: ; If the user changed the shortcut, then uninstall may not work. This should ; try to fix it. StrCpy $MUI_TEMP "$START_MENU" Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" @CPACK_NSIS_DELETE_ICONS_EXTRA@ ;Delete empty start menu parent directories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" secondStartMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." IfErrors secondStartMenuDeleteLoopDone StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop secondStartMenuDeleteLoopDone: DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" Push $INSTDIR\bin StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0 Call un.RemoveFromPath doNotRemoveFromPath: SectionEnd ;-------------------------------- ; determine admin versus local install ; Is install for "AllUsers" or "JustMe"? ; Default to "JustMe" - set to "AllUsers" if admin or on Win9x ; This function is used for the very first "custom page" of the installer. ; This custom page does not show up visibly, but it executes prior to the ; first visible page and sets up $INSTDIR properly... ; Choose different default installation folder based on SV_ALLUSERS... ; "Program Files" for AllUsers, "My Documents" for JustMe... Function .onInit StrCpy $mmxDataDir_default "$PROFILE\.mmx\" ReadRegStr $mmxDataDir ${NT_current_env} "MMX_DATA" StrCmp $mmxDataDir "" 0 +2 StrCpy $mmxDataDir $mmxDataDir_default StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString" StrCmp $0 "" inst MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \ /SD IDYES IDYES uninst IDNO inst Abort ;Run the uninstaller uninst: ClearErrors # $0 should _always_ be quoted, however older versions of CMake did not # do this. We'll conditionally remove the begin/end quotes. # Remove first char if quote StrCpy $2 $0 1 0 # copy first char StrCmp $2 "$\"" 0 +2 # if char is quote StrCpy $0 $0 "" 1 # remove first char # Remove last char if quote StrCpy $2 $0 1 -1 # copy last char StrCmp $2 "$\"" 0 +2 # if char is quote StrCpy $0 $0 -1 # remove last char StrLen $2 "\@CPACK_NSIS_UNINSTALL_NAME@.exe" StrCpy $3 $0 -$2 # remove "\@CPACK_NSIS_UNINSTALL_NAME@.exe" from UninstallString to get path ExecWait '"$0" /S _?=$3' ;Do not copy the uninstaller to a temp file IfErrors uninst_failed inst uninst_failed: MessageBox MB_OK|MB_ICONSTOP "Uninstall failed." Abort inst: ; Reads components status for registry !insertmacro SectionList "InitSection" ; check to see if /D has been used to change ; the install directory by comparing it to the ; install directory that is expected to be the ; default StrCpy $IS_DEFAULT_INSTALLDIR 0 StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2 StrCpy $IS_DEFAULT_INSTALLDIR 1 StrCpy $SV_ALLUSERS "JustMe" ; if default install dir then change the default ; if it is installed for JustMe StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@" ClearErrors UserInfo::GetName IfErrors noLM Pop $0 UserInfo::GetAccountType Pop $1 StrCmp $1 "Admin" 0 +4 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Admin group' StrCpy $SV_ALLUSERS "AllUsers" Goto done StrCmp $1 "Power" 0 +3 SetShellVarContext all ;MessageBox MB_OK 'User "$0" is in the Power Users group' StrCpy $SV_ALLUSERS "AllUsers" Goto done noLM: StrCpy $SV_ALLUSERS "AllUsers" ;Get installation folder from registry if available done: StrCmp $SV_ALLUSERS "AllUsers" 0 +3 StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2 StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini" noOptionsPage: FunctionEnd ================================================ FILE: cmake/product_version/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015, by [halex2005](mailto:akharlov@gmail.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: cmake/product_version/VersionInfo.in ================================================ #pragma once #ifndef PRODUCT_VERSION_MAJOR #define PRODUCT_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@ #endif #ifndef PRODUCT_VERSION_MINOR #define PRODUCT_VERSION_MINOR @PRODUCT_VERSION_MINOR@ #endif #ifndef PRODUCT_VERSION_PATCH #define PRODUCT_VERSION_PATCH @PRODUCT_VERSION_PATCH@ #endif #ifndef PRODUCT_VERSION_BUILD #define PRODUCT_VERSION_BUILD @PRODUCT_VERSION_REVISION@ #endif #ifndef FILE_VERSION_MAJOR #define FILE_VERSION_MAJOR @PRODUCT_VERSION_MAJOR@ #endif #ifndef FILE_VERSION_MINOR #define FILE_VERSION_MINOR @PRODUCT_VERSION_MINOR@ #endif #ifndef FILE_VERSION_PATCH #define FILE_VERSION_PATCH @PRODUCT_VERSION_PATCH@ #endif #ifndef FILE_VERSION_BUILD #define FILE_VERSION_BUILD @PRODUCT_VERSION_REVISION@ #endif #ifndef __TO_STRING #define __TO_STRING_IMPL(x) #x #define __TO_STRING(x) __TO_STRING_IMPL(x) #endif #define PRODUCT_VERSION_MAJOR_MINOR_STR __TO_STRING(PRODUCT_VERSION_MAJOR) "." __TO_STRING(PRODUCT_VERSION_MINOR) #define PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR PRODUCT_VERSION_MAJOR_MINOR_STR "." __TO_STRING(PRODUCT_VERSION_PATCH) #define PRODUCT_VERSION_FULL_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(PRODUCT_VERSION_BUILD) #define PRODUCT_VERSION_RESOURCE PRODUCT_VERSION_MAJOR,PRODUCT_VERSION_MINOR,PRODUCT_VERSION_PATCH,PRODUCT_VERSION_BUILD #define PRODUCT_VERSION_RESOURCE_STR PRODUCT_VERSION_MAJOR_MINOR_PATCH_STR "\0" #define FILE_VERSION_MAJOR_MINOR_STR __TO_STRING(FILE_VERSION_MAJOR) "." __TO_STRING(FILE_VERSION_MINOR) #define FILE_VERSION_MAJOR_MINOR_PATCH_STR FILE_VERSION_MAJOR_MINOR_STR "." __TO_STRING(FILE_VERSION_PATCH) #define FILE_VERSION_FULL_STR FILE_VERSION_MAJOR_MINOR_PATCH_STR "." __TO_STRING(FILE_VERSION_BUILD) #define FILE_VERSION_RESOURCE FILE_VERSION_MAJOR,FILE_VERSION_MINOR,FILE_VERSION_PATCH,FILE_VERSION_BUILD #define FILE_VERSION_RESOURCE_STR FILE_VERSION_FULL_STR "\0" #ifndef PRODUCT_ICON #define PRODUCT_ICON "@PRODUCT_ICON@" #endif #ifndef PRODUCT_COMMENTS #define PRODUCT_COMMENTS "@PRODUCT_COMMENTS@\0" #endif #ifndef PRODUCT_COMPANY_NAME #define PRODUCT_COMPANY_NAME "@PRODUCT_COMPANY_NAME@\0" #endif #ifndef PRODUCT_COMPANY_COPYRIGHT #define PRODUCT_COMPANY_COPYRIGHT "@PRODUCT_COMPANY_COPYRIGHT@\0" #endif #ifndef PRODUCT_FILE_DESCRIPTION #define PRODUCT_FILE_DESCRIPTION "@PRODUCT_FILE_DESCRIPTION@\0" #endif #ifndef PRODUCT_INTERNAL_NAME #define PRODUCT_INTERNAL_NAME "@PRODUCT_NAME@\0" #endif #ifndef PRODUCT_ORIGINAL_FILENAME #define PRODUCT_ORIGINAL_FILENAME __TO_STRING(TARGET_FILENAME) "\0" #endif #ifndef PRODUCT_BUNDLE #define PRODUCT_BUNDLE "@PRODUCT_BUNDLE@\0" #endif ================================================ FILE: cmake/product_version/VersionResource.rc ================================================ #include "VersionInfo_@PRODUCT_NAME@.h" #include "winres.h" #ifdef PRODUCT_ICON IDI_ICON1 ICON PRODUCT_ICON #endif LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT VS_VERSION_INFO VERSIONINFO FILEVERSION FILE_VERSION_RESOURCE PRODUCTVERSION PRODUCT_VERSION_RESOURCE FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", PRODUCT_COMMENTS VALUE "CompanyName", PRODUCT_COMPANY_NAME VALUE "FileDescription", PRODUCT_FILE_DESCRIPTION VALUE "FileVersion", FILE_VERSION_RESOURCE_STR VALUE "InternalName", PRODUCT_INTERNAL_NAME VALUE "LegalCopyright", PRODUCT_COMPANY_COPYRIGHT VALUE "OriginalFilename", PRODUCT_ORIGINAL_FILENAME VALUE "ProductName", PRODUCT_BUNDLE VALUE "ProductVersion", PRODUCT_VERSION_RESOURCE_STR END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END ================================================ FILE: cmake/product_version/generate_product_version.cmake ================================================ include (CMakeParseArguments) set (GenerateProductVersionCurrentDir ${CMAKE_CURRENT_LIST_DIR}) # generate_product_version() function # # This function uses VersionInfo.in template file and VersionResource.rc file # to generate WIN32 resource with version information and general resource strings. # # Usage: # generate_product_version( # SomeOutputResourceVariable # NAME MyGreatProject # ICON ${PATH_TO_APP_ICON} # VERSION_MAJOR 2 # VERSION_MINOR 3 # VERSION_PATCH ${BUILD_COUNTER} # VERSION_REVISION ${BUILD_REVISION} # ) # where BUILD_COUNTER and BUILD_REVISION could be values from your CI server. # # You can use generated resource for your executable targets: # add_executable(target-name ${target-files} ${SomeOutputResourceVariable}) # # You can specify resource strings in arguments: # NAME - name of executable (no defaults, ex: Microsoft Word) # BUNDLE - bundle (${NAME} is default, ex: Microsoft Office) # ICON - path to application icon (${CMAKE_SOURCE_DIR}/product.ico by default) # VERSION_MAJOR - 1 is default # VERSION_MINOR - 0 is default # VERSION_PATCH - 0 is default # VERSION_REVISION - 0 is default # COMPANY_NAME - your company name (no defaults) # COMPANY_COPYRIGHT - ${COMPANY_NAME} (C) Copyright ${CURRENT_YEAR} is default # COMMENTS - ${NAME} v${VERSION_MAJOR}.${VERSION_MINOR} is default # ORIGINAL_FILENAME - ${NAME} is default # INTERNAL_NAME - ${NAME} is default # FILE_DESCRIPTION - ${NAME} is default function(generate_product_version outfiles) set (options) set (oneValueArgs NAME BUNDLE ICON VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_REVISION COMPANY_NAME COMPANY_COPYRIGHT COMMENTS ORIGINAL_FILENAME INTERNAL_NAME FILE_DESCRIPTION) set (multiValueArgs) cmake_parse_arguments(PRODUCT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if (NOT PRODUCT_BUNDLE OR "${PRODUCT_BUNDLE}" STREQUAL "") set(PRODUCT_BUNDLE "${PRODUCT_NAME}") endif() # if (NOT PRODUCT_ICON OR "${PRODUCT_ICON}" STREQUAL "") # set(PRODUCT_ICON "${CMAKE_SOURCE_DIR}/product.ico") # endif() if (NOT PRODUCT_VERSION_MAJOR OR "${PRODUCT_VERSION_MAJOR}" STREQUAL "") set(PRODUCT_VERSION_MAJOR 0) endif() if (NOT PRODUCT_VERSION_MINOR OR "${PRODUCT_VERSION_MINOR}" STREQUAL "") set(PRODUCT_VERSION_MINOR 0) endif() if (NOT PRODUCT_VERSION_PATCH OR "${PRODUCT_VERSION_PATCH}" STREQUAL "") set(PRODUCT_VERSION_PATCH 0) endif() if (NOT PRODUCT_VERSION_REVISION OR "${PRODUCT_VERSION_REVISION}" STREQUAL "") set(PRODUCT_VERSION_REVISION 0) endif() if (NOT PRODUCT_NAME OR "${PRODUCT_NAME}" STREQUAL "") set(PRODUCT_NAME "") endif() if (NOT PRODUCT_COMPANY_COPYRIGHT OR "${PRODUCT_COMPANY_COPYRIGHT}" STREQUAL "") string(TIMESTAMP PRODUCT_CURRENT_YEAR "%Y") set(PRODUCT_COMPANY_COPYRIGHT "${PRODUCT_COMPANY_NAME} (C) Copyright ${PRODUCT_CURRENT_YEAR}") endif() if (NOT PRODUCT_COMMENTS OR "${PRODUCT_COMMENTS}" STREQUAL "") set(PRODUCT_COMMENTS "${PRODUCT_NAME} v${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}") endif() if (NOT PRODUCT_ORIGINAL_FILENAME OR "${PRODUCT_ORIGINAL_FILENAME}" STREQUAL "") set(PRODUCT_ORIGINAL_FILENAME "${PRODUCT_NAME}") endif() if (NOT PRODUCT_INTERNAL_NAME OR "${PRODUCT_INTERNAL_NAME}" STREQUAL "") set(PRODUCT_INTERNAL_NAME "${PRODUCT_NAME}") endif() if (NOT PRODUCT_FILE_DESCRIPTION OR "${PRODUCT_FILE_DESCRIPTION}" STREQUAL "") set(PRODUCT_FILE_DESCRIPTION "${PRODUCT_NAME}") endif() set (_VersionInfoFile ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo/VersionInfo_${PRODUCT_NAME}.h) set (_VersionResourceFile ${CMAKE_CURRENT_BINARY_DIR}/VersionInfo/VersionResource_${PRODUCT_NAME}.rc) configure_file( ${GenerateProductVersionCurrentDir}/VersionInfo.in ${_VersionInfoFile} @ONLY) configure_file( ${GenerateProductVersionCurrentDir}/VersionResource.rc ${_VersionResourceFile} @ONLY) list(APPEND ${outfiles} ${_VersionInfoFile} ${_VersionResourceFile}) set (${outfiles} ${${outfiles}} PARENT_SCOPE) endfunction() ================================================ FILE: cmake/use_cuda.cmake ================================================ find_package(CUDA) if(NOT MSVC) set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Xcompiler ,-fPIC") endif() set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -diag-suppress 611,997,68,186 -gencode arch=compute_50,code=compute_50 -gencode arch=compute_75,code=compute_75 -gencode arch=compute_86,code=compute_86") ================================================ FILE: cmake/win_pack.cmake ================================================ set(NETWORK "mainnet") set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/nsis/;${CMAKE_MODULE_PATH}") function(get_all_targets var) set(targets) get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) set(${var} ${targets} PARENT_SCOPE) endfunction() macro(get_all_targets_recursive targets dir) get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) foreach(subdir ${subdirectories}) get_all_targets_recursive(${targets} ${subdir}) endforeach() get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS) list(APPEND ${targets} ${current_targets}) endmacro() get_all_targets(all_targets) set_target_properties(${all_targets} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(OutDir)") set_target_properties(${all_targets} PROPERTIES VS_DEBUGGER_ENVIRONMENT "MMX_HOME=$(USERPROFILE)\\.mmx\\\nMMX_DATA=$(USERPROFILE)\\.mmx\\\nNETWORK=${NETWORK}\nMMX_NETWORK=$(USERPROFILE)\\.mmx\\${NETWORK}\\\n") set_target_properties(mmx_node PROPERTIES VS_DEBUGGER_COMMAND_ARGUMENTS "-c config\\${NETWORK}\\ config\\node\\ $(USERPROFILE)\\.mmx\\config\\local\\") set_target_properties(mmx_timelord PROPERTIES VS_DEBUGGER_COMMAND_ARGUMENTS "-c config\\${NETWORK}\\ config\\timelord\\ $(USERPROFILE)\\.mmx\\config\\local\\") set_target_properties(mmx_wallet PROPERTIES VS_DEBUGGER_COMMAND_ARGUMENTS "-c config\\${NETWORK}\\ config\\wallet\\ $(USERPROFILE)\\.mmx\\config\\local\\") set_target_properties(mmx_farmer mmx_harvester PROPERTIES VS_DEBUGGER_COMMAND_ARGUMENTS "-c config\\${NETWORK}\\ config\\farmer\\ $(USERPROFILE)\\.mmx\\config\\local\\") add_custom_command(TARGET mmx PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/kernel/ $/kernel/) add_custom_command(TARGET mmx PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/config/ $/config/) add_custom_command(TARGET mmx PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/www/ $/www/) add_custom_command(TARGET mmx PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/data/ $/data/) add_custom_command(TARGET mmx PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/scripts/win/ $) if(NOT MMX_VERSION MATCHES "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)$") string(TIMESTAMP BUILD_TIMESTAMP "%Y%m%d") set(MMX_VERSION "v0.0.0.${BUILD_TIMESTAMP}") endif() message(STATUS "MMX_VERSION=${MMX_VERSION}") string(REGEX REPLACE "^v([0-9]+).*$" "\\1" MMX_VERSION_MAJOR "${MMX_VERSION}") string(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*$" "\\1" MMX_VERSION_MINOR "${MMX_VERSION}") string(REGEX REPLACE "^v[0-9]+\\.[0-9]+\\.([0-9]+.*)$" "\\1" MMX_VERSION_PATCH "${MMX_VERSION}") set(MMX_VERSION_STRING "${MMX_VERSION_MAJOR}.${MMX_VERSION_MINOR}.${MMX_VERSION_PATCH}") #message(STATUS "MMX_VERSION_STRING: ${MMX_VERSION_STRING}") set(CPACK_PACKAGE_VERSION ${MMX_VERSION_STRING}) set(CPACK_PACKAGE_VERSION_MAJOR ${MMX_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${MMX_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${MMX_VERSION_PATCH}) include(cmake/product_version/generate_product_version.cmake) set(MMX_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cmake/mmx.ico") set(MMX_BUNDLE "MMX Node") list(APPEND APP_FILES mmx mmx_node mmx_farmer mmx_wallet mmx_timelord mmx_harvester mmx_compile mmx_postool mmx_posbench mmx_iface vnx_base vnx_addons url_cpp llhttp vnxpasswd generate_passwd automy_basic_opencl ) list(APPEND TOOL_FILES tx_bench ) foreach(APPFILE IN LISTS APP_FILES TOOL_FILES) set(ProductVersionFiles "ProductVersionFiles_${APPFILE}") generate_product_version( ${ProductVersionFiles} NAME ${APPFILE} BUNDLE ${MMX_BUNDLE} COMPANY_NAME "madMAx43v3r" FILE_DESCRIPTION ${APPFILE} ICON ${MMX_ICON} VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR} VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR} VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH} ) target_sources(${APPFILE} PRIVATE ${${ProductVersionFiles}}) endforeach() if ("${MMX_WIN_PACK}" STREQUAL "TRUE") set(CMAKE_INSTALL_SYSTEM_RUNTIME_COMPONENT libraries) set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ./) set(CMAKE_INSTALL_OPENMP_LIBRARIES TRUE) include(InstallRequiredSystemLibraries) add_custom_target(mmx_node_gui ALL) set(MMX_NODE_GUI_GIT_TAG "origin/main") message(STATUS "MMX Node GUI will be built from: ${MMX_NODE_GUI_GIT_TAG}") include(FetchContent) FetchContent_Declare( mmx_node_gui GIT_REPOSITORY https://github.com/stotiks/mmx-node-gui.git GIT_TAG ${MMX_NODE_GUI_GIT_TAG} ) FetchContent_MakeAvailable(mmx_node_gui) add_custom_command(TARGET mmx_node_gui POST_BUILD COMMAND ${CMAKE_MAKE_PROGRAM} Mmx.Gui.Win.Wpf/Mmx.Gui.Win.Wpf.csproj -restore -m /p:Configuration=Release /p:PlatformTarget=x64 /p:OutputPath=${mmx_node_gui_SOURCE_DIR}/bin/Release /p:Version=${MMX_VERSION_STRING} /p:FileVersion=${MMX_VERSION_STRING} WORKING_DIRECTORY ${mmx_node_gui_SOURCE_DIR} ) set(mmx_node_gui_RELEASE_DIR ${mmx_node_gui_SOURCE_DIR}/bin/CPack_Release) install(DIRECTORY ${mmx_node_gui_RELEASE_DIR}/ DESTINATION ./ COMPONENT gui) install(TARGETS ${APP_FILES} RUNTIME DESTINATION ./ COMPONENT applications) install(TARGETS ${TOOL_FILES} RUNTIME DESTINATION ./ COMPONENT tools) install(FILES $/zlib1.dll $/zstd.dll $/OpenCL.dll $/miniupnpc.dll $/cudart64_12.dll DESTINATION ./ COMPONENT applications) install(DIRECTORY kernel/ DESTINATION kernel COMPONENT applications) install(DIRECTORY config/ DESTINATION config COMPONENT applications) install(DIRECTORY www/ DESTINATION www COMPONENT applications) install(DIRECTORY data/ DESTINATION data COMPONENT applications) install(DIRECTORY scripts/win/ DESTINATION ./ COMPONENT applications) install(FILES ${PROJECT_SOURCE_DIR}/LICENSE DESTINATION ./ COMPONENT applications) FetchContent_Declare( mmx_cuda_plotter GIT_REPOSITORY https://github.com/madMAx43v3r/mmx-binaries.git GIT_TAG "origin/master" ) FetchContent_MakeAvailable(mmx_cuda_plotter) set (MMX_DESTINATION ./) set(MMX_CUDA_PLOTTER_PATH ${mmx_cuda_plotter_SOURCE_DIR}/mmx-cuda-plotter/windows) install(DIRECTORY ${MMX_CUDA_PLOTTER_PATH}/ DESTINATION ${MMX_DESTINATION} COMPONENT plotters) set(CPACK_PACKAGE_NAME "MMX Node") set(CPACK_PACKAGE_VENDOR "madMAx43v3r") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MMX is a blockchain written from scratch using Chia's Proof Of Space and a SHA256 VDF similar to Solana") set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE) set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/madMAx43v3r/mmx-node") set(CPACK_PACKAGE_INSTALL_DIRECTORY "MMX Node") # Define components and their display names set(CPACK_COMPONENTS_ALL applications libraries gui plotters tools) set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "Node") set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") set(CPACK_COMPONENT_GUI_DISPLAY_NAME "GUI") set(CPACK_COMPONENT_PLOTTERS_DISPLAY_NAME "Plotter") set(CPACK_COMPONENT_TOOLS_DISPLAY_NAME "Tools") set(CPACK_COMPONENT_APPLICATIONS_REQUIRED True) set(CPACK_COMPONENT_LIBRARIES_REQUIRED True) set(CPACK_COMPONENT_GUI_REQUIRED True) set(CPACK_COMPONENT_PLOTTERS_REQUIRED True) #set(CPACK_COMPONENT_TOOLS_REQUIRED True) # Define NSIS installation types set(CPACK_ALL_INSTALL_TYPES Full Advanced) # set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full Minimal Advanced) # set(CPACK_COMPONENT_SYSLIBRARIES_INSTALL_TYPES Full Minimal Advanced) # set(CPACK_COMPONENT_GUI_INSTALL_TYPES Full Minimal Advanced) # set(CPACK_COMPONENT_PLOTTERS_INSTALL_TYPES Full Minimal Advanced) set(CPACK_COMPONENT_TOOLS_INSTALL_TYPES Advanced) set(CPACK_NSIS_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) set(CPACK_NSIS_MENU_LINKS "mmx_cmd.cmd" "MMX CMD" #"http://localhost:11380/gui/" "MMX Node WebGUI" "MmxGui.exe" "MMX Node" "MmxPlotter.exe" "MMX Plotter" ) set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) set(MMX_GUI_EXE "MmxGui.exe") set(CPACK_NSIS_MUI_ICON ${MMX_ICON}) set(CPACK_NSIS_INSTALLED_ICON_NAME ${MMX_GUI_EXE}) #set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") #set(CPACK_NSIS_MUI_FINISHPAGE_RUN ${MMX_GUI_EXE}) # Must be after the last CPACK macros include(CPack) endif() #if (${MMX_WIN_PACK} STREQUAL "TRUE") ================================================ FILE: codegen.sh ================================================ #!/bin/bash cd $(dirname "$0") ./vnx-base/codegen.sh ./vnx-addons/codegen.sh ../vnx-base/interface/ vnxcppcodegen --cleanup generated/ mmx interface/ modules/ interface/vm/ vnx-base/interface/ vnx-addons/interface/ vnx-addons/modules/ interface/wallet/ vnxcppcodegen --cleanup generated/contract/ mmx.contract interface/contract/ interface/ vnx-base/interface/ vnxcppcodegen --cleanup generated/operation/ mmx.operation interface/operation/ interface/ vnx-base/interface/ vnxcppcodegen --cleanup generated/solution/ mmx.solution interface/solution/ interface/ vnx-base/interface/ vnxcppcodegen --cleanup generated/vm/ mmx.vm interface/vm/ vnx-base/interface/ #vnxcppcodegen --cleanup exchange/generated/ mmx.exchange exchange/interface/ exchange/modules/ interface/ vnx-addons/interface/ vnx-addons/modules/ vnx-base/interface/ ================================================ FILE: config/default/Farmer.json ================================================ { "harvester_timeout": 30 } ================================================ FILE: config/default/Harvester.json ================================================ { "num_threads": 32, "max_queue_ms": 30000, "config_path": "config/local/", "dir_blacklist": [ ".", "..", "lost+found", "$RECYCLE.BIN", "System Volume Information" ] } ================================================ FILE: config/default/HttpServer.json ================================================ { "port": 11380, "stats_interval_ms": 60000, "default_access": "NETWORK" } ================================================ FILE: config/default/Node.json ================================================ { "num_sync_retries": 5, "sync_loss_delay": 300, "max_future_sync": 18, "max_sync_ahead": 10000, "max_sync_jobs": 100, "max_history": 200, "validate_interval_ms": 500, "tx_pool_limit": 50 } ================================================ FILE: config/default/Router.json ================================================ { "host": "0.0.0.0", "open_port": true, "min_sync_peers": 5, "num_peers_out": 8, "max_peer_set": 100, "max_connections": 100, "max_queue_ms": 5000, "max_msg_size": 8388608, "max_write_queue": 10485760, "stats_interval_ms": 60000, "connect_interval_ms": 10000, "connection_timeout_ms": 180000, "fetch_timeout_ms": 180000, "relay_target_ms": 2000, "max_hash_cache": 200000, "max_sent_cache": 20000, "max_tx_upload" : 2, "max_pending_cost": 0.1, "compress_level": 0 } ================================================ FILE: config/default/TimeLord.json ================================================ { "enable_reward": true } ================================================ FILE: config/default/Wallet.json ================================================ { "key_files": [ "wallet.dat" ], "config_path": "config/local/" } ================================================ FILE: config/default/WebAPI.json ================================================ { "config_path": "config/local/" } ================================================ FILE: config/default/mmx_farmer.json ================================================ { "log_file_level": 3, "log_file_name": "mmx_farmer" } ================================================ FILE: config/default/mmx_harvester.json ================================================ { "log_file_level": 3, "log_file_name": "mmx_harvester" } ================================================ FILE: config/default/mmx_node.json ================================================ { "log_file_level": 3, "log_file_name": "mmx_node" } ================================================ FILE: config/default/timelord ================================================ false ================================================ FILE: config/default/vnx/authentication.json ================================================ { "permissions": { "ADMIN": [ "!PROTECTED_CONFIG", "mmx.permission_e.PUBLIC", "mmx.permission_e.REMOTE", "mmx.permission_e.SPENDING", "vnx.addons.permission_e.HTTP_REQUEST", "vnx.addons.permission_e.FILE_DOWNLOAD" ], "USER": [ "mmx.permission_e.PUBLIC", "mmx.permission_e.REMOTE", "vnx.addons.permission_e.HTTP_REQUEST", "vnx.addons.permission_e.FILE_DOWNLOAD" ], "NODE": [ "mmx.permission_e.SIGN_BLOCK" ], "REMOTE": [ "VIEW", "PUBLISH", "TIME_SYNC", "mmx.permission_e.PUBLIC", "mmx.permission_e.REMOTE" ], "NETWORK": [ "mmx.permission_e.PUBLIC", "vnx.addons.permission_e.HTTP_REQUEST", "vnx.addons.permission_e.FILE_DOWNLOAD" ] }, "users": [ { "name": "mmx-admin", "access_roles": ["ADMIN"] }, { "name": "mmx-user", "access_roles": ["USER"] } ] } ================================================ FILE: config/default/vnx/protected_config+ ================================================ [ "passwd", "HttpServer.token_map" ] ================================================ FILE: config/farmer/Proxy.json ================================================ { "export_list": ["vnx.log_out"] } ================================================ FILE: config/local_init/Farmer.json ================================================ { "reward_addr": null } ================================================ FILE: config/local_init/Harvester.json ================================================ { "num_threads": 32, "reload_interval": 3600, "recursive_search": true, "plot_dirs": [] } ================================================ FILE: config/local_init/HttpServer.json ================================================ { "host": "localhost", "token_map": [] } ================================================ FILE: config/local_init/Node.json ================================================ { "opencl_device": 0, "metalsdev_api_key": null } ================================================ FILE: config/local_init/Router.json ================================================ { "open_port": true, "num_peers_out": 8, "max_connections": 100, "fixed_peers": [], "seed_peers+": [], "block_peers+": [] } ================================================ FILE: config/local_init/TimeLord.json ================================================ { "reward_addr": null } ================================================ FILE: config/local_init/Wallet.json ================================================ { "key_files+": [], "token_whitelist+": [] } ================================================ FILE: config/local_init/allow_remote ================================================ false ================================================ FILE: config/local_init/cuda.json ================================================ { "enable": true, "devices": [] } ================================================ FILE: config/local_init/opencl.json ================================================ { "platform": null } ================================================ FILE: config/local_init/remote_compute ================================================ false ================================================ FILE: config/local_init/timelord ================================================ false ================================================ FILE: config/mainnet/Router.json ================================================ { "seed_peers": [ "104.157.124.160", "108.12.226.21", "109.198.29.98", "119.6.178.16", "135.131.174.76", "141.135.6.172", "143.177.124.174", "162.118.7.169", "162.198.119.188", "163.58.65.191", "184.146.2.29", "184.71.194.234", "195.239.203.162", "203.129.18.0", "212.15.59.91", "217.198.130.81", "42.3.123.47", "46.189.185.59", "47.253.32.11", "47.34.208.57", "49.231.43.170", "66.231.154.77", "69.197.174.72", "70.19.84.129", "71.227.39.0", "75.172.49.125", "76.128.231.98", "76.232.65.235", "78.107.240.148", "78.180.96.7", "79.104.211.73", "80.235.212.62", "82.37.10.82", "84.215.4.105", "86.30.69.50", "87.118.169.200", "89.242.3.102", "93.43.225.93", "94.19.237.176", "95.105.142.58", "95.22.80.4", "95.31.212.141", "110.164.184.5", "89.116.184.19" ] } ================================================ FILE: config/mainnet/chain/params/escrow_binary ================================================ mmx1wlwl4tgfdjl5nmntd4sj77mcgfn47sapztnwaf2u2cqmzrcppvrqxhx0st ================================================ FILE: config/mainnet/chain/params/nft_binary ================================================ mmx1hzz9tgs2dz9366t3p4ep8trmaejx7tk9al9ah3md2u37pkesa3qqfyepyw ================================================ FILE: config/mainnet/chain/params/offer_binary ================================================ mmx18rcdx8nhh56twmr2gq3h22kwj00slsn23ejan8qp00rqqw8yl4jq6ccysq ================================================ FILE: config/mainnet/chain/params/plot_binary ================================================ mmx19pv69aafsdjrzg8fe7aj2svgx2kwq72dqm5lj36m5h4vmmhcuj8qn9pn8y ================================================ FILE: config/mainnet/chain/params/plot_nft_binary ================================================ mmx1cw4nwrhceunjd82tdcauy8yeg8ccygsrx3r4kzr8v35prv482qvqdvz80z ================================================ FILE: config/mainnet/chain/params/relay_binary ================================================ mmx199hvcn9fzr5r9wx9jd4ppzgnerqtt0kfg6c3cgz674y60sw7kwnqznlqvp ================================================ FILE: config/mainnet/chain/params/swap_binary ================================================ mmx15qd3lrqm7d7jyqx3rrwqav09n8sq2xlwpehq9ydxfn8peyh367lsxfsfqd ================================================ FILE: config/mainnet/chain/params/template_binary ================================================ mmx18z4ts7p5437st05zw0pl4geprzm5wt8ssvcd4t2jfkdfq4k6xc2qwc2dwy ================================================ FILE: config/mainnet/chain/params/time_lock_binary ================================================ mmx1g9h53asl8ekmp38ejr2kpuumxz3mw5w2yth6cyvj6qjuaa4aaa3sqm5lc2 ================================================ FILE: config/mainnet/chain/params/token_binary ================================================ mmx17pzl9cgmesyjur7rvvev70fx7f55rvyv7549cvrtf7chjml4qh4sryu9yl ================================================ FILE: config/mainnet/chain/params.json ================================================ { "port": 11337, "network": "mainnet", "plot_filter": 4, "post_filter": 10, "min_ksize": 29, "infuse_delay": 1, "challenge_delay": 6, "challenge_interval": 256, "commit_delay": 24, "avg_proof_count": 4, "max_proof_count": 20, "max_validators": 33, "vdf_segment_size": 250000, "min_reward": 500000, "min_txfee": 20000, "min_txfee_io": 10000, "min_txfee_sign": 10000, "min_txfee_memo": 5000, "min_txfee_exec": 10000, "min_txfee_deploy": 20000, "min_txfee_depend": 10000, "min_txfee_byte": 100, "min_txfee_read": 2000, "min_txfee_read_kbyte": 2000, "max_block_size": 250000000, "max_block_cost": 1000000000, "max_tx_cost": 25000000, "max_rcall_depth": 3, "max_rcall_width": 5, "min_fee_ratio": [1, 2, 3, 5, 10], "initial_time_diff": 600, "initial_space_diff": 100, "initial_time_stamp": 1737119420000, "time_diff_divider": 100, "time_diff_constant": 1000000, "space_diff_constant": 100000000000, "vdf_reward": 200000, "vdf_reward_interval": 20, "reward_adjust_div": 100, "reward_adjust_interval": 8640, "min_reward_adjust": 10000, "reward_activation": 10000, "transaction_activation": 20000, "fixed_project_reward": 50000, "project_ratio": { "value": 1, "inverse": 100 }, "hardfork1_height": 1000000 } ================================================ FILE: config/mainnet/parent ================================================ ../default/ ================================================ FILE: config/mainnet-rc/Node.json ================================================ { "mmx_usd_swap_addr": "mmx19c86u6ppjcw5cd4ghxzpzpf5zartly0j9q27k7pamavdt4mrg3dq7nujt7" } ================================================ FILE: config/mainnet-rc/Router.json ================================================ { "seed_peers": [ "104.157.124.160", "108.12.226.21", "109.198.29.98", "119.6.178.16", "135.131.174.76", "141.135.6.172", "143.177.124.174", "162.118.7.169", "162.198.119.188", "163.58.65.191", "184.146.2.29", "184.71.194.234", "195.239.203.162", "203.129.18.0", "212.15.59.91", "217.198.130.81", "42.3.123.47", "46.189.185.59", "47.253.32.11", "47.34.208.57", "49.231.43.170", "66.231.154.77", "69.197.174.72", "70.19.84.129", "71.227.39.0", "75.172.49.125", "76.128.231.98", "76.232.65.235", "78.107.240.148", "78.180.96.7", "79.104.211.73", "80.235.212.62", "82.37.10.82", "84.215.4.105", "86.30.69.50", "87.118.169.200", "89.242.3.102", "93.43.225.93", "94.19.237.176", "95.105.142.58", "95.22.80.4", "95.31.212.141", "110.164.184.5", "89.116.184.19" ] } ================================================ FILE: config/mainnet-rc/Wallet.json ================================================ { "token_whitelist": [ "mmx1gk9s4xg265yxdujagqzu4tzsy3gygycy3nksr9ux8qxj8hs6zgys4shv5n" ] } ================================================ FILE: config/mainnet-rc/chain/params.json ================================================ { "port": 10337, "network": "mainnet-rc", "plot_filter": 4, "min_ksize": 26, "infuse_delay": 3, "challenge_delay": 6, "challenge_interval": 256, "commit_delay": 24, "proofs_per_height": 4, "max_validators": 31, "vdf_segment_size": 250000, "min_reward": 500000, "min_txfee": 20000, "min_txfee_io": 10000, "min_txfee_sign": 10000, "min_txfee_memo": 5000, "min_txfee_exec": 10000, "min_txfee_deploy": 20000, "min_txfee_byte": 100, "min_txfee_read": 2000, "min_txfee_read_kbyte": 2000, "max_block_size": 250000000, "max_block_cost": 1000000000, "max_tx_cost": 25000000, "min_fee_ratio": [1, 2, 3, 5, 10], "initial_time_diff": 500, "initial_space_diff": 50, "initial_time_stamp": 1735823207000, "time_diff_divider": 100, "time_diff_constant": 1000000, "space_diff_constant": 100000000000, "vdf_reward": 500000, "vdf_reward_interval": 50, "reward_adjust_div": 100, "reward_adjust_interval": 8640, "min_reward_adjust": 10000, "reward_activation": 50, "transaction_activation": 100, "fixed_project_reward": 50000, "project_ratio": { "value": 1, "inverse": 100 } } ================================================ FILE: config/mainnet-rc/parent ================================================ ../default/ ================================================ FILE: config/node/.gitkeep ================================================ ================================================ FILE: config/server/HttpServer.json ================================================ { "num_threads": 16, "deflate_level": 3, "max_connections": 200, "allow_anon_login": false } ================================================ FILE: config/server/Node.json ================================================ { "num_threads": 32, "num_api_threads": 32, "max_history": 10000 } ================================================ FILE: config/server/Router.json ================================================ { "max_connections": 400 } ================================================ FILE: config/server/TimeLord.json ================================================ { "enable_reward": false } ================================================ FILE: config/server/wapi_threads ================================================ 16 ================================================ FILE: config/slave/Node.json ================================================ { "vdf_slave_mode": true } ================================================ FILE: config/slave/Router.json ================================================ { "master_nodes+": [ "mmx-th-1.mmx.network", "mmx-th-2.mmx.network", "mmx-us-1.mmx.network", "mmx-si-1.mmx.network" ] } ================================================ FILE: config/slave/farmer ================================================ false ================================================ FILE: config/testnet12/Node.json ================================================ { "mmx_usd_swap_addr": "mmx1uyyxl7xt8ev0sel7fh756kmqmwze0uzqemuz87560s9w5g23vrxqp4c7vy" } ================================================ FILE: config/testnet12/Router.json ================================================ { "seed_peers": [ "69.197.174.72", "49.231.43.170", "110.164.184.5", "89.116.184.19", "101.207.207.237", "104.157.124.160", "108.12.226.21", "109.206.144.194", "109.248.57.198", "109.63.193.28", "109.67.149.36", "112.193.2.141", "114.224.30.147", "123.112.214.2", "123.185.66.220", "125.229.48.110", "130.0.220.119", "135.131.174.76", "141.135.6.172", "145.255.12.28", "159.2.80.240", "162.198.119.188", "163.58.65.191", "176.106.160.193", "178.141.159.36", "178.205.93.141", "183.166.227.12", "184.155.122.12", "185.219.109.179", "188.134.88.65", "188.241.36.166", "192.168.1.170", "195.14.48.110", "195.239.203.162", "202.131.84.11", "203.118.131.219", "203.129.18.0", "205.250.162.213", "212.15.59.91", "220.133.2.109", "24.35.254.197", "36.62.117.220", "38.15.38.26", "46.65.247.3", "47.253.32.11", "47.34.208.57", "49.231.43.170", "5.12.248.227", "62.0.93.190", "64.254.187.156", "67.172.84.54", "68.5.105.231", "68.6.175.76", "69.127.154.48", "69.197.174.72", "71.166.51.14", "71.183.186.77", "71.227.39.0", "72.80.216.47", "73.196.143.58", "73.204.157.123", "73.205.40.161", "73.51.157.106", "75.100.41.233", "76.232.65.235", "76.76.229.88", "78.107.240.148", "78.82.157.212", "80.235.212.62", "84.215.10.74", "84.215.4.105", "84.215.8.184", "84.244.36.203", "84.52.158.183", "86.30.69.50", "87.152.18.128", "88.69.241.119", "89.45.186.200", "92.221.123.123", "92.234.41.184", "94.27.192.108", "94.61.16.125", "95.105.142.58", "95.22.80.4", "95.52.90.167" ] } ================================================ FILE: config/testnet12/Wallet.json ================================================ { "token_whitelist": [ "mmx14tmh82zku65h7wsq0hlt0xayzcjznvu8zgdat92lluwrvx9mfupsqenjla" ] } ================================================ FILE: config/testnet12/chain/params.json ================================================ { "port": 12342, "block_time": 10, "plot_filter": 4, "min_ksize": 26, "infuse_delay": 3, "challenge_delay": 6, "challenge_interval": 256, "commit_delay": 24, "min_vdf_segments": 1000, "num_vdf_segments": 1500, "max_vdf_segments": 2048, "network": "testnet12", "vdf_reward": 10000, "min_reward": 500000, "reward_adjust_div": 50000, "min_txfee": 20000, "min_txfee_io": 10000, "min_txfee_sign": 10000, "min_txfee_memo": 5000, "min_txfee_exec": 10000, "min_txfee_deploy": 20000, "min_txfee_byte": 100, "min_txfee_read": 2000, "min_txfee_read_kbyte": 2000, "max_block_size": 250000000, "max_block_cost": 1000000000, "max_tx_cost": 25000000, "min_fee_ratio": [1, 2, 3, 5, 10], "initial_time_diff": 20000, "initial_space_diff": 10, "time_diff_constant": 10000, "space_diff_constant": 10000000000, "virtual_space_constant": 8108, "reward_activation": 25000, "transaction_activation": 100, "fixed_project_reward": 50000, "project_ratio": { "value": 1, "inverse": 100 }, "project_addr": "mmx1cvc060jcsk3ywg36c5sm7zmrgth0ex7wp9s7jxvh4kgjgy2c90ss46rhwp" } ================================================ FILE: config/testnet12/parent ================================================ ../default/ ================================================ FILE: config/testnet13/Router.json ================================================ { "min_sync_peers": 1, "seed_peers": [ "104.157.124.160", "108.12.226.21", "109.198.29.98", "119.6.178.16", "135.131.174.76", "141.135.6.172", "143.177.124.174", "162.118.7.169", "162.198.119.188", "163.58.65.191", "184.146.2.29", "184.71.194.234", "195.239.203.162", "203.129.18.0", "212.15.59.91", "217.198.130.81", "42.3.123.47", "46.189.185.59", "47.253.32.11", "47.34.208.57", "49.231.43.170", "66.231.154.77", "69.197.174.72", "70.19.84.129", "71.227.39.0", "75.172.49.125", "76.128.231.98", "76.232.65.235", "78.107.240.148", "78.180.96.7", "79.104.211.73", "80.235.212.62", "82.37.10.82", "84.215.4.105", "86.30.69.50", "87.118.169.200", "89.242.3.102", "93.43.225.93", "94.19.237.176", "95.105.142.58", "95.22.80.4", "95.31.212.141", "110.164.184.5", "89.116.184.19" ] } ================================================ FILE: config/testnet13/chain/params/escrow_binary ================================================ mmx1whsrvcreuh086puc4jn7dyaxuhljzpp7eju8cda8xpuf78t74n3sjctwxw ================================================ FILE: config/testnet13/chain/params/nft_binary ================================================ mmx1hzp7su7e62c0ax9feyp0ef2rmdfx93xc7hu32xnhspqsrjehy5rs9fwfh2 ================================================ FILE: config/testnet13/chain/params/offer_binary ================================================ mmx1egu9gtwwg0tg7vk6x5huup5kx830e6588w8qu7kexj7ememg2mgq9xxe3d ================================================ FILE: config/testnet13/chain/params/plot_nft_binary ================================================ mmx1s7xtqedy4aq2wazhdl66pfr0ycrkhvj9460zfqgtpt5cmaa3weescvuavg ================================================ FILE: config/testnet13/chain/params/relay_binary ================================================ mmx1wx2z0d8626mjweez8j5um0zdfu3uwuvg2tg7fvuxfcezvk9qmets6hac84 ================================================ FILE: config/testnet13/chain/params/swap_binary ================================================ mmx1jllzzps6vdc43p7pnst3zn390p3g0c2gf8ckl5fe0eaf5yr70mms8663ya ================================================ FILE: config/testnet13/chain/params/template_binary ================================================ mmx1dmw9j67xsw50n9ax02u6khr64km84tmly35sjwz6ra9jakvav6dqqsn23k ================================================ FILE: config/testnet13/chain/params/time_lock_binary ================================================ mmx1m4gxzmwu7gthp7kl50v34yx555mejmkwaxcy36jy39k0kcxt32xqhznyqv ================================================ FILE: config/testnet13/chain/params/token_binary ================================================ mmx1xeuf6m70xk3n208qn5yncsnfunexg0862vhk9z9c479fs0axgvgsqdgexm ================================================ FILE: config/testnet13/chain/params.json ================================================ { "port": 12343, "network": "testnet13", "plot_filter": 4, "post_filter": 10, "min_ksize": 26, "infuse_delay": 1, "challenge_delay": 6, "challenge_interval": 256, "commit_delay": 24, "avg_proof_count": 4, "max_proof_count": 20, "max_validators": 33, "vdf_segment_size": 250000, "min_reward": 500000, "min_txfee": 20000, "min_txfee_io": 10000, "min_txfee_sign": 10000, "min_txfee_memo": 5000, "min_txfee_exec": 10000, "min_txfee_deploy": 20000, "min_txfee_depend": 10000, "min_txfee_byte": 100, "min_txfee_read": 2000, "min_txfee_read_kbyte": 2000, "max_block_size": 250000000, "max_block_cost": 1000000000, "max_tx_cost": 25000000, "max_rcall_depth": 3, "max_rcall_width": 5, "min_fee_ratio": [1, 2, 3, 5, 10], "initial_time_diff": 500, "initial_space_diff": 10, "initial_time_stamp": 1739216249000, "time_diff_divider": 100, "time_diff_constant": 1000000, "space_diff_constant": 100000000000, "vdf_reward": 200000, "vdf_reward_interval": 20, "reward_adjust_div": 100, "reward_adjust_interval": 8640, "min_reward_adjust": 10000, "reward_activation": 10000, "transaction_activation": 20000, "fixed_project_reward": 50000, "project_ratio": { "value": 1, "inverse": 100 }, "hardfork1_height": 100 } ================================================ FILE: config/testnet13/parent ================================================ ../default/ ================================================ FILE: config/timelord/Proxy.json ================================================ { "export_list": ["vnx.log_out"] } ================================================ FILE: config/wallet/Proxy.json ================================================ { "import_list": ["node.verified_blocks"], "export_list": ["vnx.log_out"] } ================================================ FILE: data/mainnet/project_relay.json ================================================ { "__type": "mmx.contract.Executable", "name": "Project Reward Relay", "binary": "mmx199hvcn9fzr5r9wx9jd4ppzgnerqtt0kfg6c3cgz674y60sw7kwnqznlqvp", "init_args": ["mmx1phzvhfh0ausam098r863hnkeqlulp7hxfte67czm86m5kmck7avsyaxgyh"] } ================================================ FILE: data/mainnet/tx_testnet_rewards.json ================================================ { "__type": "mmx.Transaction", "id": "F07579B58CACA3CBF7EB9A3BE2BFCB40D8EEAAFAAD1673504AA81B78D1D66D2D", "version": 0, "expires": 4294967295, "fee_ratio": 1024, "static_cost": 0, "max_fee_amount": 0, "note": 0, "nonce": 11337, "network": "mainnet", "sender": null, "inputs": [], "outputs": [{ "__type": "mmx.txout_t", "address": "mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "147412500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "142434000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "112554500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t49g9vz555dcm6dvrxt9hxua58jf57w5rmnjnaynnclww8lmagdqc76mnv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "96715500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "96108500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "85596000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "78844500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n39pyuyq8slux6rcrvpyfqr554tcytn7nfrmwjetkkryeww59fxsf8qvm3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "58679500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "51981000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "51854000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "49492500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "47925500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z9yl7zqwrfje5kc6j33kenvpxcyn6jztq8aq0h85kf6r8e0d9p0sumlzp7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "42749500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12wn9qtfzagz6z6ztxld2hka8cgvwr0nz55l3qjvkg0ayhhjvlscst4phad", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "39617000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "37394000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "36525000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "36007500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l3g7hjrczlhsvnshj4jtccavmrrm9chue6ha29hmdua6392mtffq2ddd66", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "34055000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31511000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ff5rqk4myqr32axrt500v0rh0cjp66uh5y0q7r4ed9xy63c954dq3ea3rv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30451000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ymnr2tt7vzcklrk97n2phwz96t2t2au64mjqw58efz2aatkex02qryjcxm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30404000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29701000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29456500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29443000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29008440000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "27208500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "27103500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "25697500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "24194500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "24082500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "22125500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "20850500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "19422500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15fpxwx7ah2d8wa0sknq05gplj90xpxf0xknweszyhdd0eacp4yfq2e43z2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "19268000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eaxnhktjt4yegapquud644nfkryfyarth7lwdxwdedg8xhhdlxescdxp0q", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18335500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18329000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18051500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "17674500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "17621000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16879500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1seel6072m4ywm84s0e283gl34drku8p764x7qmw2ae24pvsa6crs6eptk7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16847000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16791000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16645000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16kkntt0k2spk2xvxlswtwf40p02vlj97cenyvzca58ad8uav68lqfkkh9w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15854000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15080000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14819500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14707000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14642000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14622000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14541000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14163000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13817000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13756000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13737500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13280500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "12967000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "12738000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11854500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16d3ry985fdkgpvj93xygv0tn2wc9ylpex6t08qz0x6lat9km6dmstdhdhh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11843500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1da455czfvskaeewg4prqrcysxuzm0x5kgsge3fxafz3e6ddmvppqpyg796", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11696000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11579500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15098ny3pc66kn6sgr6t8jehvwf2yzcxm6lxljvr7dfxs3g4u5plssgudwl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11166000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10763000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10640000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fqfjglclexnmhlmr5lvwhqm9x6dqvm8cnsr4dpn4ysl5uzfcdwhss0xtp4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10628000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10327000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10208500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wcmc5n7v8eujvlzrtuga6fcfmk4d9yjcdhs0fmgenyrt6ycynjdqa6hh0w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10039000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9640000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9570000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9109500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9071500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8796000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8690000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8663500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8444000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8120000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8004500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7984500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7884000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7870000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7811000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7796500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7771500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7608500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kvyj70vfnwjwg6je8tf3dunrwrafy9mlm2wtgqx95vwgnz2mrfcskpydtk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7575500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7559000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7488500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lty50fwzq0wxaxwzxgjzt7y3r3mhn08eccs5ntz3y4sahd5jfxssnz6qzz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7483000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7439500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7326500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7189000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7069000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7062500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7052000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hm7d3gpykrggjrt5ckm987xdqkvtqrhac05rzz4e5gjg8m5hxmpqgcvv0s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6902000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kkq8ezuwsast9zplk8ec0pa0me6u3wydkrg5jn5daycgppy63y7s9y0up7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6896000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6863000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6835500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6779000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6648500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6613000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17grsj5sq8z9h02gnl92mpkajy6janxcnrcrg6mm3w5l232tx8j9sufzatk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6496000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6445500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6334500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yc5f9qcevne2cnp86szf4nnpaxj5kns2nzsx8jgg3ssal39k0cqsrsaepl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6330000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j3p8gtyajzh07ag8cv2y776h7axrwhvppckxxtltelz08dsaxfxqg6vlwr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6289500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nxd6hsaywy69qzx0yktv2v08yskmmq88nfy3l0shgfsp2mpr38cqx89xwm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6205500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6187500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6077500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5985000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5790500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5748000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5700000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5687500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16pnkxxv9mu42n7t4pte95ftduqz9ntrdd6u5epqnj5mkdn249wgsmkm77g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5677000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5657000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5543000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5522000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hl8lnr4ddyyqynx5qj5psv63ah7atfrt67s9eszlck5dy5yy9aysylv93p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5495500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5414500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5403000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5278500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5254000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5242000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5228500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5197000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5046500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5035000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rp6q7eh4zye6494jpq9j6ft69ku2lqqlx363d4z7zspv7wqfqk2skevrl2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5033000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4981000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4943000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4928500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4914000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4887000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4885000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1y0ream3up46cckzxl5tj0djvj7numxvrs2staw8zld5297xugz9szhfpq0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4876000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fheacy3c48nkd0vgukeuqtldfzuxh2qhudhytshgctqe7sek25jqv99qqt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4865000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4832500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pv4hhmymzfvyn4my5vpptp9rdqx9ex6y60y63tgaxre05f3v99vsq7uvz9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4741000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4732000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lghunzj070ysr4hd2alsujacc26t99zl3cv5qm03ttjaq4ugmvaqqfy920", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4666500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4664000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4656000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4654500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4632000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4623500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4591000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4580500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4499500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4465500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4413000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cvga7mz30hh2dnutxpaupdfr4kflug45g695vke7jmnl2kj6jfhs70rvcr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4402500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4385500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4365000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4357500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4352500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4345000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4242500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c0lcld738xys6rmr0wfyrtgpcvcm8szcst7w9c6cawgmpme6nh6sgtq35u", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4235500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4217000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4193500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4183500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4138000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4124000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4111000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4072500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10ewttsgpc2vq980wlk0ddtc505vp5edvusl8a388y76peautetfsyj3ej7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4054500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4025500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3996000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3958000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3924500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3922500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3903000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1as0ezwhva4ch25cssuzrv8hr2vk4fyt8ycefdtx7dnwt5rgadcps7ezzc4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3898000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3857500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1drdacsxd6ssaa44mauseapmf9cm0f8nah6tqpnw5hzs5r7vntafqqzqwzy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3792000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3790000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kq7xc88lghdv0mu62585fck3ppnlmdxn3jwvhqpks73wc8vwc82sqzyhjq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3689500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3664500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3664000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ujghjem0z63dnwrwa8tnswgn8uf2nn8gx26seg4te50wpfjw94pqjhktte", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3654500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eztxn269lt6rfy0kzkrv9ra79su4ujrua0ukxjxktdgf4zdqnaqsu3xfqg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3654000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10g3yj722j7psxapmpcusn3atzd2fd5r8pq5s9wmdszxweefexm0qzyjazd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3644000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3581000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z66g30cq7j7apzf29zmdsu28m5vrqw9x8m9jh2a3vddrxz7fsqcsh4gv0w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3522000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3486000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3207500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3189000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3146000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3117000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ygz7gwf3at3409ggncyfpsyp6cn0ralc4dhezcnkzsxly07x0tgs759304", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3091500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3091500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3076500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3073000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tdzqj2k7uw97ta3x459s7mk5jt2uh6p8znxl7f7u38davexzk3xs6tktrp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3051500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx143jvevjx827ac7xrc7zx59a3hwd8nvu52khqa4365dk8ct3zff0q2ee25l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2962000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2934500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2912500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2903000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2902500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2881500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j5qsf0gulds6ll7mm8aygj9xu52qhcaamadzak5k4c3smx9lajksjyvyzx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2874000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2871500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2855500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2848500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2824500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2823000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mjax0p84wdxsfdffhm5tu5fg3alt3zvam683qk0zu4jh6jredj4qqz6kk0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2794000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1na96yskrphrrswsg8rwe0e0gwpy4n360t37u6guxwa42a26wqa4sqpfm9s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2780000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2772000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2745000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1duvwvwf66cepnsng596tkjazant9t44v6fw7qv3umc05ehqcfmyszvzdu9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2649500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16y2cjvyxtwgkm5m0x2wy40g2lc59qcept4dqjakfygwghhxnsx4q5cg5xl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2639000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2624500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2623000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ehmcg3t88xt37498wtca2geh2r0v2tzlzagk2jp5stc3heey0vesjefjzh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2604500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aeaukjyxfu6gk38swf6s29jrswc67nkra3n3wy5wsxt2fqmvknqq44kzkn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2589000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2565000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2533500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2485000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2468500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2461500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2448000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1js6nrvnl94rcgn8k80dx6uz2da2jj64utkrxqhmvcvuescmrpwwsvh2vna", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2433500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qq2w4yktpymxyhxck2s0z0grp8tlh2l5evsceycvx9af0x3xxhysd536em", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2429500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2421500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2412000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2402350000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2391000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2383000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2358000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1veepntjet7j6lw2sfx4p9e05day63l65wj2pa7g7cu6rusyzru2qktg3rn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2322500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2297000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2280500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2218000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2214500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2198500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2196500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19tp63ptrre654er8rkx5ntgt4z048tutqx4yplu7daxwm2tgk2gq8hp85z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2187500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e2md0mf5cu5uxmme0hxt4apxg9nd7elstzcr7v393nxmgm0rvryqlr557x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2152500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2149000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2144500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2140000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nwdefg4c7dq34hhvykfzl2um6d6phkfqh22pg5d2q8nderf78n7suz5x6m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2107500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2092500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2071000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2071000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2069000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17l3xstvyx5rqxzqvswwvf27zz38ckt5q2030selhwe4elqzwe4hscxf06z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2064000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l0hpmq7hfw4l5y6hfrer0xc980a3mhazzyc82eycvjaugj2d6sgqn349gp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2063000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10vl3ux6k9680dmv3fv6e2c3d2yamrlveshxfvnemlv2tlhxan8fsw5vq30", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2034500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2005500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16h8zlf572dedtskx0krrajcrt6d86s0kgukd4rnm7ae9v8tmnvmqhqmdca", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1997500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1992000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1923500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1923000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xthtx2n39nvvjrrkfpshq2v6hltn82h36dnxyg942h6drj2q6snsxx32gu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1912000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx139dxs6z0y9pgp2z4f9lhx8mczfhl6fenrlcpwefv8t7eklktwqzscw26ns", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1902000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1891000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mzq54zkhcrww85glxx6kaqeeeeqckrwy0j9d377epmh7vrrssxsq8fel5y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1870000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1837000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1815500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18d8335fhancnvy2zs5wsq8gvcp0l57n3pejex92ndg6s6s3casaqalq6hf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1810000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1809500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1804500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1800500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15qatp4v00zymeq92dmz2sfee0twh36n7vutwp4kcjhdktye8zkjsqftneu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1795500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1791000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kft6gj0a0upukl0dy3qlakx0pm4de4538v92l6saa79jsqkswzcqhjtu6e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1769000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g9fl4jus2fumcnkw0k8w9df5cln8yukhrk3kzwuzk5rg68ndmjyqftzc4p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1760500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1746000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1743000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1739000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1724500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1715500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1682500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ahnruulrdycd5dr4xzjyymxgf7yp8n90r437ynysr2gz8n2vmpsqxk3kev", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1680000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qfvy0zcwu0smhdtkkkygyyasjf2eplaurzkq2m2l4ngrnxgy0rpqq8swwy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1671500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1669500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1626000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1622000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1umu7rghe9664www8lutl5fa03zv9c2gjwvv4ja9w7540zvnuuxvsyyf63z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1613000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1611500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1610000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19taynglsa6ewczfug4pds0qy0cwstd600hwzel8y02dtn2k2esyshsxfa9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1604500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1597000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xv2dztq36sk27x79gdja33zk6lv8cytmjeqkvlux788rd55l6fuq09zq65", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1592500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1590000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1576500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1576000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jmhmzwudwu3tlhq048k7nuc0l8lqgs9amtnrg5pc75j6kl6rczzsuqxsnj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1569000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1555000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f4k5ajf9dv0jfuw28xh9vzhmvuphv92dd8mfxxdzssverwfe9p5qdwgc8k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1544000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx107aackvhak3d2lapgz6qprp9785qfudzrclptqzvgkpzly2ppqtsypk9kk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1506000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13txgtfelvrng6mfjyk84sj74lrl3u7v05wn59659sg7ffup5f8hsl4nhzm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1494500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1479500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1470500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12q3pverdv5c465fjeryz5uxnvcjpacnfanynclgq8g5fwj77y9ss2r84v0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1462000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx127sjp7qqmvy2grl0wa675djhjll46pg5rt794cvdp6s0gahg0asqav09gt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1458000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1457500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1448500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1437000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1435500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j49546jumejnzwpq4ptdal0acmje45de4y9c99pjg5kglmazrazqxex7qz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1429500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1428000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1422000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14dze6kxepm2ensphv2z0ejl4kc4hks7gwajnjr9nfpw6glnqc4fqz53s5m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1411500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pjmyc2sn87gs6xuzaq9thr9y4msqtcgd379cecgywn2684fhcr3q54zr6y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1404500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx193xsayg8rsy3zr5knfkc89hngtyxg2avkaykngh6gky92tatgseqppclmq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1404000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1402000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fudwe8xuzgwraw6fe6rylklv69x93kqyrgu82jf3tjstsgkm8xrqtc850j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1397000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1387500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1385500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1378500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1361500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1361000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1359500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1359500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1353000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1352000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1349500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1319500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1317500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zngflag3hu0axh6r6yutlqxt9r7vwd3fh243frzz5gtmfysqeysshp5vuk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1302000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1295000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1291000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1270000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1avcekqg5tnavcwyw7qs97809yzh0nzq5l9ltyjljelygwxtp40esgyw665", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1267000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1264500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1256000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lntqvyetpdaqzkw4f9hqhuh8kkf3f7u3rl96gxz3lgztfptfaevqk8elws", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1238000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1225000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1216500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1213500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1206500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1194000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cthy5xra5u9kwcdgp3z0x55grrj4xv585g69qath07dqrejrct5qk9xrck", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1166000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wkcf225wca3efgurwphhsw4z0wqss0e0lwsenk8r06yvymp4dacsm2gzwy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1152500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1144000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1140500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1139500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1136000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14ntt0scarmrahc8dq3xfdwqqpuxddh6ez2qaq4dcdyyw0acwuevsumdgvh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1135000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rc8cv2t60pvyye2mylydmrp970nawa542u74894ejgwufzg7lycq505pp0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1130000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1115500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1110000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx139s60xj6eeuj5s0fvhgea06up5yy0ucn2fayvg4fd90xyeq9guwsv35zcs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1106000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1097000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1085500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1076500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1064500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pmecze7k5a4ld66auxywxljxnsad9ducwgzmy4q4k3d6ma6gr3tqtkfrnp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1062500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1061000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1056000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rgf2v34pnkjtzg09snd40cd5262dp2hde4k3tkhcjyxdfh7mf4nqx0cf3k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1055500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1053500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1049500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1047500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vcp6ksuysun2pdtkrukz6lh2dd7g0d2lpyjk2m3ffylq0yhn4ntq9fpmkm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1046500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ug0nljja9d525wv5n8z79vgdjh9vxpf5hf57r2gyu73cm86pcn4s7v3ccg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1046000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jghsp60cua83ekgw22a905pv8qqsukjjnz4nw9gkqlllspmsfugsxnremv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1038000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m727l7tyw3u8lhnpqg598yns3tsum2n43da05psyhddgzqcj80vq5u3fhq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1029500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1026000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1020000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1psgwgft4tf7ult8p4e5gjp9un75t6fyzaxmhr9e64lmd6lf6kgcs53s8uf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1010000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1002500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "990000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yl78ddxpjz4zhe0ypy4jzjgt0kgle2dzhzm4f38wlwpumds6xrpq86kel2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "990000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "969000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "967500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx198yry5ttr65tnmftf4ppzjwvxhqngyncxy3sq5ucz8edmsg5umwqs4u2zs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "960000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cqgrreu8yptcvyufdussnfqxnwv05z3dqaqu0n5qtfq82n4amajsprkzal", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "959500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "955000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "938500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "934500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "933500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "933000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s4zvd257h9xqntzj7kd08wnktrzuk7xlya9ttlv2dmkxk79ykz4qzvmjvt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "926000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17vr7dm99pccp240q7kr4ynw0tln4r6h9n34vc9dcdk7gch3dcqgscgaw0w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "900500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18tcgc6fe94f4qz9007v53k9mvv29rvtp7mef0wvqh0vmmnadhv2q894jq4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "897000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hfhn035wpjnm6yhl223rh55e85a23ksp679ku6kpk2n7klxxaecq4xw57p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "893500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1td9zpd4vwncrlgy8kkgft4vkck4yep5nagxr60anls4vrlvs88ts964kg5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "890000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m7uycpxww03cj05zhdgzjcen70kv3pd7gwsk8grcdtu9ltch6rsq9plyz8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "884000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pu8fla0axf3227ttsxggudd6ym9u9vs7nwcrs8uk799ej6yegvlqhnjkd2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "876500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12v7y2c99f25yntuk0dxpu4kwectxx62l7hvqsj4acuvvx0xsrqfqlds5l6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "867500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kez0lk0emjezwdl88ee6c5lvcqftu7l32ksqgl98snkdzke9cyuq58fs6d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "863000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "855500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "855000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18csvx9uspv3mp45autfk4dj0t4yzvzyce63gv66nahaq9pct73ys70ezu4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "839000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nqkt86wlfpkvjylyqdsy4pa2e024cjpfnczt667tshtsv7uh6g7qd8dnel", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "837500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lc66qe65pw30cpt5nvjt2apsmtcut80jdv8xgx3wq6d4evu65wjstsftsf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "837000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "801000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "797500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "797000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "793000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "789500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "789000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "783000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "769000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1090syeqn56ezxh9tzlw2006pqxt34ytn3ytfrkxaqaghh40cncwsya49ev", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "769000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "765500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18a9m6za5h5j0t6qgs55fhtucpmzse94aq8z9xjj8lpxhyuemsygqhstwmm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "765500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "762000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d4580utep9epx933mp6666886cect39qt9dl30qwxj767fkxpfgq9h6y3l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "759000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k738pwqe95qv3g8z9y0lhxsxgvf4z5dv0qgq9eh6vcy7u6juc5usrhgpsh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "755500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vkya64sext8u0kcj2fsrezryfvxyprez6xdxapkzpcywakxh7v0qu63esv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "734000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "733500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "732500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pangjagnfffhfwpk265ry6a3zch4rs2kgp2rup7pwtuphgmsls5sj55j2h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "729500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "719500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "713500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kky0cu2dauntftsk8a55rdche6kuhm227qt2ktfsyrhvu7v4yteq8rg4d3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "711500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "710500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10p75878akjmna30s8kjwnaveql56v2a45tw20fw86ruhvc8x5pxqrqemq9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "710000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "707500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "701500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "697500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "695000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "695000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "688500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "678500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eskq3mechm032urxq0nymxa4nx8tn56s626ftknpw4g2edppag4qfdfnpu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "676500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "674500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx188uhxreda27mxl6lth04vl5y2da7qkldg72gvalsth7dkwxeh23sm9juwr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "674000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "671500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "668500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "668000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14tkxv7wnyfjm45lr03j8r2qac5hsa9mk75emunjg78qngwgw66essvzga7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "660000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "655000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "648500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "638000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cgx3ck3dmznw8xg78jc9xfcf7rws0yrkhpj5tymnc25dteduu35sd6p92j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "637000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "634000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f8yps5v4rqakx3gyws5hhlrmapcjzzf5j80dm655ehcrf6qgz36qandk5l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "627500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a0lmcmccnm3ak5n82mutjxyz9pj5radgw92qzudnp4eucts6awgqym92mg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "627000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx187llktd264wz7f33nqexhh8frcykztdg0emw5t26cvmzfng8dquqzl8qwe", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "625500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10cj7u6uvj7syxwdjzzu5wzf6tk75mcg8px09sm9fas2u3le48q5qayp5gk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "624500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "617500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "616000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ywsu86chqesuxt45aktpkg78v7we86l0zf8xa3rcer6gn6xw8lnqnwk5tr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "615000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kyul6v54l7jhjr58e5lnqelmwyaqdy4mesqwr4wfw4ku3mvac47qk8qcj0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "614000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c5txaqqwf9ayjvyehy9u06cawxfwtctzk70e3eh6pm0m3aqcrqlsjr54jc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "609000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "606000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "605000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v5u67yws0zlnutd4lw0gqk8dk75xnjj3k87rnzjqurx3lpz7aflq863r48", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "604000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qxr2rcnvgcwvs3304d8rlm8kzcg3cdrfdnrp0vq3t6eku4g55xtqw8kd9w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "603500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "591000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "589000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hgvgalxcwyssgs5gqsttsfvmt2297u2hw4t7cglllnvswkhg6xuq285wez", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "586500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e2c8sqytwagkr6ekc74p7sqhzd39g8a25d2k5fqj5gckmrk0xdlsadufvm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "586500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cg5zspl8na39un48fm04caj4xpphaerynw53vnjlwh42f528ns4s53jjv4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "580000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "578000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1twps3qw5uvrx8fxmha33guk7p60esjyaa3yn96ju6drhn2hpeagshruvwk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "575000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tyrnks330n6exxr84vz7d0mjsmpey8p34kuzy07g4nrc7txl87ks63zmhn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "574000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "566500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d0xr746m7nqek3rplkuv6xjk2ne7ul0q45cjgp8gtjkut4eh8apsht6yzk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "566180000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1grclm0x96ccghh8574wnk8wmmee7g8sxt2emh6mgedezdntecsfqrtaz2t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "558500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14ecmst5fxu52vry0k6zy9merf9m8e38d2vsw6e0kfa4z6wkptz3slcxcpz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "557000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "553000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "552500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "546500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1geumptg36crcywp4tzfqeameymf7x9a43qqde9mrpaqxqjernlxqytcsus", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "546000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "544000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "543500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "532000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p27mt7n0as5pmzllk5342na0zjemu7xcylp3shlucvtdhjpeqxxqvgcnx5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "526000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "523500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qc75vu9xfagl297yupuwl3jgqsecwlae3szn9lwpg9m5p0zcnzwqe4adsz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "522500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "522000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k9mxrjecdztfeggk2v3urwmkeg90f8dyq3rqmlxxag0ewqdpv6usvk2rqc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "519500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "519000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jycy47p4up4n073nxn85tkem6qmtwpqjjm3k5d3nu4v22w9h6jsqen8hfx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "516500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uwwzqtkhs2gv6gfja6hh8p2lhxtrv066umxq3nkccfqs4g3re5fsz9y55s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "513500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "512000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t797wa3smaufhnhxqpql52tpkm80t66ensrsrdf99ar4h265xjssjsucdx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "510500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cnd5cv200efsm7q85dxl2368q9ymcyq4ry5akgrmn282jgdncg0s8lrgsv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "509500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r2su2mtnjuk6t5q33au7609wn2pajsndupzh385r3s5guvpfclfq7m6n5p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "508500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "507500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "507000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qh002xzjsedzpuzqq4cz6spv4qayuwhyt84j7pd8zeylqwl0k2xsnhg9y3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "505500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "497500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "496000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gxx98xmhrcdv4ez5fxekmnczvwuqns3geh3wcj9l463d5jgqcwjqv35gpt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "494500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13w9j9lkwrlrqttpnxp8atw0gf9x5jrq8my08m2mrugdrn2rrk9ls8k9j7x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "484500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "476000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18plakxe6gzc7frl7mke9gfhaz30cgr40eyahtjexsm34kexk0dhs4cdedg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "475000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx123qaxyt562xlfdxn7fg52nxx9aq6gp8q3jn6kya98xmn7n0z62kq09hk9k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "471500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "471000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "470500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "463500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hsxpdkzeynjv6dswp89klcu6qc8gn0vghz54gcpa95z0m5m5p6ms64gd99", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "462000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "461500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yjlle0sar0k24juhdv0krzty0qkha6asdjds0d5xvp7gv6apa0yqfr3grh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "457500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "456000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "452000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "451500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "450500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "447000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "436500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "427000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "426000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "422000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c4sffu66s9eepqph3kfjarh4fp5h5dhl3u0r8jvrqlq4jkdp3sgq4dcav7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "420500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1chmqhg48plemff47t5hrc50p7sk809q337uvwn6385cdl8y8a2jskzzcwc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "418000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "414500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hyfskfa3wpxgtajdfskdmgljj3tr7wna6jyqxqdecdeup5rgn24q4e4x67", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "413070000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fk0jqxyz6eh35qnlu70gx58v6ahgng29e4k6zjf6tqxa96y7p3gqu8w8qq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "412000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ms72mlttvspj4ga668t5xr7k8m98eedvvdwdkmwjfua2ttdmj33qvqyp7s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "412000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "410500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "410500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15sme6pzzgltj9hn9s5u4xjtmyud4qx8pd2kgvj8hsymp6amx0wnsgw9u27", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "409500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nr0cpl0g86e0wdzuahcc2x7f4pc63n2y6a6zpnsjt5lfsctzmufspp6vd5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "406500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "405000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10jqs45t5ujdwtqyft07f4mxk7y08fac4ks0z6ee50n6fkq67992s09ezzz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "404500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "402000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sgquqfayd4n86899hjxr4xg5z066jfljxj6mjysns890vpckj5jqt2h9t3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "395500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "395500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1za0yful9pmmgtpzaqq64s9u7nclhrkfw0nzjg2wuvzng6yxex67s0sk7hf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "392000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1998n5nlledt8puwx80neyvle5xkayw0uvgdhuwup6gtpzd6ym0gqp5qzy4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "389000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1efmq0tdmmpv7k7dzd8nn5ta045f9fdylk9pa848hzshh82zlxf5sganjdn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "388500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "385500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19ud3ev0q0tcrpsmh05tggwt4n2nkwrzrrtuwtyv0pl2t3t9w52ysy954ch", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "383000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "371000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "361500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "360000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14fz0p5ff557c6sh6xx3ssztc8sv8a023cqugskep0vm4j85rna0s7fu03g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "357000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "353000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tsl59gk2ahk0tkrcwnhnjh2kcnfnhyljt3n76h0cu00ael973k9s9dj2aa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "352000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "352000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hwq6ezh6zgc6pvadxh343nnhvenc5zw0lalx4la9777ucv8lp3fqnjpwx2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "346000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "342000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "339500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "337000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12j2e0ja3z0up7t0csl2fmm52jd9mrc29pavccn67uhadrls4457qpv7qls", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "336500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "336500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "324000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "315500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "315500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1998h39fzrpfxvgc54r0fmmuq48hj8c372gradmy2x6gq7r45suuszqtk3c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "313500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "311000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "310000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "300500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "292000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mhp72cd0lfnlfpfuclh9p6uqcuu6y0cr4cx7qnk266hleawuyuxscha8vw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "291500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "290000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1an3w925endfhcg50qelq69ahwvltupq4rt7wvnhfqd8leg2526qsgh2ret", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "288000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14fadj8tx3ksq8jvfmcsuhxnxmmn0lqdlpjs5rs8dfqphgsuluqfqxgys6j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "288000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "287500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "278500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17g6gp5v6070kcjcq0tx0u6ahgqyth4gq9fha3sgsvdwe8xn0fj7sslsft8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "277500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "277000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h6lg70tzjmvsucw3c7mmdf98p553aj0hfd6sl7nekq4yucf4xnssd7hudq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "276500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "275500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "270500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "269500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pmjftgdx7vsmtydypwy6qe8tnmtc9wgya5s2yl23myvk98c83uxszm6cvd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "268500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "266500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx168f4qnz2e7sugjdv69keaqp2mswys30sqpyskuqmzmakqyu94d5sgt3qcq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "266000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "266000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rd9psq4y4kt4svwhkvsj6aqvrgwmf6t2qen6yfc9fw6thzrxt4aqmjvmvj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "265500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lnmtuqh7jvxjsmmsf92ulcavxtr4fjhzva774zhs0fwvctzf7vgs53cn9h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "265000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "262500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cke885syq8wasw96nqp9cuh6wcr7sezvy65a3anjqzqhk59j9s9s7jl0gt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "260000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "259500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p8dn5gxah24aaufh224nw9ze4e02gpu7enmc057wf3nqxef36lhsndl7cx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "259000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "257500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "255000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "254000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hqcfqu3r7larng7g73jep24emu4kty990jecvfyugjuwp5n4acdq7wrxdg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "254000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "251500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "249500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx122x5elltrsykqwy27q4jpe405m5d6aaxtfte87mjl6zty5e5ju2q9ucfz8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "249000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "248500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g4uyjjhup8hgk6akrjqvegmxu6xg98er5pt5uzqn520ud87rlgrqjn8cvt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "244000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1arre93x7eupag0a235927awagqnz28x986tke4cqfcs667z22t5szzd8et", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "244000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vxygt3x7vzn9fdyz2rj0jk6xxelqedgfs6v2qhvlrfjy3nw3pp5qckwxcr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "243000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1avg4dzcn06t8a7hshveyekaeszh7y809jk3dneu52sx97vfal69qk30lh4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "239000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "237000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "235500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "234500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x3rjuxmvmcm8x7eaqjkpxxc3r9nudd7erx0g5uffj687vvx62g3q9gq8ed", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "232500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pnpxvslglu4u7qnv3cwz4x8vzcc5y9nnlhkczkuzyv7995dz96qqrvwdrl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "231500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z8wnphkp2d50k2kk3f30eyxtp8h69e3pazzawvwtseuuerld339q904jsc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "230000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l4nf9stg5qzuecmrfvls5wgtd8l3mdgwedcwvu5eqfa3n3pektzs2l5gvk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "227500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "223500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ls8zjlv2t0prtqvuy4pkasq8a6axrjythsu3nvsne5uzmkk82clqh28yvt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "222000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "220500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gmvuqg5x4tn9fj53vsgahgwqa9h4jx0cz4x7xpet67kxu8n33fpseycg9t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "220500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "217000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "215000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "215000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f2jdndglt2mvq37tc3wp8gtf3l3uql0sn485x80096m59y0ydl6q90ds4p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "212000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "210000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vp6lfvs36vdft6ljgmvpe7049dygsl4nqy6pvyd090huaq5m44js02y3zw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "209500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "205000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "205000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "203500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "200500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "197500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "197000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "195000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "193000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h9ahw37ekqwx5sewaszmj54cn0l0pmzrksss7z0320ntkt63q6mssrfkkd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "192000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10783gzrqc88k0n0ert2nkjz9ams2aj77ux4t0y3lsmyexnue2h0qem44ac", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "191500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx120v9ahac98w3rfj208xsf7rasweaesz3n7dtgt4f60upczzs3vsq6d67q8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "191000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "187000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "184500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1azdpkjrjlm5v300uknw62m0af3fm3uujupd5zq07gharrx75cj8sdnh0wd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "182500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1um9jpra87stxs84lldpz0qt25tkxh9e7atmpula5m8kuu5gzszfskfa0r8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "181000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ptz2hwskzvmmwa6a3zxvz0hw44uk4xkuyz65r92lv0jnty7tgwaqvhy630", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "179500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "179500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "178000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ze8ugap6cs90ec5tguyd9hg9g2xv7fyrz6s78ewzlsk7uwn3pvas3dnmt3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "176500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "176000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ryur5srud4qgamfq2pmfggw780m3z2mlja4665v7f7mfp5dejyfslp6smy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "176000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx175mntfhx53xw93y6e7g228apv37j7vwt23syhtwnc3h0saptxxrq9mt0c0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "173000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "172500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "171500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "167500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "167500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "165500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nnrl7rh9r8d7xtxr29tgq7evywy8nvkh45w66f7p7u7tesct8ypq063ctl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "165000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "165000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "163500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jkajyu65wp0klsuyygjs5425tyq3ujffs7t7g6wgvxa2r4arrs2qqs99pp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "157500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mg56jxv3e0plu76824vw3w72kqumgyp2hetfg5s227lr96vjzd5qr4gxnj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "156000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vv29ueqjqtr7w7wk9vhw8txgh7ye26zgue93prgnq7m8sp7hw03sdwatcr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "153500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "153000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "152500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10gntxs6zapmxesqh6mk5ujdxyvkada4r9pg4pcw7s6rlr88yvyzq8hsjzd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "151000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "150500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "149000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "145500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1anyf8dhv7shc957xt95ujj6ltk2hmmwhl7hvftw67ph3uf7w4ulqpdvg9l", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "145500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "142000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mk6v9wmyju7spyncrggntg4lm62g0ensg76yjgjhdtnmpls3nr2sd9qwqp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "142000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14xzen52t0aecda0rtqea2zgzrqsf3xlnsswt29uyvrf2qhjy85zsfderjr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "140500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mcxgagq0znvmk0g7dqvfa9ewj2qwjxhysrna634prhn89nmgknksn8ufzx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "140500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18jk3gsj6r4y3esc22r0qvxru79ues6z7keha33ahn5tgahxzcknq48ler4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "135500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "133000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vprl39d98qzd3u5nk95qnhus9vjp4sen2w7y59yu0m5udqll6szquzr6y5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "132000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xc2gg83p82xgxdg90kn3gud6grm4dwznrna2l6k80l8rzkg9yzzsdmf32d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "132000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "131500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "128500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "128000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zxfqw42gfax4wm88lvy76tt6et99pmd7vdjhfehx8jnejr2fg3pqmcvq8w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "127500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "124000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rjnt6cet0cx3m99afq29ssmk8vagnw3qvzrn2h38aawvp023emrsvskald", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "124000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19398nqhvlk3t79afq0csx9lyg6j0utftw3862295ue4h4tjgzvvsjt3pcs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "123000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "122500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r3qvaeqnpp5hmu7tppj3pkgwj3pm2rnsrttvzck92uq93vspq09s7jdghh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "119500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eymvxpnp4seshcfn5qfctlzsukazt49t3m5zgz9q68g4sry89cfsggxcfa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "118500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "117500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "115500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17naccyvydtmkgnaqvu7q3dpphzv3grdsgm0fk4ja220v3nxwnywqwss094", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "113000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14vvf5wwml9crhjcl7easevgykv0tar33364rhta9wkna4470uuhs7e7zs0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "111000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "111000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ynae9xlz4m0ec99702l48stft3m4kvwwz5zx60zwexhnpyhp8srsxam40c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "109500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kn9t8m4uxn7xpqpdy34xhxrdkuzs5tuhjqyc8qxw69decxqgtcns9yq940", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "109000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "108000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lpm0wnvfr4l07wgvfhhgzfgy7ur5jf5g3h024gln5ykml60nr8us9wc7tg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "107500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r5e7qrk323nmr3jhazwr3adu4v8n8dfrh3wvmx38ptmhv7wq23cstwl09v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "107000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z5zgrrc2l37fg4cu6e7s80qyxm72fcw7xhfeep2caahptq7mdr2qzcl2xj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "106000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m5zcq8hazpjhxc54lk5hma3arvwtkpfgseahf79yn0ytchv364xqjza394", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "106000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1njy6t7vkta3veyjj4atvr6ppmeeru85tgh5qvhvnmleslru54m9sqp3l60", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "105500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "105000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yht9eg80753876sq3qjljn7nwxl300g70rauqran8qkvdtrtqzvqxkdxq0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "104000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x4nlvf00jq5cld2tamnnssnshzd2v9gvtp2yjun60qgh2zj98kksyxgrh5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "104000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rh2lur825y90gqc5pxmejgk5d8wl934h0v8lv972rnevrfhpsmcqsqywld", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "104000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12n7hafkn4tfwk8jta677lw48092lezrx8vgwn4t7ulsweeg6xftse7e5s9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "103500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gw4n8htnqwhunjyypmcheushazv597xama2tx9pjf8zrsdq943wq8luz82", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "103000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "101000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "100500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v8ram2hhzshqs55splpmpwsscfz2m3z35ajssnasm43jgmf7h0aq6sfx4m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "98500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "98000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ehfcm2ggj5hm8fe4tu5dcuxpg7u4rmedus9thyzmm09995xjttfq0u7get", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "98000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "97500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f9rjvatrgqk6fyyxc522xrt6h9clrlvy49nx8swanx58t2n4g3rq9nwszr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "97000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u75x5wkrse550ag4nwnesaaqhvr3js7vtqh9r3vt0etcxzqu8z2s7u0d6h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "95000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "95000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15drd8dvlexsa460klqa0dqlluy0pya79z7lnkvj08zgzuncnzt5shqewhm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "94000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s90ctrk4g65jv9l8zcysjev9ms3v45uvktp5k52l94m97q0gfpeq886vq5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "92500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14ljuxjzlu24djfrm2varlgvfup2q0keydus50mrv6qy2qpuxu2lsmm8gza", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "92500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "92500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "89500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kn0k496puu64hyutyn6augc2cj52rc4p0vmmfcceqezp2y5kfv0s6ddymx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "87000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uhw0fqjy4v9stnzuc5fjrelvep597jx95hcm9xr7d0pqt32cenms0ggwv3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "86000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lan9judvg8w56k94gequv9k6rmzr8kwmq0fk0vh2k69muzjpauhsszypcq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "86000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "83500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "82500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12hvena2t6ame3sh6xu2l3fs43qq9t7djnlt00jjyssj73m0e5eks4f5vcc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "82500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cx85le3wwhvxmvhapwdyp4tyu875xx4r0lxjtk6rj0dhgwdve78qru9tfu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "82500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k4rx2e7w5rl8jzs96hwj0hussljxc7tccyqng80r845uf4da9wcsat3pug", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "80500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s9972ypp7cgngncz8au8737jw38rswzyc4x26u84gr4jk07q8s7qjaljld", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "80000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "80000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c2jrdpa796438jzxxjw3y68tepmlzqv3e4a28d6t52juznprsm7qpwc0fj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "79500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m0qtqx7tvpw6rjhsmjnpr8dxgz8wyx3hypcg4qw5trnk34urxwyqxeym6v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "78500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "78000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wtt47s3lhpsu4nxfyvzl58jpslpnuvv9ymd0gthaxpern3yer20qjykd8r", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "78000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10vkwltacvwvguxk65jg79d64pnxvr5jpvxmd66smnns7daa6xsgqu045qd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "76500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "76000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "74000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "72000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mvlerkhjtrg0qapvxgduxnw0ucm33pjcv6jutkhf82ampzhaewaq7ym4vt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "70000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "69500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qn4ugnczkfstu5eh7quuzce30c03uv3etl8u7m426zrpshxpdrvq07f75y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "69500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "67500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "67000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "66500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "66000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "66000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mhhmm9rsxk4fv5y9feft68uj4mrz2c8m33df5ts7ve6uz9xj7geqgqxd73", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "64500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16cnha02fp053dvmxltjgluwjw0fdedpmxj5x72z053pwt86fgjtq7er08p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "64500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx164hdypm0mgekpt743z7xu7vtm5w80hysnvgld66zr54gvhcwm8aqrsk22s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "64000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13xu3ay8eujt4neuwyhxw002r6qlj0v5p8ldj6jus03ev0w5u7wpsxdd3v9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "59500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "59500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w0nzjd37pkkewp6ntwfcc39u0w36723amrl2w6rc28aer3m5yexqlztrjy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "59500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "58500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "58500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "56500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ujuywt50nv9jgt4tsu32mcgurtlu9zfvjutuvjk00d5k8peagwwq44fmqv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "56000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "55500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "54500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14emrk4d8vzp3c2yztqrzhnmy8r9tsnywrpmfrl838q50j0xjenjqay73ld", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "54500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pv3lnp3q5kgp28u3w3zmxreft85a3mf4v3rk8qazpxnzwe7ykays5tjlwj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "53500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tw7lny4cxss0ks67wxz272y356nvgzl2ff6stee4x0muhr9zv55qs85vdy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "53500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wsazxs68mvqe2j0gcpfaqwczn0277586r60vkap0gpaklcyhakfs8wztsk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "53000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u3u8jn5824ema7zszlz8wuww49dz8vf08jd7vux952saltvx0l0syu2qzr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "52500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e0vmg4kc5ed5t85p2gjqrgql8ujrar0t95n9l63xnmkacgxv7gtsum8x2m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "51000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "51000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1u2v2uf8seke36nxtxh90hpgh43dy5py836ygkvqwaqx5jhck95ysjepx8g", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "49000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1trjmkvfv40ngnfmvc5uw926gw8fndanpnp7mphq2tgqwt4xdw62qmrvn3a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "48000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "48000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13k0anxdyn6e27hful6t63mugrh6asm8vphxe0rg57a0p5p5ttfxs0dy8nv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "47000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x6j2m793ten9em7pu09q8qca794vrvrdc3jcw4yzc8zup0zrh45q8d2lqx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "46500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1haurf6xpzc0aj833h7tq0382s3qpp5a698kh9ysu4j99azma9t5seuhzdh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "46500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xazrdyth7ctuwetm9wnhrvgq30wlqvwuk6qn7p2huy7ffwg5nznqfw69ch", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "46500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12j3mpzmlpx9d77ux2990xwdhus99626yj3s75kyaxt4r80n3638s237x44", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "46500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gavx8yxen8hhfy7qgkqd0jqczysw8rgruef8nt5mp2sp7skeh3vq9lx32u", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "46000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q8uqnnncy4jylne7m098x4lnwrf34f400cn63px5jayj5eddhcqs3nuyd8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "44000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1md60nlasdkf7uu52lw7gmpvs07jepacq7u6spajhaj5prgn7vnvsecqcfy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "43500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dh6r74r89g2anwusnw2xjwh2seuc4zuvfrxet2jzan9jll9calys05g7mq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "43500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "42500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1que54datv9wjvh6jjald43jlhxkvcpyl7e6jaqap8ch7my7sr48q0jq38k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "42500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "42000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v5rqrf5ctkh0uj2xttjxcrkwaecztmcnaqj9zralud0rt70g8r8s5xmgv7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "41500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h7fr39agpsasxptf6tflwaqscczaes5ep99v0qqe84sntdh0ew9sumnljk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "41500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "39500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "39500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qdsec387taxe2aw5j50sjp8qh2eq85deqxa84wmhkvywncvuvkqsygpay7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "38500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lzdxlvkgjgn3flpqqvda4rf43pxed09ycwhvz400f5m0x5306mjqxqkfq9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "38000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ksu3c85u4gd20v5dy5nkjk30fa7endp9mc2za37gr6tuak0y604susek8w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "37500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx146y8qu72rkcw0xrs8vf8y7j423t42rtyynze5d3kw6e79vdsdenqj3esfl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "37500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17kwmmmdvgdmay78tzmr4m488xvax8ft5g98xpx93qg94pu0gtrjqxym59f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "37500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d8mj6q8tj54rejhx37skuzn88tld7emw3wra9agvjx9glraa8xaskpa5fg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "37000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z3wfe3x5ahnzflnankn8qjc7dlcfld79n65zz878cupxukqq9akqmayj2j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "35900000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lnh2du3xrhsjlu2dst8z78x285m5zct9p3c959uldvqpv6km8dusz05n7t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "35500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16s93fxx6cap0rv6kx8dcc7f6syuymvjdqj7l3j0yas3qhhxw894qxgfcx3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "34500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1esr5qdwsspwt9xap0du009x6m7whdzw8xak806c82rzc2dkwqh3qu5ydzd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "34000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rdu30vgjdheh4453heuq98es6whgaskx7csmfh28m04sckxqes7ss2y89k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "33500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1g5q667lmyzaclvskxhs3dp533pv5g3uvqu60v8n9ckdcgjm4e7xqe694xs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "33500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19fmsw5j977kh3nexv48lr0neeyese2pl0g8vgjp429d8hfurtf3s3k5ps2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "33000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jlzru5r5xgjs5zx5nktv6klrjvvucwpwqst908ursthn6cqdp7usf98vxc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "32000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1getf4e42wy8w52v4j7dxw52qu93yssytwud90uxyzhg5x0cgptwsathj03", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l0a7tg0ux27g2lgwq5vyj0dlsuzcxgl7z7vrxeed59glajvd8f3sk5nvhg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k5zj5jew2s2rs5w7dqfzmm2uwv3xavastvkdd06f2fd2x3e676vs8v8rwt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16aylfh9g5xtm76lt954v7ntgwts3ldppg5a2ll0uw6sd9fklge5q7cdqk7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "31000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1r74wdy7kzh2dfdcumhc85tuherczlt8c4dsqdl03ufyg2lfa4frs2qmwlp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tw6ur95jjmd95svmhsn4qe0vw84xeev8gsnes6d2ykauuk5xqd6q76vusz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "30000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pfyewvtg6l24q40kx74cm2t9epm9wqwx27rph2l8uehnpzhrlqqqupy35q", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1p7sg2mhf3sknfuefhrrvqg73x8pu23wrrc565rpgqz5j8ke0vqpspgxpvx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jc22nh8pmjz20qyyz6jwlx5crml0z7wwrrgn3p66rgpt9ay8r9fq9y2864", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "29000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lgsye5dkh57mxj0n2glerlmdzrh76snfte6k92gvxemkuhvug5eqlhcjvm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "27500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10w2sp9rp2s4s6uj32fu68gdqcjvdc9e6h3jm2qmne02400ul5pws4a4r5v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "27000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1healszdpqs9ppuc2u0lkn6l6ll9n3epeh32rj2lqwcte9g8y58zq4g4pm6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "26500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hpt8ym8h0wk67hyjsa3e3ndncgk2p6qxwam3nrz8pzuyj42rj3hsm5pu7s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "25500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19rwdhaq7taarhhqexejf6frgdk5z6c0zd72c4mvu7k4cwmcxn2es78g2t2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "25500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x39l3phj2m3grgs0ynhd26nx2afh34faue745hltpzqr0jfsr6zszzkds2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "25000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dun6jkgf7cscymt6udr8nlm66gjewqyylyzvnswaaq5exzfw4kdqk6nk0p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "25000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kfacc8swpse06qz30mlkefhex6an4jurgmrrancxyan58xw9w93stpsf7y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "24500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aepsfj9c4nqqcew5qk8rw5sqqkwer5pnmwx9y4elcdm9gy332vqq7flngz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "24500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wy0dhr03nf78m4gufm7jcnzfvaqq244ckzmup5s2054apysy6jgq4pp76h", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "24000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t4q59k0tu50ldpdklks90yrmtdyacw0v826aql4n4dkdvxzprets9vvt2m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "23500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "23000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zrkhjuv3uljccuqjh69vlpmzewvnyckr569aw7frgjz5hsdgflkq0gm7ee", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "23000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18tw0yyc28wuqes5s80nzzh8dsax0rkkpqa4jpcv3wl0t83vf228qd04d9p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "22500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "22000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15fa2hl97h05swu4k5n8x6h6h4f37u0f09pakeletnl6ew5ak3pqq29f93n", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "21000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1wepa6m7j62en6tzc75h446sle2s9zpvllv3557t47q9zyr9y52ssu7j49x", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "20500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e39hfndd2x9atrmkyjjlcdn7j3f09cqne0klatnxqhhgqaxmkn3q4f9fd4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "20500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1htwp6wcg0g706lfp8m8zhs3me5a87kj7p9rdqvywdv3ax8lp6jhqhgkwc7", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "20500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rqrc4m6tecvqhn8rrkh9akq5hea56f36w0hkdg933qn3yxyahfdqne30lz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "20000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10aqhm9gswd5eakqkmdl9248j39w37wtwz0vnqzpxp8tsk2zhy6kqcms8w6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "19500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "19000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15p6ass9pp2l23cja3d6xge8jq5tmpspah67vdp7hv2pnnu04rk4qd5cvcw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cxvpr0z0rjx9wfqrs7e8dzt5xshhlscpc8fk5xs79009zh3vesus9tru8m", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c46ug6qnnu70477acd28w4xh70d45yw2ev62lrwkgvntdga9d7jsvc0497", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x7py0zl3zdvtlrz978thjuzyqw7azyfu5264u4l8a9e287rc5juqekjvf2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "18000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1edcr8zgueucattajc94rpsfcmyazh0zseqk4pr2vs67d49kjnn7q9en6ev", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "17500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rftw5xyjw5hy7hjnurnhx2z5am5fnqxwtkhzltcu3ujxvs9f6rtqmm0kv9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "17000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13qkvk6325f25vdmqc5xjq85q485zsgmh5pedmykg37mtt738du9s670h4n", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "17000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nu2e8qz86kfx5yfnedyrv559d57makxk3jw57lgwsuet0v8dkp3qkmdh9p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12vtlj9qhp0uqhs3m9tay4ujwldpj98rgxxw60fy7huxwymgg785scc5d7f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "16000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w5vuvkweueqvfl2mtncyexuqchje6nx27552zaz50qt7vwhw5tsqjy2s57", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12w9lkh26qc7fvw5038usc6y6cv28jy446qn07dczapjcv3rw49dqgk27s4", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yqkentanxn7cp69sgz35j4eycq7jjxvel373aljj04a4fnuusqgq3nv5mw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "15500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1c3jpfa9prd34jup0ny2yjc0n7adcwumfukjt90dfsj2262s3h5ds4fuwdh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19f4u3dsn5eyrsp24r0vnun6zadmnlsqpldf5cvl9w6dtqdvenvkq4qclt2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zfqclk23ys7v98ck9ewfjz0x583g94xam3qzuetw28gc6f265xxsr507pc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vk59t5awts2etx5v4jyamy9cudnea8mtl2kzk4caryc8erp6j3mqj2f6xj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eyu4e3yl3psnywtecgefejdmcpdlu2z67cdma96kh89egt9x4xgsvvejlu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d7a0q2v6qadeafuqguvt0h4a2hea9nky7dmgt7jszpkpfucu07jqwjfzt6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "14000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z3qzxxkh09r73p9sh872xz7fqjahm048v0e80sypz5gd00u2f47qgf20p2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1knzrpleqz5ehr9j98scgy9vpzne2yg8ta3grp8zzxrxnjhwgvkrs94f6ql", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1usygfr5xcuszd23r5cn627etytpyz8gqk7klyzkllwkwzhal5mjqjtjl3t", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1aawhv22wdnreucw8dk9au0qj93wnf04gvs20hgldlapsj24ny8hs0qtjgq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1qaypsvtfwslrpaa4h0g6x2hh4j0tq9gh2p8dlla6rawr9r9t636qxd6s2k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cx52w3t5tr7ynduqhx9d74lnnvumfm84flymt2etrv2fkfrm3wnqmsd3xa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rwrvyjx2e6q6frgdmlcqlj565unwz5atsxzapdfpdfgc3pjc583qtxg496", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zrhw7537pgw66vt6df5xxxh23f35gt85ml6s6fvc6vr2qshmdeusuufxxp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "13000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "12000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lj3x3d08usvq9gdjrjvyxhzkxxjylp6qftz7pch635qyq8yjn6yq0h0xxw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lrlfmzwanfkqu3cg5c98w243du887xx4plshxezc8ljhhcn22acq4dzwew", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q24h2qhg6ju6cn8r26fh85cv36mmen8ztn2ans7w9aln36p6d5kqegu4na", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "11000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12hhyrde0aptpsm4kssvqw22k5qrq37wmy9ec9lkru47yad4hfrgs5l3jvm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eaqtuwae4ha30s0vsk2ywg6kp4h6gj9m3ccqqfw7vpp50v49aeysg8hk2w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1de0udjakexj8n4548lm5vy8p69geex988ch6gqjpfvmdds5mquss2xt7jy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zvgs9rvzul3nflhqmtfdu8qpa2aqnqwxwsaatucsulsv5dd4svqsed4fyf", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d8h78has80qk0hv5zxfkx5jlpj5689zht8xlqq30xjhx3y9ezhtqcpw8zu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hsw9sez050ewlwv0wk0e8eglc5cj9807n9rxmzlgrhwsdltwh3mqvyuxjt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tl0fenlw4dgjcpx3hkahecqrxyzquszw8zdjwn4j005vvc7uy3jsgndw9f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "10000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n9sl0wz6rjpnkmlwqphp4rema3ejfqeutujw0gkxncefe9hxglxs7csahg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lap90zlng56y8scl6qt8pxrljpme7mluaupvv0rl73067y5cxpqqjtpxzm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n8fykdy0sk7jj8rn7fwv8awzel820mc2d9c9l959hajm8y8s6v5qayvhfr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rd8z3x6ncsk5734u3xjkqskzxq8tlcn00866309kwqc993j4xnyqhs0r3s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "9000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d9gx5anuvxgg906tzj0rdkhyypjtrfc09ufdc7yykhp9h46mxecs2qe2r2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mh0eqru3fwsmct0aunq5eww9ffs22tscparsznzzq6tvpmg04x6qnzrevn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cdahyf0uv3mfk9qfpjk3q8vwrfqap5xgmg9wckkp5rlt3agn5hlqwhh3px", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vgjfpw47le6hw8kacxtf22tpmr3aqrw9umngy4gjkv94r7hp8gxqcqd55k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lqe5htxxh8ryhstdwmwfn97yjynaym9tl3wwq2x3m52e9qgld74q6uyxdu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pyy6kkvlka03n5pfgwf476ulyna2kwnx3ep9yjj4uvm8c4vzcy6qf7mg0n", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1l74cdd9j6jelh0pw9l96t6vm43zyqp8tdeelcywg09ezac7uwdhsmvnq4y", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xcfx8dstn3hg0wwfdh7lcmnm2gu6x95m849jay7ruzpyw593jpzs800vee", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rr569h8enxr68xd8jzyfplt0xwwqcghkhg2eqltyj9jqws4du60qsagq0s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "8000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15hv295x2hxwzwtzeyypg5lwj2z6k5q7j0ts80jn4n7um9u5zklvqgelhwa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hny6mwxqqlfktwzkwq3u6l0d08gafd5eq6xwsjxnv7sp58zm8h9skzn58w", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "7000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1cjqcmqm597re656z5w5jq99f7fvyth7wvhz3v4u9xvyxxyjyv5esl8yqfh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12rg768ddyzng9npvlvd6qk4pnu8xy9tjjky6udnvwhv378v0ljcq44me5a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19wqxw4stpk67hge9epj0wmgt59r7w5fepxwxegf6tqrj4adk8emsz9zdlq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16vc774xgs3d0ce37fsc6ykjd9elnxxq8gaep2jtcwn6endwck4csz6fz0z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1d5zv5ucgwufjj9jg7k3suj4uup7ayp9ld2tchxezwz3fyfu7jtfs9wethh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "6000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12gersmcmrkq2daaxsrpk3hpelxsetf2emn4u5qngvvm9x7r6k26slgztww", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10wkjgn0uvyzta7dh4dqcx0q6axx68mdctvkveptmls2e6xnkfhqqa4zlpc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n2y0dl7ktdrvgvv96kde4d042jt4e3722ftpevjcmfmqquyycv7q7s2d2k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1a5x6xect5s2cgdl7rh2hxwz7z5xqecvmlf9jjjj8za58al3mlprsr5germ", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10pxshsy5ajaf90jqgfz98xms2gfwmr8qh336yg8859khq47rjp0sm99hfn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx187hkj0kvu3rjq4tj22xqlc8qkwp8n48xe9yh4xw0nzjj8cut3mnqy28fjq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nuvnyj4t3ryqzkw86grzzlx2zzvc9plmy8u8zllvey79q7c5r8qsvz234v", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pqayqpvzg3txl8q9cl3ul0zrt3v8zdn7u6j9vzw9gn3jlj3cfxrsgskgts", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "5000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12m0cmm80y7twslqtz4z2qhesdkun9ncjhddnkdzeedf2tcap9qxq74nzf2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12ajhpfkhaxqzcgh0lm2zt03qm635e0wazc0u2xlhwp4vflneq2mqupf8uz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10f5xfpvgmx2lkulkqsf50lvafdwwatmdnjwvqh8kgcyexanrkxls49v67d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx10pckcllf4w09gz5uup0waprsh033cmq28e24gnjlcpu54y6nwp4st3su3r", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx173tum306ce679gav9xyzv9dw7m8fhhw4xh7g24xwmgqxjufv6a8q3az0ta", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1avctsmwaxyzw23nwat6mmxevcq3f0s3m9j4ll8x8yunszucx9n4srfjh9f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "4000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ttds5ut3j7xx72wxg8c6226ewqeyrvzydml7duym8esjwxcg3jpse245zn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ysxav0zk4halpp9r56m0s3cua7r62cfx57snu0s6pqqz56qqt32s2j3jzy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1uhk9jfs34j5a77qs8q0vvk0k2hce5g6y79mr4ct5aadhsf4mt4gsrxkea3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x758q5t2jafk32raj98u003duqlte37xzzzanwl7tef7gt4234rszr4l02", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gu2uwztus3hpv3wa26m7jfap5dum53elfglgn6wrfzm4n70wurhswl6vwx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h5mtjmq29qwfpwzvtk8ny4gpk3a20nny5u6fda97mga8t3xfm9zq6c6htl", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vh4j6v35vxpwt9820f8uk0m3v4u6h78gyc9rr5sqrew29dfvcn6q23qgu9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ayukxr9jcev25gddx8yfpv27hauw0z3xy9z2jwzdqk8n624seayqkjhm9d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pq2x5zfqa45sq6s3zmuuy6pen0t7ezrhmdg5q9q02re4x84rakkqlj5m99", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s84f0s73prw0dltnhwcsw62yqhtk8kxrsvrlmudsvhpgkdezc7csrds369", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1thwz6ymnevqazuq0y5ry73hzu4h45mv3a3a0qdzn8l2rjfxa9sdq0c4clz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w29nsej9nxdsd498gqgymhhkc5e3enf4tg53a8lrnecspxu6aljsle96lx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1eegz7fuml4vntktg6jarh64sezm259qyamm6qqtghrsxf3mkryts6k4hu5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12rc5mctewx0qv33kwemry6vvqmxgcnc6rn84ksqef9rj9z0rer7spuw6dw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ddu2qyh383tuc3z88svmn7adgekm59lv2r3yc8cg35vclqqztwwsxcg356", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hut2sx0lenf2wed9atd23zp8ps8ntaacmjkd4mym8m05pcz69dssrvr0p2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12ykrc525ay96yfq0aq92vqmc5kqpnalxa0cmhy4x9sqlrvklh43svk5za5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1j6h6ans82uwhp77xnk0w6pd42c7nasqhnlvy5yfksax75l3r3mws2au86p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "3000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s0qc9xxvasndk09qljlp5mhn78qpn0pc8qe4zg0hw38hwetjzxxs9v4les", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12s69aw0638j3u02s3hzfpklx4zfh5u42vac96scsx4468kzj9xfqxk4659", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1nwfsx2prjuvsq2q3pn2ygjntgu5rgnarpwrqq2l5adfm3wdmwwqste58cg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jz3xqle28yclk7fkk079q990tvya3vqzjrjnrf4phshvt990wt5q30rkay", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1yxqjvl97jnhxwlvqzh8n53g67vc3l2u7m78aks5y9rym5utj948q3dgmma", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jr5hkhp35t05c7g9jxfvs6wz2all566kves6rx5ckl57pz7mmvtsemw7kv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ueuf2ej4q52xk4j4vd65zcuy7vryx0jy4mjag6u2n78suwkz25ksvqvqm5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rkhdpgc8qsht500ty8jvzzqequalqpnk5vzvcx2rj3sr6cwfytksxwh08a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hmqyn4euv2pjwpp2nf3ayq9ktr77dajwuq967uet2r0xqnhj0saqqexshe", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1afqzsqeqaesyj35ugd2r0pt2x30u98uxvxr4y8u4as690zf3kktqfee809", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1dtx0w07ng5vaur9twxe9ajkvq4tfsgmgd7u909xxkvfmw976sr6qlyz0dv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xn6ynt5j0dwm7yh29pmjs6dy3gytm5nllsanwtzry86czx2j30kst7a798", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fq7a0hk0kwers7ymsdm9wswa7qes6fyw7nzguz3erm5j2xd4eynqxxflh2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12wphs5wk5nq55363secf3glve6rzkzmgqfytyq3mgk0lsun99y5s3kk77r", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v2xtpyjklr994zu0a5hq84azaxyjmlnyz3shvt5fn0rf8nspdraq56jpgw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19klllx0v4jamkq6v2qaw9pyx5fdfvnayg5cahu6kqmajzvu82n0qlx7m63", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx129hapqyd5n0lht763e3rm9mc23fwnh70pxeh9zyntntfvmr4f0yqejt30d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ppglv79lx5ahk8a2cjpfsdvzx6y94c9qzswthyamhx09vcfqnufqvgqs36", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1edrjz53g3n2n6f3jar5prh3269ldncltyts4v7l6hheppzsczsgssp32ju", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tytgkzrx6njx5t6j9gxms2gjv832mzzn2q67kumcft57cyj765csr34n3c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jwjpe8w9cpamhscl0svn3c3xy47cz50qsn38gu3mxed29gq96assmzaq9p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13cf0qwyp3zg6gqnkcupez7zfnwht6zpx3z2chq4erzstzypxy5xsycnjhu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jqya2nk5kzref5tpqfz7ze2yd4mcdh5ax6szxjtk9sk5wza7hr9shjjsg3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1y307v7ha8la3zys39rljvld86lgzklajw4mzur8n0ehx4mpgqm7sm34wsh", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q4nnmgqzs9lctpsysetvergsf6enfkdqvv6k6t3sedz00whpf83sf8dhkk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sdg5chqm4y225lmu35pj7ju58p85s9y07a94dke9cs2yq7caktpq5nq7da", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rk9f4slwuur34lnw6phl9nw2465a6pfjj76p0p8zx8erzhsw0jas7pjyqj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "2000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17e4mq3llxatljnfkdf2w0sy8mujaq4fn0q3rwdgztvh8rmlweh2sxk2xdx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ctxq3czng6y2ms40mf6pnq699p7skzsncq5qerceja4k20ve24pscadkxx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13s89rmpg2vlars5nktpfh8mdjahkgzyj96mllj3zuj66zqx28h0sfmqk0k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sr6hr6werw9vplvje6akazlplymdqlp7hae75uqxdys0z0wy46ns402jhk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14zyrz6re7l4j2zzc72mq8w03vlv5gwvwm3rem7yalq9quz98kdcs3kt6a8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1v8x90upymn830n267009ejv0xwpwmenm6a8nvx0te0v29lauvuaquh3emd", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1swf984qntzm6hrtx2695n82fsemv537ekkenwc94se0ahcxzklmsklc42d", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xc27x4s9qzcsqucjcxqzdqszlp4fjtxpuz56c2770l5yaf5e5jus84sg5f", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1t4fc7yf2t0txxvqgnxdmhxnnd3sw6rcq953z2up277ssl5m0yz8q9h9frn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vw48jzy5re9pp20c9plj77lt85x0aljktkzp945fgugupsf2uxmsmuyeaj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1prlfdpu5gmy5wh3yhtjgzlth0322mcxnw2zagydw5naant6dtegq3r7mqw", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1egfrdtt2khy7hv77kczkxmr8xml7zg4hqlc460527ka0am669q8s2asllj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1xjzpf826avm2g0puuxkv77uhts7pssram2g3eefm0t3pkpce9s2sf8m2fu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w34up6qcsu5x8aw074ps0fwe3a5xj8wskwgrdjkjnf6v5pq5mahqs3ea04", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12djy7tqtf5xmhdqhk58jkjtp3e6elekgcuhe8zr9reak29xz3c5qdqj7h6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18nu9safwcwcfmx9vzaxgx5w8vd8phra0yf2mzjxym9ewh5t5swjquvv970", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e98kn0hsxlvmn67g9rwq4jsmgfvrmhm55yj2dh6rk0ttrf960zuqrc6e5z", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19xgatr5wuucmh45623z25w42h49zxyn6gcp94dkyr2zrwrm0xycs74mzx6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vexr269f4nrep3gq2h9uxkwvavtrxz372umadmfzupy9jamh545sv2zkch", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1739equ4zcj89u9dl27ssz72wx6h9wrms57s00plkzq3g4wqxjqwsk6q67c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q9wzqs7kq8tzw2yhnq05ljar5urwratlsr2wvuwfgw40ff3vmcjqhy8rd8", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ms7f97heq78lkjktgxlhs7pdzes743gafp0huda2usvns9jgv8uqpgg8d3", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx18xxcvsm8vekqk6hy2xwx7aen3fwj6us476auqvce9kyw49ekfcnqk7tcwp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15cedp5xjcxgqvwj8hctcykxa7c3hgdlc0gfylnzwmk9vhlfzlz4qhcsacv", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1mtd7200fs2t6hvag0qd5zwgmeg93yjlcst4uztfj3tmx6z7xmt9srj3xhq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx175u4freddynpqmqp4c057dwf9ej62pv0hxh4ew6dwlyf37y5ekvs7djgrs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1n5tgph6psu6a3z3u365ed4xmcm66tdk2pyltztvsy7pzunhfu2dqahcdcz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vj9cy7vtmpzslkenxx9nx3pfsq9uuk0krgvnf5efetd3jxjjk4ssulv7f9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1s8vpfq0d6unp2v8f4nzgxkj0zaru70ps6vael7a20w85rwljlemqmjrqlp", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1kzultmf90j7u5lr9586l5mu3qd4xjl7h4k4yhxztms9spva8d8kqw9qj82", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1vyedt4fgr8vw96qhx2hl8ktptddm68wzs7ytcvwky0et3f2fqzws9gpj63", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19j967tm7fjn73tuwr03w9k6rat4j409295l5j6xrs7w65gl0v49s93mmjs", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1csmu30z07zqudtna93hqlstcmuzp53kalmsawt0wq58l6d488fcs8fjcjx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14cgd45zee9e06xl39x3m8k076gm4tnkr862m49q7vdeqm5ulznxqeyeuju", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17pw8cskjurc9p2503yns2y3m8uv8t3slwas2d9fav6e4xg27ww8s4j9na5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19a2ky2g4tylysduh8k5ev6kms2z2m4kk6veuljjs3cq2c0r7jexqmwewx5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1flhq9y5whh5q4t7jwcu7grfsl2vac95hmst4ywkghajptkazz7sse7je9a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19mrdy4z7gndh4k3dtrv0r38jsz6c4texjlwnmzjh0z0ccnk5t4yses5kz6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16hvwy7xwv9wxf64u0crk72d7jceqayjtk4v25xken3psfswrfhsq469ftu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1333g7ffyguql8wdurnqmspwqrvrsf43647lt7wzatnanzm5xv8cq4q7mg0", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1hruc7t3lcdz2n0mukyjh6l9dtxd9hauzegufz9f05k3yaltz9agqph6vkc", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1w67qjy2g4pyecrdayfrmaltxqk9vpvk577harjk0qdyplrycg82s2yx9fm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "1000000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1pqk0hvm2lrct9uc7k534hg54538s7t9p6xewq49vnamhqs5gp79qfmnw7a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1akhqtjzm3kkr9wlj8nh9kwuza6r7vm4g2nz3pcggmq9dayz7q92qncwv0a", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16qj5ep69xew0qfqms0hw6eh6et3jzjx46wm0xteslv5ufs02nd2qtp4rte", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12ts7lfh9cr6rqj0h9uhmha99tyep6ln6xtmskp4x9pv32s28jrzq3cksav", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17jurkuy7tns92g07uf826te4azhu3qnydcs7d7snvez9xy3dh7gqa8h2hy", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14w3wjj7c7d5w36frrsvjxy0xsuy4nlnufdxlrhuxzrz9xku5vjgsklvpgu", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1y33f8xs9evumw58unlkcdgqudwzrjn5ftk52w0p03277mqvnw4ns05ferx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gh9yw2ctnae2jy95gv3g70h7av7y9d2ha5dk6ehrf4nt0q7lppvs22d2vx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1rwglj5p9s436vdf6y33fu89puyl4sauuv2c6jmpadnqa0jmxezrq7mkt27", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx13ju5ewkc4v2qgg6p5zj3t33p0eczcyfe9eggmv6ksph27px08h7sfsavr5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx170qark2pk7xpjwsrvm4w405pxtjzwgvt3wtygu82a8t02rwan94q4r0vws", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx14v3lzf453lx676rj0uhvp7sph98g7hqzkr0f5g42mtkzppzf2dhqw5f8a2", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1skt9meytux778svqe3d6fyvl7mjfrm99nlgyfwenclgr09ftm7uqc3cqxq", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zw68exayxayyakvgpnrf4ptfkkkcth2lvlu20le3e0ghrpae4hlq4sqfa9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19wes3z0lafn8tge34fupwqs5kzf4mvm3xt7p08u0qgt0d0dg0kzqy2eh4k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx19zld6lprrjhzzhltmjskuv7dxcqnewx9sjll8ccdm538wx40ajpq2f8m0k", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1grznkf6d33xtkhee5899xa2jg8v3ktupude206jt7pzpmxgslgqqxtddgk", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1us9z3c0r8a2fxex7za3vh24zwxmhw37ylna4559ulr7etmg5n27sdnhpfa", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1fxfrkrq80vpzru94heh6vwt52yan8k9znxzvfjtazjk59lpptl3qgnkegx", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1ftt6434d6y9ekacacs5hf3cxg7a3s3uqm9vjm5l893fy5epjyxtquz8hka", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1k32fdxpu9d7lwjc9hd7qw6pz95h2summn9mu2ckyunxq5e20wk3qx7h986", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1lx2dgd8y94t40p55w45cdv0wqdk4m9q0tzaru9pvsq7decczasmq2l6gnz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx16ugged4tg26wydz3g2wasqk96ghz88nk6qzkcsep6qy0r4lcls6sk95mrj", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx15aarz3lnq8da6s86l8kuwwzy0gfw3tdqqu9xhq00lardxl4jv7jsa294sn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1jpyqylp9zekjz9xcccz8h6gaw9f796tp9syvm43x03pxa8zf6ses6lslat", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12h72n35qjgx2qjps70hqal8zuvw26v46rc3auczg4se68878ek4q8xs9xe", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1zx7dt77dgkrzrn25zqqspxxzr6yyhk9wwgt0lelkxeda0ac3jsls68fl0c", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx17s5j40067d5ugggn9ppdjg5enrxe37t0y58y8pjgnc0up25k7chq4rnaaz", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1z9p9lvrqf92x2lluafdyvrz3xjnrvag9wl7lhr6tfkfc0phzklmq8gdhzn", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1gssr7n6rfcffcu6g830sa2gusv89m7mp03sd86fula6gk4th380spllur9", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q3nqrhd9uyjcls6jyj55x4wcnzlfd2mtezfy0m99gd0qt358hy2secef8p", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1x6r4mtz74u0walwxhe4qxcu4cm4vkzkgjsj4p8a6xn9z43zg33ys37vy0e", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q3v3z5txguskd6r0nrqqm4se3u4h5xasw4plxqk4cxfyw3l7tmgqayunfm", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1q5dh2ghd660523gstn5vmc2hf4w26azr3s3nedjp2wu3ae2d27hst49hpg", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1h6lne788w8u58dn0lquz3kjp22s0xkz08sjlxx3zpmwup9k8cjcqupa8r6", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1tn8khcvlnkhprvsgn7eutwlws3vn5yc4mnh85v9vdt5ze8zs7cushvg596", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx193v808tk0f54j0cgxeqpnhywyyp3l3e847wlgl588murpgs43a5q65as7s", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1e38wzhjm5442g2z3xk73paugk479863f3y4q2j0c3yprdw50fpaq20njlr", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx1sk6k9sdj836ynxntk2nt60funlz0t9ptqttrqvg46vcv5mdkwhaqgrgnnt", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }, { "__type": "mmx.txout_t", "address": "mmx12tkjk987c9kccda9efdrw8xvmuqmca476czrfp0t7tdsysk36hwsdsstc5", "contract": "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "amount": "500000", "memo": null }], "execute": [], "solutions": [], "deploy": null, "exec_result": null, "content_hash": "CC1C75BEEA5FEBFA487C1EA9A4320741DD4CD5089AEC65FB95E4FCF45DB859F6" } ================================================ FILE: data/mainnet-rc/rewards.json ================================================ [["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", 302], ["mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8", 3], ["mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh", 323], ["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", 80], ["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", 863], ["mmx1p7sg2mhf3sknfuefhrrvqg73x8pu23wrrc565rpgqz5j8ke0vqpspgxpvx", 58], ["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", 51], ["mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc", 12], ["mmx14xzen52t0aecda0rtqea2zgzrqsf3xlnsswt29uyvrf2qhjy85zsfderjr", 281], ["mmx1g4uyjjhup8hgk6akrjqvegmxu6xg98er5pt5uzqn520ud87rlgrqjn8cvt", 19], ["mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935", 340], ["mmx1cke885syq8wasw96nqp9cuh6wcr7sezvy65a3anjqzqhk59j9s9s7jl0gt", 16], ["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", 58], ["mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45", 11], ["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", 91], ["mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg", 7], ["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", 699], ["mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np", 8], ["mmx10vkwltacvwvguxk65jg79d64pnxvr5jpvxmd66smnns7daa6xsgqu045qd", 153], ["mmx1edrjz53g3n2n6f3jar5prh3269ldncltyts4v7l6hheppzsczsgssp32ju", 4], ["mmx1jghsp60cua83ekgw22a905pv8qqsukjjnz4nw9gkqlllspmsfugsxnremv", 250], ["mmx1lnmtuqh7jvxjsmmsf92ulcavxtr4fjhzva774zhs0fwvctzf7vgs53cn9h", 20], ["mmx12v7y2c99f25yntuk0dxpu4kwectxx62l7hvqsj4acuvvx0xsrqfqlds5l6", 110], ["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", 4], ["mmx1grclm0x96ccghh8574wnk8wmmee7g8sxt2emh6mgedezdntecsfqrtaz2t", 92], ["mmx14fadj8tx3ksq8jvfmcsuhxnxmmn0lqdlpjs5rs8dfqphgsuluqfqxgys6j", 1], ["mmx1eymvxpnp4seshcfn5qfctlzsukazt49t3m5zgz9q68g4sry89cfsggxcfa", 40], ["mmx1nr0cpl0g86e0wdzuahcc2x7f4pc63n2y6a6zpnsjt5lfsctzmufspp6vd5", 35], ["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", 89], ["mmx1xjzpf826avm2g0puuxkv77uhts7pssram2g3eefm0t3pkpce9s2sf8m2fu", 3], ["mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f", 111], ["mmx1eegz7fuml4vntktg6jarh64sezm259qyamm6qqtghrsxf3mkryts6k4hu5", 6], ["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", 1629], ["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", 582], ["mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q", 261], ["mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d", 106], ["mmx1t49g9vz555dcm6dvrxt9hxua58jf57w5rmnjnaynnclww8lmagdqc76mnv", 9409], ["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", 58], ["mmx139s60xj6eeuj5s0fvhgea06up5yy0ucn2fayvg4fd90xyeq9guwsv35zcs", 79], ["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", 565], ["mmx1090syeqn56ezxh9tzlw2006pqxt34ytn3ytfrkxaqaghh40cncwsya49ev", 56], ["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", 54], ["mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9", 24], ["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", 899], ["mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj", 77], ["mmx1zngflag3hu0axh6r6yutlqxt9r7vwd3fh243frzz5gtmfysqeysshp5vuk", 135], ["mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev", 26], ["mmx1fheacy3c48nkd0vgukeuqtldfzuxh2qhudhytshgctqe7sek25jqv99qqt", 509], ["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", 29], ["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", 134], ["mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u", 370], ["mmx1cg5zspl8na39un48fm04caj4xpphaerynw53vnjlwh42f528ns4s53jjv4", 66], ["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", 5], ["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", 7], ["mmx1ueuf2ej4q52xk4j4vd65zcuy7vryx0jy4mjag6u2n78suwkz25ksvqvqm5", 5], ["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", 87], ["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", 134], ["mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu", 151], ["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", 98], ["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", 20], ["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", 25], ["mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf", 74], ["mmx1rc8cv2t60pvyye2mylydmrp970nawa542u74894ejgwufzg7lycq505pp0", 213], ["mmx1psgwgft4tf7ult8p4e5gjp9un75t6fyzaxmhr9e64lmd6lf6kgcs53s8uf", 107], ["mmx12wn9qtfzagz6z6ztxld2hka8cgvwr0nz55l3qjvkg0ayhhjvlscst4phad", 3079], ["mmx193xsayg8rsy3zr5knfkc89hngtyxg2avkaykngh6gky92tatgseqppclmq", 2808], ["mmx1lgsye5dkh57mxj0n2glerlmdzrh76snfte6k92gvxemkuhvug5eqlhcjvm", 35], ["mmx1pyy6kkvlka03n5pfgwf476ulyna2kwnx3ep9yjj4uvm8c4vzcy6qf7mg0n", 17], ["mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88", 85], ["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", 157], ["mmx16h8zlf572dedtskx0krrajcrt6d86s0kgukd4rnm7ae9v8tmnvmqhqmdca", 230], ["mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf", 3459], ["mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk", 284], ["mmx1kez0lk0emjezwdl88ee6c5lvcqftu7l32ksqgl98snkdzke9cyuq58fs6d", 98], ["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", 17], ["mmx1k738pwqe95qv3g8z9y0lhxsxgvf4z5dv0qgq9eh6vcy7u6juc5usrhgpsh", 125], ["mmx1lghunzj070ysr4hd2alsujacc26t99zl3cv5qm03ttjaq4ugmvaqqfy920", 466], ["mmx18d8335fhancnvy2zs5wsq8gvcp0l57n3pejex92ndg6s6s3casaqalq6hf", 257], ["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", 116], ["mmx1kkq8ezuwsast9zplk8ec0pa0me6u3wydkrg5jn5daycgppy63y7s9y0up7", 970], ["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", 22], ["mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c", 88], ["mmx1pu8fla0axf3227ttsxggudd6ym9u9vs7nwcrs8uk799ej6yegvlqhnjkd2", 28], ["mmx1ls8zjlv2t0prtqvuy4pkasq8a6axrjythsu3nvsne5uzmkk82clqh28yvt", 22], ["mmx1lap90zlng56y8scl6qt8pxrljpme7mluaupvv0rl73067y5cxpqqjtpxzm", 19], ["mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m", 17], ["mmx1ujghjem0z63dnwrwa8tnswgn8uf2nn8gx26seg4te50wpfjw94pqjhktte", 1021], ["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", 147], ["mmx1gmvuqg5x4tn9fj53vsgahgwqa9h4jx0cz4x7xpet67kxu8n33fpseycg9t", 97], ["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", 831], ["mmx1h5mtjmq29qwfpwzvtk8ny4gpk3a20nny5u6fda97mga8t3xfm9zq6c6htl", 6], ["mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e", 491], ["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", 309], ["mmx1ayukxr9jcev25gddx8yfpv27hauw0z3xy9z2jwzdqk8n624seayqkjhm9d", 1], ["mmx1pv3lnp3q5kgp28u3w3zmxreft85a3mf4v3rk8qazpxnzwe7ykays5tjlwj", 107], ["mmx1eaqtuwae4ha30s0vsk2ywg6kp4h6gj9m3ccqqfw7vpp50v49aeysg8hk2w", 21], ["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", 18], ["mmx10p75878akjmna30s8kjwnaveql56v2a45tw20fw86ruhvc8x5pxqrqemq9", 73], ["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", 85], ["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", 284], ["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", 209], ["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", 227], ["mmx12j3mpzmlpx9d77ux2990xwdhus99626yj3s75kyaxt4r80n3638s237x44", 2], ["mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg", 2], ["mmx1uhk9jfs34j5a77qs8q0vvk0k2hce5g6y79mr4ct5aadhsf4mt4gsrxkea3", 7], ["mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8", 237], ["mmx1l3g7hjrczlhsvnshj4jtccavmrrm9chue6ha29hmdua6392mtffq2ddd66", 5148], ["mmx14dze6kxepm2ensphv2z0ejl4kc4hks7gwajnjr9nfpw6glnqc4fqz53s5m", 130], ["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", 94], ["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", 388], ["mmx10jqs45t5ujdwtqyft07f4mxk7y08fac4ks0z6ee50n6fkq67992s09ezzz", 51], ["mmx1pmecze7k5a4ld66auxywxljxnsad9ducwgzmy4q4k3d6ma6gr3tqtkfrnp", 89], ["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", 270], ["mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm", 73], ["mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57", 130], ["mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx", 273], ["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", 35], ["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", 12], ["mmx1ff5rqk4myqr32axrt500v0rh0cjp66uh5y0q7r4ed9xy63c954dq3ea3rv", 2832], ["mmx1rqrc4m6tecvqhn8rrkh9akq5hea56f36w0hkdg933qn3yxyahfdqne30lz", 40], ["mmx143jvevjx827ac7xrc7zx59a3hwd8nvu52khqa4365dk8ct3zff0q2ee25l", 412], ["mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk", 17], ["mmx12q3pverdv5c465fjeryz5uxnvcjpacnfanynclgq8g5fwj77y9ss2r84v0", 149], ["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", 72], ["mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re", 1132], ["mmx1ms72mlttvspj4ga668t5xr7k8m98eedvvdwdkmwjfua2ttdmj33qvqyp7s", 17], ["mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7", 21], ["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", 151], ["mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x", 347], ["mmx1rgf2v34pnkjtzg09snd40cd5262dp2hde4k3tkhcjyxdfh7mf4nqx0cf3k", 288], ["mmx1mg56jxv3e0plu76824vw3w72kqumgyp2hetfg5s227lr96vjzd5qr4gxnj", 2], ["mmx1f4k5ajf9dv0jfuw28xh9vzhmvuphv92dd8mfxxdzssverwfe9p5qdwgc8k", 309], ["mmx1efmq0tdmmpv7k7dzd8nn5ta045f9fdylk9pa848hzshh82zlxf5sganjdn", 42], ["mmx1vexr269f4nrep3gq2h9uxkwvavtrxz372umadmfzupy9jamh545sv2zkch", 2], ["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", 28], ["mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl", 85], ["mmx1na96yskrphrrswsg8rwe0e0gwpy4n360t37u6guxwa42a26wqa4sqpfm9s", 89], ["mmx1w34up6qcsu5x8aw074ps0fwe3a5xj8wskwgrdjkjnf6v5pq5mahqs3ea04", 2], ["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", 109], ["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", 55], ["mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw", 61], ["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", 558], ["mmx1s90ctrk4g65jv9l8zcysjev9ms3v45uvktp5k52l94m97q0gfpeq886vq5", 185], ["mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5", 2966], ["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", 36], ["mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z", 28], ["mmx1hsw9sez050ewlwv0wk0e8eglc5cj9807n9rxmzlgrhwsdltwh3mqvyuxjt", 20], ["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", 30], ["mmx1xv2dztq36sk27x79gdja33zk6lv8cytmjeqkvlux788rd55l6fuq09zq65", 127], ["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", 2783], ["mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf", 491], ["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", 29], ["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", 370], ["mmx1an3w925endfhcg50qelq69ahwvltupq4rt7wvnhfqd8leg2526qsgh2ret", 171], ["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", 48], ["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", 195], ["mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3", 189], ["mmx13xu3ay8eujt4neuwyhxw002r6qlj0v5p8ldj6jus03ev0w5u7wpsxdd3v9", 3], ["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", 251], ["mmx19wes3z0lafn8tge34fupwqs5kzf4mvm3xt7p08u0qgt0d0dg0kzqy2eh4k", 1], ["mmx1fudwe8xuzgwraw6fe6rylklv69x93kqyrgu82jf3tjstsgkm8xrqtc850j", 427], ["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", 106], ["mmx1g9fl4jus2fumcnkw0k8w9df5cln8yukhrk3kzwuzk5rg68ndmjyqftzc4p", 103], ["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", 132], ["mmx17grsj5sq8z9h02gnl92mpkajy6janxcnrcrg6mm3w5l232tx8j9sufzatk", 559], ["mmx1tsl59gk2ahk0tkrcwnhnjh2kcnfnhyljt3n76h0cu00ael973k9s9dj2aa", 28], ["mmx1azdpkjrjlm5v300uknw62m0af3fm3uujupd5zq07gharrx75cj8sdnh0wd", 365], ["mmx19tp63ptrre654er8rkx5ntgt4z048tutqx4yplu7daxwm2tgk2gq8hp85z", 209], ["mmx1a0lmcmccnm3ak5n82mutjxyz9pj5radgw92qzudnp4eucts6awgqym92mg", 288], ["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", 520], ["mmx12s69aw0638j3u02s3hzfpklx4zfh5u42vac96scsx4468kzj9xfqxk4659", 5], ["mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g", 153], ["mmx1rp6q7eh4zye6494jpq9j6ft69ku2lqqlx363d4z7zspv7wqfqk2skevrl2", 664], ["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", 264], ["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", 79], ["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", 313], ["mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg", 25], ["mmx1wcmc5n7v8eujvlzrtuga6fcfmk4d9yjcdhs0fmgenyrt6ycynjdqa6hh0w", 1121], ["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", 20], ["mmx1qc75vu9xfagl297yupuwl3jgqsecwlae3szn9lwpg9m5p0zcnzwqe4adsz", 112], ["mmx1js6nrvnl94rcgn8k80dx6uz2da2jj64utkrxqhmvcvuescmrpwwsvh2vna", 181], ["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", 133], ["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", 99], ["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", 168], ["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", 208], ["mmx1mzq54zkhcrww85glxx6kaqeeeeqckrwy0j9d377epmh7vrrssxsq8fel5y", 302], ["mmx1lty50fwzq0wxaxwzxgjzt7y3r3mhn08eccs5ntz3y4sahd5jfxssnz6qzz", 1267], ["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", 258], ["mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g", 24], ["mmx188uhxreda27mxl6lth04vl5y2da7qkldg72gvalsth7dkwxeh23sm9juwr", 63], ["mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej", 68], ["mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl", 144], ["mmx1gxx98xmhrcdv4ez5fxekmnczvwuqns3geh3wcj9l463d5jgqcwjqv35gpt", 55], ["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", 43], ["mmx15qatp4v00zymeq92dmz2sfee0twh36n7vutwp4kcjhdktye8zkjsqftneu", 200], ["mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy", 47], ["mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn", 23], ["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", 25], ["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", 12], ["mmx1mjax0p84wdxsfdffhm5tu5fg3alt3zvam683qk0zu4jh6jredj4qqz6kk0", 246], ["mmx16y2cjvyxtwgkm5m0x2wy40g2lc59qcept4dqjakfygwghhxnsx4q5cg5xl", 172], ["mmx1s4zvd257h9xqntzj7kd08wnktrzuk7xlya9ttlv2dmkxk79ykz4qzvmjvt", 108], ["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", 120], ["mmx10aqhm9gswd5eakqkmdl9248j39w37wtwz0vnqzpxp8tsk2zhy6kqcms8w6", 39], ["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", 193], ["mmx123qaxyt562xlfdxn7fg52nxx9aq6gp8q3jn6kya98xmn7n0z62kq09hk9k", 4], ["mmx1tyrnks330n6exxr84vz7d0mjsmpey8p34kuzy07g4nrc7txl87ks63zmhn", 52], ["mmx1j5qsf0gulds6ll7mm8aygj9xu52qhcaamadzak5k4c3smx9lajksjyvyzx", 278], ["mmx1fqfjglclexnmhlmr5lvwhqm9x6dqvm8cnsr4dpn4ysl5uzfcdwhss0xtp4", 1230], ["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", 9], ["mmx1kft6gj0a0upukl0dy3qlakx0pm4de4538v92l6saa79jsqkswzcqhjtu6e", 105], ["mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm", 473], ["mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2", 31], ["mmx1s84f0s73prw0dltnhwcsw62yqhtk8kxrsvrlmudsvhpgkdezc7csrds369", 6], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 34], ["mmx1eaxnhktjt4yegapquud644nfkryfyarth7lwdxwdedg8xhhdlxescdxp0q", 1817], ["mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7", 1], ["mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7", 3463], ["mmx1h9ahw37ekqwx5sewaszmj54cn0l0pmzrksss7z0320ntkt63q6mssrfkkd", 78], ["mmx1hgvgalxcwyssgs5gqsttsfvmt2297u2hw4t7cglllnvswkhg6xuq285wez", 22], ["mmx1d8mj6q8tj54rejhx37skuzn88tld7emw3wra9agvjx9glraa8xaskpa5fg", 3], ["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", 10], ["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", 154], ["mmx14ljuxjzlu24djfrm2varlgvfup2q0keydus50mrv6qy2qpuxu2lsmm8gza", 74], ["mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4", 622], ["mmx10wkjgn0uvyzta7dh4dqcx0q6axx68mdctvkveptmls2e6xnkfhqqa4zlpc", 11], ["mmx1aeaukjyxfu6gk38swf6s29jrswc67nkra3n3wy5wsxt2fqmvknqq44kzkn", 338], ["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", 138], ["mmx1qfvy0zcwu0smhdtkkkygyyasjf2eplaurzkq2m2l4ngrnxgy0rpqq8swwy", 257], ["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", 69], ["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", 3], ["mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9", 109], ["mmx1e2md0mf5cu5uxmme0hxt4apxg9nd7elstzcr7v393nxmgm0rvryqlr557x", 174], ["mmx1yjlle0sar0k24juhdv0krzty0qkha6asdjds0d5xvp7gv6apa0yqfr3grh", 915], ["mmx1qq2w4yktpymxyhxck2s0z0grp8tlh2l5evsceycvx9af0x3xxhysd536em", 258], ["mmx1njy6t7vkta3veyjj4atvr6ppmeeru85tgh5qvhvnmleslru54m9sqp3l60", 16], ["mmx1mtd7200fs2t6hvag0qd5zwgmeg93yjlcst4uztfj3tmx6z7xmt9srj3xhq", 2], ["mmx1geumptg36crcywp4tzfqeameymf7x9a43qqde9mrpaqxqjernlxqytcsus", 60], ["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", 23], ["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", 9], ["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", 1494], ["mmx1998n5nlledt8puwx80neyvle5xkayw0uvgdhuwup6gtpzd6ym0gqp5qzy4", 55], ["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", 604], ["mmx1ygz7gwf3at3409ggncyfpsyp6cn0ralc4dhezcnkzsxly07x0tgs759304", 92], ["mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3", 221], ["mmx1ymnr2tt7vzcklrk97n2phwz96t2t2au64mjqw58efz2aatkex02qryjcxm", 4163], ["mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc", 1190], ["mmx1vcp6ksuysun2pdtkrukz6lh2dd7g0d2lpyjk2m3ffylq0yhn4ntq9fpmkm", 102], ["mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l", 37], ["mmx1td9zpd4vwncrlgy8kkgft4vkck4yep5nagxr60anls4vrlvs88ts964kg5", 127], ["mmx1qn4ugnczkfstu5eh7quuzce30c03uv3etl8u7m426zrpshxpdrvq07f75y", 139], ["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", 2587], ["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", 3], ["mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7", 100], ["mmx198yry5ttr65tnmftf4ppzjwvxhqngyncxy3sq5ucz8edmsg5umwqs4u2zs", 163], ["mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0", 1091], ["mmx10g3yj722j7psxapmpcusn3atzd2fd5r8pq5s9wmdszxweefexm0qzyjazd", 329], ["mmx19klllx0v4jamkq6v2qaw9pyx5fdfvnayg5cahu6kqmajzvu82n0qlx7m63", 4], ["mmx1h6lg70tzjmvsucw3c7mmdf98p553aj0hfd6sl7nekq4yucf4xnssd7hudq", 40], ["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", 113], ["mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql", 74], ["mmx14emrk4d8vzp3c2yztqrzhnmy8r9tsnywrpmfrl838q50j0xjenjqay73ld", 72], ["mmx1lzdxlvkgjgn3flpqqvda4rf43pxed09ycwhvz400f5m0x5306mjqxqkfq9", 76], ["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", 20], ["mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp", 628], ["mmx1cthy5xra5u9kwcdgp3z0x55grrj4xv585g69qath07dqrejrct5qk9xrck", 171], ["mmx15drd8dvlexsa460klqa0dqlluy0pya79z7lnkvj08zgzuncnzt5shqewhm", 63], ["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", 770], ["mmx1ug0nljja9d525wv5n8z79vgdjh9vxpf5hf57r2gyu73cm86pcn4s7v3ccg", 116], ["mmx1ksu3c85u4gd20v5dy5nkjk30fa7endp9mc2za37gr6tuak0y604susek8w", 73], ["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", 849], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 1039], ["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", 71], ["mmx1p8dn5gxah24aaufh224nw9ze4e02gpu7enmc057wf3nqxef36lhsndl7cx", 518], ["mmx1gu2uwztus3hpv3wa26m7jfap5dum53elfglgn6wrfzm4n70wurhswl6vwx", 7], ["mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7", 1], ["mmx1rh2lur825y90gqc5pxmejgk5d8wl934h0v8lv972rnevrfhpsmcqsqywld", 8], ["mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww", 310], ["mmx1avcekqg5tnavcwyw7qs97809yzh0nzq5l9ltyjljelygwxtp40esgyw665", 132], ["mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan", 42], ["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", 130], ["mmx1c0lcld738xys6rmr0wfyrtgpcvcm8szcst7w9c6cawgmpme6nh6sgtq35u", 326], ["mmx1uhw0fqjy4v9stnzuc5fjrelvep597jx95hcm9xr7d0pqt32cenms0ggwv3", 172], ["mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc", 44], ["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", 11], ["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", 45], ["mmx1nwdefg4c7dq34hhvykfzl2um6d6phkfqh22pg5d2q8nderf78n7suz5x6m", 274], ["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", 227], ["mmx16kkntt0k2spk2xvxlswtwf40p02vlj97cenyvzca58ad8uav68lqfkkh9w", 2395]] ================================================ FILE: data/mainnet-rc/rewards.txt ================================================ mmx1t49g9vz555dcm6dvrxt9hxua58jf57w5rmnjnaynnclww8lmagdqc76mnv 9409 4704.5 mmx1l3g7hjrczlhsvnshj4jtccavmrrm9chue6ha29hmdua6392mtffq2ddd66 5148 2574 mmx1ymnr2tt7vzcklrk97n2phwz96t2t2au64mjqw58efz2aatkex02qryjcxm 4163 2081.5 mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7 3463 1731.5 mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf 3459 1729.5 mmx12wn9qtfzagz6z6ztxld2hka8cgvwr0nz55l3qjvkg0ayhhjvlscst4phad 3079 1539.5 mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5 2966 1483 mmx1ff5rqk4myqr32axrt500v0rh0cjp66uh5y0q7r4ed9xy63c954dq3ea3rv 2832 1416 mmx193xsayg8rsy3zr5knfkc89hngtyxg2avkaykngh6gky92tatgseqppclmq 2808 1404 mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v 2783 1391.5 mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz 2587 1293.5 mmx16kkntt0k2spk2xvxlswtwf40p02vlj97cenyvzca58ad8uav68lqfkkh9w 2395 1197.5 mmx1eaxnhktjt4yegapquud644nfkryfyarth7lwdxwdedg8xhhdlxescdxp0q 1817 908.5 mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm 1629 814.5 mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92 1494 747 mmx1lty50fwzq0wxaxwzxgjzt7y3r3mhn08eccs5ntz3y4sahd5jfxssnz6qzz 1267 633.5 mmx1fqfjglclexnmhlmr5lvwhqm9x6dqvm8cnsr4dpn4ysl5uzfcdwhss0xtp4 1230 615 mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc 1190 595 mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re 1132 566 mmx1wcmc5n7v8eujvlzrtuga6fcfmk4d9yjcdhs0fmgenyrt6ycynjdqa6hh0w 1121 560.5 mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0 1091 545.5 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 1039 519.5 mmx1ujghjem0z63dnwrwa8tnswgn8uf2nn8gx26seg4te50wpfjw94pqjhktte 1021 510.5 mmx1kkq8ezuwsast9zplk8ec0pa0me6u3wydkrg5jn5daycgppy63y7s9y0up7 970 485 mmx1yjlle0sar0k24juhdv0krzty0qkha6asdjds0d5xvp7gv6apa0yqfr3grh 915 457.5 mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn 899 449.5 mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl 863 431.5 mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a 849 424.5 mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn 831 415.5 mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl 770 385 mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq 699 349.5 mmx1rp6q7eh4zye6494jpq9j6ft69ku2lqqlx363d4z7zspv7wqfqk2skevrl2 664 332 mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp 628 314 mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4 622 311 mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6 604 302 mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9 582 291 mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj 565 282.5 mmx17grsj5sq8z9h02gnl92mpkajy6janxcnrcrg6mm3w5l232tx8j9sufzatk 559 279.5 mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5 558 279 mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap 520 260 mmx1p8dn5gxah24aaufh224nw9ze4e02gpu7enmc057wf3nqxef36lhsndl7cx 518 259 mmx1fheacy3c48nkd0vgukeuqtldfzuxh2qhudhytshgctqe7sek25jqv99qqt 509 254.5 mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf 491 245.5 mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e 491 245.5 mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm 473 236.5 mmx1lghunzj070ysr4hd2alsujacc26t99zl3cv5qm03ttjaq4ugmvaqqfy920 466 233 mmx1fudwe8xuzgwraw6fe6rylklv69x93kqyrgu82jf3tjstsgkm8xrqtc850j 427 213.5 mmx143jvevjx827ac7xrc7zx59a3hwd8nvu52khqa4365dk8ct3zff0q2ee25l 412 206 mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5 388 194 mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u 370 185 mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc 370 185 mmx1azdpkjrjlm5v300uknw62m0af3fm3uujupd5zq07gharrx75cj8sdnh0wd 365 182.5 mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x 347 173.5 mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935 340 170 mmx1aeaukjyxfu6gk38swf6s29jrswc67nkra3n3wy5wsxt2fqmvknqq44kzkn 338 169 mmx10g3yj722j7psxapmpcusn3atzd2fd5r8pq5s9wmdszxweefexm0qzyjazd 329 164.5 mmx1c0lcld738xys6rmr0wfyrtgpcvcm8szcst7w9c6cawgmpme6nh6sgtq35u 326 163 mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh 323 161.5 mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg 313 156.5 mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww 310 155 mmx1f4k5ajf9dv0jfuw28xh9vzhmvuphv92dd8mfxxdzssverwfe9p5qdwgc8k 309 154.5 mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0 309 154.5 mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx 302 151 mmx1mzq54zkhcrww85glxx6kaqeeeeqckrwy0j9d377epmh7vrrssxsq8fel5y 302 151 mmx1a0lmcmccnm3ak5n82mutjxyz9pj5radgw92qzudnp4eucts6awgqym92mg 288 144 mmx1rgf2v34pnkjtzg09snd40cd5262dp2hde4k3tkhcjyxdfh7mf4nqx0cf3k 288 144 mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy 284 142 mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk 284 142 mmx14xzen52t0aecda0rtqea2zgzrqsf3xlnsswt29uyvrf2qhjy85zsfderjr 281 140.5 mmx1j5qsf0gulds6ll7mm8aygj9xu52qhcaamadzak5k4c3smx9lajksjyvyzx 278 139 mmx1nwdefg4c7dq34hhvykfzl2um6d6phkfqh22pg5d2q8nderf78n7suz5x6m 274 137 mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx 273 136.5 mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn 270 135 mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn 264 132 mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q 261 130.5 mmx1qq2w4yktpymxyhxck2s0z0grp8tlh2l5evsceycvx9af0x3xxhysd536em 258 129 mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp 258 129 mmx18d8335fhancnvy2zs5wsq8gvcp0l57n3pejex92ndg6s6s3casaqalq6hf 257 128.5 mmx1qfvy0zcwu0smhdtkkkygyyasjf2eplaurzkq2m2l4ngrnxgy0rpqq8swwy 257 128.5 mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry 251 125.5 mmx1jghsp60cua83ekgw22a905pv8qqsukjjnz4nw9gkqlllspmsfugsxnremv 250 125 mmx1mjax0p84wdxsfdffhm5tu5fg3alt3zvam683qk0zu4jh6jredj4qqz6kk0 246 123 mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8 237 118.5 mmx16h8zlf572dedtskx0krrajcrt6d86s0kgukd4rnm7ae9v8tmnvmqhqmdca 230 115 mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6 227 113.5 mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t 227 113.5 mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3 221 110.5 mmx1rc8cv2t60pvyye2mylydmrp970nawa542u74894ejgwufzg7lycq505pp0 213 106.5 mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr 209 104.5 mmx19tp63ptrre654er8rkx5ntgt4z048tutqx4yplu7daxwm2tgk2gq8hp85z 209 104.5 mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map 208 104 mmx15qatp4v00zymeq92dmz2sfee0twh36n7vutwp4kcjhdktye8zkjsqftneu 200 100 mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv 195 97.5 mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf 193 96.5 mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3 189 94.5 mmx1s90ctrk4g65jv9l8zcysjev9ms3v45uvktp5k52l94m97q0gfpeq886vq5 185 92.5 mmx1js6nrvnl94rcgn8k80dx6uz2da2jj64utkrxqhmvcvuescmrpwwsvh2vna 181 90.5 mmx1e2md0mf5cu5uxmme0hxt4apxg9nd7elstzcr7v393nxmgm0rvryqlr557x 174 87 mmx1uhw0fqjy4v9stnzuc5fjrelvep597jx95hcm9xr7d0pqt32cenms0ggwv3 172 86 mmx16y2cjvyxtwgkm5m0x2wy40g2lc59qcept4dqjakfygwghhxnsx4q5cg5xl 172 86 mmx1cthy5xra5u9kwcdgp3z0x55grrj4xv585g69qath07dqrejrct5qk9xrck 171 85.5 mmx1an3w925endfhcg50qelq69ahwvltupq4rt7wvnhfqd8leg2526qsgh2ret 171 85.5 mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp 168 84 mmx198yry5ttr65tnmftf4ppzjwvxhqngyncxy3sq5ucz8edmsg5umwqs4u2zs 163 81.5 mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu 157 78.5 mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw 154 77 mmx10vkwltacvwvguxk65jg79d64pnxvr5jpvxmd66smnns7daa6xsgqu045qd 153 76.5 mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g 153 76.5 mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t 151 75.5 mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu 151 75.5 mmx12q3pverdv5c465fjeryz5uxnvcjpacnfanynclgq8g5fwj77y9ss2r84v0 149 74.5 mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3 147 73.5 mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl 144 72 mmx1qn4ugnczkfstu5eh7quuzce30c03uv3etl8u7m426zrpshxpdrvq07f75y 139 69.5 mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu 138 69 mmx1zngflag3hu0axh6r6yutlqxt9r7vwd3fh243frzz5gtmfysqeysshp5vuk 135 67.5 mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf 134 67 mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0 134 67 mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s 133 66.5 mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr 132 66 mmx1avcekqg5tnavcwyw7qs97809yzh0nzq5l9ltyjljelygwxtp40esgyw665 132 66 mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t 130 65 mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57 130 65 mmx14dze6kxepm2ensphv2z0ejl4kc4hks7gwajnjr9nfpw6glnqc4fqz53s5m 130 65 mmx1xv2dztq36sk27x79gdja33zk6lv8cytmjeqkvlux788rd55l6fuq09zq65 127 63.5 mmx1td9zpd4vwncrlgy8kkgft4vkck4yep5nagxr60anls4vrlvs88ts964kg5 127 63.5 mmx1k738pwqe95qv3g8z9y0lhxsxgvf4z5dv0qgq9eh6vcy7u6juc5usrhgpsh 125 62.5 mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3 120 60 mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l 116 58 mmx1ug0nljja9d525wv5n8z79vgdjh9vxpf5hf57r2gyu73cm86pcn4s7v3ccg 116 58 mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt 113 56.5 mmx1qc75vu9xfagl297yupuwl3jgqsecwlae3szn9lwpg9m5p0zcnzwqe4adsz 112 56 mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f 111 55.5 mmx12v7y2c99f25yntuk0dxpu4kwectxx62l7hvqsj4acuvvx0xsrqfqlds5l6 110 55 mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60 109 54.5 mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9 109 54.5 mmx1s4zvd257h9xqntzj7kd08wnktrzuk7xlya9ttlv2dmkxk79ykz4qzvmjvt 108 54 mmx1pv3lnp3q5kgp28u3w3zmxreft85a3mf4v3rk8qazpxnzwe7ykays5tjlwj 107 53.5 mmx1psgwgft4tf7ult8p4e5gjp9un75t6fyzaxmhr9e64lmd6lf6kgcs53s8uf 107 53.5 mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s 106 53 mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d 106 53 mmx1kft6gj0a0upukl0dy3qlakx0pm4de4538v92l6saa79jsqkswzcqhjtu6e 105 52.5 mmx1g9fl4jus2fumcnkw0k8w9df5cln8yukhrk3kzwuzk5rg68ndmjyqftzc4p 103 51.5 mmx1vcp6ksuysun2pdtkrukz6lh2dd7g0d2lpyjk2m3ffylq0yhn4ntq9fpmkm 102 51 mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7 100 50 mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn 99 49.5 mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82 98 49 mmx1kez0lk0emjezwdl88ee6c5lvcqftu7l32ksqgl98snkdzke9cyuq58fs6d 98 49 mmx1gmvuqg5x4tn9fj53vsgahgwqa9h4jx0cz4x7xpet67kxu8n33fpseycg9t 97 48.5 mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp 94 47 mmx1grclm0x96ccghh8574wnk8wmmee7g8sxt2emh6mgedezdntecsfqrtaz2t 92 46 mmx1ygz7gwf3at3409ggncyfpsyp6cn0ralc4dhezcnkzsxly07x0tgs759304 92 46 mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5 91 45.5 mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq 89 44.5 mmx1na96yskrphrrswsg8rwe0e0gwpy4n360t37u6guxwa42a26wqa4sqpfm9s 89 44.5 mmx1pmecze7k5a4ld66auxywxljxnsad9ducwgzmy4q4k3d6ma6gr3tqtkfrnp 89 44.5 mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c 88 44 mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs 87 43.5 mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88 85 42.5 mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj 85 42.5 mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl 85 42.5 mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt 80 40 mmx139s60xj6eeuj5s0fvhgea06up5yy0ucn2fayvg4fd90xyeq9guwsv35zcs 79 39.5 mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05 79 39.5 mmx1h9ahw37ekqwx5sewaszmj54cn0l0pmzrksss7z0320ntkt63q6mssrfkkd 78 39 mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj 77 38.5 mmx1lzdxlvkgjgn3flpqqvda4rf43pxed09ycwhvz400f5m0x5306mjqxqkfq9 76 38 mmx14ljuxjzlu24djfrm2varlgvfup2q0keydus50mrv6qy2qpuxu2lsmm8gza 74 37 mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql 74 37 mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf 74 37 mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm 73 36.5 mmx1ksu3c85u4gd20v5dy5nkjk30fa7endp9mc2za37gr6tuak0y604susek8w 73 36.5 mmx10p75878akjmna30s8kjwnaveql56v2a45tw20fw86ruhvc8x5pxqrqemq9 73 36.5 mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym 72 36 mmx14emrk4d8vzp3c2yztqrzhnmy8r9tsnywrpmfrl838q50j0xjenjqay73ld 72 36 mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05 71 35.5 mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99 69 34.5 mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej 68 34 mmx1cg5zspl8na39un48fm04caj4xpphaerynw53vnjlwh42f528ns4s53jjv4 66 33 mmx15drd8dvlexsa460klqa0dqlluy0pya79z7lnkvj08zgzuncnzt5shqewhm 63 31.5 mmx188uhxreda27mxl6lth04vl5y2da7qkldg72gvalsth7dkwxeh23sm9juwr 63 31.5 mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw 61 30.5 mmx1geumptg36crcywp4tzfqeameymf7x9a43qqde9mrpaqxqjernlxqytcsus 60 30 mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0 58 29 mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c 58 29 mmx1p7sg2mhf3sknfuefhrrvqg73x8pu23wrrc565rpgqz5j8ke0vqpspgxpvx 58 29 mmx1090syeqn56ezxh9tzlw2006pqxt34ytn3ytfrkxaqaghh40cncwsya49ev 56 28 mmx1998n5nlledt8puwx80neyvle5xkayw0uvgdhuwup6gtpzd6ym0gqp5qzy4 55 27.5 mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj 55 27.5 mmx1gxx98xmhrcdv4ez5fxekmnczvwuqns3geh3wcj9l463d5jgqcwjqv35gpt 55 27.5 mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr 54 27 mmx1tyrnks330n6exxr84vz7d0mjsmpey8p34kuzy07g4nrc7txl87ks63zmhn 52 26 mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al 51 25.5 mmx10jqs45t5ujdwtqyft07f4mxk7y08fac4ks0z6ee50n6fkq67992s09ezzz 51 25.5 mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3 48 24 mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy 47 23.5 mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f 45 22.5 mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc 44 22 mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm 43 21.5 mmx1efmq0tdmmpv7k7dzd8nn5ta045f9fdylk9pa848hzshh82zlxf5sganjdn 42 21 mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan 42 21 mmx1eymvxpnp4seshcfn5qfctlzsukazt49t3m5zgz9q68g4sry89cfsggxcfa 40 20 mmx1h6lg70tzjmvsucw3c7mmdf98p553aj0hfd6sl7nekq4yucf4xnssd7hudq 40 20 mmx1rqrc4m6tecvqhn8rrkh9akq5hea56f36w0hkdg933qn3yxyahfdqne30lz 40 20 mmx10aqhm9gswd5eakqkmdl9248j39w37wtwz0vnqzpxp8tsk2zhy6kqcms8w6 39 19.5 mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l 37 18.5 mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu 36 18 mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9 35 17.5 mmx1lgsye5dkh57mxj0n2glerlmdzrh76snfte6k92gvxemkuhvug5eqlhcjvm 35 17.5 mmx1nr0cpl0g86e0wdzuahcc2x7f4pc63n2y6a6zpnsjt5lfsctzmufspp6vd5 35 17.5 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 34 17 mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2 31 15.5 mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g 30 15 mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq 29 14.5 mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj 29 14.5 mmx1tsl59gk2ahk0tkrcwnhnjh2kcnfnhyljt3n76h0cu00ael973k9s9dj2aa 28 14 mmx1pu8fla0axf3227ttsxggudd6ym9u9vs7nwcrs8uk799ej6yegvlqhnjkd2 28 14 mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3 28 14 mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z 28 14 mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev 26 13 mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg 25 12.5 mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80 25 12.5 mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl 25 12.5 mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9 24 12 mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g 24 12 mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27 23 11.5 mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn 23 11.5 mmx1hgvgalxcwyssgs5gqsttsfvmt2297u2hw4t7cglllnvswkhg6xuq285wez 22 11 mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2 22 11 mmx1ls8zjlv2t0prtqvuy4pkasq8a6axrjythsu3nvsne5uzmkk82clqh28yvt 22 11 mmx1eaqtuwae4ha30s0vsk2ywg6kp4h6gj9m3ccqqfw7vpp50v49aeysg8hk2w 21 10.5 mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7 21 10.5 mmx1hsw9sez050ewlwv0wk0e8eglc5cj9807n9rxmzlgrhwsdltwh3mqvyuxjt 20 10 mmx1lnmtuqh7jvxjsmmsf92ulcavxtr4fjhzva774zhs0fwvctzf7vgs53cn9h 20 10 mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s 20 10 mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn 20 10 mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch 20 10 mmx1lap90zlng56y8scl6qt8pxrljpme7mluaupvv0rl73067y5cxpqqjtpxzm 19 9.5 mmx1g4uyjjhup8hgk6akrjqvegmxu6xg98er5pt5uzqn520ud87rlgrqjn8cvt 19 9.5 mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c 18 9 mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru 17 8.5 mmx1ms72mlttvspj4ga668t5xr7k8m98eedvvdwdkmwjfua2ttdmj33qvqyp7s 17 8.5 mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk 17 8.5 mmx1pyy6kkvlka03n5pfgwf476ulyna2kwnx3ep9yjj4uvm8c4vzcy6qf7mg0n 17 8.5 mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m 17 8.5 mmx1njy6t7vkta3veyjj4atvr6ppmeeru85tgh5qvhvnmleslru54m9sqp3l60 16 8 mmx1cke885syq8wasw96nqp9cuh6wcr7sezvy65a3anjqzqhk59j9s9s7jl0gt 16 8 mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc 12 6 mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t 12 6 mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0 12 6 mmx10wkjgn0uvyzta7dh4dqcx0q6axx68mdctvkveptmls2e6xnkfhqqa4zlpc 11 5.5 mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q 11 5.5 mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45 11 5.5 mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4 10 5 mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w 9 4.5 mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku 9 4.5 mmx1rh2lur825y90gqc5pxmejgk5d8wl934h0v8lv972rnevrfhpsmcqsqywld 8 4 mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np 8 4 mmx1gu2uwztus3hpv3wa26m7jfap5dum53elfglgn6wrfzm4n70wurhswl6vwx 7 3.5 mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0 7 3.5 mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg 7 3.5 mmx1uhk9jfs34j5a77qs8q0vvk0k2hce5g6y79mr4ct5aadhsf4mt4gsrxkea3 7 3.5 mmx1s84f0s73prw0dltnhwcsw62yqhtk8kxrsvrlmudsvhpgkdezc7csrds369 6 3 mmx1h5mtjmq29qwfpwzvtk8ny4gpk3a20nny5u6fda97mga8t3xfm9zq6c6htl 6 3 mmx1eegz7fuml4vntktg6jarh64sezm259qyamm6qqtghrsxf3mkryts6k4hu5 6 3 mmx1ueuf2ej4q52xk4j4vd65zcuy7vryx0jy4mjag6u2n78suwkz25ksvqvqm5 5 2.5 mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0 5 2.5 mmx12s69aw0638j3u02s3hzfpklx4zfh5u42vac96scsx4468kzj9xfqxk4659 5 2.5 mmx19klllx0v4jamkq6v2qaw9pyx5fdfvnayg5cahu6kqmajzvu82n0qlx7m63 4 2 mmx1edrjz53g3n2n6f3jar5prh3269ldncltyts4v7l6hheppzsczsgssp32ju 4 2 mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n 4 2 mmx123qaxyt562xlfdxn7fg52nxx9aq6gp8q3jn6kya98xmn7n0z62kq09hk9k 4 2 mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8 3 1.5 mmx1d8mj6q8tj54rejhx37skuzn88tld7emw3wra9agvjx9glraa8xaskpa5fg 3 1.5 mmx1xjzpf826avm2g0puuxkv77uhts7pssram2g3eefm0t3pkpce9s2sf8m2fu 3 1.5 mmx13xu3ay8eujt4neuwyhxw002r6qlj0v5p8ldj6jus03ev0w5u7wpsxdd3v9 3 1.5 mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0 3 1.5 mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9 3 1.5 mmx1w34up6qcsu5x8aw074ps0fwe3a5xj8wskwgrdjkjnf6v5pq5mahqs3ea04 2 1 mmx1vexr269f4nrep3gq2h9uxkwvavtrxz372umadmfzupy9jamh545sv2zkch 2 1 mmx1mtd7200fs2t6hvag0qd5zwgmeg93yjlcst4uztfj3tmx6z7xmt9srj3xhq 2 1 mmx1mg56jxv3e0plu76824vw3w72kqumgyp2hetfg5s227lr96vjzd5qr4gxnj 2 1 mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg 2 1 mmx12j3mpzmlpx9d77ux2990xwdhus99626yj3s75kyaxt4r80n3638s237x44 2 1 mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7 1 0.5 mmx19wes3z0lafn8tge34fupwqs5kzf4mvm3xt7p08u0qgt0d0dg0kzqy2eh4k 1 0.5 mmx14fadj8tx3ksq8jvfmcsuhxnxmmn0lqdlpjs5rs8dfqphgsuluqfqxgys6j 1 0.5 mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7 1 0.5 mmx1ayukxr9jcev25gddx8yfpv27hauw0z3xy9z2jwzdqk8n624seayqkjhm9d 1 0.5 ================================================ FILE: data/mainnet-rc/timelord_rewards.json ================================================ [["mmx1d0xr746m7nqek3rplkuv6xjk2ne7ul0q45cjgp8gtjkut4eh8apsht6yzk", 56618], ["mmx1z3wfe3x5ahnzflnankn8qjc7dlcfld79n65zz878cupxukqq9akqmayj2j", 3590], ["mmx1hyfskfa3wpxgtajdfskdmgljj3tr7wna6jyqxqdecdeup5rgn24q4e4x67", 41307], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 85], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 144]] ================================================ FILE: data/mainnet-rc/timelord_rewards.txt ================================================ mmx1d0xr746m7nqek3rplkuv6xjk2ne7ul0q45cjgp8gtjkut4eh8apsht6yzk 56618 566.18 mmx1hyfskfa3wpxgtajdfskdmgljj3tr7wna6jyqxqdecdeup5rgn24q4e4x67 41307 413.07 mmx1z3wfe3x5ahnzflnankn8qjc7dlcfld79n65zz878cupxukqq9akqmayj2j 3590 35.9 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 144 1.44 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 85 0.85 ================================================ FILE: data/testnet10/rewards.json ================================================ [["mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92", 37], ["mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93", 90], ["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", 16117], ["mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8", 1280], ["mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh", 2992], ["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", 1056], ["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", 6144], ["mmx1as0ezwhva4ch25cssuzrv8hr2vk4fyt8ycefdtx7dnwt5rgadcps7ezzc4", 4417], ["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", 1334], ["mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u", 573], ["mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc", 280], ["mmx1vprl39d98qzd3u5nk95qnhus9vjp4sen2w7y59yu0m5udqll6szquzr6y5", 88], ["mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z", 6640], ["mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0", 20], ["mmx1seel6072m4ywm84s0e283gl34drku8p764x7qmw2ae24pvsa6crs6eptk7", 33694], ["mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa", 1069], ["mmx1u2v2uf8seke36nxtxh90hpgh43dy5py836ygkvqwaqx5jhck95ysjepx8g", 25], ["mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935", 21211], ["mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37", 154], ["mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc", 106], ["mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y", 519], ["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", 2407], ["mmx1mhp72cd0lfnlfpfuclh9p6uqcuu6y0cr4cx7qnk266hleawuyuxscha8vw", 292], ["mmx1pmjftgdx7vsmtydypwy6qe8tnmtc9wgya5s2yl23myvk98c83uxszm6cvd", 537], ["mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c", 35], ["mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45", 22], ["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", 3758], ["mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg", 1826], ["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", 39524], ["mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np", 227], ["mmx1c4sffu66s9eepqph3kfjarh4fp5h5dhl3u0r8jvrqlq4jkdp3sgq4dcav7", 681], ["mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j", 5134], ["mmx17vr7dm99pccp240q7kr4ynw0tln4r6h9n34vc9dcdk7gch3dcqgscgaw0w", 1523], ["mmx1ppglv79lx5ahk8a2cjpfsdvzx6y94c9qzswthyamhx09vcfqnufqvgqs36", 4], ["mmx15fpxwx7ah2d8wa0sknq05gplj90xpxf0xknweszyhdd0eacp4yfq2e43z2", 38536], ["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", 5817], ["mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5", 156], ["mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3", 330], ["mmx122x5elltrsykqwy27q4jpe405m5d6aaxtfte87mjl6zty5e5ju2q9ucfz8", 282], ["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", 20262], ["mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40", 118], ["mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k", 857], ["mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd", 837], ["mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48", 864], ["mmx107aackvhak3d2lapgz6qprp9785qfudzrclptqzvgkpzly2ppqtsypk9kk", 2597], ["mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw", 1073], ["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", 190434], ["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", 11353], ["mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7", 199], ["mmx1thwz6ymnevqazuq0y5ry73hzu4h45mv3a3a0qdzn8l2rjfxa9sdq0c4clz", 6], ["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", 1102], ["mmx17naccyvydtmkgnaqvu7q3dpphzv3grdsgm0fk4ja220v3nxwnywqwss094", 226], ["mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k", 90], ["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", 1489], ["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", 1195], ["mmx1vkya64sext8u0kcj2fsrezryfvxyprez6xdxapkzpcywakxh7v0qu63esv", 701], ["mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9", 4709], ["mmx1kn0k496puu64hyutyn6augc2cj52rc4p0vmmfcceqezp2y5kfv0s6ddymx", 97], ["mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6", 528], ["mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa", 841], ["mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs", 17145], ["mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs", 3274], ["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", 1545], ["mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj", 4294], ["mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn", 980], ["mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e", 438], ["mmx1x3rjuxmvmcm8x7eaqjkpxxc3r9nudd7erx0g5uffj687vvx62g3q9gq8ed", 465], ["mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6", 73], ["mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q", 665], ["mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev", 2184], ["mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7", 610], ["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", 1497], ["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", 8767], ["mmx1kn9t8m4uxn7xpqpdy34xhxrdkuzs5tuhjqyc8qxw69decxqgtcns9yq940", 161], ["mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u", 2427], ["mmx1xthtx2n39nvvjrrkfpshq2v6hltn82h36dnxyg942h6drj2q6snsxx32gu", 898], ["mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6", 6318], ["mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7", 341], ["mmx10cj7u6uvj7syxwdjzzu5wzf6tk75mcg8px09sm9fas2u3le48q5qayp5gk", 1249], ["mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf", 4137], ["mmx1pangjagnfffhfwpk265ry6a3zch4rs2kgp2rup7pwtuphgmsls5sj55j2h", 1423], ["mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5", 2528], ["mmx1eskq3mechm032urxq0nymxa4nx8tn56s626ftknpw4g2edppag4qfdfnpu", 1353], ["mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660", 5621], ["mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej", 3164], ["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", 4305], ["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", 1570], ["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", 1496], ["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", 4045], ["mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl", 48], ["mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29", 321], ["mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl", 74], ["mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu", 9240], ["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", 5944], ["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", 1366], ["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", 2059], ["mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5", 17071], ["mmx14vvf5wwml9crhjcl7easevgykv0tar33364rhta9wkna4470uuhs7e7zs0", 222], ["mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf", 5379], ["mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg", 364], ["mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh", 1998], ["mmx1z66g30cq7j7apzf29zmdsu28m5vrqw9x8m9jh2a3vddrxz7fsqcsh4gv0w", 3983], ["mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl", 3434], ["mmx1cjqcmqm597re656z5w5jq99f7fvyth7wvhz3v4u9xvyxxyjyv5esl8yqfh", 2], ["mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8", 263], ["mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552", 3942], ["mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88", 123], ["mmx16ugged4tg26wydz3g2wasqk96ghz88nk6qzkcsep6qy0r4lcls6sk95mrj", 1], ["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", 720], ["mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh", 174], ["mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65", 1510], ["mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf", 2356], ["mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j", 12957], ["mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je", 687], ["mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk", 3918], ["mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8", 20967], ["mmx187llktd264wz7f33nqexhh8frcykztdg0emw5t26cvmzfng8dquqzl8qwe", 369], ["mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k", 6966], ["mmx1998h39fzrpfxvgc54r0fmmuq48hj8c372gradmy2x6gq7r45suuszqtk3c", 627], ["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", 1437], ["mmx1ze8ugap6cs90ec5tguyd9hg9g2xv7fyrz6s78ewzlsk7uwn3pvas3dnmt3", 318], ["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", 10496], ["mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl", 268], ["mmx12j2e0ja3z0up7t0csl2fmm52jd9mrc29pavccn67uhadrls4457qpv7qls", 310], ["mmx1n2y0dl7ktdrvgvv96kde4d042jt4e3722ftpevjcmfmqquyycv7q7s2d2k", 11], ["mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s", 677], ["mmx1nqkt86wlfpkvjylyqdsy4pa2e024cjpfnczt667tshtsv7uh6g7qd8dnel", 1228], ["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", 1711], ["mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c", 1709], ["mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp", 1972], ["mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg", 9584], ["mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py", 1077], ["mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w", 1119], ["mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88", 1455], ["mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn", 1155], ["mmx15fa2hl97h05swu4k5n8x6h6h4f37u0f09pakeletnl6ew5ak3pqq29f93n", 42], ["mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m", 173], ["mmx1eztxn269lt6rfy0kzkrv9ra79su4ujrua0ukxjxktdgf4zdqnaqsu3xfqg", 7308], ["mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4", 8180], ["mmx1da455czfvskaeewg4prqrcysxuzm0x5kgsge3fxafz3e6ddmvppqpyg796", 22140], ["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", 9132], ["mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma", 11837], ["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", 98], ["mmx1j49546jumejnzwpq4ptdal0acmje45de4y9c99pjg5kglmazrazqxex7qz", 1644], ["mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e", 1195], ["mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e", 4230], ["mmx1f9rjvatrgqk6fyyxc522xrt6h9clrlvy49nx8swanx58t2n4g3rq9nwszr", 194], ["mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y", 6278], ["mmx1r74wdy7kzh2dfdcumhc85tuherczlt8c4dsqdl03ufyg2lfa4frs2qmwlp", 21], ["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", 19325], ["mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq", 14827], ["mmx1hl8lnr4ddyyqynx5qj5psv63ah7atfrt67s9eszlck5dy5yy9aysylv93p", 7572], ["mmx1x6r4mtz74u0walwxhe4qxcu4cm4vkzkgjsj4p8a6xn9z43zg33ys37vy0e", 1], ["mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp", 946], ["mmx18csvx9uspv3mp45autfk4dj0t4yzvzyce63gv66nahaq9pct73ys70ezu4", 1027], ["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", 3187], ["mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr", 590], ["mmx1z8wnphkp2d50k2kk3f30eyxtp8h69e3pazzawvwtseuuerld339q904jsc", 403], ["mmx1w0nzjd37pkkewp6ntwfcc39u0w36723amrl2w6rc28aer3m5yexqlztrjy", 119], ["mmx1j3p8gtyajzh07ag8cv2y776h7axrwhvppckxxtltelz08dsaxfxqg6vlwr", 6690], ["mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu", 454], ["mmx1n39pyuyq8slux6rcrvpyfqr554tcytn7nfrmwjetkkryeww59fxsf8qvm3", 117244], ["mmx13k0anxdyn6e27hful6t63mugrh6asm8vphxe0rg57a0p5p5ttfxs0dy8nv", 94], ["mmx1tdzqj2k7uw97ta3x459s7mk5jt2uh6p8znxl7f7u38davexzk3xs6tktrp", 6103], ["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", 5588], ["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", 16495], ["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", 4877], ["mmx173tum306ce679gav9xyzv9dw7m8fhhw4xh7g24xwmgqxjufv6a8q3az0ta", 8], ["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", 2549], ["mmx1d4580utep9epx933mp6666886cect39qt9dl30qwxj767fkxpfgq9h6y3l", 1263], ["mmx1fk0jqxyz6eh35qnlu70gx58v6ahgng29e4k6zjf6tqxa96y7p3gqu8w8qq", 493], ["mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg", 938], ["mmx1drdacsxd6ssaa44mauseapmf9cm0f8nah6tqpnw5hzs5r7vntafqqzqwzy", 7584], ["mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k", 116], ["mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst", 7095], ["mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx", 923], ["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", 10493], ["mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6", 11], ["mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z", 6157], ["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", 9850], ["mmx1ysxav0zk4halpp9r56m0s3cua7r62cfx57snu0s6pqqz56qqt32s2j3jzy", 7], ["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", 18348], ["mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm", 1929], ["mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm", 3661], ["mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4", 3406], ["mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx", 4001], ["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", 2123], ["mmx1lntqvyetpdaqzkw4f9hqhuh8kkf3f7u3rl96gxz3lgztfptfaevqk8elws", 2272], ["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", 2035], ["mmx14ntt0scarmrahc8dq3xfdwqqpuxddh6ez2qaq4dcdyyw0acwuevsumdgvh", 1810], ["mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh", 30], ["mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c", 1584], ["mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd", 5314], ["mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098", 198], ["mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk", 151], ["mmx1z9yl7zqwrfje5kc6j33kenvpxcyn6jztq8aq0h85kf6r8e0d9p0sumlzp7", 85499], ["mmx14fz0p5ff557c6sh6xx3ssztc8sv8a023cqugskep0vm4j85rna0s7fu03g", 211], ["mmx127sjp7qqmvy2grl0wa675djhjll46pg5rt794cvdp6s0gahg0asqav09gt", 2916], ["mmx1ahnruulrdycd5dr4xzjyymxgf7yp8n90r437ynysr2gz8n2vmpsqxk3kev", 3360], ["mmx1hut2sx0lenf2wed9atd23zp8ps8ntaacmjkd4mym8m05pcz69dssrvr0p2", 6], ["mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7", 554], ["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", 4558], ["mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re", 902], ["mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00", 603], ["mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx", 34], ["mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn", 57], ["mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2", 131], ["mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7", 17], ["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", 8356], ["mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x", 16733], ["mmx146y8qu72rkcw0xrs8vf8y7j423t42rtyynze5d3kw6e79vdsdenqj3esfl", 26], ["mmx1x6j2m793ten9em7pu09q8qca794vrvrdc3jcw4yzc8zup0zrh45q8d2lqx", 34], ["mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay", 2337], ["mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7", 1068], ["mmx168f4qnz2e7sugjdv69keaqp2mswys30sqpyskuqmzmakqyu94d5sgt3qcq", 532], ["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", 6982], ["mmx1cgx3ck3dmznw8xg78jc9xfcf7rws0yrkhpj5tymnc25dteduu35sd6p92j", 1069], ["mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl", 6590], ["mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g", 631], ["mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66", 85], ["mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h", 367], ["mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6", 7587], ["mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc", 440], ["mmx17l3xstvyx5rqxzqvswwvf27zz38ckt5q2030selhwe4elqzwe4hscxf06z", 1871], ["mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3", 410], ["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", 5194], ["mmx1hfhn035wpjnm6yhl223rh55e85a23ksp679ku6kpk2n7klxxaecq4xw57p", 1660], ["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", 7663], ["mmx1kvyj70vfnwjwg6je8tf3dunrwrafy9mlm2wtgqx95vwgnz2mrfcskpydtk", 9726], ["mmx1d9gx5anuvxgg906tzj0rdkhyypjtrfc09ufdc7yykhp9h46mxecs2qe2r2", 16], ["mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y", 243], ["mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw", 1861], ["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", 127], ["mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5", 2080], ["mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9", 514], ["mmx1f8yps5v4rqakx3gyws5hhlrmapcjzzf5j80dm655ehcrf6qgz36qandk5l", 690], ["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", 3904], ["mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv", 1994], ["mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z", 635], ["mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc", 2477], ["mmx16d3ry985fdkgpvj93xygv0tn2wc9ylpex6t08qz0x6lat9km6dmstdhdhh", 22066], ["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", 726], ["mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw", 33597], ["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", 78314], ["mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy", 3001], ["mmx1rd9psq4y4kt4svwhkvsj6aqvrgwmf6t2qen6yfc9fw6thzrxt4aqmjvmvj", 531], ["mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf", 15867], ["mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd", 14338], ["mmx1kyul6v54l7jhjr58e5lnqelmwyaqdy4mesqwr4wfw4ku3mvac47qk8qcj0", 1228], ["mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp", 75], ["mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8", 311], ["mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq", 1514], ["mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx", 2606], ["mmx1v5u67yws0zlnutd4lw0gqk8dk75xnjj3k87rnzjqurx3lpz7aflq863r48", 545], ["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", 265], ["mmx1e2c8sqytwagkr6ekc74p7sqhzd39g8a25d2k5fqj5gckmrk0xdlsadufvm", 1173], ["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", 7754], ["mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y", 680], ["mmx15098ny3pc66kn6sgr6t8jehvwf2yzcxm6lxljvr7dfxs3g4u5plssgudwl", 18643], ["mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4", 34474], ["mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng", 308], ["mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl", 184], ["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", 6975], ["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", 7163], ["mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3", 1469], ["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", 4599], ["mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8", 85321], ["mmx175mntfhx53xw93y6e7g228apv37j7vwt23syhtwnc3h0saptxxrq9mt0c0", 346], ["mmx1rwglj5p9s436vdf6y33fu89puyl4sauuv2c6jmpadnqa0jmxezrq7mkt27", 1], ["mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p", 2547], ["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", 2826], ["mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde", 2090], ["mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z", 1601], ["mmx19ud3ev0q0tcrpsmh05tggwt4n2nkwrzrrtuwtyv0pl2t3t9w52ysy954ch", 546], ["mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m", 1917], ["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", 332], ["mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens", 3377], ["mmx1y0ream3up46cckzxl5tj0djvj7numxvrs2staw8zld5297xugz9szhfpq0", 9752], ["mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6", 1141], ["mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05", 29], ["mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj", 284], ["mmx1qh002xzjsedzpuzqq4cz6spv4qayuwhyt84j7pd8zeylqwl0k2xsnhg9y3", 477], ["mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz", 3], ["mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw", 25165], ["mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v", 6344], ["mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d", 195728], ["mmx16pnkxxv9mu42n7t4pte95ftduqz9ntrdd6u5epqnj5mkdn249wgsmkm77g", 9209], ["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", 28459], ["mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr", 19409], ["mmx1eyu4e3yl3psnywtecgefejdmcpdlu2z67cdma96kh89egt9x4xgsvvejlu", 28], ["mmx1um9jpra87stxs84lldpz0qt25tkxh9e7atmpula5m8kuu5gzszfskfa0r8", 362], ["mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g", 4486], ["mmx1trjmkvfv40ngnfmvc5uw926gw8fndanpnp7mphq2tgqwt4xdw62qmrvn3a", 90], ["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", 29066], ["mmx1qxr2rcnvgcwvs3304d8rlm8kzcg3cdrfdnrp0vq3t6eku4g55xtqw8kd9w", 1102], ["mmx1yht9eg80753876sq3qjljn7nwxl300g70rauqran8qkvdtrtqzvqxkdxq0", 98], ["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", 6045], ["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", 7707], ["mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr", 2391], ["mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38", 361], ["mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg", 1102], ["mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d", 331], ["mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3", 5798], ["mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4", 4660], ["mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824", 46534], ["mmx1n5tgph6psu6a3z3u365ed4xmcm66tdk2pyltztvsy7pzunhfu2dqahcdcz", 2], ["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", 4], ["mmx1ujuywt50nv9jgt4tsu32mcgurtlu9zfvjutuvjk00d5k8peagwwq44fmqv", 66], ["mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k", 158], ["mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45", 66], ["mmx1ddu2qyh383tuc3z88svmn7adgekm59lv2r3yc8cg35vclqqztwwsxcg356", 6], ["mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav", 1531], ["mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj", 50], ["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", 5658], ["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", 595], ["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", 8434], ["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", 1318], ["mmx1k32fdxpu9d7lwjc9hd7qw6pz95h2summn9mu2ckyunxq5e20wk3qx7h986", 1], ["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", 784], ["mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g", 1664], ["mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j", 509], ["mmx14ecmst5fxu52vry0k6zy9merf9m8e38d2vsw6e0kfa4z6wkptz3slcxcpz", 1114], ["mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej", 597], ["mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57", 17275], ["mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl", 6673], ["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", 2076], ["mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh", 1593], ["mmx1chmqhg48plemff47t5hrc50p7sk809q337uvwn6385cdl8y8a2jskzzcwc", 723], ["mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy", 7656], ["mmx18jk3gsj6r4y3esc22r0qvxru79ues6z7keha33ahn5tgahxzcknq48ler4", 117], ["mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09", 148], ["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", 1052], ["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", 94], ["mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z", 197], ["mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2", 490], ["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", 9665], ["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", 14601], ["mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a", 308], ["mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6", 110], ["mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4", 5892], ["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", 912], ["mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc", 131], ["mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm", 41027], ["mmx1h6lne788w8u58dn0lquz3kjp22s0xkz08sjlxx3zpmwup9k8cjcqupa8r6", 1], ["mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4", 2956], ["mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2", 59109], ["mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda", 1520], ["mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc", 618], ["mmx19rwdhaq7taarhhqexejf6frgdk5z6c0zd72c4mvu7k4cwmcxn2es78g2t2", 51], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 2925], ["mmx14tkxv7wnyfjm45lr03j8r2qac5hsa9mk75emunjg78qngwgw66essvzga7", 425], ["mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg", 129], ["mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7", 455], ["mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy", 1562], ["mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7", 51462], ["mmx1hsxpdkzeynjv6dswp89klcu6qc8gn0vghz54gcpa95z0m5m5p6ms64gd99", 914], ["mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782", 1547], ["mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2", 2393], ["mmx1k9mxrjecdztfeggk2v3urwmkeg90f8dyq3rqmlxxag0ewqdpv6usvk2rqc", 1039], ["mmx1ptz2hwskzvmmwa6a3zxvz0hw44uk4xkuyz65r92lv0jnty7tgwaqvhy630", 359], ["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", 270], ["mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym", 3878], ["mmx1za0yful9pmmgtpzaqq64s9u7nclhrkfw0nzjg2wuvzng6yxex67s0sk7hf", 784], ["mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh", 118], ["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", 12679], ["mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4", 29147], ["mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk", 1542], ["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", 1], ["mmx1yl78ddxpjz4zhe0ypy4jzjgt0kgle2dzhzm4f38wlwpumds6xrpq86kel2", 1980], ["mmx1hm7d3gpykrggjrt5ckm987xdqkvtqrhac05rzz4e5gjg8m5hxmpqgcvv0s", 13804], ["mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs", 213202], ["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", 2569], ["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", 153920], ["mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez", 306], ["mmx12ts7lfh9cr6rqj0h9uhmha99tyep6ln6xtmskp4x9pv32s28jrzq3cksav", 1], ["mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a", 1852], ["mmx1rjnt6cet0cx3m99afq29ssmk8vagnw3qvzrn2h38aawvp023emrsvskald", 248], ["mmx1rd8z3x6ncsk5734u3xjkqskzxq8tlcn00866309kwqc993j4xnyqhs0r3s", 5], ["mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5", 4993], ["mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69", 2949], ["mmx1duvwvwf66cepnsng596tkjazant9t44v6fw7qv3umc05ehqcfmyszvzdu9", 5299], ["mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj", 312], ["mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u", 11170], ["mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2", 22736], ["mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8", 2731], ["mmx14cgd45zee9e06xl39x3m8k076gm4tnkr862m49q7vdeqm5ulznxqeyeuju", 2], ["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", 9330], ["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", 3064], ["mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz", 151], ["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", 8727], ["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", 26526], ["mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3", 48], ["mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs", 1430], ["mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has", 818], ["mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88", 5803], ["mmx10ewttsgpc2vq980wlk0ddtc505vp5edvusl8a388y76peautetfsyj3ej7", 7943], ["mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g", 1310], ["mmx1mk6v9wmyju7spyncrggntg4lm62g0ensg76yjgjhdtnmpls3nr2sd9qwqp", 26], ["mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h", 928], ["mmx1kq7xc88lghdv0mu62585fck3ppnlmdxn3jwvhqpks73wc8vwc82sqzyhjq", 4839], ["mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc", 4284], ["mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3", 12], ["mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d", 83698], ["mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv", 583], ["mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w", 8106], ["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", 62191], ["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", 62], ["mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7", 208], ["mmx1getf4e42wy8w52v4j7dxw52qu93yssytwud90uxyzhg5x0cgptwsathj03", 63], ["mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28", 968], ["mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw", 324], ["mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn", 823], ["mmx10783gzrqc88k0n0ert2nkjz9ams2aj77ux4t0y3lsmyexnue2h0qem44ac", 88], ["mmx1m7uycpxww03cj05zhdgzjcen70kv3pd7gwsk8grcdtu9ltch6rsq9plyz8", 1248], ["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", 5206], ["mmx1esr5qdwsspwt9xap0du009x6m7whdzw8xak806c82rzc2dkwqh3qu5ydzd", 68], ["mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql", 4364], ["mmx1vv29ueqjqtr7w7wk9vhw8txgh7ye26zgue93prgnq7m8sp7hw03sdwatcr", 307], ["mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z", 210], ["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", 1495], ["mmx1ywsu86chqesuxt45aktpkg78v7we86l0zf8xa3rcer6gn6xw8lnqnwk5tr", 385], ["mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5", 1468], ["mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4", 2033], ["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", 48420], ["mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha", 636], ["mmx12vtlj9qhp0uqhs3m9tay4ujwldpj98rgxxw60fy7huxwymgg785scc5d7f", 32], ["mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a", 241], ["mmx1zrkhjuv3uljccuqjh69vlpmzewvnyckr569aw7frgjz5hsdgflkq0gm7ee", 46], ["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", 22635], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 32986], ["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", 1190], ["mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0", 759], ["mmx13txgtfelvrng6mfjyk84sj74lrl3u7v05wn59659sg7ffup5f8hsl4nhzm", 1608], ["mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7", 1040], ["mmx1nxd6hsaywy69qzx0yktv2v08yskmmq88nfy3l0shgfsp2mpr38cqx89xwm", 12411], ["mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae", 113], ["mmx1kky0cu2dauntftsk8a55rdche6kuhm227qt2ktfsyrhvu7v4yteq8rg4d3", 1168], ["mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq", 388], ["mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx", 158], ["mmx1f2jdndglt2mvq37tc3wp8gtf3l3uql0sn485x80096m59y0ydl6q90ds4p", 339], ["mmx1dtx0w07ng5vaur9twxe9ajkvq4tfsgmgd7u909xxkvfmw976sr6qlyz0dv", 4], ["mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan", 1623], ["mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn", 8563], ["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", 482], ["mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e", 972], ["mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7", 4936], ["mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc", 5673], ["mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x", 37], ["mmx1lpm0wnvfr4l07wgvfhhgzfgy7ur5jf5g3h024gln5ykml60nr8us9wc7tg", 198], ["mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5", 650], ["mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje", 2307], ["mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv", 83], ["mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs", 14], ["mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85", 6541], ["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", 137], ["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", 7], ["mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6", 196], ["mmx1c2jrdpa796438jzxxjw3y68tepmlzqv3e4a28d6t52juznprsm7qpwc0fj", 2], ["mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336", 827], ["mmx1y307v7ha8la3zys39rljvld86lgzklajw4mzur8n0ehx4mpgqm7sm34wsh", 4], ["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", 6845], ["mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc", 1258], ["mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2", 3518], ["mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk", 873]] ================================================ FILE: data/testnet10/rewards.txt ================================================ mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs 213202 106601 mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d 195728 97864 mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm 190434 95217 mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0 153920 76960 mmx1n39pyuyq8slux6rcrvpyfqr554tcytn7nfrmwjetkkryeww59fxsf8qvm3 117244 58622 mmx1z9yl7zqwrfje5kc6j33kenvpxcyn6jztq8aq0h85kf6r8e0d9p0sumlzp7 85499 42749.5 mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8 85321 42660.5 mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d 83698 41849 mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v 78314 39157 mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz 62191 31095.5 mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2 59109 29554.5 mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7 51462 25731 mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl 48420 24210 mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824 46534 23267 mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm 41027 20513.5 mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq 39524 19762 mmx15fpxwx7ah2d8wa0sknq05gplj90xpxf0xknweszyhdd0eacp4yfq2e43z2 38536 19268 mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4 34474 17237 mmx1seel6072m4ywm84s0e283gl34drku8p764x7qmw2ae24pvsa6crs6eptk7 33694 16847 mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw 33597 16798.5 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 32986 16493 mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4 29147 14573.5 mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn 29066 14533 mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap 28459 14229.5 mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6 26526 13263 mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw 25165 12582.5 mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2 22736 11368 mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a 22635 11317.5 mmx1da455czfvskaeewg4prqrcysxuzm0x5kgsge3fxafz3e6ddmvppqpyg796 22140 11070 mmx16d3ry985fdkgpvj93xygv0tn2wc9ylpex6t08qz0x6lat9km6dmstdhdhh 22066 11033 mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935 21211 10605.5 mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8 20967 10483.5 mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq 20262 10131 mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr 19409 9704.5 mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0 19325 9662.5 mmx15098ny3pc66kn6sgr6t8jehvwf2yzcxm6lxljvr7dfxs3g4u5plssgudwl 18643 9321.5 mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn 18348 9174 mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57 17275 8637.5 mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs 17145 8572.5 mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5 17071 8535.5 mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x 16733 8366.5 mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy 16495 8247.5 mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx 16117 8058.5 mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf 15867 7933.5 mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq 14827 7413.5 mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf 14601 7300.5 mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd 14338 7169 mmx1hm7d3gpykrggjrt5ckm987xdqkvtqrhac05rzz4e5gjg8m5hxmpqgcvv0s 13804 6902 mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j 12957 6478.5 mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw 12679 6339.5 mmx1nxd6hsaywy69qzx0yktv2v08yskmmq88nfy3l0shgfsp2mpr38cqx89xwm 12411 6205.5 mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma 11837 5918.5 mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9 11353 5676.5 mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u 11170 5585 mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l 10496 5248 mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp 10493 5246.5 mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5 9850 4925 mmx1y0ream3up46cckzxl5tj0djvj7numxvrs2staw8zld5297xugz9szhfpq0 9752 4876 mmx1kvyj70vfnwjwg6je8tf3dunrwrafy9mlm2wtgqx95vwgnz2mrfcskpydtk 9726 4863 mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3 9665 4832.5 mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg 9584 4792 mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27 9330 4665 mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu 9240 4620 mmx16pnkxxv9mu42n7t4pte95ftduqz9ntrdd6u5epqnj5mkdn249wgsmkm77g 9209 4604.5 mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3 9132 4566 mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf 8767 4383.5 mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92 8727 4363.5 mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn 8563 4281.5 mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp 8434 4217 mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t 8356 4178 mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4 8180 4090 mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w 8106 4053 mmx10ewttsgpc2vq980wlk0ddtc505vp5edvusl8a388y76peautetfsyj3ej7 7943 3971.5 mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc 7754 3877 mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg 7707 3853.5 mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj 7663 3831.5 mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy 7656 3828 mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6 7587 3793.5 mmx1drdacsxd6ssaa44mauseapmf9cm0f8nah6tqpnw5hzs5r7vntafqqzqwzy 7584 3792 mmx1hl8lnr4ddyyqynx5qj5psv63ah7atfrt67s9eszlck5dy5yy9aysylv93p 7572 3786 mmx1eztxn269lt6rfy0kzkrv9ra79su4ujrua0ukxjxktdgf4zdqnaqsu3xfqg 7308 3654 mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv 7163 3581.5 mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst 7095 3547.5 mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3 6982 3491 mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3 6975 3487.5 mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k 6966 3483 mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t 6845 3422.5 mmx1j3p8gtyajzh07ag8cv2y776h7axrwhvppckxxtltelz08dsaxfxqg6vlwr 6690 3345 mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl 6673 3336.5 mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z 6640 3320 mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl 6590 3295 mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85 6541 3270.5 mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v 6344 3172 mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6 6318 3159 mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y 6278 3139 mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z 6157 3078.5 mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl 6144 3072 mmx1tdzqj2k7uw97ta3x459s7mk5jt2uh6p8znxl7f7u38davexzk3xs6tktrp 6103 3051.5 mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05 6045 3022.5 mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82 5944 2972 mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4 5892 2946 mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n 5817 2908.5 mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88 5803 2901.5 mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3 5798 2899 mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc 5673 2836.5 mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s 5658 2829 mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660 5621 2810.5 mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj 5588 2794 mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf 5379 2689.5 mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd 5314 2657 mmx1duvwvwf66cepnsng596tkjazant9t44v6fw7qv3umc05ehqcfmyszvzdu9 5299 2649.5 mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt 5206 2603 mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60 5194 2597 mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j 5134 2567 mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5 4993 2496.5 mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7 4936 2468 mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr 4877 2438.5 mmx1kq7xc88lghdv0mu62585fck3ppnlmdxn3jwvhqpks73wc8vwc82sqzyhjq 4839 2419.5 mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9 4709 2354.5 mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4 4660 2330 mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry 4599 2299.5 mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym 4558 2279 mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g 4486 2243 mmx1as0ezwhva4ch25cssuzrv8hr2vk4fyt8ycefdtx7dnwt5rgadcps7ezzc4 4417 2208.5 mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql 4364 2182 mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0 4305 2152.5 mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj 4294 2147 mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc 4284 2142 mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e 4230 2115 mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf 4137 2068.5 mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0 4045 2022.5 mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx 4001 2000.5 mmx1z66g30cq7j7apzf29zmdsu28m5vrqw9x8m9jh2a3vddrxz7fsqcsh4gv0w 3983 1991.5 mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552 3942 1971 mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk 3918 1959 mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu 3904 1952 mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym 3878 1939 mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5 3758 1879 mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm 3661 1830.5 mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2 3518 1759 mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl 3434 1717 mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4 3406 1703 mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens 3377 1688.5 mmx1ahnruulrdycd5dr4xzjyymxgf7yp8n90r437ynysr2gz8n2vmpsqxk3kev 3360 1680 mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs 3274 1637 mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c 3187 1593.5 mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej 3164 1582 mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku 3064 1532 mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy 3001 1500.5 mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh 2992 1496 mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4 2956 1478 mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69 2949 1474.5 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 2925 1462.5 mmx127sjp7qqmvy2grl0wa675djhjll46pg5rt794cvdp6s0gahg0asqav09gt 2916 1458 mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s 2826 1413 mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8 2731 1365.5 mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx 2606 1303 mmx107aackvhak3d2lapgz6qprp9785qfudzrclptqzvgkpzly2ppqtsypk9kk 2597 1298.5 mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99 2569 1284.5 mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6 2549 1274.5 mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p 2547 1273.5 mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5 2528 1264 mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc 2477 1238.5 mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u 2427 1213.5 mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0 2407 1203.5 mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2 2393 1196.5 mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr 2391 1195.5 mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf 2356 1178 mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay 2337 1168.5 mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje 2307 1153.5 mmx1lntqvyetpdaqzkw4f9hqhuh8kkf3f7u3rl96gxz3lgztfptfaevqk8elws 2272 1136 mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev 2184 1092 mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9 2123 1061.5 mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde 2090 1045 mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5 2080 1040 mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm 2076 1038 mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl 2059 1029.5 mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0 2035 1017.5 mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4 2033 1016.5 mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh 1998 999 mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv 1994 997 mmx1yl78ddxpjz4zhe0ypy4jzjgt0kgle2dzhzm4f38wlwpumds6xrpq86kel2 1980 990 mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp 1972 986 mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm 1929 964.5 mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m 1917 958.5 mmx17l3xstvyx5rqxzqvswwvf27zz38ckt5q2030selhwe4elqzwe4hscxf06z 1871 935.5 mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw 1861 930.5 mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a 1852 926 mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg 1826 913 mmx14ntt0scarmrahc8dq3xfdwqqpuxddh6ez2qaq4dcdyyw0acwuevsumdgvh 1810 905 mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2 1711 855.5 mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c 1709 854.5 mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g 1664 832 mmx1hfhn035wpjnm6yhl223rh55e85a23ksp679ku6kpk2n7klxxaecq4xw57p 1660 830 mmx1j49546jumejnzwpq4ptdal0acmje45de4y9c99pjg5kglmazrazqxex7qz 1644 822 mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan 1623 811.5 mmx13txgtfelvrng6mfjyk84sj74lrl3u7v05wn59659sg7ffup5f8hsl4nhzm 1608 804 mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z 1601 800.5 mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh 1593 796.5 mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c 1584 792 mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0 1570 785 mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy 1562 781 mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782 1547 773.5 mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn 1545 772.5 mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk 1542 771 mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav 1531 765.5 mmx17vr7dm99pccp240q7kr4ynw0tln4r6h9n34vc9dcdk7gch3dcqgscgaw0w 1523 761.5 mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda 1520 760 mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq 1514 757 mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65 1510 755 mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj 1497 748.5 mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs 1496 748 mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s 1495 747.5 mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj 1489 744.5 mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3 1469 734.5 mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5 1468 734 mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88 1455 727.5 mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru 1437 718.5 mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs 1430 715 mmx1pangjagnfffhfwpk265ry6a3zch4rs2kgp2rup7pwtuphgmsls5sj55j2h 1423 711.5 mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn 1366 683 mmx1eskq3mechm032urxq0nymxa4nx8tn56s626ftknpw4g2edppag4qfdfnpu 1353 676.5 mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al 1334 667 mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map 1318 659 mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g 1310 655 mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8 1280 640 mmx1d4580utep9epx933mp6666886cect39qt9dl30qwxj767fkxpfgq9h6y3l 1263 631.5 mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc 1258 629 mmx10cj7u6uvj7syxwdjzzu5wzf6tk75mcg8px09sm9fas2u3le48q5qayp5gk 1249 624.5 mmx1m7uycpxww03cj05zhdgzjcen70kv3pd7gwsk8grcdtu9ltch6rsq9plyz8 1248 624 mmx1kyul6v54l7jhjr58e5lnqelmwyaqdy4mesqwr4wfw4ku3mvac47qk8qcj0 1228 614 mmx1nqkt86wlfpkvjylyqdsy4pa2e024cjpfnczt667tshtsv7uh6g7qd8dnel 1228 614 mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e 1195 597.5 mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr 1195 597.5 mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05 1190 595 mmx1e2c8sqytwagkr6ekc74p7sqhzd39g8a25d2k5fqj5gckmrk0xdlsadufvm 1173 586.5 mmx1kky0cu2dauntftsk8a55rdche6kuhm227qt2ktfsyrhvu7v4yteq8rg4d3 1168 584 mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn 1155 577.5 mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6 1141 570.5 mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w 1119 559.5 mmx14ecmst5fxu52vry0k6zy9merf9m8e38d2vsw6e0kfa4z6wkptz3slcxcpz 1114 557 mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg 1102 551 mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c 1102 551 mmx1qxr2rcnvgcwvs3304d8rlm8kzcg3cdrfdnrp0vq3t6eku4g55xtqw8kd9w 1102 551 mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py 1077 538.5 mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw 1073 536.5 mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa 1069 534.5 mmx1cgx3ck3dmznw8xg78jc9xfcf7rws0yrkhpj5tymnc25dteduu35sd6p92j 1069 534.5 mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7 1068 534 mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt 1056 528 mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80 1052 526 mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7 1040 520 mmx1k9mxrjecdztfeggk2v3urwmkeg90f8dyq3rqmlxxag0ewqdpv6usvk2rqc 1039 519.5 mmx18csvx9uspv3mp45autfk4dj0t4yzvzyce63gv66nahaq9pct73ys70ezu4 1027 513.5 mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn 980 490 mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e 972 486 mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28 968 484 mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp 946 473 mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg 938 469 mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h 928 464 mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx 923 461.5 mmx1hsxpdkzeynjv6dswp89klcu6qc8gn0vghz54gcpa95z0m5m5p6ms64gd99 914 457 mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w 912 456 mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re 902 451 mmx1xthtx2n39nvvjrrkfpshq2v6hltn82h36dnxyg942h6drj2q6snsxx32gu 898 449 mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk 873 436.5 mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48 864 432 mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k 857 428.5 mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa 841 420.5 mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd 837 418.5 mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336 827 413.5 mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn 823 411.5 mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has 818 409 mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp 784 392 mmx1za0yful9pmmgtpzaqq64s9u7nclhrkfw0nzjg2wuvzng6yxex67s0sk7hf 784 392 mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0 759 379.5 mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g 726 363 mmx1chmqhg48plemff47t5hrc50p7sk809q337uvwn6385cdl8y8a2jskzzcwc 723 361.5 mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu 720 360 mmx1vkya64sext8u0kcj2fsrezryfvxyprez6xdxapkzpcywakxh7v0qu63esv 701 350.5 mmx1f8yps5v4rqakx3gyws5hhlrmapcjzzf5j80dm655ehcrf6qgz36qandk5l 690 345 mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je 687 343.5 mmx1c4sffu66s9eepqph3kfjarh4fp5h5dhl3u0r8jvrqlq4jkdp3sgq4dcav7 681 340.5 mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y 680 340 mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s 677 338.5 mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q 665 332.5 mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5 650 325 mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha 636 318 mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z 635 317.5 mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g 631 315.5 mmx1998h39fzrpfxvgc54r0fmmuq48hj8c372gradmy2x6gq7r45suuszqtk3c 627 313.5 mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc 618 309 mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7 610 305 mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00 603 301.5 mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej 597 298.5 mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn 595 297.5 mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr 590 295 mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv 583 291.5 mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u 573 286.5 mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7 554 277 mmx19ud3ev0q0tcrpsmh05tggwt4n2nkwrzrrtuwtyv0pl2t3t9w52ysy954ch 546 273 mmx1v5u67yws0zlnutd4lw0gqk8dk75xnjj3k87rnzjqurx3lpz7aflq863r48 545 272.5 mmx1pmjftgdx7vsmtydypwy6qe8tnmtc9wgya5s2yl23myvk98c83uxszm6cvd 537 268.5 mmx168f4qnz2e7sugjdv69keaqp2mswys30sqpyskuqmzmakqyu94d5sgt3qcq 532 266 mmx1rd9psq4y4kt4svwhkvsj6aqvrgwmf6t2qen6yfc9fw6thzrxt4aqmjvmvj 531 265.5 mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6 528 264 mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y 519 259.5 mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9 514 257 mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j 509 254.5 mmx1fk0jqxyz6eh35qnlu70gx58v6ahgng29e4k6zjf6tqxa96y7p3gqu8w8qq 493 246.5 mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2 490 245 mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t 482 241 mmx1qh002xzjsedzpuzqq4cz6spv4qayuwhyt84j7pd8zeylqwl0k2xsnhg9y3 477 238.5 mmx1x3rjuxmvmcm8x7eaqjkpxxc3r9nudd7erx0g5uffj687vvx62g3q9gq8ed 465 232.5 mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7 455 227.5 mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu 454 227 mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc 440 220 mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e 438 219 mmx14tkxv7wnyfjm45lr03j8r2qac5hsa9mk75emunjg78qngwgw66essvzga7 425 212.5 mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3 410 205 mmx1z8wnphkp2d50k2kk3f30eyxtp8h69e3pazzawvwtseuuerld339q904jsc 403 201.5 mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq 388 194 mmx1ywsu86chqesuxt45aktpkg78v7we86l0zf8xa3rcer6gn6xw8lnqnwk5tr 385 192.5 mmx187llktd264wz7f33nqexhh8frcykztdg0emw5t26cvmzfng8dquqzl8qwe 369 184.5 mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h 367 183.5 mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg 364 182 mmx1um9jpra87stxs84lldpz0qt25tkxh9e7atmpula5m8kuu5gzszfskfa0r8 362 181 mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38 361 180.5 mmx1ptz2hwskzvmmwa6a3zxvz0hw44uk4xkuyz65r92lv0jnty7tgwaqvhy630 359 179.5 mmx175mntfhx53xw93y6e7g228apv37j7vwt23syhtwnc3h0saptxxrq9mt0c0 346 173 mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7 341 170.5 mmx1f2jdndglt2mvq37tc3wp8gtf3l3uql0sn485x80096m59y0ydl6q90ds4p 339 169.5 mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr 332 166 mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d 331 165.5 mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3 330 165 mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw 324 162 mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29 321 160.5 mmx1ze8ugap6cs90ec5tguyd9hg9g2xv7fyrz6s78ewzlsk7uwn3pvas3dnmt3 318 159 mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj 312 156 mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8 311 155.5 mmx12j2e0ja3z0up7t0csl2fmm52jd9mrc29pavccn67uhadrls4457qpv7qls 310 155 mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng 308 154 mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a 308 154 mmx1vv29ueqjqtr7w7wk9vhw8txgh7ye26zgue93prgnq7m8sp7hw03sdwatcr 307 153.5 mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez 306 153 mmx1mhp72cd0lfnlfpfuclh9p6uqcuu6y0cr4cx7qnk266hleawuyuxscha8vw 292 146 mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj 284 142 mmx122x5elltrsykqwy27q4jpe405m5d6aaxtfte87mjl6zty5e5ju2q9ucfz8 282 141 mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc 280 140 mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4 270 135 mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl 268 134 mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq 265 132.5 mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8 263 131.5 mmx1rjnt6cet0cx3m99afq29ssmk8vagnw3qvzrn2h38aawvp023emrsvskald 248 124 mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y 243 121.5 mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a 241 120.5 mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np 227 113.5 mmx17naccyvydtmkgnaqvu7q3dpphzv3grdsgm0fk4ja220v3nxwnywqwss094 226 113 mmx14vvf5wwml9crhjcl7easevgykv0tar33364rhta9wkna4470uuhs7e7zs0 222 111 mmx14fz0p5ff557c6sh6xx3ssztc8sv8a023cqugskep0vm4j85rna0s7fu03g 211 105.5 mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z 210 105 mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7 208 104 mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7 199 99.5 mmx1lpm0wnvfr4l07wgvfhhgzfgy7ur5jf5g3h024gln5ykml60nr8us9wc7tg 198 99 mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098 198 99 mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z 197 98.5 mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6 196 98 mmx1f9rjvatrgqk6fyyxc522xrt6h9clrlvy49nx8swanx58t2n4g3rq9nwszr 194 97 mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl 184 92 mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh 174 87 mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m 173 86.5 mmx1kn9t8m4uxn7xpqpdy34xhxrdkuzs5tuhjqyc8qxw69decxqgtcns9yq940 161 80.5 mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k 158 79 mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx 158 79 mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5 156 78 mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37 154 77 mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz 151 75.5 mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk 151 75.5 mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09 148 74 mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q 137 68.5 mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc 131 65.5 mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2 131 65.5 mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg 129 64.5 mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5 127 63.5 mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88 123 61.5 mmx1w0nzjd37pkkewp6ntwfcc39u0w36723amrl2w6rc28aer3m5yexqlztrjy 119 59.5 mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh 118 59 mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40 118 59 mmx18jk3gsj6r4y3esc22r0qvxru79ues6z7keha33ahn5tgahxzcknq48ler4 117 58.5 mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k 116 58 mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae 113 56.5 mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6 110 55 mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc 106 53 mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn 98 49 mmx1yht9eg80753876sq3qjljn7nwxl300g70rauqran8qkvdtrtqzvqxkdxq0 98 49 mmx1kn0k496puu64hyutyn6augc2cj52rc4p0vmmfcceqezp2y5kfv0s6ddymx 97 48.5 mmx13k0anxdyn6e27hful6t63mugrh6asm8vphxe0rg57a0p5p5ttfxs0dy8nv 94 47 mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t 94 47 mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93 90 45 mmx1trjmkvfv40ngnfmvc5uw926gw8fndanpnp7mphq2tgqwt4xdw62qmrvn3a 90 45 mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k 90 45 mmx10783gzrqc88k0n0ert2nkjz9ams2aj77ux4t0y3lsmyexnue2h0qem44ac 88 44 mmx1vprl39d98qzd3u5nk95qnhus9vjp4sen2w7y59yu0m5udqll6szquzr6y5 88 44 mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66 85 42.5 mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv 83 41.5 mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp 75 37.5 mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl 74 37 mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6 73 36.5 mmx1esr5qdwsspwt9xap0du009x6m7whdzw8xak806c82rzc2dkwqh3qu5ydzd 68 34 mmx1ujuywt50nv9jgt4tsu32mcgurtlu9zfvjutuvjk00d5k8peagwwq44fmqv 66 33 mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45 66 33 mmx1getf4e42wy8w52v4j7dxw52qu93yssytwud90uxyzhg5x0cgptwsathj03 63 31.5 mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9 62 31 mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn 57 28.5 mmx19rwdhaq7taarhhqexejf6frgdk5z6c0zd72c4mvu7k4cwmcxn2es78g2t2 51 25.5 mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj 50 25 mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl 48 24 mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3 48 24 mmx1zrkhjuv3uljccuqjh69vlpmzewvnyckr569aw7frgjz5hsdgflkq0gm7ee 46 23 mmx15fa2hl97h05swu4k5n8x6h6h4f37u0f09pakeletnl6ew5ak3pqq29f93n 42 21 mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92 37 18.5 mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x 37 18.5 mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c 35 17.5 mmx1x6j2m793ten9em7pu09q8qca794vrvrdc3jcw4yzc8zup0zrh45q8d2lqx 34 17 mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx 34 17 mmx12vtlj9qhp0uqhs3m9tay4ujwldpj98rgxxw60fy7huxwymgg785scc5d7f 32 16 mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh 30 15 mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05 29 14.5 mmx1eyu4e3yl3psnywtecgefejdmcpdlu2z67cdma96kh89egt9x4xgsvvejlu 28 14 mmx1mk6v9wmyju7spyncrggntg4lm62g0ensg76yjgjhdtnmpls3nr2sd9qwqp 26 13 mmx146y8qu72rkcw0xrs8vf8y7j423t42rtyynze5d3kw6e79vdsdenqj3esfl 26 13 mmx1u2v2uf8seke36nxtxh90hpgh43dy5py836ygkvqwaqx5jhck95ysjepx8g 25 12.5 mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45 22 11 mmx1r74wdy7kzh2dfdcumhc85tuherczlt8c4dsqdl03ufyg2lfa4frs2qmwlp 21 10.5 mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0 20 10 mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7 17 8.5 mmx1d9gx5anuvxgg906tzj0rdkhyypjtrfc09ufdc7yykhp9h46mxecs2qe2r2 16 8 mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs 14 7 mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3 12 6 mmx1n2y0dl7ktdrvgvv96kde4d042jt4e3722ftpevjcmfmqquyycv7q7s2d2k 11 5.5 mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6 11 5.5 mmx173tum306ce679gav9xyzv9dw7m8fhhw4xh7g24xwmgqxjufv6a8q3az0ta 8 4 mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f 7 3.5 mmx1ysxav0zk4halpp9r56m0s3cua7r62cfx57snu0s6pqqz56qqt32s2j3jzy 7 3.5 mmx1hut2sx0lenf2wed9atd23zp8ps8ntaacmjkd4mym8m05pcz69dssrvr0p2 6 3 mmx1thwz6ymnevqazuq0y5ry73hzu4h45mv3a3a0qdzn8l2rjfxa9sdq0c4clz 6 3 mmx1ddu2qyh383tuc3z88svmn7adgekm59lv2r3yc8cg35vclqqztwwsxcg356 6 3 mmx1rd8z3x6ncsk5734u3xjkqskzxq8tlcn00866309kwqc993j4xnyqhs0r3s 5 2.5 mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch 4 2 mmx1y307v7ha8la3zys39rljvld86lgzklajw4mzur8n0ehx4mpgqm7sm34wsh 4 2 mmx1dtx0w07ng5vaur9twxe9ajkvq4tfsgmgd7u909xxkvfmw976sr6qlyz0dv 4 2 mmx1ppglv79lx5ahk8a2cjpfsdvzx6y94c9qzswthyamhx09vcfqnufqvgqs36 4 2 mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz 3 1.5 mmx1c2jrdpa796438jzxxjw3y68tepmlzqv3e4a28d6t52juznprsm7qpwc0fj 2 1 mmx14cgd45zee9e06xl39x3m8k076gm4tnkr862m49q7vdeqm5ulznxqeyeuju 2 1 mmx1n5tgph6psu6a3z3u365ed4xmcm66tdk2pyltztvsy7pzunhfu2dqahcdcz 2 1 mmx1cjqcmqm597re656z5w5jq99f7fvyth7wvhz3v4u9xvyxxyjyv5esl8yqfh 2 1 mmx1k32fdxpu9d7lwjc9hd7qw6pz95h2summn9mu2ckyunxq5e20wk3qx7h986 1 0.5 mmx1h6lne788w8u58dn0lquz3kjp22s0xkz08sjlxx3zpmwup9k8cjcqupa8r6 1 0.5 mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu 1 0.5 mmx16ugged4tg26wydz3g2wasqk96ghz88nk6qzkcsep6qy0r4lcls6sk95mrj 1 0.5 mmx1rwglj5p9s436vdf6y33fu89puyl4sauuv2c6jmpadnqa0jmxezrq7mkt27 1 0.5 mmx12ts7lfh9cr6rqj0h9uhmha99tyep6ln6xtmskp4x9pv32s28jrzq3cksav 1 0.5 mmx1x6r4mtz74u0walwxhe4qxcu4cm4vkzkgjsj4p8a6xn9z43zg33ys37vy0e 1 0.5 ================================================ FILE: data/testnet12/rewards.json ================================================ [["mmx1yc5f9qcevne2cnp86szf4nnpaxj5kns2nzsx8jgg3ssal39k0cqsrsaepl", 12660], ["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", 5937], ["mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8", 322], ["mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh", 8266], ["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", 795], ["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", 10588], ["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", 27], ["mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc", 132], ["mmx139dxs6z0y9pgp2z4f9lhx8mczfhl6fenrlcpwefv8t7eklktwqzscw26ns", 3804], ["mmx1g4uyjjhup8hgk6akrjqvegmxu6xg98er5pt5uzqn520ud87rlgrqjn8cvt", 469], ["mmx19taynglsa6ewczfug4pds0qy0cwstd600hwzel8y02dtn2k2esyshsxfa9", 3209], ["mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935", 7249], ["mmx1cke885syq8wasw96nqp9cuh6wcr7sezvy65a3anjqzqhk59j9s9s7jl0gt", 504], ["mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y", 613], ["mmx12m0cmm80y7twslqtz4z2qhesdkun9ncjhddnkdzeedf2tcap9qxq74nzf2", 9], ["mmx1vgjfpw47le6hw8kacxtf22tpmr3aqrw9umngy4gjkv94r7hp8gxqcqd55k", 17], ["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", 1297], ["mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45", 52], ["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", 1206], ["mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg", 554], ["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", 17931], ["mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np", 90], ["mmx1l0hpmq7hfw4l5y6hfrer0xc980a3mhazzyc82eycvjaugj2d6sgqn349gp", 4126], ["mmx1jghsp60cua83ekgw22a905pv8qqsukjjnz4nw9gkqlllspmsfugsxnremv", 1826], ["mmx1lnmtuqh7jvxjsmmsf92ulcavxtr4fjhzva774zhs0fwvctzf7vgs53cn9h", 510], ["mmx12v7y2c99f25yntuk0dxpu4kwectxx62l7hvqsj4acuvvx0xsrqfqlds5l6", 1625], ["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", 3101], ["mmx1grclm0x96ccghh8574wnk8wmmee7g8sxt2emh6mgedezdntecsfqrtaz2t", 1025], ["mmx14fadj8tx3ksq8jvfmcsuhxnxmmn0lqdlpjs5rs8dfqphgsuluqfqxgys6j", 575], ["mmx1eymvxpnp4seshcfn5qfctlzsukazt49t3m5zgz9q68g4sry89cfsggxcfa", 197], ["mmx1nr0cpl0g86e0wdzuahcc2x7f4pc63n2y6a6zpnsjt5lfsctzmufspp6vd5", 778], ["mmx1jkajyu65wp0klsuyygjs5425tyq3ujffs7t7g6wgvxa2r4arrs2qqs99pp", 315], ["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", 5328], ["mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f", 1779], ["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", 18640], ["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", 10249], ["mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q", 2063], ["mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d", 600], ["mmx1t49g9vz555dcm6dvrxt9hxua58jf57w5rmnjnaynnclww8lmagdqc76mnv", 184022], ["mmx1hqcfqu3r7larng7g73jep24emu4kty990jecvfyugjuwp5n4acdq7wrxdg", 508], ["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", 1310], ["mmx139s60xj6eeuj5s0fvhgea06up5yy0ucn2fayvg4fd90xyeq9guwsv35zcs", 2133], ["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", 5927], ["mmx1090syeqn56ezxh9tzlw2006pqxt34ytn3ytfrkxaqaghh40cncwsya49ev", 1482], ["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", 1440], ["mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9", 1405], ["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", 5549], ["mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj", 1970], ["mmx1zngflag3hu0axh6r6yutlqxt9r7vwd3fh243frzz5gtmfysqeysshp5vuk", 2469], ["mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev", 785], ["mmx1fheacy3c48nkd0vgukeuqtldfzuxh2qhudhytshgctqe7sek25jqv99qqt", 9221], ["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", 914], ["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", 3417], ["mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u", 1931], ["mmx1xthtx2n39nvvjrrkfpshq2v6hltn82h36dnxyg942h6drj2q6snsxx32gu", 2926], ["mmx1cg5zspl8na39un48fm04caj4xpphaerynw53vnjlwh42f528ns4s53jjv4", 1094], ["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", 353], ["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", 32], ["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", 1701], ["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", 3], ["mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu", 4987], ["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", 2692], ["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", 417], ["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", 626], ["mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf", 1472], ["mmx1rc8cv2t60pvyye2mylydmrp970nawa542u74894ejgwufzg7lycq505pp0", 2047], ["mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl", 9474], ["mmx1psgwgft4tf7ult8p4e5gjp9un75t6fyzaxmhr9e64lmd6lf6kgcs53s8uf", 1913], ["mmx12wn9qtfzagz6z6ztxld2hka8cgvwr0nz55l3qjvkg0ayhhjvlscst4phad", 76155], ["mmx1lgsye5dkh57mxj0n2glerlmdzrh76snfte6k92gvxemkuhvug5eqlhcjvm", 20], ["mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552", 46], ["mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88", 1272], ["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", 1977], ["mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh", 88], ["mmx16h8zlf572dedtskx0krrajcrt6d86s0kgukd4rnm7ae9v8tmnvmqhqmdca", 3765], ["mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf", 66200], ["mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je", 2057], ["mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk", 2953], ["mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8", 7627], ["mmx1kez0lk0emjezwdl88ee6c5lvcqftu7l32ksqgl98snkdzke9cyuq58fs6d", 1628], ["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", 5942], ["mmx1k738pwqe95qv3g8z9y0lhxsxgvf4z5dv0qgq9eh6vcy7u6juc5usrhgpsh", 1386], ["mmx1cxvpr0z0rjx9wfqrs7e8dzt5xshhlscpc8fk5xs79009zh3vesus9tru8m", 36], ["mmx1lghunzj070ysr4hd2alsujacc26t99zl3cv5qm03ttjaq4ugmvaqqfy920", 8867], ["mmx18d8335fhancnvy2zs5wsq8gvcp0l57n3pejex92ndg6s6s3casaqalq6hf", 3363], ["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", 3092], ["mmx1s9972ypp7cgngncz8au8737jw38rswzyc4x26u84gr4jk07q8s7qjaljld", 160], ["mmx1kkq8ezuwsast9zplk8ec0pa0me6u3wydkrg5jn5daycgppy63y7s9y0up7", 12822], ["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", 605], ["mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c", 1647], ["mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg", 2961], ["mmx1pu8fla0axf3227ttsxggudd6ym9u9vs7nwcrs8uk799ej6yegvlqhnjkd2", 1725], ["mmx1ls8zjlv2t0prtqvuy4pkasq8a6axrjythsu3nvsne5uzmkk82clqh28yvt", 422], ["mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88", 12], ["mmx1anyf8dhv7shc957xt95ujj6ltk2hmmwhl7hvftw67ph3uf7w4ulqpdvg9l", 291], ["mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m", 511], ["mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4", 650], ["mmx1ujghjem0z63dnwrwa8tnswgn8uf2nn8gx26seg4te50wpfjw94pqjhktte", 6288], ["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", 3208], ["mmx1ctxq3czng6y2ms40mf6pnq699p7skzsncq5qerceja4k20ve24pscadkxx", 3], ["mmx1gmvuqg5x4tn9fj53vsgahgwqa9h4jx0cz4x7xpet67kxu8n33fpseycg9t", 344], ["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", 10488], ["mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e", 8950], ["mmx1x758q5t2jafk32raj98u003duqlte37xzzzanwl7tef7gt4234rszr4l02", 7], ["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", 5727], ["mmx1ayukxr9jcev25gddx8yfpv27hauw0z3xy9z2jwzdqk8n624seayqkjhm9d", 5], ["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", 308], ["mmx10p75878akjmna30s8kjwnaveql56v2a45tw20fw86ruhvc8x5pxqrqemq9", 1347], ["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", 1946], ["mmx1yxqjvl97jnhxwlvqzh8n53g67vc3l2u7m78aks5y9rym5utj948q3dgmma", 5], ["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", 7811], ["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", 4140], ["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", 5206], ["mmx12j3mpzmlpx9d77ux2990xwdhus99626yj3s75kyaxt4r80n3638s237x44", 91], ["mmx1twps3qw5uvrx8fxmha33guk7p60esjyaa3yn96ju6drhn2hpeagshruvwk", 1150], ["mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8", 2882], ["mmx1l3g7hjrczlhsvnshj4jtccavmrrm9chue6ha29hmdua6392mtffq2ddd66", 62962], ["mmx14dze6kxepm2ensphv2z0ejl4kc4hks7gwajnjr9nfpw6glnqc4fqz53s5m", 2693], ["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", 3170], ["mmx16qj5ep69xew0qfqms0hw6eh6et3jzjx46wm0xteslv5ufs02nd2qtp4rte", 1], ["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", 5733], ["mmx10jqs45t5ujdwtqyft07f4mxk7y08fac4ks0z6ee50n6fkq67992s09ezzz", 758], ["mmx1pmecze7k5a4ld66auxywxljxnsad9ducwgzmy4q4k3d6ma6gr3tqtkfrnp", 2036], ["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", 6158], ["mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm", 765], ["mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57", 2114], ["mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx", 2345], ["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", 396], ["mmx1pv4hhmymzfvyn4my5vpptp9rdqx9ex6y60y63tgaxre05f3v99vsq7uvz9", 9482], ["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", 348], ["mmx1ff5rqk4myqr32axrt500v0rh0cjp66uh5y0q7r4ed9xy63c954dq3ea3rv", 58070], ["mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd", 934], ["mmx10w2sp9rp2s4s6uj32fu68gdqcjvdc9e6h3jm2qmne02400ul5pws4a4r5v", 54], ["mmx143jvevjx827ac7xrc7zx59a3hwd8nvu52khqa4365dk8ct3zff0q2ee25l", 5512], ["mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk", 666], ["mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9", 294], ["mmx12q3pverdv5c465fjeryz5uxnvcjpacnfanynclgq8g5fwj77y9ss2r84v0", 2775], ["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", 1730], ["mmx1jwjpe8w9cpamhscl0svn3c3xy47cz50qsn38gu3mxed29gq96assmzaq9p", 4], ["mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re", 12141], ["mmx1ms72mlttvspj4ga668t5xr7k8m98eedvvdwdkmwjfua2ttdmj33qvqyp7s", 807], ["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", 3920], ["mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x", 5019], ["mmx1rgf2v34pnkjtzg09snd40cd5262dp2hde4k3tkhcjyxdfh7mf4nqx0cf3k", 1823], ["mmx146y8qu72rkcw0xrs8vf8y7j423t42rtyynze5d3kw6e79vdsdenqj3esfl", 49], ["mmx1mg56jxv3e0plu76824vw3w72kqumgyp2hetfg5s227lr96vjzd5qr4gxnj", 310], ["mmx1f4k5ajf9dv0jfuw28xh9vzhmvuphv92dd8mfxxdzssverwfe9p5qdwgc8k", 2779], ["mmx193v808tk0f54j0cgxeqpnhywyyp3l3e847wlgl588murpgs43a5q65as7s", 1], ["mmx1efmq0tdmmpv7k7dzd8nn5ta045f9fdylk9pa848hzshh82zlxf5sganjdn", 735], ["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", 752], ["mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl", 2076], ["mmx1na96yskrphrrswsg8rwe0e0gwpy4n360t37u6guxwa42a26wqa4sqpfm9s", 5471], ["mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc", 509], ["mmx1cvga7mz30hh2dnutxpaupdfr4kflug45g695vke7jmnl2kj6jfhs70rvcr", 8805], ["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", 2561], ["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", 1965], ["mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw", 1431], ["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", 5317], ["mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5", 18014], ["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", 869], ["mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv", 307], ["mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z", 673], ["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", 955], ["mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw", 5344], ["mmx1xv2dztq36sk27x79gdja33zk6lv8cytmjeqkvlux788rd55l6fuq09zq65", 3058], ["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", 23953], ["mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf", 11177], ["mmx1z3qzxxkh09r73p9sh872xz7fqjahm048v0e80sypz5gd00u2f47qgf20p2", 27], ["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", 860], ["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", 8255], ["mmx1pnpxvslglu4u7qnv3cwz4x8vzcc5y9nnlhkczkuzyv7995dz96qqrvwdrl", 463], ["mmx1an3w925endfhcg50qelq69ahwvltupq4rt7wvnhfqd8leg2526qsgh2ret", 405], ["mmx1nwfsx2prjuvsq2q3pn2ygjntgu5rgnarpwrqq2l5adfm3wdmwwqste58cg", 5], ["mmx19zld6lprrjhzzhltmjskuv7dxcqnewx9sjll8ccdm538wx40ajpq2f8m0k", 1], ["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", 1880], ["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", 2836], ["mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3", 3588], ["mmx13xu3ay8eujt4neuwyhxw002r6qlj0v5p8ldj6jus03ev0w5u7wpsxdd3v9", 116], ["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", 3801], ["mmx1jmhmzwudwu3tlhq048k7nuc0l8lqgs9amtnrg5pc75j6kl6rczzsuqxsnj", 3138], ["mmx1fudwe8xuzgwraw6fe6rylklv69x93kqyrgu82jf3tjstsgkm8xrqtc850j", 2367], ["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", 550], ["mmx1m0qtqx7tvpw6rjhsmjnpr8dxgz8wyx3hypcg4qw5trnk34urxwyqxeym6v", 157], ["mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw", 2567], ["mmx1g9fl4jus2fumcnkw0k8w9df5cln8yukhrk3kzwuzk5rg68ndmjyqftzc4p", 3418], ["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", 1414], ["mmx17grsj5sq8z9h02gnl92mpkajy6janxcnrcrg6mm3w5l232tx8j9sufzatk", 12433], ["mmx1tsl59gk2ahk0tkrcwnhnjh2kcnfnhyljt3n76h0cu00ael973k9s9dj2aa", 676], ["mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw", 8], ["mmx19tp63ptrre654er8rkx5ntgt4z048tutqx4yplu7daxwm2tgk2gq8hp85z", 4166], ["mmx1wy0dhr03nf78m4gufm7jcnzfvaqq244ckzmup5s2054apysy6jgq4pp76h", 48], ["mmx1a0lmcmccnm3ak5n82mutjxyz9pj5radgw92qzudnp4eucts6awgqym92mg", 966], ["mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d", 32899], ["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", 11489], ["mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g", 3219], ["mmx1rp6q7eh4zye6494jpq9j6ft69ku2lqqlx363d4z7zspv7wqfqk2skevrl2", 9402], ["mmx1u75x5wkrse550ag4nwnesaaqhvr3js7vtqh9r3vt0etcxzqu8z2s7u0d6h", 190], ["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", 8672], ["mmx16cnha02fp053dvmxltjgluwjw0fdedpmxj5x72z053pwt86fgjtq7er08p", 129], ["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", 1907], ["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", 6415], ["mmx1umu7rghe9664www8lutl5fa03zv9c2gjwvv4ja9w7540zvnuuxvsyyf63z", 3226], ["mmx1wcmc5n7v8eujvlzrtuga6fcfmk4d9yjcdhs0fmgenyrt6ycynjdqa6hh0w", 18957], ["mmx1dun6jkgf7cscymt6udr8nlm66gjewqyylyzvnswaaq5exzfw4kdqk6nk0p", 50], ["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", 439], ["mmx1qc75vu9xfagl297yupuwl3jgqsecwlae3szn9lwpg9m5p0zcnzwqe4adsz", 933], ["mmx1js6nrvnl94rcgn8k80dx6uz2da2jj64utkrxqhmvcvuescmrpwwsvh2vna", 4686], ["mmx1wtt47s3lhpsu4nxfyvzl58jpslpnuvv9ymd0gthaxpern3yer20qjykd8r", 156], ["mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav", 2], ["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", 2887], ["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", 1241], ["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", 1828], ["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", 3753], ["mmx1mzq54zkhcrww85glxx6kaqeeeeqckrwy0j9d377epmh7vrrssxsq8fel5y", 3438], ["mmx1jycy47p4up4n073nxn85tkem6qmtwpqjjm3k5d3nu4v22w9h6jsqen8hfx", 1033], ["mmx1lty50fwzq0wxaxwzxgjzt7y3r3mhn08eccs5ntz3y4sahd5jfxssnz6qzz", 13699], ["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", 654], ["mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g", 792], ["mmx188uhxreda27mxl6lth04vl5y2da7qkldg72gvalsth7dkwxeh23sm9juwr", 1285], ["mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej", 1180], ["mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl", 636], ["mmx1gxx98xmhrcdv4ez5fxekmnczvwuqns3geh3wcj9l463d5jgqcwjqv35gpt", 934], ["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", 1106], ["mmx15qatp4v00zymeq92dmz2sfee0twh36n7vutwp4kcjhdktye8zkjsqftneu", 3391], ["mmx15aarz3lnq8da6s86l8kuwwzy0gfw3tdqqu9xhq00lardxl4jv7jsa294sn", 1], ["mmx1lc66qe65pw30cpt5nvjt2apsmtcut80jdv8xgx3wq6d4evu65wjstsftsf", 1674], ["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", 307], ["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", 764], ["mmx1mjax0p84wdxsfdffhm5tu5fg3alt3zvam683qk0zu4jh6jredj4qqz6kk0", 5342], ["mmx16y2cjvyxtwgkm5m0x2wy40g2lc59qcept4dqjakfygwghhxnsx4q5cg5xl", 5106], ["mmx1s4zvd257h9xqntzj7kd08wnktrzuk7xlya9ttlv2dmkxk79ykz4qzvmjvt", 1744], ["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", 3247], ["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", 840], ["mmx123qaxyt562xlfdxn7fg52nxx9aq6gp8q3jn6kya98xmn7n0z62kq09hk9k", 939], ["mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a", 76], ["mmx1x4nlvf00jq5cld2tamnnssnshzd2v9gvtp2yjun60qgh2zj98kksyxgrh5", 208], ["mmx1tyrnks330n6exxr84vz7d0mjsmpey8p34kuzy07g4nrc7txl87ks63zmhn", 1096], ["mmx1j5qsf0gulds6ll7mm8aygj9xu52qhcaamadzak5k4c3smx9lajksjyvyzx", 5470], ["mmx1fqfjglclexnmhlmr5lvwhqm9x6dqvm8cnsr4dpn4ysl5uzfcdwhss0xtp4", 20026], ["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", 210], ["mmx1kft6gj0a0upukl0dy3qlakx0pm4de4538v92l6saa79jsqkswzcqhjtu6e", 3433], ["mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm", 9648], ["mmx1k4rx2e7w5rl8jzs96hwj0hussljxc7tccyqng80r845uf4da9wcsat3pug", 161], ["mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4", 20], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 1124], ["mmx1eaxnhktjt4yegapquud644nfkryfyarth7lwdxwdedg8xhhdlxescdxp0q", 34854], ["mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7", 25], ["mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7", 47362], ["mmx1h9ahw37ekqwx5sewaszmj54cn0l0pmzrksss7z0320ntkt63q6mssrfkkd", 306], ["mmx1e98kn0hsxlvmn67g9rwq4jsmgfvrmhm55yj2dh6rk0ttrf960zuqrc6e5z", 2], ["mmx1hgvgalxcwyssgs5gqsttsfvmt2297u2hw4t7cglllnvswkhg6xuq285wez", 1151], ["mmx1skt9meytux778svqe3d6fyvl7mjfrm99nlgyfwenclgr09ftm7uqc3cqxq", 1], ["mmx1d8mj6q8tj54rejhx37skuzn88tld7emw3wra9agvjx9glraa8xaskpa5fg", 71], ["mmx1rk9f4slwuur34lnw6phl9nw2465a6pfjj76p0p8zx8erzhsw0jas7pjyqj", 4], ["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", 265], ["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", 3828], ["mmx14ljuxjzlu24djfrm2varlgvfup2q0keydus50mrv6qy2qpuxu2lsmm8gza", 111], ["mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4", 6407], ["mmx1aeaukjyxfu6gk38swf6s29jrswc67nkra3n3wy5wsxt2fqmvknqq44kzkn", 4840], ["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", 3011], ["mmx1qfvy0zcwu0smhdtkkkygyyasjf2eplaurzkq2m2l4ngrnxgy0rpqq8swwy", 3086], ["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", 1332], ["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", 2], ["mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9", 4728], ["mmx1e2md0mf5cu5uxmme0hxt4apxg9nd7elstzcr7v393nxmgm0rvryqlr557x", 4131], ["mmx1qq2w4yktpymxyhxck2s0z0grp8tlh2l5evsceycvx9af0x3xxhysd536em", 4601], ["mmx1njy6t7vkta3veyjj4atvr6ppmeeru85tgh5qvhvnmleslru54m9sqp3l60", 195], ["mmx1jqya2nk5kzref5tpqfz7ze2yd4mcdh5ax6szxjtk9sk5wza7hr9shjjsg3", 4], ["mmx1geumptg36crcywp4tzfqeameymf7x9a43qqde9mrpaqxqjernlxqytcsus", 1032], ["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", 2829], ["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", 669], ["mmx1v5rqrf5ctkh0uj2xttjxcrkwaecztmcnaqj9zralud0rt70g8r8s5xmgv7", 83], ["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", 37175], ["mmx1998n5nlledt8puwx80neyvle5xkayw0uvgdhuwup6gtpzd6ym0gqp5qzy4", 723], ["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", 15493], ["mmx1ygz7gwf3at3409ggncyfpsyp6cn0ralc4dhezcnkzsxly07x0tgs759304", 6091], ["mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3", 3578], ["mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88", 375], ["mmx10vl3ux6k9680dmv3fv6e2c3d2yamrlveshxfvnemlv2tlhxan8fsw5vq30", 4069], ["mmx10ewttsgpc2vq980wlk0ddtc505vp5edvusl8a388y76peautetfsyj3ej7", 166], ["mmx1ymnr2tt7vzcklrk97n2phwz96t2t2au64mjqw58efz2aatkex02qryjcxm", 56645], ["mmx1z5zgrrc2l37fg4cu6e7s80qyxm72fcw7xhfeep2caahptq7mdr2qzcl2xj", 212], ["mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc", 29768], ["mmx1vcp6ksuysun2pdtkrukz6lh2dd7g0d2lpyjk2m3ffylq0yhn4ntq9fpmkm", 1991], ["mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l", 674], ["mmx1td9zpd4vwncrlgy8kkgft4vkck4yep5nagxr60anls4vrlvs88ts964kg5", 1653], ["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", 63053], ["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", 99], ["mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7", 1923], ["mmx198yry5ttr65tnmftf4ppzjwvxhqngyncxy3sq5ucz8edmsg5umwqs4u2zs", 1757], ["mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0", 318], ["mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn", 3518], ["mmx10g3yj722j7psxapmpcusn3atzd2fd5r8pq5s9wmdszxweefexm0qzyjazd", 6959], ["mmx1u3u8jn5824ema7zszlz8wuww49dz8vf08jd7vux952saltvx0l0syu2qzr", 105], ["mmx1gssr7n6rfcffcu6g830sa2gusv89m7mp03sd86fula6gk4th380spllur9", 1], ["mmx1h6lg70tzjmvsucw3c7mmdf98p553aj0hfd6sl7nekq4yucf4xnssd7hudq", 513], ["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", 2091], ["mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql", 455], ["mmx1pjmyc2sn87gs6xuzaq9thr9y4msqtcgd379cecgywn2684fhcr3q54zr6y", 2809], ["mmx17kwmmmdvgdmay78tzmr4m488xvax8ft5g98xpx93qg94pu0gtrjqxym59f", 75], ["mmx1usygfr5xcuszd23r5cn627etytpyz8gqk7klyzkllwkwzhal5mjqjtjl3t", 27], ["mmx14emrk4d8vzp3c2yztqrzhnmy8r9tsnywrpmfrl838q50j0xjenjqay73ld", 37], ["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", 1078], ["mmx1ywsu86chqesuxt45aktpkg78v7we86l0zf8xa3rcer6gn6xw8lnqnwk5tr", 845], ["mmx187hkj0kvu3rjq4tj22xqlc8qkwp8n48xe9yh4xw0nzjj8cut3mnqy28fjq", 10], ["mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp", 13450], ["mmx1cthy5xra5u9kwcdgp3z0x55grrj4xv585g69qath07dqrejrct5qk9xrck", 2161], ["mmx15drd8dvlexsa460klqa0dqlluy0pya79z7lnkvj08zgzuncnzt5shqewhm", 125], ["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", 19993], ["mmx1ug0nljja9d525wv5n8z79vgdjh9vxpf5hf57r2gyu73cm86pcn4s7v3ccg", 1976], ["mmx1ksu3c85u4gd20v5dy5nkjk30fa7endp9mc2za37gr6tuak0y604susek8w", 2], ["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", 12942], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 15209], ["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", 1763], ["mmx1aawhv22wdnreucw8dk9au0qj93wnf04gvs20hgldlapsj24ny8hs0qtjgq", 27], ["mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7", 178], ["mmx1rh2lur825y90gqc5pxmejgk5d8wl934h0v8lv972rnevrfhpsmcqsqywld", 200], ["mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww", 3013], ["mmx1avcekqg5tnavcwyw7qs97809yzh0nzq5l9ltyjljelygwxtp40esgyw665", 2402], ["mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan", 1193], ["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", 3009], ["mmx1c0lcld738xys6rmr0wfyrtgpcvcm8szcst7w9c6cawgmpme6nh6sgtq35u", 8145], ["mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7", 1142], ["mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc", 1867], ["mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x", 69], ["mmx1sk6k9sdj836ynxntk2nt60funlz0t9ptqttrqvg46vcv5mdkwhaqgrgnnt", 1], ["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", 205], ["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", 536], ["mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336", 18], ["mmx1nwdefg4c7dq34hhvykfzl2um6d6phkfqh22pg5d2q8nderf78n7suz5x6m", 3941], ["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", 6000], ["mmx1zw68exayxayyakvgpnrf4ptfkkkcth2lvlu20le3e0ghrpae4hlq4sqfa9", 1], ["mmx16kkntt0k2spk2xvxlswtwf40p02vlj97cenyvzca58ad8uav68lqfkkh9w", 29313]] ================================================ FILE: data/testnet12/rewards.txt ================================================ mmx1t49g9vz555dcm6dvrxt9hxua58jf57w5rmnjnaynnclww8lmagdqc76mnv 184022 92011 mmx12wn9qtfzagz6z6ztxld2hka8cgvwr0nz55l3qjvkg0ayhhjvlscst4phad 76155 38077.5 mmx12kjff7s048w38dpcmhelf3f2vt3ul77hrdze97fxr9mhgrw2lvmqnandaf 66200 33100 mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz 63053 31526.5 mmx1l3g7hjrczlhsvnshj4jtccavmrrm9chue6ha29hmdua6392mtffq2ddd66 62962 31481 mmx1ff5rqk4myqr32axrt500v0rh0cjp66uh5y0q7r4ed9xy63c954dq3ea3rv 58070 29035 mmx1ymnr2tt7vzcklrk97n2phwz96t2t2au64mjqw58efz2aatkex02qryjcxm 56645 28322.5 mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7 47362 23681 mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92 37175 18587.5 mmx1eaxnhktjt4yegapquud644nfkryfyarth7lwdxwdedg8xhhdlxescdxp0q 34854 17427 mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d 32899 16449.5 mmx1mlj7rhkg5c4gp3w4k8dlck5tyf5493dce5vx3x4m4qpzn7ty8mtq6ek2jc 29768 14884 mmx16kkntt0k2spk2xvxlswtwf40p02vlj97cenyvzca58ad8uav68lqfkkh9w 29313 14656.5 mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v 23953 11976.5 mmx1fqfjglclexnmhlmr5lvwhqm9x6dqvm8cnsr4dpn4ysl5uzfcdwhss0xtp4 20026 10013 mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl 19993 9996.5 mmx1wcmc5n7v8eujvlzrtuga6fcfmk4d9yjcdhs0fmgenyrt6ycynjdqa6hh0w 18957 9478.5 mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm 18640 9320 mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5 18014 9007 mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq 17931 8965.5 mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6 15493 7746.5 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 15209 7604.5 mmx1lty50fwzq0wxaxwzxgjzt7y3r3mhn08eccs5ntz3y4sahd5jfxssnz6qzz 13699 6849.5 mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp 13450 6725 mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a 12942 6471 mmx1kkq8ezuwsast9zplk8ec0pa0me6u3wydkrg5jn5daycgppy63y7s9y0up7 12822 6411 mmx1yc5f9qcevne2cnp86szf4nnpaxj5kns2nzsx8jgg3ssal39k0cqsrsaepl 12660 6330 mmx17grsj5sq8z9h02gnl92mpkajy6janxcnrcrg6mm3w5l232tx8j9sufzatk 12433 6216.5 mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re 12141 6070.5 mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap 11489 5744.5 mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf 11177 5588.5 mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl 10588 5294 mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn 10488 5244 mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9 10249 5124.5 mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm 9648 4824 mmx1pv4hhmymzfvyn4my5vpptp9rdqx9ex6y60y63tgaxre05f3v99vsq7uvz9 9482 4741 mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl 9474 4737 mmx1rp6q7eh4zye6494jpq9j6ft69ku2lqqlx363d4z7zspv7wqfqk2skevrl2 9402 4701 mmx1fheacy3c48nkd0vgukeuqtldfzuxh2qhudhytshgctqe7sek25jqv99qqt 9221 4610.5 mmx1grhexfxkzq9js7t6595mzcnpady60mjuph254rtef25j8x074pzs6s249e 8950 4475 mmx1lghunzj070ysr4hd2alsujacc26t99zl3cv5qm03ttjaq4ugmvaqqfy920 8867 4433.5 mmx1cvga7mz30hh2dnutxpaupdfr4kflug45g695vke7jmnl2kj6jfhs70rvcr 8805 4402.5 mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn 8672 4336 mmx1ju6l29nxdkdapu9cqk8jf0nhvqc2qjzkecft4ysdtdd030ma8spqh0k5wh 8266 4133 mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc 8255 4127.5 mmx1c0lcld738xys6rmr0wfyrtgpcvcm8szcst7w9c6cawgmpme6nh6sgtq35u 8145 4072.5 mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy 7811 3905.5 mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8 7627 3813.5 mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935 7249 3624.5 mmx10g3yj722j7psxapmpcusn3atzd2fd5r8pq5s9wmdszxweefexm0qzyjazd 6959 3479.5 mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg 6415 3207.5 mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4 6407 3203.5 mmx1ujghjem0z63dnwrwa8tnswgn8uf2nn8gx26seg4te50wpfjw94pqjhktte 6288 3144 mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn 6158 3079 mmx1ygz7gwf3at3409ggncyfpsyp6cn0ralc4dhezcnkzsxly07x0tgs759304 6091 3045.5 mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t 6000 3000 mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru 5942 2971 mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx 5937 2968.5 mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj 5927 2963.5 mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5 5733 2866.5 mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0 5727 2863.5 mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn 5549 2774.5 mmx143jvevjx827ac7xrc7zx59a3hwd8nvu52khqa4365dk8ct3zff0q2ee25l 5512 2756 mmx1na96yskrphrrswsg8rwe0e0gwpy4n360t37u6guxwa42a26wqa4sqpfm9s 5471 2735.5 mmx1j5qsf0gulds6ll7mm8aygj9xu52qhcaamadzak5k4c3smx9lajksjyvyzx 5470 2735 mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw 5344 2672 mmx1mjax0p84wdxsfdffhm5tu5fg3alt3zvam683qk0zu4jh6jredj4qqz6kk0 5342 2671 mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq 5328 2664 mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5 5317 2658.5 mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6 5206 2603 mmx16y2cjvyxtwgkm5m0x2wy40g2lc59qcept4dqjakfygwghhxnsx4q5cg5xl 5106 2553 mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x 5019 2509.5 mmx1kl3y0kz6jx5w0vxrcx9afkzthe88syuge0ytumakkce4nu969uhqdtj9hu 4987 2493.5 mmx1aeaukjyxfu6gk38swf6s29jrswc67nkra3n3wy5wsxt2fqmvknqq44kzkn 4840 2420 mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9 4728 2364 mmx1js6nrvnl94rcgn8k80dx6uz2da2jj64utkrxqhmvcvuescmrpwwsvh2vna 4686 2343 mmx1qq2w4yktpymxyhxck2s0z0grp8tlh2l5evsceycvx9af0x3xxhysd536em 4601 2300.5 mmx19tp63ptrre654er8rkx5ntgt4z048tutqx4yplu7daxwm2tgk2gq8hp85z 4166 2083 mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr 4140 2070 mmx1e2md0mf5cu5uxmme0hxt4apxg9nd7elstzcr7v393nxmgm0rvryqlr557x 4131 2065.5 mmx1l0hpmq7hfw4l5y6hfrer0xc980a3mhazzyc82eycvjaugj2d6sgqn349gp 4126 2063 mmx10vl3ux6k9680dmv3fv6e2c3d2yamrlveshxfvnemlv2tlhxan8fsw5vq30 4069 2034.5 mmx1nwdefg4c7dq34hhvykfzl2um6d6phkfqh22pg5d2q8nderf78n7suz5x6m 3941 1970.5 mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t 3920 1960 mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw 3828 1914 mmx139dxs6z0y9pgp2z4f9lhx8mczfhl6fenrlcpwefv8t7eklktwqzscw26ns 3804 1902 mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry 3801 1900.5 mmx16h8zlf572dedtskx0krrajcrt6d86s0kgukd4rnm7ae9v8tmnvmqhqmdca 3765 1882.5 mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map 3753 1876.5 mmx1kjc5re76v4htwy0393zxnut5jcutlewywd5udfgh6l4xh5ya3xps8sv4g3 3588 1794 mmx1lc7g4gueljhtkf7ffd3l0x747d8j9gk0z88e58zd9l6f7vh73mgsuzjvx3 3578 1789 mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn 3518 1759 mmx1mzq54zkhcrww85glxx6kaqeeeeqckrwy0j9d377epmh7vrrssxsq8fel5y 3438 1719 mmx1kft6gj0a0upukl0dy3qlakx0pm4de4538v92l6saa79jsqkswzcqhjtu6e 3433 1716.5 mmx1g9fl4jus2fumcnkw0k8w9df5cln8yukhrk3kzwuzk5rg68ndmjyqftzc4p 3418 1709 mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf 3417 1708.5 mmx15qatp4v00zymeq92dmz2sfee0twh36n7vutwp4kcjhdktye8zkjsqftneu 3391 1695.5 mmx18d8335fhancnvy2zs5wsq8gvcp0l57n3pejex92ndg6s6s3casaqalq6hf 3363 1681.5 mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3 3247 1623.5 mmx1umu7rghe9664www8lutl5fa03zv9c2gjwvv4ja9w7540zvnuuxvsyyf63z 3226 1613 mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g 3219 1609.5 mmx19taynglsa6ewczfug4pds0qy0cwstd600hwzel8y02dtn2k2esyshsxfa9 3209 1604.5 mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3 3208 1604 mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp 3170 1585 mmx1jmhmzwudwu3tlhq048k7nuc0l8lqgs9amtnrg5pc75j6kl6rczzsuqxsnj 3138 1569 mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n 3101 1550.5 mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l 3092 1546 mmx1qfvy0zcwu0smhdtkkkygyyasjf2eplaurzkq2m2l4ngrnxgy0rpqq8swwy 3086 1543 mmx1xv2dztq36sk27x79gdja33zk6lv8cytmjeqkvlux788rd55l6fuq09zq65 3058 1529 mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww 3013 1506.5 mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu 3011 1505.5 mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t 3009 1504.5 mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg 2961 1480.5 mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk 2953 1476.5 mmx1xthtx2n39nvvjrrkfpshq2v6hltn82h36dnxyg942h6drj2q6snsxx32gu 2926 1463 mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s 2887 1443.5 mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8 2882 1441 mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv 2836 1418 mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27 2829 1414.5 mmx1pjmyc2sn87gs6xuzaq9thr9y4msqtcgd379cecgywn2684fhcr3q54zr6y 2809 1404.5 mmx1f4k5ajf9dv0jfuw28xh9vzhmvuphv92dd8mfxxdzssverwfe9p5qdwgc8k 2779 1389.5 mmx12q3pverdv5c465fjeryz5uxnvcjpacnfanynclgq8g5fwj77y9ss2r84v0 2775 1387.5 mmx14dze6kxepm2ensphv2z0ejl4kc4hks7gwajnjr9nfpw6glnqc4fqz53s5m 2693 1346.5 mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82 2692 1346 mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw 2567 1283.5 mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60 2561 1280.5 mmx1zngflag3hu0axh6r6yutlqxt9r7vwd3fh243frzz5gtmfysqeysshp5vuk 2469 1234.5 mmx1avcekqg5tnavcwyw7qs97809yzh0nzq5l9ltyjljelygwxtp40esgyw665 2402 1201 mmx1fudwe8xuzgwraw6fe6rylklv69x93kqyrgu82jf3tjstsgkm8xrqtc850j 2367 1183.5 mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx 2345 1172.5 mmx1cthy5xra5u9kwcdgp3z0x55grrj4xv585g69qath07dqrejrct5qk9xrck 2161 1080.5 mmx139s60xj6eeuj5s0fvhgea06up5yy0ucn2fayvg4fd90xyeq9guwsv35zcs 2133 1066.5 mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57 2114 1057 mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt 2091 1045.5 mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl 2076 1038 mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q 2063 1031.5 mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je 2057 1028.5 mmx1rc8cv2t60pvyye2mylydmrp970nawa542u74894ejgwufzg7lycq505pp0 2047 1023.5 mmx1pmecze7k5a4ld66auxywxljxnsad9ducwgzmy4q4k3d6ma6gr3tqtkfrnp 2036 1018 mmx1vcp6ksuysun2pdtkrukz6lh2dd7g0d2lpyjk2m3ffylq0yhn4ntq9fpmkm 1991 995.5 mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu 1977 988.5 mmx1ug0nljja9d525wv5n8z79vgdjh9vxpf5hf57r2gyu73cm86pcn4s7v3ccg 1976 988 mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj 1970 985 mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj 1965 982.5 mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj 1946 973 mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u 1931 965.5 mmx1ausld08qthhjwmpxvxuy257ddrnvwq0u0q2qdgzwk6x95lwvp8wqun9tn7 1923 961.5 mmx1psgwgft4tf7ult8p4e5gjp9un75t6fyzaxmhr9e64lmd6lf6kgcs53s8uf 1913 956.5 mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05 1907 953.5 mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3 1880 940 mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc 1867 933.5 mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp 1828 914 mmx1jghsp60cua83ekgw22a905pv8qqsukjjnz4nw9gkqlllspmsfugsxnremv 1826 913 mmx1rgf2v34pnkjtzg09snd40cd5262dp2hde4k3tkhcjyxdfh7mf4nqx0cf3k 1823 911.5 mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f 1779 889.5 mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05 1763 881.5 mmx198yry5ttr65tnmftf4ppzjwvxhqngyncxy3sq5ucz8edmsg5umwqs4u2zs 1757 878.5 mmx1s4zvd257h9xqntzj7kd08wnktrzuk7xlya9ttlv2dmkxk79ykz4qzvmjvt 1744 872 mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym 1730 865 mmx1pu8fla0axf3227ttsxggudd6ym9u9vs7nwcrs8uk799ej6yegvlqhnjkd2 1725 862.5 mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs 1701 850.5 mmx1lc66qe65pw30cpt5nvjt2apsmtcut80jdv8xgx3wq6d4evu65wjstsftsf 1674 837 mmx1td9zpd4vwncrlgy8kkgft4vkck4yep5nagxr60anls4vrlvs88ts964kg5 1653 826.5 mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c 1647 823.5 mmx1kez0lk0emjezwdl88ee6c5lvcqftu7l32ksqgl98snkdzke9cyuq58fs6d 1628 814 mmx12v7y2c99f25yntuk0dxpu4kwectxx62l7hvqsj4acuvvx0xsrqfqlds5l6 1625 812.5 mmx1090syeqn56ezxh9tzlw2006pqxt34ytn3ytfrkxaqaghh40cncwsya49ev 1482 741 mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf 1472 736 mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr 1440 720 mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw 1431 715.5 mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr 1414 707 mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9 1405 702.5 mmx1k738pwqe95qv3g8z9y0lhxsxgvf4z5dv0qgq9eh6vcy7u6juc5usrhgpsh 1386 693 mmx10p75878akjmna30s8kjwnaveql56v2a45tw20fw86ruhvc8x5pxqrqemq9 1347 673.5 mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99 1332 666 mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c 1310 655 mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0 1297 648.5 mmx188uhxreda27mxl6lth04vl5y2da7qkldg72gvalsth7dkwxeh23sm9juwr 1285 642.5 mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88 1272 636 mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn 1241 620.5 mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5 1206 603 mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan 1193 596.5 mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej 1180 590 mmx1hgvgalxcwyssgs5gqsttsfvmt2297u2hw4t7cglllnvswkhg6xuq285wez 1151 575.5 mmx1twps3qw5uvrx8fxmha33guk7p60esjyaa3yn96ju6drhn2hpeagshruvwk 1150 575 mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7 1142 571 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 1124 562 mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm 1106 553 mmx1tyrnks330n6exxr84vz7d0mjsmpey8p34kuzy07g4nrc7txl87ks63zmhn 1096 548 mmx1cg5zspl8na39un48fm04caj4xpphaerynw53vnjlwh42f528ns4s53jjv4 1094 547 mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s 1078 539 mmx1jycy47p4up4n073nxn85tkem6qmtwpqjjm3k5d3nu4v22w9h6jsqen8hfx 1033 516.5 mmx1geumptg36crcywp4tzfqeameymf7x9a43qqde9mrpaqxqjernlxqytcsus 1032 516 mmx1grclm0x96ccghh8574wnk8wmmee7g8sxt2emh6mgedezdntecsfqrtaz2t 1025 512.5 mmx1a0lmcmccnm3ak5n82mutjxyz9pj5radgw92qzudnp4eucts6awgqym92mg 966 483 mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g 955 477.5 mmx123qaxyt562xlfdxn7fg52nxx9aq6gp8q3jn6kya98xmn7n0z62kq09hk9k 939 469.5 mmx1gxx98xmhrcdv4ez5fxekmnczvwuqns3geh3wcj9l463d5jgqcwjqv35gpt 934 467 mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd 934 467 mmx1qc75vu9xfagl297yupuwl3jgqsecwlae3szn9lwpg9m5p0zcnzwqe4adsz 933 466.5 mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj 914 457 mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu 869 434.5 mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq 860 430 mmx1ywsu86chqesuxt45aktpkg78v7we86l0zf8xa3rcer6gn6xw8lnqnwk5tr 845 422.5 mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf 840 420 mmx1ms72mlttvspj4ga668t5xr7k8m98eedvvdwdkmwjfua2ttdmj33qvqyp7s 807 403.5 mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt 795 397.5 mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g 792 396 mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev 785 392.5 mmx1nr0cpl0g86e0wdzuahcc2x7f4pc63n2y6a6zpnsjt5lfsctzmufspp6vd5 778 389 mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm 765 382.5 mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t 764 382 mmx10jqs45t5ujdwtqyft07f4mxk7y08fac4ks0z6ee50n6fkq67992s09ezzz 758 379 mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3 752 376 mmx1efmq0tdmmpv7k7dzd8nn5ta045f9fdylk9pa848hzshh82zlxf5sganjdn 735 367.5 mmx1998n5nlledt8puwx80neyvle5xkayw0uvgdhuwup6gtpzd6ym0gqp5qzy4 723 361.5 mmx1tsl59gk2ahk0tkrcwnhnjh2kcnfnhyljt3n76h0cu00ael973k9s9dj2aa 676 338 mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l 674 337 mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z 673 336.5 mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku 669 334.5 mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk 666 333 mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp 654 327 mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4 650 325 mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl 636 318 mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl 626 313 mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y 613 306.5 mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2 605 302.5 mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d 600 300 mmx14fadj8tx3ksq8jvfmcsuhxnxmmn0lqdlpjs5rs8dfqphgsuluqfqxgys6j 575 287.5 mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg 554 277 mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s 550 275 mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f 536 268 mmx1h6lg70tzjmvsucw3c7mmdf98p553aj0hfd6sl7nekq4yucf4xnssd7hudq 513 256.5 mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m 511 255.5 mmx1lnmtuqh7jvxjsmmsf92ulcavxtr4fjhzva774zhs0fwvctzf7vgs53cn9h 510 255 mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc 509 254.5 mmx1hqcfqu3r7larng7g73jep24emu4kty990jecvfyugjuwp5n4acdq7wrxdg 508 254 mmx1cke885syq8wasw96nqp9cuh6wcr7sezvy65a3anjqzqhk59j9s9s7jl0gt 504 252 mmx1g4uyjjhup8hgk6akrjqvegmxu6xg98er5pt5uzqn520ud87rlgrqjn8cvt 469 234.5 mmx1pnpxvslglu4u7qnv3cwz4x8vzcc5y9nnlhkczkuzyv7995dz96qqrvwdrl 463 231.5 mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql 455 227.5 mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch 439 219.5 mmx1ls8zjlv2t0prtqvuy4pkasq8a6axrjythsu3nvsne5uzmkk82clqh28yvt 422 211 mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn 417 208.5 mmx1an3w925endfhcg50qelq69ahwvltupq4rt7wvnhfqd8leg2526qsgh2ret 405 202.5 mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9 396 198 mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88 375 187.5 mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0 353 176.5 mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0 348 174 mmx1gmvuqg5x4tn9fj53vsgahgwqa9h4jx0cz4x7xpet67kxu8n33fpseycg9t 344 172 mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8 322 161 mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0 318 159 mmx1jkajyu65wp0klsuyygjs5425tyq3ujffs7t7g6wgvxa2r4arrs2qqs99pp 315 157.5 mmx1mg56jxv3e0plu76824vw3w72kqumgyp2hetfg5s227lr96vjzd5qr4gxnj 310 155 mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c 308 154 mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv 307 153.5 mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80 307 153.5 mmx1h9ahw37ekqwx5sewaszmj54cn0l0pmzrksss7z0320ntkt63q6mssrfkkd 306 153 mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9 294 147 mmx1anyf8dhv7shc957xt95ujj6ltk2hmmwhl7hvftw67ph3uf7w4ulqpdvg9l 291 145.5 mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4 265 132.5 mmx1z5zgrrc2l37fg4cu6e7s80qyxm72fcw7xhfeep2caahptq7mdr2qzcl2xj 212 106 mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w 210 105 mmx1x4nlvf00jq5cld2tamnnssnshzd2v9gvtp2yjun60qgh2zj98kksyxgrh5 208 104 mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q 205 102.5 mmx1rh2lur825y90gqc5pxmejgk5d8wl934h0v8lv972rnevrfhpsmcqsqywld 200 100 mmx1eymvxpnp4seshcfn5qfctlzsukazt49t3m5zgz9q68g4sry89cfsggxcfa 197 98.5 mmx1njy6t7vkta3veyjj4atvr6ppmeeru85tgh5qvhvnmleslru54m9sqp3l60 195 97.5 mmx1u75x5wkrse550ag4nwnesaaqhvr3js7vtqh9r3vt0etcxzqu8z2s7u0d6h 190 95 mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7 178 89 mmx10ewttsgpc2vq980wlk0ddtc505vp5edvusl8a388y76peautetfsyj3ej7 166 83 mmx1k4rx2e7w5rl8jzs96hwj0hussljxc7tccyqng80r845uf4da9wcsat3pug 161 80.5 mmx1s9972ypp7cgngncz8au8737jw38rswzyc4x26u84gr4jk07q8s7qjaljld 160 80 mmx1m0qtqx7tvpw6rjhsmjnpr8dxgz8wyx3hypcg4qw5trnk34urxwyqxeym6v 157 78.5 mmx1wtt47s3lhpsu4nxfyvzl58jpslpnuvv9ymd0gthaxpern3yer20qjykd8r 156 78 mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc 132 66 mmx16cnha02fp053dvmxltjgluwjw0fdedpmxj5x72z053pwt86fgjtq7er08p 129 64.5 mmx15drd8dvlexsa460klqa0dqlluy0pya79z7lnkvj08zgzuncnzt5shqewhm 125 62.5 mmx13xu3ay8eujt4neuwyhxw002r6qlj0v5p8ldj6jus03ev0w5u7wpsxdd3v9 116 58 mmx14ljuxjzlu24djfrm2varlgvfup2q0keydus50mrv6qy2qpuxu2lsmm8gza 111 55.5 mmx1u3u8jn5824ema7zszlz8wuww49dz8vf08jd7vux952saltvx0l0syu2qzr 105 52.5 mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9 99 49.5 mmx12j3mpzmlpx9d77ux2990xwdhus99626yj3s75kyaxt4r80n3638s237x44 91 45.5 mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np 90 45 mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh 88 44 mmx1v5rqrf5ctkh0uj2xttjxcrkwaecztmcnaqj9zralud0rt70g8r8s5xmgv7 83 41.5 mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a 76 38 mmx17kwmmmdvgdmay78tzmr4m488xvax8ft5g98xpx93qg94pu0gtrjqxym59f 75 37.5 mmx1d8mj6q8tj54rejhx37skuzn88tld7emw3wra9agvjx9glraa8xaskpa5fg 71 35.5 mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x 69 34.5 mmx10w2sp9rp2s4s6uj32fu68gdqcjvdc9e6h3jm2qmne02400ul5pws4a4r5v 54 27 mmx140ya6nvrw4a9v4ydwrkutvju5tln6tflvq0uehqk6g42d2g8m5xszxwz45 52 26 mmx1dun6jkgf7cscymt6udr8nlm66gjewqyylyzvnswaaq5exzfw4kdqk6nk0p 50 25 mmx146y8qu72rkcw0xrs8vf8y7j423t42rtyynze5d3kw6e79vdsdenqj3esfl 49 24.5 mmx1wy0dhr03nf78m4gufm7jcnzfvaqq244ckzmup5s2054apysy6jgq4pp76h 48 24 mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552 46 23 mmx14emrk4d8vzp3c2yztqrzhnmy8r9tsnywrpmfrl838q50j0xjenjqay73ld 37 18.5 mmx1cxvpr0z0rjx9wfqrs7e8dzt5xshhlscpc8fk5xs79009zh3vesus9tru8m 36 18 mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0 32 16 mmx1z3qzxxkh09r73p9sh872xz7fqjahm048v0e80sypz5gd00u2f47qgf20p2 27 13.5 mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al 27 13.5 mmx1usygfr5xcuszd23r5cn627etytpyz8gqk7klyzkllwkwzhal5mjqjtjl3t 27 13.5 mmx1aawhv22wdnreucw8dk9au0qj93wnf04gvs20hgldlapsj24ny8hs0qtjgq 27 13.5 mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7 25 12.5 mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4 20 10 mmx1lgsye5dkh57mxj0n2glerlmdzrh76snfte6k92gvxemkuhvug5eqlhcjvm 20 10 mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336 18 9 mmx1vgjfpw47le6hw8kacxtf22tpmr3aqrw9umngy4gjkv94r7hp8gxqcqd55k 17 8.5 mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88 12 6 mmx187hkj0kvu3rjq4tj22xqlc8qkwp8n48xe9yh4xw0nzjj8cut3mnqy28fjq 10 5 mmx12m0cmm80y7twslqtz4z2qhesdkun9ncjhddnkdzeedf2tcap9qxq74nzf2 9 4.5 mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw 8 4 mmx1x758q5t2jafk32raj98u003duqlte37xzzzanwl7tef7gt4234rszr4l02 7 3.5 mmx1nwfsx2prjuvsq2q3pn2ygjntgu5rgnarpwrqq2l5adfm3wdmwwqste58cg 5 2.5 mmx1yxqjvl97jnhxwlvqzh8n53g67vc3l2u7m78aks5y9rym5utj948q3dgmma 5 2.5 mmx1ayukxr9jcev25gddx8yfpv27hauw0z3xy9z2jwzdqk8n624seayqkjhm9d 5 2.5 mmx1jwjpe8w9cpamhscl0svn3c3xy47cz50qsn38gu3mxed29gq96assmzaq9p 4 2 mmx1rk9f4slwuur34lnw6phl9nw2465a6pfjj76p0p8zx8erzhsw0jas7pjyqj 4 2 mmx1jqya2nk5kzref5tpqfz7ze2yd4mcdh5ax6szxjtk9sk5wza7hr9shjjsg3 4 2 mmx1ctxq3czng6y2ms40mf6pnq699p7skzsncq5qerceja4k20ve24pscadkxx 3 1.5 mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0 3 1.5 mmx1e98kn0hsxlvmn67g9rwq4jsmgfvrmhm55yj2dh6rk0ttrf960zuqrc6e5z 2 1 mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0 2 1 mmx1ksu3c85u4gd20v5dy5nkjk30fa7endp9mc2za37gr6tuak0y604susek8w 2 1 mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav 2 1 mmx193v808tk0f54j0cgxeqpnhywyyp3l3e847wlgl588murpgs43a5q65as7s 1 0.5 mmx15aarz3lnq8da6s86l8kuwwzy0gfw3tdqqu9xhq00lardxl4jv7jsa294sn 1 0.5 mmx1skt9meytux778svqe3d6fyvl7mjfrm99nlgyfwenclgr09ftm7uqc3cqxq 1 0.5 mmx1gssr7n6rfcffcu6g830sa2gusv89m7mp03sd86fula6gk4th380spllur9 1 0.5 mmx1sk6k9sdj836ynxntk2nt60funlz0t9ptqttrqvg46vcv5mdkwhaqgrgnnt 1 0.5 mmx19zld6lprrjhzzhltmjskuv7dxcqnewx9sjll8ccdm538wx40ajpq2f8m0k 1 0.5 mmx1zw68exayxayyakvgpnrf4ptfkkkcth2lvlu20le3e0ghrpae4hlq4sqfa9 1 0.5 mmx16qj5ep69xew0qfqms0hw6eh6et3jzjx46wm0xteslv5ufs02nd2qtp4rte 1 0.5 ================================================ FILE: data/testnet8/fix.js ================================================ const data = [["mmx1aepsfj9c4nqqcew5qk8rw5sqqkwer5pnmwx9y4elcdm9gy332vqq7flngz", 12250000], ["mmx1grznkf6d33xtkhee5899xa2jg8v3ktupude206jt7pzpmxgslgqqxtddgk", 250000], ["mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92", 12500000], ["mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93", 24750000], ["mmx1zvgs9rvzul3nflhqmtfdu8qpa2aqnqwxwsaatucsulsv5dd4svqsed4fyf", 5250000], ["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", 95000000], ["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", 128000000], ["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", 87250000], ["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", 67500000], ["mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u", 27500000], ["mmx10gntxs6zapmxesqh6mk5ujdxyvkada4r9pg4pcw7s6rlr88yvyzq8hsjzd", 75500000], ["mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z", 96750000], ["mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw", 37250000], ["mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0", 6000000], ["mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa", 15750000], ["mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj", 750000], ["mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37", 4500000], ["mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s", 76000000], ["mmx13qkvk6325f25vdmqc5xjq85q485zsgmh5pedmykg37mtt738du9s670h4n", 8500000], ["mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc", 14000000], ["mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y", 402750000], ["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", 95500000], ["mmx13cf0qwyp3zg6gqnkcupez7zfnwht6zpx3z2chq4erzstzypxy5xsycnjhu", 1000000], ["mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c", 24250000], ["mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha", 55750000], ["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", 93000000], ["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", 125250000], ["mmx1yqkentanxn7cp69sgz35j4eycq7jjxvel373aljj04a4fnuusqgq3nv5mw", 7750000], ["mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds", 75500000], ["mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j", 176500000], ["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", 349750000], ["mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5", 70500000], ["mmx1uwwzqtkhs2gv6gfja6hh8p2lhxtrv066umxq3nkccfqs4g3re5fsz9y55s", 256750000], ["mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu", 84500000], ["mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3", 16250000], ["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", 603750000], ["mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40", 73750000], ["mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k", 500000], ["mmx1q3nqrhd9uyjcls6jyj55x4wcnzlfd2mtezfy0m99gd0qt358hy2secef8p", 250000], ["mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z", 750000], ["mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd", 51250000], ["mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48", 60250000], ["mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f", 146500000], ["mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw", 17500000], ["mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2", 20750000], ["mmx1jr5hkhp35t05c7g9jxfvs6wz2all566kves6rx5ckl57pz7mmvtsemw7kv", 1250000], ["mmx1e0vmg4kc5ed5t85p2gjqrgql8ujrar0t95n9l63xnmkacgxv7gtsum8x2m", 25500000], ["mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl", 26250000], ["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", 28500000], ["mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv", 4000000], ["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", 216500000], ["mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q", 1250000], ["mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7", 22500000], ["mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae", 124000000], ["mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d", 182500000], ["mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466", 24500000], ["mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f", 2750000], ["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", 33750000], ["mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w", 137250000], ["mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3", 21750000], ["mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k", 9250000], ["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", 169500000], ["mmx1739equ4zcj89u9dl27ssz72wx6h9wrms57s00plkzq3g4wqxjqwsk6q67c", 500000], ["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", 29750000], ["mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6", 36500000], ["mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa", 23000000], ["mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs", 327250000], ["mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs", 343750000], ["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", 6000000], ["mmx120v9ahac98w3rfj208xsf7rasweaesz3n7dtgt4f60upczzs3vsq6d67q8", 95500000], ["mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn", 54250000], ["mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0", 352750000], ["mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e", 88000000], ["mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6", 30750000], ["mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q", 37500000], ["mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7", 52750000], ["mmx18xxcvsm8vekqk6hy2xwx7aen3fwj6us476auqvce9kyw49ekfcnqk7tcwp", 500000], ["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", 500000], ["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", 200750000], ["mmx1fq7a0hk0kwers7ymsdm9wswa7qes6fyw7nzguz3erm5j2xd4eynqxxflh2", 1000000], ["mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6", 707750000], ["mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7", 63000000], ["mmx1tw7lny4cxss0ks67wxz272y356nvgzl2ff6stee4x0muhr9zv55qs85vdy", 26750000], ["mmx12djy7tqtf5xmhdqhk58jkjtp3e6elekgcuhe8zr9reak29xz3c5qdqj7h6", 500000], ["mmx1n8fykdy0sk7jj8rn7fwv8awzel820mc2d9c9l959hajm8y8s6v5qayvhfr", 4750000], ["mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf", 1270000000], ["mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0", 121750000], ["mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5", 342750000], ["mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660", 27750000], ["mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej", 362500000], ["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", 122000000], ["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", 18250000], ["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", 86750000], ["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", 566500000], ["mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl", 64250000], ["mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29", 85250000], ["mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl", 68500000], ["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", 151250000], ["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", 19250000], ["mmx17s5j40067d5ugggn9ppdjg5enrxe37t0y58y8pjgnc0up25k7chq4rnaaz", 250000], ["mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq", 40250000], ["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", 72250000], ["mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5", 177000000], ["mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg", 1750000], ["mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh", 5250000], ["mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl", 145750000], ["mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers", 85750000], ["mmx1mhhmm9rsxk4fv5y9feft68uj4mrz2c8m33df5ts7ve6uz9xj7geqgqxd73", 32250000], ["mmx1ehmcg3t88xt37498wtca2geh2r0v2tzlzagk2jp5stc3heey0vesjefjzh", 1302250000], ["mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836", 22750000], ["mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w", 52750000], ["mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j", 319750000], ["mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj", 2500000], ["mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8", 34000000], ["mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552", 15500000], ["mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2", 2250000], ["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", 67750000], ["mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65", 96750000], ["mmx1lx2dgd8y94t40p55w45cdv0wqdk4m9q0tzaru9pvsq7decczasmq2l6gnz", 250000], ["mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j", 72500000], ["mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je", 558750000], ["mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8", 285750000], ["mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9", 2250000], ["mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k", 71250000], ["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", 223000000], ["mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086", 11000000], ["mmx1tn8khcvlnkhprvsgn7eutwlws3vn5yc4mnh85v9vdt5ze8zs7cushvg596", 250000], ["mmx1v8x90upymn830n267009ejv0xwpwmenm6a8nvx0te0v29lauvuaquh3emd", 750000], ["mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc", 421500000], ["mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c", 21500000], ["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", 394500000], ["mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl", 83000000], ["mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s", 17500000], ["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", 17750000], ["mmx1rdu30vgjdheh4453heuq98es6whgaskx7csmfh28m04sckxqes7ss2y89k", 16750000], ["mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp", 20000000], ["mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg", 241250000], ["mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py", 2000000], ["mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w", 123750000], ["mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88", 24750000], ["mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l", 206250000], ["mmx1zx7dt77dgkrzrn25zqqspxxzr6yyhk9wwgt0lelkxeda0ac3jsls68fl0c", 250000], ["mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn", 87750000], ["mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6", 15000000], ["mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs", 176750000], ["mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4", 61000000], ["mmx1zxfqw42gfax4wm88lvy76tt6et99pmd7vdjhfehx8jnejr2fg3pqmcvq8w", 63750000], ["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", 258250000], ["mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma", 169000000], ["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", 160000000], ["mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs", 244500000], ["mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e", 20000000], ["mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf", 5250000], ["mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu", 17750000], ["mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y", 292500000], ["mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm", 2250000], ["mmx1a5x6xect5s2cgdl7rh2hxwz7z5xqecvmlf9jjjj8za58al3mlprsr5germ", 2750000], ["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", 684500000], ["mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq", 304750000], ["mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg", 65000000], ["mmx19mrdy4z7gndh4k3dtrv0r38jsz6c4texjlwnmzjh0z0ccnk5t4yses5kz6", 500000], ["mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp", 39750000], ["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", 7250000], ["mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr", 10250000], ["mmx19a2ky2g4tylysduh8k5ev6kms2z2m4kk6veuljjs3cq2c0r7jexqmwewx5", 500000], ["mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu", 65500000], ["mmx1m5zcq8hazpjhxc54lk5hma3arvwtkpfgseahf79yn0ytchv364xqjza394", 53000000], ["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", 118000000], ["mmx1que54datv9wjvh6jjald43jlhxkvcpyl7e6jaqap8ch7my7sr48q0jq38k", 21250000], ["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", 353000000], ["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", 158500000], ["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", 57250000], ["mmx1hruc7t3lcdz2n0mukyjh6l9dtxd9hauzegufz9f05k3yaltz9agqph6vkc", 500000], ["mmx1prlfdpu5gmy5wh3yhtjgzlth0322mcxnw2zagydw5naant6dtegq3r7mqw", 750000], ["mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn", 220250000], ["mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg", 58750000], ["mmx1jc22nh8pmjz20qyyz6jwlx5crml0z7wwrrgn3p66rgpt9ay8r9fq9y2864", 14500000], ["mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k", 91250000], ["mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst", 102500000], ["mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx", 149500000], ["mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j", 873000000], ["mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j", 8250000], ["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", 6250000], ["mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6", 500000], ["mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z", 94000000], ["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", 78250000], ["mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f", 5250000], ["mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9", 1250000], ["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", 17250000], ["mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl", 1250000], ["mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm", 113750000], ["mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4", 467750000], ["mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57", 170000000], ["mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x", 36750000], ["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", 250000], ["mmx1gavx8yxen8hhfy7qgkqd0jqczysw8rgruef8nt5mp2sp7skeh3vq9lx32u", 23000000], ["mmx1gh9yw2ctnae2jy95gv3g70h7av7y9d2ha5dk6ehrf4nt0q7lppvs22d2vx", 250000], ["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", 13500000], ["mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh", 35750000], ["mmx12w9lkh26qc7fvw5038usc6y6cv28jy446qn07dczapjcv3rw49dqgk27s4", 7750000], ["mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c", 23750000], ["mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd", 110250000], ["mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn", 208250000], ["mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098", 354250000], ["mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy", 5500000], ["mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5", 14250000], ["mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9", 248750000], ["mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w", 32500000], ["mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7", 23500000], ["mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g", 201250000], ["mmx1vj9cy7vtmpzslkenxx9nx3pfsq9uuk0krgvnf5efetd3jxjjk4ssulv7f9", 500000], ["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", 166500000], ["mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00", 47750000], ["mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx", 5250000], ["mmx1kfacc8swpse06qz30mlkefhex6an4jurgmrrancxyan58xw9w93stpsf7y", 12250000], ["mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn", 17250000], ["mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2", 390500000], ["mmx12ykrc525ay96yfq0aq92vqmc5kqpnalxa0cmhy4x9sqlrvklh43svk5za5", 1500000], ["mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2", 7000000], ["mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7", 15500000], ["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", 237250000], ["mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu", 12250000], ["mmx1tl0fenlw4dgjcpx3hkahecqrxyzquszw8zdjwn4j005vvc7uy3jsgndw9f", 5000000], ["mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73", 17250000], ["mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja", 203750000], ["mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen", 11250000], ["mmx1y33f8xs9evumw58unlkcdgqudwzrjn5ftk52w0p03277mqvnw4ns05ferx", 250000], ["mmx1vxygt3x7vzn9fdyz2rj0jk6xxelqedgfs6v2qhvlrfjy3nw3pp5qckwxcr", 121500000], ["mmx16aylfh9g5xtm76lt954v7ntgwts3ldppg5a2ll0uw6sd9fklge5q7cdqk7", 15500000], ["mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa", 70500000], ["mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay", 2250000], ["mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7", 10000000], ["mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme", 6750000], ["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", 194750000], ["mmx16s93fxx6cap0rv6kx8dcc7f6syuymvjdqj7l3j0yas3qhhxw894qxgfcx3", 17250000], ["mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2", 68000000], ["mmx170qark2pk7xpjwsrvm4w405pxtjzwgvt3wtygu82a8t02rwan94q4r0vws", 250000], ["mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe", 3371750000], ["mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g", 750000], ["mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4", 276750000], ["mmx10pckcllf4w09gz5uup0waprsh033cmq28e24gnjlcpu54y6nwp4st3su3r", 2000000], ["mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y", 17250000], ["mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv", 8000000], ["mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66", 180250000], ["mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h", 10500000], ["mmx12hvena2t6ame3sh6xu2l3fs43qq9t7djnlt00jjyssj73m0e5eks4f5vcc", 41250000], ["mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6", 86500000], ["mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg", 757750000], ["mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry", 4500000], ["mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc", 42250000], ["mmx1hpt8ym8h0wk67hyjsa3e3ndncgk2p6qxwam3nrz8pzuyj42rj3hsm5pu7s", 12750000], ["mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4", 96750000], ["mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm", 32750000], ["mmx1lrlfmzwanfkqu3cg5c98w243du887xx4plshxezc8ljhhcn22acq4dzwew", 5750000], ["mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3", 211250000], ["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", 189750000], ["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", 160750000], ["mmx1csmu30z07zqudtna93hqlstcmuzp53kalmsawt0wq58l6d488fcs8fjcjx", 500000], ["mmx14zyrz6re7l4j2zzc72mq8w03vlv5gwvwm3rem7yalq9quz98kdcs3kt6a8", 750000], ["mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y", 4000000], ["mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d", 84250000], ["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", 12500000], ["mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg", 17250000], ["mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9", 99250000], ["mmx1tw6ur95jjmd95svmhsn4qe0vw84xeev8gsnes6d2ykauuk5xqd6q76vusz", 15000000], ["mmx1qaypsvtfwslrpaa4h0g6x2hh4j0tq9gh2p8dlla6rawr9r9t636qxd6s2k", 6750000], ["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", 26500000], ["mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv", 1250000], ["mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3", 125500000], ["mmx1vk59t5awts2etx5v4jyamy9cudnea8mtl2kzk4caryc8erp6j3mqj2f6xj", 7000000], ["mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry", 873750000], ["mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc", 341250000], ["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", 105750000], ["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", 6031750000], ["mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny", 28250000], ["mmx1e38wzhjm5442g2z3xk73paugk479863f3y4q2j0c3yprdw50fpaq20njlr", 250000], ["mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy", 36750000], ["mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd", 505750000], ["mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m", 93500000], ["mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp", 5500000], ["mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8", 18000000], ["mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d", 61500000], ["mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq", 91750000], ["mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx", 134750000], ["mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7", 20750000], ["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", 75750000], ["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", 86250000], ["mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y", 750000000], ["mmx13w9j9lkwrlrqttpnxp8atw0gf9x5jrq8my08m2mrugdrn2rrk9ls8k9j7x", 242250000], ["mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz", 59500000], ["mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm", 2000000], ["mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4", 2665250000], ["mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk", 16250000], ["mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng", 8250000], ["mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9", 1867750000], ["mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl", 11250000], ["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", 108000000], ["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", 38000000], ["mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw", 62250000], ["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", 134500000], ["mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8", 1940500000], ["mmx1x39l3phj2m3grgs0ynhd26nx2afh34faue745hltpzqr0jfsr6zszzkds2", 12500000], ["mmx1xc2gg83p82xgxdg90kn3gud6grm4dwznrna2l6k80l8rzkg9yzzsdmf32d", 66000000], ["mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh", 23000000], ["mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p", 84750000], ["mmx1knzrpleqz5ehr9j98scgy9vpzne2yg8ta3grp8zzxrxnjhwgvkrs94f6ql", 6750000], ["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", 271000000], ["mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde", 91750000], ["mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw", 229750000], ["mmx1lj3x3d08usvq9gdjrjvyxhzkxxjylp6qftz7pch635qyq8yjn6yq0h0xxw", 5750000], ["mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9", 101750000], ["mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z", 245500000], ["mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m", 19750000], ["mmx1pqk0hvm2lrct9uc7k534hg54538s7t9p6xewq49vnamhqs5gp79qfmnw7a", 250000], ["mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns", 119750000], ["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", 229750000], ["mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens", 185000000], ["mmx1avg4dzcn06t8a7hshveyekaeszh7y809jk3dneu52sx97vfal69qk30lh4", 119500000], ["mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6", 30000000], ["mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05", 7000000], ["mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj", 24500000], ["mmx1s0qc9xxvasndk09qljlp5mhn78qpn0pc8qe4zg0hw38hwetjzxxs9v4les", 1250000], ["mmx1zfqclk23ys7v98ck9ewfjz0x583g94xam3qzuetw28gc6f265xxsr507pc", 7000000], ["mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz", 32750000], ["mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz", 675250000], ["mmx1t4fc7yf2t0txxvqgnxdmhxnnd3sw6rcq953z2up277ssl5m0yz8q9h9frn", 750000], ["mmx18tw0yyc28wuqes5s80nzzh8dsax0rkkpqa4jpcv3wl0t83vf228qd04d9p", 11250000], ["mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw", 380000000], ["mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v", 6297750000], ["mmx1cx85le3wwhvxmvhapwdyp4tyu875xx4r0lxjtk6rj0dhgwdve78qru9tfu", 41250000], ["mmx17pw8cskjurc9p2503yns2y3m8uv8t3slwas2d9fav6e4xg27ww8s4j9na5", 500000], ["mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6", 51250000], ["mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7", 48500000], ["mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d", 3145750000], ["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", 252750000], ["mmx14w3wjj7c7d5w36frrsvjxy0xsuy4nlnufdxlrhuxzrz9xku5vjgsklvpgu", 250000], ["mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr", 605750000], ["mmx1wsazxs68mvqe2j0gcpfaqwczn0277586r60vkap0gpaklcyhakfs8wztsk", 26500000], ["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", 824500000], ["mmx1afqzsqeqaesyj35ugd2r0pt2x30u98uxvxr4y8u4as690zf3kktqfee809", 1250000], ["mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a", 42750000], ["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", 145250000], ["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", 355000000], ["mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr", 188000000], ["mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38", 81500000], ["mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg", 78250000], ["mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d", 12250000], ["mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3", 113750000], ["mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4", 16250000], ["mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824", 691750000], ["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", 8750000], ["mmx1vyedt4fgr8vw96qhx2hl8ktptddm68wzs7ytcvwky0et3f2fqzws9gpj63", 500000], ["mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k", 2000000], ["mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45", 18000000], ["mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav", 19000000], ["mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn", 16250000], ["mmx1rr569h8enxr68xd8jzyfplt0xwwqcghkhg2eqltyj9jqws4du60qsagq0s", 4000000], ["mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj", 16750000], ["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", 113750000], ["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", 7000000], ["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", 205000000], ["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", 392000000], ["mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre", 18750000], ["mmx1flhq9y5whh5q4t7jwcu7grfsl2vac95hmst4ywkghajptkazz7sse7je9a", 500000], ["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", 191250000], ["mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j", 1035500000], ["mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0", 311750000], ["mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57", 1045250000], ["mmx1d7a0q2v6qadeafuqguvt0h4a2hea9nky7dmgt7jszpkpfucu07jqwjfzt6", 7000000], ["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", 38750000], ["mmx1c46ug6qnnu70477acd28w4xh70d45yw2ev62lrwkgvntdga9d7jsvc0497", 9000000], ["mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh", 345750000], ["mmx1cx52w3t5tr7ynduqhx9d74lnnvumfm84flymt2etrv2fkfrm3wnqmsd3xa", 6750000], ["mmx1xazrdyth7ctuwetm9wnhrvgq30wlqvwuk6qn7p2huy7ffwg5nznqfw69ch", 23250000], ["mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn", 53250000], ["mmx1sr6hr6werw9vplvje6akazlplymdqlp7hae75uqxdys0z0wy46ns402jhk", 750000], ["mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09", 5000000], ["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", 36250000], ["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", 29000000], ["mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z", 96000000], ["mmx15p6ass9pp2l23cja3d6xge8jq5tmpspah67vdp7hv2pnnu04rk4qd5cvcw", 9250000], ["mmx1lqe5htxxh8ryhstdwmwfn97yjynaym9tl3wwq2x3m52e9qgld74q6uyxdu", 4250000], ["mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2", 23750000], ["mmx15cedp5xjcxgqvwj8hctcykxa7c3hgdlc0gfylnzwmk9vhlfzlz4qhcsacv", 500000], ["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", 109000000], ["mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx", 186000000], ["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", 1247500000], ["mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a", 250000], ["mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6", 12500000], ["mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war", 105000000], ["mmx1htwp6wcg0g706lfp8m8zhs3me5a87kj7p9rdqvywdv3ax8lp6jhqhgkwc7", 10250000], ["mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4", 1128500000], ["mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a", 292750000], ["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", 12750000], ["mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc", 10250000], ["mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef", 681250000], ["mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda", 102000000], ["mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc", 223000000], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 42250000], ["mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg", 55250000], ["mmx1mh0eqru3fwsmct0aunq5eww9ffs22tscparsznzzq6tvpmg04x6qnzrevn", 4250000], ["mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy", 19250000], ["mmx12gersmcmrkq2daaxsrpk3hpelxsetf2emn4u5qngvvm9x7r6k26slgztww", 2750000], ["mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x", 57500000], ["mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782", 20750000], ["mmx1vw48jzy5re9pp20c9plj77lt85x0aljktkzp945fgugupsf2uxmsmuyeaj", 750000], ["mmx1jlzru5r5xgjs5zx5nktv6klrjvvucwpwqst908ursthn6cqdp7usf98vxc", 16000000], ["mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2", 26500000], ["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", 750000], ["mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym", 78750000], ["mmx1us9z3c0r8a2fxex7za3vh24zwxmhw37ylna4559ulr7etmg5n27sdnhpfa", 250000], ["mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq", 913250000], ["mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh", 33250000], ["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", 303500000], ["mmx10f5xfpvgmx2lkulkqsf50lvafdwwatmdnjwvqh8kgcyexanrkxls49v67d", 2000000], ["mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns", 760250000], ["mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8", 9500000], ["mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk", 12000000], ["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", 85250000], ["mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha", 34750000], ["mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs", 3908750000], ["mmx1sdg5chqm4y225lmu35pj7ju58p85s9y07a94dke9cs2yq7caktpq5nq7da", 1000000], ["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", 37750000], ["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", 2864750000], ["mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez", 15500000], ["mmx1healszdpqs9ppuc2u0lkn6l6ll9n3epeh32rj2lqwcte9g8y58zq4g4pm6", 13250000], ["mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh", 21500000], ["mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza", 50000000], ["mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8", 353250000], ["mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a", 60500000], ["mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5", 299750000], ["mmx129hapqyd5n0lht763e3rm9mc23fwnh70pxeh9zyntntfvmr4f0yqejt30d", 1000000], ["mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69", 401750000], ["mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek", 6000000], ["mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm", 284750000], ["mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj", 250000], ["mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u", 64000000], ["mmx1dh6r74r89g2anwusnw2xjwh2seuc4zuvfrxet2jzan9jll9calys05g7mq", 21750000], ["mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh", 51750000], ["mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w", 301500000], ["mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2", 59500000], ["mmx1r3qvaeqnpp5hmu7tppj3pkgwj3pm2rnsrttvzck92uq93vspq09s7jdghh", 59750000], ["mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8", 630000000], ["mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr", 57000000], ["mmx1n9sl0wz6rjpnkmlwqphp4rema3ejfqeutujw0gkxncefe9hxglxs7csahg", 4750000], ["mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60", 59000000], ["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", 436750000], ["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", 223500000], ["mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz", 75750000], ["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", 652750000], ["mmx1q3v3z5txguskd6r0nrqqm4se3u4h5xasw4plxqk4cxfyw3l7tmgqayunfm", 250000], ["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", 441500000], ["mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud", 250000], ["mmx12hhyrde0aptpsm4kssvqw22k5qrq37wmy9ec9lkru47yad4hfrgs5l3jvm", 5250000], ["mmx1ehfcm2ggj5hm8fe4tu5dcuxpg7u4rmedus9thyzmm09995xjttfq0u7get", 49000000], ["mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs", 467500000], ["mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has", 93500000], ["mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88", 75000000], ["mmx1d5zv5ucgwufjj9jg7k3suj4uup7ayp9ld2tchxezwz3fyfu7jtfs9wethh", 3000000], ["mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g", 192750000], ["mmx1w67qjy2g4pyecrdayfrmaltxqk9vpvk577harjk0qdyplrycg82s2yx9fm", 500000], ["mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h", 6000000], ["mmx17e4mq3llxatljnfkdf2w0sy8mujaq4fn0q3rwdgztvh8rmlweh2sxk2xdx", 750000], ["mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3", 26250000], ["mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy", 86500000], ["mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d", 438750000], ["mmx15hv295x2hxwzwtzeyypg5lwj2z6k5q7j0ts80jn4n7um9u5zklvqgelhwa", 3500000], ["mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw", 6500000], ["mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv", 56750000], ["mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w", 308250000], ["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", 2082500000], ["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", 500000], ["mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3", 6500000], ["mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0", 1000000], ["mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28", 124250000], ["mmx1j6h6ans82uwhp77xnk0w6pd42c7nasqhnlvy5yfksax75l3r3mws2au86p", 1500000], ["mmx12tkjk987c9kccda9efdrw8xvmuqmca476czrfp0t7tdsysk36hwsdsstc5", 250000], ["mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw", 46000000], ["mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn", 55250000], ["mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm", 63250000], ["mmx13s89rmpg2vlars5nktpfh8mdjahkgzyj96mllj3zuj66zqx28h0sfmqk0k", 750000], ["mmx16hvwy7xwv9wxf64u0crk72d7jceqayjtk4v25xken3psfswrfhsq469ftu", 500000], ["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", 31000000], ["mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf", 1049000000], ["mmx1rwrvyjx2e6q6frgdmlcqlj565unwz5atsxzapdfpdfgc3pjc583qtxg496", 6500000], ["mmx1e39hfndd2x9atrmkyjjlcdn7j3f09cqne0klatnxqhhgqaxmkn3q4f9fd4", 10250000], ["mmx1q4nnmgqzs9lctpsysetvergsf6enfkdqvv6k6t3sedz00whpf83sf8dhkk", 1000000], ["mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza", 67500000], ["mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z", 7750000], ["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", 47750000], ["mmx1w29nsej9nxdsd498gqgymhhkc5e3enf4tg53a8lrnecspxu6aljsle96lx", 1500000], ["mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5", 1000000], ["mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut", 415000000], ["mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z", 17000000], ["mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp", 103000000], ["mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js", 365000000], ["mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4", 302750000], ["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", 323500000], ["mmx1arre93x7eupag0a235927awagqnz28x986tke4cqfcs667z22t5szzd8et", 122000000], ["mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha", 8000000], ["mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3", 307500000], ["mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a", 17750000], ["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", 214750000], ["mmx1kzultmf90j7u5lr9586l5mu3qd4xjl7h4k4yhxztms9spva8d8kqw9qj82", 500000], ["mmx1rkhdpgc8qsht500ty8jvzzqequalqpnk5vzvcx2rj3sr6cwfytksxwh08a", 1250000], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 408750000], ["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", 46750000], ["mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0", 647750000], ["mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up", 750000], ["mmx1333g7ffyguql8wdurnqmspwqrvrsf43647lt7wzatnanzm5xv8cq4q7mg0", 500000], ["mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3", 1462750000], ["mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae", 4250000], ["mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq", 64000000], ["mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx", 77500000], ["mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe", 11750000], ["mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy", 11750000], ["mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn", 65750000], ["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", 44500000], ["mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm", 170750000], ["mmx1z9p9lvrqf92x2lluafdyvrz3xjnrvag9wl7lhr6tfkfc0phzklmq8gdhzn", 250000], ["mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e", 431500000], ["mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx", 47750000], ["mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7", 193250000], ["mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x", 500000], ["mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52", 54750000], ["mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr", 713250000], ["mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9", 6250000], ["mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5", 31250000], ["mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje", 425750000], ["mmx1v2xtpyjklr994zu0a5hq84azaxyjmlnyz3shvt5fn0rf8nspdraq56jpgw", 1000000], ["mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv", 8250000], ["mmx1v8ram2hhzshqs55splpmpwsscfz2m3z35ajssnasm43jgmf7h0aq6sfx4m", 49250000], ["mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs", 2250000], ["mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85", 119000000], ["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", 2500000], ["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", 6500000], ["mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6", 1341500000], ["mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup", 13750000], ["mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336", 10250000], ["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", 30000000], ["mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc", 62500000], ["mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2", 580250000], ["mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk", 35750000], ["mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5", 1000000]] for(const entry of data) { entry[1] = entry[1] / 250000; } console.log(JSON.stringify(data)); const sorted = data.sort((a, b) => b[1] - a[1]); for(const entry of sorted) { console.log(entry[0], entry[1], entry[1] * 0.5); } ================================================ FILE: data/testnet8/rewards.json ================================================ [["mmx1aepsfj9c4nqqcew5qk8rw5sqqkwer5pnmwx9y4elcdm9gy332vqq7flngz",49],["mmx1grznkf6d33xtkhee5899xa2jg8v3ktupude206jt7pzpmxgslgqqxtddgk",1],["mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92",50],["mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93",99],["mmx1zvgs9rvzul3nflhqmtfdu8qpa2aqnqwxwsaatucsulsv5dd4svqsed4fyf",21],["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx",380],["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt",512],["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl",349],["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al",270],["mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u",110],["mmx10gntxs6zapmxesqh6mk5ujdxyvkada4r9pg4pcw7s6rlr88yvyzq8hsjzd",302],["mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z",387],["mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw",149],["mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0",24],["mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa",63],["mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj",3],["mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37",18],["mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s",304],["mmx13qkvk6325f25vdmqc5xjq85q485zsgmh5pedmykg37mtt738du9s670h4n",34],["mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc",56],["mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y",1611],["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0",382],["mmx13cf0qwyp3zg6gqnkcupez7zfnwht6zpx3z2chq4erzstzypxy5xsycnjhu",4],["mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c",97],["mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha",223],["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5",372],["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq",501],["mmx1yqkentanxn7cp69sgz35j4eycq7jjxvel373aljj04a4fnuusqgq3nv5mw",31],["mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds",302],["mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j",706],["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n",1399],["mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5",282],["mmx1uwwzqtkhs2gv6gfja6hh8p2lhxtrv066umxq3nkccfqs4g3re5fsz9y55s",1027],["mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu",338],["mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3",65],["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq",2415],["mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40",295],["mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k",2],["mmx1q3nqrhd9uyjcls6jyj55x4wcnzlfd2mtezfy0m99gd0qt358hy2secef8p",1],["mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z",3],["mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd",205],["mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48",241],["mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f",586],["mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw",70],["mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2",83],["mmx1jr5hkhp35t05c7g9jxfvs6wz2all566kves6rx5ckl57pz7mmvtsemw7kv",5],["mmx1e0vmg4kc5ed5t85p2gjqrgql8ujrar0t95n9l63xnmkacgxv7gtsum8x2m",102],["mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl",105],["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm",114],["mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv",16],["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9",866],["mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q",5],["mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7",90],["mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae",496],["mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d",730],["mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466",98],["mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f",11],["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c",135],["mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w",549],["mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3",87],["mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k",37],["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj",678],["mmx1739equ4zcj89u9dl27ssz72wx6h9wrms57s00plkzq3g4wqxjqwsk6q67c",2],["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr",119],["mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6",146],["mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa",92],["mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs",1309],["mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs",1375],["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn",24],["mmx120v9ahac98w3rfj208xsf7rasweaesz3n7dtgt4f60upczzs3vsq6d67q8",382],["mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn",217],["mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0",1411],["mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e",352],["mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6",123],["mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q",150],["mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7",211],["mmx18xxcvsm8vekqk6hy2xwx7aen3fwj6us476auqvce9kyw49ekfcnqk7tcwp",2],["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj",2],["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf",803],["mmx1fq7a0hk0kwers7ymsdm9wswa7qes6fyw7nzguz3erm5j2xd4eynqxxflh2",4],["mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6",2831],["mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7",252],["mmx1tw7lny4cxss0ks67wxz272y356nvgzl2ff6stee4x0muhr9zv55qs85vdy",107],["mmx12djy7tqtf5xmhdqhk58jkjtp3e6elekgcuhe8zr9reak29xz3c5qdqj7h6",2],["mmx1n8fykdy0sk7jj8rn7fwv8awzel820mc2d9c9l959hajm8y8s6v5qayvhfr",19],["mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf",5080],["mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0",487],["mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5",1371],["mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660",111],["mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej",1450],["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0",488],["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0",73],["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs",347],["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0",2266],["mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl",257],["mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29",341],["mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl",274],["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82",605],["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn",77],["mmx17s5j40067d5ugggn9ppdjg5enrxe37t0y58y8pjgnc0up25k7chq4rnaaz",1],["mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq",161],["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl",289],["mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5",708],["mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg",7],["mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh",21],["mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl",583],["mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers",343],["mmx1mhhmm9rsxk4fv5y9feft68uj4mrz2c8m33df5ts7ve6uz9xj7geqgqxd73",129],["mmx1ehmcg3t88xt37498wtca2geh2r0v2tzlzagk2jp5stc3heey0vesjefjzh",5209],["mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836",91],["mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w",211],["mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j",1279],["mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj",10],["mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8",136],["mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552",62],["mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2",9],["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu",271],["mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65",387],["mmx1lx2dgd8y94t40p55w45cdv0wqdk4m9q0tzaru9pvsq7decczasmq2l6gnz",1],["mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j",290],["mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je",2235],["mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8",1143],["mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9",9],["mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k",285],["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru",892],["mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086",44],["mmx1tn8khcvlnkhprvsgn7eutwlws3vn5yc4mnh85v9vdt5ze8zs7cushvg596",1],["mmx1v8x90upymn830n267009ejv0xwpwmenm6a8nvx0te0v29lauvuaquh3emd",3],["mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc",1686],["mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c",86],["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l",1578],["mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl",332],["mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s",70],["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2",71],["mmx1rdu30vgjdheh4453heuq98es6whgaskx7csmfh28m04sckxqes7ss2y89k",67],["mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp",80],["mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg",965],["mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py",8],["mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w",495],["mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88",99],["mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l",825],["mmx1zx7dt77dgkrzrn25zqqspxxzr6yyhk9wwgt0lelkxeda0ac3jsls68fl0c",1],["mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn",351],["mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6",60],["mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs",707],["mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4",244],["mmx1zxfqw42gfax4wm88lvy76tt6et99pmd7vdjhfehx8jnejr2fg3pqmcvq8w",255],["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3",1033],["mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma",676],["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn",640],["mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs",978],["mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e",80],["mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf",21],["mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu",71],["mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y",1170],["mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm",9],["mmx1a5x6xect5s2cgdl7rh2hxwz7z5xqecvmlf9jjjj8za58al3mlprsr5germ",11],["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0",2738],["mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq",1219],["mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg",260],["mmx19mrdy4z7gndh4k3dtrv0r38jsz6c4texjlwnmzjh0z0ccnk5t4yses5kz6",2],["mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp",159],["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c",29],["mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr",41],["mmx19a2ky2g4tylysduh8k5ev6kms2z2m4kk6veuljjs3cq2c0r7jexqmwewx5",2],["mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu",262],["mmx1m5zcq8hazpjhxc54lk5hma3arvwtkpfgseahf79yn0ytchv364xqjza394",212],["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj",472],["mmx1que54datv9wjvh6jjald43jlhxkvcpyl7e6jaqap8ch7my7sr48q0jq38k",85],["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy",1412],["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr",634],["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6",229],["mmx1hruc7t3lcdz2n0mukyjh6l9dtxd9hauzegufz9f05k3yaltz9agqph6vkc",2],["mmx1prlfdpu5gmy5wh3yhtjgzlth0322mcxnw2zagydw5naant6dtegq3r7mqw",3],["mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn",881],["mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg",235],["mmx1jc22nh8pmjz20qyyz6jwlx5crml0z7wwrrgn3p66rgpt9ay8r9fq9y2864",58],["mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k",365],["mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst",410],["mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx",598],["mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j",3492],["mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j",33],["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp",25],["mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6",2],["mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z",376],["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5",313],["mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f",21],["mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9",5],["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn",69],["mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl",5],["mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm",455],["mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4",1871],["mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57",680],["mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x",147],["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9",1],["mmx1gavx8yxen8hhfy7qgkqd0jqczysw8rgruef8nt5mp2sp7skeh3vq9lx32u",92],["mmx1gh9yw2ctnae2jy95gv3g70h7av7y9d2ha5dk6ehrf4nt0q7lppvs22d2vx",1],["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0",54],["mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh",143],["mmx12w9lkh26qc7fvw5038usc6y6cv28jy446qn07dczapjcv3rw49dqgk27s4",31],["mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c",95],["mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd",441],["mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn",833],["mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098",1417],["mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy",22],["mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5",57],["mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9",995],["mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w",130],["mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7",94],["mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g",805],["mmx1vj9cy7vtmpzslkenxx9nx3pfsq9uuk0krgvnf5efetd3jxjjk4ssulv7f9",2],["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym",666],["mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00",191],["mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx",21],["mmx1kfacc8swpse06qz30mlkefhex6an4jurgmrrancxyan58xw9w93stpsf7y",49],["mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn",69],["mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2",1562],["mmx12ykrc525ay96yfq0aq92vqmc5kqpnalxa0cmhy4x9sqlrvklh43svk5za5",6],["mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2",28],["mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7",62],["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t",949],["mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu",49],["mmx1tl0fenlw4dgjcpx3hkahecqrxyzquszw8zdjwn4j005vvc7uy3jsgndw9f",20],["mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73",69],["mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja",815],["mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen",45],["mmx1y33f8xs9evumw58unlkcdgqudwzrjn5ftk52w0p03277mqvnw4ns05ferx",1],["mmx1vxygt3x7vzn9fdyz2rj0jk6xxelqedgfs6v2qhvlrfjy3nw3pp5qckwxcr",486],["mmx16aylfh9g5xtm76lt954v7ntgwts3ldppg5a2ll0uw6sd9fklge5q7cdqk7",62],["mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa",282],["mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay",9],["mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7",40],["mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme",27],["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3",779],["mmx16s93fxx6cap0rv6kx8dcc7f6syuymvjdqj7l3j0yas3qhhxw894qxgfcx3",69],["mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2",272],["mmx170qark2pk7xpjwsrvm4w405pxtjzwgvt3wtygu82a8t02rwan94q4r0vws",1],["mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe",13487],["mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g",3],["mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4",1107],["mmx10pckcllf4w09gz5uup0waprsh033cmq28e24gnjlcpu54y6nwp4st3su3r",8],["mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y",69],["mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv",32],["mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66",721],["mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h",42],["mmx12hvena2t6ame3sh6xu2l3fs43qq9t7djnlt00jjyssj73m0e5eks4f5vcc",165],["mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6",346],["mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg",3031],["mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry",18],["mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc",169],["mmx1hpt8ym8h0wk67hyjsa3e3ndncgk2p6qxwam3nrz8pzuyj42rj3hsm5pu7s",51],["mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4",387],["mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm",131],["mmx1lrlfmzwanfkqu3cg5c98w243du887xx4plshxezc8ljhhcn22acq4dzwew",23],["mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3",845],["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60",759],["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj",643],["mmx1csmu30z07zqudtna93hqlstcmuzp53kalmsawt0wq58l6d488fcs8fjcjx",2],["mmx14zyrz6re7l4j2zzc72mq8w03vlv5gwvwm3rem7yalq9quz98kdcs3kt6a8",3],["mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y",16],["mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d",337],["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5",50],["mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg",69],["mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9",397],["mmx1tw6ur95jjmd95svmhsn4qe0vw84xeev8gsnes6d2ykauuk5xqd6q76vusz",60],["mmx1qaypsvtfwslrpaa4h0g6x2hh4j0tq9gh2p8dlla6rawr9r9t636qxd6s2k",27],["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu",106],["mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv",5],["mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3",502],["mmx1vk59t5awts2etx5v4jyamy9cudnea8mtl2kzk4caryc8erp6j3mqj2f6xj",28],["mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry",3495],["mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc",1365],["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g",423],["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v",24127],["mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny",113],["mmx1e38wzhjm5442g2z3xk73paugk479863f3y4q2j0c3yprdw50fpaq20njlr",1],["mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy",147],["mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd",2023],["mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m",374],["mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp",22],["mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8",72],["mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d",246],["mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq",367],["mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx",539],["mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7",83],["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq",303],["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc",345],["mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y",3000],["mmx13w9j9lkwrlrqttpnxp8atw0gf9x5jrq8my08m2mrugdrn2rrk9ls8k9j7x",969],["mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz",238],["mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm",8],["mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4",10661],["mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk",65],["mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng",33],["mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9",7471],["mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl",45],["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3",432],["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv",152],["mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw",249],["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry",538],["mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8",7762],["mmx1x39l3phj2m3grgs0ynhd26nx2afh34faue745hltpzqr0jfsr6zszzkds2",50],["mmx1xc2gg83p82xgxdg90kn3gud6grm4dwznrna2l6k80l8rzkg9yzzsdmf32d",264],["mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh",92],["mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p",339],["mmx1knzrpleqz5ehr9j98scgy9vpzne2yg8ta3grp8zzxrxnjhwgvkrs94f6ql",27],["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s",1084],["mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde",367],["mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw",919],["mmx1lj3x3d08usvq9gdjrjvyxhzkxxjylp6qftz7pch635qyq8yjn6yq0h0xxw",23],["mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9",407],["mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z",982],["mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m",79],["mmx1pqk0hvm2lrct9uc7k534hg54538s7t9p6xewq49vnamhqs5gp79qfmnw7a",1],["mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns",479],["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr",919],["mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens",740],["mmx1avg4dzcn06t8a7hshveyekaeszh7y809jk3dneu52sx97vfal69qk30lh4",478],["mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6",120],["mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05",28],["mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj",98],["mmx1s0qc9xxvasndk09qljlp5mhn78qpn0pc8qe4zg0hw38hwetjzxxs9v4les",5],["mmx1zfqclk23ys7v98ck9ewfjz0x583g94xam3qzuetw28gc6f265xxsr507pc",28],["mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz",131],["mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz",2701],["mmx1t4fc7yf2t0txxvqgnxdmhxnnd3sw6rcq953z2up277ssl5m0yz8q9h9frn",3],["mmx18tw0yyc28wuqes5s80nzzh8dsax0rkkpqa4jpcv3wl0t83vf228qd04d9p",45],["mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw",1520],["mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v",25191],["mmx1cx85le3wwhvxmvhapwdyp4tyu875xx4r0lxjtk6rj0dhgwdve78qru9tfu",165],["mmx17pw8cskjurc9p2503yns2y3m8uv8t3slwas2d9fav6e4xg27ww8s4j9na5",2],["mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6",205],["mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7",194],["mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d",12583],["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap",1011],["mmx14w3wjj7c7d5w36frrsvjxy0xsuy4nlnufdxlrhuxzrz9xku5vjgsklvpgu",1],["mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr",2423],["mmx1wsazxs68mvqe2j0gcpfaqwczn0277586r60vkap0gpaklcyhakfs8wztsk",106],["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn",3298],["mmx1afqzsqeqaesyj35ugd2r0pt2x30u98uxvxr4y8u4as690zf3kktqfee809",5],["mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a",171],["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05",581],["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg",1420],["mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr",752],["mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38",326],["mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg",313],["mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d",49],["mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3",455],["mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4",65],["mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824",2767],["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch",35],["mmx1vyedt4fgr8vw96qhx2hl8ktptddm68wzs7ytcvwky0et3f2fqzws9gpj63",2],["mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k",8],["mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45",72],["mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav",76],["mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn",65],["mmx1rr569h8enxr68xd8jzyfplt0xwwqcghkhg2eqltyj9jqws4du60qsagq0s",16],["mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj",67],["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s",455],["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn",28],["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp",820],["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map",1568],["mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre",75],["mmx1flhq9y5whh5q4t7jwcu7grfsl2vac95hmst4ywkghajptkazz7sse7je9a",2],["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp",765],["mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j",4142],["mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0",1247],["mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57",4181],["mmx1d7a0q2v6qadeafuqguvt0h4a2hea9nky7dmgt7jszpkpfucu07jqwjfzt6",28],["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm",155],["mmx1c46ug6qnnu70477acd28w4xh70d45yw2ev62lrwkgvntdga9d7jsvc0497",36],["mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh",1383],["mmx1cx52w3t5tr7ynduqhx9d74lnnvumfm84flymt2etrv2fkfrm3wnqmsd3xa",27],["mmx1xazrdyth7ctuwetm9wnhrvgq30wlqvwuk6qn7p2huy7ffwg5nznqfw69ch",93],["mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn",213],["mmx1sr6hr6werw9vplvje6akazlplymdqlp7hae75uqxdys0z0wy46ns402jhk",3],["mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09",20],["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80",145],["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t",116],["mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z",384],["mmx15p6ass9pp2l23cja3d6xge8jq5tmpspah67vdp7hv2pnnu04rk4qd5cvcw",37],["mmx1lqe5htxxh8ryhstdwmwfn97yjynaym9tl3wwq2x3m52e9qgld74q6uyxdu",17],["mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2",95],["mmx15cedp5xjcxgqvwj8hctcykxa7c3hgdlc0gfylnzwmk9vhlfzlz4qhcsacv",2],["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3",436],["mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx",744],["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf",4990],["mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a",1],["mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6",50],["mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war",420],["mmx1htwp6wcg0g706lfp8m8zhs3me5a87kj7p9rdqvywdv3ax8lp6jhqhgkwc7",41],["mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4",4514],["mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a",1171],["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w",51],["mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc",41],["mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef",2725],["mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda",408],["mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc",892],["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z",169],["mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg",221],["mmx1mh0eqru3fwsmct0aunq5eww9ffs22tscparsznzzq6tvpmg04x6qnzrevn",17],["mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy",77],["mmx12gersmcmrkq2daaxsrpk3hpelxsetf2emn4u5qngvvm9x7r6k26slgztww",11],["mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x",230],["mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782",83],["mmx1vw48jzy5re9pp20c9plj77lt85x0aljktkzp945fgugupsf2uxmsmuyeaj",3],["mmx1jlzru5r5xgjs5zx5nktv6klrjvvucwpwqst908ursthn6cqdp7usf98vxc",64],["mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2",106],["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4",3],["mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym",315],["mmx1us9z3c0r8a2fxex7za3vh24zwxmhw37ylna4559ulr7etmg5n27sdnhpfa",1],["mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq",3653],["mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh",133],["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw",1214],["mmx10f5xfpvgmx2lkulkqsf50lvafdwwatmdnjwvqh8kgcyexanrkxls49v67d",8],["mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns",3041],["mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8",38],["mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk",48],["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu",341],["mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha",139],["mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs",15635],["mmx1sdg5chqm4y225lmu35pj7ju58p85s9y07a94dke9cs2yq7caktpq5nq7da",4],["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99",151],["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0",11459],["mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez",62],["mmx1healszdpqs9ppuc2u0lkn6l6ll9n3epeh32rj2lqwcte9g8y58zq4g4pm6",53],["mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh",86],["mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza",200],["mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8",1413],["mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a",242],["mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5",1199],["mmx129hapqyd5n0lht763e3rm9mc23fwnh70pxeh9zyntntfvmr4f0yqejt30d",4],["mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69",1607],["mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek",24],["mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm",1139],["mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj",1],["mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u",256],["mmx1dh6r74r89g2anwusnw2xjwh2seuc4zuvfrxet2jzan9jll9calys05g7mq",87],["mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh",207],["mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w",1206],["mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2",238],["mmx1r3qvaeqnpp5hmu7tppj3pkgwj3pm2rnsrttvzck92uq93vspq09s7jdghh",239],["mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8",2520],["mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr",228],["mmx1n9sl0wz6rjpnkmlwqphp4rema3ejfqeutujw0gkxncefe9hxglxs7csahg",19],["mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60",236],["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27",1747],["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku",894],["mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz",303],["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92",2611],["mmx1q3v3z5txguskd6r0nrqqm4se3u4h5xasw4plxqk4cxfyw3l7tmgqayunfm",1],["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6",1766],["mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud",1],["mmx12hhyrde0aptpsm4kssvqw22k5qrq37wmy9ec9lkru47yad4hfrgs5l3jvm",21],["mmx1ehfcm2ggj5hm8fe4tu5dcuxpg7u4rmedus9thyzmm09995xjttfq0u7get",196],["mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs",1870],["mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has",374],["mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88",300],["mmx1d5zv5ucgwufjj9jg7k3suj4uup7ayp9ld2tchxezwz3fyfu7jtfs9wethh",12],["mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g",771],["mmx1w67qjy2g4pyecrdayfrmaltxqk9vpvk577harjk0qdyplrycg82s2yx9fm",2],["mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h",24],["mmx17e4mq3llxatljnfkdf2w0sy8mujaq4fn0q3rwdgztvh8rmlweh2sxk2xdx",3],["mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3",105],["mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy",346],["mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d",1755],["mmx15hv295x2hxwzwtzeyypg5lwj2z6k5q7j0ts80jn4n7um9u5zklvqgelhwa",14],["mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw",26],["mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv",227],["mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w",1233],["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz",8330],["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9",2],["mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3",26],["mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0",4],["mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28",497],["mmx1j6h6ans82uwhp77xnk0w6pd42c7nasqhnlvy5yfksax75l3r3mws2au86p",6],["mmx12tkjk987c9kccda9efdrw8xvmuqmca476czrfp0t7tdsysk36hwsdsstc5",1],["mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw",184],["mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn",221],["mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm",253],["mmx13s89rmpg2vlars5nktpfh8mdjahkgzyj96mllj3zuj66zqx28h0sfmqk0k",3],["mmx16hvwy7xwv9wxf64u0crk72d7jceqayjtk4v25xken3psfswrfhsq469ftu",2],["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt",124],["mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf",4196],["mmx1rwrvyjx2e6q6frgdmlcqlj565unwz5atsxzapdfpdfgc3pjc583qtxg496",26],["mmx1e39hfndd2x9atrmkyjjlcdn7j3f09cqne0klatnxqhhgqaxmkn3q4f9fd4",41],["mmx1q4nnmgqzs9lctpsysetvergsf6enfkdqvv6k6t3sedz00whpf83sf8dhkk",4],["mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza",270],["mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z",31],["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s",191],["mmx1w29nsej9nxdsd498gqgymhhkc5e3enf4tg53a8lrnecspxu6aljsle96lx",6],["mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5",4],["mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut",1660],["mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z",68],["mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp",412],["mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js",1460],["mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4",1211],["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl",1294],["mmx1arre93x7eupag0a235927awagqnz28x986tke4cqfcs667z22t5szzd8et",488],["mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha",32],["mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3",1230],["mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a",71],["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a",859],["mmx1kzultmf90j7u5lr9586l5mu3qd4xjl7h4k4yhxztms9spva8d8kqw9qj82",2],["mmx1rkhdpgc8qsht500ty8jvzzqequalqpnk5vzvcx2rj3sr6cwfytksxwh08a",5],["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z",1635],["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05",187],["mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0",2591],["mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up",3],["mmx1333g7ffyguql8wdurnqmspwqrvrsf43647lt7wzatnanzm5xv8cq4q7mg0",2],["mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3",5851],["mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae",17],["mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq",256],["mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx",310],["mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe",47],["mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy",47],["mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn",263],["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t",178],["mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm",683],["mmx1z9p9lvrqf92x2lluafdyvrz3xjnrvag9wl7lhr6tfkfc0phzklmq8gdhzn",1],["mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e",1726],["mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx",191],["mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7",773],["mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x",2],["mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52",219],["mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr",2853],["mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9",25],["mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5",125],["mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje",1703],["mmx1v2xtpyjklr994zu0a5hq84azaxyjmlnyz3shvt5fn0rf8nspdraq56jpgw",4],["mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv",33],["mmx1v8ram2hhzshqs55splpmpwsscfz2m3z35ajssnasm43jgmf7h0aq6sfx4m",197],["mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs",9],["mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85",476],["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q",10],["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f",26],["mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6",5366],["mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup",55],["mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336",41],["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t",120],["mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc",250],["mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2",2321],["mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk",143],["mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5",4]] ================================================ FILE: data/testnet8/rewards.txt ================================================ mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v 25191 12595.5 mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v 24127 12063.5 mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs 15635 7817.5 mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe 13487 6743.5 mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d 12583 6291.5 mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0 11459 5729.5 mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4 10661 5330.5 mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz 8330 4165 mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8 7762 3881 mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9 7471 3735.5 mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3 5851 2925.5 mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6 5366 2683 mmx1ehmcg3t88xt37498wtca2geh2r0v2tzlzagk2jp5stc3heey0vesjefjzh 5209 2604.5 mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf 5080 2540 mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf 4990 2495 mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4 4514 2257 mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf 4196 2098 mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57 4181 2090.5 mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j 4142 2071 mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq 3653 1826.5 mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry 3495 1747.5 mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j 3492 1746 mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn 3298 1649 mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns 3041 1520.5 mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg 3031 1515.5 mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y 3000 1500 mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr 2853 1426.5 mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6 2831 1415.5 mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824 2767 1383.5 mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0 2738 1369 mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef 2725 1362.5 mmx1uyczs9n3942y28h6jw6dpyfqr99xlhdr2r8qus4907lr2srtuwxs5cchgz 2701 1350.5 mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92 2611 1305.5 mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0 2591 1295.5 mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8 2520 1260 mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr 2423 1211.5 mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq 2415 1207.5 mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2 2321 1160.5 mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0 2266 1133 mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je 2235 1117.5 mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd 2023 1011.5 mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4 1871 935.5 mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs 1870 935 mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6 1766 883 mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d 1755 877.5 mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27 1747 873.5 mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e 1726 863 mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje 1703 851.5 mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc 1686 843 mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut 1660 830 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 1635 817.5 mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y 1611 805.5 mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69 1607 803.5 mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l 1578 789 mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map 1568 784 mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2 1562 781 mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw 1520 760 mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js 1460 730 mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej 1450 725 mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg 1420 710 mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098 1417 708.5 mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8 1413 706.5 mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy 1412 706 mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0 1411 705.5 mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n 1399 699.5 mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh 1383 691.5 mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs 1375 687.5 mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5 1371 685.5 mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc 1365 682.5 mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs 1309 654.5 mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl 1294 647 mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j 1279 639.5 mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0 1247 623.5 mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w 1233 616.5 mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3 1230 615 mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq 1219 609.5 mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw 1214 607 mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4 1211 605.5 mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w 1206 603 mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5 1199 599.5 mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a 1171 585.5 mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y 1170 585 mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8 1143 571.5 mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm 1139 569.5 mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4 1107 553.5 mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s 1084 542 mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3 1033 516.5 mmx1uwwzqtkhs2gv6gfja6hh8p2lhxtrv066umxq3nkccfqs4g3re5fsz9y55s 1027 513.5 mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap 1011 505.5 mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9 995 497.5 mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z 982 491 mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs 978 489 mmx13w9j9lkwrlrqttpnxp8atw0gf9x5jrq8my08m2mrugdrn2rrk9ls8k9j7x 969 484.5 mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg 965 482.5 mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t 949 474.5 mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw 919 459.5 mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr 919 459.5 mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku 894 447 mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru 892 446 mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc 892 446 mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn 881 440.5 mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9 866 433 mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a 859 429.5 mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3 845 422.5 mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn 833 416.5 mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l 825 412.5 mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp 820 410 mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja 815 407.5 mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g 805 402.5 mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf 803 401.5 mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3 779 389.5 mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7 773 386.5 mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g 771 385.5 mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp 765 382.5 mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60 759 379.5 mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr 752 376 mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx 744 372 mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens 740 370 mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d 730 365 mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66 721 360.5 mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5 708 354 mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs 707 353.5 mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j 706 353 mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm 683 341.5 mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57 680 340 mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj 678 339 mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma 676 338 mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym 666 333 mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj 643 321.5 mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn 640 320 mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr 634 317 mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82 605 302.5 mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx 598 299 mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f 586 293 mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl 583 291.5 mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05 581 290.5 mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w 549 274.5 mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx 539 269.5 mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry 538 269 mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt 512 256 mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3 502 251 mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq 501 250.5 mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28 497 248.5 mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae 496 248 mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w 495 247.5 mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0 488 244 mmx1arre93x7eupag0a235927awagqnz28x986tke4cqfcs667z22t5szzd8et 488 244 mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0 487 243.5 mmx1vxygt3x7vzn9fdyz2rj0jk6xxelqedgfs6v2qhvlrfjy3nw3pp5qckwxcr 486 243 mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns 479 239.5 mmx1avg4dzcn06t8a7hshveyekaeszh7y809jk3dneu52sx97vfal69qk30lh4 478 239 mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85 476 238 mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj 472 236 mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm 455 227.5 mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3 455 227.5 mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s 455 227.5 mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd 441 220.5 mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3 436 218 mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3 432 216 mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g 423 211.5 mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war 420 210 mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp 412 206 mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst 410 205 mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda 408 204 mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9 407 203.5 mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9 397 198.5 mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z 387 193.5 mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65 387 193.5 mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4 387 193.5 mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z 384 192 mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0 382 191 mmx120v9ahac98w3rfj208xsf7rasweaesz3n7dtgt4f60upczzs3vsq6d67q8 382 191 mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx 380 190 mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z 376 188 mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m 374 187 mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has 374 187 mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5 372 186 mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq 367 183.5 mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde 367 183.5 mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k 365 182.5 mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e 352 176 mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn 351 175.5 mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl 349 174.5 mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs 347 173.5 mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6 346 173 mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy 346 173 mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc 345 172.5 mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers 343 171.5 mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29 341 170.5 mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu 341 170.5 mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p 339 169.5 mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu 338 169 mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d 337 168.5 mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl 332 166 mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38 326 163 mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym 315 157.5 mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5 313 156.5 mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg 313 156.5 mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx 310 155 mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s 304 152 mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq 303 151.5 mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz 303 151.5 mmx10gntxs6zapmxesqh6mk5ujdxyvkada4r9pg4pcw7s6rlr88yvyzq8hsjzd 302 151 mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds 302 151 mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88 300 150 mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40 295 147.5 mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j 290 145 mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl 289 144.5 mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k 285 142.5 mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5 282 141 mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa 282 141 mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl 274 137 mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2 272 136 mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu 271 135.5 mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al 270 135 mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza 270 135 mmx1xc2gg83p82xgxdg90kn3gud6grm4dwznrna2l6k80l8rzkg9yzzsdmf32d 264 132 mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn 263 131.5 mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu 262 131 mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg 260 130 mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl 257 128.5 mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u 256 128 mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq 256 128 mmx1zxfqw42gfax4wm88lvy76tt6et99pmd7vdjhfehx8jnejr2fg3pqmcvq8w 255 127.5 mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm 253 126.5 mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7 252 126 mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc 250 125 mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw 249 124.5 mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d 246 123 mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4 244 122 mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a 242 121 mmx12u3ppvj9yvh6xs36zscus50m644dx8ywqq530w3jkjhly8hf3qtqy6fe48 241 120.5 mmx1r3qvaeqnpp5hmu7tppj3pkgwj3pm2rnsrttvzck92uq93vspq09s7jdghh 239 119.5 mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz 238 119 mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2 238 119 mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60 236 118 mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg 235 117.5 mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x 230 115 mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6 229 114.5 mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr 228 114 mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv 227 113.5 mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha 223 111.5 mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg 221 110.5 mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn 221 110.5 mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52 219 109.5 mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn 217 108.5 mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn 213 106.5 mmx1m5zcq8hazpjhxc54lk5hma3arvwtkpfgseahf79yn0ytchv364xqjza394 212 106 mmx18tph3dn7ahfs24zu4lnlhrn9uk35s6fd46x58jf2xq3wzdw8ygjs5eamp7 211 105.5 mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w 211 105.5 mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh 207 103.5 mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd 205 102.5 mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6 205 102.5 mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza 200 100 mmx1v8ram2hhzshqs55splpmpwsscfz2m3z35ajssnasm43jgmf7h0aq6sfx4m 197 98.5 mmx1ehfcm2ggj5hm8fe4tu5dcuxpg7u4rmedus9thyzmm09995xjttfq0u7get 196 98 mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7 194 97 mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00 191 95.5 mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s 191 95.5 mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx 191 95.5 mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05 187 93.5 mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw 184 92 mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t 178 89 mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a 171 85.5 mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc 169 84.5 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 169 84.5 mmx12hvena2t6ame3sh6xu2l3fs43qq9t7djnlt00jjyssj73m0e5eks4f5vcc 165 82.5 mmx1cx85le3wwhvxmvhapwdyp4tyu875xx4r0lxjtk6rj0dhgwdve78qru9tfu 165 82.5 mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq 161 80.5 mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp 159 79.5 mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm 155 77.5 mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv 152 76 mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99 151 75.5 mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q 150 75 mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw 149 74.5 mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x 147 73.5 mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy 147 73.5 mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6 146 73 mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80 145 72.5 mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh 143 71.5 mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk 143 71.5 mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha 139 69.5 mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8 136 68 mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c 135 67.5 mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh 133 66.5 mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm 131 65.5 mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz 131 65.5 mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w 130 65 mmx1mhhmm9rsxk4fv5y9feft68uj4mrz2c8m33df5ts7ve6uz9xj7geqgqxd73 129 64.5 mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5 125 62.5 mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt 124 62 mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6 123 61.5 mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6 120 60 mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t 120 60 mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr 119 59.5 mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t 116 58 mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm 114 57 mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny 113 56.5 mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660 111 55.5 mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u 110 55 mmx1tw7lny4cxss0ks67wxz272y356nvgzl2ff6stee4x0muhr9zv55qs85vdy 107 53.5 mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu 106 53 mmx1wsazxs68mvqe2j0gcpfaqwczn0277586r60vkap0gpaklcyhakfs8wztsk 106 53 mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2 106 53 mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl 105 52.5 mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3 105 52.5 mmx1e0vmg4kc5ed5t85p2gjqrgql8ujrar0t95n9l63xnmkacgxv7gtsum8x2m 102 51 mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93 99 49.5 mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88 99 49.5 mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466 98 49 mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj 98 49 mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c 97 48.5 mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c 95 47.5 mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2 95 47.5 mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7 94 47 mmx1xazrdyth7ctuwetm9wnhrvgq30wlqvwuk6qn7p2huy7ffwg5nznqfw69ch 93 46.5 mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa 92 46 mmx1gavx8yxen8hhfy7qgkqd0jqczysw8rgruef8nt5mp2sp7skeh3vq9lx32u 92 46 mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh 92 46 mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836 91 45.5 mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7 90 45 mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3 87 43.5 mmx1dh6r74r89g2anwusnw2xjwh2seuc4zuvfrxet2jzan9jll9calys05g7mq 87 43.5 mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c 86 43 mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh 86 43 mmx1que54datv9wjvh6jjald43jlhxkvcpyl7e6jaqap8ch7my7sr48q0jq38k 85 42.5 mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2 83 41.5 mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7 83 41.5 mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782 83 41.5 mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp 80 40 mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e 80 40 mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m 79 39.5 mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn 77 38.5 mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy 77 38.5 mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav 76 38 mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre 75 37.5 mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0 73 36.5 mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8 72 36 mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45 72 36 mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2 71 35.5 mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu 71 35.5 mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a 71 35.5 mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw 70 35 mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s 70 35 mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn 69 34.5 mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn 69 34.5 mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73 69 34.5 mmx16s93fxx6cap0rv6kx8dcc7f6syuymvjdqj7l3j0yas3qhhxw894qxgfcx3 69 34.5 mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y 69 34.5 mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg 69 34.5 mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z 68 34 mmx1rdu30vgjdheh4453heuq98es6whgaskx7csmfh28m04sckxqes7ss2y89k 67 33.5 mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj 67 33.5 mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3 65 32.5 mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk 65 32.5 mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4 65 32.5 mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn 65 32.5 mmx1jlzru5r5xgjs5zx5nktv6klrjvvucwpwqst908ursthn6cqdp7usf98vxc 64 32 mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa 63 31.5 mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552 62 31 mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7 62 31 mmx16aylfh9g5xtm76lt954v7ntgwts3ldppg5a2ll0uw6sd9fklge5q7cdqk7 62 31 mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez 62 31 mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6 60 30 mmx1tw6ur95jjmd95svmhsn4qe0vw84xeev8gsnes6d2ykauuk5xqd6q76vusz 60 30 mmx1jc22nh8pmjz20qyyz6jwlx5crml0z7wwrrgn3p66rgpt9ay8r9fq9y2864 58 29 mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5 57 28.5 mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc 56 28 mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup 55 27.5 mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0 54 27 mmx1healszdpqs9ppuc2u0lkn6l6ll9n3epeh32rj2lqwcte9g8y58zq4g4pm6 53 26.5 mmx1hpt8ym8h0wk67hyjsa3e3ndncgk2p6qxwam3nrz8pzuyj42rj3hsm5pu7s 51 25.5 mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w 51 25.5 mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92 50 25 mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5 50 25 mmx1x39l3phj2m3grgs0ynhd26nx2afh34faue745hltpzqr0jfsr6zszzkds2 50 25 mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6 50 25 mmx1aepsfj9c4nqqcew5qk8rw5sqqkwer5pnmwx9y4elcdm9gy332vqq7flngz 49 24.5 mmx1kfacc8swpse06qz30mlkefhex6an4jurgmrrancxyan58xw9w93stpsf7y 49 24.5 mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu 49 24.5 mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d 49 24.5 mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk 48 24 mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe 47 23.5 mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy 47 23.5 mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen 45 22.5 mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl 45 22.5 mmx18tw0yyc28wuqes5s80nzzh8dsax0rkkpqa4jpcv3wl0t83vf228qd04d9p 45 22.5 mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086 44 22 mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h 42 21 mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr 41 20.5 mmx1htwp6wcg0g706lfp8m8zhs3me5a87kj7p9rdqvywdv3ax8lp6jhqhgkwc7 41 20.5 mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc 41 20.5 mmx1e39hfndd2x9atrmkyjjlcdn7j3f09cqne0klatnxqhhgqaxmkn3q4f9fd4 41 20.5 mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336 41 20.5 mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7 40 20 mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8 38 19 mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k 37 18.5 mmx15p6ass9pp2l23cja3d6xge8jq5tmpspah67vdp7hv2pnnu04rk4qd5cvcw 37 18.5 mmx1c46ug6qnnu70477acd28w4xh70d45yw2ev62lrwkgvntdga9d7jsvc0497 36 18 mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch 35 17.5 mmx13qkvk6325f25vdmqc5xjq85q485zsgmh5pedmykg37mtt738du9s670h4n 34 17 mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j 33 16.5 mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng 33 16.5 mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv 33 16.5 mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv 32 16 mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha 32 16 mmx1yqkentanxn7cp69sgz35j4eycq7jjxvel373aljj04a4fnuusqgq3nv5mw 31 15.5 mmx12w9lkh26qc7fvw5038usc6y6cv28jy446qn07dczapjcv3rw49dqgk27s4 31 15.5 mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z 31 15.5 mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c 29 14.5 mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2 28 14 mmx1vk59t5awts2etx5v4jyamy9cudnea8mtl2kzk4caryc8erp6j3mqj2f6xj 28 14 mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05 28 14 mmx1zfqclk23ys7v98ck9ewfjz0x583g94xam3qzuetw28gc6f265xxsr507pc 28 14 mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn 28 14 mmx1d7a0q2v6qadeafuqguvt0h4a2hea9nky7dmgt7jszpkpfucu07jqwjfzt6 28 14 mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme 27 13.5 mmx1qaypsvtfwslrpaa4h0g6x2hh4j0tq9gh2p8dlla6rawr9r9t636qxd6s2k 27 13.5 mmx1knzrpleqz5ehr9j98scgy9vpzne2yg8ta3grp8zzxrxnjhwgvkrs94f6ql 27 13.5 mmx1cx52w3t5tr7ynduqhx9d74lnnvumfm84flymt2etrv2fkfrm3wnqmsd3xa 27 13.5 mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw 26 13 mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3 26 13 mmx1rwrvyjx2e6q6frgdmlcqlj565unwz5atsxzapdfpdfgc3pjc583qtxg496 26 13 mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f 26 13 mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp 25 12.5 mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9 25 12.5 mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0 24 12 mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn 24 12 mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek 24 12 mmx1vr057q49h73hph3ksrk92sy3wfm2u22g9ezklxmzrw92m7yl582sq22c4h 24 12 mmx1lrlfmzwanfkqu3cg5c98w243du887xx4plshxezc8ljhhcn22acq4dzwew 23 11.5 mmx1lj3x3d08usvq9gdjrjvyxhzkxxjylp6qftz7pch635qyq8yjn6yq0h0xxw 23 11.5 mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy 22 11 mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp 22 11 mmx1zvgs9rvzul3nflhqmtfdu8qpa2aqnqwxwsaatucsulsv5dd4svqsed4fyf 21 10.5 mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh 21 10.5 mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf 21 10.5 mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f 21 10.5 mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx 21 10.5 mmx12hhyrde0aptpsm4kssvqw22k5qrq37wmy9ec9lkru47yad4hfrgs5l3jvm 21 10.5 mmx1tl0fenlw4dgjcpx3hkahecqrxyzquszw8zdjwn4j005vvc7uy3jsgndw9f 20 10 mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09 20 10 mmx1n8fykdy0sk7jj8rn7fwv8awzel820mc2d9c9l959hajm8y8s6v5qayvhfr 19 9.5 mmx1n9sl0wz6rjpnkmlwqphp4rema3ejfqeutujw0gkxncefe9hxglxs7csahg 19 9.5 mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37 18 9 mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry 18 9 mmx1lqe5htxxh8ryhstdwmwfn97yjynaym9tl3wwq2x3m52e9qgld74q6uyxdu 17 8.5 mmx1mh0eqru3fwsmct0aunq5eww9ffs22tscparsznzzq6tvpmg04x6qnzrevn 17 8.5 mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae 17 8.5 mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv 16 8 mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y 16 8 mmx1rr569h8enxr68xd8jzyfplt0xwwqcghkhg2eqltyj9jqws4du60qsagq0s 16 8 mmx15hv295x2hxwzwtzeyypg5lwj2z6k5q7j0ts80jn4n7um9u5zklvqgelhwa 14 7 mmx1d5zv5ucgwufjj9jg7k3suj4uup7ayp9ld2tchxezwz3fyfu7jtfs9wethh 12 6 mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f 11 5.5 mmx1a5x6xect5s2cgdl7rh2hxwz7z5xqecvmlf9jjjj8za58al3mlprsr5germ 11 5.5 mmx12gersmcmrkq2daaxsrpk3hpelxsetf2emn4u5qngvvm9x7r6k26slgztww 11 5.5 mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj 10 5 mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q 10 5 mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2 9 4.5 mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9 9 4.5 mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm 9 4.5 mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay 9 4.5 mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs 9 4.5 mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py 8 4 mmx10pckcllf4w09gz5uup0waprsh033cmq28e24gnjlcpu54y6nwp4st3su3r 8 4 mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm 8 4 mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k 8 4 mmx10f5xfpvgmx2lkulkqsf50lvafdwwatmdnjwvqh8kgcyexanrkxls49v67d 8 4 mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg 7 3.5 mmx12ykrc525ay96yfq0aq92vqmc5kqpnalxa0cmhy4x9sqlrvklh43svk5za5 6 3 mmx1j6h6ans82uwhp77xnk0w6pd42c7nasqhnlvy5yfksax75l3r3mws2au86p 6 3 mmx1w29nsej9nxdsd498gqgymhhkc5e3enf4tg53a8lrnecspxu6aljsle96lx 6 3 mmx1jr5hkhp35t05c7g9jxfvs6wz2all566kves6rx5ckl57pz7mmvtsemw7kv 5 2.5 mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q 5 2.5 mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9 5 2.5 mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl 5 2.5 mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv 5 2.5 mmx1s0qc9xxvasndk09qljlp5mhn78qpn0pc8qe4zg0hw38hwetjzxxs9v4les 5 2.5 mmx1afqzsqeqaesyj35ugd2r0pt2x30u98uxvxr4y8u4as690zf3kktqfee809 5 2.5 mmx1rkhdpgc8qsht500ty8jvzzqequalqpnk5vzvcx2rj3sr6cwfytksxwh08a 5 2.5 mmx13cf0qwyp3zg6gqnkcupez7zfnwht6zpx3z2chq4erzstzypxy5xsycnjhu 4 2 mmx1fq7a0hk0kwers7ymsdm9wswa7qes6fyw7nzguz3erm5j2xd4eynqxxflh2 4 2 mmx1sdg5chqm4y225lmu35pj7ju58p85s9y07a94dke9cs2yq7caktpq5nq7da 4 2 mmx129hapqyd5n0lht763e3rm9mc23fwnh70pxeh9zyntntfvmr4f0yqejt30d 4 2 mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0 4 2 mmx1q4nnmgqzs9lctpsysetvergsf6enfkdqvv6k6t3sedz00whpf83sf8dhkk 4 2 mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5 4 2 mmx1v2xtpyjklr994zu0a5hq84azaxyjmlnyz3shvt5fn0rf8nspdraq56jpgw 4 2 mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5 4 2 mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj 3 1.5 mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z 3 1.5 mmx1v8x90upymn830n267009ejv0xwpwmenm6a8nvx0te0v29lauvuaquh3emd 3 1.5 mmx1prlfdpu5gmy5wh3yhtjgzlth0322mcxnw2zagydw5naant6dtegq3r7mqw 3 1.5 mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g 3 1.5 mmx14zyrz6re7l4j2zzc72mq8w03vlv5gwvwm3rem7yalq9quz98kdcs3kt6a8 3 1.5 mmx1t4fc7yf2t0txxvqgnxdmhxnnd3sw6rcq953z2up277ssl5m0yz8q9h9frn 3 1.5 mmx1sr6hr6werw9vplvje6akazlplymdqlp7hae75uqxdys0z0wy46ns402jhk 3 1.5 mmx1vw48jzy5re9pp20c9plj77lt85x0aljktkzp945fgugupsf2uxmsmuyeaj 3 1.5 mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4 3 1.5 mmx17e4mq3llxatljnfkdf2w0sy8mujaq4fn0q3rwdgztvh8rmlweh2sxk2xdx 3 1.5 mmx13s89rmpg2vlars5nktpfh8mdjahkgzyj96mllj3zuj66zqx28h0sfmqk0k 3 1.5 mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up 3 1.5 mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k 2 1 mmx1739equ4zcj89u9dl27ssz72wx6h9wrms57s00plkzq3g4wqxjqwsk6q67c 2 1 mmx18xxcvsm8vekqk6hy2xwx7aen3fwj6us476auqvce9kyw49ekfcnqk7tcwp 2 1 mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj 2 1 mmx12djy7tqtf5xmhdqhk58jkjtp3e6elekgcuhe8zr9reak29xz3c5qdqj7h6 2 1 mmx19mrdy4z7gndh4k3dtrv0r38jsz6c4texjlwnmzjh0z0ccnk5t4yses5kz6 2 1 mmx19a2ky2g4tylysduh8k5ev6kms2z2m4kk6veuljjs3cq2c0r7jexqmwewx5 2 1 mmx1hruc7t3lcdz2n0mukyjh6l9dtxd9hauzegufz9f05k3yaltz9agqph6vkc 2 1 mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6 2 1 mmx1vj9cy7vtmpzslkenxx9nx3pfsq9uuk0krgvnf5efetd3jxjjk4ssulv7f9 2 1 mmx1csmu30z07zqudtna93hqlstcmuzp53kalmsawt0wq58l6d488fcs8fjcjx 2 1 mmx17pw8cskjurc9p2503yns2y3m8uv8t3slwas2d9fav6e4xg27ww8s4j9na5 2 1 mmx1vyedt4fgr8vw96qhx2hl8ktptddm68wzs7ytcvwky0et3f2fqzws9gpj63 2 1 mmx1flhq9y5whh5q4t7jwcu7grfsl2vac95hmst4ywkghajptkazz7sse7je9a 2 1 mmx15cedp5xjcxgqvwj8hctcykxa7c3hgdlc0gfylnzwmk9vhlfzlz4qhcsacv 2 1 mmx1w67qjy2g4pyecrdayfrmaltxqk9vpvk577harjk0qdyplrycg82s2yx9fm 2 1 mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9 2 1 mmx16hvwy7xwv9wxf64u0crk72d7jceqayjtk4v25xken3psfswrfhsq469ftu 2 1 mmx1kzultmf90j7u5lr9586l5mu3qd4xjl7h4k4yhxztms9spva8d8kqw9qj82 2 1 mmx1333g7ffyguql8wdurnqmspwqrvrsf43647lt7wzatnanzm5xv8cq4q7mg0 2 1 mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x 2 1 mmx1grznkf6d33xtkhee5899xa2jg8v3ktupude206jt7pzpmxgslgqqxtddgk 1 0.5 mmx1q3nqrhd9uyjcls6jyj55x4wcnzlfd2mtezfy0m99gd0qt358hy2secef8p 1 0.5 mmx17s5j40067d5ugggn9ppdjg5enrxe37t0y58y8pjgnc0up25k7chq4rnaaz 1 0.5 mmx1lx2dgd8y94t40p55w45cdv0wqdk4m9q0tzaru9pvsq7decczasmq2l6gnz 1 0.5 mmx1tn8khcvlnkhprvsgn7eutwlws3vn5yc4mnh85v9vdt5ze8zs7cushvg596 1 0.5 mmx1zx7dt77dgkrzrn25zqqspxxzr6yyhk9wwgt0lelkxeda0ac3jsls68fl0c 1 0.5 mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9 1 0.5 mmx1gh9yw2ctnae2jy95gv3g70h7av7y9d2ha5dk6ehrf4nt0q7lppvs22d2vx 1 0.5 mmx1y33f8xs9evumw58unlkcdgqudwzrjn5ftk52w0p03277mqvnw4ns05ferx 1 0.5 mmx170qark2pk7xpjwsrvm4w405pxtjzwgvt3wtygu82a8t02rwan94q4r0vws 1 0.5 mmx1e38wzhjm5442g2z3xk73paugk479863f3y4q2j0c3yprdw50fpaq20njlr 1 0.5 mmx1pqk0hvm2lrct9uc7k534hg54538s7t9p6xewq49vnamhqs5gp79qfmnw7a 1 0.5 mmx14w3wjj7c7d5w36frrsvjxy0xsuy4nlnufdxlrhuxzrz9xku5vjgsklvpgu 1 0.5 mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a 1 0.5 mmx1us9z3c0r8a2fxex7za3vh24zwxmhw37ylna4559ulr7etmg5n27sdnhpfa 1 0.5 mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj 1 0.5 mmx1q3v3z5txguskd6r0nrqqm4se3u4h5xasw4plxqk4cxfyw3l7tmgqayunfm 1 0.5 mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud 1 0.5 mmx12tkjk987c9kccda9efdrw8xvmuqmca476czrfp0t7tdsysk36hwsdsstc5 1 0.5 mmx1z9p9lvrqf92x2lluafdyvrz3xjnrvag9wl7lhr6tfkfc0phzklmq8gdhzn 1 0.5 ================================================ FILE: data/testnet9/rewards.json ================================================ [["mmx1pfyewvtg6l24q40kx74cm2t9epm9wqwx27rph2l8uehnpzhrlqqqupy35q", 58], ["mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92", 69], ["mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93", 282], ["mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx", 3825], ["mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8", 305], ["mmx1q8uqnnncy4jylne7m098x4lnwrf34f400cn63px5jayj5eddhcqs3nuyd8", 88], ["mmx1nnrl7rh9r8d7xtxr29tgq7evywy8nvkh45w66f7p7u7tesct8ypq063ctl", 330], ["mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt", 1188], ["mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl", 1336], ["mmx1as0ezwhva4ch25cssuzrv8hr2vk4fyt8ycefdtx7dnwt5rgadcps7ezzc4", 3379], ["mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al", 590], ["mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u", 585], ["mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc", 45], ["mmx1vprl39d98qzd3u5nk95qnhus9vjp4sen2w7y59yu0m5udqll6szquzr6y5", 176], ["mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z", 3066], ["mmx1ynae9xlz4m0ec99702l48stft3m4kvwwz5zx60zwexhnpyhp8srsxam40c", 219], ["mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw", 392], ["mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0", 58], ["mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa", 205], ["mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj", 6], ["mmx1u2v2uf8seke36nxtxh90hpgh43dy5py836ygkvqwaqx5jhck95ysjepx8g", 73], ["mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935", 839], ["mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37", 76], ["mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s", 906], ["mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc", 232], ["mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y", 5644], ["mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0", 752], ["mmx1mhp72cd0lfnlfpfuclh9p6uqcuu6y0cr4cx7qnk266hleawuyuxscha8vw", 291], ["mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c", 99], ["mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha", 718], ["mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5", 719], ["mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg", 46], ["mmx1egfrdtt2khy7hv77kczkxmr8xml7zg4hqlc460527ka0am669q8s2asllj", 3], ["mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq", 4367], ["mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np", 2], ["mmx18a9m6za5h5j0t6qgs55fhtucpmzse94aq8z9xjj8lpxhyuemsygqhstwmm", 1531], ["mmx1c4sffu66s9eepqph3kfjarh4fp5h5dhl3u0r8jvrqlq4jkdp3sgq4dcav7", 160], ["mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds", 67], ["mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j", 1488], ["mmx17vr7dm99pccp240q7kr4ynw0tln4r6h9n34vc9dcdk7gch3dcqgscgaw0w", 278], ["mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n", 3405], ["mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5", 465], ["mmx1ryur5srud4qgamfq2pmfggw780m3z2mlja4665v7f7mfp5dejyfslp6smy", 352], ["mmx1veepntjet7j6lw2sfx4p9e05day63l65wj2pa7g7cu6rusyzru2qktg3rn", 4645], ["mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu", 335], ["mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3", 137], ["mmx122x5elltrsykqwy27q4jpe405m5d6aaxtfte87mjl6zty5e5ju2q9ucfz8", 216], ["mmx18tcgc6fe94f4qz9007v53k9mvv29rvtp7mef0wvqh0vmmnadhv2q894jq4", 1794], ["mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq", 5196], ["mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40", 680], ["mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k", 188], ["mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z", 17], ["mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd", 2138], ["mmx107aackvhak3d2lapgz6qprp9785qfudzrclptqzvgkpzly2ppqtsypk9kk", 415], ["mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f", 465], ["mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw", 1138], ["mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2", 102], ["mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl", 6], ["mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm", 14292], ["mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv", 118], ["mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9", 2884], ["mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q", 894], ["mmx19398nqhvlk3t79afq0csx9lyg6j0utftw3862295ue4h4tjgzvvsjt3pcs", 246], ["mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7", 214], ["mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae", 295], ["mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d", 2706], ["mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466", 62], ["mmx1c3jpfa9prd34jup0ny2yjc0n7adcwumfukjt90dfsj2262s3h5ds4fuwdh", 29], ["mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f", 22], ["mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c", 996], ["mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w", 1037], ["mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3", 30], ["mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k", 95], ["mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj", 2427], ["mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr", 344], ["mmx1vkya64sext8u0kcj2fsrezryfvxyprez6xdxapkzpcywakxh7v0qu63esv", 767], ["mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9", 45], ["mmx1kn0k496puu64hyutyn6augc2cj52rc4p0vmmfcceqezp2y5kfv0s6ddymx", 77], ["mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6", 253], ["mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa", 223], ["mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs", 10830], ["mmx1cnd5cv200efsm7q85dxl2368q9ymcyq4ry5akgrmn282jgdncg0s8lrgsv", 1019], ["mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs", 3496], ["mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn", 1869], ["mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj", 1239], ["mmx1de0udjakexj8n4548lm5vy8p69geex988ch6gqjpfvmdds5mquss2xt7jy", 21], ["mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn", 514], ["mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0", 2731], ["mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e", 445], ["mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6", 160], ["mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q", 318], ["mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev", 370], ["mmx1sgquqfayd4n86899hjxr4xg5z066jfljxj6mjysns890vpckj5jqt2h9t3", 791], ["mmx1q9wzqs7kq8tzw2yhnq05ljar5urwratlsr2wvuwfgw40ff3vmcjqhy8rd8", 2], ["mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj", 277], ["mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf", 1758], ["mmx1kn9t8m4uxn7xpqpdy34xhxrdkuzs5tuhjqyc8qxw69decxqgtcns9yq940", 57], ["mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u", 521], ["mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6", 6394], ["mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7", 399], ["mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf", 29628], ["mmx12wphs5wk5nq55363secf3glve6rzkzmgqfytyq3mgk0lsun99y5s3kk77r", 4], ["mmx1pangjagnfffhfwpk265ry6a3zch4rs2kgp2rup7pwtuphgmsls5sj55j2h", 36], ["mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0", 691], ["mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5", 1844], ["mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660", 1240], ["mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej", 3302], ["mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0", 674], ["mmx1q24h2qhg6ju6cn8r26fh85cv36mmen8ztn2ans7w9aln36p6d5kqegu4na", 22], ["mmx19f4u3dsn5eyrsp24r0vnun6zadmnlsqpldf5cvl9w6dtqdvenvkq4qclt2", 29], ["mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0", 447], ["mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs", 667], ["mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0", 2282], ["mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl", 719], ["mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29", 876], ["mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl", 564], ["mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82", 1467], ["mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn", 291], ["mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq", 269], ["mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl", 583], ["mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5", 3501], ["mmx1lan9judvg8w56k94gequv9k6rmzr8kwmq0fk0vh2k69muzjpauhsszypcq", 172], ["mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf", 1067], ["mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg", 2526], ["mmx19xgatr5wuucmh45623z25w42h49zxyn6gcp94dkyr2zrwrm0xycs74mzx6", 2], ["mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh", 510], ["mmx1z66g30cq7j7apzf29zmdsu28m5vrqw9x8m9jh2a3vddrxz7fsqcsh4gv0w", 3061], ["mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl", 4728], ["mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers", 967], ["mmx1tytgkzrx6njx5t6j9gxms2gjv832mzzn2q67kumcft57cyj765csr34n3c", 4], ["mmx1cjqcmqm597re656z5w5jq99f7fvyth7wvhz3v4u9xvyxxyjyv5esl8yqfh", 11], ["mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836", 61], ["mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w", 827], ["mmx1jpyqylp9zekjz9xcccz8h6gaw9f796tp9syvm43x03pxa8zf6ses6lslat", 1], ["mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j", 1680], ["mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj", 19], ["mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8", 991], ["mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552", 873], ["mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88", 115], ["mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2", 254], ["mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu", 549], ["mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh", 2328], ["mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65", 738], ["mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j", 15079], ["mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je", 6335], ["mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk", 694], ["mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8", 3845], ["mmx187llktd264wz7f33nqexhh8frcykztdg0emw5t26cvmzfng8dquqzl8qwe", 882], ["mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9", 108], ["mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k", 1910], ["mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru", 3867], ["mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086", 287], ["mmx1hmqyn4euv2pjwpp2nf3ayq9ktr77dajwuq967uet2r0xqnhj0saqqexshe", 5], ["mmx1ze8ugap6cs90ec5tguyd9hg9g2xv7fyrz6s78ewzlsk7uwn3pvas3dnmt3", 35], ["mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc", 2298], ["mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c", 536], ["mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l", 2310], ["mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl", 827], ["mmx12j2e0ja3z0up7t0csl2fmm52jd9mrc29pavccn67uhadrls4457qpv7qls", 363], ["mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s", 195], ["mmx1nqkt86wlfpkvjylyqdsy4pa2e024cjpfnczt667tshtsv7uh6g7qd8dnel", 447], ["mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2", 310], ["mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c", 42], ["mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp", 587], ["mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg", 1707], ["mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py", 493], ["mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w", 1230], ["mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88", 372], ["mmx1c5txaqqwf9ayjvyehy9u06cawxfwtctzk70e3eh6pm0m3aqcrqlsjr54jc", 1218], ["mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l", 1563], ["mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn", 921], ["mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6", 455], ["mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs", 399], ["mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m", 41], ["mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4", 390], ["mmx1da455czfvskaeewg4prqrcysxuzm0x5kgsge3fxafz3e6ddmvppqpyg796", 1252], ["mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3", 2248], ["mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma", 3727], ["mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn", 2068], ["mmx1j49546jumejnzwpq4ptdal0acmje45de4y9c99pjg5kglmazrazqxex7qz", 1215], ["mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs", 66], ["mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e", 304], ["mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf", 369], ["mmx1xcfx8dstn3hg0wwfdh7lcmnm2gu6x95m849jay7ruzpyw593jpzs800vee", 16], ["mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu", 77], ["mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y", 3036], ["mmx1r74wdy7kzh2dfdcumhc85tuherczlt8c4dsqdl03ufyg2lfa4frs2qmwlp", 40], ["mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm", 22], ["mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0", 7250], ["mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq", 11466], ["mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg", 755], ["mmx1hl8lnr4ddyyqynx5qj5psv63ah7atfrt67s9eszlck5dy5yy9aysylv93p", 3419], ["mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp", 362], ["mmx18csvx9uspv3mp45autfk4dj0t4yzvzyce63gv66nahaq9pct73ys70ezu4", 651], ["mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c", 887], ["mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr", 173], ["mmx1z8wnphkp2d50k2kk3f30eyxtp8h69e3pazzawvwtseuuerld339q904jsc", 57], ["mmx19j967tm7fjn73tuwr03w9k6rat4j409295l5j6xrs7w65gl0v49s93mmjs", 2], ["mmx1j3p8gtyajzh07ag8cv2y776h7axrwhvppckxxtltelz08dsaxfxqg6vlwr", 5889], ["mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu", 627], ["mmx1n39pyuyq8slux6rcrvpyfqr554tcytn7nfrmwjetkkryeww59fxsf8qvm3", 115], ["mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj", 1218], ["mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy", 4158], ["mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr", 3031], ["mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6", 479], ["mmx1d4580utep9epx933mp6666886cect39qt9dl30qwxj767fkxpfgq9h6y3l", 255], ["mmx1fk0jqxyz6eh35qnlu70gx58v6ahgng29e4k6zjf6tqxa96y7p3gqu8w8qq", 331], ["mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn", 1398], ["mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg", 202], ["mmx1hwq6ezh6zgc6pvadxh343nnhvenc5zw0lalx4la9777ucv8lp3fqnjpwx2", 692], ["mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8", 34], ["mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k", 533], ["mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst", 1266], ["mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx", 1178], ["mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j", 5690], ["mmx1akhqtjzm3kkr9wlj8nh9kwuza6r7vm4g2nz3pcggmq9dayz7q92qncwv0a", 1], ["mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j", 11], ["mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp", 2227], ["mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6", 11], ["mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z", 1715], ["mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5", 604], ["mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f", 40], ["mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9", 57], ["mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn", 2630], ["mmx1t4q59k0tu50ldpdklks90yrmtdyacw0v826aql4n4dkdvxzprets9vvt2m", 47], ["mmx12n7hafkn4tfwk8jta677lw48092lezrx8vgwn4t7ulsweeg6xftse7e5s9", 207], ["mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl", 7], ["mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm", 1235], ["mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm", 438], ["mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4", 3428], ["mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57", 554], ["mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x", 154], ["mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx", 2693], ["mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9", 301], ["mmx1lntqvyetpdaqzkw4f9hqhuh8kkf3f7u3rl96gxz3lgztfptfaevqk8elws", 204], ["mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0", 322], ["mmx14ntt0scarmrahc8dq3xfdwqqpuxddh6ez2qaq4dcdyyw0acwuevsumdgvh", 460], ["mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh", 268], ["mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c", 2915], ["mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd", 1533], ["mmx1gw4n8htnqwhunjyypmcheushazv597xama2tx9pjf8zrsdq943wq8luz82", 206], ["mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn", 349], ["mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098", 967], ["mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy", 9], ["mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5", 329], ["mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk", 60], ["mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9", 8], ["mmx10pxshsy5ajaf90jqgfz98xms2gfwmr8qh336yg8859khq47rjp0sm99hfn", 10], ["mmx14fz0p5ff557c6sh6xx3ssztc8sv8a023cqugskep0vm4j85rna0s7fu03g", 503], ["mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w", 2320], ["mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7", 204], ["mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g", 598], ["mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym", 2221], ["mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re", 802], ["mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00", 542], ["mmx1nu2e8qz86kfx5yfnedyrv559d57makxk3jw57lgwsuet0v8dkp3qkmdh9p", 32], ["mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx", 77], ["mmx1l0a7tg0ux27g2lgwq5vyj0dlsuzcxgl7z7vrxeed59glajvd8f3sk5nvhg", 63], ["mmx19fmsw5j977kh3nexv48lr0neeyese2pl0g8vgjp429d8hfurtf3s3k5ps2", 66], ["mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn", 119], ["mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2", 2718], ["mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2", 184], ["mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7", 32], ["mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t", 2217], ["mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu", 47], ["mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73", 121], ["mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x", 1060], ["mmx1vp6lfvs36vdft6ljgmvpe7049dygsl4nqy6pvyd090huaq5m44js02y3zw", 419], ["mmx1cqgrreu8yptcvyufdussnfqxnwv05z3dqaqu0n5qtfq82n4amajsprkzal", 1919], ["mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja", 2379], ["mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen", 14], ["mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa", 2], ["mmx1x6j2m793ten9em7pu09q8qca794vrvrdc3jcw4yzc8zup0zrh45q8d2lqx", 59], ["mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay", 411], ["mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7", 282], ["mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme", 106], ["mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3", 2016], ["mmx1cgx3ck3dmznw8xg78jc9xfcf7rws0yrkhpj5tymnc25dteduu35sd6p92j", 205], ["mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2", 448], ["mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe", 45426], ["mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl", 1023], ["mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g", 176], ["mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4", 6222], ["mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y", 1971], ["mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv", 47], ["mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66", 1414], ["mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h", 116], ["mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6", 3111], ["mmx14v3lzf453lx676rj0uhvp7sph98g7hqzkr0f5g42mtkzppzf2dhqw5f8a2", 1], ["mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg", 6797], ["mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry", 392], ["mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc", 592], ["mmx1l74cdd9j6jelh0pw9l96t6vm43zyqp8tdeelcywg09ezac7uwdhsmvnq4y", 16], ["mmx18plakxe6gzc7frl7mke9gfhaz30cgr40eyahtjexsm34kexk0dhs4cdedg", 950], ["mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4", 112], ["mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm", 402], ["mmx17l3xstvyx5rqxzqvswwvf27zz38ckt5q2030selhwe4elqzwe4hscxf06z", 2257], ["mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3", 1549], ["mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60", 1771], ["mmx1hfhn035wpjnm6yhl223rh55e85a23ksp679ku6kpk2n7klxxaecq4xw57p", 127], ["mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj", 1644], ["mmx1kvyj70vfnwjwg6je8tf3dunrwrafy9mlm2wtgqx95vwgnz2mrfcskpydtk", 5425], ["mmx1d9gx5anuvxgg906tzj0rdkhyypjtrfc09ufdc7yykhp9h46mxecs2qe2r2", 1], ["mmx1r5e7qrk323nmr3jhazwr3adu4v8n8dfrh3wvmx38ptmhv7wq23cstwl09v", 214], ["mmx1wkcf225wca3efgurwphhsw4z0wqss0e0lwsenk8r06yvymp4dacsm2gzwy", 2305], ["mmx16vc774xgs3d0ce37fsc6ykjd9elnxxq8gaep2jtcwn6endwck4csz6fz0z", 12], ["mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y", 76], ["mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d", 492], ["mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw", 139], ["mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5", 101], ["mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5", 6354], ["mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg", 197], ["mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9", 446], ["mmx1f8yps5v4rqakx3gyws5hhlrmapcjzzf5j80dm655ehcrf6qgz36qandk5l", 565], ["mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu", 782], ["mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv", 568], ["mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3", 1092], ["mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z", 59], ["mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry", 6467], ["mmx1s8vpfq0d6unp2v8f4nzgxkj0zaru70ps6vael7a20w85rwljlemqmjrqlp", 2], ["mmx19wqxw4stpk67hge9epj0wmgt59r7w5fepxwxegf6tqrj4adk8emsz9zdlq", 13], ["mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc", 4643], ["mmx16d3ry985fdkgpvj93xygv0tn2wc9ylpex6t08qz0x6lat9km6dmstdhdhh", 1621], ["mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g", 976], ["mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw", 2760], ["mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v", 42015], ["mmx1lnh2du3xrhsjlu2dst8z78x285m5zct9p3c959uldvqpv6km8dusz05n7t", 71], ["mmx1zrhw7537pgw66vt6df5xxxh23f35gt85ml6s6fvc6vr2qshmdeusuufxxp", 26], ["mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny", 1999], ["mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy", 2396], ["mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf", 1709], ["mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd", 4056], ["mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m", 210], ["mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp", 159], ["mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8", 540], ["mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d", 305], ["mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq", 990], ["mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx", 1571], ["mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7", 36], ["mmx1v5u67yws0zlnutd4lw0gqk8dk75xnjj3k87rnzjqurx3lpz7aflq863r48", 663], ["mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq", 548], ["mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc", 1419], ["mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y", 7720], ["mmx15098ny3pc66kn6sgr6t8jehvwf2yzcxm6lxljvr7dfxs3g4u5plssgudwl", 3689], ["mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz", 468], ["mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm", 187], ["mmx1qdsec387taxe2aw5j50sjp8qh2eq85deqxa84wmhkvywncvuvkqsygpay7", 77], ["mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4", 27915], ["mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk", 137], ["mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng", 167], ["mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9", 5826], ["mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl", 178], ["mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3", 1494], ["mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv", 2323], ["mmx1ttds5ut3j7xx72wxg8c6226ewqeyrvzydml7duym8esjwxcg3jpse245zn", 7], ["mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw", 371], ["mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry", 1319], ["mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8", 10625], ["mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh", 253], ["mmx1pqayqpvzg3txl8q9cl3ul0zrt3v8zdn7u6j9vzw9gn3jlj3cfxrsgskgts", 10], ["mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p", 723], ["mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s", 3279], ["mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde", 992], ["mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw", 699], ["mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9", 316], ["mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z", 3286], ["mmx19ud3ev0q0tcrpsmh05tggwt4n2nkwrzrrtuwtyv0pl2t3t9w52ysy954ch", 220], ["mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m", 544], ["mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns", 200], ["mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr", 1596], ["mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens", 1646], ["mmx1h7fr39agpsasxptf6tflwaqscczaes5ep99v0qqe84sntdh0ew9sumnljk", 83], ["mmx1p27mt7n0as5pmzllk5342na0zjemu7xcylp3shlucvtdhjpeqxxqvgcnx5", 1052], ["mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6", 1251], ["mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05", 78], ["mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj", 389], ["mmx1g5q667lmyzaclvskxhs3dp533pv5g3uvqu60v8n9ckdcgjm4e7xqe694xs", 67], ["mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz", 279], ["mmx1qh002xzjsedzpuzqq4cz6spv4qayuwhyt84j7pd8zeylqwl0k2xsnhg9y3", 534], ["mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw", 9410], ["mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v", 67450], ["mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6", 349], ["mmx17jurkuy7tns92g07uf826te4azhu3qnydcs7d7snvez9xy3dh7gqa8h2hy", 1], ["mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7", 141], ["mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d", 43658], ["mmx16pnkxxv9mu42n7t4pte95ftduqz9ntrdd6u5epqnj5mkdn249wgsmkm77g", 2145], ["mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap", 6686], ["mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr", 5802], ["mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g", 968], ["mmx1trjmkvfv40ngnfmvc5uw926gw8fndanpnp7mphq2tgqwt4xdw62qmrvn3a", 6], ["mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn", 7089], ["mmx1ftt6434d6y9ekacacs5hf3cxg7a3s3uqm9vjm5l893fy5epjyxtquz8hka", 1], ["mmx1qxr2rcnvgcwvs3304d8rlm8kzcg3cdrfdnrp0vq3t6eku4g55xtqw8kd9w", 105], ["mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a", 1881], ["mmx1yht9eg80753876sq3qjljn7nwxl300g70rauqran8qkvdtrtqzvqxkdxq0", 110], ["mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05", 1458], ["mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg", 3285], ["mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr", 3149], ["mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38", 915], ["mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg", 848], ["mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d", 15], ["mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3", 1553], ["mmx175u4freddynpqmqp4c057dwf9ej62pv0hxh4ew6dwlyf37y5ekvs7djgrs", 2], ["mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4", 1080], ["mmx1k5zj5jew2s2rs5w7dqfzmm2uwv3xavastvkdd06f2fd2x3e676vs8v8rwt", 62], ["mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824", 9585], ["mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch", 150], ["mmx1ujuywt50nv9jgt4tsu32mcgurtlu9zfvjutuvjk00d5k8peagwwq44fmqv", 46], ["mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k", 44], ["mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45", 160], ["mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav", 371], ["mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn", 74], ["mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj", 317], ["mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s", 1324], ["mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn", 136], ["mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp", 1976], ["mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map", 3010], ["mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre", 9], ["mmx1t797wa3smaufhnhxqpql52tpkm80t66ensrsrdf99ar4h265xjssjsucdx", 1021], ["mmx1wepa6m7j62en6tzc75h446sle2s9zpvllv3557t47q9zyr9y52ssu7j49x", 41], ["mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp", 4701], ["mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g", 435], ["mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j", 10971], ["mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0", 947], ["mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej", 24], ["mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57", 7626], ["mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl", 3922], ["mmx18nu9safwcwcfmx9vzaxgx5w8vd8phra0yf2mzjxym9ewh5t5swjquvv970", 2], ["mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm", 631], ["mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh", 3258], ["mmx1chmqhg48plemff47t5hrc50p7sk809q337uvwn6385cdl8y8a2jskzzcwc", 113], ["mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy", 1296], ["mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn", 339], ["mmx18jk3gsj6r4y3esc22r0qvxru79ues6z7keha33ahn5tgahxzcknq48ler4", 154], ["mmx15sme6pzzgltj9hn9s5u4xjtmyud4qx8pd2kgvj8hsymp6amx0wnsgw9u27", 819], ["mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09", 67], ["mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80", 406], ["mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t", 580], ["mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z", 943], ["mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2", 316], ["mmx12h72n35qjgx2qjps70hqal8zuvw26v46rc3auczg4se68878ek4q8xs9xe", 1], ["mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3", 2272], ["mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx", 100], ["mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf", 13135], ["mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a", 172], ["mmx1pq2x5zfqa45sq6s3zmuuy6pen0t7ezrhmdg5q9q02re4x84rakkqlj5m99", 6], ["mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6", 314], ["mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war", 575], ["mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4", 11120], ["mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a", 1552], ["mmx1q5dh2ghd660523gstn5vmc2hf4w26azr3s3nedjp2wu3ae2d27hst49hpg", 1], ["mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w", 349], ["mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc", 133], ["mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef", 14602], ["mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm", 3269], ["mmx12rg768ddyzng9npvlvd6qk4pnu8xy9tjjky6udnvwhv378v0ljcq44me5a", 13], ["mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4", 1162], ["mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2", 262], ["mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda", 7336], ["mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc", 2887], ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", 551], ["mmx14tkxv7wnyfjm45lr03j8r2qac5hsa9mk75emunjg78qngwgw66essvzga7", 895], ["mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg", 504], ["mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7", 150], ["mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy", 456], ["mmx12ajhpfkhaxqzcgh0lm2zt03qm635e0wazc0u2xlhwp4vflneq2mqupf8uz", 9], ["mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7", 1675], ["mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x", 401], ["mmx1hsxpdkzeynjv6dswp89klcu6qc8gn0vghz54gcpa95z0m5m5p6ms64gd99", 10], ["mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782", 477], ["mmx1x7py0zl3zdvtlrz978thjuzyqw7azyfu5264u4l8a9e287rc5juqekjvf2", 36], ["mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2", 753], ["mmx1xc27x4s9qzcsqucjcxqzdqszlp4fjtxpuz56c2770l5yaf5e5jus84sg5f", 3], ["mmx1mvlerkhjtrg0qapvxgduxnw0ucm33pjcv6jutkhf82ampzhaewaq7ym4vt", 140], ["mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4", 32], ["mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym", 1456], ["mmx17g6gp5v6070kcjcq0tx0u6ahgqyth4gq9fha3sgsvdwe8xn0fj7sslsft8", 555], ["mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq", 1837], ["mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh", 259], ["mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw", 2779], ["mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4", 482], ["mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns", 2605], ["mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8", 8], ["mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk", 1185], ["mmx1nuvnyj4t3ryqzkw86grzzlx2zzvc9plmy8u8zllvey79q7c5r8qsvz234v", 10], ["mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu", 798], ["mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha", 57], ["mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs", 65988], ["mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99", 703], ["mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0", 26833], ["mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez", 306], ["mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh", 273], ["mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza", 1], ["mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8", 1309], ["mmx1l4nf9stg5qzuecmrfvls5wgtd8l3mdgwedcwvu5eqfa3n3pektzs2l5gvk", 455], ["mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a", 612], ["mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9", 6], ["mmx1rd8z3x6ncsk5734u3xjkqskzxq8tlcn00866309kwqc993j4xnyqhs0r3s", 13], ["mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5", 2175], ["mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69", 5109], ["mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek", 120], ["mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm", 3422], ["mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj", 134], ["mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u", 2678], ["mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh", 290], ["mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w", 2038], ["mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2", 2502], ["mmx1hny6mwxqqlfktwzkwq3u6l0d08gafd5eq6xwsjxnv7sp58zm8h9skzn58w", 14], ["mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8", 4519], ["mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr", 373], ["mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60", 138], ["mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27", 3451], ["mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku", 1779], ["mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz", 634], ["mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92", 4200], ["mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6", 7006], ["mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud", 305], ["mmx1r2su2mtnjuk6t5q33au7609wn2pajsndupzh385r3s5guvpfclfq7m6n5p", 1017], ["mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs", 1767], ["mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has", 930], ["mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88", 1237], ["mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g", 1765], ["mmx1mk6v9wmyju7spyncrggntg4lm62g0ensg76yjgjhdtnmpls3nr2sd9qwqp", 258], ["mmx1kq7xc88lghdv0mu62585fck3ppnlmdxn3jwvhqpks73wc8vwc82sqzyhjq", 2540], ["mmx1d8h78has80qk0hv5zxfkx5jlpj5689zht8xlqq30xjhx3y9ezhtqcpw8zu", 20], ["mmx1rftw5xyjw5hy7hjnurnhx2z5am5fnqxwtkhzltcu3ujxvs9f6rtqmm0kv9", 34], ["mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l", 162], ["mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3", 213], ["mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy", 84], ["mmx1m727l7tyw3u8lhnpqg598yns3tsum2n43da05psyhddgzqcj80vq5u3fhq", 2059], ["mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d", 10398], ["mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw", 34], ["mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv", 402], ["mmx1md60nlasdkf7uu52lw7gmpvs07jepacq7u6spajhaj5prgn7vnvsecqcfy", 87], ["mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w", 3036], ["mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz", 21528], ["mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9", 1], ["mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3", 153], ["mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0", 8], ["mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28", 948], ["mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw", 396], ["mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn", 568], ["mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm", 451], ["mmx10783gzrqc88k0n0ert2nkjz9ams2aj77ux4t0y3lsmyexnue2h0qem44ac", 295], ["mmx1w5vuvkweueqvfl2mtncyexuqchje6nx27552zaz50qt7vwhw5tsqjy2s57", 31], ["mmx1m7uycpxww03cj05zhdgzjcen70kv3pd7gwsk8grcdtu9ltch6rsq9plyz8", 520], ["mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt", 1181], ["mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf", 570], ["mmx1fxfrkrq80vpzru94heh6vwt52yan8k9znxzvfjtazjk59lpptl3qgnkegx", 1], ["mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql", 913], ["mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza", 1169], ["mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z", 111], ["mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s", 436], ["mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5", 394], ["mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut", 3122], ["mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z", 11], ["mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp", 628], ["mmx1jz3xqle28yclk7fkk079q990tvya3vqzjrjnrf4phshvt990wt5q30rkay", 5], ["mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js", 5], ["mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4", 5032], ["mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl", 4311], ["mmx1haurf6xpzc0aj833h7tq0382s3qpp5a698kh9ysu4j99azma9t5seuhzdh", 93], ["mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha", 153], ["mmx1avctsmwaxyzw23nwat6mmxevcq3f0s3m9j4ll8x8yunszucx9n4srfjh9f", 8], ["mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3", 2], ["mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a", 227], ["mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a", 6966], ["mmx1xn6ynt5j0dwm7yh29pmjs6dy3gytm5nllsanwtzry86czx2j30kst7a798", 4], ["mmx1mcxgagq0znvmk0g7dqvfa9ewj2qwjxhysrna634prhn89nmgknksn8ufzx", 281], ["mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z", 7145], ["mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05", 571], ["mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0", 20359], ["mmx13txgtfelvrng6mfjyk84sj74lrl3u7v05wn59659sg7ffup5f8hsl4nhzm", 1381], ["mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up", 35], ["mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7", 196], ["mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3", 2583], ["mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae", 127], ["mmx1kky0cu2dauntftsk8a55rdche6kuhm227qt2ktfsyrhvu7v4yteq8rg4d3", 255], ["mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq", 4326], ["mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww", 16], ["mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx", 596], ["mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe", 1820], ["mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy", 169], ["mmx1f2jdndglt2mvq37tc3wp8gtf3l3uql0sn485x80096m59y0ydl6q90ds4p", 85], ["mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan", 573], ["mmx1vh4j6v35vxpwt9820f8uk0m3v4u6h78gyc9rr5sqrew29dfvcn6q23qgu9", 6], ["mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn", 7143], ["mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t", 637], ["mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm", 1470], ["mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e", 3013], ["mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx", 229], ["mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7", 2477], ["mmx1swf984qntzm6hrtx2695n82fsemv537ekkenwc94se0ahcxzklmsklc42d", 3], ["mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc", 1347], ["mmx1ms7f97heq78lkjktgxlhs7pdzes743gafp0huda2usvns9jgv8uqpgg8d3", 2], ["mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x", 1], ["mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52", 300], ["mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr", 3525], ["mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9", 88], ["mmx1lpm0wnvfr4l07wgvfhhgzfgy7ur5jf5g3h024gln5ykml60nr8us9wc7tg", 17], ["mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5", 501], ["mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje", 9548], ["mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv", 175], ["mmx164hdypm0mgekpt743z7xu7vtm5w80hysnvgld66zr54gvhcwm8aqrsk22s", 128], ["mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs", 38], ["mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85", 1034], ["mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q", 38], ["mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f", 70], ["mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6", 9091], ["mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup", 110], ["mmx1c2jrdpa796438jzxxjw3y68tepmlzqv3e4a28d6t52juznprsm7qpwc0fj", 157], ["mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336", 201], ["mmx1edcr8zgueucattajc94rpsfcmyazh0zseqk4pr2vs67d49kjnn7q9en6ev", 35], ["mmx13ju5ewkc4v2qgg6p5zj3t33p0eczcyfe9eggmv6ksph27px08h7sfsavr5", 1], ["mmx12rc5mctewx0qv33kwemry6vvqmxgcnc6rn84ksqef9rj9z0rer7spuw6dw", 6], ["mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t", 946], ["mmx1cdahyf0uv3mfk9qfpjk3q8vwrfqap5xgmg9wckkp5rlt3agn5hlqwhh3px", 17], ["mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc", 369], ["mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2", 5657], ["mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk", 333], ["mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5", 25]] ================================================ FILE: data/testnet9/rewards.txt ================================================ mmx1w7dfqwgrq4v8uyg2kpcda5ec44hnvdeww48zysxue2mttd04tz8qdpt88v 67450 33725 mmx17dhvxq6fekkfqtvjwle2pwcyr6f76uhz3vsq6ldkc9r0uzs7nrpqvzh7zs 65988 32994 mmx1ddxwuakc6p0mp4yzx3e9rzt6d6xtkvlvfmqnz6nx0umd2y9kc94qsyt8pe 45426 22713 mmx1eavt4k3qfgc30z5wqtk99f93fq8xhtr82f47v6r9xd266njaqwgs56207d 43658 21829 mmx1guzl6jcsz7hkxwvtf8p9nskzg4uefcr6w3qmdg7jyr0urmfsu4uqql3c6v 42015 21007.5 mmx1rlanqjxk03n363dxgqfek0390p6pfdflm4vnf5d25kp8rxd7lg5q3sf3xf 29628 14814 mmx16qquaqrzyks7qpq0wv3mz4j3gdk5c0ltnutnurun8ars8s2jszqsj3wzt4 27915 13957.5 mmx1eklc2eghf2ygvfz2t6wampprupwnkrjlhx23pw5crrwgdxdrsnpsjc7nq0 26833 13416.5 mmx1e6mrj76enqgg6ah092p0u7y47djaxgygne4gffgmtuypfcyqttdsjs5kqz 21528 10764 mmx18zjss5ccnhyskugrwlxuy935zn3vz7ns6gyqg2cj8f3r99av9mhsck4ne0 20359 10179.5 mmx1vc3s0rqlmy7hrw0wr5mjfzgqx70senjwnp289x6syu9r0m58zvmsk2jl6j 15079 7539.5 mmx1cv94kw4ttqwzyluzql2cc4trx5mze52qx8ys2pkd7jqg2yp6wzcq0lxaef 14602 7301 mmx1cdv0s72kyp8y9f3glg22p32zz450f66rl03hzx5uwzrcrysy0qvq6scyfm 14292 7146 mmx199dqhkfs442qerqkzmsaql0tw3jkqkhxd79valmnjcxhdtxu32kqy40gzf 13135 6567.5 mmx1fdscrht596p4daxkpzfunczjmurs66j65u5lc3a4q0l99k7h2ayqdvrfnq 11466 5733 mmx1n833p7z44rd62g0yvhlua8sv3d8wmyvrt720utk7x4vxwc3j72hqst6yh4 11120 5560 mmx1qpyq03vzht2uwf9pzadx3rpa8w8y7pul2he0r5y3497j29ul7x3q7ac26j 10971 5485.5 mmx15cf5205juyar33ugp9qkh4e5ne9n0ylvnyg0uf6uyymd3tgzhc0sm47jfs 10830 5415 mmx1keg2775ll23shtjh235tw9g7lu3wj5rj50ws62vnwv89p9vd07zqwswcn8 10625 5312.5 mmx1uh4qtgqkndrp78xx4qp26dwu4wxmqe8h964n9kte83sq8h7ckrvq45zn3d 10398 5199 mmx10lrzsfeam8m8lmrxnhzd2zn4kahtkmnthd0nhytstw52s92d0wdq7x0824 9585 4792.5 mmx18gzhlxuaafa5rqxlyrzn8n6ldud65ynm5tujhc0ql87f9myx5musf6wuje 9548 4774 mmx1jpfmyh0ndxwz47t3d6xrdlkd0mq3nckuasn8elvjfa65xtzm2j8qamxfuw 9410 4705 mmx1n36ek4z7vprh7xucnje6p5sr4s9mtr0ml9a3wz6xd2kp5v3hunasjn35t6 9091 4545.5 mmx1j7ns20cea2havm328p28vxeyfdcv0yrhndl2h8735slc4u0q3fls6dz77y 7720 3860 mmx1kezjxhxk8hxk0877hsfzr93p297xqp6ga2jrgptw52fa386gy7jqs6pz57 7626 3813 mmx19zerahkctf5hxcrtdh2j5xjynl398ge4avn9nl4zsqw2hs9qe7csjqevda 7336 3668 mmx143n0jquupkdceetyjs8mtnmth0pd9af6dx4hkujwctfwwcqfqpyq6qa4d0 7250 3625 mmx1k4lqe48g7y07vfqjkm2rcc8kxfrqg2utg04065paft9arpjmumksyp8g0z 7145 3572.5 mmx1gg6twfxusn0xlnnzzfju53zzwjecm6jkr5r936favpxcjz9d8r6sp3spdn 7143 3571.5 mmx1lgvyts4tqf69g0m4nukuz89v7tpg892kkukz6v38q4pcmk4vvw2sddm7zn 7089 3544.5 mmx1aruhdl3f980cr8nud8ph2px3huef6edlv8l8gdua5sgw7cz2p0gs0872r6 7006 3503 mmx1f80jc8h54emsrld03wdyxjxd9hlqd2lvtxyt0t24d5jygf6mv8kqpas92a 6966 3483 mmx1a2ytmujh3evrw2r8ljq6alul6drzqlrpa64ae9f5xp38kecen3hqcruxkg 6797 3398.5 mmx1jwu2hr9wvxyq9v0eqktfszrla2lr9drecucvlxwc2t0q78a897gs2ufnap 6686 3343 mmx1shw36ys05ppa2jn68qy5s7jl5kzy050rqdk4pz8catr2wadnadmqh275ry 6467 3233.5 mmx1dwr96cxjzyc6532h2gjagegkm58ns4fdrwj6muhccgxn5ysuqg5qn9mzn6 6394 3197 mmx1pstmxwmdgkyzqqll6sdu5vdxpkm82ya4tz78w8n2yq4pdcdz39eq3uwvw5 6354 3177 mmx1afht99ekwmgh9s9h043aygvtl8tmytx7ymgavn6lkdxxczrgjsmsqcx3je 6335 3167.5 mmx1l3p8ljlzzs2kzr2d992wmj6ru5t95azef4cfnp289zgezfppg34ss5pch4 6222 3111 mmx1j3p8gtyajzh07ag8cv2y776h7axrwhvppckxxtltelz08dsaxfxqg6vlwr 5889 2944.5 mmx1rw4n2d4a3mrve8kfwuc8gvqnszd9m68lkqsum0dzk4j4ztlq2jpqrtcpy9 5826 2913 mmx1urhh0ud9hrdzf2x4883wg7mgqe2fztfcnjehxz6kqujve3hn37gsn3f8qr 5802 2901 mmx1ywen6qnhge46fhjqwxtnyapckkakzv5m7gz8339j0kzkvzeev4fsex4z9j 5690 2845 mmx1zm2yrzm79wn8lt7uhvaxjy0mcezkxdjujcru9fwnwczl3y5r4hls79m9l2 5657 2828.5 mmx10ew79lhecezg2ewrj8l8egjtwmkffvs2jfl8rdgxy32arecyp5xqdryl8y 5644 2822 mmx1kvyj70vfnwjwg6je8tf3dunrwrafy9mlm2wtgqx95vwgnz2mrfcskpydtk 5425 2712.5 mmx17qkmawx7lmur02c8ruql43x7dvttg3n37890znkczyyctmh3cc2qxf9fyq 5196 2598 mmx1qm7k9w4qmnqc2gufp59g6hypfx9gcvpnz5e0j25a66e4vhnztmyqn04u69 5109 2554.5 mmx1sp3fn6wkhmsum7jjspvdnj4696wyqc2jx7deaqpxtznus65jr05sg5pmu4 5032 2516 mmx17gtsl3areyr6g7xscq67jl2xcnz56ekkk9stxvx3qev7hhez3ccs3juqvl 4728 2364 mmx1ghrrjcqpkwgj9z8e35eqytswrtrwzrtwnrs5sxnwtvezrtwk3k3qrjhlfp 4701 2350.5 mmx1veepntjet7j6lw2sfx4p9e05day63l65wj2pa7g7cu6rusyzru2qktg3rn 4645 2322.5 mmx15tfvs7twvmtvpp4zvgpedz4suysu4fa88zuzjyj2yjrkpscme9msaye6tc 4643 2321.5 mmx1tpyah2lre4lsclru42p8zqanwfukpu9n909p6pyrvlcd4mk0dr9ssahxe8 4519 2259.5 mmx1pt6gzm2amdd63w7juuy8y7wjgzu7v6mc54u2687dy6nnjav2t58spwyffq 4367 2183.5 mmx13xgvpxumznaqj5mkhxc493nzhc2kf9w3ks9z99eaznesjrsln0eqgwclyq 4326 2163 mmx14kjzcwkmkl3ttuvd8e5flk25ulm32hk9xe4xfp0vnfzfe8pe985s76j3hl 4311 2155.5 mmx1fmjnl0utvqxfmxpvz9snepkqshj89ylhca3awchtc02f7cjpqlgqerkn92 4200 2100 mmx1a9n583hscjyjvu29ulafuxhgfcrtv4j02z0t8lnvzvlhxcvxgf8qxsxysy 4158 2079 mmx183ajctzcp95lcx2zztjk58gytyzmrlsdljna6lhedqj7h3jn04aqu3snsd 4056 2028 mmx1q8d78sjm37uz4pps54q0mn4w3yjesr9jg2pprgww6mmput9rg2jqudrwzl 3922 1961 mmx10t8nj6dkqmkat9tkatch273fj0lu4yj6xsz4jpsw50ur5rsnjvuspelwru 3867 1933.5 mmx1w7jnglje4j85z4dv4z6gpmwagqfcgpg7nq7dh6wu98qq7ckd7umsdq9hn8 3845 1922.5 mmx133vuztyunrfyrds4nxxyjyx9fq3ssy934pyjeh8atm9emesy5sqsua5jyx 3825 1912.5 mmx1478snw4amjfq0hnhpwl8de8yup2thh5f5uzmyu5g907az5sv6fpsuwfrma 3727 1863.5 mmx15098ny3pc66kn6sgr6t8jehvwf2yzcxm6lxljvr7dfxs3g4u5plssgudwl 3689 1844.5 mmx1j6nsqqj2g4cvdgf3r3y7e5f3wwvgyu6gh0e579xd2jsn0garhruqft7myr 3525 1762.5 mmx1f4g8tdak9nw2waf5v4g8skt6gqqpnnlvxhx0y5vjkm0myv97svhstqzhm5 3501 1750.5 mmx14xms6j4un330ca6y09r8ffag0d9gsw6dgka97c82k32d0qtkuu0svjvmgs 3496 1748 mmx1wpvwth47waanc4hmp4e56trdt4eefn4gfk5k0plmecc3cfn5rh8qu8ug27 3451 1725.5 mmx1q3eh75hak0v9f9psa365zjypz62q8d0cwv2qrpwpj2hayfn6xfvq747gj4 3428 1714 mmx15wphyfczn8lvfmj28gkhsneg8gserwef8ergm9dxm03ngy8adnys2ypvdm 3422 1711 mmx1hl8lnr4ddyyqynx5qj5psv63ah7atfrt67s9eszlck5dy5yy9aysylv93p 3419 1709.5 mmx1gca9vvksmtl5ud5lxarqrts9cg72x84gxtcg9h2e085g6eth4cfqtg8j9n 3405 1702.5 mmx1as0ezwhva4ch25cssuzrv8hr2vk4fyt8ycefdtx7dnwt5rgadcps7ezzc4 3379 1689.5 mmx109nvzs3vhyjqm3l7g72fqdxyh465fedk4xjvy2rnhfmgrw5l8c4sex2mej 3302 1651 mmx1xm27rmtx3l7a00laujl97484grv5xqhrled5q7e3awlerfhe32yscwur2z 3286 1643 mmx1dv9nwp48cr9qwn3h2z8d0ufy4gf7j4hfw2j7lmrf2mk6jxlzy2vqaphdfg 3285 1642.5 mmx1dlc90a4x967re90nh8wzkup7j0rhwwdkp6x6sv0kz8uk7x4suzrs8gav7s 3279 1639.5 mmx1apz53l6jeqzdtwxry627f2rpagmjwsj42d93ca8jtwcdtht037cq9fsqhm 3269 1634.5 mmx1pdlh0rj93akpwww8apmpfj5awd08ew8c7c8ce4lk2cfehypgj6js7a2eeh 3258 1629 mmx15n95rxf5c58taud2x06sgpldy3mazdyf2lf8cemmezp83hc5nzvqp3l3vr 3149 1574.5 mmx1kklq024f8w5p3963qd3ac3dz4a03l8g5ejnhqwqgqg0eq0p77hnqmzjuut 3122 1561 mmx129hgzhuh484dtlgz7y2r4dmc64hqzn4680z4dg8qq2gtwymfm3ksl283x6 3111 1555.5 mmx1f3ecr58txvmxjrlhnx3nw0wg7y7zdef73gcgjfrvcf8lgrdu3czsn4yx6z 3066 1533 mmx1z66g30cq7j7apzf29zmdsu28m5vrqw9x8m9jh2a3vddrxz7fsqcsh4gv0w 3061 1530.5 mmx1qnh3zw2utltxdu9mut6atp326nujr6pmxxhtryn7lq089kv360dq64mj2w 3036 1518 mmx1guajyf4849dkedxpj2aqevkuc9a3u37fmg4hyqzmk4l02n37tfrsygnc5y 3036 1518 mmx13kmejc28rs4q53wnrhjw2xhyp2jqjzg78uhswqzy8fzv3reqtf8qvykjwr 3031 1515.5 mmx1prxda0yejv5m4h6y4pgkzmutaxrd96zsnqss6aq5az6609dzatmq5jnv0e 3013 1506.5 mmx1935m33z20776s8cdrw6wxteazyc7qtcf4smm3mcfsf2xzmlex7sqfz5map 3010 1505 mmx1nh05jetwxuhj79j9k4wx6ujsamseykk84383jtmfcpzu2f2hz4wqj4e25c 2915 1457.5 mmx18h89t0y9m8cy8trcveul508ju6v3tnajz2hrhvcs8rm8pn23djesml7auc 2887 1443.5 mmx1gs3hunc5t3emm68pfgfduqyu5q47rmdpzexjgam2m7zppmlwmqvq265zc9 2884 1442 mmx1jq306xnr67j6m6dksg2fle285vxga5shrtqffjxc0d84ghnqtklsx0wzmw 2779 1389.5 mmx1036ucmxlqgrwmcuuheau33k0h93u0wurkxznvsl7zqgej2x2rauqaktwxw 2760 1380 mmx1lsgrc4ea32dg8zm35yg49a9xzanjav88wdvtvfgu28s92alec5sscmwzm0 2731 1365.5 mmx1cl8r0pfpp2q8fmg2jjk52q8dvhnmf26vx0wwms00ty8xl4snhf3sg65sm2 2718 1359 mmx136s9temfus3xkgz3ftwqkrg3kpw3nr67088u2ckhkfvazqknycdqe09z9d 2706 1353 mmx1aa7hmgy7dhsmkhsscp8vlk4y48jyntq0zndsd4lvn4ht0nrjk3vqrtn5mx 2693 1346.5 mmx1m96tljuk8yjc9xwu4q2awulg8hrgpg0jp6d9al5dm7r2hue2u8ysphwe0u 2678 1339 mmx1u0rvu8gxz4e0jty0klhmagtva5vh95tvwv9r7pr88957janjzetsppkfvn 2630 1315 mmx10px4lhql09zw5nlgn8m062d8zw0j6f75acpf000grqxsma5sg0qqj2d7ns 2605 1302.5 mmx1e3rlxd6da547vjhdswqp05z6tzx50afnmytanvjsuulmmd36yhcs4e6pp3 2583 1291.5 mmx1kq7xc88lghdv0mu62585fck3ppnlmdxn3jwvhqpks73wc8vwc82sqzyhjq 2540 1270 mmx1dm7la9qquehldy67xsfynp76p39dxa5xn4veegz88m7amspgpgcshv7dfg 2526 1263 mmx1kas9v36hhw4rzac60heh2uy9kf0wx7ed39fvhtlzqwhmr7udkl9qlxwys2 2502 1251 mmx1r0e4s9r8jqvuvznv3vd5k4pfa5ahzgyn6lrgchwu4mpqlzgsx8mselfar7 2477 1238.5 mmx1cd3cxagh276743g404ga5u3ksjfz3frghh3ve8nt8a07d7cfvswsq2v7kj 2427 1213.5 mmx19jlhmuspu5xz706c63vheckjl6z7qx9ne5rg9r7c2tq4vj8rt9aqj60yvy 2396 1198 mmx1uskav6veu3nxfxr4zs6efdk8yth3tuz55zptp56rf62t0ftwy4nqpvarja 2379 1189.5 mmx1rq2lygf5p4hs7a3ftmc8u24v7f2q9gapsskf0kgh8wjzzxsddumqjz5fsh 2328 1164 mmx1r5yfa4n6neaym6mszkpaw0gpr27sv99ge9ketvn0rhl9a9z88kpsslxvwv 2323 1161.5 mmx1ft660k7cfrsmh5l4twq3xxwqzauhm2cuz0cygd087pvl3u7p33sqthpl7w 2320 1160 mmx1uae6fch5rlzfg4ctnra6q2hqhw59ztsn5ghde574lvqcpecvzs7qz7q88l 2310 1155 mmx1wkcf225wca3efgurwphhsw4z0wqss0e0lwsenk8r06yvymp4dacsm2gzwy 2305 1152.5 mmx1xr8hes0tgn95zf7y9zx6x649t84t5c4zas0cyf048rve723u9gaskvfmvc 2298 1149 mmx1c8s4ve5fznca52l7w3rgyqjuh4sd55hnfrtp0tys77acmmtxdcksjnawr0 2282 1141 mmx1hem4nza3a4935vjx6cu0ukft9y4cjyv6duddclqj2jsf9pgnf74sqevle3 2272 1136 mmx17l3xstvyx5rqxzqvswwvf27zz38ckt5q2030selhwe4elqzwe4hscxf06z 2257 1128.5 mmx1a970ajt3yvqs24e29wpfazvh9fhd0afrmhezd0yxemqntrmtnapqtphgz3 2248 1124 mmx1v93pkhwdq6uq4ujmw3625zkxegf9q6uzv2fepyalydg6tandy92qnxwsnp 2227 1113.5 mmx1ptxl932ypfp3cl7fz506efjpw5wwkyfntvdfcvqa88v7849t64ssp2m4ym 2221 1110.5 mmx1q2l8pzuzenlq6quglrsy2879ettj2rkht2rt8hjfg37dg4zeqpjs65g66t 2217 1108.5 mmx1rs0lu6yh5uhp3pa8tl3dwz5ts392ua52kx5v3p8h5jrd0x68g8yqc6usm5 2175 1087.5 mmx16pnkxxv9mu42n7t4pte95ftduqz9ntrdd6u5epqnj5mkdn249wgsmkm77g 2145 1072.5 mmx15spum2ccvkzj5zg32v0qzy9xhhafsa278ujyq20m2yhwq5lpxstq8ghswd 2138 1069 mmx1nc9xdtq7vm8q6du2y7ckk58awmphz66jwa86wa3u3e8ru2q8pazqj6fukn 2068 1034 mmx1m727l7tyw3u8lhnpqg598yns3tsum2n43da05psyhddgzqcj80vq5u3fhq 2059 1029.5 mmx1xeqvfd5a63j3j7vq287dvrjxyksw628azkn8u53sc6ftd4l8wr9q40v33w 2038 1019 mmx1ca49tk9sh9sdhz3fqcuax7qds4cl8xp4nmfudwz4zpyh70wgef5sz430c3 2016 1008 mmx1gpscz23fjv9fw32s3k2g4enc8k0arasszygjz929kmkp96a2c4us8hqqny 1999 999.5 mmx1g7jahlldnp96n8dkaz3dygg56kef64q5m6lfjpgktutycdlgyksqdy7xxp 1976 988 mmx1fp4266lrf7weqrkc3vdm2d29wnc0f32q33sksnfnhagcshq6ka4sav8d2y 1971 985.5 mmx1cqgrreu8yptcvyufdussnfqxnwv05z3dqaqu0n5qtfq82n4amajsprkzal 1919 959.5 mmx1uj0qhzeguf0zayyg2m9z794nrdlk7y7pnprt4w798s5yezgxgvuslzd94k 1910 955 mmx1athk4etg0d9t8q9yy6s68vuruchxsa0pz37pdgqfsc83nckdmwtqlfdk4a 1881 940.5 mmx1lgktvy0vqjnukfkhrm4vthrv86vwhunpwpkquklcavjexsxjgysqmf58sn 1869 934.5 mmx1pj0uu0lna9r8rgw8ccn4nj4kudgwxchv4l0tjqpw2x97035a2v4qdye8a5 1844 922 mmx1q65hf2l3zdkl5hgvl38syuul0q0nlnt0pn69nqf7euqmxqelqwlq8eskrq 1837 918.5 mmx15deh8dkm0t4arjta6f2z07uzgvh49r3mnltm39hp0aeth0vc4mesdzfdfe 1820 910 mmx18tcgc6fe94f4qz9007v53k9mvv29rvtp7mef0wvqh0vmmnadhv2q894jq4 1794 897 mmx1qhj8xesct7vnc9zrqxj4f2rqrjtt056769mxtugz4h5f6pca8n8q8ghuku 1779 889.5 mmx17h0euyts7h8ezaj053q5n9khurkay43s2tqfg3jf8sxrejuyj9cq4vtj60 1771 885.5 mmx1r2wcfugp9ugm44z03eed4ad0t5qhvg8ufc3p7pu40r7l5dkjurfquuahjs 1767 883.5 mmx1n0hnw7qmwehhsz4qf576s0sv5ql6kyq9afgrgmuzzwzfr03ld82q0ta37g 1765 882.5 mmx1n0shgnl0qx006fz825pm7e9uhku7z7c4q9e4kze599ly276khgnqyxh4kf 1758 879 mmx1s4pkkycenn7e0g0y4c3sz2yrkld7m98mlm8mc67y7lj4trw5se2qy4eq5z 1715 857.5 mmx1xcalpv2gy0k955p6pl97ayzrycmvrplu9cufx6dfctwrwd9uvpaqypgjxf 1709 854.5 mmx1l5dwydjks9s84n3rr52nwggsxfnrf65me7tjnwerse7xxn868ulqfmwwyg 1707 853.5 mmx1xr5534k53fk455wylucnrh5ap09da09jcghz7g9jg2jaarss7gesrjhu9j 1680 840 mmx155480tuk2thf5sqkkgft54hmuafu0mj48gql8fdxdvl08guut6mqvy5sc7 1675 837.5 mmx1qn07jmdsetg4k8gqvn3wmv9kqkrhrsvrmlc547zslku4grlunw9qqllens 1646 823 mmx1kgrc0207hk490v9uywllk02vxfx4skq2xn5h7qxuzqs7cxy5z3csuzpjpj 1644 822 mmx16d3ry985fdkgpvj93xygv0tn2wc9ylpex6t08qz0x6lat9km6dmstdhdhh 1621 810.5 mmx1va39vjz042a7czjkc84uyuej9zm06ns9xs0tv5uk3t87xpkssw9qfagvxr 1596 798 mmx1fxxkthhcqf9ryfljy8xr9dcw4nq9q6mfetxx0dyqwq7qkv4vf4lql4qzgx 1571 785.5 mmx1zyldvfw2ek8a2fv5zm4azulmkth7xntmvxspud576v7awhf7tgls50qg4l 1563 781.5 mmx1mylh2r9352klltxhjqpfj5jnfll6uqfeqp7xunarlg9cqufrhjvs28jrt3 1553 776.5 mmx1923m2hlyu8p6vwt2wvcvda97nf0cqnwm6qf6axlt6zw44gkdgwhsz90j8a 1552 776 mmx1kcrktqlr88979xu79dxq5slh3xkvx727j8unxhev9frl8rhw09cqqnl6r3 1549 774.5 mmx1d39vgf387ct682mq7ua9vlxpjs8w47ennw69wp05atf65stht9wq5hkxpd 1533 766.5 mmx18a9m6za5h5j0t6qgs55fhtucpmzse94aq8z9xjj8lpxhyuemsygqhstwmm 1531 765.5 mmx1jvtkeetw6w09f6ru7sqp6e2kmfhhcza38ja275cr3w3nsq9w8wpsuvx3y3 1494 747 mmx1ed9e542ggt95rk3ygc3xt29apzs2fsx384mwhqqwy30qs4wdhqgs9qh33j 1488 744 mmx1fxscvs37ax2lac6xs4tz3ygkwv3nh2hnrtrx7r4fej48708xplmqlma5lm 1470 735 mmx14ljztszex2rvwpnljuj5zuw4rv9pmdckfgq4n7xj3d6ek9flsqhq6nvu82 1467 733.5 mmx1awrkcsjegqwa5wgghvcq0kanf24rw4dhmdvfxvgjnlvkkpugp2vqxsdv05 1458 729 mmx1ml4nf4gxrz7yc2uymnu6xdx2ssev2q6696ar90pyz72fgp8vxj7s472hym 1456 728 mmx1vpva7nkvq3s3auz70l0pfj28e65tqlkajydw9j0f7cmsapmjgfls9u77yc 1419 709.5 mmx15qq0sdefrea28hhlhe5er0vur347vztfsezj76fapg4wf2nxaekqqxsy66 1414 707 mmx18yu63mp0j5nrxgxmt6md2y77v4n9ltyv6knvtmwjqqzty37swagq9df8mn 1398 699 mmx13txgtfelvrng6mfjyk84sj74lrl3u7v05wn59659sg7ffup5f8hsl4nhzm 1381 690.5 mmx1u9lr65e2v62cht733pjlz5dctk7esxmwaxwjew2xytr7gqgmtnuq3x22cc 1347 673.5 mmx1nx2pts6xk2dqlv3xgyad8t9ektausx3qmt3jvl2myg86wz9jxgpsqyevjl 1336 668 mmx1ud485p4l6ctm6gf06tnlysev78r0rcd8xa2a42ys95x0xyztkz0st9cn6s 1324 662 mmx109dcdg3eranmnkkj0x9gtrg3ak4y5s70nkmyp3y269ux5nc5p2zqsuzkry 1319 659.5 mmx1qymn8rdkm8gak0vst498qpkqvc7gh3l4qxt47m6plhdjlqnv5tzs8ncyy8 1309 654.5 mmx1v2c3pk23x788qwmhh8dexn6mc94an2l3tgj4kp9th0ygz46997nq6xalyy 1296 648 mmx1qqjqmgyqws0jk04frzf4e98ydd3pkcsfyv65g2t3lgnp9t8z4afq0kqpst 1266 633 mmx1da455czfvskaeewg4prqrcysxuzm0x5kgsge3fxafz3e6ddmvppqpyg796 1252 626 mmx14sfukr8xrxq5rlpu0dfvvtkzdzpqyxqyygzdjg6qn5ew34ynrkxq7pxlm6 1251 625.5 mmx1u4m0jmxu7avg5am34pjw3g9lwqys7vcfp6ah53w60626rywvrs4sjzl660 1240 620 mmx1v35z3r8m5aenzfv9gjx0wcuk9zj5qu98asrr9qa868zrq7qncssq0lsclj 1239 619.5 mmx1n5w0atjthl70cnj3zll4ku3jl2w7cut8peqdkt04ck9annew2mfss5uu88 1237 618.5 mmx12uthvnq3g2af96lc3un900pd2tyy8apf0fsqag68d7fxene639tsacu4zm 1235 617.5 mmx173nnyxacrsmasx2v80gxpejk6ypyvt52pcgejrd6jtv7yq6rtslq6pw76w 1230 615 mmx1c5txaqqwf9ayjvyehy9u06cawxfwtctzk70e3eh6pm0m3aqcrqlsjr54jc 1218 609 mmx1g73caa3h93ah6w09g4726rru8xa2nc8vzgsgwzk7pys92jg7p38qz88vlj 1218 609 mmx1j49546jumejnzwpq4ptdal0acmje45de4y9c99pjg5kglmazrazqxex7qz 1215 607.5 mmx1laf0fn2zjzf0en79t8qu7ecqrdqtxrcswenj4533y2s4hqq37gpqd5jjyt 1188 594 mmx13r385uxl5qm5dgt029l3crxsglz6g5t3sd3yy2metys0efjlzmqsl8aevk 1185 592.5 mmx15vny85stuphrkemr4qj4asxyv57q5qhzzc0xyfycd3c59wdx30ssywkqqt 1181 590.5 mmx1usc52whlhctpx08phhjzge03jy0wf2ft0y9dngzgxxs2ev0y23fsgjk7kx 1178 589 mmx1nh8ca5vlqrtwuuwrk4rm6yc06fuxgxgspdm3cflj9y6anlv3r0jqp8ygza 1169 584.5 mmx1krwuwd0xfqxq59rhnglkkduxw8wzq39axh99vtqsy0k6tnac0zcsw7fhj4 1162 581 mmx1gntkqf266vrn7swllylnxpaayt7n06yqxhxjsaglkk8fzds4xuts4gwjsw 1138 569 mmx1rcyj0tmkrgejq5mvfjp7en6dajqh877960vdnrc9m5ujhps0df6sfsnhl3 1092 546 mmx1hvdake6jsnu5qa92un6ucw70jsa89athx8egx7507eqjk3s9ujvsmzmgd4 1080 540 mmx19zr02kj3reljd7fz6lrpwdqep9s2rah2nkcwtm77yxl3ja4sqvcqdxt8gf 1067 533.5 mmx1p76tw7re288zm3avlruq0v2h38feqe2usscg6cdcfwn3f8cs5ejsjkev6x 1060 530 mmx1p27mt7n0as5pmzllk5342na0zjemu7xcylp3shlucvtdhjpeqxxqvgcnx5 1052 526 mmx18gm4fpvhyu80m262mptx9y4l6apdlwrsecfye70n6rslzuwmqqwspsnw0w 1037 518.5 mmx18dkl69sxx3wz5u69s59lp9d02qj6czg8h6yv3fzzfk7d2f2dqtas9dls85 1034 517 mmx12amu3muxtrrr54qkd6wr7xtawh2lare2aqptywufhl24rex2u94qzl4tgl 1023 511.5 mmx1t797wa3smaufhnhxqpql52tpkm80t66ensrsrdf99ar4h265xjssjsucdx 1021 510.5 mmx1cnd5cv200efsm7q85dxl2368q9ymcyq4ry5akgrmn282jgdncg0s8lrgsv 1019 509.5 mmx1r2su2mtnjuk6t5q33au7609wn2pajsndupzh385r3s5guvpfclfq7m6n5p 1017 508.5 mmx176s94clt8j3rs0t52r7g906glc53gx8zukhet5ewzp3czz0fsgwqzjtz6c 996 498 mmx1gkwel33sdr4tgyfq55az5t5n8fzy3thum3v03jmw3q730ee6ajrs22jkde 992 496 mmx1t00welhtn9k0hg075ttg2laa7dj7d26jprf2as70xrx2fuhjyy6sjjp3e8 991 495.5 mmx1xdrf8vw7nl5e94grks7u3h7uxaamgeuv3s30h3mfr560td6rqdlqj2svmq 990 495 mmx1f9pa0dtcrg0rrsnk8c05dvvm3k2wc0mr2m7tyz4htyzfdjj5ufms4vy94g 976 488 mmx1wnkyn2ma6l2nnk80y44nrsqf9fdh27gtx60v3sdxvd9uzheruwfs5kf23g 968 484 mmx1n56f04jwuzpa2zkl46ggs3zv989fz4yx7yyrcx6nzn9ecvpwjucsudlers 967 483.5 mmx1qm77f6cv9z9ufkavnt5nll7qq55rvjx3hru8kafx4guk3chpuawqcmd098 967 483.5 mmx18plakxe6gzc7frl7mke9gfhaz30cgr40eyahtjexsm34kexk0dhs4cdedg 950 475 mmx1rkkaqaqs8c99w2jk7xw5ugfgkcfyhxpnu8xq4g5a5fatxvgggtwsccyp28 948 474 mmx1d48fsux0kj7empe0c6a68y8gh6f494hv6wgl7skc42ckf2932x3swcfen0 947 473.5 mmx1gqvmjyu2jg6d68f3zytk294re7wv47q98aacrkfx8kuq6f0hsmlqxyfm0t 946 473 mmx1tuw784a8wp38c6q3fw6jfeqy3pvd8ggh0gj9h0xqvez00q9sew5sg0j06z 943 471.5 mmx1essz4a6dexpprz066dfgwslmz3p8uy73czfrlc7thy3s8w782rfsx75has 930 465 mmx1k4sqj4vufu22zxtahymvhtwmjp4c633herv8h0l2z9nm2xn7uqlsjje4hn 921 460.5 mmx1vpg8kftakr3pammp86a8hxyar9s0m54w9j4m29d9d6rlk9ztf2vsl7ck38 915 457.5 mmx15m60pxy8mjp03mmtf9aq8kajmrt8vrzltj8epytnsucts50fh03qhw98ql 913 456.5 mmx19awzztq8wmypthv24e60xmvxzymw82l86y0sdyw5cl5ehnr4ry9smhvg4s 906 453 mmx14tkxv7wnyfjm45lr03j8r2qac5hsa9mk75emunjg78qngwgw66essvzga7 895 447.5 mmx1h9l7sgtnyagj2zctlj0xmmn7275uqpss2dn8funllmgd7aj3auvqv0fy7q 894 447 mmx1tqmjtpyuvj7ze5ke5qwpclm8zlt233n8japxhxa8jhg94m9gya9qsqxf7c 887 443.5 mmx187llktd264wz7f33nqexhh8frcykztdg0emw5t26cvmzfng8dquqzl8qwe 882 441 mmx1hkmks5m9u9le0k2zmx5djjxr6eh34nyzldlnty3mzk6yhzvcevks4z2n29 876 438 mmx1ye76l4yxct7a2842mqa8vcf4q3jqryksu3s6xqvj3qdlaq47es6s2nt552 873 436.5 mmx10c7skd5pzvrclcqfemg2nwk0pnpeh6p95aucnt04z3tjhpl3f2vsq6wzpg 848 424 mmx10nfcaxrj93rjxxx3us3mwzajznj8qpcd5vg459yfkk8lg90jqq9qxry935 839 419.5 mmx1m2nxpzuhfj4awyc2wnu37nhkhsy0q8spg9egnkzf3geq2kax3g7q54emhl 827 413.5 mmx1rd8n5srxsgys0l27d3ym8wmcw0lr4jqf7temzz7pqqjx3knnksesgace7w 827 413.5 mmx15sme6pzzgltj9hn9s5u4xjtmyud4qx8pd2kgvj8hsymp6amx0wnsgw9u27 819 409.5 mmx1ff4lyf7ulfrwt0wfnr6dtpuk6tv0w522ef3pkm5ax8e9wv8crd3qe0a7re 802 401 mmx12gqel8celwz6wxq32usd6ut8gejtl5nw705y5pecp0tpyszn80qsgzmptu 798 399 mmx1sgquqfayd4n86899hjxr4xg5z066jfljxj6mjysns890vpckj5jqt2h9t3 791 395.5 mmx1kt5wvvt7k9h6e5muyx3e9pcvpnakawpr7g940gggfgrktsd3pf6s0qnpuu 782 391 mmx1vkya64sext8u0kcj2fsrezryfvxyprez6xdxapkzpcywakxh7v0qu63esv 767 383.5 mmx1gy8npau5h8fas5er5mwtl4sqe2glvwrkr56dj9679h633mgq3eyqpvz0cg 755 377.5 mmx1uq6ytg6v53lsy525m6352hznumufehsecaugpmyq36vezznyvzusmfpxm2 753 376.5 mmx16f75q09hg545zuftzhkq9cx5sj3twpp2psj7uf5z2nh0vhuf3qxquss7h0 752 376 mmx1aa6383rdchx47qugjavpkcyxnpjvj6v0trml9h3ez5wlcusv0vmq0gkj65 738 369 mmx1355xdy9zhgzd8k3grndkwdff9qr8qk8raucr93praws40s27fkrsjlz07p 723 361.5 mmx1zx4nmhzryn2j999yucpqttkmp4rm49gcmdzz5ze90wddg4459s8qf9clz5 719 359.5 mmx1r2s7q00hau24y49gdglqx9luqlgjug46del32hmfmujmq87fhqksw7emhl 719 359.5 mmx1zeqjj69mt8a5pcgdzrukt47cpgg6nwdas6m5j6aqefxapq7klcxss8tcha 718 359 mmx1sy48eekchg24ywy0rp76avyhfd9hh7f8659tsrljz5tujekwm8pqhues99 703 351.5 mmx1x40j0p3ss44jghrx2t0yqr9gqcr36xx9pjss4vvxwj60gkfvg2yqauewfw 699 349.5 mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk 694 347 mmx1hwq6ezh6zgc6pvadxh343nnhvenc5zw0lalx4la9777ucv8lp3fqnjpwx2 692 346 mmx17gjhpuwmfcdlymhaz9qwat2frpptev3pz2qmuq3zycj76qwnr54q40t5l0 691 345.5 mmx1els3e8hj2jvteh7y2xgwwxwq2uknurtkp63ca74gcuhrcajpzc2skqmh40 680 340 mmx1jw4zf9sepfvnnnanj79mqd53pgx683trcms5hfny2nx2dtv9rvkqwhl0f0 674 337 mmx1fd7vl03g6xpj6r6c3w4kae4ht7zke6hk3ar0nzhzvjym9yc3v5ksr9knqs 667 333.5 mmx1v5u67yws0zlnutd4lw0gqk8dk75xnjj3k87rnzjqurx3lpz7aflq863r48 663 331.5 mmx18csvx9uspv3mp45autfk4dj0t4yzvzyce63gv66nahaq9pct73ys70ezu4 651 325.5 mmx1tsp5d79u8chvaa2agx55d0mrj69adu2d8ksensvrlwucas0gj86saafr3t 637 318.5 mmx1nkd5fyvrnu8zeqgen48aeqcnyggjxnn7dctfddj7m2mz25alrl8s74wqvz 634 317 mmx1v607ksqyympga4xdpy0pjezyv2gayta3d3vym23jwx30e3ynl6jqwj3jqm 631 315.5 mmx1re75j8gejzdje5afrkdsl9xknheax4ymznewazk5jqy4msarp05qz7qqsp 628 314 mmx1ktyudrg32h95gwzg0hfl87lf6wruuunp6w888typfdw9f52g4axqcsltyu 627 313.5 mmx1l8ht54p69ynxxf0lxzrvm20956dcpk4lj22rv0jmdtefk70hurrq8m4j7a 612 306 mmx1990jyjqxpaphcr9fqmz6fdm9v4kzymtt8kkmnzz2hrdpk8n8ca2qygudv5 604 302 mmx139j94tjwh6m9mnxdej2j2nkl8xc5ghzvt7fvz9pah7jvfxnhdassm4z56g 598 299 mmx1n9k3yluqcmnwz5wdk3dclgs6uq7yf4g4tvahh25jl3z4u488ttesnf2kkx 596 298 mmx1qvemldmglge8tr2dcwnr4gqam6vkal5dkc2jwsz2jyyy8rhry4hs58hvrc 592 296 mmx1csufldu5u90h3f5cr254agcn6cc982q9l2e6jjfdftykrfhl65psxfh0al 590 295 mmx1q33rhh00r0dh7fx79lp9wrmv3t5mgpx6m3wtpajmmenuux0lzvlqruqgnp 587 293.5 mmx1544prt4r26fm2f6ytlvdfe3j6mwrs5p479kp3lcrz5n58kp8ugpssn2z2u 585 292.5 mmx13vvj20fm6lwmjd3anw9cy9hxeq0pexln9h2n5qmmva4ts3q7sqhs39f7dl 583 291.5 mmx1yw9yfrq7m2nf3lztur5qqwp255mqrxyfctcu5vqve9he7dme0x5sjr3c9t 580 290 mmx1la845mwntk5rqty7x33yw2t04e7njxyl3uflmfvea7lxzcwvc6ksmr3war 575 287.5 mmx1g67zee4q9x4wp2s4lkfde4v2m05e90jgn0m42uxw35r22emk3r6qa8ttan 573 286.5 mmx1kapvcp4xpfzu2ftekrkzwwdz4qtayu0zl7krddrrg6a43sngsnhqq6dl05 571 285.5 mmx1u7me3rp6kmfs57wzytrxjh843sypnl0l27unk0c2pzkuuhjhy03qfwcyqf 570 285 mmx1qwcxn8k9nxdu43ytsw0ew7wk7mmptr3ykvtenms3fsyqexg9p36sp9slcv 568 284 mmx1d3vplkcw0pjqrpfr3cesjmvslk30p8qxhky5l4gdslclu70tql0qdqp9dn 568 284 mmx1f8yps5v4rqakx3gyws5hhlrmapcjzzf5j80dm655ehcrf6qgz36qandk5l 565 282.5 mmx1n4n4k7wa79l83ch35r68eavnh0lkwcs3h52jt2xjl6j0969lqvhqsew3wl 564 282 mmx17g6gp5v6070kcjcq0tx0u6ahgqyth4gq9fha3sgsvdwe8xn0fj7sslsft8 555 277.5 mmx17gfe96qhqt3ylhxxqj7x6qxjzvt8cen7s4ks6e0mt642dplug4vq652g57 554 277 mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z 551 275.5 mmx1kxasqu6r7dsuqtzd4drllld6e6l55dxj54s3pgaxz23mdpvcqymqx84dvu 549 274.5 mmx1nlwcd5rv3djk4fh7szmghv4dezccyfd0cs3wm5h0mltx2jf8xplsj3agaq 548 274 mmx1su0cegxxdg73yhm3xu226uj74309x9ll5ycd5m8eh04n9as7mjyspr0w7m 544 272 mmx1652t20n0jwl4mn8xe6k3j3zalgpuw38u23e6cf5249n3h278033q3kcq00 542 271 mmx1tgppefepecrczwwad3zlvcwhuujsyr63gh8mv92el5yy8egzk97sdqpjp8 540 270 mmx1n50ufuaae6aqhxcjlw0fydmhpt4h049rfzjqtgke57sn49p34sasdhzm0c 536 268 mmx1qh002xzjsedzpuzqq4cz6spv4qayuwhyt84j7pd8zeylqwl0k2xsnhg9y3 534 267 mmx1tms3d3n23j28f9agpm0jrdqnh634f3q9rgcnwsgq64yhcshps4fqd0fv6k 533 266.5 mmx10a32q2xtl4pvm2trnjf8cgyswuyywg4allvc7j5pakau4adcdcnsvmsr0u 521 260.5 mmx1m7uycpxww03cj05zhdgzjcen70kv3pd7gwsk8grcdtu9ltch6rsq9plyz8 520 260 mmx12hpmx28f6hf0hzx5j6z9ep8vjmpcgq5kwmaxkpagkqdfksunkgssmk59vn 514 257 mmx1hz0h2af4zmvnczp0twyzt8uts262pn9h93awamhc2sakdlvxvgcs8llaeh 510 255 mmx1jmkx9m05exvtuk5swve9x9qe2u6udxx5h8p4w2drlu92523pjj6qsq8epg 504 252 mmx14fz0p5ff557c6sh6xx3ssztc8sv8a023cqugskep0vm4j85rna0s7fu03g 503 251.5 mmx18pu3yu4a0zatqgkph8t5pz3n4jy7hq2x9f348yhwafvj4wd328usef7aw5 501 250.5 mmx134t4wf6h2ppxnxm02ejutn0va4sj6fm0qkyn0hsfx5r4a89x25lqznt9py 493 246.5 mmx1vkmzqsggqcqtzy9ea8rd56zx20uln52ug5q76y5u7hzjl8jaxfeqe3f49d 492 246 mmx1e83q59e5gy528v9j68ewnhpgkwkdpt47y03ev9a3y5ma5plsyrqqru2dw4 482 241 mmx142lrptfxxp77w97ev74rev8qmrkykjf9cchghvhh8nr6dkt9zd8s2e55x6 479 239.5 mmx14nru8xmclg23hcdvanrn72rjre93wyew7vgv7hrwtexlkx2m42mss8d782 477 238.5 mmx143pxg8tpjx889uqxmczg7f7wtee3qdl6ya50dnrk7qm84h82s6qqz7dktz 468 234 mmx1n04te3zvrvfsgmvzl3dzegpntqeqevwmd2ycwwwhng0hwslxkyfqpq2ng5 465 232.5 mmx1axrdzlwdpczy66khlgcx6zffrury8z6jxxapeygehz5djt5cpyts2mqw7f 465 232.5 mmx14ntt0scarmrahc8dq3xfdwqqpuxddh6ez2qaq4dcdyyw0acwuevsumdgvh 460 230 mmx1sg74tyha62nx9ttjuk53vhk00248ts77s2ee55ryrcskrmuf0k6svhdwxy 456 228 mmx1l4nf9stg5qzuecmrfvls5wgtd8l3mdgwedcwvu5eqfa3n3pektzs2l5gvk 455 227.5 mmx14tmfx4twa5spah6u7he78hg5nk7tp42zdjsq8a25fyenxz64yfqsqdzlh6 455 227.5 mmx1gr44j33n8tsjpcmstcmffup7ap9a85kz3ykyuzd9zueegz37xh0qql5jwm 451 225.5 mmx1xn5hqxpphvuapka2kmg6xhsserajjzd48v7fknldems5amkf2a4qf0g2j2 448 224 mmx1nqkt86wlfpkvjylyqdsy4pa2e024cjpfnczt667tshtsv7uh6g7qd8dnel 447 223.5 mmx1dlakd49hcv20y9mylc2af37gttz089yvkrr6rn3jcyj2elpsygksmuynv0 447 223.5 mmx1lka3j0475gzy9yk0c3lt4f9d0p8zhlcujhsfsl3f035z6fuytpesppfrq9 446 223 mmx15qd64czwphlu49mlj6kmxru6wdcrjny326mp5d5p0hpzhuhw65sslkng8e 445 222.5 mmx15hfmkxyxttvpt36w04e0h3sdgr5r25869jpxehj4h6mrt66kppvqp9npnm 438 219 mmx1g92fj7rug3g8430z3uz8w9ntlsssknz7vnmw2xwtwy7g0yu3c8js2ucv9s 436 218 mmx16qstch29gdwqtfadwwta8fd20zrhqy7pgkaud2h3ceeafwjcmz3q2ezr8g 435 217.5 mmx1vp6lfvs36vdft6ljgmvpe7049dygsl4nqy6pvyd090huaq5m44js02y3zw 419 209.5 mmx107aackvhak3d2lapgz6qprp9785qfudzrclptqzvgkpzly2ppqtsypk9kk 415 207.5 mmx1f69lleyu3cznmnxlp9xznjnr84xrzutmjjcl4nlsfv2359fjze5sz787ay 411 205.5 mmx1r4cxz87hzamu4msexedead90rwpggzf6ktfuef8sugf7qqf8cz5qx3pf80 406 203 mmx1e5gsd2weaqmzszdlj4gu975s2cc2gscnrtsa9agufcgjv3zat8vs606ewv 402 201 mmx1av5ws5dp8xkwp08g3ge4fsmr5r80c7y88p8yru7rcv3gsvnkcahss2pygm 402 201 mmx1p38leegjxpafuxqcjqw5ddd2ny39ajs4hyy93l5hsr42hxhsdjmq67xl7x 401 200.5 mmx1uf668t2krsyfde2v7cwtwk3traj7gwrfcdcx0j72rjr84nnz2fqs83fpcs 399 199.5 mmx1m6dwm8wvtthgngztjnw7r0g4z9s8797xa7hdzrj2zyajctgrpc5qx2zqg7 399 199.5 mmx1hm4mvj4dheczz5g7fvpw4pnmrqlm0z9arhkqtvq6yaxza5ckmlws85y7zw 396 198 mmx1vlm6nlha47hctqvcqyz8uqfc64j8h5k2sgjmkk92ysm2k9se4hnqqldyu5 394 197 mmx1ezvssk3jgn6wr4t03ng5at3mccxyf6868z2kzmapnfqhuyyu2yrsa4vlkw 392 196 mmx1n39lrqg4kq5ey2tnk3wlqxylcuflevkkt9wffj9x2fsygma8m9hqntpsry 392 196 mmx1ks9t2rksthddy00395l48vaqc9rmjuznw0gyuta0jxpkzsce44qs3at8x4 390 195 mmx1lnwzzc8kdm0lnfezlapkh66tl59ruhn053rtsgtnd0j6qglr97xqt865yj 389 194.5 mmx1znmap05s26uhhzzewpz4daz634wcslefnlchrdlh6aptvem6u09s7k75zr 373 186.5 mmx15v9jzpzxjwdtn8ggkzu7s5suv7kqhuw9yer4w7ngvenlgg660vlq8zgk88 372 186 mmx18ee0whkd2pk6xymy9sz7a9y6mmcujphzqcyl659fxz2cdr5ln20qkd3wav 371 185.5 mmx1u6599454hfykwc52crn3wj2symdjkqsgu9rq0u3wmwteuc4z5jpsr327jw 371 185.5 mmx18evqre2xyqqzgspaam0sps0avu9xt7llz7t3r9wexelpy8jnws3s0u7sev 370 185 mmx1xrydtrhnl89x5dtqpwape59f0t246hhs38tl5d3pzcamfxh65llspr5pvc 369 184.5 mmx1cta37dl4czqsz7jaz5awly9kxy6v3v3nqes56vugfrg4h263fdzs99rgzf 369 184.5 mmx12j2e0ja3z0up7t0csl2fmm52jd9mrc29pavccn67uhadrls4457qpv7qls 363 181.5 mmx1gx8an96g7ky87eur85puyex8r24qswx5wn86r2849njg8q2hkeys8zqlvp 362 181 mmx1ryur5srud4qgamfq2pmfggw780m3z2mlja4665v7f7mfp5dejyfslp6smy 352 176 mmx1nra9jrj79xztttq6hnnenveezkk9pq4w5whvlmr2nhj4s56f43wqx0paqn 349 174.5 mmx1x5f9slcglmm2x3z9h2jk5ynylf4k4y4e5l4rmge6nl6dqk28xxcq0qcj3w 349 174.5 mmx1fglt4y8vdcq2errqju4qulnmcfl3he9nr09vxqke9hl805tcnw8s2039u6 349 174.5 mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr 344 172 mmx1kdz775nc0jd7uqjrlgd3a7pk6w6qm75w9hw26wa6q8mr3u4m42nqrj38hn 339 169.5 mmx1h8thwkuhp0jnlr99ntwllhwhvp773yxufrcuwsh9q52vkrfcdy2q934mmu 335 167.5 mmx1xwq2revzzgwlq27emrpfjmskmr60q7znpayenjlhuh08f4vxcrlsm99vzk 333 166.5 mmx1fk0jqxyz6eh35qnlu70gx58v6ahgng29e4k6zjf6tqxa96y7p3gqu8w8qq 331 165.5 mmx1nnrl7rh9r8d7xtxr29tgq7evywy8nvkh45w66f7p7u7tesct8ypq063ctl 330 165 mmx1fm0j6pkfxsjeufdcglg58v3veay6mn2x8qp45tevkxfny696kewsv42zg5 329 164.5 mmx183l5kulcdjh8hlut6aazut2fk246dr2agqlcm8lmkv3v3dn55avswxzcl0 322 161 mmx1ghyal08f7r0p3ft8gywyr24p58jhe9fsy0xmu6wwfjuq4z079q3s36cu8q 318 159 mmx1wut7pf5v32hpylz6rxmrsztxfhskgxp34cgt8vawu3xqg6y8pj0szay6tj 317 158.5 mmx1u9xsdvqzayfla2rutaxkespha2xrhn9m6wn7v8z8rhj277v9k24q44rft2 316 158 mmx18tt3u9d47tc2frcp4z20yzt2yw9fpe0kn4hsnardnlzdsj9eewyqkhaxr9 316 158 mmx1dxxgygp75dh3p0yh6kmezeeyftncphy0q2fjws48wzxdrktsy7kscjdmd6 314 157 mmx1vcfhtrfqn509vtgug5yjdgx3v7u6pa858swvwgnp84nez9n03v7shktem2 310 155 mmx1ln8cwt5hwwd5l79uar8gt20njcl3vzud6m00lxtzc0uecq7zvmzql5mhez 306 153 mmx1j07gy44rhsg9xtaf9kt95h8jr8vq8zq40ljf38dqh4mmtkekrtgsul7gud 305 152.5 mmx10luguxfgx4rfd4nft0ee6ydk9dcedc4gvvwhknp0n9ux9nck45qs5m6cz8 305 152.5 mmx19j0tzeawmjma763dj027q6c0up4a8z6leypc7htgpxwnk6wr6d7s8est7d 305 152.5 mmx19nnl9lw7td20z9l22v8wk558mxfrdeud8ky3229utv6e50cqyazs8jhq5e 304 152 mmx1j40vufa4cx0xgfns498sm03he60ff0r922treh5qecfuwpsak4vqjtpdu9 301 150.5 mmx1t9g3q5fahh5zpsqw7hnlm37mvmty3vckn77cfepfpt23jw9k4tuq7pqy52 300 150 mmx10783gzrqc88k0n0ert2nkjz9ams2aj77ux4t0y3lsmyexnue2h0qem44ac 295 147.5 mmx1f4msx52tgjn7wwetqyx9e7jr63krs2ut8fx0n5ufqvp6fncfl5vswzueae 295 147.5 mmx1a6fnk3zev3ty79lwka7j5l955chv5gxzffkn92280nx0jrfqachqxhdsdn 291 145.5 mmx1mhp72cd0lfnlfpfuclh9p6uqcuu6y0cr4cx7qnk266hleawuyuxscha8vw 291 145.5 mmx18pyq9ckc7wykdz3wmxm5e85wsgwnwyxundkma5wxxmc98543z89q9amqhh 290 145 mmx1j2awdr9j4gun67tr7e02h6dq5522u7lkcu5ftvl90ajgf9kvhqusdze086 287 143.5 mmx1k9lslhl4wmhs7ray9lfh47cxkz0j5vr827vypyaltsq80697xyqss2gn93 282 141 mmx1ffrdjd4ccl6ga736hz3ran0xl8k9af5xf9ae28hqjg2fhugfdf5s4q8qr7 282 141 mmx1mcxgagq0znvmk0g7dqvfa9ewj2qwjxhysrna634prhn89nmgknksn8ufzx 281 140.5 mmx1499ujt570lt5yjmvrm7j6xqpvhlgw7kuye4lrzhfz8p724fp4zxsx66pgz 279 139.5 mmx17vr7dm99pccp240q7kr4ynw0tln4r6h9n34vc9dcdk7gch3dcqgscgaw0w 278 139 mmx1tpu0645t2k88g5zpjyum5zdus8luwpgwl00jr8v7074h2nmen5nqalkdaj 277 138.5 mmx128j2zgejfdmut0z3559gzw0vntm6rz2fcmhvppcgkyn9kvuekmzqkhk8hh 273 136.5 mmx1ay2su27wuxjye9f9njdj0e7jjgxs4gah9p53upmrt4rwtv6afuhsw6awcq 269 134.5 mmx1evudswfffa6pru342f5hkduqhmmalx3c94clvyed63ht0dkn2edq3shffh 268 134 mmx1elqhr769rul729fampn6u3ylcxfprr6zgvvndppkzkzzmaefk6csr0s5e2 262 131 mmx1fgxwy76pzglmqdqxuvv3l258233900kkke3p0mf0gaztjwmxq2lslppuqh 259 129.5 mmx1mk6v9wmyju7spyncrggntg4lm62g0ensg76yjgjhdtnmpls3nr2sd9qwqp 258 129 mmx1d4580utep9epx933mp6666886cect39qt9dl30qwxj767fkxpfgq9h6y3l 255 127.5 mmx1kky0cu2dauntftsk8a55rdche6kuhm227qt2ktfsyrhvu7v4yteq8rg4d3 255 127.5 mmx1kvczf9d27064yfd7kpha95ehrvem875khnq3zadd3zjyxu78ly6s2vwwp2 254 127 mmx1glx7a9c25wns42k936r3qczu0egjtlshkaxgv5atxpyyj2dkd6rqklrnhh 253 126.5 mmx1h9p0lv7at2ahtulugvg9vdh5nkjph2uvg93uz5azp8hmmuyaj50s8ky6v6 253 126.5 mmx19398nqhvlk3t79afq0csx9lyg6j0utftw3862295ue4h4tjgzvvsjt3pcs 246 123 mmx1tagjkz3avdgz8a5kn8kkhs3lr9lur0fmdt9zuz49h9j9vcg80v9scl8fpc 232 116 mmx1tfn2vhdwrfuemr5dspc53qrhh2qek4amsq38j5d0a6sj73fdyrmsnvjrqx 229 114.5 mmx1ccgy2ru9jn5a7d67w09zrgsxgv5hfxrkzdcv56dlpcraa7tkrtkqsrah8a 227 113.5 mmx1lauskl8kzuwevqyx2ky8ale95esy87swemetk0zhc73ctrdm5c0sxy3exa 223 111.5 mmx19ud3ev0q0tcrpsmh05tggwt4n2nkwrzrrtuwtyv0pl2t3t9w52ysy954ch 220 110 mmx1ynae9xlz4m0ec99702l48stft3m4kvwwz5zx60zwexhnpyhp8srsxam40c 219 109.5 mmx122x5elltrsykqwy27q4jpe405m5d6aaxtfte87mjl6zty5e5ju2q9ucfz8 216 108 mmx1arwca695tyd8rsgxx8r707xpe3laawcv3lq593hs4qz9zehlngvsz68wh7 214 107 mmx1r5e7qrk323nmr3jhazwr3adu4v8n8dfrh3wvmx38ptmhv7wq23cstwl09v 214 107 mmx18vfpqpqwtt7htk5dwgd4lwdnyym659skm9ppf0sadkp5400w50tsxysqv3 213 106.5 mmx1hd5c7v7542hzr9j3ac3zx29d4eglxyq8c38nrqvuzdsjn206837qehjl0m 210 105 mmx12n7hafkn4tfwk8jta677lw48092lezrx8vgwn4t7ulsweeg6xftse7e5s9 207 103.5 mmx1gw4n8htnqwhunjyypmcheushazv597xama2tx9pjf8zrsdq943wq8luz82 206 103 mmx1cgx3ck3dmznw8xg78jc9xfcf7rws0yrkhpj5tymnc25dteduu35sd6p92j 205 102.5 mmx1fr77kwzjzcv3xmrhczs5wwsmxlufp9kkvndch9d78fr3m09mqgysc6lnaa 205 102.5 mmx1l52feg8wshacztsyf6f77ndq44qp87tdwns9wdlxv3t4uej08fssuuwng7 204 102 mmx1lntqvyetpdaqzkw4f9hqhuh8kkf3f7u3rl96gxz3lgztfptfaevqk8elws 204 102 mmx1re7sxpa7fmpseg8phu4pqamqmg72qmm3e7fzx880lz79dnyltpgsga39eg 202 101 mmx1rfkx4gam8z02m09k5am29u2nyn62wlc22f0fapkqra6ckxspnn7qa0d336 201 100.5 mmx1ahckwehmp72cr9rkuk3sek6zv6ay0c28tt7fkrhy5qgdpe06t79qvrjsns 200 100 mmx1qj5zysw5wc0qhwljrkgkvskmfsempcr8hf9zd2m9xw5dkger59eqf75dpg 197 98.5 mmx1e3rafs5jhzf03a8wxwp43kcguxr98eq3azy5lvatwayvezqfyrcqeumth7 196 98 mmx1u59mc3s94cezun5apvw35vj2vnzfanjv45svwfdat84wpuefcs7qzns66s 195 97.5 mmx1r8mm9d0q88dr7dw0v94yl0cthpr560r30x90zxcutltxcck6xq2sm3yx2k 188 94 mmx1m2qrqthgwr3x7cyhf7fc97t00yszfvet9jy6x0chtqq65ycyxkqs4pmxfm 187 93.5 mmx1tgde3wpspejv0gq70lqe54l93n4mrdmrp3xt3ts4q96keddyrfjqe0e0t2 184 92 mmx1rn0p87m57fzv5je8wu97aegkhejf7r5gz3clr4ajs0k42p4g57pqwh85wl 178 89 mmx1yqycann5zs9eupjsea76ahp5h2h0d52n6hqxvd0v3whezr0wre4s3zku4g 176 88 mmx1vprl39d98qzd3u5nk95qnhus9vjp4sen2w7y59yu0m5udqll6szquzr6y5 176 88 mmx1csleu9q374crgsm06k0xq2n0vdcufm34ahz3lww7kmyt7ukj38aq3ta9sv 175 87.5 mmx1zp7rs0q0dqthcwdfvpaugv6px5qylq9uvwltvq4gpepdqyk9299qhvd3tr 173 86.5 mmx1lan9judvg8w56k94gequv9k6rmzr8kwmq0fk0vh2k69muzjpauhsszypcq 172 86 mmx1fgylxyf2ef9p5zj0d6hnz6wr7wmkgukq6zt398uk3j78nhxfu2kq05qm4a 172 86 mmx1py700x95hshs4cuzccjshmt0eaen0psw2kmhpv0tmy7lag9wdh6q58puuy 169 84.5 mmx1sg8mgch2566d2uncn3lew5wwwacp2femp63y4gshj0qpy9fehjqsysa3ng 167 83.5 mmx1ckrmrs93ya5xud2lskwvn3z8t285awqcl4vx5v6zgyphat5eultqs6ds4l 162 81 mmx13j75773f8tfepkdjtcrpmv3djm4y7htcl2waq6spxkgtxs4yss3qfukrk6 160 80 mmx1c4sffu66s9eepqph3kfjarh4fp5h5dhl3u0r8jvrqlq4jkdp3sgq4dcav7 160 80 mmx1jxl5gaxtd8wnc6r9nxmf5s748ct827cpjafdefw8rgen75lyxxws4u8a45 160 80 mmx1a7mtekvyzh5f0uswz0pzqq6lys66ta9eavjyk66w4kgrseej6p7q5savlp 159 79.5 mmx1c2jrdpa796438jzxxjw3y68tepmlzqv3e4a28d6t52juznprsm7qpwc0fj 157 78.5 mmx18jk3gsj6r4y3esc22r0qvxru79ues6z7keha33ahn5tgahxzcknq48ler4 154 77 mmx1uth7wfnyvzfy8nf56u6t5xhf085l870ytdjazm4g6ja7qmn6w9vqljj34x 154 77 mmx1drhuec6ts2hz9qf8jjxmpan7zlung5anurrpxnvjkmqy87vvuh5seglsha 153 76.5 mmx1p898m68n456q533nfjd5sa28akadyqy3dvq6tywk3jxgy7chrrwqeh70e3 153 76.5 mmx1p22ucfvur2su5mg5l3h0n62saywradp6fv8q3lecajpxkuxxz2wqyjxvch 150 75 mmx1ksduhw2jnwayh3a62cnhmxf7vax5lult55kj09ejvqgrr7gy726qkp57w7 150 75 mmx165nssm0dfafy22f5fgr8ln543g7gjgwrmxmdj5w5arjwma2k6kgq700fu7 141 70.5 mmx1mvlerkhjtrg0qapvxgduxnw0ucm33pjcv6jutkhf82ampzhaewaq7ym4vt 140 70 mmx1qg6du0mef5nz96gz7wa6f0ndmdhqnen0knwz3kw5ytf4kl9f89eq2kmrsw 139 69.5 mmx1d8s9yjjn824xg86x5wwhvn7nnwqe7wnvdn28t64cmtp62avpvtxs9ycy60 138 69 mmx1uw2mjnw6zt8t0r2w0afqu3zw7jkjl80xjwnfgk6cx7m2c9u5052q6m24l3 137 68.5 mmx1hsgvhawn7nz3xz6dqeu852yrnpdygf3hhahq0hydnxw25g8057qsp76xwk 137 68.5 mmx1g6t97kcskgvun5lzk53laaahzr6tahuzgg22uyukfda5wupemz0sv5vejn 136 68 mmx1l5hsvt7g2pydzauqhm77g4h8es27ffagmpseuks5tm3tn04n6nyslcafqj 134 67 mmx1yknhrstjc5uslrg7zequ278dk3j42s7ylfw5frvgjdsjzm3jxwcqu768zc 133 66.5 mmx164hdypm0mgekpt743z7xu7vtm5w80hysnvgld66zr54gvhcwm8aqrsk22s 128 64 mmx13l7yln6mennhvfx9celf99enpdgtfe7qs8dmr4nfr06prcfmz0eqsda2ae 127 63.5 mmx1hfhn035wpjnm6yhl223rh55e85a23ksp679ku6kpk2n7klxxaecq4xw57p 127 63.5 mmx1gxz9mgd2z0v6sr4luvnhw2u5qandh7yvl7rpxcz0d06rdfa7s9js6w6p73 121 60.5 mmx1atwce5d7s6pn27censfqkrc4qtqkh8a8ufzylnqakngeg7elutyqs7yqek 120 60 mmx1mrmnxtc9vwjkgfst6z999x42wfuwl0ywnwn0rgyvypj6660l093s6htasn 119 59.5 mmx1er9czf5xeu2wnpjeg69hhttxppwkpt0hmazpclhgjha0nad6kyvqeus2pv 118 59 mmx1n0a3t40vv5kdgfnduj82kzw9ewy3tu5utszgxhkztdvqlu8xgdks8nyh2h 116 58 mmx1zx8z2zkc0hvn9cpnjctcc8akqxf0e2au70dd3uln96hz6uxw7c6s6s7s88 115 57.5 mmx1n39pyuyq8slux6rcrvpyfqr554tcytn7nfrmwjetkkryeww59fxsf8qvm3 115 57.5 mmx1chmqhg48plemff47t5hrc50p7sk809q337uvwn6385cdl8y8a2jskzzcwc 113 56.5 mmx1au96n6nrcskxc7wqedekzfmef69jrx8vlws79ypnnhuhc9hgk4hs96y2s4 112 56 mmx1ll2yar6vrsv84f5qdwfvh8tv80qlmkxdlr4ddqpmpzncqrgjghjs8s573z 111 55.5 mmx1yht9eg80753876sq3qjljn7nwxl300g70rauqran8qkvdtrtqzvqxkdxq0 110 55 mmx1gz8zq3caexftrf8f03l9pg694s4zy4t0cacz5mq0h7u7ge86yt7qjlumup 110 55 mmx10qnnual5h4rxxcmjh8ts39l28azqwjqlfz0u0gjeruntvs0zpqus0fl0u9 108 54 mmx1tcwemyrrzd62wrh8ff3kn4z3hr0dts2waxpxwfpwg2jau2tz0d5s0e3kme 106 53 mmx1qxr2rcnvgcwvs3304d8rlm8kzcg3cdrfdnrp0vq3t6eku4g55xtqw8kd9w 105 52.5 mmx15w4ytftzunx9ues8qhk3z8wmrmtgcg5n88axzk3c8qwtzr3n8cts3hnhj2 102 51 mmx1g4f72rl89zhnxw5qg5fkc64slmmrd8cfakpa4w3xlxpt62s3gdeqhs05d5 101 50.5 mmx1rz67uawsu0vhh8zx7ezvpy4d8jhtyjt4g4au39sf4qft4sguwx4sl7kjfx 100 50 mmx1q5kdfkldkc735p5e7aj6y5y0szvhml9nchux98cfqfun4wa74vxsm3zr8c 99 49.5 mmx139le573u5rq3g7a4adydjznp86en3u5wznrlywq5k0jy0s49fvwspq0w5k 95 47.5 mmx1haurf6xpzc0aj833h7tq0382s3qpp5a698kh9ysu4j99azma9t5seuhzdh 93 46.5 mmx1xj8utkqx9a2m3wgt4pe95z4jh54xgsl5gtdfwxqfcg823stkplus3fv5r9 88 44 mmx1q8uqnnncy4jylne7m098x4lnwrf34f400cn63px5jayj5eddhcqs3nuyd8 88 44 mmx1md60nlasdkf7uu52lw7gmpvs07jepacq7u6spajhaj5prgn7vnvsecqcfy 87 43.5 mmx1f2jdndglt2mvq37tc3wp8gtf3l3uql0sn485x80096m59y0ydl6q90ds4p 85 42.5 mmx1tq8ewkuuc9sr8a34eml065d45atwfq2fv5r738927rx9cqzv9mvql6x3xy 84 42 mmx1h7fr39agpsasxptf6tflwaqscczaes5ep99v0qqe84sntdh0ew9sumnljk 83 41.5 mmx1u802gcgzhfkkggcq5l7388xz2fn9hswy7zvh74t5c7yvu9x3r7xq4d9r05 78 39 mmx1edsqjgugd0hqynwa9h0gm05vsmqpse9yhwr85eftrxyu6ww0la3qf9hspx 77 38.5 mmx1qdsec387taxe2aw5j50sjp8qh2eq85deqxa84wmhkvywncvuvkqsygpay7 77 38.5 mmx1swqkluvn7gggzn48wa4k22c8edp8wdnrhnhv0c52jk569m5chprq6nefvu 77 38.5 mmx1kn0k496puu64hyutyn6augc2cj52rc4p0vmmfcceqezp2y5kfv0s6ddymx 77 38.5 mmx1zqrr5qw2akhgvvxnfvl3epw5zxjy8j3930fed2agnexxjelrhy9qdrrh37 76 38 mmx18gszx83xlhzj3s533m62pazj3c7v08rgu4t8sh0vs9c2leg3ldcsfgkc3y 76 38 mmx1lhqhhwzvn5y7kmgeenjx9k76pq4nnmqg4hffvar8tkns7qpu6z0qwatcyn 74 37 mmx1u2v2uf8seke36nxtxh90hpgh43dy5py836ygkvqwaqx5jhck95ysjepx8g 73 36.5 mmx1lnh2du3xrhsjlu2dst8z78x285m5zct9p3c959uldvqpv6km8dusz05n7t 71 35.5 mmx155as8zcs0l2lxqkehgq84lk9utwh8k7xalx7khmh0lt9yvszkrasrgyt0f 70 35 mmx1j7njmgtzmqr49n9lyacawww0uv2sjgxs7d04xu2ns6k62hfqycqsh33u92 69 34.5 mmx1g5q667lmyzaclvskxhs3dp533pv5g3uvqu60v8n9ckdcgjm4e7xqe694xs 67 33.5 mmx1255zy749m3fss4azm0ggj304y6l5uswd2d0rm0hgdgwts9dlfygsgnzfds 67 33.5 mmx1x225z4p73e847du0g5k63tgfj3c3zn03z2rr2zqnm6fs72n03k5qrafd09 67 33.5 mmx1kevvjxgq5hn9kzlds67gt773fsytmpv9vc4cmqnxlcqnv3ftm4zqm9y9rs 66 33 mmx19fmsw5j977kh3nexv48lr0neeyese2pl0g8vgjp429d8hfurtf3s3k5ps2 66 33 mmx1l0a7tg0ux27g2lgwq5vyj0dlsuzcxgl7z7vrxeed59glajvd8f3sk5nvhg 63 31.5 mmx1humz3m6yfc5rrf9zczyjkptr7snre4e9slypuwhhgsn9eh952yds80u466 62 31 mmx1k5zj5jew2s2rs5w7dqfzmm2uwv3xavastvkdd06f2fd2x3e676vs8v8rwt 62 31 mmx1rx03nd8ttf02y3qz69s9xlxqhrhxtk3a5x8lnkxl3s02au2nkqes8dv836 61 30.5 mmx1jj4r3za249xxcyp30jjyen8nz6kmtldqpypwuqhukzrp6trme30qsvdfxk 60 30 mmx1x6j2m793ten9em7pu09q8qca794vrvrdc3jcw4yzc8zup0zrh45q8d2lqx 59 29.5 mmx1rsjam2cenutaew3r3ssfc8zfh2uy2y3ycawafk0y4hq49djayemqnelh4z 59 29.5 mmx1pfyewvtg6l24q40kx74cm2t9epm9wqwx27rph2l8uehnpzhrlqqqupy35q 58 29 mmx1e8xldlayy2j5ptk9grrze76e5jyc8p0uq0zuslawyhqeu7xme5rsh06fw0 58 29 mmx105ezm538jqpj859u3ygggr9umm9nrfxrgjd20mp8j3g22yvev4tqcljpj9 57 28.5 mmx1kn9t8m4uxn7xpqpdy34xhxrdkuzs5tuhjqyc8qxw69decxqgtcns9yq940 57 28.5 mmx1z8wnphkp2d50k2kk3f30eyxtp8h69e3pazzawvwtseuuerld339q904jsc 57 28.5 mmx1tsgysdg9v234m6nftjx4fse4a9f6c55ck2vstd5hau6kkrzzfhpqc9wkha 57 28.5 mmx1t4q59k0tu50ldpdklks90yrmtdyacw0v826aql4n4dkdvxzprets9vvt2m 47 23.5 mmx130vvjzlqpd3dx33j5dvvcwxd2ry8vtx2xstahwpmshpwekq953kqh5r9rv 47 23.5 mmx1eghncmcx5lurhs30meac277fx0qrkeugexm75ku3jwfeejhcpajsyx5wqu 47 23.5 mmx1ujuywt50nv9jgt4tsu32mcgurtlu9zfvjutuvjk00d5k8peagwwq44fmqv 46 23 mmx1vsav2xvgz8p56c0tj2lel0jew2u5v7r8mun2nm4tgu445w50vg8qx6p8yg 46 23 mmx1mcsgnk9wd5wgausw8se9d50gv2m0dk0x8gg658xy76cnuegl850sklk8p9 45 22.5 mmx1c68tgygju8yrhf4samf9mdc9rstzqe34kcz2zqnyqjxcraejlgpsq6jutc 45 22.5 mmx1mq9w9vnuae4fdmn27ceh3h9wzaygmhf0c3sqa7xufy7x0l87zwwsdfm80k 44 22 mmx1gqsyr45tlv0t2ct76wqpxtd0asjjq5df8etlhdva8wfvt8facy7stqeq6c 42 21 mmx1wepa6m7j62en6tzc75h446sle2s9zpvllv3557t47q9zyr9y52ssu7j49x 41 20.5 mmx189rrmskkykntwceazrltap8a2at40wdhv4wvjtqc2xk8d85ttdqsu5l54m 41 20.5 mmx1r74wdy7kzh2dfdcumhc85tuherczlt8c4dsqdl03ufyg2lfa4frs2qmwlp 40 20 mmx1m3tug5239zp7zst4qu7c7cns8f8dvel9lnjek23v2zd3ed9mmf2qzgpa9f 40 20 mmx1can6xxmz54lhtrm53udpehkn6k6qspudttf9pdpg9evccj9hmhaqufdqfs 38 19 mmx1jua0qs5fjp8xmz54xv2wxxlzg9ywxzmzvwn5w3r30eyg89dwjnashzjy8q 38 19 mmx1pangjagnfffhfwpk265ry6a3zch4rs2kgp2rup7pwtuphgmsls5sj55j2h 36 18 mmx1450fn44pv09yuetx3yp9vtvx5k3amv89vycq0f0dvugcvp6zedlqsw05p7 36 18 mmx1x7py0zl3zdvtlrz978thjuzyqw7azyfu5264u4l8a9e287rc5juqekjvf2 36 18 mmx1ze8ugap6cs90ec5tguyd9hg9g2xv7fyrz6s78ewzlsk7uwn3pvas3dnmt3 35 17.5 mmx1nmya0r2ytqy66sqs3kxctpyd6sqcklzdqcyx038d8c2geysdmhhskph2up 35 17.5 mmx1edcr8zgueucattajc94rpsfcmyazh0zseqk4pr2vs67d49kjnn7q9en6ev 35 17.5 mmx1wefvja0djemhprqdj73np8mn3v258rx0ffyenpztrnr8tvndrrvsv9aggw 34 17 mmx10ah956exf9phe4hw9xwkn3a7m3fwxa7pmhr9cyvlq5p84f8yy4fqwkygu8 34 17 mmx1rftw5xyjw5hy7hjnurnhx2z5am5fnqxwtkhzltcu3ujxvs9f6rtqmm0kv9 34 17 mmx1nu2e8qz86kfx5yfnedyrv559d57makxk3jw57lgwsuet0v8dkp3qkmdh9p 32 16 mmx1arv4t6xudjsjpz767dlxhe6n3eyj8r808ehk6gjxftkh8r6zr77sdx5vy4 32 16 mmx1f6khu080cft3c9g5l8qwqh2wlza8473382h4gwursgl0txhdadjqn2kzv7 32 16 mmx1w5vuvkweueqvfl2mtncyexuqchje6nx27552zaz50qt7vwhw5tsqjy2s57 31 15.5 mmx12wfqpxsx0gxlrufeptynuvwt4fn9wqflp356l2sxhveshsrkrqwst4uwh3 30 15 mmx19f4u3dsn5eyrsp24r0vnun6zadmnlsqpldf5cvl9w6dtqdvenvkq4qclt2 29 14.5 mmx1c3jpfa9prd34jup0ny2yjc0n7adcwumfukjt90dfsj2262s3h5ds4fuwdh 29 14.5 mmx1zrhw7537pgw66vt6df5xxxh23f35gt85ml6s6fvc6vr2qshmdeusuufxxp 26 13 mmx1nhs4hestsaxqu42gmrj94lp8klx286q7ymp6dh2cgf6xg6nd6hlse9z9w5 25 12.5 mmx13ech6m45gf3ludnt3e3az7jf68qntxg2htk492zuewh40q3yqwjqv6jsej 24 12 mmx1kx9uarw6ld7w9nmxytejkzs8q6r5376cqmtlxcd78pf889fwfqwqn6pk5f 22 11 mmx1q24h2qhg6ju6cn8r26fh85cv36mmen8ztn2ans7w9aln36p6d5kqegu4na 22 11 mmx1qneuv0d6qzv8zgchxzzcmx2w5k42j4wah6k8psw5fcgw48707drsf6nvxm 22 11 mmx1de0udjakexj8n4548lm5vy8p69geex988ch6gqjpfvmdds5mquss2xt7jy 21 10.5 mmx1d8h78has80qk0hv5zxfkx5jlpj5689zht8xlqq30xjhx3y9ezhtqcpw8zu 20 10 mmx1a2ak375lfskc6xrf6mmmc89eu3s46ywap2j7d4aj5eyeelctqy6ssshgzj 19 9.5 mmx1lpm0wnvfr4l07wgvfhhgzfgy7ur5jf5g3h024gln5ykml60nr8us9wc7tg 17 8.5 mmx1gcrf27d3pmwese0hl4ewnm7xjcwfqm9e789mrax8lyqq86xtz5tqrql96z 17 8.5 mmx1cdahyf0uv3mfk9qfpjk3q8vwrfqap5xgmg9wckkp5rlt3agn5hlqwhh3px 17 8.5 mmx1l74cdd9j6jelh0pw9l96t6vm43zyqp8tdeelcywg09ezac7uwdhsmvnq4y 16 8 mmx1advv0qlzm5l7whwluwdfspmqzwd2k3ra8rgqqvuj0m5hzy5taneqqy7hww 16 8 mmx1xcfx8dstn3hg0wwfdh7lcmnm2gu6x95m849jay7ruzpyw593jpzs800vee 16 8 mmx1l6yphrjzvuc0tefqug5zs9eh3gu4fupq6e8ncgsr6mrek2xvvwvsf72r4d 15 7.5 mmx1wsnset02rd5ksettxhpf2uzw02jszrgtc5960v002c3cwdg254nqekqjen 14 7 mmx1hny6mwxqqlfktwzkwq3u6l0d08gafd5eq6xwsjxnv7sp58zm8h9skzn58w 14 7 mmx12rg768ddyzng9npvlvd6qk4pnu8xy9tjjky6udnvwhv378v0ljcq44me5a 13 6.5 mmx1rd8z3x6ncsk5734u3xjkqskzxq8tlcn00866309kwqc993j4xnyqhs0r3s 13 6.5 mmx19wqxw4stpk67hge9epj0wmgt59r7w5fepxwxegf6tqrj4adk8emsz9zdlq 13 6.5 mmx16vc774xgs3d0ce37fsc6ykjd9elnxxq8gaep2jtcwn6endwck4csz6fz0z 12 6 mmx1kzfexe6m93ggzewpf7xtd6jx9g9n2k3p9n0em8zhug623tx22d2qdzqnq6 11 5.5 mmx1cjqcmqm597re656z5w5jq99f7fvyth7wvhz3v4u9xvyxxyjyv5esl8yqfh 11 5.5 mmx1agcww5z2v6ctey3elyhmc2ehfpde3n9hzcnvh9s3fslrlv004rns02462z 11 5.5 mmx19cxxrr2c4a39pyqda7zqt0dxga6ey7gc67rvlum7ecpzpagtrp2qcakr0j 11 5.5 mmx1pqayqpvzg3txl8q9cl3ul0zrt3v8zdn7u6j9vzw9gn3jlj3cfxrsgskgts 10 5 mmx10pxshsy5ajaf90jqgfz98xms2gfwmr8qh336yg8859khq47rjp0sm99hfn 10 5 mmx1nuvnyj4t3ryqzkw86grzzlx2zzvc9plmy8u8zllvey79q7c5r8qsvz234v 10 5 mmx1hsxpdkzeynjv6dswp89klcu6qc8gn0vghz54gcpa95z0m5m5p6ms64gd99 10 5 mmx1cg9kaawjp23h0kxj2ggx5s90c244wy0lsyxp0ltygwgfkzpjnxsqaevyre 9 4.5 mmx12ajhpfkhaxqzcgh0lm2zt03qm635e0wazc0u2xlhwp4vflneq2mqupf8uz 9 4.5 mmx10k4auqde486w5wyfajnmpl4ds6tv9x7tzdus85wfxk3r496cgawse6vruy 9 4.5 mmx1avctsmwaxyzw23nwat6mmxevcq3f0s3m9j4ll8x8yunszucx9n4srfjh9f 8 4 mmx14p5y3gn5fl8t5jt0twe0l68jwe9n895djrg8lkk55t5rdupggf0s8l0kd9 8 4 mmx1fv4dvhre9mmtldnr2t63qg5hdxa02hzjeh5hu7a3zkmf8a3ql8wqv4txd0 8 4 mmx1argmcrg9rau7m7xy8k4e0s3xw9j95w7upuvpt9hlpz6epj6jhrqqkrytm8 8 4 mmx1j2ej2wxexc247mxf5k90lmjcevp4r5cuuaa3ukl7ywvfq488detsgxj7jl 7 3.5 mmx1ttds5ut3j7xx72wxg8c6226ewqeyrvzydml7duym8esjwxcg3jpse245zn 7 3.5 mmx1pq2x5zfqa45sq6s3zmuuy6pen0t7ezrhmdg5q9q02re4x84rakkqlj5m99 6 3 mmx1np4pfzqpl26td6khzcfdywcsz0tz4xmyua2havtlpp452vc99yyse4wkmj 6 3 mmx1mtug0wju96l4p08r2452lnllej28stdrlpz9p7qc3vlfmj888uvq0zrzhl 6 3 mmx1trjmkvfv40ngnfmvc5uw926gw8fndanpnp7mphq2tgqwt4xdw62qmrvn3a 6 3 mmx12rc5mctewx0qv33kwemry6vvqmxgcnc6rn84ksqef9rj9z0rer7spuw6dw 6 3 mmx1vh4j6v35vxpwt9820f8uk0m3v4u6h78gyc9rr5sqrew29dfvcn6q23qgu9 6 3 mmx1tluhal45404w3qcd59uw08lwf28vq3hhmvvd9andxhjgumajl8rqk3jjd9 6 3 mmx1hmqyn4euv2pjwpp2nf3ayq9ktr77dajwuq967uet2r0xqnhj0saqqexshe 5 2.5 mmx1jz3xqle28yclk7fkk079q990tvya3vqzjrjnrf4phshvt990wt5q30rkay 5 2.5 mmx1epzfr5tjemywh43kr67esqktf43zl5z42ttzmrkgjwyh0608nm5qdxg5js 5 2.5 mmx1tytgkzrx6njx5t6j9gxms2gjv832mzzn2q67kumcft57cyj765csr34n3c 4 2 mmx12wphs5wk5nq55363secf3glve6rzkzmgqfytyq3mgk0lsun99y5s3kk77r 4 2 mmx1xn6ynt5j0dwm7yh29pmjs6dy3gytm5nllsanwtzry86czx2j30kst7a798 4 2 mmx1swf984qntzm6hrtx2695n82fsemv537ekkenwc94se0ahcxzklmsklc42d 3 1.5 mmx1egfrdtt2khy7hv77kczkxmr8xml7zg4hqlc460527ka0am669q8s2asllj 3 1.5 mmx1xc27x4s9qzcsqucjcxqzdqszlp4fjtxpuz56c2770l5yaf5e5jus84sg5f 3 1.5 mmx1vmxgy2uzfh8z0t99p0yqgrea3f97grmh33shc28vtvg2lkzcpygq0ls0np 2 1 mmx12gjuxcdsh7ppxmc0632zwlegm9wldzy9zp4v2skf60c9s705k35qy04laa 2 1 mmx1q9wzqs7kq8tzw2yhnq05ljar5urwratlsr2wvuwfgw40ff3vmcjqhy8rd8 2 1 mmx1ms7f97heq78lkjktgxlhs7pdzes743gafp0huda2usvns9jgv8uqpgg8d3 2 1 mmx18nu9safwcwcfmx9vzaxgx5w8vd8phra0yf2mzjxym9ewh5t5swjquvv970 2 1 mmx19xgatr5wuucmh45623z25w42h49zxyn6gcp94dkyr2zrwrm0xycs74mzx6 2 1 mmx175u4freddynpqmqp4c057dwf9ej62pv0hxh4ew6dwlyf37y5ekvs7djgrs 2 1 mmx19j967tm7fjn73tuwr03w9k6rat4j409295l5j6xrs7w65gl0v49s93mmjs 2 1 mmx1s8vpfq0d6unp2v8f4nzgxkj0zaru70ps6vael7a20w85rwljlemqmjrqlp 2 1 mmx1x23xelewc3rzca0ad25wgczhvx7m9g9529xp98qp8zd5pgs8dr4sld97r3 2 1 mmx14hgwpw5x8zdapw4j35qclc05ajf6xxuqnwxyffszupmtvjl8wtzsp8dgza 1 0.5 mmx12h72n35qjgx2qjps70hqal8zuvw26v46rc3auczg4se68878ek4q8xs9xe 1 0.5 mmx14v3lzf453lx676rj0uhvp7sph98g7hqzkr0f5g42mtkzppzf2dhqw5f8a2 1 0.5 mmx1fxfrkrq80vpzru94heh6vwt52yan8k9znxzvfjtazjk59lpptl3qgnkegx 1 0.5 mmx1d8ltq7247n2yeqlyn8yme9vck3566anrzz666d9hctughxj8j8dswjgjw9 1 0.5 mmx1d9gx5anuvxgg906tzj0rdkhyypjtrfc09ufdc7yykhp9h46mxecs2qe2r2 1 0.5 mmx13ju5ewkc4v2qgg6p5zj3t33p0eczcyfe9eggmv6ksph27px08h7sfsavr5 1 0.5 mmx1akhqtjzm3kkr9wlj8nh9kwuza6r7vm4g2nz3pcggmq9dayz7q92qncwv0a 1 0.5 mmx17jurkuy7tns92g07uf826te4azhu3qnydcs7d7snvez9xy3dh7gqa8h2hy 1 0.5 mmx1ftt6434d6y9ekacacs5hf3cxg7a3s3uqm9vjm5l893fy5epjyxtquz8hka 1 0.5 mmx1jpyqylp9zekjz9xcccz8h6gaw9f796tp9syvm43x03pxa8zf6ses6lslat 1 0.5 mmx1q5dh2ghd660523gstn5vmc2hf4w26azr3s3nedjp2wu3ae2d27hst49hpg 1 0.5 mmx18asaxgn4dcswsefcdwx54kldattux7l0yn96fvmndrpqn6adsluq3ffr8x 1 0.5 ================================================ FILE: docker-entrypoint.sh ================================================ #!/bin/bash if [ "${MMX_NETWORK_OVERRIDE}" ]; then echo "${MMX_NETWORK_OVERRIDE}" > "${MMX_HOME}NETWORK" fi source ./activate.sh config_path="${MMX_HOME}config/local/" if [[ "${MMX_ALLOW_REMOTE}" == "true" ]]; then echo true > "${config_path}allow_remote" && echo "*** Remote Access Enabled ***" elif [[ "${MMX_ALLOW_REMOTE}" == "false" ]]; then echo false > "${config_path}allow_remote" && echo "*** Remote Access Disabled ***" fi if [[ "${MMX_HARVESTER_ENABLED}" == "true" ]]; then echo true > "${config_path}harvester" && echo "*** Harvester Enabled ***" elif [[ "${MMX_HARVESTER_ENABLED}" == "false" ]]; then echo false > "${config_path}harvester" && echo "*** Harvester Disabled ***" fi if [[ "${MMX_FARMER_ENABLED}" == "true" ]]; then echo true > "${config_path}farmer" && echo "*** Farmer Enabled ***" elif [[ "${MMX_FARMER_ENABLED}" == "false" ]]; then echo false > "${config_path}farmer" && echo "*** Farmer Disabled ***" fi exec "$@" ================================================ FILE: docs/README.md ================================================ # Contributing to MMX Documentation If you would like to contribute to MMX Documentation, you can do so by following these steps: 1. Fork the repository 2. Clone *your fork* repository and cd into it 3. Create a new branch 4. Make your changes: - First cd into the `docs` directory - Run `npm install` to install dependencies (requires Node.js/npm) - Run `npm run dev` to start the local server - Make your changes in your favorite code editor 5. Commit your changes 6. Push to your fork 7. Create a pull request Clicking the `Edit page` button at the bottom of docs pages will take you to the source file for that page and prompt you to create or add to your fork of mmx-node to submit a pull request. If you want to add a new page, you can do so by creating a new `.md` or `.mdx` file in the appropriate subdirectory for the category desired. View existing files for formatting examples. Creating a new category for the sidebar can be done by creating a new directory in `src/content/docs/` and then adding that directory to the `sidebar` array in `astro.config.mjs`. See below for the basic structure of the docs, npm commands, and links to the full starlight and astro documentation. ## 🚀 Project Structure Inside of your Astro + Starlight project, you'll see the following folders and files: ``` . ├── public/ ├── src/ │ ├── assets/ │ ├── content/ │ │ ├── docs/ │ └── content.config.ts ├── astro.config.mjs ├── package.json └── tsconfig.json ``` Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. Images can be added to `src/assets/` and embedded in Markdown with a relative link. Static assets, like favicons, can be placed in the `public/` directory. ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro -- --help` | Get help using the Astro CLI | ## 👀 Want to learn more? Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). ================================================ FILE: docs/TODO.txt ================================================ - Multisig wallet support - GUI settings tabs - Swap warning for one-sided pool - unsafe_add() / unsafe_sub() / unsafe_mul() - WebAPI refactor param iterators (use get_param() + Variant::empty()) - RPC servers auto-restart with pm2 - Wallet contacts - Log file deletion - Show Gold + MMX price in GUI - Token icons in GUI - Hardware wallet support - Web Wallet - Market + Swap + TX Explorer balance formatting - Remote compute support - WAPI wallet/deposit - Verify proof first, then VDF, while limiting max VDF verify count - Hardfork2 with challenge chain hash infusion + forced infusion at certain length - WebAPI to serve WebData from chain - Add NonKYC price input - Compiler support for break + continue ================================================ FILE: docs/astro.config.mjs ================================================ // @ts-check import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; import rehypeSlug from 'rehype-slug'; import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import starlightSidebarTopics from 'starlight-sidebar-topics'; // https://astro.build/config export default defineConfig({ site: 'https://docs.mmx.network', integrations: [ starlight({ title: 'Docs', favicon: '/favicon.ico', logo: { src: './src/assets/logo_text_color_cx256x156_rectangle.png', }, components: { MarkdownContent: './src/components/MarkdownContent.astro', SocialIcons: './src/components/SocialIcons.astro', }, social: [ { icon: 'discord', label: 'Discord', href: 'https://discord.gg/BswFhNkMzY' }, { icon: 'github', label: 'GitHub', href: 'https://github.com/madMAx43v3r/mmx-node' }, { icon: 'x.com', label: 'X', href: 'https://x.com/MMX_Network_' }, ], customCss: [ './src/styles/style.css', ], lastUpdated: true, editLink: { baseUrl: 'https://github.com/madMAx43v3r/mmx-node/edit/master/docs', }, plugins: [ starlightSidebarTopics([ { label: 'Documentation', link: '/guides/getting-started', icon: 'open-book', items: [ { label: 'Guides', autogenerate: { directory: 'guides' }, }, { label: 'Software Reference', autogenerate: { directory: 'software' }, }, { label: 'Technical Reference', autogenerate: { directory: 'reference' }, }, { label: 'FAQ', autogenerate: { directory: 'faq' }, }, { label: 'Tools', items: [ { label: 'Time Calculator', link: 'tools/time-calculator/', }, ], }, ], }, { label: 'Articles', link: '/articles/general/mmx-whitepaper', icon: 'document', items: [ { label: 'General', autogenerate: { directory: 'articles/general' }, }, { label: 'Plotting', autogenerate: { directory: 'articles/plotting' }, }, { label: 'TimeLord', autogenerate: { directory: 'articles/timelord' }, }, { label: 'Wallets', autogenerate: { directory: 'articles/wallets' }, }, ], }, ]), ], }), ], markdown: { rehypePlugins: [ rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'wrap' }] ], }, }); ================================================ FILE: docs/package.json ================================================ { "name": "mmx", "type": "module", "version": "0.0.1", "scripts": { "dev": "astro dev", "start": "astro dev", "build": "astro build", "preview": "astro preview", "astro": "astro" }, "dependencies": { "@astrojs/starlight": "^0.34.3", "astro": "^5.7.13", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", "sharp": "^0.34.1", "starlight-sidebar-topics": "^0.6.0" } } ================================================ FILE: docs/public/resources/code/timelord/architecture/Intel_15th-gen_E-core/sha256_ni_rec.cpp ================================================ /* * sha256_ni_rec.cpp * * Created on: Jan 29, 2025 * Author: mad, voidxno * * NOTE: Non-official architecture edition for Intel 15th-gen E-core (for TimeLord, VDF-verify _2x still identical). */ // prerequisite: length is 32 bytes (recursive sha256) // prerequisite: length is 64 bytes, 2x 32bytes (_x2) // optimization: https://github.com/voidxno/fast-recursive-sha256 #include #include #include #if defined(__SHA__) || defined(_WIN32) #include #ifdef _WIN32 #include #endif void recursive_sha256_ni(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } alignas(64) static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // shuffle mask const __m128i SHUF_MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b,0x0405060700010203); // init values const __m128i ABEF_INIT = _mm_set_epi64x(0x6a09e667bb67ae85,0x510e527f9b05688c); const __m128i CDGH_INIT = _mm_set_epi64x(0x3c6ef372a54ff53a,0x1f83d9ab5be0cd19); // pre-calc/cache padding const __m128i HPAD0_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000080000000); const __m128i HPAD1_CACHE = _mm_set_epi64x(0x0000010000000000,0x0000000000000000); //-- pre-calc/static values const __m128i MORE0_CACHE = _mm_set_epi64x(0x5807AA985807AA98,0x550C7DC3243185BE); const __m128i MORE1_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000000000000); __m128i STATE0; __m128i STATE1; __m128i MSG; __m128i MSGTMP0; __m128i MSGTMP1; __m128i MSGTMP2; __m128i MSGTMP3; // init/shuffle hash __m128i HASH0_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[0])); __m128i HASH1_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[16])); HASH0_SAVE = _mm_shuffle_epi8(HASH0_SAVE,SHUF_MASK); HASH1_SAVE = _mm_shuffle_epi8(HASH1_SAVE,SHUF_MASK); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0 = ABEF_INIT; STATE1 = CDGH_INIT; // rounds 0-3 MSG = HASH0_SAVE; MSGTMP0 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[0]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 4-7 MSG = HASH1_SAVE; MSGTMP1 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[4]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP0 = _mm_sha256msg1_epu32(MSGTMP0,MSGTMP1); // rounds 8-11 MSG = HPAD0_CACHE; MSGTMP2 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[8]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MORE0_CACHE); MSGTMP1 = _mm_sha256msg1_epu32(MSGTMP1,MSGTMP2); // rounds 12-15 MSG = HPAD1_CACHE; MSGTMP3 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[12]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP0 = _mm_add_epi32(MSGTMP0,MORE1_CACHE); MSGTMP0 = _mm_sha256msg2_epu32(MSGTMP0,MSGTMP3); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP2 = _mm_sha256msg1_epu32(MSGTMP2,MSGTMP3); #define SHA256ROUND( \ msg, msgtmp0, msgtmp1, msgtmp2, msgtmp3, state0, state1, kvalue) \ msg = msgtmp0; \ msg = _mm_add_epi32(msg,_mm_load_si128(reinterpret_cast(kvalue))); \ state1 = _mm_sha256rnds2_epu32(state1,state0,msg); \ msgtmp1 = _mm_add_epi32(msgtmp1,_mm_alignr_epi8(msgtmp0,msgtmp3,4)); \ msgtmp1 = _mm_sha256msg2_epu32(msgtmp1,msgtmp0); \ msg = _mm_shuffle_epi32(msg,0x0E); \ state0 = _mm_sha256rnds2_epu32(state0,state1,msg); \ msgtmp3 = _mm_sha256msg1_epu32(msgtmp3,msgtmp0); //-- rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[16]); SHA256ROUND(MSG,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATE0,STATE1,&K64[20]); SHA256ROUND(MSG,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATE0,STATE1,&K64[24]); SHA256ROUND(MSG,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATE0,STATE1,&K64[28]); //-- rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[32]); SHA256ROUND(MSG,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATE0,STATE1,&K64[36]); SHA256ROUND(MSG,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATE0,STATE1,&K64[40]); SHA256ROUND(MSG,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATE0,STATE1,&K64[44]); //-- rounds 48-51 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[48]); // rounds 52-55 MSG = MSGTMP1; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[52]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP2 = _mm_add_epi32(MSGTMP2,_mm_alignr_epi8(MSGTMP1,MSGTMP0,4)); MSGTMP2 = _mm_sha256msg2_epu32(MSGTMP2,MSGTMP1); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 56-59 MSG = MSGTMP2; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[56]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP3 = _mm_add_epi32(MSGTMP3,_mm_alignr_epi8(MSGTMP2,MSGTMP1,4)); MSGTMP3 = _mm_sha256msg2_epu32(MSGTMP3,MSGTMP2); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 60-63 MSG = MSGTMP3; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[60]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // add to state STATE0 = _mm_add_epi32(STATE0,ABEF_INIT); STATE1 = _mm_add_epi32(STATE1,CDGH_INIT); // reorder hash STATE0 = _mm_shuffle_epi32(STATE0,0x1B); // FEBA STATE1 = _mm_shuffle_epi32(STATE1,0xB1); // DCHG HASH0_SAVE = _mm_blend_epi16(STATE0,STATE1,0xF0); // DCBA HASH1_SAVE = _mm_alignr_epi8(STATE1,STATE0,8); // HGFE } // shuffle/return hash HASH0_SAVE = _mm_shuffle_epi8(HASH0_SAVE,SHUF_MASK); HASH1_SAVE = _mm_shuffle_epi8(HASH1_SAVE,SHUF_MASK); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[0]),HASH0_SAVE); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[16]),HASH1_SAVE); } void recursive_sha256_ni_x2(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } alignas(64) static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // shuffle mask const __m128i SHUF_MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b,0x0405060700010203); // init values const __m128i ABEF_INIT = _mm_set_epi64x(0x6a09e667bb67ae85,0x510e527f9b05688c); const __m128i CDGH_INIT = _mm_set_epi64x(0x3c6ef372a54ff53a,0x1f83d9ab5be0cd19); // pre-calc/cache padding const __m128i HPAD0_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000080000000); const __m128i HPAD1_CACHE = _mm_set_epi64x(0x0000010000000000,0x0000000000000000); __m128i STATE0_P1; __m128i STATE1_P1; __m128i MSG_P1; __m128i MSGTMP0_P1; __m128i MSGTMP1_P1; __m128i MSGTMP2_P1; __m128i MSGTMP3_P1; __m128i STATE0_P2; __m128i STATE1_P2; __m128i MSG_P2; __m128i MSGTMP0_P2; __m128i MSGTMP1_P2; __m128i MSGTMP2_P2; __m128i MSGTMP3_P2; // init/shuffle hash __m128i HASH0_SAVE_P1 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[0])); __m128i HASH1_SAVE_P1 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[16])); __m128i HASH0_SAVE_P2 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[32])); __m128i HASH1_SAVE_P2 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[48])); HASH0_SAVE_P1 = _mm_shuffle_epi8(HASH0_SAVE_P1,SHUF_MASK); HASH1_SAVE_P1 = _mm_shuffle_epi8(HASH1_SAVE_P1,SHUF_MASK); HASH0_SAVE_P2 = _mm_shuffle_epi8(HASH0_SAVE_P2,SHUF_MASK); HASH1_SAVE_P2 = _mm_shuffle_epi8(HASH1_SAVE_P2,SHUF_MASK); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0_P1 = ABEF_INIT; STATE1_P1 = CDGH_INIT; STATE0_P2 = ABEF_INIT; STATE1_P2 = CDGH_INIT; // rounds 0-3 MSG_P1 = HASH0_SAVE_P1; MSG_P2 = HASH0_SAVE_P2; MSGTMP0_P1 = MSG_P1; MSGTMP0_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[0]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[0]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 4-7 MSG_P1 = HASH1_SAVE_P1; MSG_P2 = HASH1_SAVE_P2; MSGTMP1_P1 = MSG_P1; MSGTMP1_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[4]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[4]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP0_P1 = _mm_sha256msg1_epu32(MSGTMP0_P1,MSGTMP1_P1); MSGTMP0_P2 = _mm_sha256msg1_epu32(MSGTMP0_P2,MSGTMP1_P2); // rounds 8-11 MSG_P1 = HPAD0_CACHE; MSG_P2 = HPAD0_CACHE; MSGTMP2_P1 = MSG_P1; MSGTMP2_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[8]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[8]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP1_P1 = _mm_sha256msg1_epu32(MSGTMP1_P1,MSGTMP2_P1); MSGTMP1_P2 = _mm_sha256msg1_epu32(MSGTMP1_P2,MSGTMP2_P2); // rounds 12-15 MSG_P1 = HPAD1_CACHE; MSG_P2 = HPAD1_CACHE; MSGTMP3_P1 = MSG_P1; MSGTMP3_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[12]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[12]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP0_P1 = _mm_add_epi32(MSGTMP0_P1,_mm_alignr_epi8(MSGTMP3_P1,MSGTMP2_P1,4)); MSGTMP0_P2 = _mm_add_epi32(MSGTMP0_P2,_mm_alignr_epi8(MSGTMP3_P2,MSGTMP2_P2,4)); MSGTMP0_P1 = _mm_sha256msg2_epu32(MSGTMP0_P1,MSGTMP3_P1); MSGTMP0_P2 = _mm_sha256msg2_epu32(MSGTMP0_P2,MSGTMP3_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP2_P1 = _mm_sha256msg1_epu32(MSGTMP2_P1,MSGTMP3_P1); MSGTMP2_P2 = _mm_sha256msg1_epu32(MSGTMP2_P2,MSGTMP3_P2); #define SHA256ROUND_X2( \ msg_p1, msgtmp0_p1, msgtmp1_p1, msgtmp2_p1, msgtmp3_p1, state0_p1, state1_p1, \ msg_p2, msgtmp0_p2, msgtmp1_p2, msgtmp2_p2, msgtmp3_p2, state0_p2, state1_p2, kvalue) \ msg_p1 = msgtmp0_p1; \ msg_p2 = msgtmp0_p2; \ msg_p1 = _mm_add_epi32(msg_p1,_mm_load_si128(reinterpret_cast(kvalue))); \ msg_p2 = _mm_add_epi32(msg_p2,_mm_load_si128(reinterpret_cast(kvalue))); \ state1_p1 = _mm_sha256rnds2_epu32(state1_p1,state0_p1,msg_p1); \ state1_p2 = _mm_sha256rnds2_epu32(state1_p2,state0_p2,msg_p2); \ msgtmp1_p1 = _mm_add_epi32(msgtmp1_p1,_mm_alignr_epi8(msgtmp0_p1,msgtmp3_p1,4)); \ msgtmp1_p2 = _mm_add_epi32(msgtmp1_p2,_mm_alignr_epi8(msgtmp0_p2,msgtmp3_p2,4)); \ msgtmp1_p1 = _mm_sha256msg2_epu32(msgtmp1_p1,msgtmp0_p1); \ msgtmp1_p2 = _mm_sha256msg2_epu32(msgtmp1_p2,msgtmp0_p2); \ msg_p1 = _mm_shuffle_epi32(msg_p1,0x0E); \ msg_p2 = _mm_shuffle_epi32(msg_p2,0x0E); \ state0_p1 = _mm_sha256rnds2_epu32(state0_p1,state1_p1,msg_p1); \ state0_p2 = _mm_sha256rnds2_epu32(state0_p2,state1_p2,msg_p2); \ msgtmp3_p1 = _mm_sha256msg1_epu32(msgtmp3_p1,msgtmp0_p1); \ msgtmp3_p2 = _mm_sha256msg1_epu32(msgtmp3_p2,msgtmp0_p2); //-- rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[16]); SHA256ROUND_X2(MSG_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATE0_P2,STATE1_P2,&K64[20]); SHA256ROUND_X2(MSG_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATE0_P2,STATE1_P2,&K64[24]); SHA256ROUND_X2(MSG_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATE0_P2,STATE1_P2,&K64[28]); //-- rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[32]); SHA256ROUND_X2(MSG_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATE0_P2,STATE1_P2,&K64[36]); SHA256ROUND_X2(MSG_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATE0_P2,STATE1_P2,&K64[40]); SHA256ROUND_X2(MSG_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATE0_P2,STATE1_P2,&K64[44]); //-- rounds 48-51 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[48]); // rounds 52-55 MSG_P1 = MSGTMP1_P1; MSG_P2 = MSGTMP1_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[52]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[52]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP2_P1 = _mm_add_epi32(MSGTMP2_P1,_mm_alignr_epi8(MSGTMP1_P1,MSGTMP0_P1,4)); MSGTMP2_P2 = _mm_add_epi32(MSGTMP2_P2,_mm_alignr_epi8(MSGTMP1_P2,MSGTMP0_P2,4)); MSGTMP2_P1 = _mm_sha256msg2_epu32(MSGTMP2_P1,MSGTMP1_P1); MSGTMP2_P2 = _mm_sha256msg2_epu32(MSGTMP2_P2,MSGTMP1_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 56-59 MSG_P1 = MSGTMP2_P1; MSG_P2 = MSGTMP2_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[56]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[56]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP3_P1 = _mm_add_epi32(MSGTMP3_P1,_mm_alignr_epi8(MSGTMP2_P1,MSGTMP1_P1,4)); MSGTMP3_P2 = _mm_add_epi32(MSGTMP3_P2,_mm_alignr_epi8(MSGTMP2_P2,MSGTMP1_P2,4)); MSGTMP3_P1 = _mm_sha256msg2_epu32(MSGTMP3_P1,MSGTMP2_P1); MSGTMP3_P2 = _mm_sha256msg2_epu32(MSGTMP3_P2,MSGTMP2_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 60-63 MSG_P1 = MSGTMP3_P1; MSG_P2 = MSGTMP3_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[60]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[60]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // add to state STATE0_P1 = _mm_add_epi32(STATE0_P1,ABEF_INIT); STATE0_P2 = _mm_add_epi32(STATE0_P2,ABEF_INIT); STATE1_P1 = _mm_add_epi32(STATE1_P1,CDGH_INIT); STATE1_P2 = _mm_add_epi32(STATE1_P2,CDGH_INIT); // reorder hash STATE0_P1 = _mm_shuffle_epi32(STATE0_P1,0x1B); // FEBA STATE1_P1 = _mm_shuffle_epi32(STATE1_P1,0xB1); // DCHG STATE0_P2 = _mm_shuffle_epi32(STATE0_P2,0x1B); // FEBA STATE1_P2 = _mm_shuffle_epi32(STATE1_P2,0xB1); // DCHG HASH0_SAVE_P1 = _mm_blend_epi16(STATE0_P1,STATE1_P1,0xF0); // DCBA HASH1_SAVE_P1 = _mm_alignr_epi8(STATE1_P1,STATE0_P1,8); // HGFE HASH0_SAVE_P2 = _mm_blend_epi16(STATE0_P2,STATE1_P2,0xF0); // DCBA HASH1_SAVE_P2 = _mm_alignr_epi8(STATE1_P2,STATE0_P2,8); // HGFE } // shuffle/return hash HASH0_SAVE_P1 = _mm_shuffle_epi8(HASH0_SAVE_P1,SHUF_MASK); HASH1_SAVE_P1 = _mm_shuffle_epi8(HASH1_SAVE_P1,SHUF_MASK); HASH0_SAVE_P2 = _mm_shuffle_epi8(HASH0_SAVE_P2,SHUF_MASK); HASH1_SAVE_P2 = _mm_shuffle_epi8(HASH1_SAVE_P2,SHUF_MASK); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[0]),HASH0_SAVE_P1); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[16]),HASH1_SAVE_P1); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[32]),HASH0_SAVE_P2); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[48]),HASH1_SAVE_P2); } #else // __SHA__ void recursive_sha256_ni(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_ni() not available"); } void recursive_sha256_ni_x2(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_ni_x2() not available"); } #endif // __SHA__ ================================================ FILE: docs/public/resources/code/timelord/optimize/sample/sha256_ni_rec_sample.cpp ================================================ /* * sha256_ni_rec_sample.cpp * * Created on: Feb 17, 2025 * Author: mad, voidxno * * NOTE: Educational sample elements of static nature that can be done. Not whole file. */ // //... alignas(64) static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // shuffle mask const __m128i SHUF_MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b,0x0405060700010203); // init values const __m128i ABEF_INIT = _mm_set_epi64x(0x6a09e667bb67ae85,0x510e527f9b05688c); const __m128i CDGH_INIT = _mm_set_epi64x(0x3c6ef372a54ff53a,0x1f83d9ab5be0cd19); // pre-calc/cache padding const __m128i HPAD0_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000080000000); const __m128i HPAD1_CACHE = _mm_set_epi64x(0x0000010000000000,0x0000000000000000); //-- pre-calc/static values const __m128i MORE0_CACHE = _mm_set_epi64x(0x5807AA985807AA98,0x550C7DC3243185BE); const __m128i MORE1_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000000000000); const __m128i MORE2_CACHE = _mm_set_epi64x(0x550C7DC3243185BE,0x12835B015807AA98); const __m128i MORE3_CACHE = _mm_set_epi64x(0xC19BF2749BDC06A7,0x80DEB1FE72BE5D74); __m128i STATE0; __m128i STATE1; __m128i MSG; __m128i MSGTMP0; __m128i MSGTMP1; __m128i MSGTMP2; __m128i MSGTMP3; // init/shuffle hash __m128i HASH0_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[0])); __m128i HASH1_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[16])); HASH0_SAVE = _mm_shuffle_epi8(HASH0_SAVE,SHUF_MASK); HASH1_SAVE = _mm_shuffle_epi8(HASH1_SAVE,SHUF_MASK); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0 = ABEF_INIT; STATE1 = CDGH_INIT; // rounds 0-3 MSG = HASH0_SAVE; MSGTMP0 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[0]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 4-7 MSG = HASH1_SAVE; MSGTMP1 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[4]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP0 = _mm_sha256msg1_epu32(MSGTMP0,MSGTMP1); // rounds 8-11 MSG = HPAD0_CACHE; MSGTMP2 = MSG; /* (SAMPLE01) */ // MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[8]))); /* (SAMPLE01) */ // MSG = _mm_add_epi32(HPAD0_CACHE,_mm_load_si128(reinterpret_cast(&K64[8]))); /* (SAMPLE01) */ MSG = MORE2_CACHE; STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); /* (SAMPLE02) */ // MSG = _mm_shuffle_epi32(MSG,0x0E); /* (SAMPLE02) */ // MSG = _mm_shuffle_epi32(MORE2_CACHE,0x0E); /* (SAMPLE02) */ MSG = MORE0_CACHE; STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP1 = _mm_sha256msg1_epu32(MSGTMP1,MSGTMP2); // rounds 12-15 MSG = HPAD1_CACHE; MSGTMP3 = MSG; /* (SAMPLE03) */ // MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[12]))); /* (SAMPLE03) */ // MSG = _mm_add_epi32(HPAD1_CACHE,_mm_load_si128(reinterpret_cast(&K64[12]))); /* (SAMPLE03) */ MSG = MORE3_CACHE; STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); /* (SAMPLE04) */ // MSGTMP0 = _mm_add_epi32(MSGTMP0,_mm_alignr_epi8(MSGTMP3,MSGTMP2,4)); /* (SAMPLE04) */ // MSGTMP0 = _mm_add_epi32(MSGTMP0,_mm_alignr_epi8(HPAD1_CACHE,HPAD0_CACHE,4)); /* (SAMPLE04) */ MSGTMP0 = _mm_add_epi32(MSGTMP0,MORE1_CACHE); MSGTMP0 = _mm_sha256msg2_epu32(MSGTMP0,MSGTMP3); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); /* (SAMPLE05) */ // MSGTMP2 = _mm_sha256msg1_epu32(MSGTMP2,MSGTMP3); /* (SAMPLE05) */ // MSGTMP2 = _mm_sha256msg1_epu32(HPAD0_CACHE,HPAD1_CACHE); /* (SAMPLE05) */ MSGTMP2 = HPAD0_CACHE; //... // ================================================ FILE: docs/public/robots.txt ================================================ # Allow crawling of all content User-agent: * Disallow: Sitemap: https://docs.mmx.network/sitemap-index.xml ================================================ FILE: docs/security/checklist.txt ================================================ all fields are hashed, except signatures null pointers are handled everywhere file permissions on sensitive files are owner access only maximum size of all data structures is limited cross origin requests integer overflows on addition (amount, fee, tx cost, etc) not hashing solutions for message relay / map storage allocating too much memory during deserialize recursion limit for deserialize ================================================ FILE: docs/src/components/MMXCardGrid.astro ================================================ --- interface Props { stagger?: boolean; } const { stagger = false } = Astro.props; ---
================================================ FILE: docs/src/components/MMXLEDBars.astro ================================================
================================================ FILE: docs/src/components/MMXLinkCard.astro ================================================ --- import { Icon } from '@astrojs/starlight/components'; import { type StarlightIcon } from '@astrojs/starlight/types'; interface Props { icon: StarlightIcon; title: string; url: string; } const { icon, title, url } = Astro.props; const isHomeIcon = icon.localeCompare("home") ? false : true; ---

{ isHomeIcon ? ( ) : ( ) }

================================================ FILE: docs/src/components/MMXLinkCardT.astro ================================================ --- import { Icon } from '@astrojs/starlight/components'; import { type StarlightIcon } from '@astrojs/starlight/types'; interface Props { icon: StarlightIcon; title: string; url: string; } const { icon, title, url } = Astro.props; ---

================================================ FILE: docs/src/components/MarkdownContent.astro ================================================ --- import Default from '@astrojs/starlight/components/MarkdownContent.astro'; import { Image } from 'astro:assets'; const { id, lang, entry } = Astro.locals.starlightRoute; const isArticlePage = id.startsWith("articles/"); const isPublishDate = entry.data.articlePublished !== undefined; const isUpdateDate = entry.data.articleUpdated !== undefined; const isAuthorName = entry.data.authorName !== undefined; const isAuthorPicture = entry.data.authorPicture !== undefined; const isAuthorURL = entry.data.authorURL !== undefined; const ElementAuthorURL = isAuthorURL ? 'a' : 'div'; var checkEnoughDate = false; if(isPublishDate) checkEnoughDate = true; if(isUpdateDate) checkEnoughDate = true; const isEnoughDate = checkEnoughDate; var checkEnoughAuthor = false; if(isPublishDate) checkEnoughAuthor = true; if(isAuthorName) checkEnoughAuthor = true; const isEnoughAuthor = checkEnoughAuthor; var checkEnoughData = false; if(isEnoughDate) checkEnoughData = true; if(isEnoughAuthor) checkEnoughData = true; const isEnoughData = checkEnoughData; --- { isArticlePage ? ( { isEnoughData ? ( ) : null } ) : ( ) } ================================================ FILE: docs/src/components/SocialIcons.astro ================================================ --- import Default from '@astrojs/starlight/components/SocialIcons.astro'; --- Homepage ================================================ FILE: docs/src/content/docs/articles/general/mmx-tldr.md ================================================ --- title: MMX TLDR; description: What is the MMX blockchain ? prev: false next: false articlePublished: 2025-03-14 articleUpdated: 2025-04-19 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- What is the [MMX blockchain](https://mmx.network/) ? _“ MMX – fast, low cost, feature rich, decentralized – with tokenomics of an actual currency ”_ :::note[Note] In-depth technical, read [whitepaper](../../../articles/general/mmx-whitepaper/). Technical breakdown, read [reference](../../../reference/blockchain/). ::: ## TLDR; - A **native L1 blockchain**, truly independent and decentralized - Mainnet **launched** 17jan2025 - Designed as a real stable currency, cryptos original goal - **500 TPS**, 10 sec block time, consistent - **Written from scratch** by [Max](https://github.com/madMAx43v3r), in high performance C++ code - Easily handle 1000 TPS in future - Nodes on regular home hardware and internet connections - Security by **Proof of Space and Time** (**PoST**) - **More energy efficient** than Proof of Work (PoW) - **More decentralized** than Proof of Stake (PoS) - High-power once, low-power decentralized thereafter - **Feature rich** compatible **L1 on-chain logic** - Enhancing proven logic, and creating new - High-level VM for Smart Contracts - Smart Contract offer trading, fixed price, OTC - Liquidity pool swap trading, AMM, multi-fee tiers - Native token support, MMX one of them - Account model ECDSA signatures, seamless integration - **Feature rich** node: - Built-in Block Explorer, Wallet, Market, Swap, RPC, and more ## Compare Native L1 blockchain logic, without any L2 scaling. | | MMX | Bitcoin | Ethereum | Chia | | :--- | :--- | :--- | :--- | :--- | | Consensus | [PoST](## "Proof of Space and Time") | [PoW](## "Proof of Work") | [PoS](## "Proof of Stake") | [PoST](## "Proof of Space and Time") | | [TPS](## "Transactions per Second, real simplest-TX capacity, ignoring TX-fees") (capacity) _[1]_ | 500 _[(i)](## "250M cost limit / 50K cost simplest-TX / blocktime = ~500")_ | 12 _[(i)](## "1 MB / 140 bytes SegWit-TX / blocktime = ~12")_ | 119 _[(i)](## "30M gas limit / 21K gas simplest-TX / blocktime = ~119")_ | 35 _[(i)](## "Documented as 20-40 TPS, real-life stress tests at 35 = ~35")_ | | [Blocktime/TX](## "Average time it takes to create a new block with TX-es") (average) _[1]_ | ~10 sec _[(i)](## "Blocktime 10 sec, ~2% non-TX blocks, average TX blocktime = ~10 sec")_ | ~600 sec _[(i)](## "Average blocktime statistics = ~600 sec (~10 min)")_ | ~12 sec _[(i)](## "Average blocktime statistics = ~12 sec")_ | ~56 sec _[(i)](## "Blocktime 18.75 sec, 2/3 non-TX blocks, average TX blocktime = ~56 sec")_ | | Smart Contracts (VM) | Yes | No | Yes | Yes | | Feature Rich (L1) | Yes | No | Basic | Yes | _[1] Look [footnotes](#footnotes) for more details._ Decentralization, or not: - **Ethereum**: Less decentralized. Staking concentrated, staking requirement for validators. - **XRP**: Not truly decentralized. Centralized approved validators, token distribution. - **Solana**: Not truly decentralized. Staking concentrated, token distribution, validator requirements. If needed, **MMX** is a solid foundation for any L2 solution. ## History - **Jan2025**: Mainnet live 17jan2025, **MMX** - **Oct2022**: Testnets 8-12, first incentivized - **Nov2021**: Testnets 1-7, development [started](https://github.com/madMAx43v3r/mmx-node/commits/master/?since=2021-11-25&until=2021-11-25), **by** [**Max**](https://github.com/madMAx43v3r) ## Tokenomics - Detailed info in [whitepaper](../../../articles/general/mmx-whitepaper/) - No pre-mine, no pre-farm, public incentivized testnets - Transparently written on mainnet genesis, [records](https://github.com/madMAx43v3r/mmx-node/tree/master/data) on GitHub - Majority to farmers, +99%, not developers, with <1% of netspace ## Resources - [Homepage](https://mmx.network/) - [Documentation](https://docs.mmx.network/) - [GitHub](https://github.com/madMAx43v3r/mmx-node) - [Explorer](https://explore.mmx.network/) - [X Feed](https://x.com/MMX_Network_) - [Discord](https://discord.gg/BswFhNkMzY) - [MMXplorer](https://mmxplorer.com/) ## Footnotes
TPS (capacity) \ **Premise**: Capacity of blockchain in Transactions per Second, with real simplest-TX size, ignoring TX-fees. - **MMX**: `250M cost limit / 50K cost simplest-TX / blocktime` = `~500`\ Node coded extremely performant in C++ to handle all aspects of blockchain logic on regular home hardware. Real-life stress tests, on regular user nodes, have handled 2000 TX-es (200 TPS) per block without problems. Block parameters at that time limited it to 2000 TX-es. Now set to potentially 5000 TX-es (500 TPS). Locally node will be able to handle it, and can easily scale to 10000 TX-es (1000 TPS) in future.\ Bottleneck is bandwidth of home internet connections, and latency of internet in general. A limitation MMX works the most out of, while still being truly decentralized. We know 200 TPS works, with 500 TPS potential. Future home internet improvements could raise that number (1000 TPS). All on-chain L1, before any L2 scaling. - **Bitcoin**: `1 MB / 140 bytes SegWit-TX / blocktime` = `~12`\ Bitcoin is usually referenced with a maximum TPS around 7. Could increase if community had agreed on several design improvements. As of now, with current SegWit-TX structure. Potentially 12 TPS with only SegWit-TX in block. - **Ethereum**: `30M gas limit / 21K gas simplest-TX / blocktime` = `~119`\ Ethereum is usually listed with anything from 15-50 maximum TPS. Real-life statistics have it working at an average of 15 TPS, with variable complexity of TX-es. The calculation of 119 TPS might not look very realistic. But we are talking capacity potential, ignoring TX-fees. Filling a block with about 1428 simplest-TX, results in a potential TPS of 119. If the blockchain logic and nodes are optimized enough to handle such a scenario, unknown. - **Chia**: `Documented as 20-40 TPS, real-life stress tests at 35` = `~35`\ Not easy to get hard numbers to calculate Chia's maximum TPS potential. It is documented to be in the 20-40 range. A real-life stress test, with simplest-TX-es, have given about 35 TPS. :::note[Note] An 100% apples to apples comparison is not possible without overly complicating it. Each blockchain has unique properties, real-life behavior, and limitations. This is an attempt to estimate a realistic capacity potential. As fair as possible, in a simple table. :::
Blocktime/TX (average) \ **Premise**: Average time it takes to create a new block with TX-es, given frequency of non-TX blocks. - **MMX**: `Blocktime 10 sec, ~2% non-TX blocks, average TX blocktime` = `~10 sec` - **Bitcoin**: `Average blocktime statistics` = `~600 sec` (`~10 min`) - **Ethereum**: `Average blocktime statistics` = `~12 sec` - **Chia**: `Blocktime 18.75 sec, 2/3 non-TX blocks, average TX blocktime` = `~56 sec`
================================================ FILE: docs/src/content/docs/articles/general/mmx-whitepaper.mdx ================================================ --- title: Whitepaper, MMX description: Whitepaper for the MMX Blockchain & Currency prev: false next: false articlePublished: 2025-01-11 articleUpdated: 2025-01-29 authorName: madMAx43v3r authorPicture: https://avatars.githubusercontent.com/u/951738?s=200 authorURL: https://github.com/madMAx43v3r --- import { LinkButton } from '@astrojs/starlight/components'; Whitepaper for the MMX Blockchain & Currency. Download PDF :::note[Note] Technical breakdown, read [reference](../../../reference/blockchain/). Light introduction, read [article](../../../articles/general/mmx-tldr/). :::
================================================ FILE: docs/src/content/docs/articles/plotting/plot-format.md ================================================ --- title: Plot format description: Plot format for MMX (mainnet), introduced with testnet11 prev: false next: false articlePublished: 2024-04-06 articleUpdated: 2025-01-30 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- Plot format, MMX. :::note[Important] My own understanding, reading comments when mainnet plot format was rolled out with testnet11. Still relevant info, as an introduction. Reference official information if unsure. ::: ## TLDR; - Plot format for MMX (mainnet), introduced with testnet11 - **Resistant against compression** - Two types, HDD and SSD-plots (min k29, max k32, [plot size](../../../articles/plotting/plot-size/)): | | `k29` | `k30` | `k31` | `k32` | | :--- | :--- | :--- | :--- | :--- | | `hdd` | 36.4 GiB | 75.2 GiB | 155.3 GiB | 320.4 GiB | | `sdd` | 14.7 GiB | 30.3 GiB | 62.3 GiB | 128.4 GiB | - SSD-plots have missing data, smaller, but require high disk IOPS - Plotting: GPU required, full RAM, partial RAM, disk mode - Plotting: Any old 4GB VRAM (Pascal), `k32` needs 6GB VRAM - Farming: CPU only (plots), GPU not supported (not worth it) - Farming: Still iGPU/GPU recommended for VDF-verify (CPU possible) - Compression: Still supported, practically not worth it (1-4%, C1-C15) - Bonus: Open source mmx-node builds (GPU plotter too) ## Compression ### Previously Plot compression is not really traditional compression. It is information left out of plot file, reducing its size. Reconstructed on-the-fly when farming. Data in plot files are several nested tables that takes a certain amount of time to create (plotting). If passing plot filter, this data is used to create potential proofs. That again could be the winning proof for a block. Previously plot files where cleverly reworked to smaller sizes, with missing information. When farming, that information was reconstructed on-the-fly when needed. Branded as plot compression. ### Today Testnet11 introduced a new plot format that are orders of magnitude more resistant to these kind of compression techniques. Reworked by Max to make it practically worthless. Not possible to be 100% compression resistant. It's math. But reworked algorithms, required proof time, limits it greatly. As a principle, compression is still an option. The higher compression chosen (C1-C15), longer plot times, more CPU compute when farming. Gaining **only 1-4% compression, compared to +200% with other Proof of Space**. HDD-plots have C0-C4 as recommended compression (1%). Still easily processed by CPU when farming. Going further up, too much load/time on CPU. ## SSD-plots SSD-plots are a type of pre-compressed plots, missing hashes. Reconstructed on-the-fly when farming, but requires very high disk IOPS. Storing them on HDD will not work, not enough IOPS on spinning platters. Goal is to balance cost/reward potential between SSD and HDD storage (2.5x SSD advantage, but more expensive media). Basically: Given **identical k-size, SSD-plots has same effective space on network as HDD-plots**. Takes less space to store (**2.5x advantage**), but more expensive media (SSD). Given the high IOPS for SSD-plots, recommended to use C0 for compression (0%). ## Plotting **RAM requirements** for plotter, in [memory GB](https://en.wikipedia.org/wiki/Byte#Multiple-byte_units "Memory GB units, 1024^3") (similar for HDD and SSD-plots): | | full RAM | partial RAM | disk mode | | :--- | :--- | :--- | :--- | | `hdd`/`sdd-k29` | 60 GB | 32 GB | 8 GB | | `hdd`/`sdd-k30` | 110 GB | 64 GB | 8 GB | | `hdd`/`sdd-k31` | 216 GB | 120 GB | 8 GB | | `hdd`/`sdd-k32` | 410 GB | 232 GB | 8 GB | :::note[Note] Disk mode usually less than 8 GB, depends on `-S` streams option.\ If close to 32 GB, 32 GB system RAM not enough. 48/64 GB needed. ::: **Temp disk space** needed when plotting (similar for HDD and SSD-plots): | | full RAM | partial RAM | disk mode | | :--- | :--- | :--- | :--- | | `hdd`/`sdd-k29` | 0.0 GiB | 24 GiB | 51 GiB | | `hdd`/`sdd-k30` | 0.0 GiB | 48 GiB | 101 GiB | | `hdd`/`sdd-k31` | 0.0 GiB | 100 GiB | 202 GiB | | `hdd`/`sdd-k32` | 0.0 GiB | 200 GiB | 404 GiB | **Total disk writes** when plotting, in [TiB](https://en.wikipedia.org/wiki/Byte#Multiple-byte_units "TebiByte units, 1024^4") written: | | full RAM | partial RAM | disk mode | | :--- | :--- | :--- | :--- | | `hdd`/`sdd-k29` | 0.04 / 0.02 TiBW | 0.08 / 0.06 TiBW | 0.33 / 0.28 TiBW | | `hdd`/`sdd-k30` | 0.08 / 0.03 TiBW | 0.16 / 0.12 TiBW | 0.68 / 0.57 TiBW | | `hdd`/`sdd-k31` | 0.16 / 0.06 TiBW | 0.33 / 0.25 TiBW | 1.40 / 1.14 TiBW | | `hdd`/`sdd-k32` | 0.32 / 0.13 TiBW | 0.67 / 0.50 TiBW | 2.88 / 2.27 TiBW | :::note[Note] Testnet11 introduced a new farmer key, 33 bytes ECDSA vs old 48 BLS (`-f`, 66 chars vs old 96). ::: Follow [`#mmx-general`](https://discord.com/channels/852982773963161650/925017012235817042) on Discord. ## Farming **Disk seeks** per plot (independent of k-size or C-compression): | | pass filter | full proof | :--- | :--- | :--- | | `hdd` | ~2 | ~256 | | `ssd` | ~4096 | 0 | Follow [`#mmx-farming`](https://discord.com/channels/852982773963161650/853417165980827657) on Discord. ================================================ FILE: docs/src/content/docs/articles/plotting/plot-size.mdx ================================================ --- title: Plot size description: Plot sizes for MMX prev: false next: false articlePublished: 2026-03-04 articleUpdated: 2026-03-20 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- An attempt to quantify real-life MMX plot size patterns into charts, tables and formulas. Created by plotting lots of different k-sizes and C-levels. Both to find patterns, and make sure of them. Goal is an easy overview of plot size behavior, with solid numbers as a bonus. ## TLDR; - [Compression resistant](../../../articles/plotting/plot-format/) plot format - Given a specific k-size/C-level, following is true: - Plot size is random, within a small bell curved range - Plot size will average out, given enough plots - Varying size equals **less or more proofs, not better compression** - Given specific k-size, following is true: - Delta size between C-levels is identical, linear - Delta size of distribution bell curve is identical for all C-levels - Evaluate yourself [what C-compression](../../../faq/plotting/#what-k-size-and-c-compression-should-i-plot) level is worth it - A few thoughts about [filling a disk](#filling-a-disk) further down - Own section below with data for [SSD-plots](#ssd-plots) ## Charts First chart is an overall overview using formulas created. Followed by two charts using real-life hdd-k29 plotting data to illustrate patterns. Those patterns repeat in other k-sizes. Decimal GiB numbers in overview chart have been rounded up. Less chance of underestimating combined size of plots.
Overview

Distribution (hdd-k29, C0)

Distribution (hdd-k29, C0-C15)

## Average
List | | `hdd-k29` | `hdd-k30` | `hdd-k31` | `hdd-k32` | | :--- | :--- | :--- | :--- | :--- | | `C0` | 36.376 GiB | 75.196 GiB | 155.279 GiB | 320.321 GiB | | `C15` | 34.893 GiB | 72.223 GiB | 149.315 GiB | 308.351 GiB | | `%` | -4.08 % | -3.95 % | -3.84 % | -3.74 % |
Full list | | `hdd-k29` | `hdd-k30` | `hdd-k31` | `hdd-k32` | | :--- | :--- | :--- | :--- | :--- | | `C0` | 36.376 GiB | 75.196 GiB | 155.279 GiB | 320.321 GiB | | `C1` | 36.277 GiB | 74.998 GiB | 154.882 GiB | 319.523 GiB | | `C2` | 36.178 GiB | 74.800 GiB | 154.484 GiB | 318.725 GiB | | `C3` | 36.079 GiB | 74.602 GiB | 154.086 GiB | 317.927 GiB | | `C4` | 35.980 GiB | 74.404 GiB | 153.689 GiB | 317.129 GiB | | `C5` | 35.882 GiB | 74.205 GiB | 153.291 GiB | 316.331 GiB | | `C6` | 35.783 GiB | 74.007 GiB | 152.894 GiB | 315.533 GiB | | `C7` | 35.684 GiB | 73.809 GiB | 152.496 GiB | 314.735 GiB | | `C8` | 35.585 GiB | 73.611 GiB | 152.098 GiB | 313.937 GiB | | `C9` | 35.486 GiB | 73.412 GiB | 151.701 GiB | 313.139 GiB | | `C10` | 35.387 GiB | 73.214 GiB | 151.303 GiB | 312.341 GiB | | `C11` | 35.288 GiB | 73.016 GiB | 150.905 GiB | 311.543 GiB | | `C12` | 35.189 GiB | 72.818 GiB | 150.508 GiB | 310.745 GiB | | `C13` | 35.091 GiB | 72.620 GiB | 150.110 GiB | 309.947 GiB | | `C14` | 34.992 GiB | 72.421 GiB | 149.713 GiB | 309.149 GiB | | `C15` | 34.893 GiB | 72.223 GiB | 149.315 GiB | 308.351 GiB | | `%` | -4.08 % | -3.95 % | -3.84 % | -3.74 % |
Formula - HDD-plot C0 (GiB): `4.98452*k*1.99844^(k-30.99297)+0.00513` - HDD-plot C15 (%): `-(1.0871^(34.1291-k)+2.5423)`
## Distribution Nearly all plots will be within a 99.5% GiB range, with average plot size in middle. Given enough plots there will be a few outliers, but not many. 99.5% is a representative value for a practical range. GiB numbers with one decimal place have been rounded up and down to best fit purpose. Less chance of underestimating average plot sizes and range values.
List | | `hdd-k29` | `hdd-k30` | `hdd-k31` | `hdd-k32` | | :--- | :--- | :--- | :--- | :--- | | `99.5%` | ±0.485 GiB | ±0.729 GiB | ±1.082 GiB | ±1.586 GiB | | `C0` (average) | 36.4 GiB | 75.2 GiB | 155.3 GiB | 320.4 GiB | | `C0` (range) | 35.8 - 36.9 | 74.4 - 76.0 | 154.1 - 156.4 | 318.7 - 322.0 |
Full list | | `hdd-k29` | `hdd-k30` | `hdd-k31` | `hdd-k32` | | :--- | :--- | :--- | :--- | :--- | | `25%` | ±0.052 GiB | ±0.078 GiB | ±0.116 GiB | ±0.170 GiB | | `50%` | ±0.113 GiB | ±0.169 GiB | ±0.251 GiB | ±0.369 GiB | | `75%` | ±0.195 GiB | ±0.293 GiB | ±0.435 GiB | ±0.638 GiB | | `99.5%` | ±0.485 GiB | ±0.729 GiB | ±1.082 GiB | ±1.586 GiB | | `C0` | 35.8 - 36.9 | 74.4 - 76.0 | 154.1 - 156.4 | 318.7 - 322.0 | | `C1` | 35.7 - 36.8 | 74.2 - 75.8 | 153.7 - 156.0 | 317.9 - 321.2 | | `C2` | 35.6 - 36.7 | 74.0 - 75.6 | 153.4 - 155.6 | 317.1 - 320.4 | | `C3` | 35.5 - 36.6 | 73.8 - 75.4 | 153.0 - 155.2 | 316.3 - 319.6 | | `C4` | 35.4 - 36.5 | 73.6 - 75.2 | 152.6 - 154.8 | 315.5 - 318.8 | | `C5` | 35.3 - 36.4 | 73.4 - 75.0 | 152.2 - 154.4 | 314.7 - 318.0 | | `C6` | 35.2 - 36.3 | 73.2 - 74.8 | 151.8 - 154.0 | 313.9 - 317.2 | | `C7` | 35.1 - 36.2 | 73.0 - 74.6 | 151.4 - 153.6 | 313.1 - 316.4 | | `C8` | 35.1 - 36.1 | 72.8 - 74.4 | 151.0 - 153.2 | 312.3 - 315.6 | | `C9` | 35.0 - 36.0 | 72.6 - 74.2 | 150.6 - 152.8 | 311.5 - 314.8 | | `C10` | 34.9 - 35.9 | 72.4 - 74.0 | 150.2 - 152.4 | 310.7 - 314.0 | | `C11` | 34.8 - 35.8 | 72.2 - 73.8 | 149.8 - 152.0 | 309.9 - 313.2 | | `C12` | 34.7 - 35.7 | 72.0 - 73.6 | 149.4 - 151.6 | 309.1 - 312.4 | | `C13` | 34.6 - 35.6 | 71.8 - 73.4 | 149.0 - 151.2 | 308.3 - 311.6 | | `C14` | 34.5 - 35.5 | 71.6 - 73.2 | 148.6 - 150.8 | 307.5 - 310.8 | | `C15` | 34.4 - 35.4 | 71.4 - 73.0 | 148.2 - 150.4 | 306.7 - 310.0 |
Formula - HDD-plot k29 (±GiB): `0.153*sinh(0.00872*p)-0.0632*ln(100-p)+0.2911` - HDD-plot k-size (multiplier): `2.386E-18*k^12.05`
## Filling a disk No perfect way to get 0 bytes free when filling a disk with plots. Random element of plot size complicates some. But plot size has a predictable range, and averages out. As shown in charts and tables above. Also remember. Smaller or larger plot size within same k-size/C-level is not better compression. Just less or more proofs. Let's say you are able to plot k31 in RAM, going for that k-size. You feel confident with a C-level up to C4 on farming load ([individual choice](../../../faq/plotting/#what-k-size-and-c-compression-should-i-plot)). Take an 18TB disk. Convert capacity to GiB, with 2 GiB filesystem overhead: ``` 18TB capacity: (18E12 / 1024^3) - 2.0 = 16761.8 GiB hdd-k31 C4 (low): 16761.8 GiB / 152.6 = 109(.84) plots [free: 128.4 GiB] hdd-k31 C4 (avg): 16761.8 GiB / 153.7 = 109(.06) plots [free: 8.5 GiB] hdd-k31 C4 (high): 16761.8 GiB / 154.8 = 108(.28) plots [free: 43.4 GiB] ``` What is not realistic here is getting a run of only lowest possible C4, or highest. More probable is a 109 plot run averaging out closer to average C4 size. Because of low sample size (number of plots), statistics will have it somewhat under or over. What to do? - Keep it simple. Find your wanted k-size/C-level. Plot and fill disks, not thinking about left over free space. - Optionally go through disks afterwards, see if a few lower k-size/C-level plots could fill up left over free space. Other strategies are possible. Filtering a 'cache' (if you have space) of plots weighted against certain sizes. Then have a strategy to fill up disks. That will cost time and complicate plotting process. Often the simplest is best. Just go to Discord and ask for advice, links in [feedback](#feedback) section below. ## SSD-plots Quick intro about SSD-plots [here](../../../articles/plotting/plot-format/#ssd-plots). They are ready for use, though majority of netspace is HDD-plots. Listing identical tables as HDD-plots above, but without charts. Patterns for SSD-plots are identical, just different numbers. Except, be careful with compression. Recommended to use C0 given the high IOPS for SSD-plots.
Average - List | | `ssd-k29` | `ssd-k30` | `ssd-k31` | `ssd-k32` | | :--- | :--- | :--- | :--- | :--- | | `C0` | 14.633 GiB | 30.205 GiB | 62.285 GiB | 128.307 GiB | | `C15` | 13.139 GiB | 27.218 GiB | 56.312 GiB | 116.365 GiB | | `%` | -10.21 | -9.89 | -9.59 | -9.31 |
Average - Full List | | `ssd-k29` | `ssd-k30` | `ssd-k31` | `ssd-k32` | | :--- | :--- | :--- | :--- | :--- | | `C0` | 14.633 GiB | 30.205 GiB | 62.285 GiB | 128.307 GiB | | `C1` | 14.534 GiB | 30.006 GiB | 61.887 GiB | 127.511 GiB | | `C2` | 14.434 GiB | 29.807 GiB | 61.489 GiB | 126.715 GiB | | `C3` | 14.334 GiB | 29.608 GiB | 61.091 GiB | 125.919 GiB | | `C4` | 14.235 GiB | 29.409 GiB | 60.692 GiB | 125.122 GiB | | `C5` | 14.135 GiB | 29.210 GiB | 60.294 GiB | 124.326 GiB | | `C6` | 14.036 GiB | 29.010 GiB | 59.896 GiB | 123.530 GiB | | `C7` | 13.936 GiB | 28.811 GiB | 59.498 GiB | 122.734 GiB | | `C8` | 13.836 GiB | 28.612 GiB | 59.099 GiB | 121.938 GiB | | `C9` | 13.737 GiB | 28.413 GiB | 58.701 GiB | 121.142 GiB | | `C10` | 13.637 GiB | 28.214 GiB | 58.303 GiB | 120.346 GiB | | `C11` | 13.537 GiB | 28.015 GiB | 57.905 GiB | 119.549 GiB | | `C12` | 13.438 GiB | 27.815 GiB | 57.507 GiB | 118.753 GiB | | `C13` | 13.338 GiB | 27.616 GiB | 57.108 GiB | 117.957 GiB | | `C14` | 13.239 GiB | 27.417 GiB | 56.710 GiB | 117.161 GiB | | `C15` | 13.139 GiB | 27.218 GiB | 56.312 GiB | 116.365 GiB | | `%` | -10.21 | -9.89 | -9.59 | -9.31 |
Average - Formula - SSD-plot C0 (GiB): `1.97585*k*1.99570^(k-30.97589)+0.00479` - SSD-plot C15 (%): `-(1.0649^(55.3836-k)+4.9567)`
Distribution - List | | `ssd-k29` | `ssd-k30` | `ssd-k31` | `ssd-k32` | | :--- | :--- | :--- | :--- | :--- | | `99.5%` | ±0.083 GiB | ±0.124 GiB | ±0.185 GiB | ±0.271 GiB | | `C0` (average) | 14.7 GiB | 30.3 GiB | 62.3 GiB | 128.4 GiB | | `C0` (range) | 14.5 - 14.8 | 30.0 - 30.4 | 62.1 - 62.5 | 128.0 - 128.6 |
Distribution - Full List | | `ssd-k29` | `ssd-k30` | `ssd-k31` | `ssd-k32` | | :--- | :--- | :--- | :--- | :--- | | `25%` | ±0.009 GiB | ±0.014 GiB | ±0.021 GiB | ±0.031 GiB | | `50%` | ±0.020 GiB | ±0.030 GiB | ±0.045 GiB | ±0.065 GiB | | `75%` | ±0.034 GiB | ±0.051 GiB | ±0.076 GiB | ±0.111 GiB | | `99.5%` | ±0.083 GiB | ±0.124 GiB | ±0.185 GiB | ±0.271 GiB | | `C0` | 14.5 - 14.8 | 30.0 - 30.4 | 62.1 - 62.5 | 128.0 - 128.6 | | `C1` | 14.4 - 14.7 | 29.8 - 30.2 | 61.7 - 62.1 | 127.2 - 127.8 | | `C2` | 14.3 - 14.6 | 29.6 - 30.0 | 61.3 - 61.7 | 126.4 - 127.0 | | `C3` | 14.2 - 14.5 | 29.4 - 29.8 | 60.9 - 61.3 | 125.6 - 126.2 | | `C4` | 14.1 - 14.4 | 29.2 - 29.6 | 60.5 - 60.9 | 124.8 - 125.4 | | `C5` | 14.0 - 14.3 | 29.0 - 29.4 | 60.1 - 60.5 | 124.0 - 124.6 | | `C6` | 13.9 - 14.2 | 28.8 - 29.2 | 59.7 - 60.1 | 123.2 - 123.9 | | `C7` | 13.8 - 14.1 | 28.6 - 29.0 | 59.3 - 59.7 | 122.4 - 123.1 | | `C8` | 13.7 - 14.0 | 28.4 - 28.8 | 58.9 - 59.3 | 121.6 - 122.3 | | `C9` | 13.6 - 13.9 | 28.2 - 28.6 | 58.5 - 58.9 | 120.8 - 121.5 | | `C10` | 13.5 - 13.8 | 28.0 - 28.4 | 58.1 - 58.5 | 120.0 - 120.7 | | `C11` | 13.4 - 13.7 | 27.8 - 28.2 | 57.7 - 58.1 | 119.2 - 119.9 | | `C12` | 13.3 - 13.6 | 27.6 - 28.0 | 57.3 - 57.7 | 118.4 - 119.1 | | `C13` | 13.2 - 13.5 | 27.4 - 27.8 | 56.9 - 57.3 | 117.6 - 118.3 | | `C14` | 13.1 - 13.4 | 27.2 - 27.6 | 56.5 - 56.9 | 116.8 - 117.5 | | `C15` | 13.0 - 13.3 | 27.0 - 27.4 | 56.1 - 56.5 | 116.0 - 116.7 |
Distribution - Formula - SSD-plot k29 (±GiB): `0.088*sinh(0.00282*p)-0.0109*ln(100-p)+0.0502` - SSD-plot k-size (multiplier): `2.386E-18*k^12.05`
## References
Basic data If useful to anyone. Link to [plot-size_csv.zip](/resources/data/plot-size/plot-size_csv.zip) with raw CSV data used to create formulas. Would even more data be preferable? Always. But was enough to see patterns, and estimate good values for formulas. :::note[Note] Important that such data is as-is, without any pre-filtering of plots that are larger or smaller. There are a few entries in k26 and k29 that are identical. Not wrong, just higher probability on lower k-sizes. Together with k29-k32, k26 was included. Not valid in mainnet, so not shown in charts and tables above. But formulas work for k26. Some signs in data that ± distribution might have a small difference. Not enough to warrant asymmetrical formulas. For reference. A lot of plots created, recorded, deleted. Hardware was Nvidia RTX A4500, Intel DC P4610 6.4TB SDD, and 128GB RAM. A combination of full RAM, partial RAM, and disk mode. Together with some plots already done on my farm. :::
Formula creation Formulas above are not perfect, but close enough. Transforming real source code logic into perfect formulas would be too complex. Better with a good approximation that matches real-life behavior. Strategy used: - Map all real-life plot data into spreadsheets - Transform numbers in different ways, find patterns - Create points for each k-size on a graph - Find basic curve formula that matches points on graph - Brute force iterate numbers in formula - Find numbers with least difference across all k-sizes Without required plot file metadata, formula looks to be: - HDD-plot C0 (GiB): `5*k*2^(k-31)` (ideal, not real-life) - SSD-plot C0 (GiB): `2*k*2^(k-31)` (ideal, not real-life)
## Feedback Questions, or wrong info above. Use [`#mmx-general`](https://discord.com/channels/852982773963161650/925017012235817042) or [`#mmx-farming`](https://discord.com/channels/852982773963161650/853417165980827657) channels on Discord. ================================================ FILE: docs/src/content/docs/articles/timelord/timelord-optimizations.md ================================================ --- title: TimeLord Optimizations description: How to optimize MMX timelord speed prev: false next: false articlePublished: 2023-07-11 articleUpdated: 2025-03-17 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- Running an MMX TimeLord is optional (default is disabled). Not needed to run a fully functional node. Blockchain, as a whole, only need one active timelord to move forward. A few more, spread around, is preferred for redundancy and security. Do not need to be fastest. If you want to contribute by running one, check [requirements](#requirements) below. Enable timelord in WebGUI, or set `true` in `config/local/timelord` file. Check that running, and speed, in NODE / LOG / TIMELORD tab in WebGUI. Probably lower than NODE / VDF Speed, unless you are the fastest timelord. No more is needed. Standard Linux compile and Windows binaries gives good performance for a timelord. Unless you want to optimize for fastest timelord, or the fun of it. :::caution[Important] Trying to be fastest TimeLord is not easy. _YOU_ need to decide if worth it. **Overclock at your own risk, CPU can degrade**. Information shared here, is to **best of my knowledge as of Mar2025**. ::: ## TLDR; I want to run [fastest timelord](../../../articles/timelord/timelord-predictions/): * Intel Ultra 200S series, E-core (15th-gen, Arrow Lake) * Use [Linux](#linux-or-windows) and [GCC](#optimize-compiler) * Compile with [AVX](#optimize-compiler-options-avx-vs-sse42) * Compile with [15th-gen E-core optimized code](#optimize-source-code-architecture) * [Isolate](#optimize-isolate-thread) 1x CPU core to timelord process thread * Have a GPU/iGPU verify VDF * [Clock 1x CPU core](#optimize-cpu-speed) as high as possible :::note[Note] Optimize and **overclock at your own risk**. ::: ## Logic A timelord performs a very simple mathematical operation (SHA256, Secure Hash Algorithm). It is performed recursively and cannot be parallelized. Previous result is needed, before repeating, as fast as possible. Like a very specific mathematical single-threaded benchmark. Timelord runs 1x of these operations, creating a VDF (verifiable delay function) stream. Only fastest timelord, at any time, produces VDF for block being created. A reward of 0.2 MMX is given every 20 blocks to fastest timelord. Potentially 86.4 MMX per day. Be aware of [overtaking caveat](#fastest-timelord) for fastest timelord. ## Requirements **CPU:** Intel or AMD (w/ SHA extensions).
**Model:** Intel 11th-gen (Rocket Lake), AMD Zen, or later (a few exceptions).
**GPU/iGPU:** Any compatible (offload verify VDF). **Linux:** `grep -o 'sha_ni' /proc/cpuinfo`, empty if not available.
**Windows:** CPU-Z (Instructions) or HWiNFO64 (Features), look for `SHA`. You can run timelord on a CPU without SHA extensions. Will fallback to AVX2. In reality SHA extensions are needed. SHA256 calculations are ~5-10x faster with SHA vs AVX2. ## Why not GPU/FPGA/ASIC Timelord logic will only use CPU, not GPU. GPU is great for parallel SHA256 calculations, beating CPU in both speed and efficiency. GPU is used for verify VDF operation on a node, if available. For a single SHA256 calculation, CPU's SHA extensions will beat GPU on speed. As timelord SHA256 workload is not parallelizable, CPU wins the serial SHA256 race. Feedback welcome on other contenders. As of now, nothing observed beating a high-GHz CPU with SHA extensions (optimized silicon circuits inside CPU). Too low speed (GHz) on FPGA, work not parallelizable. Prohibitive cost to produce a high-GHz ASIC that beats Intel/AMD optimized silicon. ## Optimize TimeLord Standard Linux compile and Windows binaries gives good performance for a timelord. Still important to tune surrounding environment. Either aiming for fastest timelord rewards, or just the challenge. Information and numbers in this article might be superseded. Sections below are known info at date of publish. To help get started or give ideas. Not the absolute answer. Probably angles not discovered yet, and other ways to go about it. You do not need to complicate it like below. Try to run a timelord. Measure speed. Try out a tip. Measure if faster. Discuss and share in [`#mmx-timelord`](https://discord.com/channels/852982773963161650/1026219599311675493) channel on Discord. No requirement to divulge all your secrets. But a good place to get tips, or kickstart new ideas. :::note[Note] Optimize and **overclock at your own risk**. ::: ### Test Environment **CPU:** Intel Ultra 200S series, 265K (15th-gen, Arrow Lake)
**GPU:** Nvidia RTX 4060 Ti 8GB (AD106)
**OS:** Ubuntu 24.10 (Oracular Oriole)
**OS:** Windows 10 (22H2)
**mmx-node:** v1.1.7 (+ [AVX](#optimize-compiler-options-avx-vs-sse42), + [optimized code](#optimize-source-code-architecture)) Most instructions below are transferable to AMD. ### Measuring Speed Timelord speed is measured in MH/s (million hashes per second). Current blockchain network speed, fastest timelord, is found in NODE / VDF Speed in WebGUI. Your own timelord speed is found under NODE / LOG / TIMELORD tab in WebGUI. To make it easier to measure own improvements, baseline numbers, compare with others. It is recommended to measure MH/s speed per 0.1 GHz (**MH/s/0.1GHz**). Yes, absolute speed is the end goal. But timelord speed, at least observed for now, is linear given CPU GHz. A 2-step process is recommended: 1. Optimize for best possible MH/s/0.1GHz 2. Clock 1x CPU core as high as possible In this case the Intel 15th-gen has had an E-core locked to 3.3 GHz (could be lower/higher, not important). We already know from [TimeLord Predictions](../../../articles/timelord/timelord-predictions/) that E-core is the best option. Not always been so. Previous generations had P-core as best, with hyperthreading and E-cores disabled (more on that [later](#optimize-cpu-speed)). Goal is to make optimization measurements easier and controlled. Intel 15th-gen (v1.1.7, + [AVX](#optimize-compiler-options-avx-vs-sse42), + [optimized code](#optimize-source-code-architecture)): | Environment | Measured | Locked Speed | Measured Per Unit | | :--- | :--- | :--- | :--- | | Ubuntu/gcc14 | 44.60 MH/s | /33 (3.3 GHz) | **1.351** MH/s/0.1GHz | | Ubuntu/Clang19 | 44.28 MH/s | /33 (3.3 GHz) | **1.342** MH/s/0.1GHz | | Windows/VC++ | 41.49 MH/s | /33 (3.3 GHz) | **1.257** MH/s/0.1GHz | These numbers represent absolute speed per 0.1 GHz, given the environment and tuning. Easy to compare against yourself or others. Top speed after that is dependent on how high you can clock 1x CPU core (more on that [later](#optimize-cpu-speed)). In this case, 1x E-core stable at **4.6** GHz, would give a timelord speed of ~**62.2** MH/s. As a sidenote. P-core numbers for 12/13/14th-gen Intel gives exact same performance per 0.1 GHz. Basically, no IPC (instructions per clock) uplift for SHA extensions between them (for this specific use-case). But 14th-gen have potential to clock highest. Testing of AMD Zen4-core (7000-series), and Zen5-core (9000-series) gives **0.755** and **0.715** MH/s/0.1GHz. Yes, a degradation in efficiency. Probably an architectural decision. Intel's 15th-gen E-cores efficiency increase was a surprise (1.352, vs 0.975 before). Making it the best known choice for now. Previous generations had Intel/AMD much closer (for this specific use-case). In the end, an overclocking race. Fastest timelord speeds observed on testnets (as of **Mar2025**): | Continuous | Peak | | :--- | :--- | | ~**74.5** MH/s | ~**75.2** MH/s | ### Linux or Windows Numbers above, in previous releases and CPU generations, have switched between Linux or Windows binary being fastest. With current source code, Linux (gcc14) looks to have the edge. Instructions shown in sections below are done on Linux. But most aspects are applicable to Windows too. Linux distribution and kernel often have an effect on different types of workloads. When it comes to timelord logic, not much observed. Logic for creation of a VDF stream is very small. A few instructions repeated in a CPU core. ### Optimize: Establish defaults Follow [mmx-node](../../../guides/installation/#building-from-source) build from source installation for Linux (in this case Ubuntu, with default compiler gcc14). Get mmx-node up and running. Enable timelord in WebGUI, or set `true` in `config/local/timelord` file. Find and [lock timelord process thread](#optimize-isolate-thread) to an E-core (`taskset`). Let it run for a while. Check average speed in NODE / LOG / TIMELORD tab in WebGUI. With this setup: | Environment | Measured | Locked Speed | Measured Per Unit | | :--- | :--- | :--- | :--- | | Ubuntu/gcc14 | 43.16 MH/s | /33 (3.3 GHz) | **1.308** MH/s/0.1GHz | ### Optimize: Compiler Compiler has an effect on how good source code is translated to binary objects. Default for Ubuntu 24.10 is GCC (GNU Compiler Collection), or gcc14. An alternative is Clang (LLVM), or Clang19. There are others. Has varied if Clang or gcc do a better job. One way to install, enable and compile with Clang19: ```bash frame="none" sudo apt install clang lld libomp-dev ``` ```bash frame="none" export CC=/usr/bin/clang-19 export CPP=/usr/bin/clang-cpp-19 export CXX=/usr/bin/clang++-19 export LD=/usr/bin/ld.lld-19 ``` ```bash frame="none" ./clean_all.sh ./make_devel.sh ``` :::note[Note] You need to perform `export` statements in terminal environment before compile, or gcc14 will be used.\ When you switch compiler, or compiler options. Always do `./clean_all.sh` before new compile.\ You will get a lot of unused `-fmax-errors=1` warnings. Just ignore, or remove from compiler options. ::: Default Clang19 compile (`./make_devel.sh`): | Environment | Measured | Locked Speed | Measured Per Unit | | :--- | :--- | :--- | :--- | | Ubuntu/Clang19 | 42.95 MH/s | /33 (3.3 GHz) | **1.301** MH/s/0.1GHz | Small, but noticeable degrade from gcc14's **1.308** MH/s/0.1GHz. We'll switch back to gcc14 going forward. ### Optimize: Compiler options Compiler options can have a big effect on how source code is transformed to a binary object. Often focus is on speed vs size. Several options have an effect on timelord logic. Much have been tried with both gcc and Clang. For now, gcc14 with default options in `./make_devel.sh` gives best performance. Some elements to experiment with (`./make_devel.sh`): * Switch between `Release` and `RelWithDebInfo` (`-DCMAKE_BUILD_TYPE`) * Remove `-fno-omit-frame-pointer` (`-DCMAKE_CXX_FLAGS`) * Add `-march=native` (`-DCMAKE_CXX_FLAGS`) * Variants of `-O` optimization option (`-DCMAKE_CXX_FLAGS`) There are others. Look up optimization in relevant compiler documentation. :::note[Note] When you switch compiler, or compiler options. Always do `./clean_all.sh` before new compile. ::: ### Optimize: Compiler options (AVX vs SSE4.2) Current default compile combines the usage of SHA extensions and SSE4.2 instructions. Raising the SSE4.2 baseline to AVX instructions gives about ~1% boost on 15th-gen Intel. Has to do with compiler using identical AVX versions of certain SSE4.2 instructions. Though, on 11th-gen Intel this looks to degrade performance (better with SSE4.2). To implement AVX vs SSE4.2 baseline (`./CMakeLists.txt`): Change `-msse4.2` to `-mavx` on two lines (Linux compile part): ```cmake set_source_files_properties(src/sha256_ni.cpp PROPERTIES COMPILE_FLAGS "-mavx -msha") set_source_files_properties(src/sha256_ni_rec.cpp PROPERTIES COMPILE_FLAGS "-mavx -msha") ``` Add two lines (Windows compile part): ```cmake set_source_files_properties(src/sha256_ni.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX") set_source_files_properties(src/sha256_ni_rec.cpp PROPERTIES COMPILE_FLAGS "/arch:AVX") ``` Easier to see location in closed [PR#210](https://github.com/madMAx43v3r/mmx-node/pull/210/files) request. Small, but real jump from gcc14's **1.308** MH/s/0.1GHz: | Environment | Measured | Locked Speed | Measured Per Unit | | :--- | :--- | :--- | :--- | | Ubuntu/gcc14 | 43.58 MH/s | /33 (3.3 GHz) | **1.320** MH/s/0.1GHz | :::note[Note] For now, official releases will keep having SSE4.2 as baseline. ::: ### Optimize: Source code One thing to be aware of is that we want to optimize a tiny part of whole mmx-node. Even a tiny subset of whole timelord logic. The calculation of a VDF stream. Performed through `hash_t TimeLord::compute(...)` (`/src/TimeLord.cpp`) calling `recursive_sha256_ni(...)` (`/src/sha256_ni_rec.cpp`). We do not care about the rest. As long as this part goes as fast as possible. Unless surrounding elements has an effect. Not observed for now. That part of source code is already written to be fast when translated to binary objects by compiler (inline, intrinsics, asm). Several iterations were made for it to [end up like that](https://github.com/voidxno/fast-recursive-sha256/blob/main/OPTIMIZE.md). Still, this is the place to adjust source code if you think there is a way to optimize it even more. To illustrate, the following file [sha256_ni_rec_sample.cpp](/resources/code/timelord/optimize/sample/sha256_ni_rec_sample.cpp) contains 5x optimization samples related to static 32 bytes nature of implementation. Intel 15th-gen E-core architecture edition below implements `SAMPLE02` and `SAMPLE04`. If all 5x had been used, reduced effect. Though, would then be possible to remove data for index `8-15` in `K64` array. Independent of that, possible to remove, rearrange variables and order of lines. While still maintaining algorithm. End result is what counts. However you would like the code to look, and what you think works. You are a slave to compiler optimizing code presented. Unless you really want to dig into source code, use architecture edition below. ### Optimize: Source code (architecture) Although current [sha256_ni_rec.cpp](https://raw.githubusercontent.com/madMAx43v3r/mmx-node/refs/heads/master/src/sha256_ni_rec.cpp) is very fast. Not impossible certain CPU architectures could be faster with code organized other ways. Found that out for Intel 15th-gen E-core. Such specific code will not be implemented directly in mmx-node. Making it public here for others to use. | Architecture | File | | :--- | :--- | | Intel 15th-gen E-core | [sha256_ni_rec.cpp](/resources/code/timelord/architecture/Intel_15th-gen_E-core/sha256_ni_rec.cpp) | Download 15th-gen E-core file, overwrite current in mmx-node installation. Update file timestamp, and compile: ```bash frame="none" touch ./src/sha256_ni_rec.cpp ./make_devel.sh ``` Real jump from standard optimized **1.320** MH/s/0.1GHz: | Environment | Measured | Locked Speed | Measured Per Unit | | :--- | :--- | :--- | :--- | | Ubuntu/gcc14 | 44.60 MH/s | /33 (3.3 GHz) | **1.351** MH/s/0.1GHz | ### Optimize: Isolate thread Timelord logic has 1x process thread. It wants 100% of 1x CPU core to calculate VDF stream. Goal is to create an environment that makes this 1x process thread run with high GHz continuously. One way, and valid strategy, is to let the OS process scheduler do its job (Linux or Windows). Distribute and use resources as best possible, depending on requirements and state of system. Maybe tune some aspects of OS, together with BIOS adjustments to clock CPU as high as possible. Gives great results. All modern CPUs have logic to boost individual CPU cores in combination with OS scheduler, power management and other logic. Another, more manual way, is to dedicate a specific CPU core to the 1x timelord process thread. Locking OS and other processes away from it. In this case an Intel CPU with 8x P-cores, numbered 0 to 7. With E-cores following after that. Going to dedicate E-core 8 to timelord process thread. One way to achieve it (Linux, Ubuntu): * Force OS process scheduler to not use core 8. Add `isolcpus=8` to `GRUB_CMDLINE_LINUX` (`/etc/default/grub`). Easily observed through `htop` and CPU core utilization. * When timelord is up and running, you should have 1x process thread at 99/100% with command name of 'TimeLord':
`ps -A -T -o tid,comm,pcpu | grep 'TimeLord'`
You'll get two entries. Last one is the 99/100% creating VDF stream. Can also find it with `htop`. Let's say it have pid(tid) 5122. Assign it to the isolated CPU core:
`taskset -cp 8 5122`
Check result through `htop`. Should have core 8 at 100% all the time through creation of VDF stream. Also possible to isolate several E-cores and assign the process to all of them. Let's say we want a whole E-core cluster, 4x E-cores. Syntax becomes `isolcpus=8,9,10,11` and `taskset -cp 8-11 5122`. How OS process scheduler moves, or not, the process around those E-cores. Not sure. Need to experiment yourself. ### Optimize: CPU speed At this stage we know what to expect for each 0.1 GHz, **1.351** MH/s. All testing we have observed have given linear increase, given CPU GHz. Now it is time to clock CPU core as high as possible. :::note[Note] Optimize and **overclock at your own risk**. ::: First a boring observation. Many elements surrounding raw GHz of CPU core have been tested: * RAM type/speed/latency/bandwidth * HyperThreading on/off * Virtualization (VT-d) * Mitigations (Spectre/Meltdown) * CPU cache/ring ratio * CPU L1/L2/L3 cache size * CPU core-to-core latency Nothing looks to affect timelord speed, except CPU core clock (GHz). Remember, timelord logic for creation of VDF stream is very small. Not much outside a few instructions repeated in a CPU core. In previous CPU generations we disabled P-core hyperthreading and the E-cores themselves. Was no penalty observed on timelord speed. Less complications, more overclocking potential. In this case, if motherboard supports it. Manually clock P-cores lower (GHz), and as high as possible for E-core(s). Now it is a game of getting highest possible GHz, while keeping CPU cool and stable. ### Optimize: CPU speed (Intel 15th-gen) Currently it looks like E-cores on Intel's 15th-gen are able to overlock to between 5.3 to 5.5 GHz. Depending on luck of draw of CPU quality. Tough, are **strong indications of rapid silicon degradation** at those speeds. YOU need to decide if worth it. **Overclock at your own risk, CPU can degrade**. ## Fastest TimeLord On-chain timelord rewards was introduced with testnet10, and further refined with mainnet-rc (release candidate). Now part of blockchain logic. Before that, a temporary centralized solution existed. How do you know if you are fastest timelord. Ultimate indicator is very easy. You have a wallet address set up as 'TimeLord Reward Address' in SETTINGS in WebGUI. Timelord rewards will show up as `0.2 MMX` of type `VDF_REWARD`, every 20th block (...00,20,40,60,80). Overtaking as fastest timelord is not instant. Unless current fastest timelord outright stops, crashes, or new one is faster by a good margin. Your timelord starts behind because of network and verify VDF latency. Not easy to quantify given internet itself, other nodes and decentralized logic. Will help having a fast VDF verify (GPU). Is where your timelord starts calculating its VDF stream from. Still early days. We do not know yet how people will evaluate risk, cost and rewards for running fastest timelord. Run fast, crash often and degrade CPU. Or at the edge, still stable, taking over when fastest crash. Will pattern stabilize, or be random. ### Optimize: VDF verify (GPU) This article is mostly about optimizing your local timelord speed, VDF create on CPU. From whitepaper (quote): > _In the best case, the latency to receive a block is around 100 ms. While the fastest VDF verification is currently around 200 ms, using 40 series NVIDIA GPUs with high clocks. That means a timelord trying to gain the lead would have to be around 3% faster._ As told, many variables in play. Network latency, node reputation, so on. **Another aspect you can optimize locally** is **latency of VDF verify**. Get it as low as possible. For a reference, my RTX 4060 Ti, with fastest timelord at ~72.5 MH/s. Have ~0.257 sec VDF verify. ## Feedback Please contradict findings above, or tell of new ones. Use [`#mmx-timelord`](https://discord.com/channels/852982773963161650/1026219599311675493) channel on Discord. ================================================ FILE: docs/src/content/docs/articles/timelord/timelord-predictions.md ================================================ --- title: TimeLord Predictions description: State and predictions of MMX timelord speeds prev: false next: false articlePublished: 2023-10-05 articleUpdated: 2025-03-17 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- Current state and predictions of MMX TimeLord speeds. Fun reading the future, and [failing](https://discord.com/channels/852982773963161650/1026219599311675493/1307377841070932009) spectacularly. If needed, read [TimeLord Optimizations](../../../articles/timelord/timelord-optimizations/) for technical background and elements of [timelord logic](../../../articles/timelord/timelord-optimizations/#logic). Running a timelord is optional (default is disabled). Not needed to run a fully functional node. Blockchain, as a whole, only need one active timelord to move forward. A few more, spread around, is preferred for redundancy and security. Do not need to be fastest. ## TLDR; Fastest timelord predictions (as of **Mar2025**): - Contenders: Intel/AMD CPUs with SHA extensions - Observed: ~**74.5** MH/s (continuous) - Observed: ~**75.2** MH/s (peak) - Future: ~**71-77** MH/s (2025) ## Contenders Current contenders for fastest timelord are Intel/AMD CPUs with SHA extensions. Why not GPU/FPGA/ASIC, [read here](../../../articles/timelord/timelord-optimizations/#why-not-gpufpgaasic). Always a possibility of something hidden out there, not observed yet. Two elements decide speed of timelord: - CPU core efficiency (MH/s per 0.1 GHz) - CPU core clock speed (running GHz) Leaves us with newest Intel/AMD CPUs that can clock 1x core the highest: - Intel Ultra 200S series (15th-gen, Arrow Lake) - AMD Ryzen 7000/9000 series (Zen 4/5) :::note[Note] [eBACS](https://bench.cr.yp.to) have [SHA256 efficiency benchmarks](https://bench.cr.yp.to/impl-hashblocks/sha256.html) for different CPU architectures with SHA extensions (dolbeau/amd64-sha). ::: ## Today (Mar2025) To illustrate, ignoring overclocking, using max single-core boost from specifications. Intel (E-core): | | MH/s/0.1GHz | Max boost | TimeLord | Release | | :--- | :--- | :--- | :--- | :--- | | 12900KS (E-core) | ~**0.975** | 4.0 GHz | **39.0** MH/s | Nov2021 | | 13900KS (E-core) | ~**0.975** | 4.3 GHz | **41.9** MH/s | Sep2022 | | 14900KS (E-core) | ~**0.975** | 4.5 GHz | **43.9** MH/s | Oct2023 | | 285K (E-core) | ~**1.350** | 4.6 GHz | **62.1** MH/s | Oct2024 | Intel (P-core): | | MH/s/0.1GHz | Max boost | TimeLord | Release | | :--- | :--- | :--- | :--- | :--- | | 12900KS (P-core) | ~**0.705** | 5.5 GHz | **38.8** MH/s | Nov2021 | | 13900KS (P-core) | ~**0.705** | 6.0 GHz | **42.3** MH/s | Sep2022 | | 14900KS (P-core) | ~**0.705** | 6.2 GHz | **43.7** MH/s | Oct2023 | | 285K (P-core) | ~**0.905** | 5.7 GHz | **51.5** MH/s | Oct2024 | AMD (Zen4, Zen5): | | MH/s/0.1GHz | Max boost | TimeLord | Release | | :--- | :--- | :--- | :--- | :--- | | 5950X (Zen4-core) | ~**0.755** | 4.9 GHz | **37.0** MH/s | Nov2020 | | 7950X (Zen4-core) | ~**0.755** | 5.7 GHz | **43.0** MH/s | Sep2022 | | 9950X (Zen5-core) | ~**0.715** | 5.7 GHz | **40.8** MH/s | Aug2024 | In reality, will need to clock 1x core as high as possible (GHz). Keep it there, stable, cool it, 100% load, 24/7. A lot is up to cooling commitment, together with luck of draw on CPU silicon quality. With segmentation and binning done directly by Intel/AMD these days (product SKUs). Top-end SKUs, like Intel KS editions, do not give much headroom. Except if exotic cooling, like LN2 (liquid nitrogen). Observed: ~**74.5** MH/s (continuous) ## Future (2025) Next interesting CPU architecture and node developments: - Intel: Nova Lake (_tbd_, Desktop) - AMD: Zen 6 (_tbd_, Desktop) Both Intel and AMD are cagey about real information on future CPU generations, up-to and including release. Most relevant for timelord: - CPU core efficiency (MH/s per 0.1 GHz) - CPU core clock speed (running GHz) Previous changes in CPU architecture have shown that efficiency for SHA extensions usually change for the better (SHA256 calculations per 0.1 GHz). Intel's 285K E-core (1.350) efficiency increase compared to 14900KS E-core (0.975) was a [surprise](https://discord.com/channels/852982773963161650/1026219599311675493/1307377841070932009). Existing E-core efficiency (0.975) vs P-cores (0.705) was already best in class. Increase is not a given though. Measurements of Zen5-core (0.715) SHA extensions efficiency are lower than Zen4-core (0.755). Probably an architectural decision. Digital circuits have physical limits with trade-offs between CPU cycles needed and max clock frequency. There is a reason why P-cores have higher boost clock (5.7 GHz) than E-cores (4.6 GHz). But at the same time SHA extensions efficiency are lower for P-cores (0.905) vs E-cores (1.350). New desktop CPU architectures are not planned for release by Intel or AMD in 2025. Might get refreshes with somewhat higher clocks, but standstill on IPC and SHA extensions efficiency. Even when we get new desktop CPU architectures in future (Nova Lake, Zen 6). Efficiency will be a question of physical limits depending on architecture and node. After that, what CPU clock speed is possible. With a starting point of ~62 MH/s for Intel 285K (E-core, 4.6 GHz). Possible CPU refreshes and overclock cooling. Up to 20% on top of starting point through 2025. Prediction: ~**71-77** MH/s (continuous) ## Uncertainties (peaks) It is possible we will get short peaks of someone running a timelord with exotic cooling. Trying to make a record timelord speed until CPU crashes, or empty of LN2 (liquid nitrogen). One way to guestimate is to browse [HWBOT](https://hwbot.org/hardware/processors) Geekbench6 [single](https://hwbot.org/benchmark/geekbench6_-_single_core/) and [multi-core](https://hwbot.org/benchmark/geekbench6_-_multi_core/) records. Problem is getting E-core only overclocks for Intel 285K. We have P-core at about 7.0 GHz (single). A few internet mentions looks to have E-core overclock limit/wall around 5.5 GHz. These are usually records done with LN2 cooling. Just enough to run the benchmark. For some reason Intel looks to have left more overclock headroom on E-cores than usual. Observed timelords have probably reached 5.5 GHz. With the benefit of doubt, say someone manages to run **Intel 285K P-cores at 7.0 GHz** or **E-cores at 5.7 GHz**. Results: **63.3** and **77.0** MH/s. More probable with continuous timelord speeds mentioned above. ## Feedback Other angles on topic above. Share on [`#mmx-timelord`](https://discord.com/channels/852982773963161650/1026219599311675493) or [`#mmx-farming`](https://discord.com/channels/852982773963161650/853417165980827657) channels on Discord. ================================================ FILE: docs/src/content/docs/articles/wallets/wallets-mnemonic-passphrase.md ================================================ --- title: Wallets, mnemonic and passphrase description: A look at MMX wallets, mnemonic and passphrase prev: false next: false articlePublished: 2024-07-08 articleUpdated: 2025-01-30 authorName: voidxno authorPicture: https://avatars.githubusercontent.com/u/53347890?s=200 authorURL: https://github.com/voidxno --- A look at MMX wallets, mnemonic and passphrase. :::note[Important] My own understanding, using mmx-node. I take no responsibility for content. When it comes to crypto and wallets, _YOU_ need to educate yourself. As always, _NEVER_ share your mnemonic or passphrase with others. ::: ## TLDR; - **BACKUP** (securely) both **24-words mnemonic** AND **passphrase** (if used) - **NEVER share** your **mnemonic** or **passphrase** with others - Passphrase is not a global lock password for all your wallets - Passphrase is local to, and part of the wallet you created - Passphrase is optional, works like the 25th word of mnemonic - Identical 24-words mnemonic, with/without passphrase, are different wallets - **Take security seriously** (look [Security](#security)) - Public farmer key is not affected by passphrase (look [Farming](#farming)) - Evaluate what farmer reward address is set to (look [Farming](#farming)) - If using other addresses than main one for wallet (look [Addresses](#addresses)) Wallet is [ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm) based, with [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) functionality. Built with tried and tested elements from Bitcoin wallet. ## Backup As long as you **backup** (securely), in some way, the **24-words mnemonic** and **passphrase** (if used). You will always be able to recreate wallet. Only information needed. Also recommended to **note** the **finger\_print** and main **address** of wallet (Index[0]). Easy indicators to make sure you recreated the correct wallet with backup information. :::caution[Important] Perform the two steps above, and you will always be able to recreate and verify wallet. ::: ## HowTo Look [Find elements](#find-elements) on how to find information above. You can also backup (securely), the `.dat` file, that represents the wallet. Not really needed. The 24-words mnemonic and passphrase (if used), are enough to recreate wallet. Also, if wallet was created with a passphrase. You still need passphrase to access wallet, in addition to `.dat` file. :::tip[Tip] Topics in this article can be tricky to get a grip on. Try asking an LLM chatbot about _"BIP39 wallet standard"_, _"mnemonic"_ and _"passphrase"_. Converse, and you might get answers with angles that works better for you. ::: ## Mnemonic :::note[Note] Ignoring optional passphrase for now (25th word), that is next section. ::: The 24-words mnemonic is a user friendly way to represent the raw binary hexadecimals seed value for wallet ([BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki)). Another angle: It is the absolute secret that both creates and gives full access to wallet. When you create a wallet, you have two options: - Specify existing 24-words mnemonic, and recreate an existing wallet. - Don't specify 24-words mnemonic, get a new wallet created, with new random generated 24-words mnemonic. ## Passphrase This element causes some confusion. It is just MMX utilizing the [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) standard in the way it is defined. Nothing more, nothing less. But the simple logic behind BIP39 gives a few use-cases. Depending on your creativity. Technically, not complicated: - Wallet (no passphrase): mnemonic = secret seed (and a unique wallet) - Wallet (with passphrase): mnemonic + passphrase = secret seed (and a unique wallet) Two 100% unique wallets above, even if identical 24-words mnemonic. Seed will be different, finger\_print will be different, main address (Index[0]) will be different. Look at passphrase as the optional 25th word, that you need to type in each time you want to perform actions with wallet. Most important. If you use a passphrase on one of your wallets. You MUST backup that passphrase, in addition to the 24-words mnemonic. Without you will not be able to recreate that wallet. MMX is not storing that passphrase anywhere. Only thing stored in wallet `.dat` file is the 24-words mnemonic. Which is why passphrase is kind of looked at as password for wallet. Two consequences of BIP39 simplicity: - Not possible: Add a passphrase to an existing wallet without passphrase. - Not possible: Change passphrase of an existing wallet with passphrase. - Why: Passphrase (25th word) is a static part of wallet secret. - Solution (both cases): Create a new wallet with existing 24-words mnemonic and new passphrase. This will be a 100% new unique wallet. Then transfer your funds from old to new wallet. Which are two totally independent wallets. Just sharing the same 24-words mnemonic. Some use-cases: - Enhancing security with extra layer on top of 24-words mnemonic. - Have different wallets with same mnemonic, but different passphrases. - Separate funds, hidden wallets, threat scenario, different passphrases. ## Security YOUR responsibility. Too broad of a topic. A few facts: - 24-words mnemonic: Stored in wallet `.dat` file on disk (file itself not encrypted) - Passphrase: Never stored anywhere on disk (only temporary in memory, when used) Full access to a wallet: - Wallet (no passphrase): Only need 24-words mnemonic (i.e., `.dat` file) - Wallet (with passphrase): Need both 24-words mnemonic and passphrase Consider: - Evaluate using passphrase for better security. - Risk of unauthorized access to wallet `.dat` files. - Use of cold wallets, not all wallets have to be active. - Send rewards or other funds to cold wallet addresses. Ultimately. Your responsibility how you store, use, and arrange wallets. ## Farming ### Farmer Public Key You create plots with a `farmer_public_key` (66 chars) from a wallet. This wallet needs to be present on mmx-node to farm those plots. In relation to wallets, `farmer_public_key` can create some confusion. Both statements are true: - Identical 24-words mnemonic, with/without passphrase, gives **identical** `farmer_public_key` - Identical 24-words mnemonic, with/without passphrase, are **different wallets** Logic: - `farmer_public_key` is created from 24-words mnemonic + a fixed passphrase ("`MMX/farmer_keys`"). - Independent of wallet having a passphrase, or not. Done this way on purpose. No compromise on security. Makes it possible for mmx-node to start farming, even if wallet has passphrase. No waiting for user input of passphrase on startup. Pragmatic choice to make farming as seamless as possible. You will never generate identical 24-words mnemonic as another user. Primary purpose of passphrase is extra security, not better randomness. ### Farmer Reward Address Can argue a farming wallet created without passphrase and getting rewards, is an issue. The `.dat` file of that wallet is enough to access reward funds. Still need access to file though. An operational choice, totally avoidable. If wanted. Farmer Reward Address (SETTINGS), can be set to any wallet address. Until set, mmx-node defaults to main address (Index[0]) of first wallet created. Which often is your farming wallet, usually without a passphrase. Make it a non-issue: - Create a new farming wallet, same 24-words mnemonic, now with a passphrase: - This becomes a new unique wallet, with a new main address. - Send rewards to new main address, that you need passphrase to access. - Plots still farming, because of `farmer_public_key` logic above. - Or, set reward address yourself to another cold wallet (best practice). Most important. Double-check that Farmer Reward Address (SETTINGS) is set to what you want and expect. Security and access to wallet controlling that address is up to you. ## Addresses One wallet can have more than one address. When creating a wallet, default is 1 for Number of Addresses. Was 100 in earlier mmx-node releases. You can still set it to 100, or another number. Totally ok, no problem. Rationale: - Easier for most users to operate with one wallet equals one address. - Memo functionality can eliminate need of multiple addresses in most cases. When you recreate a wallet, addresses will be identical to first time you create it. They are unique for your wallet, ordered identically. Independent of how many you choose to be shown. Be aware of ('missing' funds): - No problem sending funds to other index addresses than main one (Index[0]). - If wallet recreated with 1 as number of addresses, will not see those funds. Your wallet is still key to control all those Index[x] addresses. But wallet will only enumerate number of addresses it was specified with. So, if missing funds on a wallet. Make sure it is not issue above, by recreating wallet with at least number of addresses that have seen activity. ## Account Index :::note[Note] Only an explanation that accounts within a wallet technically exists. Not needed in normal usage. ::: The 'Account' word can mislead in this context. Each wallet listed in WebGUI are also 'Accounts'. What we are talking about here is 'Account Index' **within a wallet**. Not to be confused with the `account` index number assigned to a wallet starting at `Wallet #100` (or `#0` if `wallet.dat`). That is just a counter with no significance. Only for mmx-node itself to number the wallets it finds in `Wallet.json`. Account Index here is the `index` property assigned to `0` (default), on each wallet created by mmx-node. Written as `"index": 0,` on each wallet entry in `Wallet.json`. That property has an effect of generating a unique set of addresses for that wallet. Or more specifically, that wallets account index. Unless you have a very specific need of this logic. Ignore it, let it stay at `0` (default). ## .dat files Wallet `.dat` files are stored at following locations: - Linux: `/mmx-node/` `wallet_.dat` - Windows: `C:\Users\\.mmx\` `wallet_.dat` Contains the binary version of 24-words mnemonic for each wallet. Can be named only `wallet.dat` if created through CLI interface, or older version of mmx-node. Will be `Wallet #0`, vs others who starts at `#100`. Used as any other wallet. It does not hurt to backup them, but you still need passphrase in addition (if used). Look [Backup](#backup) and [HowTo](#howto). There is also `info_.dat` files. Cached non-sensitive information about passphrased wallets: - Linux: `/mmx-node/testnet12/wallet/` `info_.dat` - Windows: `C:\Users\\.mmx\testnet12\wallet\` `info_.dat` Generated for wallets with passphrase on first unlock. Used by mmx-node to get addresses for a wallet with passphrase. Without unlocking it. Can check contents of file yourself (Linux): - `vnxread -f /mmx-node/testnet12/wallet/info_.dat` ## Find elements How to find key wallet elements above using WebGUI. ### 🔍 Wallets Listed under main WALLET tab. No global master wallet logic. A flat list of independent wallets: - Wallet #xxx: Just a counter, nothing of significance. - Address of wallet: Main address of wallet (Index[0]). - Account Name of wallet: If named when created. Each wallet has tabs for info and operations. Most important here (to the right): - INFO - Settings (option wheel symbol) ### 🔍 Mnemonic (24-words) Navigate to the Settings (option wheel symbol) tab for wallet in question: - Press SHOW SEED button Copy/paste or write down the 24-words mnemonic. Remember to get the order of words correct. Look [Mnemonic](#mnemonic) section for information about what it represents. ### 🔍 Passphrase Not stored anywhere by mmx-node. Important information you must remember yourself, or store securely. Look [Passphrase](#passphrase) section for information about what it represents. ### 🔍 finger_print & address Navigate to the INFO tab for wallet in question: - address: Main address of wallet (Index[0]) - finger_print: Unique 32-bit fingerprint value for wallet Either one is a good indicator to know if you have recreated correct wallet. Look [Backup](#backup) section for why you should also save this information. ## Feedback More questions, or wrong info above. Use [`#mmx-general`](https://discord.com/channels/852982773963161650/925017012235817042) or [`#mmx-support`](https://discord.com/channels/852982773963161650/853021000135475270) channel on Discord. ================================================ FILE: docs/src/content/docs/faq/general.md ================================================ --- title: General FAQ description: Frequently asked questions about MMX blockchain. --- ### What is the MMX blockchain? In-depth technical, read [whitepaper](../../../articles/general/mmx-whitepaper/).\ Technical breakdown, read [reference](../../../reference/blockchain/).\ Light introduction, read [article](../../../articles/general/mmx-tldr/). ### How much MMX per block reward? Usually around 0.5 MMX + transaction fees. To get the full picture. Read about Dynamic Supply, Reward Control Loop and Minimum Block Reward in [whitepaper](../../../articles/general/mmx-whitepaper/). ### How much MMX for a given TB farm? Formula (simplified):\ `(farmTB / netspacePB) * 4.32` = MMX (per day) Example (250TB farm, Netspace 170PB):\ `(250 / 170) * 4.32` = ~6.35 MMX (per day) Formula (expanded):\ `(farmTB / (netspacePB * 1000)) * (8640 blocks per day * 0.5 MMX)` :::note[Note] Find current Netspace in [MMXplorer](https://mmxplorer.com/dashboard). Calculations above gives average blocks won per day, multiplied by 0.5 MMX. That [block reward](#how-much-mmx-per-block-reward) can vary. ::: ### Is MMX a fork of Chia? No. More info in light [article](../../../articles/general/mmx-tldr/), technical [reference](../../../reference/blockchain/), or [whitepaper](../../../articles/general/mmx-whitepaper/). Most Chia forks copies nearly 100% of its codebase, with a few edits. In contrast, MMX is written from scratch by Max in C++ code. Both are Proof of Space blockchains. And yes, MMX reuse and enhance some core logic from Chia. Everything else is programming and design choices by Max to create MMX as the most performant and feature rich Proof of Space blockchain. ### Can I farm MMX with Chia plots? No. MMX was written from scratch by Max. He also reworked plot format to make it orders of magnitude more resistant to compression techniques that hit Chia. For an introduction to MMX plot format, read this [article](../../../articles/plotting/plot-format/). ### Will Chia's new plot format affect MMX? No. Chia is planning a future hard fork with a new plot format. Making current Chia plots incompatible over time, forcing a replot. Will not affect MMX plots. MMX already made a similar move with a [new plot format](../../../articles/plotting/plot-format/) in testnet11. Every plot created after that is compatible with current mainnet. MMX plots have their own design, unaffected by changes in Chia. ### Is there a pre-farm? No pre-farm, no pre-mine, no VC funded development. What was were 100% open and communicated incentivized testnets. Starting with testnet8, to reward community providing a realistic environment through initial development. List of incentivized testnets rewards are all public on GitHub ([testnet8/rewards.txt](https://github.com/madMAx43v3r/mmx-node/blob/master/data/testnet8/rewards.txt), [data](https://github.com/madMAx43v3r/mmx-node/blob/master/data)). Used to create mainnet genesis. No hidden pre-mine written into it, only community incentivized rewards. As a sidenote, developers had less than 1% of netspace through testnets. All covered in [whitepaper](../../../articles/general/mmx-whitepaper/). Including testnet rewards, written into mainnet genesis. Over 99% of it to community farmers. :::note[Note] Definition of pre-farm will always be contentious. If comparing or arguing facts above. Also include context, volume, spread, who owns/controls. It should all be scaled and weighted, to get a fair picture. ::: ### Is there a dev fee? There is a project funding fee. It is a 1% fee on *transaction fees*, not block reward. To fund continued development of MMX. More nuances to how it works, read Project Funding section of [whitepaper](../../../articles/general/mmx-whitepaper/). ### Can I help by donating to MMX? Yes. Separate from the project funding fee, Max has set up a donation address ([news post](https://discord.com/channels/852982773963161650/926566475249106974/1349043326032150538)):\ `mmx12wa6h5j7nh9djc0hjqva8ke4m5zgfxjy3dvsj7n9kcrj3luhpyhqx93uud` ([view](https://explore.mmx.network/#/explore/address/mmx12wa6h5j7nh9djc0hjqva8ke4m5zgfxjy3dvsj7n9kcrj3luhpyhqx93uud)) - To help with exchange listings, marketing, bug bounty, etc Donated funds will not be sold now. But rather used as liquidity, bug bounty rewards, or sold later at higher price. ### What is the burn address of MMX? Burn address of MMX:\ `mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev` This is the zero/null address that no one controls, and no private key exists. Any MMX or other assets sent to this address are not retrievable, gone forever. Or 'burned' as it is often referenced. ### Where can I find MMX branding assets? Go to [mmx-assets](https://github.com/madMAx43v3r/mmx-assets) repository. Basic info, logo and assets folders: - [`/logo/artwork/`](https://github.com/madMAx43v3r/mmx-assets/tree/master/logo/artwork/) _(artwork)_ - [`/logo/assets/`](https://github.com/madMAx43v3r/mmx-assets/tree/master/logo/assets/) _(misc)_ - [`/logo/raster/`](https://github.com/madMAx43v3r/mmx-assets/tree/master/logo/raster/) _(.png)_ - [`/logo/vector/`](https://github.com/madMAx43v3r/mmx-assets/tree/master/logo/vector/) _(.svg)_ ================================================ FILE: docs/src/content/docs/faq/node.md ================================================ --- title: Node FAQ description: Frequently asked questions about MMX node. --- ### How do I get started with a node [Download and install](../../../guides/installation/), then [get started](../../../guides/getting-started/). ### "Faulting module" in Windows Make sure you have latest Microsoft Visual C++ Redist installed: - [Microsoft Visual C++ Redistributable](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist) - [Microsoft Visual C++ Redistributable for Visual Studio](https://visualstudio.microsoft.com/downloads/) ### High CPU usage, even synced I'm getting high CPU usage, even when my node is synced to latest blockchain height. Make sure you are performing VDF verification [with GPU/iGPU](../../../guides/optimize-vdf/) (more info in [VDF FAQ](../../../faq/vdf/)). On Linux make sure user has access to GPU/iGPU through the `video` and or `render` groups: ```bash frame="none" sudo adduser $USER video sudo adduser $USER render ``` Check if [timelord](#how-do-i-disable-timelord) has been enabled by accident. ### How do I disable timelord? Timelord should be [disabled by default](../../../faq/timelord/). You can check if it is enabled by looking under SETTINGS in WebGUI. Or check the `config/local/timelord` file. ### What is VDF height? I see two different heights for blocks, both in logs and block explorer. Which is right? Both. Each block in MMX has two heights: - Block `Height` (always the lower value, Network Height) - `VDF Height` (always the higher value) In nearly all cases, block height is what is relevant for normal usage. A block is prepared by timelord every 10 sec, and given an VDF height. About 2% of the time a non-TX block is the result, because of no winning proof. In that case VDF height still increases, but block height stands still. Chain will still adjust itself to 8640 blocks each day, with ~10 sec block interval. Can look at block height as the 'public facing' height, while VDF height is an 'internal clock' height. One example of VDF height usage is FARMER / PROOF tab. You submit proofs that passed plot filter to an VDF height. Block height is unknown at this point. It will depend on potential non-TX blocks before it becomes a block in chain. If your proof [was best](../../../faq/node/#a-plot-with-lower-score-won-the-block), it will be listed with block height under FARMER / BLOCKS tab. Can be tricky to correlate at times. [Time Calculator](../../../tools/time-calculator/) can help show the relation, and lookup or estimate time and date for heights. ### Warning when using mmx CLI command I'm getting a warning when trying one of the `mmx ...` commands:\ `[Proxy] WARN: connect() failed with: xxx (localhost:1133x)` Make sure node is running. Except `mmx wallet create`, all other commands require node running. In Windows, start the MMX CMD shortcut from Start Menu.\ If Linux binary package, enough to open a terminal. If compiled from source on Linux (before using CLI commands): ```bash frame="none" cd mmx-node source ./activate.sh ``` ### List of mmx CLI commands Overview of [CLI commands](../../../software/cli-commands/). ### How is network difficulty calculated? Look Blockhain and Challenge Generation sections of [whitepaper](../../../articles/general/mmx-whitepaper/). ### How do I start farming plots created? I've just created some plots. How do I start farming them? Through SETTINGS in WebGUI, you have a Plot Directory input field below the Harvester section. Input the directory with the plots you have created, press ADD DIRECTORY button. Alternatively you can edit the `config/local/Harvester.json` file: ```json { "num_threads": 32, "recursive_search": true, "reload_interval": 3600, "plot_dirs": [ "E:/MMXplots/", "F:/MMXplots/", "/mnt/Harddisk123/MMXplots/", "/mnt/Harddisk456/MMXplots/" ] } ``` Only use forward slash `/`, even if Windows. Last entry is not followed by a comma `,`. ### A plot with lower score won the block? Score indicates how close your plot has proofs for the challenge. The lower the score, the better the proof. ### Do I need to open ports to communicate? Not really. But you will help the network by allowing incoming connection. If possible, enable port forwarding on `11337` (TCP). Per-default, automatic UPnP port forwarding is enabled. You can disable it through SETTINGS in WebGUI. Or set `"open_port": false,` in `config/local/Router.json` file. ### How do I set up remote harvesters? I've got several computers. Full node on one, and a few remote harvesters. How do I set them up? Look [Remote Services](../../../guides/remote-services/) guide. ### My node says it has forked from network Should rarely happen with mainnet. If forked, and not automatically getting back to synced. You can try to revert DB to a height about 1000 blocks before node got stuck. Through SETTINGS in WebGUI, try the `Revert DB to height` option.\ If using CLI, try the `mmx node revert ` command. ### I suspect my DB is corrupted :::note[Note] Make sure you really want to try syncing from scratch. Will take some time ::: :::danger[Warning] Make sure you only delete the DB directory. Not directories with important information like wallets, which you already should have [secure backups](../../../articles/wallets/wallets-mnemonic-passphrase/#backup) of. ::: To force a 100% sync from scratch. Stop the node, delete following directory: - Windows: `C:\Users\\.mmx\mainnet\db\` - Linux: `~/.mmx/mainnet/db/` - Linux: `~/mmx-node/mainnet/db/` Start the node again. A clean sync will start from height 0. ### "Warning! UnhandledException" in Windows If starting MMX Node fails with a `Warning! UnhandledException` dialog box, containing `user.config`, `value 0x00`, `invalid character`, `Line 9`, `position 1`. Try the following: - Restart Windows, to make sure no hanging MMX Node processes - Navigate to: `C:\Users\\AppData\Local\madMAx43v3r\MmxGui.exe_Url_xxx\0.0.0.0\` - Rename `user.config` file to `_backup01_user.config` (just in case) - Start MMX Node, new `user.config` created File only contains Windows GUI app specific configuration. If fixed, go through Windows specific options in MMX Node and check that ok. Probable cause for this looks to be unclean shutdown of MMX Node, corrupting file. Maybe a Windows bluescreen. ### "CUDA failed" messages If you get `CUDA failed` in logs, maybe with `Proof verification failed`. MMX Node has problems interfacing with the Nvidia CUDA library on your OS. MMX Node will try to use CUDA (Nvidia GPU) for farming and proof verify, if present. For VDF verify it tries to use OpenCL (NVidia/AMD/Intel GPU). Both will fallback to CPU if not present. If problems with CUDA, try to disable it under SETTINGS in WebGUI (CUDA / Enable CUDA compute). Or set `"enable": false,` in `config/local/cuda.json` file. You can also try to update or match other versions of CUDA platform on your OS. The interface between compiled programs and CUDA versions are fickle. In most cases farming and proof verify is light work for a CPU. Unless you have a very large farm, or too high compression on your plots. ================================================ FILE: docs/src/content/docs/faq/plotting.md ================================================ --- title: Plotting FAQ description: Frequently asked questions about MMX plotting. --- ### What plot sizes are supported? From k29 to k32. Average sizes below, with C0 compression (0%). | | `k29` | `k30` | `k31` | `k32` | | :--- | :--- | :--- | :--- | :--- | | `hdd` | 36.4 GiB | 75.2 GiB | 155.3 GiB | 320.4 GiB | | `sdd` | 14.7 GiB | 30.3 GiB | 62.3 GiB | 128.4 GiB | Articles with intro on MMX [plot format](../../../articles/plotting/plot-format/), and details on [plot size](../../../articles/plotting/plot-size/). ### Difference between HDD and SSD-plots? Both are just `.plot` files you store somewhere and farm. Per-default named: ```bash frame="none" plot-mmx-hdd-kxx-cx-.plot plot-mmx-ssd-kxx-cx-.plot ``` Difference is that SSD-plots are a type of pre-compressed plots, missing hashes. Reconstructed on-the-fly when farming, but requires very high disk IOPS. Storing them on regular spinning HDD will not work. It balances cost/reward potential between SSD and HDD storage (2.5x SSD advantage, but more expensive media). Given identical k-size, SSD-plots has same effective space on network as HDD-plots. Recommended to use C0 for compression (0%) on SSD-plots, because of the high IOPS. ### What k-size and C-compression should I plot? That depends on your hardware. Minimum k-size of k29 requires 64GB to plot all in RAM. If you only have 32GB RAM and large/fast NVMe, you can try plotting with partial RAM. Or you can disk plot k32. If you have 128GB or 256GB RAM, you should try to plot the largest k-size possible (k30, k31, all in RAM). With maximum supported compression level C15, there is about 4% difference between C0 non-compressed and C15. You will have to evaluate yourself if those few extra GB are worth the extra farming compute. Those 1-4% are a long way from the +200% with other Proof of Space. Some think C1-C5 is where it matters. Others use C0 as a principle, or peace of mind. Your harvesting CPU power and farm size can also be a guide. Maybe ~C3 with low-power CPU, and ~try C5/C6 with high-power CPU. You can run the [benchmark](../../../guides/mmx-plotter/#benchmark) tool to see what compression level your hardware can handle or read the full [Plotting Guide](../../../guides/mmx-plotter/). ### Can I create plots for pooling? Yes, you can create poolable plots using a PlotNFT contract. You first have to create the PlotNFT contract, which requires about 0.1 MMX. If you do not have 0.1 MMX currently, ask in Discord. Somebody will probably be nice. You then use the PlotNFT contract address when creating the plots with the `-c ` option. By default the PlotNFT will be set to solo. Read more about pooling under [Creating Plots](../../../guides/mmx-plotter/#creating-plots) in Plotting Guide, and [Pooling](../../../software/cli-commands/#pooling) in CLI Commands. ### Plot speed, temp space and other stats? Here are a few resources for some stats. **Final plot sizes for k29/k32 and C0/C15:**\ Topic of [this article](../../../articles/plotting/plot-size/).\ Miscellaneous tab of [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1EROCHCRJczwlohun0Wx0d2mzCzDrOMoMm-OEB-3voFE/). **Temp space and disk writes needed for plotting:**\ Plotting section of [this article](../../../articles/plotting/plot-format/#plotting).\ Miscellaneous tab of [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1EROCHCRJczwlohun0Wx0d2mzCzDrOMoMm-OEB-3voFE/). **How fast are others plotting:**\ Look in tabs of [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1EROCHCRJczwlohun0Wx0d2mzCzDrOMoMm-OEB-3voFE/). ### Benefits of plotting and farming higher k-size? A single k31 plot has roughly the size of two k30 plots. It is also twice as likely to find a proof. However, as seen above, plotting a higher k-size also requires higher allocation of resources, and longer plotting time. For a small farm with a total number of plots less than 10000, plotting k30 is fine. For a large farm, it is better to plot higher k-size plots to minimize the lookup time for finding proofs at every block height. Lookup times of < 1 sec is considered good, < 3 sec is acceptable, whereas higher than 5 sec risks losing block rewards. ### Plotting stuck in Phase 1, [P1] Table 1? Maybe not, be patient. Phase 1, table 1 is very compute heavy and takes more than 50% of plot time (if full RAM plotting). In most cases you are limited by the compute capabilities of your GPU. If no error returned, wait at least 5 minutes before assuming it is stuck. ### Can I use RAMdisk to make plots? Plotter uses the RAM directly, no need to involve a RAMdisk. ### How much temp space is needed? | | Size | Full RAM | Partial RAM | Disk/Partial RAM | | :--- | :--- | :--- | :--- | :--- | | k29 | 36 GiB | 61 GiB | 39 GiB | 22 GiB | | k30 | 75 GiB | 116 GiB | 68 GiB | 46 GiB | | k31 | 155 GiB | 226 GiB | 126 GiB | 88 GiB | | k32 | 320 GiB | 446 GiB | 246 GiB | 177 GiB | :::note[Note] Numbers above are just an approximation. ::: ### How to make plotter log each plot created? At the end of the command, add:\ `2>&1 | tee /home/user/desired_path/filename.log` Example (Linux): ```bash frame="none" ./mmx_cuda_plot 2>&1 | tee /home/user/desired_path/filename.log ``` ================================================ FILE: docs/src/content/docs/faq/timelord.md ================================================ --- title: TimeLord FAQ description: Frequently asked questions about MMX timelord. --- ### Do I need to run a timelord? No. Running a timelord is optional (default is disabled). Not needed to run a fully functional node. Blockchain, as a whole, only need one active timelord to move forward. A few more, spread around, is preferred for redundancy and security. You will not get any more or less block rewards by running a timelord on your farming node. If you want to contribute by running one, check [requirements](../../articles/timelord/timelord-optimizations/#requirements) in this [article](../../articles/timelord/timelord-optimizations/). Enable timelord in WebGUI, or set `true` in `config/local/timelord` file. Check that running, and speed, in NODE / LOG / TIMELORD tab in WebGUI. Probably lower than NODE / VDF Speed, unless you are the fastest timelord. ### Rewards for running a timelord? Yes, if you are the fastest. Only fastest timelord, at any time, produces VDF for block being created. An on-chain reward of 0.2 MMX is given every 20 blocks to fastest timelord. Potentially 86.4 MMX per day. More info about [logic](../../articles/timelord/timelord-optimizations/#logic) and how to know you are [fastest timelord](../../articles/timelord/timelord-optimizations/#fastest-timelord) in this [article](../../articles/timelord/timelord-optimizations/). ### I want to be the fastest timelord Read following articles, [TimeLord Optimizations](../../articles/timelord/timelord-optimizations/) and [TimeLord Predictions](../../articles/timelord/timelord-predictions/). Join the [`#mmx-timelord`](https://discord.com/channels/852982773963161650/1026219599311675493) channel on Discord. ### Why not a GPU/FPGA/ASIC timelord? Timelord logic will only use CPU, not GPU. GPU is great for parallel SHA256 calculations, beating CPU in both speed and efficiency. GPU is used for verify VDF operation on a node, if available. For a single SHA256 calculation, CPU's SHA extensions will beat GPU on speed. As timelord SHA256 workload is not parallelizable, CPU wins the serial SHA256 race. Feedback welcome on other contenders. As of now, nothing observed beating a high-GHz CPU with SHA extensions (optimized silicon circuits inside CPU). Too low speed (GHz) on FPGA, work not parallelizable. Prohibitive cost to produce a high-GHz ASIC that beats Intel/AMD optimized silicon. ================================================ FILE: docs/src/content/docs/faq/vdf.md ================================================ --- title: VDF FAQ description: Frequently asked questions about MMX verified delay function (VDF). --- ### Why do I need to verify VDF as a farmer? A Verifiable Delay Function (VDF), is the Time part of Proof of Space (and Time). Time is proved through a sequential function executed a number of times. - Verifiable: Verifier can verify the proof in a shorter amount of time than it took to generate. - Delay: It proves that a certain amount of real time has elapsed. - Function: It is deterministic, computing input x always yields the same result y. VDF verify requires either a modern multi-core CPU, or a decent GPU/iGPU. ### What GPU/CPU do I need to verify VDF? You want your VDF verify below 5 sec. It is directly related to current speed of [fastest timelord](../../../articles/timelord/timelord-predictions/#tldr). Nvidia's GT1030 is affordable, power efficient and does VDF verifications in < 3 seconds, while GTX1650 in < 1 second. For best results, devices which support >= OpenCL 1.2 are recommended. It has been shown that OpenCL 1.1 devices can verify VDFs, but performance is significantly lower. Additional requirement of installing specific drivers to support the older cards can be challenging. Also possible to use iGPU (integrated graphics). If the iGPU is powerful enough. Many newer CPUs with SHA extensions are capable of verifying VDF. Not as power efficient as GPU, but possible. For a list of supported GPUs, look [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1LqyZut0JBwQpbCBnh73fPXkT-1WbCYoXVnIbf6jeyac/).\ For a list of GPU/CPU VDF times, look [this Google spreadsheet](https://docs.google.com/spreadsheets/d/1NlK-dq7vCbX4NHzrOloyy4ylLW-fdXjuT8468__SF64/). :::note[Note] VDF verify logic was reduced to 1 stream with mainnet, vs. 2 or 3 in testnets. Numbers for testnets are probably too pessimistic. ::: ### My node is warning of VDF verification times If you get any of these two warnings, you need to check why your VDF verify times are so high:\ `VDF verification took longer than recommended ...`\ `VDF verification took longer than block interval ...` Verification times below 3 sec are good, whereas anything > 5 seconds is bad. If you are above 5 sec, you will get warning messages. [Check](#what-gpucpu-do-i-need-to-verify-vdf) that your GPU/CPU is powerful enough to verify VDF. If using GPU, [check](#how-do-i-know-if-node-is-using-gpu-for-vdf) that verification really is performed on it (and not CPU). ### How do I know if node is using GPU for VDF? To be absolutely sure node is using GPU for VDF verify. Start node, and check: ``` [Node] INFO: Found OpenCL GPU device 'NVIDIA GeForce GT 1030' [0] (NVIDIA CUDA) [Node] INFO: Using OpenCL GPU device 'NVIDIA GeForce GT 1030' [0] (NVIDIA CUDA) ``` First one means the node found OpenCL device. Second one `Using OpenCL GPU` indicates node is actually using the device. If multiple GPU devices, can configure which one under SETTINGS in WebGUI. ### How to make sure OpenCL is setup correctly? Go through the [OpenCL Setup](../../../guides/optimize-vdf/) guide. Then check that OpenCL platform and device drivers really are installed and active. On Linux, check output of `clinfo -l` command: ``` Platform #0: NVIDIA CUDA `-- Device #0: NVIDIA GeForce GT 1030 ``` On Windows (evaluate yourself if this 3rd-party utility is ok for you):\ [OpenCL Hardware Capability Viewer](https://opencl.gpuinfo.org/download.php) ### Node and OpenCL is configured, only CPU used? Might not be a problem. When node is performing initial sync of blockchain DB, only CPU will be used. Any OpenCL GPU device will not be used for VDF verify until node is in sync with network. VDF verify is only performed every 10 sec (blocktime). If your GPU is somewhat powerful, that compute of VDF verify is a 'blip' of less than 1 sec. ================================================ FILE: docs/src/content/docs/faq/wallet.md ================================================ --- title: Wallet FAQ description: Frequently asked questions about MMX wallet. --- ### Warning of "no wallet available" I'm getting a warning line in WebGUI and/or log file:\ `Failed to get reward address from wallet: no wallet available` Farmer needs a wallet address to send potential rewards to. It is a warning that no farmer reward address has been set, and there are no wallets created that farmer can default its rewards to. If you really are farming with plots, make sure farmer is sending rewards to correct address. You can get information about creating wallets and setting farmer reward address in the [Getting Started](../../guides/getting-started/) guide. ================================================ FILE: docs/src/content/docs/faq/webgui.md ================================================ --- title: WebGUI FAQ description: Frequently asked questions about MMX web interface (WebGUI). --- ### How do I access the WebGUI? If running Windows install or desktop Linux binary package. You already have access to WebGUI, wrapped as UI inside the application window. If running mmx-node in the background on Linux, or just want to access the WebGUI through a browser. It is available locally on machine: http://localhost:11380/gui/ When accessed through a browser, you need to give a password. It is a randomly generated one, usually located here: - Windows: `C:\Users\\.mmx\PASSWD` - Linux: `~/.mmx/PASSWD` - Linux: `~/mmx-node/PASSWD` In all cases MMX Node needs to be started, or mmx-node running in background. ### How do I access the WebGUI remotely? Per-default, WebGUI is only exposed on localhost. You need to browse to it on machine it is running on. Through an unsecured `http` connection. It is possible to access it remotely. Either through an SSH tunnel (recommended), or opening up for external connections (not recommended). :::danger[Warning] Make sure you understand the security risks, consequences, and measures needed if performing any of the steps below. The connection is unsecured `http`, and need to go over a 100% trusted network. Where no one can capture your network traffic to get access to sensitive information like passwords or wallets. ::: Recommended way is to tunnel port `11380` through an SSH connection, from remote WebGUI machine. Making you able to browse and login locally on machine you have SSH'ed from. The security of the SSH connection will protect the unsecured `http` traffic. You can get some tips in [Remote Services](../../../guides/remote-services/#remote-connections-over-public-networks) guide. Not recommended way is to configure mmx-node's internal `HttpServer` to answer external connection requests. Edit `config/local/HttpServer.json` file to `"host": "0.0.0.0",` (default: `"host": "localhost",`). Now, after a restart, it will answer to external connection requests. Need to also check if OS firewall is blocking incoming requests on port `11380`. If machine with WebGUI has IP `192.168.1.10`, and reachable from your machine: http://192.168.1.10:11380/gui/ ================================================ FILE: docs/src/content/docs/guides/docker.md ================================================ --- title: Docker Usage description: Examples for using pre-built docker images --- ## Node Containers Docker images are available via `ghcr.io/madmax43v3r/mmx-node` in 2 build flavours: - `latest`: Built from the most recent release version - `edge`: Built from the most recent commit to the master branch The following tag suffixes are also available for GPU vendor specific builds: - `-amd` - `-intel` - `-nvidia` Additionally, each semver tag produces tagged images: - `..` - `.` - `` - each with their respective suffix (eg. `1.1.9-amd`) Each image provides a volume for `/data` which you can override with your own volume or a mapped path to customize the storage location of the node data. ### CPU only A `compose.yml` for the cpu only node can look like this: ```yml services: node: image: ghcr.io/madmax43v3r/mmx-node:latest restart: unless-stopped volumes: - /some/path/to/mmx-node:/data ports: - "11337:11337" # Node p2p port. Forward your router to this port for peers to be able to connect - "127.0.0.1:11380:11380" # API port. Set host to 0.0.0.0 in /data/config/local/HttpServer.json for webUI/API access #- "11333:11333" # Harvester port. Uncomment to allow remote harvesters to connect to the farmer #- "11330:11330" # Farmer port. Uncomment to allow remote farmers to connect to the node environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters/farmers MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester MMX_FARMER_ENABLED: 'true' # Set to false to disable local farmer ``` ### AMD GPU For amd gpu support please see the following `compose.yml`: ```yml services: node: image: ghcr.io/madmax43v3r/mmx-node:latest-amd restart: unless-stopped devices: - /dev/dri:/dev/dri - /dev/kfd:/dev/kfd volumes: - /some/path/to/mmx-node:/data ports: - "11337:11337" # Node p2p port. Forward your router to this port for peers to be able to connect - "127.0.0.1:11380:11380" # API port. Set host to 0.0.0.0 in /data/config/local/HttpServer.json for webUI/API access #- "11333:11333" # Harvester port. Uncomment to allow remote harvesters to connect to the farmer #- "11330:11330" # Farmer port. Uncomment to allow remote farmers to connect to the node environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters/farmers MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester MMX_FARMER_ENABLED: 'true' # Set to false to disable local farmer ``` ### Intel GPU For intel gpu support please see the following `compose.yml`: ```yml services: node: image: ghcr.io/madmax43v3r/mmx-node:latest-intel restart: unless-stopped devices: - /dev/dri/renderD128:/dev/dri/renderD128 volumes: - /some/path/to/mmx-node:/data ports: - "11337:11337" # Node p2p port. Forward your router to this port for peers to be able to connect - "127.0.0.1:11380:11380" # API port. Set host to 0.0.0.0 in /data/config/local/HttpServer.json for webUI/API access #- "11333:11333" # Harvester port. Uncomment to allow remote harvesters to connect to the farmer #- "11330:11330" # Farmer port. Uncomment to allow remote farmers to connect to the node environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters/farmers MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester MMX_FARMER_ENABLED: 'true' # Set to false to disable local farmer ``` :::note[Note] Intel ARC support requires a host system running Linux Kernel 6.3 or above. ::: ### NVIDIA GPU For Nvidia gpu support please see the following `compose.yml`: ```yml services: node: image: ghcr.io/madmax43v3r/mmx-node:latest-nvidia restart: unless-stopped runtime: nvidia volumes: - /some/path/to/mmx-node:/data ports: - "11337:11337" # Node p2p port. Forward your router to this port for peers to be able to connect - "127.0.0.1:11380:11380" # API port. Set host to 0.0.0.0 in /data/config/local/HttpServer.json for webUI/API access #- "11333:11333" # Harvester port. Uncomment to allow remote harvesters to connect to the farmer #- "11330:11330" # Farmer port. Uncomment to allow remote farmers to connect to the node environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters/farmers MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester MMX_FARMER_ENABLED: 'true' # Set to false to disable local farmer ``` :::note[Note] For Nvidia you also need the `NVIDIA Container Toolkit` installed on the host, for more info please see: [Installing the NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html). ::: ## Remote Services Running a remote harvester or farmer can be done by overwriting the `CMD` of the Dockerfile, for example like this: ### Remote Harvester - Set `MMX_ALLOW_REMOTE` to `true` in the node or farmer compose.yml - Make sure port 11333 is uncommented/exposed in the node or farmer compose.yml - Edit the following example with the node or farmers ip address and correct paths ```yml services: harvester: image: ghcr.io/madmax43v3r/mmx-node:latest restart: unless-stopped command: './run_harvester.sh -n ' volumes: - /some/path/to/mmx-node:/data - /some/path/to/disks:/disks ``` ### Remote Farmer - Set `MMX_ALLOW_REMOTE` to `true` in the node compose.yml - To allow remote harvesters to connect to this farmer set `MMX_ALLOW_REMOTE` to `true` in the example below - Make sure port 11330 is uncommented/exposed in the node compose.yml - Edit the following example with the node ip address and correct data path ```yml services: farmer: image: ghcr.io/madmax43v3r/mmx-node:latest restart: unless-stopped command: './run_farmer.sh -n ' volumes: - /some/path/to/mmx-node:/data ports: - "11333:11333" # Farmer listens on this port for remote harvester connections environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester ``` ================================================ FILE: docs/src/content/docs/guides/getting-started.md ================================================ --- title: Getting Started description: Getting started with MMX. --- **[Install](../installation/) MMX-Node.** ## GUI The native GUI can be opened by searching for `MMX Node` (when installed via binary package). In case of compiling from source: ```bash frame="none" ./run_node.sh --gui # includes wallet and farmer ./run_wallet.sh --gui # remote wallet (connect to another node) ``` ### WebGUI The WebGUI is available at: http://localhost:11380/gui/ See `$MMX_HOME/PASSWD` or `mmx-node/PASSWD` for the login password, it is auto generated at compile time. In case of a binary package install, the password will be in `~/.mmx/PASSWD`. By default, the GUI is only available on localhost. ## CLI When compiled from source: ```bash frame="none" cd mmx-node source ./activate.sh ``` With a binary package install, just open a new terminal. On Windows search for `MMX CMD`. :::note[Note] A new wallet can also be created in the GUI. ::: ### Creating a Wallet (offline) ```bash frame="none" mmx wallet create [-f filename] [--with-passphrase] ``` The file name argument is optional. By default it is `wallet.dat`, which will be loaded automatically. Additional wallets need to be added to `key_files` array in `config/local/Wallet.json`. To use a passphrase, specify `--with-passphrase` without the actual passphrase: ```bash frame="none" mmx wallet create --with-passphrase Passphrase: ``` To create a wallet with a known mnemonic seed, specify `--with-mnemonic` without the actual words: ```bash frame="none" mmx wallet create --with-mnemonic Mnemonic: word1 word2 ... ``` To get the mnemonic seed from a wallet (with Node / Wallet already running): ```bash frame="none" mmx wallet get seed [-j index] ``` :::note[Note] A Node / Wallet restart is needed to pick up a new wallet. ::: ### Creating a Wallet (online) With a running Node / Wallet: ```bash frame="none" mmx wallet new [name] [--with-mnemonic] [--with-passphrase] [-N ] ``` All parameters are optional. The new wallet can be seen with `mmx wallet accounts` (last entry). To use a known mnemonic seed, specify `--with-mnemonic` without the actual words. Then input the words when promted, with a space inbetween them. To use a passphrase, specify `--with-passphrase` without the actual passphrase. Then input the passphrase when promted. ### Running a Node First perform the installation and setup steps, then: ```bash frame="none" ./run_node.sh ``` You can enable port forwarding on TCP port 11337, if you want to help out the network and accept incoming connections. ### Configuration :::note[Note] Capitalization of configuration files names matters.\ Any config changes require a node restart to become effective. ::: #### Custom Farmer Reward Address Create / Edit file `config/local/Farmer.json`: ```json { "reward_addr": "mmx1..." } ``` By default the first address of the first wallet is used. #### Custom Timelord Reward Address Create / Edit file `config/local/TimeLord.json`: ```json { "reward_addr": "mmx1..." } ``` #### Fixed Node Peers Create / Edit file `config/local/Router.json`: ```json { "fixed_peers": ["192.168.0.123", "more"] } ``` #### Enable Timelord ```bash frame="none" echo true > config/local/timelord ``` #### CUDA Settings Create / Edit `config/local/cuda.json`: ```json { "enable": true, "devices": [0, 1, ...] } ``` Empty device list = use all devices. Device indices start at 0. CUDA is enabled by default for all devices. #### Custom home directory To set a custom storage path for the blockchain DB, wallet files, etc: ```bash frame="none" export MMX_HOME=/your/path/ ``` Wallet files will end up in `MMX_HOME`, everything else in `mainnet` subfolder. When compiling from source, `MMX_HOME` is not set, so it defaults to the current directory. When installing a binary package `MMX_HOME` defaults to `~/.mmx/`. :::note[Note] A trailing `/` in the path is required. ::: #### Custom data directory To store the DB in a custom directory you can set environment variable `MMX_DATA` (for example): ```bash frame="none" export MMX_DATA=/mnt/mmx_data/ ``` A node restart is required. Optionally the `mainnet` folder can be copied to the new `MMX_DATA` path (after stopping the node), to avoid having to sync from scratch again. :::note[Note] A trailing `/` in the path is required. ::: #### Reducing network traffic If you have a slow internet connection or want to reduce traffic in general you can lower the number of connections in `config/local/Router.json`. For example to run at the bare recommended minimum: ```json { "num_peers_out": 4, "max_connections": 4 } ``` `num_peers_out` is the maximum number of outgoing connections to synced peers. `max_connections` is the maximum total number of connections. Keep in mind this will increase your chances of losing sync. Another more drastic measure is to disable relaying messages to other nodes, by setting `do_relay` to `false` in `config/local/Router.json`. However this will hurt the network, so please only disable it if absolutely necessary. ### Running in background To run a node in the background you can enter a `screen` session: ```bash frame="none" screen -S node # start node as above # + D # to detach screen -r node # to attach again ``` ### Recover from forking To re-sync starting from a specific height: `mmx node revert `. This is needed if for some reason the node forked from the network. Just subtract 1000 blocks or more from the current height you are stuck at. ## Plotting **For an in depth guide on plotting, see** [Plotting Guide](../mmx-plotter/). To get the farmer key for plotting: ```bash frame="none" mmx wallet keys [-j index] ``` The node needs to be running for this command to work. (`-j` to specify the index of a non-default wallet) Via GUI the farmer key can be found in Wallet > Info section, see `farmer_public_key`: ![image](https://github.com/madMAx43v3r/mmx-node/assets/951738/7ebc8eaa-d0f9-43fd-bb87-0788a59b138a) :::note[Note] During plotting, the node does not need to be running (the plotter doesn't even need internet connection). ::: Download CUDA plotter here: [mmx-binaries/mmx-cuda-plotter](https://github.com/madMAx43v3r/mmx-binaries/tree/master/mmx-cuda-plotter) There is no CPU plotter anymore for the new format, because it would be too inefficient. Any old Nvidia GPU will do, Maxwell or newer. ```bash frame="none" # Example Full RAM: ./mmx_cuda_plot_k30 -C 5 -n -1 -t /mnt/tmp_ssd/ -d -f # Example Partial RAM: ./mmx_cuda_plot_k30 -C 5 -n -1 -2 /mnt/tmp_ssd/ -d -f # Example Disk Mode: ./mmx_cuda_plot_k30 -C 5 -n -1 -3 /mnt/tmp_ssd/ -d -f ``` If you would like to use compressed plots, it is recommended that you run the mmx_posbench tool to benchmark your hardware. To create SSD plots (for farming on SSDs) add `--ssd` to the command and use `-C 0`. SSD plots are 250% more efficient but cannot be farmed on HDDs. They have higher CPU load to farm, hence it's recommended to plot uncompressed. The minimum k-size for mainnet is k29, the maximum k-size is k32. To add a plot directory add the path to `plot_dirs` array in `config/local/Harvester.json`, for example: ```json { "plot_dirs": [ "/mnt/drive1/plots/", "/mnt/drive2/plots/", "C:/windows/path/example/" ] } ``` Directories are searched recursively by default. To disable recursive search you can set `recursive_search` to `false` in `Harvester.json`. For the above reason, avoid adding a root directory (e.g. `H:\`), unless your drive only contains plots. Instead, make a folder and place all your plots in there (e.g. `H:\MMX Plots\`). ================================================ FILE: docs/src/content/docs/guides/installation.md ================================================ --- title: Installation Guide description: How to install MMX Node. --- ## Windows Windows installers are available here: [mmx-node/releases](https://github.com/madMAx43v3r/mmx-node/releases) :::note[Note] You might need to install or update [Microsoft Visual C++ Redistributable for Visual Studio 2022](https://visualstudio.microsoft.com/downloads/). Scroll down to "Other Tools". ::: ## Linux Linux binary packages are available here: [mmx-node/releases](https://github.com/madMAx43v3r/mmx-node/releases) To install a binary package: ```bash frame="none" sudo apt install ~/Downloads/mmx-node-1.1.7-amd64-ubuntu-20.04.deb ``` This will automatically install dependencies as well. When no matching package is found, continue below to build from source. ### Dependencies Ubuntu Linux: ```bash frame="none" sudo apt update sudo apt install git cmake build-essential automake libtool pkg-config curl libminiupnpc-dev libjemalloc-dev libzstd-dev zlib1g-dev ocl-icd-opencl-dev clinfo screen # Optional dependencies: sudo apt install qtwebengine5-dev # for native GUI sudo apt install nvidia-cuda-toolkit # for CUDA compute (farming) ``` Arch Linux: ```bash frame="none" sudo pacman -Syu sudo pacman -S base-devel git cmake curl miniupnpc jemalloc zstd zlib opencl-headers ocl-icd clinfo screen # Optional dependencies: sudo pacman -S qt5-webengine # for native GUI sudo pacman -S cuda # for CUDA compute (farming) ``` Fedora Linux: ```bash frame="none" sudo yum install kernel-devel git cmake automake libtool curl gcc gcc-c++ miniupnpc-devel jemalloc-devel ocl-icd-devel zlib-ng-devel zstd clinfo screen # Optional dependencies: sudo yum install qt5-qtwebengine-devel # for native GUI ``` :::note[Note] To enable CUDA support, CUDA needs to be installed: [CUDA Toolkit Downloads](https://developer.nvidia.com/cuda-downloads). ::: ### Building from Source ```bash frame="none" git clone https://github.com/madMAx43v3r/mmx-node.git cd mmx-node ./update.sh ``` To disable QT GUI: `./update.sh -D DISABLE_QT=1`\ To disable CUDA support: `./update.sh -D DISABLE_CUDA=1`\ These settings are stored, until the next `./clean_all.sh`, so only needs to be specified once. To enable again, set the config to `0`. To update to latest version: ```bash frame="none" ./update.sh ``` ### Rebuilding If the build is broken for some reason: ```bash frame="none" ./clean_all.sh ./update.sh ``` This is needed when updating system packages for example. ## Windows via WSL To setup Ubuntu 20.04 in WSL on Windows you can follow the tutorial over here:\ [Get started with Windows Subsystem for Linux](https://docs.microsoft.com/en-us/learn/modules/get-started-with-windows-subsystem-for-linux/) In steps, make sure to install: [Ubuntu on Windows](https://www.microsoft.com/store/p/ubuntu/9nblggh4msv6) Then type "Ubuntu" in the start menu and start it, you will be asked to setup a user and password. After that you can follow the normal instructions for Ubuntu 20.04. To get OpenCL working in WSL: [OpenCL coming to WSL](https://devblogs.microsoft.com/commandline/oneapi-l0-openvino-and-opencl-coming-to-the-windows-subsystem-for-linux-for-intel-gpus/) ## Custom storage path To change the storage path for everything you can set environment variable `MMX_HOME` to `/your/path/` (trailing slash required). By default the current directory is used, ie. `mmx-node`. ## Testnet To run a node on testnet: `echo testnet13 > NETWORK` and restart.\ To switch back to mainnet: `rm NETWORK` and restart. Alternatively, it's possible to run testnet in parallel via docker:\ [mmx-node/scripts/docker/mmx-testnet](https://github.com/madMAx43v3r/mmx-node/tree/master/scripts/docker/mmx-testnet) ================================================ FILE: docs/src/content/docs/guides/mmx-plotter.mdx ================================================ --- title: Plotting Guide description: MMX Plotter is a tool for creating plots for the MMX blockchain. --- import { Tabs, TabItem } from '@astrojs/starlight/components'; ## MMX Plotting The MMX CUDA plotter is available at [mmx-binaries](https://github.com/madMAx43v3r/mmx-binaries). The source code for the plotter can be found at [mmx-cuda-plotter](https://github.com/madMAx43v3r/mmx-cuda-plotter). A CUDA GPU is required for plotting due to the compression resistant plot format, since plotting on CPU would take too long. The format is compression resistant, but not incompressible. The current plotter allows for compression of up to C15, which only gives a gain of 4.5% in rewards, but at the cost of significant CPU load. C10 can be farmed on most modern CPUs while still giving a gain of 3%. Larger capacity hard drives may struggle to seek quickly enough when full of k29 plots. Hence for drives over 16TB k30 is the minimum recommended size. ### Available k-sizes with plotting requirements | k-size | HDD-size | SSD-size | Full RAM | Partial RAM | Disk/Partial RAM | | :--- | :--- | :--- | :--- | :--- | :--- | | `k29` | 36 GiB | 15 GiB | 61 GiB | 39 GiB | 22 GiB | | `k30` | 75 GiB | 30 GiB | 116 GiB | 68 GiB | 46 GiB | | `k31` | 155 GiB | 62 GiB | 226 GiB | 126 GiB | 88 GiB | | `k32` | 320 GiB | 128 GiB | 446 GiB | 246 GiB | 177 GiB | :::note[Note] All values are for C0 compression and are approximate based on observations while plotting. Due to differences in the tables, final plot sizes may vary. For k32 a difference of ~3 GiB between largest to smallest plot files have been observed. More in depth look at plot sizes in [this article](../../../articles/plotting/plot-size/). ::: :::note[Note] Full RAM, and Partial RAM refer to plotting modes. Disk space is what is needed by `-2` with partial RAM plotting. When using full disk mode plotting, temp space required for `-3` is the same as Partial RAM requirements. If `-3` and `-2` are the same drive, use the Full RAM space as a reference. ::: :::caution[Caution] The RAM Requirements above were tested to work on linux. Due to quirks of memory usage on Windows OS, it may not be possible to plot k31 in partial ram on a system with 128GB of RAM. ::: ## Compression The MMX CUDA Plotter supports compression levels C0 to C15. Farming compressed plots is currently only supported on CPU. However recomputing a full proof on HDD plots is only required when a good enough quality has been found, either to make a block or to make a partial. GPU recompute would only add a few extra percent of gains, at the cost of needing a (big) GPU to sit idle most of the time (in case of HDD plots). GPU recompute for farming lots of (uncompressed) SSD plots is planned, as this is the only use case where it makes sense. Since SSD plots always need to recompute the proof output hash (quality), meaning the compute load is proportional to number of plots. ### HDD Plots C15 is _possible_ to farm on CPU, but only with ~64 cores or more. It is not recommended to use C15 as the gain over C10 is minimal (1.5%). C10-C12 can be handled by most modern CPUs. C5 can be farmed on almost any CPU, with minimal power draw. When making NFT plots, it is recommended to use a lower C level (3-5 levels lower) since more proofs need to be computed when pooling (one for each partial). The compute load when farming HDD plots is independent of the number of plots. The challenge is computing a full proof fast enough to make a block or partial in time. ### SSD Plots SSD plots are 2.5x smaller than HDD plots. They cannot be farmed on HDDs (even in a RAID array) due to the high IOPS required to farm them (proportional to plot count). The CPU load to farm SSD plots is already quite high with C0, as such C0 is recommended when making SSD plots. Higher k-size reduces CPU and IOPS load. As such the most efficient SSD plots are k32 C0, with k29 having 8x higher CPU and IOPS load. k32 C3 is equal to k29 C0 in terms of CPU load. Farming 1024 uncompressed SSD plots is the same compute load as computing a single C10 full proof. ### Benchmark Before plotting with compression a benchmark should be performed to check if your system can handle it: ```bash frame="none" mmx_posbench -k 31 -C 10 # to benchmark k31 C10 mmx_posbench --cuda 0 -k 31 -C 10 # to benchmark on CPU mmx_posbench --devices 1 2 -k 31 -C 10 # to select specific CUDA devices (starting at 0) ``` ## Creating Plots To create plots you will need a Farmer Public Key, and optionally a PlotNFT contract address (for NFT plots). To get the Farmer Public Key, see `mmx wallet keys` or go to the `Info` tab under the wallet in the GUI. For PlotNFT contract address, see [Pooling](../../software/cli-commands/#pooling). ### Command Line Reference To use the plotter via command line, navigate to the directory containing the plotter binaries and run the following command (replace `mmx_cuda_plot_k30` with the appropriate binary for your desired k-size): For full Ram plotting, `-t` is used to temporarily store the the finished plot before moving it to the destination `-d`, RAM is used for the entire plotting process. ```bash frame="none" ./mmx_cuda_plot_k30 -C 5 -n -1 -t /mnt/tmp_ssd/ -d /mnt/farmdrive/ -f ``` For partial RAM plotting, `-2` is used to store temporary working files before moving the finished plot to `-t` and then to `-d`. RAM is used for the most write intensive parts of the plotting process. If `-t` is not specified, the plotter will set the `-t` argument to the same value as `-2`. ```bash frame="none" ./mmx_cuda_plot_k30 -C 5 -n -1 -t /mnt/tmp_ssd/ -2 /mnt/tmp_ssd/ -d /mnt/farmdrive/ -f ``` For disk mode plotting, `-3` takes the place of RAM and is used for write intensive temporary files. You can use a different drive for `-2` if desired, the faster of the two drives should be used for `-3`. If `-2` or `-t` are not specified, the plotter will set the value of both to the same value as `-3`. ```bash frame="none" ./mmx_cuda_plot_k30 -C 5 -n -1 -t /mnt/tmp_ssd/ -2 /mnt/tmp_ssd/ -3 /mnt/tmp_ssd/ -d /mnt/farmdrive/ -f ``` To send finished plots to multiple destinations, use the `-d` argument multiple times. For example: ```bash frame="none" ./mmx_cuda_plot_k30 -C 5 -n -1 -t /mnt/tmp_ssd/ -d /mnt/farmdrive1/ -d /mnt/farmdrive2/ -f ``` :::note[Note] To simplify sending to multiple destinations over a network, you can use [plot-sink](https://github.com/madMAx43v3r/chia-gigahorse/tree/master/plot-sink). ::: Full Command Line Reference options: ``` Usage: mmx_cuda_plot [OPTION...] -C, --level arg Compression level (0 to 15) --ssd Make SSD plots -n, --count arg Number of plots to create (default = 1, unlimited = -1) -g, --device arg CUDA device (default = 0) -r, --ndevices arg Number of CUDA devices (default = 1) -t, --tmpdir arg Temporary directories for plot storage (default = $PWD) -2, --tmpdir2 arg Temporary directory 2 for partial RAM / disk mode (default = @RAM) -3, --tmpdir3 arg Temporary directory 3 for disk mode (default = @RAM) -d, --finaldir arg Final destinations (default = , remote = @HOST) -z, --dstport arg Destination port for remote copy (default = 1337) -w, --waitforcopy Wait for copy to start next plot -c, --contract arg Pool Contract Address (62 chars) -f, --farmerkey arg Farmer Public Key (33 bytes) -S, --streams arg Number of parallel streams (default = 3, must be >= 2) -B, --chunksize arg Bucket chunk size in MiB (default = 16, 1 to 256) -Q, --maxtmp arg Max number of plots to cache in tmpdir (default = -1) -A, --copylimit arg Max number of parallel copies in total (default = -1) -W, --maxcopy arg Max number of parallel copies to same HDD (default = 1, unlimited = -1) -M, --memory arg Max shared / pinned memory in GiB (default = unlimited) --version Print version -h, --help Print help ``` ================================================ FILE: docs/src/content/docs/guides/optimize-vdf.md ================================================ --- title: OpenCL Setup description: How to improve VDF verification speed. --- Using OpenCL is an optional but highly recommended feature for running MMX.\ Offloading the verification of the VDF to a GPU or iGPU can increase both performance and power efficiency. Once the blockchain is synced, you will see these lines: ``` [Node] INFO: Verified VDF for height 239702, delta = 10.111297 sec, took 0.089002 sec. ``` Which indicates that your node is now verifying the current VDFs as they are received. Your GPU would now be utilized every ~10 seconds. If OpenCL is not being utilized for VDF verification, you should see relatively high CPU usage across all cores every ~10 seconds. If you are running a Timelord (the default is off), you will see high CPU usage on at least one core in any case, even if your GPU is used for verification. :::note[Note] During initial blockchain sync, CPU usage can be high in any case. ::: Example Hardware and times [Google spreadsheet](https://docs.google.com/spreadsheets/d/1NlK-dq7vCbX4NHzrOloyy4ylLW-fdXjuT8468__SF64/edit?pli=1&gid=618383284#gid=618383284). ## OpenCL for Intel iGPUs Intel iGPUs prior to 11th gen are not sufficient for mainnet. Intel's desktop iGPUs have much fewer compute units than their mobile counterparts, so only the mobile SKUs in laptops/mini-PCs will be suitable for OpenCL VDF verify. 11th gen and newer desktop CPUs with the SHA instruction set can get decent performance on the CPU cores without OpenCL. Ubuntu 20.04, 21.04 ```bash frame="none" sudo apt install intel-opencl-icd ``` Ubuntu ppa for 18.04, 20.04, 21.04 ```bash frame="none" sudo add-apt-repository ppa:intel-opencl/intel-opencl sudo apt update sudo apt install intel-opencl-icd ``` If the above doesn't work, you can try installing the latest drivers: [Intel GPU Ubuntu](https://dgpu-docs.intel.com/installation-guides/ubuntu/ubuntu-focal.html) Make sure your iGPU is not somehow disabled, like here for example: [Intel Enable iGPU](https://community.hetzner.com/tutorials/howto-enable-igpu) ## OpenCL for AMD GPUs Ubuntu: Download installer (with `wget`) from `https://repo.radeon.com/amdgpu-install/latest/ubuntu/` Change directory to the Download folder and install with `sudo dpkg -i amdgpu-install*.deb` `sudo apt install rocm-opencl` Follow on-screen instructions and then run: ```bash frame="none" sudo apt update sudo apt upgrade ``` Arch Linux: ```bash frame="none" sudo pacman -S opencl-amd ``` Mesa drivers with opencl drivers do seem to work, but performance is very poor (VDF verification >4x longer).\ To install mesa drivers:\ Ubuntu: ```bash frame="none" sudo apt install mesa-opencl-icd ``` Arch: ```bash frame="none" sudo pacman -S mesa mesa-utils opencl-mesa ``` Windows: [Google search AMD](https://google.com/search?q=amd+graphics+driver+download) ## OpenCL for Nvidia GPUs Due to the massive generational leap in compute performance, the Maxwell generation (900 series Geforce, M-series and some K-series Quadro) should be the minimum consideration for Nvidia GPUs. Install Nvidia drivers: ### Ubuntu ```bash frame="none" sudo apt install nvidia-driver-470 sudo apt install nvidia-driver-565 ``` Version 470 still works with older Kepler cards like a Quadro K2000. Use latest version for newer GPUs. ### Arch Linux ```bash frame="none" sudo pacman -S nvidia nvidia-utils opencl-nvidia ``` For older GPUs, use drivers from the AUR: ```bash frame="none" # Kepler series newest driver: 470xx yay -S nvidia-470xx-dkms nvidia-470xx-utils opencl-nvidia-470xx # Fermi series newest driver: 390xx yay -S nvidia-390xx-dkms nvidia-390xx-utils opencl-nvidia-390xx ``` ## AVX2 Optimizations VDF verification is now optimized for CPUs that support AVX2 and acceleration is done automatically when starting a node. To disable VDF verification done on GPU with OpenCL and force the CPU to do it, run `./run_node.sh --Node.opencl_device -1` when running your node. Or for a more permanent solution, edit `config/local/Node.json` and set `opencl_device` value to -1. ================================================ FILE: docs/src/content/docs/guides/remote-services.md ================================================ --- title: Remote Services description: How to setup and use remote mmx services. --- The following steps are provided for running multiple harvesters with a single node, or for separate node / farmer / wallet setups. To enable remote access to a Node or Farmer: ```bash frame="none" echo true > config/local/allow_remote ``` Alternatively, see "Allow remote service access" in GUI Settings. Remote harvesters need access to port `11333`, while remote farmer, timelord and wallet need port `11330`. ### Remote Harvester To run a remote harvester: ```bash frame="none" ./run_harvester.sh -n node.ip ``` Alternatively to set the node address permanently: `echo node.ip > config/local/node` :::note[Note] To connect to a remote farmer, replace `node.ip` with the farmer IP. ::: To disable the built-in harvester in the node: `echo false > config/local/harvester` ### Remote Farmer To run a remote farmer with it's own wallet and harvester: ```bash frame="none" ./run_farmer.sh -n node.ip ``` Alternatively to set the node address permanently: `echo node.ip > config/local/node` To disable the built-in farmer in the node: `echo false > config/local/farmer`\ To disable the built-in wallet in the node or farmer: `echo false > config/local/wallet`\ To disable the built-in harvester in the farmer: `echo false > config/local/harvester` ### Remote Timelord To run a remote timelord: ```bash frame="none" ./run_timelord.sh -n node.ip ``` Alternatively to set the node address permanently: `echo node.ip > config/local/node` To disable the built-in timelord in the node: `echo false > config/local/timelord` ### Remote Wallet To run a remote wallet: ```bash frame="none" ./run_wallet.sh -n node.ip ``` Alternatively to set the node address permanently: `echo node.ip > config/local/node` To disable the built-in wallet in the node: `echo false > config/local/wallet` ### Remote connections over public networks To use the remote services over a public network such the internet you should use an SSH tunnel, instead of opening port `11330` or `11333` to the world (which would hurt security). To run an SSH tunnel to connect to a node from another machine (such as from a remote farmer): ```bash frame="none" ssh -N -L 11330:localhost:11330 user@node.ip ``` This will forward local port `11330` to port `11330` on the node's machine. ================================================ FILE: docs/src/content/docs/index.mdx ================================================ --- title: MMX Docs description: Learn about MMX. template: splash prev: false next: false editUrl: false lastUpdated: false head: - tag: title content: MMX Docs - tag: style content: " :root { .content-panel:has(h1#_top) { display: none; } .content-panel:has(footer) { border-top: 0px; } main { padding-bottom: 0%; } footer { display: none; } .main-pane { position: absolute; align-content: center; justify-content: center; height: calc(100% - var(--sl-nav-height)); width: 100%; padding-bottom: 25%; } @media (min-width: 50rem) { .header { grid-template-columns: minmax(calc(max(0rem, calc(((100% - var(--sl-content-width)) / 2) - var(--sl-nav-gap) + 6.75rem ))), auto) 1fr auto; } } } " --- import MMXLEDBars from '../../components/MMXLEDBars.astro'; import MMXCardGrid from '../../components/MMXCardGrid.astro'; import MMXLinkCardT from '../../components/MMXLinkCardT.astro'; import MMXLinkCard from '../../components/MMXLinkCard.astro'; How to use MMX Read the FAQ CLI \/ API \/ Script reference Learn about key concepts Learn about MMX mmx.network ================================================ FILE: docs/src/content/docs/reference/MMX_wallet.md ================================================ --- title: MMX Wallet description: Important information for developing a wallet for MMX. --- ## MMX Wallet / Address Format Notes for 3rd party development: - When converting mnemonic words to a wallet seed, the byte order needs to be reversed, compared to BIP-39. - The key derivation function for the passphrase is non-standard: - There is no chain XORing (not needed for sha512) - There is no index being hashed in the first iteration - The byte order for bech32 addresses is reversed: - When converting a public key to bech32, first the sha256 hash is computed, then the byte order is reversed and converted with standard Bech32m. - When converting a bech32 address to a hash, the bytes from the resulting standard Bech32m decode need to be reversed. ================================================ FILE: docs/src/content/docs/reference/NFT_standard.md ================================================ --- title: NFT Standard --- NFTs on MMX are instances of the [nft.js](https://github.com/madMAx43v3r/mmx-node/blob/master/src/contract/nft.js) contract with binary `mmx1hzz9tgs2dz9366t3p4ep8trmaejx7tk9al9ah3md2u37pkesa3qqfyepyw`. Every contract inherits from [TokenBase](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/contract/TokenBase.vni), as such each NFT already has the following (read-only) fields: - `name`: String, max length 64 - `meta_data`: Object The standard for `meta_data` is as follows: - `description`: A human-readable description of the item. Markdown is supported. - `image`: Image URL. Use `mmx://mmx1...` for on-chain data. - `external_url`: Link to external site to view NFT. - `attributes`: Object of custom attributes (not standardized). ================================================ FILE: docs/src/content/docs/reference/Token_standard.md ================================================ --- title: Token Standard --- Every smart contract has the following hard coded fields: - `name`: Full name (with whitespace) - `symbol`: Maximum of 6 characters (no whitespace) - `decimals`: How many decimals for display - `meta_data`: Generic variable with extra info By convention, `meta_data` is an Object with the following fields: - `is_token`: Boolean to indiciate a standard token - `icon_url`: Currency icon (shown next to balance) - `logo_url`: Bigger logo image (shown on details page) - `website_url`: Website link - `description`: Longer text block with newlines, etc The format to specify on-chain `WebData` resources per url is: `mmx://mmx1...` ================================================ FILE: docs/src/content/docs/reference/blockchain.md ================================================ --- title: Blockchain description: Introduction to the MMX Blockchain. --- A blockchain written from scratch, doing most things differently. 1. MMX is designed to be a blockchain that can be used as an actual currency 2. Variable supply will stabilize the price, key property of any currency 3. Efficient implementation provides low transaction fees, at high throughput :::note[Note] In-depth technical, read [whitepaper](../../../articles/general/mmx-whitepaper/). Light introduction, read [article](../../../articles/general/mmx-tldr/). ::: Design - Variable token supply governed by consensus (1 block = 1 vote) - High throughput L1 with consistent block interval (500 TPS, 10 sec) - Novel Smart Contract VM for ease of development and high performance - Energy efficient Proof of Space - Block reward is adjusted to stabilize price, a key property of any currency - Minimum transaction fee to allow large block size without spam - Limited external library usage to keep codebase clean and secure - No pre-mine, no ICO, no investors - Account based model Elements - High performance C++ code (can handle over 1000 TPS easily) - Transactions are executed in parallel when possible - Custom high-level VM for Smart Contracts - Native support for variants, arrays, maps, and objects - Unified memory with automatic persistence and state updates - A restricted subset of JavaScript is compiled into bytecode - Average of two machine instructions per line of code - Native token support (no "approvals" needed, NFT = 1 mojo) - Smart contract offer based trading (fixed price, OTC) - Liquidity pool swap based trading (AMM, multi-fee tiers, similar to Uniswap v3) - ECDSA signatures for seamless integration (same as Bitcoin) - Custom blockchain database engine (much faster than RocksDB or LevelDB overall) - Adaptive SHA256 VDF to govern block interval - Feature rich Node with built-in Block Explorer, Wallet, Market, Swap, RPC, etc Mainnet started on 17th Jan 2025. See [`#mmx-news`](https://discord.com/channels/852982773963161650/926566475249106974) and [`#mmx-general`](https://discord.com/channels/852982773963161650/925017012235817042) on [Discord](https://discord.gg/BswFhNkMzY). ================================================ FILE: docs/src/content/docs/reference/pooling_protocol.md ================================================ --- title: Pooling Protocol description: MMX Pooling Protocol reference. --- ## Notes - MMX addresses are encoded via bech32 string - Hashes and signatures are encoded via little-endian upper-case hex string, without `0x` prefix - Account address = Payout address ## Pool Server API ### POST /partial Endpoint to post a partial. Content-Type: `application/json` Payload: Object - `height`: Block height the proof is for - `hash`: Message hash for signature (see below) - `contract`: Plot NFT address - `account`: Payout address (can be multiple per NFT, first partial creates account) - `pool_url`: The base URL used to make this request - `harvester`: Harvester name, usually hostname - `lookup_time_ms`: Harvester lookup time (ms) - `proof`: Proof, can be Proof of Space or Proof of Stake (see below) - `farmer_sig`: Farmer signature based on `hash` and `proof.farmer_key` - `__type`: `mmx.Partial` The `proof` is an object as follows: - `__type`: Proof type (always `mmx.ProofOfSpaceNFT`) - `score`: Proof score - `plot_id`: Plot ID - `challenge`: challenge hash for this height and fork - `difficulty`: Partial difficulty used when performing lookup (might be different than current setting) - `farmer_key`: Farmer Public Key For `proof.__type` == `mmx.ProofOfSpaceNFT` the following additional fields will be present: - `ksize`: Plot k-size - `seed`: Plot random seed - `proof_xs`: List of proof X values (256) - `contract`: Plot NFT contract address Returns status 200 with `application/json` object as follows: - `error_code`: Integer error code (see below) - `error_message`: Message string #### Example partial TODO: update ``` { __type: 'mmx.Partial', account: 'mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z', challenge: 'CA98DB6504B2C85D876BEC1881F41E805D49FDE33DFE548A26C3277CFAE7EFF9', contract: 'mmx19hxc7mfkdalx0khe5nr4r50t338z8sg4avn7vqu7ts4mpkxeg0lqhesvzl', farmer_sig: '3CDCD57B151254835100F47F16834F91ED87838F5C68E113F236FD88169133643D06A4D50B6FB96859BECB73A73CE0E449262717B9907E70F05659F487C14F4B', harvester: 'prime', hash: 'B7269935091572E1004B48C327EEF2070DA0176A94AE2129AD8E68A9059FD95F', height: 845490, lookup_time_ms: 82, difficulty: 1, pool_url: 'http://localhost:8080', proof: { __type: 'mmx.ProofOfSpaceNFT', contract: 'mmx19hxc7mfkdalx0khe5nr4r50t338z8sg4avn7vqu7ts4mpkxeg0lqhesvzl', farmer_key: '027D7562FB5A8967E57A22F876302F75BA3AE3980607FB32E4439681F820AE398F', ksize: 26, plot_id: '22F0CA184633E07F32C5289B0ACF39597637CD6685D3CD4E7CD87CD56FAF8761', proof_xs: [ 61796699, 13346431, 24374059, 22439072, 65129000, 58802027, ... 250 more items ], score: 25993, seed: '091B11F9A066A9120AAD4BF8D30D933E4CED2EB3BF2CCA1DA72D8BA8E68BDA96' } } ``` ### GET /difficulty Returns current partial difficulty. If farmer account does not exist yet, it should return a default starting difficulty. Will be polled by farmers every 300 sec by default. Query parameters: - `id`: Farmer account address (payout address) Always returns status 200 with `application/json` object as follows: - `difficulty`: Integer value ### POST /set_difficulty Endpoint for custom partial difficulty settings. Support for this is optional. Partial difficulty is set per account (ie. payout address), not per plot NFT. Content-Type: `application/json` Payload: Object - `account`: Account address - `type`: `static` or `dynamic` - `value`: Static difficulty value, or partials per hour (integer) in case of dynamic - `time`: POSIX timestamp in seconds - `public_key`: Public key for account address - `signature`: Signature for message and `public_key` Returns status 200 with `application/json` object as follows: - `error_code`: Integer error code (see below) - `error_message`: Message string ### GET /pool/info Returns pool information as `application/json` object: - `name` - `description` - `fee`: Pool fee (0 to 1, 1 = 100%) - `logo_path`: Relative path for logo image, starting with `/`. - `protocol_version`: `1` - `pool_target`: Plot NFT target address - `min_difficulty`: Lowest partial difficulty that is supported ### GET /pool/stats Returns pool statistics as `application/json` object: - `estimated_space`: Estimated pool size in TB - `partial_rate`: Partials / hour - `farmers`: Number of active farmers ### GET /account/info Query parameters: - `id`: Farmer account address (payout address) Returns account info as `application/json` object: - `balance`: Current unpaid balance [MMX] - `total_paid`: Total amount paid out so far [MMX] - `difficulty`: Partial difficulty - `pool_share`: Relative farm size to pool (0 to 1) - `partial_rate`: Partials / hour - `blocks_found`: Number of blocks farmed - `estimated_space`: Estimated farm size in TB ## Node API ### POST /wapi/node/verify_partial Endpoint to verify a partial, optionally with plot NFT verification. :::note[Note] Partials should be verfied after a certain delay, for example once the height of the partial has been reached on-chain. Partials are computed 6 blocks in advance, so waiting until the partial's height has been reached will give 6 blocks security. Even in case of a re-org larger than 6 blocks, the chance a partial won't be valid anymore is only ~5%. ::: Content-Type: `application/json` Payload: Object - `partial`: The same object as was received by the pool via POST `/partial`. - `pool_target`: Expected plot NFT target address (optional) - When specified will verify plot NFT is locked to given target address at current blockchain height. Returns status 200 with `application/json` object as follows: - `error_code`: Integer error code (see below) - `error_message`: Message string When the node is not synced will return status 500 with error text. ### POST /wapi/node/verify_plot_nft_target Endpoint to verify that a plot NFT is locked and pointed to the given target address at the current blockchain height. Content-Type: `application/json` Payload: Object - `address`: Plot NFT address - `pool_target`: Expected plot NFT target address Returns status 200 with `application/json` object as follows: - `error_code`: Integer error code (see below) - `error_message`: Message string When the node is not synced will return status 500 with error text. ## Message hash algorithm A string is generated for JSON objects as follows: - First the `__type` field is added, followed with `/` - Then for each field in the specified order: - The field name is added, followed with a `:` - The field value is added (floating point values are floored first) - For any nested objects, the same scheme is followed. The final string is hashed via `SHA2-256`. ## Error Codes Error codes are transferred as strings in JSON: - `NONE`: No error - `INVALID_PARTIAL` - `DUPLICATE_PARTIAL` - `PARTIAL_TOO_LATE` - `PARTIAL_NOT_GOOD_ENOUGH` - `CHALLENGE_REVERTED` - `CHALLENGE_NOT_FOUND` - `INVALID_PROOF` - `INVALID_DIFFICULTY` - `INVALID_SIGNATURE` - `INVALID_CONTRACT` - `INVALID_AUTH_KEY` - `INVALID_ACCOUNT` - `INVALID_TIMESTAMP` - `POOL_LOST_SYNC` - `SERVER_ERROR` ================================================ FILE: docs/src/content/docs/software/MMX_script.md ================================================ --- title: MMX Script description: MMX Script smart contract language reference. --- The MMX smart contract language is a restricted subset of JavaScript with some additional features. ## Types - Null (`null`) - Boolean (`true` / `false`) - Integer (256-bit unsigned) - Binary (aka. "binary string", same as `ArrayBuffer` in JS) - String (UTF-8 encoded) - Array - Map :::note[Note] Objects are maps with string keys. ::: ## Deviations from JavaScript - `var` has local scope (behaves like `let`) - Integer overflows / underflows will fail execution (except for `unsafe_*(...)`) - Reading un-initialized variables will fail execution (instead of returning `undefined`) - Reading non-existent map values will return `null` (instead of `undefined`) - Out of bounds array access will return `null` by default (instead of `undefined`) - `==` comparison is strict (ie. same as `===` in JS) - `+` only supports integer addition (need to use `concat()` for strings) - `$` is not supported in variable / function names - `delete` is a function (not an operator) and only works on variables directly ## Not supported from JavaScript - Classes (KISS) - Signed integers / negative values - Floating point values / arithmetic - Function variables (all functions are global like in `C`) - `let` (because `var` is already like `let`) - `undefined` (you'll get `null` or execution failure instead) - `for(... of ...)` loops over maps or objects (supported only for arrays) - `for(... in ...)` style loops - `===` operator (because `==` is strict already) - `**`, `?.`, `??` operators - `(condition ? ifTrue : ifFalse)` - `switch()` - `function*` - `void`, `new`, `class`, `typeof`, `await`, `async`, `with`, `super` - `export`, `throw`, `try`, `catch`, `instanceof`, `yield` - Template strings - Multiple assignment: `[a, b] = arr, {a, b} = obj` - Spread syntax `(...)` - Any built-in classes like: - `Array`, `Map`, `Set`, `Time`, `Date`, `Number`, `Math` - `Error`, `Object`, `Function`, `Boolean`, `Symbol` - `String`, `RegExp`, `Promise`, `Iterator`, `Proxy` - Any built-in functions like: - `eval()`, `escape()`, `unescape()` ## Additional features - `const` function modifier - `function get_price() const {}` - `const` functions cannot modify contract state - `static` function modifier - `function init_ex(...) static {}` - Denotes that function is a constructor (executes static init first) - Any `init()` function is implicitly static - `public` function modifier - `function payout() public {}` - Only public functions can be executed via transactions. - `payable` function modifier - `function trade(...) public payable {}` - Required to support deposits with function call. - A `deposit()` function is always `payable`. - Special `this` object to access built-in variables: - `txid`: The transaction ID (Type: 32-bytes or `null`) - `height`: The block height at which the code is executed (Type: 256-bit unsigned int) - `balance`: Map of contract balances (Type: Map[32-bytes] = 256-bit unsigned int) - Returns `0` in case of missing balance entry (instead of `null`). - `address`: Contract address (Type: 32-bytes) - `user`: A user address can be specified when executing a contract function, which is verified via a signature before executution, same as `msg.sender` in EVM. In case of a remote call this is the address of the caller's contract. (Type: 32-bytes or `null`) - `deposit`: Object to check for deposited currency and amount (for `payable` functions): - `currency`: Currency address (Type: 32-bytes) - `amount`: Amount deposited (Type: 256-bit unsinged int) ## Operators (sorted by rank) - `.`: field access (objects / maps only) - `++`: pre or post increment (integers only) - `--`: pre or post decrement (integers only) - `!`: Logical NOT - `~`: Bitwise NOT (integer only) - `*`: Multiplication (integers only) - `/`: Division (integers only) - `%`: Modulo division (integers only) - `+`: Addition (integers only, see `concat()` for strings) - `-`: Subtraction (integers only) - `>>`: Right shift (integers only) - `<<`: Left shift (integers only) - `<`: Less than (fails if not same type) - `>`: Greater than (fails if not same type) - `<=`: Less than or equal (fails if not same type) - `>=`: Greater than or equal (fails if not same type) - `!=`: Not equal (any types) - `==`: Equals (any types, strict, no implicit conversions) - `&`: Bitwise AND (integers only) - `&&`: Logical AND - `^`: Bitwise XOR (integers only) - `^^`: Logical XOR - `|`: Bitwise OR (integers only) - `||`: Logical OR - `=`: Right to left assignment - `+=`: Inplace addition (integers only) - `-=`: Inplace subtraction (integers only) - `*=`: Inplace multiplication (integers only) - `/=`: Inplace division (integers only) - `>>=`: Inplace right-shift (integers only) - `<<=`: Inplace left-shift (integers only) ## Built-in functions - `size(array)`: Returns the size of an array, string or binary - `push(array, value)`: Pushes a value onto the end of an array - `pop(array)`: Pops a value off the back of an array - `set(map, key, value):`: Same as `map[key] = value` or `array[key] = value` (with integer key) - `get(map, key)`: Same as `map[key]` or `array[key]` (with integer key) - `erase(map, key)`: Same as `map[key] = null` - `delete(v)`: Deletes a variable (read after delete will fail, re-assign is possible) - `min(a, b)`: Returns smaller value (integers only) - `max(a, b)`: Returns larger value (integers only) - `clone(v)`: Makes a (deep) copy and returns reference - `deref(v)`: Returns a (deep) copy (without reference) of the value given by a reference - `typeof(v)`: Returns an integer to denote a variable's type: - 0 = `null` - 1 = `false` - 2 = `true` - 4 = Integer (256-bit unsinged) - 5 = String - 6 = Binary - 7 = Array - 8 = Map - `concat(a, b, [...])`: Returns concatenation of two or more (binary) strings (like `a + b + ...` in JS) - `memcpy(src, count, [offset])` - Returns a sub-string of `src` with length `count` starting at `offset` - `offset` defaults to `0` - `src` must be a string or binary string - Out of bounds access will fail execution - `fail(message, [code])`: Fails execution with string `message` and optional integer `code` - `assert(condition, [message], [code])`: Fails execution if `condition` does not evaluate `true` - If `message` is not specified, it will print source code instead. - `bech32(addr)`: Parses a bech32 address string and returns 32 bytes. - Returns 32 zero bytes if no argument given, which corresponds to the zero address. - `binary(v)`: Converts to a binary - Returns binary for strings (1-to-1 copy) - Returns little endian 32-byte binary for integers - `binary_le(v)`: Same as `binary()` except: - Returns big endian 32-byte binary for integers - `binary_hex(v)`: Same as `binary()` except: - Parses input string as a hex string, with optional `0x` prefix. - `bool(v)`: Converts to boolean - Returns `false` for: `null`, `false`, `0`, empty (binary) string - Otherwise returns `true` - `uint(v)`: Converts to 256-bit unsigned integer - `null` => 0, `false` => 0, `true` => 1 - `"123"` => 123, `"0b10"` => 2, `"0xFf"` => 255 - Binary strings are parsed in big endian: `[00, FF]` => `0x00FF` / `255` - `uint_le(v)`: Same as `uint()` except binary strings are parsed in little endian. - `uint_hex(v)`: Same as `uint()` except strings are parsed in hex, even without `0x` prefix. - `string(v)`: Converts to a string - Integers are converted to decimal - String inputs are returned as-is - Binary strings are converted as-is (like memcpy()) - `string_hex(v)`: Same as `string()` except: - Converts integers and binary strings to a hex string, without `0x` prefix. - `string_bech32(v)`: Same as `string()` except: - Converts binary string to a bech32 address string `mmx1...` (fails if not 32 bytes) - Converts `null` to zero address string `mmx1qqqq...` - `is_uint(v)`: Returns `true` if argument is of type integer - `is_string(v)`: Returns `true` if argument is of type string - `is_binary(v)`: Returns `true` if argument is of type binary - `is_array(v)`: Returns `true` if argument is of type array - `is_map(v)`: Returns `true` if argument is of type map - `balance([currency])`: Returns current balance for given currency (for the contract) - `currency` defaults to MMX if not specified (32-byte binary) - `send(address, amount, [currency], [memo])`: Transfer funds from contract to an address - `address` is destination address as 32-byte binary - `amount` is integer amount, fails if larger than 64-bit - `currency` is currency address as 32-byte binary, defaults to MMX (ie. `bech32()`) - `memo` is an optional memo string (fails if longer than 64 chars) - Does nothing if `amount` is zero - Fails if balance is insufficient - Returns `null` (ie. nothing) - `mint(address, amount, [memo])`: Mint new tokens of contract and send to address - `address` is destination address as 32-byte binary - `amount` is integer amount, fails if larger than 64-bit - `memo` is an optional memo string (fails if longer than 64 chars) - Does nothing if `amount` is zero - Returns `null` (ie. nothing) - This is the only way to mint tokens on MMX blockchain - `sha256(msg)`: Computes SHA-2 256-bit hash for given input message (binary or string) - Returns hash as 32 bytes - `ecdsa_verify(msg, pubkey, signature)`: Verifies a ECDSA signature - Returns `true` if valid, otherwise `false` - `msg` must be 32 bytes - `pubkey` must be 33 bytes - `signature` must be 64 bytes - `rcall(contract, method, [arg0], [arg1], ...)`: Calls function of another contract and returns value - `contract` is a string idendifier of the contract to call (specified at deploy time) - `method` is the method name as string (without `()`) - Returns value from the function call - `read(field, [address])`: - Returns the value of a non-storage contract field (which is constant) - `address` is current contract if not specified - Storage fields cannot be read with this function, need to use `rcall()` instead - `log(level, message)`: For debugging / testing only - Logs a string message at integer `level` - `event(name, data)`: For debugging / testing only - Logs an event with string `name` and arbitrary `data` - `__nop()`: Injects an `OP_NOP` instruction (for debugging) - `__copy(dst, src)`: Same as `dst = src` but bypasses compiler const check on `dst` for debugging. ## Fixed-point Arithmetic Because floating point values and arithmetic are not supported, one has to use fixed-point arithmetic. First you need to choose how much precision is needed. A good choice would be 64-bits or 96-bits, such that a 256-bit overflow is not possible when adding a lot of 128-bit values. Account balances can be up to 128-bit, while amounts (for deposit and sending) are limited to 64-bit. Let's say we choose 64-bit precision. This means we multiply all constants by 2^64 (or left shift by 64) and right shift by 64 to get a result. For example `123456 * 1.337 = 165060.672`: ```js const factor = 24663296826549670511; // 1.337 const result = (123456 * factor) >> 64; // 165060 ``` Fixed point arithmetic always rounds down. When converting floating point constants, rounding to nearest is best for accuracy. ## Passing function arguments from the outside Function argument passing from the outside is limited to what JSON can describe. This means no integer values greater than 64-bit and no binary strings. In order to pass an address, pass it as a bech32 encoded string (`mmx1..`) and then decode via `bech32(...)`. In order to pass binary strings, encode it as a hex string (`0x...`) and then decode via `binary_hex(...)`. In order to pass integers greater than 64-bits you can encode them as a decimal or hex string (`0x...`) and then decode via `uint(...)`. Hex encoding is recommended, since decimal decoding is expensive. ## Implicit Type Conversion By default MMX script does *not* perform any implicit type conversion except in the following cases: - `if(cond)`: `cond` is casted to `bool`, same as `if(bool(cond))` - `while(cond)`: `cond` is casted to `bool`, same as `while(bool(cond))` - `for(...; cond; ...)`: `cond` is casted to `bool`, same as `for(...; bool(cond); ...)` - `!cond`: `cond` is casted to `bool`, same as `!bool(cond)` - `A && B`: `A` and `B` are casted to `bool`, same as `bool(A) && bool(B)` - `A || B`: `A` and `B` are casted to `bool`, same as `bool(A) || bool(B)` - `A ^^ B`: `A` and `B` are casted to `bool`, same as `bool(A) || bool(B)` For example the following is valid code: ``` if(null) {} while(1) {} for(; 1;) {} !null !"" 1 && 2 null || "yes" ``` However, the following code is invalid: ``` null < 1 null + 1 "1" > 0 "1" + 1 ``` ## Examples ### Contract Storage Any global variable will be persisted accross the lifetime of a contract: ```js var storage = []; function add(value) public { push(storage, value); } function get() const public { return storage; } ``` ### Constructor Any `static` private function can be a constructor. When deploying a contract you have to specify which function to use.\ The default is to use `init()`: ```js var foo; var spec; function init(bar) { foo = bar; } function init_v(bar, v) static { foo = bar; spec = v; } ``` :::note[Note] `init()` is always marked as `static`.\ Global variables are initialized to `null` before constructor is executed. ::: ### Deposit Deposits in MMX are made through function calls to a `payable` function: ```js var currency = bech32(); var balances = {}; function deposit(account) public payable { if(this.deposit.currency != currency) { fail("invalid currency"); } balances[account] += this.deposit.amount; } ``` :::note[Note] If a function is called "deposit" the `payable` modifier can be omitted.\ `this.balance` already includes the deposited amount, it always equals the amount that can be spent via `send()`. ::: Trying to deposit funds via a non-`payable` function is not possible. However it's possible to send funds to a contract via normal transfer. In this case no function is called, and the contract needs to handle this case implicitly. It cannot be avoided since it's possible to send to a contract's address before deployment. Funds that are sent to a contract (via normal transfer) at height `H` will only be visible to the contract at height `H+1`. Any funds not spent in the transaction that deploys a contract will be credited to the contract's address before the contructor is called. This allows a more efficient way to deploy with funding, compared to executing a deposit function. ### Built-in Contracts - [offer.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/offer.js) - Offer - Allows to trade between two currencies at a fixed price (See GUI -> Market) - Takers can trade any fraction of the offer - Maker can cancel / refill at any time - Bids are accumulated in the contract (for lower tx fees) - Manual withdrawal will transfer accumulated bids to maker wallet - [swap.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/swap.js) - Swap - Liquidity pool AMM, similar to UniSwap (see GUI -> Swap) - Has 4 different fee-tiers, each with their own liquidty and price - A trade is divided into multiple chunks / iterations - `trade()` loops over all pools in multiple iterations and picks the best pool to trade with for each chunk (while taking the fee into account) - Supports one-sided liquidity - Liquidity is locked for 24 hours after it's been added / or fee-tier was changed - A single account can only provide liquidity for one fee-tier - Fee payouts are heuristic for better trade efficiency (manual trigger, no automatic compounding) - [plot_nft.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/plot_nft.js) - Plot NFT - Used for pooled farming to control rewards / switch pools - [token.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/token.js) - Simple Token - Token contract with single owner to mint a token (without limits) - [nft.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/nft.js) - NFT - Contract used to mint NFTs - Ensures only a single token is ever minted by a verified creator - [time_lock.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/time_lock.js) - Simple Time Lock - [escrow.js](https://github.com/madMAx43v3r/mmx-node/tree/master/src/contract/escrow.js) - Simple Escrow with middle-man ### Minting tokens Minting tokens is only possible via calling `mint()`, which mints new tokens of the contract.\ Every contract is also a currency, contract address = currency address. A smart contract inherits from `mmx.contract.TokenBase`, which has the following fields: - string `name` - string `symbol` - int `decimals` = 0 - vnx.Variant `meta_data` If `decimals` is needed inside the code, it can be retrieved via `read("decimals")`, but usually this is not needed. The same goes for `symbol`, etc. ### Deploying a Smart Contract A smart contract's code is actually a separate "contract" of type `mmx.contract.Binary` which needs to be deployed first. Multiple contracts can share the same binary, this reduces the cost of deploying contracts significantly. If the code is not deployed on-chain yet, it needs to be compiled and deployed first: ```bash frame="none" mmx_compile -t -n testnet12 -f example.js -o example.dat mmx wallet deploy example.dat ``` `mmx_compile` returns the binary address that we need to sepecify when deploying a contract later. `-n testnet12` can be omitted for mainnet. Once the binary is confirmed on-chain, we can deploy any number of contracts with the same code.\ This can be done via JSON files: ```json { "__type": "mmx.contract.Executable", "name": "Example", "symbol": "EXMPL", "decimals": 6, "binary": "mmx1...", "init_method": "init", "init_args": [...] } ``` If the contract does not represent a token, `name`, `symbol` and `decimals` can be omitted. If `init_method` is "init", it can be omitted as well since it's the default. Now deploying a contract from JSON file: ```bash frame="none" mmx wallet deploy example.json ``` Every contract will have a different address since the wallet generates a random 64-bit transaction nonce by default. The node keeps track which `sender` deployed a contract, as such you can view all your deployed contracts via: ```bash frame="none" mmx wallet show contracts ``` ### Executing a smart contract function Executing a smart contract function can be done via command line: ```bash frame="none" mmx wallet exec [args] -x ``` This will submit a transaction to the network. To make a deposit: ```bash frame="none" mmx wallet deposit [args] -a -x -t ``` Be careful not to confuse `-x` and `-t`: `-t` is the destination, while `-x` is the currency to deposit. By default `this.user` is set to the wallet's first address (index `0`). This can be overriden with a different address index: ```bash frame="none" mmx wallet exec [args] -k mmx wallet exec [args] -k -1 # this will set `user` to `null` ``` The same applies to `mmx wallet deposit`. Specific examples: ```bash frame="none" mmx wallet exec test_me 1 2 3 -x mmx1... mmx wallet deposit test_me 1 2 3 -x mmx1... -t mmx1... # `-t` is like `-x` for `exec` mmx wallet deposit -x mmx1... -t mmx1... # this will call `deposit()` without args ``` To execute a function just for testing: ```bash frame="none" mmx node call [args] -x ``` This will not submit any transaction, but rather just simulate a call at the current blockchain `height + 1`. ### Inspecting a Contract To view the contract that was deployed: ```bash frame="none" mmx node get contract
``` To view a contract's state (global storage variables): ```bash frame="none" mmx node read -x
mmx node read -x
# `field` can be a variable name or hex address `0x...` ``` To dump a contracts's entire storage: ```bash frame="none" mmx node dump -x
``` `<0x...>` denotes a reference, `[0x...,size]` denotes an array, `{0x...}` denotes a map / object. To dump a contract's binary code: ```bash frame="none" mmx node dump_code -x
``` #### Address Ranges Memory is unified in MMX, but there are regions for different usage: - `0x0000000` to `0x3FFFFFF`: constant data - `0x4000000` to `0x7FFFFFF`: external data (`this.*`) - `0x8000000` to `0x47FFFFFF`: stack (`0x8000000` = return value, `0x8000001` = first argument) - `0x48000000` to `0xFFFFFFFF`: global variables (stored in DB) - `0x100000000` to `0xFFFFFFFFFFFFFFFF`: heap / dynamic storage (stored in DB, if not garbage collected) ## Notes ### References As in JavaScript: Arrays, Maps and Objects are reference counted. That means "copying" by assignment does not make a deep copy, it only copies the reference: ```js const array = [1, 2, 3]; const tmp = array; push(tmp, 4); return array; // returns [1, 2, 3, 4] ``` ```js const object = {"foo": {}}; const foo = object.foo; foo.bar = true; return object; // returns {foo: {"bar": true}} ``` In order to make a deep-copy you need to use `clone()`. ### clone() from storage It's not possible to clone maps / objects from contract storage: ```js var object = {}; function test() public { return clone(object); // will fail } ``` ### Account balances Balances and amounts are always stored / specified in "sats" aka. "binks", meaning no decimals. Floating point representation with decimals is always just for display purposes. Contract code can only access the balances of itself, not other contracts or addresses (since that would break parallel execution). However it's possible to call a method of another contract that returns its balance. In this case execution is serialized. :::note[Note] `this.balance` is updated automatically when receiving funds via deposit, or when spending via `send()`. ::: ### Instruction costs TODO ================================================ FILE: docs/src/content/docs/software/RPC_protocol.md ================================================ --- title: RPC Protocol description: MMX Node RPC Protocol. --- Every node exposes a HTTP endpoint on `localhost:11380` (by default). Binding to `0.0.0.0` needs to be enabled in `config/local/HttpServer.json`. The native API can be accessed via `/api/`. A web-friendly `/wapi/` is available for select features. ## Authentication Authentication is required to access private API endpoints or remove limits from public enpoints. The best way to setup static authentication is to create an API token, by editing `config/local/HttpServer.json`: ```json { "token_map": [ ["secure_random_token_here", "ADMIN"] ] } ``` A secure random token can be generated with the `generate_passwd` tool. `ADMIN` allows access to every endpoint, even spending from the wallet. `USER` does not allow wallet spending. To use the token, a HTTP header `x-api-token: ` needs to be specified for every request. The name of this header can be changed by setting `token_header_name` in `HttpServer.json`. ## Native API The native API can be accessed via `/api/`: - `/api/node/` to access Node API - `/api/router/` to access Router API - `/api/wallet/` to access Wallet API - `/api/farmer/` to access Farmer API - `/api/harvester/` to access Harvester API Documentation for those are found in [modules](https://github.com/madMAx43v3r/mmx-node/tree/master/modules). `GET` can be used for `const` methods. `POST` is needed for `non-const` methods, with a JSON object payload containing the function arguments. Results are returned in JSON format. Hashes and addresses are returned as byte arrays, not as a hex or bech32 string. However they can be specified this way for arguments. ## WebAPI (WAPI) A web friendly API is available to make developing web applications easier. In case of an error a plaintext error message is returned, with a status code != 200. ### Public WAPI The public section of the WAPI can be accessed without authentication, but limits are enforced to prevent large queries. This is what RPC servers provide. #### GET /wapi/chain/info Returns an object with global parameters, see [ChainParams.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/ChainParams.vni). #### GET /wapi/node/info Returns an object with current network info, see [NetworkInfo.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/NetworkInfo.vni). #### GET /wapi/header Query parameters: - `hash`: Block hash, or: - `height`: Block height Returns block header object, or status 404 if not found. #### GET /wapi/headers Query parameters: - `limit`: Result limit (default = 20) - `offset`: Optional starting height Returns array of most recent block headers. #### GET /wapi/block Query parameters: - `hash`: Block hash, or: - `height`: Block height Returns full block object, or status 404 if not found. #### GET /wapi/transaction Query parameters: - `id`: Transaction ID (hex string) Returns transaction info object (see [tx_info_t.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/tx_info_t.vni)), or status 404 if not found. #### GET /wapi/transactions Returns array of most recent transaction info objects, or list of transaction info objects for a given block height. Query parameters: - `limit`: Result limit (default = 100) - `height`: Optional block height - `offset`: Optional starting index when `height` is specified #### GET /wapi/address Query parameters: - `id`: Address (bech32) Returns object: - `balances`: Array of balance objects - `contract`: Contract object if not a regular wallet address #### GET /wapi/address/history Query parameters: - `id`: Address (bech32) - `limit`: Result limit (default = 100) - `since`: Since block height, inclusive (default = 0) - `until`: Until block height, inclusive (default = current height) - `type`: Optional type filter: `RECEIVE`, `SPEND`, `TXFEE`, `REWARD`, `VDF_REWARD` - `currency`: Optional curreny filter (bech32 token address) Returns an array of history objects, same as `/wapi/wallet/history`. #### GET /wapi/balance Query parameters: - `id`: Address (bech32) - `limit`: Optional result limit (default = 100) - `currency`: Optional currency address (bech32) Returns object: - `balances`: Array of balance objects - `nfts`: Array of NFT addresses #### GET /wapi/supply To query current supply of a given token. Query parameters: - `id`: Currency address (bech32, defaults to MMX) Returns object: - `value`: Supply with decimals - `amount`: Supply as raw integer (but string format) #### GET /wapi/contract Query parameters: - `id`: Address (bech32) Returns contract object, or `null` in case not a contract. #### GET /wapi/plotnft Query parameters: - `id`: Address (bech32) Returns PlotNFT info, or status 404 if not a PlotNFT. #### GET /wapi/contract/exec_history Query parameters: - `id`: Address (bech32) - `limit`: Result limit (default = 100) Returns an array of most recent contract execution objects (see [exec_entry_t.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/exec_entry_t.vni)). #### GET /wapi/contract/storage Query parameters: - `id`: Address (bech32) Returns object with contract storage fields. #### GET /wapi/contract/storage/field Query parameters: - `id`: Address (bech32) - `name`: Field name Returns value of specified contract storage field. #### GET /wapi/contract/storage/entry Query parameters: - `id`: Address (bech32) - `name`: Field name, or: - `addr`: Field address - `key`: Map key Returns value for a specified key in a storage map. #### GET/POST /wapi/contract/call Executes a smart contract function in read only mode and returns the result. Query parameters: - `id`: Contract address (bech32) - `method`: Method name (without `()`) - `user`: Optional user address (bech32) When needing to specify function arguments, `POST` has to be used with the following JSON object content: - `args`: Array of function arguments - `deposit`: Optional deposit info (array of [currency, amount]) Example: `POST /wapi/contract/call?id=mmx1...&method=get_price` with content: ``` {"args": [0]} ``` #### GET /wapi/farmers Query parameters: - `limit`: Result limit (default = 100) Returns an array of objects in descending order: - `farmer_key`: Farmer public key - `block_count`: Number of blocks farmed since genesis #### GET /wapi/farmer Query parameters: - `id`: Farmer public key (hex string) - `since`: Optional starting height (default = 0) Returns farmer summary object. #### GET /wapi/farmer/blocks Query parameters: - `id`: Farmer public key (hex string) - `limit`: Result limit (default = 50) - `since`: Optional starting height (default = 0) Returns array of recently farmed block headers. #### POST /wapi/transaction/validate Validates a given transaction as specified via request payload and returns execution result object (see [exec_result_t.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/exec_result_t.vni)): - `did_fail`: Boolean, if transaction failed (but still able to include) - `error`: Error object (see [exec_error_t.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/exec_error_t.vni)) in case of failure, otherwise `null` - `total_cost`: Total transaction cost - `total_fee`: Total fee as raw integer (`total_cost` times fee ratio) - `total_fee_value`: Total fee in MMX (with decimals) Returns status 400 with error message in case static validation failed, for example due to: - Invalid hash - Invalid signature - Insufficient balance for TX fee :::note[Note] Clients must handle `nonce` field as a 64-bit integer, truncation will cause static failure. ::: #### POST /wapi/transaction/broadcast Validates and sends a given transaction as specified via request payload. Will skip sending and return status 400 if static validation failed. Returns status 200 on success. ### Wallet WAPI Common parameters: - `index`: Wallet index, see `/wapi/wallet/accounts` or `mmx wallet accounts`. - `options`: Object with additional options: - `auto_send`: If to send transaction automatically (default = true) - `mark_spent`: If to mark transaction as spent in cache (default = false) - `fee_ratio`: TX fee ratio as integer (default = 1024) - `gas_limit`: Limit for extra dynamic cost (default = 5 MMX) - `expire_at`: Optional expiration height - `expire_delta`: Expiration delta, relative to current height (default = 100, `null` to disable) - `nonce`: Custom nonce (needs be > 0) - `user`: Custom user for contract calls (default = first address) - `sender`: Custom sender address (who will pay TX fee, default = first address) - `passphrase`: Optional passphrase to atomically unlock wallet. - `note`: Transaction note, see [tx_note_e.vni](https://github.com/madMAx43v3r/mmx-node/blob/master/interface/tx_note_e.vni). - `memo`: Optional memo string (max. 64 chars) Endpoints that send a transaction will first validate it, and if invalid sending is aborted (saving TX fees). #### GET /wapi/wallet/accounts Returns an array of account objects: - `account`: Wallet index - `address`: First wallet address - `name`: Custom wallet name - `index`: Sub-account index, zero by default. - etc #### GET /wapi/wallet/account Query parameters: - `index`: Wallet index Returns specific wallet info, same as `wallet/accounts`. #### GET /wapi/wallet/balance Query parameters: - `index`: Wallet index - `currency`: Optional currency address (bech32) - `with_zero`: If to include zero balances (default = false) Returns an object: - `balances`: Array of balance objects - `nfts`: Array of NFT addresses #### GET /wapi/wallet/address Query parameters: - `index`: Wallet index - `limit`: Result limit (default = 1) - `offset`: Starting offset (default = 0) Returns an array of wallet addresses in case limit > 1, otherwise returns single address at specified offset. #### GET /wapi/wallet/tokens Returns an array of white-listed token objects. #### GET /wapi/wallet/history Query parameters: - `index`: Wallet index - `limit`: Result limit (default = 100) - `since`: Since block height, inclusive (default = 0) - `until`: Until block height, inclusive (default = current height) - `type`: Optional type filter: `RECEIVE`, `SPEND`, `TXFEE`, `REWARD`, `VDF_REWARD` - `memo`: Optional memo filter (exact matches only) - `currency`: Optional curreny filter (bech32 token address) Returns an array of objects: - `height`: Block height (4294967295 in case pending) - `txid`: Transaction ID or block hash in case of `REWARD` and `VDF_REWARD` - `amount`: Token amount (integer) - `value` Token value (float with decimals) - `decimals`: Number of decimals - etc :::note[Note] This endpoint includes pending transactions, `is_pending` or `height` needs to be checked. ::: #### GET /wapi/wallet/tx_history Query parameters: - `index`: Wallet index - `limit`: Result limit (default = 100) Returns most recent sent transactions. #### GET /wapi/wallet/keys Query parameters: - `index`: Wallet index Returns an object: - `farmer_public_key`: Farmer public key #### GET /wapi/wallet/seed Query parameters: - `index`: Wallet index Returns an object with the mnemonic seed: - `words`: Array of words - `string`: String of words with space in-between #### POST /wapi/wallet/send Send tokens to a single destination. Request payload is an object of arguments: - `index`: Wallet index - `amount`: Floating point amount, either as float or string. - `currency`: Token address (bech32, default = MMX) - `dst_addr`: Destination address (bech32) - `src_addr`: Optional source address (bech32) - `raw_mode`: Boolean, if true `amount` is parsed as a raw integer (default = false) - `options`: Object with options Returns transaction object if successful. #### POST /wapi/wallet/send_many Send tokens to many destinations in a single transaction. Same as `/wapi/wallet/send`, except: - `amounts`: Array of pairs: `[[address, amount], ...]` - `src_addr`: Not supported #### POST /wapi/wallet/send_off Send a given transaction, while marking it as spent in the cache. Request payload is an object of arguments: - `index`: Wallet index - `tx`: Transaction object Returns status 200 if successful. :::note[Note] Clients must handle `nonce` field as a 64-bit integer, truncation will cause static failure. ::: #### POST /wapi/wallet/deploy Deploy a contract. Request payload is an object of arguments: - `index`: Wallet index - `payload`: Contract object - `options`: Object with options Returns contract address (bech32) if successful. Example `payload` for a smart contract: ```json { "__type": "mmx.contract.Executable", "name": "Fake Testnet USD", "symbol": "USDM", "decimals": 4, "binary": "mmx17pzl9cgmesyjur7rvvev70fx7f55rvyv7549cvrtf7chjml4qh4sryu9yl", "init_args": ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"] } ``` #### POST /wapi/wallet/execute Execute a single smart contract function. Request payload is an object of arguments: - `index`: Wallet index - `address`: Contract address - `method`: Method name - `args`: Array of function arguments (positional) - `user`: Optional custom user (default = first address) - `options`: Object with options Returns transaction object if successful. ================================================ FILE: docs/src/content/docs/software/cli-commands.md ================================================ --- title: CLI Commands description: MMX Node CLI Command Reference. --- When compiled from source: ```bash frame="none" cd mmx-node source ./activate.sh ``` With a binary package install, just open a new terminal. On Windows search for `MMX CMD`. To run any `mmx` commands (except `mmx wallet create`), the node needs to be running. See [Getting Started](../../guides/getting-started/) to read on how to start it. ## Node CLI To check on the node: `mmx node info` To check on the peers: `mmx node peers` To check on a transaction: `mmx node tx ` To show current node height: `mmx node get height` To dump a transaction: `mmx node get tx ` To dump a contract: `mmx node get contract
` To get balance for an address: `mmx node get balance
-x ` To get raw balance for an address: `mmx node get amount
-x ` To dump a block: `mmx node get block ` To dump a block header: `mmx node get header ` To show connected peers: `mmx node get peers` To show estimated netspace: `mmx node get netspace` To show circulating coin supply: `mmx node get supply` To call a smart contract const function: `mmx node call` To show smart contract state variables: `mmx node read` To dump all storage of a smart contract: `mmx node dump` To dump assembly code of a smart contract: `mmx node dump_code` To fetch a block from a peer: `mmx node fetch block ` To fetch a block header from a peer: `mmx node fetch header ` To check the balance of an address: `mmx node balance
` To check the history of an address since a particlar block height: `mmx node history
` To csv export the history of an address since a particlar block height: `mmx node history_csv
` To show all offers: `mmx node offers [open | closed]` To force a re-sync: `mmx node sync` To replay/revert to an earlier block height: `mmx node revert ` ## Wallet CLI To show everything in a wallet: `mmx wallet show` To show wallet balances: `mmx wallet show balance` To show wallet contracts: `mmx wallet show contracts` To show wallet offers: `mmx wallet show offers` To get a specific wallet address: `mmx wallet get address` To get a specific wallet balance: `mmx wallet get balance` To get a specific raw wallet balance: `mmx wallet get amount` To get a list of all contract addresses: `mmx wallet get contracts` To get the mnemonic seed words of a wallet: `mmx wallet get seed` To show entire wallet activity : `mmx wallet log` To csv export entire wallet activity : `mmx wallet log_csv` To show recent wallet activity : `mmx wallet log -N ` To transfer funds: `mmx wallet send ` ``` -a -r -t -x ``` To withdraw funds from a contract: `mmx wallet send_from -s
` To transfer an NFT, same as sending with one satoshi: `mmx wallet transfer` To create an offer on the chain: `mmx wallet offer` ``` (-x / -z default MMX) -a -b -x -z ``` To accept an offer: `mmx wallet accept
` To mint tokens: `mmx wallet mint` ``` -a -t -x ``` To deploy a contract: `mmx wallet deploy ` To execute a smart contract function: `mmx wallet exec -x ` To deposit funds to a smart contract: `mmx wallet deposit ` ``` -a -t -x ``` To create a new wallet (offline): `mmx wallet create -f [file_name] [--with-passphrase]` To create a new wallet (online): `mmx wallet new [name] [--with-passphrase]` To restore a wallet from a seed hash: `mmx wallet create --with-seed` To restore a wallet from a set of 24 mnemonic words: `mmx wallet create --with-mnemonic` To show all wallets and their index: `mmx wallet accounts` To get farmer / pool keys for plotting: `mmx wallet keys` To lock a wallet if passphase enabled: `mmx wallet lock` To unlock a wallet with passphrase: `mmx wallet unlock` **To use a non-default wallet, specify `-j ` in combination with the above commands. See `mmx wallet accounts`.** ## Farmer CLI To check on the farm: `mmx farm info` To get total space in bytes: `mmx farm get space` To show plot directories: `mmx farm get dirs` To add plot directories: `mmx farm add ` To remove plot directories: `mmx farm remove ` To reload plots: `mmx farm reload` ## Harvester CLI To check on the harvester: `mmx harvester info` To get harvester space in bytes: `mmx harvester get space` To show plot directories: `mmx harvester get dirs` To add plot directories: `mmx harvester add ` To remove plot directories: `mmx harvester remove ` To reload plots: `mmx harvester reload` ## Pooling To use pooling first create a plot NFT, then create plots for it and finally join a pool. ### Create Plot NFT ```bash frame="none" mmx wallet plotnft create ``` `` can be any string without whitespace. After creation the plot NFT is in solo farming mode, which means block rewards will directly go to your Farmer reward address. See below how to join a pool. :::note[Note] Need to wait for the transaction to confirm before it will show up.\ This command takes the usual `-j ` argument to select a different wallet. ::: ### Show Plot NFTs ```bash frame="none" mmx wallet plotnft show ``` The address shown in `[...]` is the plot NFT contract address, which needs to be used for plotting. :::note[Note] This command takes the usual `-j ` argument to select a different wallet. ::: Example: ```bash frame="none" mmx wallet plotnft show -j 1 ``` ``` [mmx1wknv8xxvzjafrswsrwr3l85y6d8nms2dz22dgxl2qpcyjp64amtsjqjna5] Name: test1 Locked: true Server URL: http://localhost:8080 ``` ### Join a Pool First you need to obtain the pool server URL for the pool, via their website or discord. ```bash frame="none" mmx wallet plotnft join -x ``` `` is the same as used for plotting, see `mmx wallet plotnft show`. :::note[Note] This command does not need any `-j` to select a wallet. ::: Example: ```bash frame="none" mmx wallet plotnft join http://localhost:8080 -x mmx1wknv8xxvzjafrswsrwr3l85y6d8nms2dz22dgxl2qpcyjp64amtsjqjna5 ``` ### Leave Pool ```bash frame="none" mmx wallet plotnft unlock -x ``` This will take 256 blocks to complete, to avoid cheating. Once complete the plot NFT is in solo farming mode, which means block rewards will directly go to your Farmer reward address. :::note[Note] This command does not need any `-j` to select a wallet. ::: Example: ```bash frame="none" mmx wallet plotnft unlock -x mmx1wknv8xxvzjafrswsrwr3l85y6d8nms2dz22dgxl2qpcyjp64amtsjqjna5 ``` ### Switch Pool First leave the current pool, wait 256 blocks for the plot NFT to unlock, then join the new pool as shown above. ### Show Info To see pool account: `mmx pool info` To see partials info: `mmx farm info` Example: ```bash frame="none" mmx pool info ``` ``` Pool [http://localhost:8080] Balance: 1.5 MMX Total Paid: 123.456 MMX Difficulty: 1 Pool Share: 33 % Partial Rate: 33.5417 per hour Blocks Found: 42 Estimated Space: 13.3789 TB ``` ```bash frame="none" mmx farm info ``` ``` Plot NFT [mmx1wknv8xxvzjafrswsrwr3l85y6d8nms2dz22dgxl2qpcyjp64amtsjqjna5] Name: test1 Server URL: http://localhost:8080 Target Address: mmx1uj2dth7r9tcn3vas42f0hzz74dkz8ygv59mpx44n7px7j7yhvv4sfmkf0d Plot Count: 100 Points: 309 OK / 0 FAIL Difficulty: 1 Avg. Response: 0.515676 sec Last Partial: 2024-10-13 23:25:44 ``` ================================================ FILE: docs/src/content/docs/software/web_wallet_api.md ================================================ --- title: Web Wallet API description: API to interact with the web wallet (extension). --- The MMX Web Wallet can be accessed from any webpage via `window.mmx_wallet`. Even though the wallet can have multiple accounts or addresses, only one is active at a time, to simplify the API. ### get_address() Returns the (currently active) wallet address in bech32 format. Keep in mind this address can be spoofed by the wallet. To make sure the user actually owns this address you need to have them sign a random message via `sign_message(msg)` and verify the signature. ### get_public_key() Returns the (currently active) wallet public key in hex string format (upper case). ### get_network() Returns `MMX/mainnet` for mainnet. ### sign_message(msg) Signs a string message with the prefix `MMX/sign_message/` using SHA2-256. Used to prove ownership of the wallet (address). Example: ``` wallet.sign_message("test123") // -> Sign(SHA256("MMX/sign_message/test123")) ``` Returns an object with the signature and public key in hex string format (upper case): ``` {"signature": "123ABC...", "public_key": "345345FDD"} ``` Returns `null` in case the user doesn't approve. ### sign_transaction(tx) Signs a given transaction if the user approves it. The `tx` format is the same as specified in `interface/Transaction.vni`. If `tx.id` is not specified, the user is free to modify the given transaction, such as expiration height or fee level. Returns the signed transaction in full. Returns `null` in case the user doesn't approve. ================================================ FILE: docs/src/content.config.ts ================================================ import { defineCollection, z } from 'astro:content'; import { docsLoader } from '@astrojs/starlight/loaders'; import { docsSchema } from '@astrojs/starlight/schema'; export const collections = { docs: defineCollection({ loader: docsLoader(), schema: docsSchema({ extend: z.object({ articlePublished: z.date().optional(), articleUpdated: z.date().optional(), authorName: z.string().optional(), authorPicture: z.string().optional(), authorURL: z.string().optional(), }), }), }), }; ================================================ FILE: docs/src/pages/tools/time-calculator.astro ================================================ --- import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; import AnchorHeading from '@astrojs/starlight/components/AnchorHeading.astro'; ---

Simple calculator to lookup or estimate heights, time and date.
Read this FAQ entry for understanding of height vs. VDF height.

Lookup height

RPC query data from public blockchain explorer.

Height
VDF Height
Timestamp
Local Time
UTC Time
Discord
Proof Score
Estimate height

Estimate result for a given height or timestamp.

Height
VDF Height
Timestamp
Local Time
UTC Time
Discord
Estimating with data from height

VDF height:
Timestamp:
% non-TX heights, previous 500k
% 10 sec deviation, previous 500k

================================================ FILE: docs/src/styles/style.css ================================================ :root { --sl-color-white: hsl(0, 0%, 100%); --sl-color-gray-1: hsl(232, 0%, 94%); --sl-color-gray-2: hsl(232, 0%, 77%); --sl-color-gray-3: hsl(232, 0%, 56%); --sl-color-gray-4: hsl(232, 0%, 36%); --sl-color-gray-5: hsl(232, 0%, 23%); --sl-color-gray-6: hsl(232, 0%, 16%); --sl-color-black: hsl(232, 0%, 7%); --sl-nav-pad-y: 0rem; .site-title { color: var(--sl-color-white); } .site-title { font-size: var(--sl-text-h3); } .social-icons > a { color: var(--sl-color-white); padding: 0.5em; margin: -0.5em; } .social-icons > a:hover { opacity: 0.66; } .sl-markdown-content :is(h1, h2, h3, h4, h5, h6) > a { color: var(--sl-color-white); text-decoration: none; } } :root[data-theme='light'] { --sl-color-white: hsl(232, 0%, 5%); --sl-color-gray-1: hsl(232, 0%, 13%); --sl-color-gray-2: hsl(232, 0%, 20%); --sl-color-gray-3: hsl(232, 0%, 33%); --sl-color-gray-4: hsl(232, 0%, 53%); --sl-color-gray-5: hsl(232, 0%, 75%); --sl-color-gray-6: hsl(232, 0%, 93%); --sl-color-gray-7: hsl(232, 0%, 96%); --sl-color-black: hsl(0, 0%, 100%); } :root[data-has-sidebar] { .sl-container:has(footer) { max-width: none; } --sl-custom-content-pad-x-max: 5rem; --sl-custom-main-pane-width-max: 80rem; @media (min-width: 50rem) { --__sl-custom-grid-col1-min1: calc(var(--sl-content-width) + (var(--sl-nav-pad-x) * 2) + var(--sl-content-pad-x)); --__sl-custom-grid-col1-min2: calc(var(--sl-sidebar-pad-x) + var(--sl-sidebar-width) + var(--sl-sidebar-pad-x) + var(--sl-content-pad-x)); .header { grid-template-columns: minmax(max(min(100% - var(--__sl-custom-grid-col1-min1), var(--__sl-custom-grid-col1-min2)), calc(var(--sl-sidebar-width) - var(--sl-nav-pad-x))), auto) 1fr auto; } } @media (min-width: 72rem) { .main-pane { --__sl-custom-tmp72-min: calc(var(--sl-content-width) + (var(--sl-content-pad-x) * 2)); padding-left: min(100% - var(--__sl-custom-tmp72-min) - (var(--sl-nav-pad-x) * 2), var(--sl-custom-content-pad-x-max)); width: min(100%, var(--sl-custom-main-pane-width-max) - var(--sl-custom-content-pad-x-max)); } .sl-container:has(h1#_top) { margin-inline: 0 auto; } } } :root[data-has-sidebar][data-has-toc] { .sl-container:has(footer) { max-width: none; } .right-sidebar-container { width: var(--sl-sidebar-width); } --sl-custom-content-pad-x-max: 5rem; --sl-custom-main-pane-width-max: 80rem; @media (min-width: 50rem) { --__sl-custom-grid-col1-min1: calc(var(--sl-content-pad-x) + var(--sl-content-width) + var(--sl-content-pad-x) + var(--sl-sidebar-width) + var(--sl-nav-pad-x)); --__sl-custom-grid-col1-min2: calc(var(--sl-sidebar-pad-x) + var(--sl-sidebar-width) + var(--sl-sidebar-pad-x) + var(--sl-content-pad-x)); .header { grid-template-columns: minmax(max(min(100% - var(--__sl-custom-grid-col1-min1), var(--__sl-custom-grid-col1-min2)), calc(var(--sl-sidebar-width) - var(--sl-nav-pad-x))), auto) 1fr auto; } } @media (min-width: 72rem) { .main-pane { --__sl-custom-tmp72-min1: calc(var(--sl-content-width) + (var(--sl-content-pad-x) * 2) + var(--sl-sidebar-width) + (var(--sl-nav-pad-x) * 2)); --__sl-custom-tmp72-min2: calc(var(--__sl-custom-tmp72-min1) + var(--sl-custom-content-pad-x-max)); padding-left: min(100% - var(--__sl-custom-tmp72-min1), var(--sl-custom-content-pad-x-max)); padding-right: min(100% - var(--__sl-custom-tmp72-min2), var(--sl-custom-content-pad-x-max)); width: min(100% - var(--sl-sidebar-width), var(--sl-custom-main-pane-width-max)); } .sl-container:has(h1#_top) { margin-inline: 0 auto; } } } ================================================ FILE: docs/tsconfig.json ================================================ { "extends": "astro/tsconfigs/strict", "include": [".astro/types.d.ts", "**/*"], "exclude": ["dist"] } ================================================ FILE: generated/contract/include/mmx/contract/Binary.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_Binary_HXX_ #define INCLUDE_mmx_contract_Binary_HXX_ #include #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT Binary : public ::mmx::Contract { public: std::string name; std::map fields; std::map methods; std::vector constant; std::vector binary; std::map line_info; std::string source; std::string compiler; ::mmx::compile_flags_t build_flags; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xbbeba47fc8b740e5ull; Binary() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; virtual vnx::optional find_field(const std::string& name = "") const; virtual vnx::optional<::mmx::contract::method_t> find_method(const std::string& name = "") const; virtual vnx::optional find_line(const uint32_t& address = 0) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Binary& _value); friend std::istream& operator>>(std::istream& _in, Binary& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Binary::accept_generic(T& _visitor) const { _visitor.template type_begin(10); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("fields", 2); _visitor.accept(fields); _visitor.type_field("methods", 3); _visitor.accept(methods); _visitor.type_field("constant", 4); _visitor.accept(constant); _visitor.type_field("binary", 5); _visitor.accept(binary); _visitor.type_field("line_info", 6); _visitor.accept(line_info); _visitor.type_field("source", 7); _visitor.accept(source); _visitor.type_field("compiler", 8); _visitor.accept(compiler); _visitor.type_field("build_flags", 9); _visitor.accept(build_flags); _visitor.template type_end(10); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_Binary_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/Data.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_Data_HXX_ #define INCLUDE_mmx_contract_Data_HXX_ #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT Data : public ::mmx::Contract { public: ::vnx::Variant value; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xadfeee3822244f50ull; Data() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Data& _value); friend std::istream& operator>>(std::istream& _in, Data& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Data::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("value", 1); _visitor.accept(value); _visitor.template type_end(2); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_Data_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/Executable.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_Executable_HXX_ #define INCLUDE_mmx_contract_Executable_HXX_ #include #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT Executable : public ::mmx::contract::TokenBase { public: ::mmx::addr_t binary; std::string init_method = "init"; std::vector<::vnx::Variant> init_args; std::map depends; typedef ::mmx::contract::TokenBase Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfa6a3ac9103ebb12ull; Executable() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::addr_t get_external(const std::string& name = "") const; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const; virtual uint64_t num_bytes() const override; virtual ::vnx::Variant read_field(const std::string& name = "") const; virtual ::vnx::Variant get_arg(const uint32_t& index = 0) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Executable& _value); friend std::istream& operator>>(std::istream& _in, Executable& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Executable::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("symbol", 2); _visitor.accept(symbol); _visitor.type_field("decimals", 3); _visitor.accept(decimals); _visitor.type_field("meta_data", 4); _visitor.accept(meta_data); _visitor.type_field("binary", 5); _visitor.accept(binary); _visitor.type_field("init_method", 6); _visitor.accept(init_method); _visitor.type_field("init_args", 7); _visitor.accept(init_args); _visitor.type_field("depends", 8); _visitor.accept(depends); _visitor.template type_end(9); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_Executable_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/MultiSig.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_MultiSig_HXX_ #define INCLUDE_mmx_contract_MultiSig_HXX_ #include #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT MultiSig : public ::mmx::Contract { public: uint32_t num_required = 0; std::set<::mmx::addr_t> owners; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7d674c5f7297dedull; MultiSig() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; virtual void validate(std::shared_ptr solution = nullptr, const ::mmx::hash_t& txid = ::mmx::hash_t()) const override; virtual ::vnx::Variant read_field(const std::string& name = "") const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const MultiSig& _value); friend std::istream& operator>>(std::istream& _in, MultiSig& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void MultiSig::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("num_required", 1); _visitor.accept(num_required); _visitor.type_field("owners", 2); _visitor.accept(owners); _visitor.template type_end(3); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_MultiSig_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/PubKey.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_PubKey_HXX_ #define INCLUDE_mmx_contract_PubKey_HXX_ #include #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT PubKey : public ::mmx::Contract { public: ::mmx::addr_t address; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9b3cd508d7f41423ull; PubKey() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; virtual vnx::optional<::mmx::addr_t> get_owner() const override; virtual void validate(std::shared_ptr solution = nullptr, const ::mmx::hash_t& txid = ::mmx::hash_t()) const override; virtual ::vnx::Variant read_field(const std::string& name = "") const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const PubKey& _value); friend std::istream& operator>>(std::istream& _in, PubKey& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void PubKey::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.template type_end(2); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_PubKey_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/TokenBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_TokenBase_HXX_ #define INCLUDE_mmx_contract_TokenBase_HXX_ #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT TokenBase : public ::mmx::Contract { public: std::string name; std::string symbol; int32_t decimals = 0; ::vnx::Variant meta_data; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5aeed4c96d232b5eull; TokenBase() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const TokenBase& _value); friend std::istream& operator>>(std::istream& _in, TokenBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void TokenBase::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("symbol", 2); _visitor.accept(symbol); _visitor.type_field("decimals", 3); _visitor.accept(decimals); _visitor.type_field("meta_data", 4); _visitor.accept(meta_data); _visitor.template type_end(5); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_TokenBase_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/WebData.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_WebData_HXX_ #define INCLUDE_mmx_contract_WebData_HXX_ #include #include #include #include #include #include namespace mmx { namespace contract { class MMX_CONTRACT_EXPORT WebData : public ::mmx::Contract { public: std::string mime_type; ::vnx::Buffer payload; typedef ::mmx::Contract Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf7c226b211c088c4ull; WebData() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t num_bytes() const override; virtual ::vnx::Variant read_field(const std::string& name = "") const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WebData& _value); friend std::istream& operator>>(std::istream& _in, WebData& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void WebData::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("mime_type", 1); _visitor.accept(mime_type); _visitor.type_field("payload", 2); _visitor.accept(payload); _visitor.template type_end(3); } } // namespace mmx } // namespace contract namespace vnx { } // vnx #endif // INCLUDE_mmx_contract_WebData_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/accept_generic.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_ACCEPT_GENERIC_HXX_ #define INCLUDE_mmx_contract_ACCEPT_GENERIC_HXX_ #include #include #include #include #include #include #include namespace vnx { template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else { value->accept_generic(visitor); } } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } } // namespace vnx #endif // INCLUDE_mmx_contract_ACCEPT_GENERIC_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/method_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_method_t_HXX_ #define INCLUDE_mmx_contract_method_t_HXX_ #include #include namespace mmx { namespace contract { struct MMX_CONTRACT_EXPORT method_t : vnx::struct_t { std::string name; std::string info; vnx::bool_t is_init = 0; vnx::bool_t is_const = 0; vnx::bool_t is_public = 0; vnx::bool_t is_payable = 0; uint32_t entry_point = 0; std::vector args; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1f62512698176a39ull; method_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; uint64_t num_bytes() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const method_t& _value); friend std::istream& operator>>(std::istream& _in, method_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void method_t::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("name", 0); _visitor.accept(name); _visitor.type_field("info", 1); _visitor.accept(info); _visitor.type_field("is_init", 2); _visitor.accept(is_init); _visitor.type_field("is_const", 3); _visitor.accept(is_const); _visitor.type_field("is_public", 4); _visitor.accept(is_public); _visitor.type_field("is_payable", 5); _visitor.accept(is_payable); _visitor.type_field("entry_point", 6); _visitor.accept(entry_point); _visitor.type_field("args", 7); _visitor.accept(args); _visitor.template type_end(8); } } // namespace mmx } // namespace contract namespace vnx { template<> struct is_equivalent<::mmx::contract::method_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_contract_method_t_HXX_ ================================================ FILE: generated/contract/include/mmx/contract/package.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_contract_PACKAGE_HXX_ #define INCLUDE_mmx_contract_PACKAGE_HXX_ #include #include #include #ifdef MMX_CONTRACT_EXPORT_ENABLE #include #else #ifndef MMX_CONTRACT_EXPORT #define MMX_CONTRACT_EXPORT #endif #endif namespace mmx { namespace contract { void register_all_types(); class Binary; class Data; class Executable; class MultiSig; class PubKey; class TokenBase; class WebData; struct method_t; MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Binary; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Data; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Executable; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_MultiSig; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PubKey; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_TokenBase; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WebData; ///< \private MMX_CONTRACT_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_method_t; ///< \private } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(std::istream& in, ::mmx::contract::Binary& value); ///< \private void read(std::istream& in, ::mmx::contract::Data& value); ///< \private void read(std::istream& in, ::mmx::contract::Executable& value); ///< \private void read(std::istream& in, ::mmx::contract::MultiSig& value); ///< \private void read(std::istream& in, ::mmx::contract::PubKey& value); ///< \private void read(std::istream& in, ::mmx::contract::TokenBase& value); ///< \private void read(std::istream& in, ::mmx::contract::WebData& value); ///< \private void read(std::istream& in, ::mmx::contract::method_t& value); ///< \private void write(std::ostream& out, const ::mmx::contract::Binary& value); ///< \private void write(std::ostream& out, const ::mmx::contract::Data& value); ///< \private void write(std::ostream& out, const ::mmx::contract::Executable& value); ///< \private void write(std::ostream& out, const ::mmx::contract::MultiSig& value); ///< \private void write(std::ostream& out, const ::mmx::contract::PubKey& value); ///< \private void write(std::ostream& out, const ::mmx::contract::TokenBase& value); ///< \private void write(std::ostream& out, const ::mmx::contract::WebData& value); ///< \private void write(std::ostream& out, const ::mmx::contract::method_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::Binary& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::Data& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::Executable& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::MultiSig& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::PubKey& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::TokenBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::WebData& value); ///< \private void accept(Visitor& visitor, const ::mmx::contract::method_t& value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private /// \private template<> struct type<::mmx::contract::Binary> { void read(TypeInput& in, ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::Binary& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::Binary& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::Binary& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::Binary& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::Data> { void read(TypeInput& in, ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::Data& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::Data& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::Data& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::Data& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::Executable> { void read(TypeInput& in, ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::Executable& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::Executable& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::Executable& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::Executable& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::MultiSig> { void read(TypeInput& in, ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::MultiSig& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::MultiSig& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::MultiSig& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::MultiSig& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::PubKey> { void read(TypeInput& in, ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::PubKey& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::PubKey& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::PubKey& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::PubKey& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::TokenBase> { void read(TypeInput& in, ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::TokenBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::TokenBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::TokenBase& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::TokenBase& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::WebData> { void read(TypeInput& in, ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::WebData& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::WebData& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::WebData& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::WebData& value, bool special = false); }; /// \private template<> struct type<::mmx::contract::method_t> { void read(TypeInput& in, ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::contract::method_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::contract::method_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::contract::method_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::contract::method_t& value, bool special = false); }; } // namespace vnx #endif // INCLUDE_mmx_contract_PACKAGE_HXX_ ================================================ FILE: generated/contract/src/Binary.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 Binary::VNX_TYPE_HASH(0xbbeba47fc8b740e5ull); const vnx::Hash64 Binary::VNX_CODE_HASH(0xdafe5167bf0b4ebbull); vnx::Hash64 Binary::get_type_hash() const { return VNX_TYPE_HASH; } std::string Binary::get_type_name() const { return "mmx.contract.Binary"; } const vnx::TypeCode* Binary::get_type_code() const { return mmx::contract::vnx_native_type_code_Binary; } std::shared_ptr Binary::create() { return std::make_shared(); } std::shared_ptr Binary::clone() const { return std::make_shared(*this); } void Binary::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Binary::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Binary::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_Binary; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, fields); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, methods); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, constant); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, binary); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, line_info); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, source); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, compiler); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, build_flags); _visitor.type_end(*_type_code); } void Binary::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.Binary\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"fields\": "; vnx::write(_out, fields); _out << ", \"methods\": "; vnx::write(_out, methods); _out << ", \"constant\": "; vnx::write(_out, constant); _out << ", \"binary\": "; vnx::write(_out, binary); _out << ", \"line_info\": "; vnx::write(_out, line_info); _out << ", \"source\": "; vnx::write(_out, source); _out << ", \"compiler\": "; vnx::write(_out, compiler); _out << ", \"build_flags\": "; vnx::write(_out, build_flags); _out << "}"; } void Binary::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Binary::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.Binary"; _object["version"] = version; _object["name"] = name; _object["fields"] = fields; _object["methods"] = methods; _object["constant"] = constant; _object["binary"] = binary; _object["line_info"] = line_info; _object["source"] = source; _object["compiler"] = compiler; _object["build_flags"] = build_flags; return _object; } void Binary::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "binary") { _entry.second.to(binary); } else if(_entry.first == "build_flags") { _entry.second.to(build_flags); } else if(_entry.first == "compiler") { _entry.second.to(compiler); } else if(_entry.first == "constant") { _entry.second.to(constant); } else if(_entry.first == "fields") { _entry.second.to(fields); } else if(_entry.first == "line_info") { _entry.second.to(line_info); } else if(_entry.first == "methods") { _entry.second.to(methods); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "source") { _entry.second.to(source); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Binary::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "name") { return vnx::Variant(name); } if(_name == "fields") { return vnx::Variant(fields); } if(_name == "methods") { return vnx::Variant(methods); } if(_name == "constant") { return vnx::Variant(constant); } if(_name == "binary") { return vnx::Variant(binary); } if(_name == "line_info") { return vnx::Variant(line_info); } if(_name == "source") { return vnx::Variant(source); } if(_name == "compiler") { return vnx::Variant(compiler); } if(_name == "build_flags") { return vnx::Variant(build_flags); } return vnx::Variant(); } void Binary::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "name") { _value.to(name); } else if(_name == "fields") { _value.to(fields); } else if(_name == "methods") { _value.to(methods); } else if(_name == "constant") { _value.to(constant); } else if(_name == "binary") { _value.to(binary); } else if(_name == "line_info") { _value.to(line_info); } else if(_name == "source") { _value.to(source); } else if(_name == "compiler") { _value.to(compiler); } else if(_name == "build_flags") { _value.to(build_flags); } } /// \private std::ostream& operator<<(std::ostream& _out, const Binary& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Binary& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Binary::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Binary::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.Binary"; type_code->type_hash = vnx::Hash64(0xbbeba47fc8b740e5ull); type_code->code_hash = vnx::Hash64(0xdafe5167bf0b4ebbull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::Binary); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(2); type_code->depends[0] = ::mmx::contract::method_t::static_get_type_code(); type_code->depends[1] = ::mmx::compile_flags_t::static_get_type_code(); type_code->fields.resize(10); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "fields"; field.code = {13, 3, 32, 3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "methods"; field.code = {13, 3, 32, 19, 0}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "constant"; field.code = {12, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "binary"; field.code = {12, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "line_info"; field.code = {13, 3, 3, 3}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "source"; field.code = {32}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "compiler"; field.code = {32}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "build_flags"; field.code = {19, 1}; } type_code->build(); return type_code; } std::shared_ptr Binary::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.fields, type_code, _field->code.data()); break; case 3: vnx::read(in, value.methods, type_code, _field->code.data()); break; case 4: vnx::read(in, value.constant, type_code, _field->code.data()); break; case 5: vnx::read(in, value.binary, type_code, _field->code.data()); break; case 6: vnx::read(in, value.line_info, type_code, _field->code.data()); break; case 7: vnx::read(in, value.source, type_code, _field->code.data()); break; case 8: vnx::read(in, value.compiler, type_code, _field->code.data()); break; case 9: vnx::read(in, value.build_flags, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::Binary& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_Binary; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::Binary>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.fields, type_code, type_code->fields[2].code.data()); vnx::write(out, value.methods, type_code, type_code->fields[3].code.data()); vnx::write(out, value.constant, type_code, type_code->fields[4].code.data()); vnx::write(out, value.binary, type_code, type_code->fields[5].code.data()); vnx::write(out, value.line_info, type_code, type_code->fields[6].code.data()); vnx::write(out, value.source, type_code, type_code->fields[7].code.data()); vnx::write(out, value.compiler, type_code, type_code->fields[8].code.data()); vnx::write(out, value.build_flags, type_code, type_code->fields[9].code.data()); } void read(std::istream& in, ::mmx::contract::Binary& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::Binary& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::Binary& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/Data.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 Data::VNX_TYPE_HASH(0xadfeee3822244f50ull); const vnx::Hash64 Data::VNX_CODE_HASH(0x7a6fca30dfd10cdeull); vnx::Hash64 Data::get_type_hash() const { return VNX_TYPE_HASH; } std::string Data::get_type_name() const { return "mmx.contract.Data"; } const vnx::TypeCode* Data::get_type_code() const { return mmx::contract::vnx_native_type_code_Data; } std::shared_ptr Data::create() { return std::make_shared(); } std::shared_ptr Data::clone() const { return std::make_shared(*this); } void Data::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Data::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Data::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_Data; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, value); _visitor.type_end(*_type_code); } void Data::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.Data\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"value\": "; vnx::write(_out, value); _out << "}"; } void Data::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Data::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.Data"; _object["version"] = version; _object["value"] = value; return _object; } void Data::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Data::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void Data::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const Data& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Data& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Data::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Data::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.Data"; type_code->type_hash = vnx::Hash64(0xadfeee3822244f50ull); type_code->code_hash = vnx::Hash64(0x7a6fca30dfd10cdeull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::Data); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "value"; field.code = {17}; } type_code->build(); return type_code; } std::shared_ptr Data::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.value, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::Data& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_Data; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::Data>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.value, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::contract::Data& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::Data& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::Data& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/Executable.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 Executable::VNX_TYPE_HASH(0xfa6a3ac9103ebb12ull); const vnx::Hash64 Executable::VNX_CODE_HASH(0x470f751e7fd03cf8ull); vnx::Hash64 Executable::get_type_hash() const { return VNX_TYPE_HASH; } std::string Executable::get_type_name() const { return "mmx.contract.Executable"; } const vnx::TypeCode* Executable::get_type_code() const { return mmx::contract::vnx_native_type_code_Executable; } std::shared_ptr Executable::create() { return std::make_shared(); } std::shared_ptr Executable::clone() const { return std::make_shared(*this); } void Executable::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Executable::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Executable::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_Executable; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, symbol); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, decimals); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, meta_data); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, binary); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, init_method); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, init_args); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, depends); _visitor.type_end(*_type_code); } void Executable::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.Executable\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"symbol\": "; vnx::write(_out, symbol); _out << ", \"decimals\": "; vnx::write(_out, decimals); _out << ", \"meta_data\": "; vnx::write(_out, meta_data); _out << ", \"binary\": "; vnx::write(_out, binary); _out << ", \"init_method\": "; vnx::write(_out, init_method); _out << ", \"init_args\": "; vnx::write(_out, init_args); _out << ", \"depends\": "; vnx::write(_out, depends); _out << "}"; } void Executable::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Executable::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.Executable"; _object["version"] = version; _object["name"] = name; _object["symbol"] = symbol; _object["decimals"] = decimals; _object["meta_data"] = meta_data; _object["binary"] = binary; _object["init_method"] = init_method; _object["init_args"] = init_args; _object["depends"] = depends; return _object; } void Executable::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "binary") { _entry.second.to(binary); } else if(_entry.first == "decimals") { _entry.second.to(decimals); } else if(_entry.first == "depends") { _entry.second.to(depends); } else if(_entry.first == "init_args") { _entry.second.to(init_args); } else if(_entry.first == "init_method") { _entry.second.to(init_method); } else if(_entry.first == "meta_data") { _entry.second.to(meta_data); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "symbol") { _entry.second.to(symbol); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Executable::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "name") { return vnx::Variant(name); } if(_name == "symbol") { return vnx::Variant(symbol); } if(_name == "decimals") { return vnx::Variant(decimals); } if(_name == "meta_data") { return vnx::Variant(meta_data); } if(_name == "binary") { return vnx::Variant(binary); } if(_name == "init_method") { return vnx::Variant(init_method); } if(_name == "init_args") { return vnx::Variant(init_args); } if(_name == "depends") { return vnx::Variant(depends); } return vnx::Variant(); } void Executable::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "name") { _value.to(name); } else if(_name == "symbol") { _value.to(symbol); } else if(_name == "decimals") { _value.to(decimals); } else if(_name == "meta_data") { _value.to(meta_data); } else if(_name == "binary") { _value.to(binary); } else if(_name == "init_method") { _value.to(init_method); } else if(_name == "init_args") { _value.to(init_args); } else if(_name == "depends") { _value.to(depends); } } /// \private std::ostream& operator<<(std::ostream& _out, const Executable& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Executable& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Executable::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Executable::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.Executable"; type_code->type_hash = vnx::Hash64(0xfa6a3ac9103ebb12ull); type_code->code_hash = vnx::Hash64(0x470f751e7fd03cf8ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::Executable); type_code->parents.resize(2); type_code->parents[0] = ::mmx::contract::TokenBase::static_get_type_code(); type_code->parents[1] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "symbol"; field.code = {32}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "decimals"; field.value = vnx::to_string(0); field.code = {7}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "meta_data"; field.code = {17}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "init_method"; field.value = vnx::to_string("init"); field.code = {32}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "init_args"; field.code = {12, 17}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "depends"; field.code = {13, 3, 32, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr Executable::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.decimals, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.symbol, type_code, _field->code.data()); break; case 4: vnx::read(in, value.meta_data, type_code, _field->code.data()); break; case 5: vnx::read(in, value.binary, type_code, _field->code.data()); break; case 6: vnx::read(in, value.init_method, type_code, _field->code.data()); break; case 7: vnx::read(in, value.init_args, type_code, _field->code.data()); break; case 8: vnx::read(in, value.depends, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::Executable& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_Executable; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::Executable>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.decimals); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.symbol, type_code, type_code->fields[2].code.data()); vnx::write(out, value.meta_data, type_code, type_code->fields[4].code.data()); vnx::write(out, value.binary, type_code, type_code->fields[5].code.data()); vnx::write(out, value.init_method, type_code, type_code->fields[6].code.data()); vnx::write(out, value.init_args, type_code, type_code->fields[7].code.data()); vnx::write(out, value.depends, type_code, type_code->fields[8].code.data()); } void read(std::istream& in, ::mmx::contract::Executable& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::Executable& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::Executable& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/MultiSig.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 MultiSig::VNX_TYPE_HASH(0x7d674c5f7297dedull); const vnx::Hash64 MultiSig::VNX_CODE_HASH(0x5ad3a573cd4bc2f4ull); vnx::Hash64 MultiSig::get_type_hash() const { return VNX_TYPE_HASH; } std::string MultiSig::get_type_name() const { return "mmx.contract.MultiSig"; } const vnx::TypeCode* MultiSig::get_type_code() const { return mmx::contract::vnx_native_type_code_MultiSig; } std::shared_ptr MultiSig::create() { return std::make_shared(); } std::shared_ptr MultiSig::clone() const { return std::make_shared(*this); } void MultiSig::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void MultiSig::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void MultiSig::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_MultiSig; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, num_required); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, owners); _visitor.type_end(*_type_code); } void MultiSig::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.MultiSig\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"num_required\": "; vnx::write(_out, num_required); _out << ", \"owners\": "; vnx::write(_out, owners); _out << "}"; } void MultiSig::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object MultiSig::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.MultiSig"; _object["version"] = version; _object["num_required"] = num_required; _object["owners"] = owners; return _object; } void MultiSig::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "num_required") { _entry.second.to(num_required); } else if(_entry.first == "owners") { _entry.second.to(owners); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant MultiSig::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "num_required") { return vnx::Variant(num_required); } if(_name == "owners") { return vnx::Variant(owners); } return vnx::Variant(); } void MultiSig::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "num_required") { _value.to(num_required); } else if(_name == "owners") { _value.to(owners); } } /// \private std::ostream& operator<<(std::ostream& _out, const MultiSig& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, MultiSig& _value) { _value.read(_in); return _in; } const vnx::TypeCode* MultiSig::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr MultiSig::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.MultiSig"; type_code->type_hash = vnx::Hash64(0x7d674c5f7297dedull); type_code->code_hash = vnx::Hash64(0x5ad3a573cd4bc2f4ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::MultiSig); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "num_required"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "owners"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr MultiSig::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.num_required, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.owners, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_MultiSig; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::MultiSig>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.num_required); vnx::write(out, value.owners, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::contract::MultiSig& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::MultiSig& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::MultiSig& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/PubKey.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 PubKey::VNX_TYPE_HASH(0x9b3cd508d7f41423ull); const vnx::Hash64 PubKey::VNX_CODE_HASH(0xd94be3121579efceull); vnx::Hash64 PubKey::get_type_hash() const { return VNX_TYPE_HASH; } std::string PubKey::get_type_name() const { return "mmx.contract.PubKey"; } const vnx::TypeCode* PubKey::get_type_code() const { return mmx::contract::vnx_native_type_code_PubKey; } std::shared_ptr PubKey::create() { return std::make_shared(); } std::shared_ptr PubKey::clone() const { return std::make_shared(*this); } void PubKey::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void PubKey::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void PubKey::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_PubKey; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void PubKey::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.PubKey\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void PubKey::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object PubKey::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.PubKey"; _object["version"] = version; _object["address"] = address; return _object; } void PubKey::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant PubKey::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void PubKey::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const PubKey& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, PubKey& _value) { _value.read(_in); return _in; } const vnx::TypeCode* PubKey::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr PubKey::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.PubKey"; type_code->type_hash = vnx::Hash64(0x9b3cd508d7f41423ull); type_code->code_hash = vnx::Hash64(0xd94be3121579efceull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::PubKey); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr PubKey::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::PubKey& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_PubKey; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::PubKey>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::contract::PubKey& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::PubKey& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::PubKey& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/TokenBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 TokenBase::VNX_TYPE_HASH(0x5aeed4c96d232b5eull); const vnx::Hash64 TokenBase::VNX_CODE_HASH(0x8d6ff46e314f1840ull); vnx::Hash64 TokenBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string TokenBase::get_type_name() const { return "mmx.contract.TokenBase"; } const vnx::TypeCode* TokenBase::get_type_code() const { return mmx::contract::vnx_native_type_code_TokenBase; } std::shared_ptr TokenBase::create() { return std::make_shared(); } std::shared_ptr TokenBase::clone() const { return std::make_shared(*this); } void TokenBase::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void TokenBase::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void TokenBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_TokenBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, symbol); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, decimals); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, meta_data); _visitor.type_end(*_type_code); } void TokenBase::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.TokenBase\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"symbol\": "; vnx::write(_out, symbol); _out << ", \"decimals\": "; vnx::write(_out, decimals); _out << ", \"meta_data\": "; vnx::write(_out, meta_data); _out << "}"; } void TokenBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object TokenBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.TokenBase"; _object["version"] = version; _object["name"] = name; _object["symbol"] = symbol; _object["decimals"] = decimals; _object["meta_data"] = meta_data; return _object; } void TokenBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "decimals") { _entry.second.to(decimals); } else if(_entry.first == "meta_data") { _entry.second.to(meta_data); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "symbol") { _entry.second.to(symbol); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant TokenBase::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "name") { return vnx::Variant(name); } if(_name == "symbol") { return vnx::Variant(symbol); } if(_name == "decimals") { return vnx::Variant(decimals); } if(_name == "meta_data") { return vnx::Variant(meta_data); } return vnx::Variant(); } void TokenBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "name") { _value.to(name); } else if(_name == "symbol") { _value.to(symbol); } else if(_name == "decimals") { _value.to(decimals); } else if(_name == "meta_data") { _value.to(meta_data); } } /// \private std::ostream& operator<<(std::ostream& _out, const TokenBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, TokenBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* TokenBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr TokenBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.TokenBase"; type_code->type_hash = vnx::Hash64(0x5aeed4c96d232b5eull); type_code->code_hash = vnx::Hash64(0x8d6ff46e314f1840ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::TokenBase); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "symbol"; field.code = {32}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "decimals"; field.value = vnx::to_string(0); field.code = {7}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "meta_data"; field.code = {17}; } type_code->build(); return type_code; } std::shared_ptr TokenBase::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.decimals, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.symbol, type_code, _field->code.data()); break; case 4: vnx::read(in, value.meta_data, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::TokenBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_TokenBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::TokenBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.decimals); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.symbol, type_code, type_code->fields[2].code.data()); vnx::write(out, value.meta_data, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::contract::TokenBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::TokenBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::TokenBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/WebData.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace contract { const vnx::Hash64 WebData::VNX_TYPE_HASH(0xf7c226b211c088c4ull); const vnx::Hash64 WebData::VNX_CODE_HASH(0x1f49299db4776797ull); vnx::Hash64 WebData::get_type_hash() const { return VNX_TYPE_HASH; } std::string WebData::get_type_name() const { return "mmx.contract.WebData"; } const vnx::TypeCode* WebData::get_type_code() const { return mmx::contract::vnx_native_type_code_WebData; } std::shared_ptr WebData::create() { return std::make_shared(); } std::shared_ptr WebData::clone() const { return std::make_shared(*this); } void WebData::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void WebData::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void WebData::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_WebData; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, mime_type); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, payload); _visitor.type_end(*_type_code); } void WebData::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.contract.WebData\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"mime_type\": "; vnx::write(_out, mime_type); _out << ", \"payload\": "; vnx::write(_out, payload); _out << "}"; } void WebData::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WebData::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.WebData"; _object["version"] = version; _object["mime_type"] = mime_type; _object["payload"] = payload; return _object; } void WebData::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "mime_type") { _entry.second.to(mime_type); } else if(_entry.first == "payload") { _entry.second.to(payload); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant WebData::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "mime_type") { return vnx::Variant(mime_type); } if(_name == "payload") { return vnx::Variant(payload); } return vnx::Variant(); } void WebData::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "mime_type") { _value.to(mime_type); } else if(_name == "payload") { _value.to(payload); } } /// \private std::ostream& operator<<(std::ostream& _out, const WebData& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WebData& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WebData::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WebData::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.WebData"; type_code->type_hash = vnx::Hash64(0xf7c226b211c088c4ull); type_code->code_hash = vnx::Hash64(0x1f49299db4776797ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::contract::WebData); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Contract::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "mime_type"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "payload"; field.code = {12, 1}; } type_code->build(); return type_code; } std::shared_ptr WebData::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.mime_type, type_code, _field->code.data()); break; case 2: vnx::read(in, value.payload, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::WebData& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_WebData; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::WebData>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.mime_type, type_code, type_code->fields[1].code.data()); vnx::write(out, value.payload, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::contract::WebData& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::WebData& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::WebData& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/contract/src/method_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { namespace contract { const vnx::Hash64 method_t::VNX_TYPE_HASH(0x1f62512698176a39ull); const vnx::Hash64 method_t::VNX_CODE_HASH(0xf70ca6386623ddb6ull); vnx::Hash64 method_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string method_t::get_type_name() const { return "mmx.contract.method_t"; } const vnx::TypeCode* method_t::get_type_code() const { return mmx::contract::vnx_native_type_code_method_t; } std::shared_ptr method_t::create() { return std::make_shared(); } std::shared_ptr method_t::clone() const { return std::make_shared(*this); } void method_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void method_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void method_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::contract::vnx_native_type_code_method_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, info); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, is_init); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, is_const); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, is_public); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, is_payable); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, entry_point); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, args); _visitor.type_end(*_type_code); } void method_t::write(std::ostream& _out) const { _out << "{"; _out << "\"name\": "; vnx::write(_out, name); _out << ", \"info\": "; vnx::write(_out, info); _out << ", \"is_init\": "; vnx::write(_out, is_init); _out << ", \"is_const\": "; vnx::write(_out, is_const); _out << ", \"is_public\": "; vnx::write(_out, is_public); _out << ", \"is_payable\": "; vnx::write(_out, is_payable); _out << ", \"entry_point\": "; vnx::write(_out, entry_point); _out << ", \"args\": "; vnx::write(_out, args); _out << "}"; } void method_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object method_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.contract.method_t"; _object["name"] = name; _object["info"] = info; _object["is_init"] = is_init; _object["is_const"] = is_const; _object["is_public"] = is_public; _object["is_payable"] = is_payable; _object["entry_point"] = entry_point; _object["args"] = args; return _object; } void method_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "entry_point") { _entry.second.to(entry_point); } else if(_entry.first == "info") { _entry.second.to(info); } else if(_entry.first == "is_const") { _entry.second.to(is_const); } else if(_entry.first == "is_init") { _entry.second.to(is_init); } else if(_entry.first == "is_payable") { _entry.second.to(is_payable); } else if(_entry.first == "is_public") { _entry.second.to(is_public); } else if(_entry.first == "name") { _entry.second.to(name); } } } vnx::Variant method_t::get_field(const std::string& _name) const { if(_name == "name") { return vnx::Variant(name); } if(_name == "info") { return vnx::Variant(info); } if(_name == "is_init") { return vnx::Variant(is_init); } if(_name == "is_const") { return vnx::Variant(is_const); } if(_name == "is_public") { return vnx::Variant(is_public); } if(_name == "is_payable") { return vnx::Variant(is_payable); } if(_name == "entry_point") { return vnx::Variant(entry_point); } if(_name == "args") { return vnx::Variant(args); } return vnx::Variant(); } void method_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "name") { _value.to(name); } else if(_name == "info") { _value.to(info); } else if(_name == "is_init") { _value.to(is_init); } else if(_name == "is_const") { _value.to(is_const); } else if(_name == "is_public") { _value.to(is_public); } else if(_name == "is_payable") { _value.to(is_payable); } else if(_name == "entry_point") { _value.to(entry_point); } else if(_name == "args") { _value.to(args); } } /// \private std::ostream& operator<<(std::ostream& _out, const method_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, method_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* method_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr method_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.contract.method_t"; type_code->type_hash = vnx::Hash64(0x1f62512698176a39ull); type_code->code_hash = vnx::Hash64(0xf70ca6386623ddb6ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::contract::method_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "info"; field.code = {32}; } { auto& field = type_code->fields[2]; field.data_size = 1; field.name = "is_init"; field.code = {31}; } { auto& field = type_code->fields[3]; field.data_size = 1; field.name = "is_const"; field.code = {31}; } { auto& field = type_code->fields[4]; field.data_size = 1; field.name = "is_public"; field.code = {31}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "is_payable"; field.code = {31}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "entry_point"; field.code = {3}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "args"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx } // namespace contract namespace vnx { void read(TypeInput& in, ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.is_init, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.is_const, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.is_public, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.is_payable, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.entry_point, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.name, type_code, _field->code.data()); break; case 1: vnx::read(in, value.info, type_code, _field->code.data()); break; case 7: vnx::read(in, value.args, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::contract::method_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::contract::vnx_native_type_code_method_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::contract::method_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.is_init); vnx::write_value(_buf + 1, value.is_const); vnx::write_value(_buf + 2, value.is_public); vnx::write_value(_buf + 3, value.is_payable); vnx::write_value(_buf + 4, value.entry_point); vnx::write(out, value.name, type_code, type_code->fields[0].code.data()); vnx::write(out, value.info, type_code, type_code->fields[1].code.data()); vnx::write(out, value.args, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::contract::method_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::contract::method_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::contract::method_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::contract::method_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::contract::method_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/contract/src/package.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include namespace vnx { const TypeCode* type<::mmx::contract::Binary>::get_type_code() { return mmx::contract::vnx_native_type_code_Binary; } void type<::mmx::contract::Binary>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::Binary()); } void type<::mmx::contract::Binary>::create_dynamic_code(std::vector& code, const ::mmx::contract::Binary& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::Data>::get_type_code() { return mmx::contract::vnx_native_type_code_Data; } void type<::mmx::contract::Data>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::Data()); } void type<::mmx::contract::Data>::create_dynamic_code(std::vector& code, const ::mmx::contract::Data& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::Executable>::get_type_code() { return mmx::contract::vnx_native_type_code_Executable; } void type<::mmx::contract::Executable>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::Executable()); } void type<::mmx::contract::Executable>::create_dynamic_code(std::vector& code, const ::mmx::contract::Executable& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::MultiSig>::get_type_code() { return mmx::contract::vnx_native_type_code_MultiSig; } void type<::mmx::contract::MultiSig>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::MultiSig()); } void type<::mmx::contract::MultiSig>::create_dynamic_code(std::vector& code, const ::mmx::contract::MultiSig& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::PubKey>::get_type_code() { return mmx::contract::vnx_native_type_code_PubKey; } void type<::mmx::contract::PubKey>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::PubKey()); } void type<::mmx::contract::PubKey>::create_dynamic_code(std::vector& code, const ::mmx::contract::PubKey& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::TokenBase>::get_type_code() { return mmx::contract::vnx_native_type_code_TokenBase; } void type<::mmx::contract::TokenBase>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::TokenBase()); } void type<::mmx::contract::TokenBase>::create_dynamic_code(std::vector& code, const ::mmx::contract::TokenBase& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::WebData>::get_type_code() { return mmx::contract::vnx_native_type_code_WebData; } void type<::mmx::contract::WebData>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::WebData()); } void type<::mmx::contract::WebData>::create_dynamic_code(std::vector& code, const ::mmx::contract::WebData& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::contract::method_t>::get_type_code() { return mmx::contract::vnx_native_type_code_method_t; } void type<::mmx::contract::method_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::contract::method_t()); } void type<::mmx::contract::method_t>::create_dynamic_code(std::vector& code, const ::mmx::contract::method_t& value, bool special) { code.push_back(CODE_OBJECT); } } // namespace vnx namespace mmx { namespace contract { void register_all_types() { vnx::register_type_code(::mmx::contract::Binary::static_create_type_code()); vnx::register_type_code(::mmx::contract::Data::static_create_type_code()); vnx::register_type_code(::mmx::contract::Executable::static_create_type_code()); vnx::register_type_code(::mmx::contract::MultiSig::static_create_type_code()); vnx::register_type_code(::mmx::contract::PubKey::static_create_type_code()); vnx::register_type_code(::mmx::contract::TokenBase::static_create_type_code()); vnx::register_type_code(::mmx::contract::WebData::static_create_type_code()); vnx::register_type_code(::mmx::contract::method_t::static_create_type_code()); } static struct vnx_static_init { vnx_static_init() { register_all_types(); } } vnx_static_init_; const vnx::TypeCode* const vnx_native_type_code_Binary = vnx::get_type_code(vnx::Hash64(0xbbeba47fc8b740e5ull)); const vnx::TypeCode* const vnx_native_type_code_Data = vnx::get_type_code(vnx::Hash64(0xadfeee3822244f50ull)); const vnx::TypeCode* const vnx_native_type_code_Executable = vnx::get_type_code(vnx::Hash64(0xfa6a3ac9103ebb12ull)); const vnx::TypeCode* const vnx_native_type_code_MultiSig = vnx::get_type_code(vnx::Hash64(0x7d674c5f7297dedull)); const vnx::TypeCode* const vnx_native_type_code_PubKey = vnx::get_type_code(vnx::Hash64(0x9b3cd508d7f41423ull)); const vnx::TypeCode* const vnx_native_type_code_TokenBase = vnx::get_type_code(vnx::Hash64(0x5aeed4c96d232b5eull)); const vnx::TypeCode* const vnx_native_type_code_WebData = vnx::get_type_code(vnx::Hash64(0xf7c226b211c088c4ull)); const vnx::TypeCode* const vnx_native_type_code_method_t = vnx::get_type_code(vnx::Hash64(0x1f62512698176a39ull)); } // namespace mmx } // namespace contract ================================================ FILE: generated/include/mmx/Block.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Block_HXX_ #define INCLUDE_mmx_Block_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT Block : public ::mmx::BlockHeader { public: std::vector> tx_list; typedef ::mmx::BlockHeader Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x94965d816d328467ull; Block() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual void finalize(); virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_tx_hash() const; virtual std::shared_ptr get_header() const override; virtual std::vector> get_transactions() const; virtual std::vector<::mmx::txio_entry_t> get_inputs(std::shared_ptr params = nullptr) const; virtual std::vector<::mmx::txio_entry_t> get_outputs(std::shared_ptr params = nullptr) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Block& _value); friend std::istream& operator>>(std::istream& _in, Block& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Block::accept_generic(T& _visitor) const { _visitor.template type_begin(41); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("support_flags", 1); _visitor.accept(support_flags); _visitor.type_field("hash", 2); _visitor.accept(hash); _visitor.type_field("prev", 3); _visitor.accept(prev); _visitor.type_field("height", 4); _visitor.accept(height); _visitor.type_field("vdf_height", 5); _visitor.accept(vdf_height); _visitor.type_field("nonce", 6); _visitor.accept(nonce); _visitor.type_field("time_stamp", 7); _visitor.accept(time_stamp); _visitor.type_field("time_diff", 8); _visitor.accept(time_diff); _visitor.type_field("space_diff", 9); _visitor.accept(space_diff); _visitor.type_field("weight", 10); _visitor.accept(weight); _visitor.type_field("total_weight", 11); _visitor.accept(total_weight); _visitor.type_field("vdf_count", 12); _visitor.accept(vdf_count); _visitor.type_field("vdf_iters", 13); _visitor.accept(vdf_iters); _visitor.type_field("vdf_output", 14); _visitor.accept(vdf_output); _visitor.type_field("vdf_reward_addr", 15); _visitor.accept(vdf_reward_addr); _visitor.type_field("vdf_reward_payout", 16); _visitor.accept(vdf_reward_payout); _visitor.type_field("proof", 17); _visitor.accept(proof); _visitor.type_field("proof_hash", 18); _visitor.accept(proof_hash); _visitor.type_field("challenge", 19); _visitor.accept(challenge); _visitor.type_field("is_space_fork", 20); _visitor.accept(is_space_fork); _visitor.type_field("space_fork_len", 21); _visitor.accept(space_fork_len); _visitor.type_field("space_fork_proofs", 22); _visitor.accept(space_fork_proofs); _visitor.type_field("reward_amount", 23); _visitor.accept(reward_amount); _visitor.type_field("reward_addr", 24); _visitor.accept(reward_addr); _visitor.type_field("reward_contract", 25); _visitor.accept(reward_contract); _visitor.type_field("reward_account", 26); _visitor.accept(reward_account); _visitor.type_field("reward_vote", 27); _visitor.accept(reward_vote); _visitor.type_field("reward_vote_sum", 28); _visitor.accept(reward_vote_sum); _visitor.type_field("reward_vote_count", 29); _visitor.accept(reward_vote_count); _visitor.type_field("base_reward", 30); _visitor.accept(base_reward); _visitor.type_field("project_addr", 31); _visitor.accept(project_addr); _visitor.type_field("static_cost", 32); _visitor.accept(static_cost); _visitor.type_field("total_cost", 33); _visitor.accept(total_cost); _visitor.type_field("tx_count", 34); _visitor.accept(tx_count); _visitor.type_field("tx_fees", 35); _visitor.accept(tx_fees); _visitor.type_field("txfee_buffer", 36); _visitor.accept(txfee_buffer); _visitor.type_field("tx_hash", 37); _visitor.accept(tx_hash); _visitor.type_field("farmer_sig", 38); _visitor.accept(farmer_sig); _visitor.type_field("content_hash", 39); _visitor.accept(content_hash); _visitor.type_field("tx_list", 40); _visitor.accept(tx_list); _visitor.template type_end(41); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Block_HXX_ ================================================ FILE: generated/include/mmx/BlockHeader.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_BlockHeader_HXX_ #define INCLUDE_mmx_BlockHeader_HXX_ #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT BlockHeader : public ::vnx::Value { public: static const uint32_t SUPPORT_HARDFORK1 = 0x1; uint32_t version = 0; uint32_t support_flags = 0; ::mmx::hash_t hash; ::mmx::hash_t prev; uint32_t height = 0; uint32_t vdf_height = 0; uint64_t nonce = 0; int64_t time_stamp = 0; uint64_t time_diff = 0; uint64_t space_diff = 0; ::mmx::uint128 weight; ::mmx::uint128 total_weight; uint32_t vdf_count = 0; uint64_t vdf_iters = 0; ::mmx::hash_t vdf_output; std::vector<::mmx::addr_t> vdf_reward_addr; vnx::optional<::mmx::addr_t> vdf_reward_payout; std::vector> proof; ::mmx::hash_t proof_hash; ::mmx::hash_t challenge; vnx::bool_t is_space_fork = 0; uint32_t space_fork_len = 0; uint32_t space_fork_proofs = 0; uint64_t reward_amount = 0; vnx::optional<::mmx::addr_t> reward_addr; vnx::optional<::mmx::addr_t> reward_contract; vnx::optional<::mmx::addr_t> reward_account; int8_t reward_vote = 0; int32_t reward_vote_sum = 0; uint32_t reward_vote_count = 0; uint64_t base_reward = 0; ::mmx::addr_t project_addr; uint64_t static_cost = 0; uint64_t total_cost = 0; uint32_t tx_count = 0; uint64_t tx_fees = 0; uint64_t txfee_buffer = 0; ::mmx::hash_t tx_hash; vnx::optional<::mmx::signature_t> farmer_sig; ::mmx::hash_t content_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xcaae941a2fc712a6ull; BlockHeader() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; virtual ::mmx::hash_t calc_content_hash() const; virtual void validate() const; virtual std::shared_ptr get_header() const; virtual ::mmx::pubkey_t get_farmer_key() const; virtual ::mmx::block_index_t get_block_index(const int64_t& file_offset = 0) const; virtual void set_space_diff(std::shared_ptr params = nullptr, std::shared_ptr prev = nullptr); virtual void set_base_reward(std::shared_ptr params = nullptr, std::shared_ptr prev = nullptr); static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const BlockHeader& _value); friend std::istream& operator>>(std::istream& _in, BlockHeader& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void BlockHeader::accept_generic(T& _visitor) const { _visitor.template type_begin(40); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("support_flags", 1); _visitor.accept(support_flags); _visitor.type_field("hash", 2); _visitor.accept(hash); _visitor.type_field("prev", 3); _visitor.accept(prev); _visitor.type_field("height", 4); _visitor.accept(height); _visitor.type_field("vdf_height", 5); _visitor.accept(vdf_height); _visitor.type_field("nonce", 6); _visitor.accept(nonce); _visitor.type_field("time_stamp", 7); _visitor.accept(time_stamp); _visitor.type_field("time_diff", 8); _visitor.accept(time_diff); _visitor.type_field("space_diff", 9); _visitor.accept(space_diff); _visitor.type_field("weight", 10); _visitor.accept(weight); _visitor.type_field("total_weight", 11); _visitor.accept(total_weight); _visitor.type_field("vdf_count", 12); _visitor.accept(vdf_count); _visitor.type_field("vdf_iters", 13); _visitor.accept(vdf_iters); _visitor.type_field("vdf_output", 14); _visitor.accept(vdf_output); _visitor.type_field("vdf_reward_addr", 15); _visitor.accept(vdf_reward_addr); _visitor.type_field("vdf_reward_payout", 16); _visitor.accept(vdf_reward_payout); _visitor.type_field("proof", 17); _visitor.accept(proof); _visitor.type_field("proof_hash", 18); _visitor.accept(proof_hash); _visitor.type_field("challenge", 19); _visitor.accept(challenge); _visitor.type_field("is_space_fork", 20); _visitor.accept(is_space_fork); _visitor.type_field("space_fork_len", 21); _visitor.accept(space_fork_len); _visitor.type_field("space_fork_proofs", 22); _visitor.accept(space_fork_proofs); _visitor.type_field("reward_amount", 23); _visitor.accept(reward_amount); _visitor.type_field("reward_addr", 24); _visitor.accept(reward_addr); _visitor.type_field("reward_contract", 25); _visitor.accept(reward_contract); _visitor.type_field("reward_account", 26); _visitor.accept(reward_account); _visitor.type_field("reward_vote", 27); _visitor.accept(reward_vote); _visitor.type_field("reward_vote_sum", 28); _visitor.accept(reward_vote_sum); _visitor.type_field("reward_vote_count", 29); _visitor.accept(reward_vote_count); _visitor.type_field("base_reward", 30); _visitor.accept(base_reward); _visitor.type_field("project_addr", 31); _visitor.accept(project_addr); _visitor.type_field("static_cost", 32); _visitor.accept(static_cost); _visitor.type_field("total_cost", 33); _visitor.accept(total_cost); _visitor.type_field("tx_count", 34); _visitor.accept(tx_count); _visitor.type_field("tx_fees", 35); _visitor.accept(tx_fees); _visitor.type_field("txfee_buffer", 36); _visitor.accept(txfee_buffer); _visitor.type_field("tx_hash", 37); _visitor.accept(tx_hash); _visitor.type_field("farmer_sig", 38); _visitor.accept(farmer_sig); _visitor.type_field("content_hash", 39); _visitor.accept(content_hash); _visitor.template type_end(40); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_BlockHeader_HXX_ ================================================ FILE: generated/include/mmx/ChainParams.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ChainParams_HXX_ #define INCLUDE_mmx_ChainParams_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT ChainParams : public ::vnx::Value { public: uint32_t port = 0; int32_t decimals = 6; uint32_t min_ksize = 29; uint32_t max_ksize = 32; uint32_t plot_filter = 4; uint32_t post_filter = 10; uint32_t commit_delay = 18; uint32_t infuse_delay = 6; uint32_t challenge_delay = 9; uint32_t challenge_interval = 48; uint32_t max_diff_adjust = 10; uint32_t max_vdf_count = 100; uint32_t avg_proof_count = 3; uint32_t max_proof_count = 50; uint32_t max_validators = 11; uint64_t min_reward = 200000; uint64_t vdf_reward = 500000; uint32_t vdf_reward_interval = 50; uint32_t vdf_segment_size = 50000; uint32_t reward_adjust_div = 100; uint32_t reward_adjust_tick = 10000; uint32_t reward_adjust_interval = 8640; uint32_t target_mmx_gold_price = 2000; uint64_t time_diff_divider = 1000; uint64_t time_diff_constant = 1000000; uint64_t space_diff_constant = 100000000; uint64_t initial_time_diff = 50; uint64_t initial_space_diff = 10; uint64_t initial_time_stamp = 0; uint64_t min_txfee = 100; uint64_t min_txfee_io = 100; uint64_t min_txfee_sign = 1000; uint64_t min_txfee_memo = 50; uint64_t min_txfee_exec = 10000; uint64_t min_txfee_deploy = 100000; uint64_t min_txfee_depend = 50000; uint64_t min_txfee_byte = 10; uint64_t min_txfee_read = 1000; uint64_t min_txfee_read_kbyte = 1000; uint64_t max_block_size = 10000000; uint64_t max_block_cost = 100000000; uint64_t max_tx_cost = 1000000; uint32_t max_rcall_depth = 3; uint32_t max_rcall_width = 10; std::vector min_fee_ratio; int64_t block_interval_ms = 10000; std::string network; ::mmx::addr_t nft_binary; ::mmx::addr_t swap_binary; ::mmx::addr_t offer_binary; ::mmx::addr_t token_binary; ::mmx::addr_t plot_nft_binary; ::mmx::addr_t escrow_binary; ::mmx::addr_t time_lock_binary; ::mmx::addr_t relay_binary; uint64_t fixed_project_reward = 50000; ::mmx::uint_fraction_t project_ratio; uint32_t reward_activation = 50000; uint32_t transaction_activation = 100000; uint32_t hardfork1_height = 1000000; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x51bba8d28881e8e7ull; ChainParams() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::float64_t get_block_time() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ChainParams& _value); friend std::istream& operator>>(std::istream& _in, ChainParams& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ChainParams::accept_generic(T& _visitor) const { _visitor.template type_begin(60); _visitor.type_field("port", 0); _visitor.accept(port); _visitor.type_field("decimals", 1); _visitor.accept(decimals); _visitor.type_field("min_ksize", 2); _visitor.accept(min_ksize); _visitor.type_field("max_ksize", 3); _visitor.accept(max_ksize); _visitor.type_field("plot_filter", 4); _visitor.accept(plot_filter); _visitor.type_field("post_filter", 5); _visitor.accept(post_filter); _visitor.type_field("commit_delay", 6); _visitor.accept(commit_delay); _visitor.type_field("infuse_delay", 7); _visitor.accept(infuse_delay); _visitor.type_field("challenge_delay", 8); _visitor.accept(challenge_delay); _visitor.type_field("challenge_interval", 9); _visitor.accept(challenge_interval); _visitor.type_field("max_diff_adjust", 10); _visitor.accept(max_diff_adjust); _visitor.type_field("max_vdf_count", 11); _visitor.accept(max_vdf_count); _visitor.type_field("avg_proof_count", 12); _visitor.accept(avg_proof_count); _visitor.type_field("max_proof_count", 13); _visitor.accept(max_proof_count); _visitor.type_field("max_validators", 14); _visitor.accept(max_validators); _visitor.type_field("min_reward", 15); _visitor.accept(min_reward); _visitor.type_field("vdf_reward", 16); _visitor.accept(vdf_reward); _visitor.type_field("vdf_reward_interval", 17); _visitor.accept(vdf_reward_interval); _visitor.type_field("vdf_segment_size", 18); _visitor.accept(vdf_segment_size); _visitor.type_field("reward_adjust_div", 19); _visitor.accept(reward_adjust_div); _visitor.type_field("reward_adjust_tick", 20); _visitor.accept(reward_adjust_tick); _visitor.type_field("reward_adjust_interval", 21); _visitor.accept(reward_adjust_interval); _visitor.type_field("target_mmx_gold_price", 22); _visitor.accept(target_mmx_gold_price); _visitor.type_field("time_diff_divider", 23); _visitor.accept(time_diff_divider); _visitor.type_field("time_diff_constant", 24); _visitor.accept(time_diff_constant); _visitor.type_field("space_diff_constant", 25); _visitor.accept(space_diff_constant); _visitor.type_field("initial_time_diff", 26); _visitor.accept(initial_time_diff); _visitor.type_field("initial_space_diff", 27); _visitor.accept(initial_space_diff); _visitor.type_field("initial_time_stamp", 28); _visitor.accept(initial_time_stamp); _visitor.type_field("min_txfee", 29); _visitor.accept(min_txfee); _visitor.type_field("min_txfee_io", 30); _visitor.accept(min_txfee_io); _visitor.type_field("min_txfee_sign", 31); _visitor.accept(min_txfee_sign); _visitor.type_field("min_txfee_memo", 32); _visitor.accept(min_txfee_memo); _visitor.type_field("min_txfee_exec", 33); _visitor.accept(min_txfee_exec); _visitor.type_field("min_txfee_deploy", 34); _visitor.accept(min_txfee_deploy); _visitor.type_field("min_txfee_depend", 35); _visitor.accept(min_txfee_depend); _visitor.type_field("min_txfee_byte", 36); _visitor.accept(min_txfee_byte); _visitor.type_field("min_txfee_read", 37); _visitor.accept(min_txfee_read); _visitor.type_field("min_txfee_read_kbyte", 38); _visitor.accept(min_txfee_read_kbyte); _visitor.type_field("max_block_size", 39); _visitor.accept(max_block_size); _visitor.type_field("max_block_cost", 40); _visitor.accept(max_block_cost); _visitor.type_field("max_tx_cost", 41); _visitor.accept(max_tx_cost); _visitor.type_field("max_rcall_depth", 42); _visitor.accept(max_rcall_depth); _visitor.type_field("max_rcall_width", 43); _visitor.accept(max_rcall_width); _visitor.type_field("min_fee_ratio", 44); _visitor.accept(min_fee_ratio); _visitor.type_field("block_interval_ms", 45); _visitor.accept(block_interval_ms); _visitor.type_field("network", 46); _visitor.accept(network); _visitor.type_field("nft_binary", 47); _visitor.accept(nft_binary); _visitor.type_field("swap_binary", 48); _visitor.accept(swap_binary); _visitor.type_field("offer_binary", 49); _visitor.accept(offer_binary); _visitor.type_field("token_binary", 50); _visitor.accept(token_binary); _visitor.type_field("plot_nft_binary", 51); _visitor.accept(plot_nft_binary); _visitor.type_field("escrow_binary", 52); _visitor.accept(escrow_binary); _visitor.type_field("time_lock_binary", 53); _visitor.accept(time_lock_binary); _visitor.type_field("relay_binary", 54); _visitor.accept(relay_binary); _visitor.type_field("fixed_project_reward", 55); _visitor.accept(fixed_project_reward); _visitor.type_field("project_ratio", 56); _visitor.accept(project_ratio); _visitor.type_field("reward_activation", 57); _visitor.accept(reward_activation); _visitor.type_field("transaction_activation", 58); _visitor.accept(transaction_activation); _visitor.type_field("hardfork1_height", 59); _visitor.accept(hardfork1_height); _visitor.template type_end(60); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ChainParams_HXX_ ================================================ FILE: generated/include/mmx/Challenge.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Challenge_HXX_ #define INCLUDE_mmx_Challenge_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Challenge : public ::vnx::Value { public: uint32_t vdf_height = 0; ::mmx::hash_t challenge; uint64_t difficulty = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4bf49f8022405249ull; Challenge() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Challenge& _value); friend std::istream& operator>>(std::istream& _in, Challenge& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Challenge::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("vdf_height", 0); _visitor.accept(vdf_height); _visitor.type_field("challenge", 1); _visitor.accept(challenge); _visitor.type_field("difficulty", 2); _visitor.accept(difficulty); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Challenge_HXX_ ================================================ FILE: generated/include/mmx/Contract.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Contract_HXX_ #define INCLUDE_mmx_Contract_HXX_ #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT Contract : public ::vnx::Value { public: uint32_t version = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x26b896ae8c415285ull; Contract() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const; virtual uint64_t num_bytes() const; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const; virtual vnx::optional<::mmx::addr_t> get_owner() const; virtual void validate(std::shared_ptr solution = nullptr, const ::mmx::hash_t& txid = ::mmx::hash_t()) const; virtual ::vnx::Variant read_field(const std::string& name = "") const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Contract& _value); friend std::istream& operator>>(std::istream& _in, Contract& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Contract::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Contract_HXX_ ================================================ FILE: generated/include/mmx/FarmInfo.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_FarmInfo_HXX_ #define INCLUDE_mmx_FarmInfo_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT FarmInfo : public ::vnx::Value { public: std::vector plot_dirs; std::map plot_count; std::map> harvester_bytes; std::map<::mmx::addr_t, ::mmx::pooling_info_t> pool_info; std::map<::mmx::addr_t, ::mmx::pooling_stats_t> pool_stats; uint64_t total_bytes = 0; uint64_t total_bytes_effective = 0; uint64_t total_balance = 0; vnx::optional harvester; vnx::optional<::mmx::hash_t> harvester_id; vnx::optional<::mmx::addr_t> reward_addr; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa2701372b9137f0eull; FarmInfo() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const FarmInfo& _value); friend std::istream& operator>>(std::istream& _in, FarmInfo& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void FarmInfo::accept_generic(T& _visitor) const { _visitor.template type_begin(11); _visitor.type_field("plot_dirs", 0); _visitor.accept(plot_dirs); _visitor.type_field("plot_count", 1); _visitor.accept(plot_count); _visitor.type_field("harvester_bytes", 2); _visitor.accept(harvester_bytes); _visitor.type_field("pool_info", 3); _visitor.accept(pool_info); _visitor.type_field("pool_stats", 4); _visitor.accept(pool_stats); _visitor.type_field("total_bytes", 5); _visitor.accept(total_bytes); _visitor.type_field("total_bytes_effective", 6); _visitor.accept(total_bytes_effective); _visitor.type_field("total_balance", 7); _visitor.accept(total_balance); _visitor.type_field("harvester", 8); _visitor.accept(harvester); _visitor.type_field("harvester_id", 9); _visitor.accept(harvester_id); _visitor.type_field("reward_addr", 10); _visitor.accept(reward_addr); _visitor.template type_end(11); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_FarmInfo_HXX_ ================================================ FILE: generated/include/mmx/FarmerAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_Farmer_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class FarmerAsyncClient : public vnx::AsyncClient { public: FarmerAsyncClient(const std::string& service_name); FarmerAsyncClient(vnx::Hash64 service_addr); uint64_t get_mac_addr( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_partial_diff(const ::mmx::addr_t& plot_nft = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_partial_diffs(const std::vector<::mmx::addr_t>& plot_nfts = {}, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_farmer_keys( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_farm_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t sign_block(std::shared_ptr block = nullptr, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t sign_vote(std::shared_ptr vote = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map, std::function>> vnx_queue_get_mac_addr; std::unordered_map, std::function>> vnx_queue_get_partial_diff; std::unordered_map&)>, std::function>> vnx_queue_get_partial_diffs; std::unordered_map&)>, std::function>> vnx_queue_get_farmer_keys; std::unordered_map)>, std::function>> vnx_queue_get_farm_info; std::unordered_map)>, std::function>> vnx_queue_sign_block; std::unordered_map, std::function>> vnx_queue_sign_vote; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_Farmer_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/FarmerBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_FarmerBase_HXX_ #define INCLUDE_mmx_FarmerBase_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT FarmerBase : public ::vnx::Module { public: ::vnx::TopicPtr input_info = "harvester.info"; ::vnx::TopicPtr input_proofs = "harvester.proof"; ::vnx::TopicPtr input_partials = "harvester.partials"; ::vnx::TopicPtr output_proofs = "farmer.proof"; ::vnx::TopicPtr output_partials = "farmer.partials"; uint32_t harvester_timeout = 60; uint32_t difficulty_interval = 300; std::string node_server = "Node"; std::string wallet_server = "Wallet"; vnx::optional<::mmx::addr_t> reward_addr; vnx::optional partial_diff; vnx::optional payout_threshold; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xff732ba14d9d1abull; FarmerBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const FarmerBase& _value); friend std::istream& operator>>(std::istream& _in, FarmerBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual ::vnx::Hash64 get_mac_addr() const = 0; virtual uint64_t get_partial_diff(const ::mmx::addr_t& plot_nft) const = 0; virtual std::map<::mmx::addr_t, uint64_t> get_partial_diffs(const std::vector<::mmx::addr_t>& plot_nfts) const = 0; virtual std::vector<::mmx::pubkey_t> get_farmer_keys() const = 0; virtual std::shared_ptr get_farm_info() const = 0; virtual std::shared_ptr sign_block(std::shared_ptr block) const = 0; virtual ::mmx::signature_t sign_vote(std::shared_ptr vote) const = 0; virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void FarmerBase::accept_generic(T& _visitor) const { _visitor.template type_begin(12); _visitor.type_field("input_info", 0); _visitor.accept(input_info); _visitor.type_field("input_proofs", 1); _visitor.accept(input_proofs); _visitor.type_field("input_partials", 2); _visitor.accept(input_partials); _visitor.type_field("output_proofs", 3); _visitor.accept(output_proofs); _visitor.type_field("output_partials", 4); _visitor.accept(output_partials); _visitor.type_field("harvester_timeout", 5); _visitor.accept(harvester_timeout); _visitor.type_field("difficulty_interval", 6); _visitor.accept(difficulty_interval); _visitor.type_field("node_server", 7); _visitor.accept(node_server); _visitor.type_field("wallet_server", 8); _visitor.accept(wallet_server); _visitor.type_field("reward_addr", 9); _visitor.accept(reward_addr); _visitor.type_field("partial_diff", 10); _visitor.accept(partial_diff); _visitor.type_field("payout_threshold", 11); _visitor.accept(payout_threshold); _visitor.template type_end(12); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_FarmerBase_HXX_ ================================================ FILE: generated/include/mmx/FarmerClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_CLIENT_HXX_ #define INCLUDE_mmx_Farmer_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class FarmerClient : public vnx::Client { public: FarmerClient(const std::string& service_name); FarmerClient(vnx::Hash64 service_addr); ::vnx::Hash64 get_mac_addr(); uint64_t get_partial_diff(const ::mmx::addr_t& plot_nft = ::mmx::addr_t()); std::map<::mmx::addr_t, uint64_t> get_partial_diffs(const std::vector<::mmx::addr_t>& plot_nfts = {}); std::vector<::mmx::pubkey_t> get_farmer_keys(); std::shared_ptr get_farm_info(); std::shared_ptr sign_block(std::shared_ptr block = nullptr); ::mmx::signature_t sign_vote(std::shared_ptr vote = nullptr); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_Farmer_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_farm_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_farm_info_HXX_ #define INCLUDE_mmx_Farmer_get_farm_info_HXX_ #include #include namespace mmx { class MMX_EXPORT Farmer_get_farm_info : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7e72655f6f215b5aull; Farmer_get_farm_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_farm_info& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_farm_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_farm_info::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_farm_info_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_farm_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_farm_info_return_HXX_ #define INCLUDE_mmx_Farmer_get_farm_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_farm_info_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xccf47453b394d3e3ull; Farmer_get_farm_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_farm_info_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_farm_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_farm_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_farm_info_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_farmer_keys.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_farmer_keys_HXX_ #define INCLUDE_mmx_Farmer_get_farmer_keys_HXX_ #include #include namespace mmx { class MMX_EXPORT Farmer_get_farmer_keys : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x784507b4594a776aull; Farmer_get_farmer_keys() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_farmer_keys& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_farmer_keys& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_farmer_keys::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_farmer_keys_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_farmer_keys_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_farmer_keys_return_HXX_ #define INCLUDE_mmx_Farmer_get_farmer_keys_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_farmer_keys_return : public ::vnx::Value { public: std::vector<::mmx::pubkey_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdb382c476694095full; Farmer_get_farmer_keys_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_farmer_keys_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_farmer_keys_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_farmer_keys_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_farmer_keys_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_mac_addr.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_mac_addr_HXX_ #define INCLUDE_mmx_Farmer_get_mac_addr_HXX_ #include #include namespace mmx { class MMX_EXPORT Farmer_get_mac_addr : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe9ced9f6feb676b3ull; Farmer_get_mac_addr() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_mac_addr& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_mac_addr& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_mac_addr::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_mac_addr_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_mac_addr_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_mac_addr_return_HXX_ #define INCLUDE_mmx_Farmer_get_mac_addr_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_mac_addr_return : public ::vnx::Value { public: ::vnx::Hash64 _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9e4caad2ffaba990ull; Farmer_get_mac_addr_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_mac_addr_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_mac_addr_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_mac_addr_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_mac_addr_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_partial_diff.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_partial_diff_HXX_ #define INCLUDE_mmx_Farmer_get_partial_diff_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_partial_diff : public ::vnx::Value { public: ::mmx::addr_t plot_nft; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x40f08b90e2eb4ca0ull; Farmer_get_partial_diff() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diff& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_partial_diff& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_partial_diff::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("plot_nft", 0); _visitor.accept(plot_nft); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_partial_diff_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_partial_diff_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_partial_diff_return_HXX_ #define INCLUDE_mmx_Farmer_get_partial_diff_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Farmer_get_partial_diff_return : public ::vnx::Value { public: uint64_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd5650a69bbe8d978ull; Farmer_get_partial_diff_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diff_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_partial_diff_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_partial_diff_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_partial_diff_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_partial_diffs.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_partial_diffs_HXX_ #define INCLUDE_mmx_Farmer_get_partial_diffs_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_partial_diffs : public ::vnx::Value { public: std::vector<::mmx::addr_t> plot_nfts; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8806f6763215c58bull; Farmer_get_partial_diffs() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diffs& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_partial_diffs& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_partial_diffs::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("plot_nfts", 0); _visitor.accept(plot_nfts); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_partial_diffs_HXX_ ================================================ FILE: generated/include/mmx/Farmer_get_partial_diffs_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_get_partial_diffs_return_HXX_ #define INCLUDE_mmx_Farmer_get_partial_diffs_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_get_partial_diffs_return : public ::vnx::Value { public: std::map<::mmx::addr_t, uint64_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x439549fd31330df6ull; Farmer_get_partial_diffs_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diffs_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_get_partial_diffs_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_get_partial_diffs_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_get_partial_diffs_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_sign_block.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_sign_block_HXX_ #define INCLUDE_mmx_Farmer_sign_block_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_sign_block : public ::vnx::Value { public: std::shared_ptr block; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6924b10f345eb316ull; Farmer_sign_block() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_sign_block& _value); friend std::istream& operator>>(std::istream& _in, Farmer_sign_block& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_sign_block::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("block", 0); _visitor.accept(block); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_sign_block_HXX_ ================================================ FILE: generated/include/mmx/Farmer_sign_block_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_sign_block_return_HXX_ #define INCLUDE_mmx_Farmer_sign_block_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_sign_block_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb8acce9269f91310ull; Farmer_sign_block_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_sign_block_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_sign_block_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_sign_block_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_sign_block_return_HXX_ ================================================ FILE: generated/include/mmx/Farmer_sign_vote.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_sign_vote_HXX_ #define INCLUDE_mmx_Farmer_sign_vote_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_sign_vote : public ::vnx::Value { public: std::shared_ptr vote; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x655117e05d64b5fcull; Farmer_sign_vote() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_sign_vote& _value); friend std::istream& operator>>(std::istream& _in, Farmer_sign_vote& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_sign_vote::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("vote", 0); _visitor.accept(vote); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_sign_vote_HXX_ ================================================ FILE: generated/include/mmx/Farmer_sign_vote_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Farmer_sign_vote_return_HXX_ #define INCLUDE_mmx_Farmer_sign_vote_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Farmer_sign_vote_return : public ::vnx::Value { public: ::mmx::signature_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x40848c38fe18b587ull; Farmer_sign_vote_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Farmer_sign_vote_return& _value); friend std::istream& operator>>(std::istream& _in, Farmer_sign_vote_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Farmer_sign_vote_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Farmer_sign_vote_return_HXX_ ================================================ FILE: generated/include/mmx/HarvesterAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_Harvester_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include namespace mmx { class HarvesterAsyncClient : public vnx::AsyncClient { public: HarvesterAsyncClient(const std::string& service_name); HarvesterAsyncClient(vnx::Hash64 service_addr); uint64_t reload( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t add_plot_dir(const std::string& path = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t rem_plot_dir(const std::string& path = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_farm_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_total_bytes( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t http_request(std::shared_ptr request = nullptr, const std::string& sub_path = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map, std::function>> vnx_queue_reload; std::unordered_map, std::function>> vnx_queue_add_plot_dir; std::unordered_map, std::function>> vnx_queue_rem_plot_dir; std::unordered_map)>, std::function>> vnx_queue_get_farm_info; std::unordered_map, std::function>> vnx_queue_get_total_bytes; std::unordered_map)>, std::function>> vnx_queue_http_request; std::unordered_map)>, std::function>> vnx_queue_http_request_chunk; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_Harvester_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/HarvesterBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_HarvesterBase_HXX_ #define INCLUDE_mmx_HarvesterBase_HXX_ #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT HarvesterBase : public ::vnx::Module { public: ::vnx::TopicPtr input_challenges = "harvester.challenges"; ::vnx::TopicPtr output_info = "harvester.info"; ::vnx::TopicPtr output_proofs = "harvester.proof"; ::vnx::TopicPtr output_lookups = "harvester.lookups"; ::vnx::TopicPtr output_partials = "harvester.partials"; std::set plot_dirs; std::set dir_blacklist; std::string node_server = "Node"; std::string farmer_server = "Farmer"; std::string config_path; std::string storage_path; std::string my_name; int32_t max_queue_ms = 10000; int32_t reload_interval = 3600; int32_t nft_query_interval = 60; uint32_t num_threads = 32; uint32_t max_recursion = 4; vnx::bool_t recursive_search = true; vnx::bool_t farm_virtual_plots = true; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc17118896cde1555ull; HarvesterBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const HarvesterBase& _value); friend std::istream& operator>>(std::istream& _in, HarvesterBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual void reload() = 0; virtual void add_plot_dir(const std::string& path) = 0; virtual void rem_plot_dir(const std::string& path) = 0; virtual std::shared_ptr get_farm_info() const = 0; virtual uint64_t get_total_bytes() const = 0; virtual void handle(std::shared_ptr _value) {} virtual void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& _request_id) const = 0; void http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& _request_id) const = 0; void http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void HarvesterBase::accept_generic(T& _visitor) const { _visitor.template type_begin(19); _visitor.type_field("input_challenges", 0); _visitor.accept(input_challenges); _visitor.type_field("output_info", 1); _visitor.accept(output_info); _visitor.type_field("output_proofs", 2); _visitor.accept(output_proofs); _visitor.type_field("output_lookups", 3); _visitor.accept(output_lookups); _visitor.type_field("output_partials", 4); _visitor.accept(output_partials); _visitor.type_field("plot_dirs", 5); _visitor.accept(plot_dirs); _visitor.type_field("dir_blacklist", 6); _visitor.accept(dir_blacklist); _visitor.type_field("node_server", 7); _visitor.accept(node_server); _visitor.type_field("farmer_server", 8); _visitor.accept(farmer_server); _visitor.type_field("config_path", 9); _visitor.accept(config_path); _visitor.type_field("storage_path", 10); _visitor.accept(storage_path); _visitor.type_field("my_name", 11); _visitor.accept(my_name); _visitor.type_field("max_queue_ms", 12); _visitor.accept(max_queue_ms); _visitor.type_field("reload_interval", 13); _visitor.accept(reload_interval); _visitor.type_field("nft_query_interval", 14); _visitor.accept(nft_query_interval); _visitor.type_field("num_threads", 15); _visitor.accept(num_threads); _visitor.type_field("max_recursion", 16); _visitor.accept(max_recursion); _visitor.type_field("recursive_search", 17); _visitor.accept(recursive_search); _visitor.type_field("farm_virtual_plots", 18); _visitor.accept(farm_virtual_plots); _visitor.template type_end(19); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_HarvesterBase_HXX_ ================================================ FILE: generated/include/mmx/HarvesterClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_CLIENT_HXX_ #define INCLUDE_mmx_Harvester_CLIENT_HXX_ #include #include #include #include #include #include #include #include namespace mmx { class HarvesterClient : public vnx::Client { public: HarvesterClient(const std::string& service_name); HarvesterClient(vnx::Hash64 service_addr); void reload(); void reload_async(); void add_plot_dir(const std::string& path = ""); void add_plot_dir_async(const std::string& path = ""); void rem_plot_dir(const std::string& path = ""); void rem_plot_dir_async(const std::string& path = ""); std::shared_ptr get_farm_info(); uint64_t get_total_bytes(); std::shared_ptr http_request(std::shared_ptr request = nullptr, const std::string& sub_path = ""); std::shared_ptr http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_Harvester_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/Harvester_add_plot_dir.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_add_plot_dir_HXX_ #define INCLUDE_mmx_Harvester_add_plot_dir_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_add_plot_dir : public ::vnx::Value { public: std::string path; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x61714d1c7ecaffddull; Harvester_add_plot_dir() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_add_plot_dir& _value); friend std::istream& operator>>(std::istream& _in, Harvester_add_plot_dir& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_add_plot_dir::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("path", 0); _visitor.accept(path); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_add_plot_dir_HXX_ ================================================ FILE: generated/include/mmx/Harvester_add_plot_dir_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_add_plot_dir_return_HXX_ #define INCLUDE_mmx_Harvester_add_plot_dir_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_add_plot_dir_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b5f7bc4f34fb5d5ull; Harvester_add_plot_dir_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_add_plot_dir_return& _value); friend std::istream& operator>>(std::istream& _in, Harvester_add_plot_dir_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_add_plot_dir_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_add_plot_dir_return_HXX_ ================================================ FILE: generated/include/mmx/Harvester_get_farm_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_get_farm_info_HXX_ #define INCLUDE_mmx_Harvester_get_farm_info_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_get_farm_info : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x129f91b9ade2891full; Harvester_get_farm_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_get_farm_info& _value); friend std::istream& operator>>(std::istream& _in, Harvester_get_farm_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_get_farm_info::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_get_farm_info_HXX_ ================================================ FILE: generated/include/mmx/Harvester_get_farm_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_get_farm_info_return_HXX_ #define INCLUDE_mmx_Harvester_get_farm_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Harvester_get_farm_info_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x87a91b15ec42441full; Harvester_get_farm_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_get_farm_info_return& _value); friend std::istream& operator>>(std::istream& _in, Harvester_get_farm_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_get_farm_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_get_farm_info_return_HXX_ ================================================ FILE: generated/include/mmx/Harvester_get_total_bytes.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_get_total_bytes_HXX_ #define INCLUDE_mmx_Harvester_get_total_bytes_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_get_total_bytes : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x36f2104b41d9a25cull; Harvester_get_total_bytes() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_get_total_bytes& _value); friend std::istream& operator>>(std::istream& _in, Harvester_get_total_bytes& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_get_total_bytes::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_get_total_bytes_HXX_ ================================================ FILE: generated/include/mmx/Harvester_get_total_bytes_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_get_total_bytes_return_HXX_ #define INCLUDE_mmx_Harvester_get_total_bytes_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_get_total_bytes_return : public ::vnx::Value { public: uint64_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd9a9fe83ba7d6918ull; Harvester_get_total_bytes_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_get_total_bytes_return& _value); friend std::istream& operator>>(std::istream& _in, Harvester_get_total_bytes_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_get_total_bytes_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_get_total_bytes_return_HXX_ ================================================ FILE: generated/include/mmx/Harvester_reload.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_reload_HXX_ #define INCLUDE_mmx_Harvester_reload_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_reload : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc67a4577de7e85caull; Harvester_reload() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_reload& _value); friend std::istream& operator>>(std::istream& _in, Harvester_reload& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_reload::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_reload_HXX_ ================================================ FILE: generated/include/mmx/Harvester_reload_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_reload_return_HXX_ #define INCLUDE_mmx_Harvester_reload_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_reload_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x39fc8cc53bcf4659ull; Harvester_reload_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_reload_return& _value); friend std::istream& operator>>(std::istream& _in, Harvester_reload_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_reload_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_reload_return_HXX_ ================================================ FILE: generated/include/mmx/Harvester_rem_plot_dir.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_rem_plot_dir_HXX_ #define INCLUDE_mmx_Harvester_rem_plot_dir_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_rem_plot_dir : public ::vnx::Value { public: std::string path; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x57674e56f3ab6076ull; Harvester_rem_plot_dir() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_rem_plot_dir& _value); friend std::istream& operator>>(std::istream& _in, Harvester_rem_plot_dir& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_rem_plot_dir::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("path", 0); _visitor.accept(path); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_rem_plot_dir_HXX_ ================================================ FILE: generated/include/mmx/Harvester_rem_plot_dir_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Harvester_rem_plot_dir_return_HXX_ #define INCLUDE_mmx_Harvester_rem_plot_dir_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Harvester_rem_plot_dir_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb2a8cfb3633bf358ull; Harvester_rem_plot_dir_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Harvester_rem_plot_dir_return& _value); friend std::istream& operator>>(std::istream& _in, Harvester_rem_plot_dir_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Harvester_rem_plot_dir_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Harvester_rem_plot_dir_return_HXX_ ================================================ FILE: generated/include/mmx/IntervalRequest.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_IntervalRequest_HXX_ #define INCLUDE_mmx_IntervalRequest_HXX_ #include #include #include namespace mmx { class MMX_EXPORT IntervalRequest : public ::vnx::Value { public: uint32_t vdf_height = 0; uint64_t start = 0; uint64_t end = 0; ::mmx::hash_t infuse; vnx::optional<::mmx::hash_t> input; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa4e39be061f13d71ull; IntervalRequest() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const IntervalRequest& _value); friend std::istream& operator>>(std::istream& _in, IntervalRequest& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void IntervalRequest::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("vdf_height", 0); _visitor.accept(vdf_height); _visitor.type_field("start", 1); _visitor.accept(start); _visitor.type_field("end", 2); _visitor.accept(end); _visitor.type_field("infuse", 3); _visitor.accept(infuse); _visitor.type_field("input", 4); _visitor.accept(input); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_IntervalRequest_HXX_ ================================================ FILE: generated/include/mmx/KeyFile.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_KeyFile_HXX_ #define INCLUDE_mmx_KeyFile_HXX_ #include #include #include namespace mmx { class MMX_EXPORT KeyFile : public ::vnx::Value { public: ::mmx::hash_t seed_value; vnx::optional finger_print; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdf868931a939cba1ull; KeyFile() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const KeyFile& _value); friend std::istream& operator>>(std::istream& _in, KeyFile& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void KeyFile::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("seed_value", 0); _visitor.accept(seed_value); _visitor.type_field("finger_print", 1); _visitor.accept(finger_print); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_KeyFile_HXX_ ================================================ FILE: generated/include/mmx/LookupInfo.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_LookupInfo_HXX_ #define INCLUDE_mmx_LookupInfo_HXX_ #include #include #include namespace mmx { class MMX_EXPORT LookupInfo : public ::vnx::Value { public: ::mmx::hash_t id; std::string name; uint32_t vdf_height = 0; uint32_t num_passed = 0; uint32_t num_total = 0; int64_t slow_time_ms = 0; int64_t total_time_ms = 0; int64_t total_delay_ms = 0; vnx::optional slow_plot; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb7b2ff343487dd63ull; LookupInfo() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const LookupInfo& _value); friend std::istream& operator>>(std::istream& _in, LookupInfo& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void LookupInfo::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("vdf_height", 2); _visitor.accept(vdf_height); _visitor.type_field("num_passed", 3); _visitor.accept(num_passed); _visitor.type_field("num_total", 4); _visitor.accept(num_total); _visitor.type_field("slow_time_ms", 5); _visitor.accept(slow_time_ms); _visitor.type_field("total_time_ms", 6); _visitor.accept(total_time_ms); _visitor.type_field("total_delay_ms", 7); _visitor.accept(total_delay_ms); _visitor.type_field("slow_plot", 8); _visitor.accept(slow_plot); _visitor.template type_end(9); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_LookupInfo_HXX_ ================================================ FILE: generated/include/mmx/NetworkInfo.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_NetworkInfo_HXX_ #define INCLUDE_mmx_NetworkInfo_HXX_ #include #include #include namespace mmx { class MMX_EXPORT NetworkInfo : public ::vnx::Value { public: vnx::bool_t is_synced = 0; uint32_t height = 0; uint32_t vdf_height = 0; uint32_t synced_since = 0; int64_t time_stamp = 0; uint64_t time_diff = 0; uint64_t space_diff = 0; uint64_t block_reward = 0; uint64_t total_space = 0; uint64_t total_supply = 0; uint64_t address_count = 0; vnx::float64_t vdf_speed = 0; vnx::float64_t block_size = 0; uint64_t average_txfee = 0; ::mmx::hash_t genesis_hash; std::string name; std::string node_commit; std::string node_version; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd984018819746101ull; NetworkInfo() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const NetworkInfo& _value); friend std::istream& operator>>(std::istream& _in, NetworkInfo& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void NetworkInfo::accept_generic(T& _visitor) const { _visitor.template type_begin(18); _visitor.type_field("is_synced", 0); _visitor.accept(is_synced); _visitor.type_field("height", 1); _visitor.accept(height); _visitor.type_field("vdf_height", 2); _visitor.accept(vdf_height); _visitor.type_field("synced_since", 3); _visitor.accept(synced_since); _visitor.type_field("time_stamp", 4); _visitor.accept(time_stamp); _visitor.type_field("time_diff", 5); _visitor.accept(time_diff); _visitor.type_field("space_diff", 6); _visitor.accept(space_diff); _visitor.type_field("block_reward", 7); _visitor.accept(block_reward); _visitor.type_field("total_space", 8); _visitor.accept(total_space); _visitor.type_field("total_supply", 9); _visitor.accept(total_supply); _visitor.type_field("address_count", 10); _visitor.accept(address_count); _visitor.type_field("vdf_speed", 11); _visitor.accept(vdf_speed); _visitor.type_field("block_size", 12); _visitor.accept(block_size); _visitor.type_field("average_txfee", 13); _visitor.accept(average_txfee); _visitor.type_field("genesis_hash", 14); _visitor.accept(genesis_hash); _visitor.type_field("name", 15); _visitor.accept(name); _visitor.type_field("node_commit", 16); _visitor.accept(node_commit); _visitor.type_field("node_version", 17); _visitor.accept(node_version); _visitor.template type_end(18); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_NetworkInfo_HXX_ ================================================ FILE: generated/include/mmx/NodeAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_Node_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class NodeAsyncClient : public vnx::AsyncClient { public: NodeAsyncClient(const std::string& service_name); NodeAsyncClient(vnx::Hash64 service_addr); uint64_t get_params( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_network_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_genesis_hash( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_height( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_vdf_height( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_synced_height( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_synced_vdf_height( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_vdf_peak( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_block(const ::mmx::hash_t& hash = ::mmx::hash_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_block_at(const uint32_t& height = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_header(const ::mmx::hash_t& hash = ::mmx::hash_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_header_at(const uint32_t& height = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_block_hash(const uint32_t& height = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_block_hash_ex(const uint32_t& height = 0, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_height(const ::mmx::hash_t& id = ::mmx::hash_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_info(const ::mmx::hash_t& id = ::mmx::hash_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_info_for(std::shared_ptr tx = nullptr, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_ids(const uint32_t& limit = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_ids_at(const uint32_t& height = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_ids_since(const uint32_t& height = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t validate(std::shared_ptr tx = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t add_block(std::shared_ptr block = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t add_transaction(std::shared_ptr tx = nullptr, const vnx::bool_t& pre_validate = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_contract(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_contract_for(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_contracts(const std::vector<::mmx::addr_t>& addresses = {}, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_contracts_by(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::optional<::mmx::hash_t>& type_hash = nullptr, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_contracts_owned_by(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::optional<::mmx::hash_t>& type_hash = nullptr, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_transaction(const ::mmx::hash_t& id = ::mmx::hash_t(), const vnx::bool_t& pending = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_transactions(const std::vector<::mmx::hash_t>& ids = {}, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_history(const std::vector<::mmx::addr_t>& addresses = {}, const ::mmx::query_filter_t& filter = ::mmx::query_filter_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_history_memo(const std::vector<::mmx::addr_t>& addresses = {}, const std::string& memo = "", const ::mmx::query_filter_t& filter = ::mmx::query_filter_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_balance(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_balances(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_contract_balances(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_total_balance(const std::vector<::mmx::addr_t>& addresses = {}, const ::mmx::addr_t& currency = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_total_balances(const std::vector<::mmx::addr_t>& addresses = {}, const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_all_balances(const std::vector<::mmx::addr_t>& addresses = {}, const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100, const std::function, ::mmx::uint128>&)>& _callback = std::function, ::mmx::uint128>&)>(), const std::function& _error_callback = std::function()); uint64_t get_exec_history(const ::mmx::addr_t& address = ::mmx::addr_t(), const int32_t& limit = 100, const vnx::bool_t& recent = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t dump_storage(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_var(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t read_storage_entry_var(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint64_t& key = 0, const uint32_t& height = -1, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t read_storage_field(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_entry_addr(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const ::mmx::addr_t& key = ::mmx::addr_t(), const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_entry_string(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const std::string& key = "", const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_array(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_map(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t read_storage_object(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t call_contract(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const vnx::optional<::mmx::addr_t>& user = nullptr, const vnx::optional>& deposit = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_plot_nft_info(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_plot_nft_target(const ::mmx::addr_t& address = ::mmx::addr_t(), const vnx::optional<::mmx::addr_t>& farmer_addr = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_offer(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_offers(const uint32_t& since = 0, const vnx::bool_t& state = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_offers_by(const std::vector<::mmx::addr_t>& owners = {}, const vnx::bool_t& state = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t fetch_offers(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::bool_t& state = 0, const vnx::bool_t& closed = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_recent_offers(const int32_t& limit = 100, const vnx::bool_t& state = true, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_recent_offers_for(const vnx::optional<::mmx::addr_t>& bid = nullptr, const vnx::optional<::mmx::addr_t>& ask = nullptr, const ::mmx::uint128& min_bid = ::mmx::uint128(), const int32_t& limit = 100, const vnx::bool_t& state = true, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_trade_history(const int32_t& limit = 100, const uint32_t& since = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_trade_history_for(const vnx::optional<::mmx::addr_t>& bid = nullptr, const vnx::optional<::mmx::addr_t>& ask = nullptr, const int32_t& limit = 100, const uint32_t& since = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swaps(const uint32_t& since = 0, const vnx::optional<::mmx::addr_t>& token = nullptr, const vnx::optional<::mmx::addr_t>& currency = nullptr, const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_info(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_swap_user_info(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_swap_history(const ::mmx::addr_t& address = ::mmx::addr_t(), const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_trade_estimate(const ::mmx::addr_t& address = ::mmx::addr_t(), const uint32_t& i = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const int32_t& num_iter = 20, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_fees_earned(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_equivalent_liquidity(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_liquidity_by(const std::vector<::mmx::addr_t>& addresses = {}, const std::function, 2>>&)>& _callback = std::function, 2>>&)>(), const std::function& _error_callback = std::function()); uint64_t get_total_supply(const ::mmx::addr_t& currency = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_farmed_blocks(const std::vector<::mmx::pubkey_t>& farmer_keys = {}, const vnx::bool_t& full_blocks = 0, const uint32_t& since = 0, const int32_t& limit = 100, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_farmed_block_summary(const std::vector<::mmx::pubkey_t>& farmer_keys = {}, const uint32_t& since = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_farmer_ranking(const int32_t& limit = -1, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t verify_plot_nft_target(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& pool_target = ::mmx::addr_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t verify_partial(std::shared_ptr partial = nullptr, const vnx::optional<::mmx::addr_t>& pool_target = nullptr, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t start_sync(const vnx::bool_t& force = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t revert_sync(const uint32_t& height = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t http_request(std::shared_ptr request = nullptr, const std::string& sub_path = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map)>, std::function>> vnx_queue_get_params; std::unordered_map)>, std::function>> vnx_queue_get_network_info; std::unordered_map, std::function>> vnx_queue_get_genesis_hash; std::unordered_map, std::function>> vnx_queue_get_height; std::unordered_map, std::function>> vnx_queue_get_vdf_height; std::unordered_map&)>, std::function>> vnx_queue_get_synced_height; std::unordered_map&)>, std::function>> vnx_queue_get_synced_vdf_height; std::unordered_map, std::function>> vnx_queue_get_vdf_peak; std::unordered_map)>, std::function>> vnx_queue_get_block; std::unordered_map)>, std::function>> vnx_queue_get_block_at; std::unordered_map)>, std::function>> vnx_queue_get_header; std::unordered_map)>, std::function>> vnx_queue_get_header_at; std::unordered_map&)>, std::function>> vnx_queue_get_block_hash; std::unordered_map>&)>, std::function>> vnx_queue_get_block_hash_ex; std::unordered_map&)>, std::function>> vnx_queue_get_tx_height; std::unordered_map&)>, std::function>> vnx_queue_get_tx_info; std::unordered_map&)>, std::function>> vnx_queue_get_tx_info_for; std::unordered_map&)>, std::function>> vnx_queue_get_tx_ids; std::unordered_map&)>, std::function>> vnx_queue_get_tx_ids_at; std::unordered_map&)>, std::function>> vnx_queue_get_tx_ids_since; std::unordered_map, std::function>> vnx_queue_validate; std::unordered_map, std::function>> vnx_queue_add_block; std::unordered_map, std::function>> vnx_queue_add_transaction; std::unordered_map)>, std::function>> vnx_queue_get_contract; std::unordered_map)>, std::function>> vnx_queue_get_contract_for; std::unordered_map>&)>, std::function>> vnx_queue_get_contracts; std::unordered_map&)>, std::function>> vnx_queue_get_contracts_by; std::unordered_map&)>, std::function>> vnx_queue_get_contracts_owned_by; std::unordered_map)>, std::function>> vnx_queue_get_transaction; std::unordered_map>&)>, std::function>> vnx_queue_get_transactions; std::unordered_map&)>, std::function>> vnx_queue_get_history; std::unordered_map&)>, std::function>> vnx_queue_get_history_memo; std::unordered_map, std::function>> vnx_queue_get_balance; std::unordered_map&)>, std::function>> vnx_queue_get_balances; std::unordered_map&)>, std::function>> vnx_queue_get_contract_balances; std::unordered_map, std::function>> vnx_queue_get_total_balance; std::unordered_map&)>, std::function>> vnx_queue_get_total_balances; std::unordered_map, ::mmx::uint128>&)>, std::function>> vnx_queue_get_all_balances; std::unordered_map&)>, std::function>> vnx_queue_get_exec_history; std::unordered_map&)>, std::function>> vnx_queue_read_storage; std::unordered_map&)>, std::function>> vnx_queue_dump_storage; std::unordered_map, std::function>> vnx_queue_read_storage_var; std::unordered_map, std::function>> vnx_queue_read_storage_entry_var; std::unordered_map&)>, std::function>> vnx_queue_read_storage_field; std::unordered_map&)>, std::function>> vnx_queue_read_storage_entry_addr; std::unordered_map&)>, std::function>> vnx_queue_read_storage_entry_string; std::unordered_map&)>, std::function>> vnx_queue_read_storage_array; std::unordered_map&)>, std::function>> vnx_queue_read_storage_map; std::unordered_map&)>, std::function>> vnx_queue_read_storage_object; std::unordered_map, std::function>> vnx_queue_call_contract; std::unordered_map&)>, std::function>> vnx_queue_get_plot_nft_info; std::unordered_map, std::function>> vnx_queue_get_plot_nft_target; std::unordered_map, std::function>> vnx_queue_get_offer; std::unordered_map&)>, std::function>> vnx_queue_get_offers; std::unordered_map&)>, std::function>> vnx_queue_get_offers_by; std::unordered_map&)>, std::function>> vnx_queue_fetch_offers; std::unordered_map&)>, std::function>> vnx_queue_get_recent_offers; std::unordered_map&)>, std::function>> vnx_queue_get_recent_offers_for; std::unordered_map&)>, std::function>> vnx_queue_get_trade_history; std::unordered_map&)>, std::function>> vnx_queue_get_trade_history_for; std::unordered_map&)>, std::function>> vnx_queue_get_swaps; std::unordered_map, std::function>> vnx_queue_get_swap_info; std::unordered_map, std::function>> vnx_queue_get_swap_user_info; std::unordered_map&)>, std::function>> vnx_queue_get_swap_history; std::unordered_map&)>, std::function>> vnx_queue_get_swap_trade_estimate; std::unordered_map&)>, std::function>> vnx_queue_get_swap_fees_earned; std::unordered_map&)>, std::function>> vnx_queue_get_swap_equivalent_liquidity; std::unordered_map, 2>>&)>, std::function>> vnx_queue_get_swap_liquidity_by; std::unordered_map, std::function>> vnx_queue_get_total_supply; std::unordered_map>&)>, std::function>> vnx_queue_get_farmed_blocks; std::unordered_map, std::function>> vnx_queue_get_farmed_block_summary; std::unordered_map>&)>, std::function>> vnx_queue_get_farmer_ranking; std::unordered_map&)>, std::function>> vnx_queue_verify_plot_nft_target; std::unordered_map&)>, std::function>> vnx_queue_verify_partial; std::unordered_map, std::function>> vnx_queue_start_sync; std::unordered_map, std::function>> vnx_queue_revert_sync; std::unordered_map)>, std::function>> vnx_queue_http_request; std::unordered_map)>, std::function>> vnx_queue_http_request_chunk; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_Node_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/NodeBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_NodeBase_HXX_ #define INCLUDE_mmx_NodeBase_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT NodeBase : public ::vnx::Module { public: ::vnx::TopicPtr input_vdfs = "network.vdfs"; ::vnx::TopicPtr input_votes = "network.votes"; ::vnx::TopicPtr input_proof = "network.proof"; ::vnx::TopicPtr input_blocks = "network.blocks"; ::vnx::TopicPtr input_transactions = "network.transactions"; ::vnx::TopicPtr input_timelord_vdfs = "timelord.proof"; ::vnx::TopicPtr input_harvester_proof = "farmer.proof"; ::vnx::TopicPtr input_vdf_points = "network.vdf_points"; ::vnx::TopicPtr output_verified_vdfs = "node.verified_vdfs"; ::vnx::TopicPtr output_verified_votes = "node.verified_votes"; ::vnx::TopicPtr output_verified_proof = "node.verified_proof"; ::vnx::TopicPtr output_verified_blocks = "node.verified_blocks"; ::vnx::TopicPtr output_verified_transactions = "node.verified_transactions"; ::vnx::TopicPtr output_committed_blocks = "node.committed_blocks"; ::vnx::TopicPtr output_transactions = "node.transactions"; ::vnx::TopicPtr output_interval_request = "timelord.requests"; ::vnx::TopicPtr output_challenges = "harvester.challenges"; ::vnx::TopicPtr output_vdf_points = "node.vdf_points"; ::vnx::TopicPtr output_votes = "node.votes"; int32_t max_queue_ms = 10000; int32_t update_interval_ms = 1000; int32_t validate_interval_ms = 500; int32_t sync_loss_delay = 60; uint32_t max_history = 1000; uint32_t max_tx_pool = 100; uint32_t max_tx_queue = 10000; uint32_t max_sync_jobs = 64; uint32_t max_sync_ahead = 1000; uint32_t num_sync_retries = 3; uint32_t revert_height = -1; uint32_t num_threads = 24; uint32_t num_db_threads = 8; uint32_t num_api_threads = 8; uint32_t commit_threshold = 80; uint32_t max_future_sync = 100; uint32_t max_vdf_verify_pending = 2; int32_t opencl_device = 0; std::string opencl_device_name; vnx::bool_t do_sync = true; vnx::bool_t show_warnings = 0; vnx::bool_t vdf_slave_mode = 0; vnx::bool_t run_tests = 0; vnx::bool_t exec_debug = 0; vnx::bool_t exec_profile = 0; vnx::bool_t exec_trace = 0; std::string storage_path; std::string database_path = "db/"; std::string router_name = "Router"; ::mmx::addr_t mmx_usd_swap_addr; std::string metalsdev_api_key; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x289d7651582d76a3ull; NodeBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const NodeBase& _value); friend std::istream& operator>>(std::istream& _in, NodeBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual std::shared_ptr get_params() const = 0; virtual std::shared_ptr get_network_info() const = 0; virtual ::mmx::hash_t get_genesis_hash() const = 0; virtual uint32_t get_height() const = 0; virtual uint32_t get_vdf_height() const = 0; virtual vnx::optional get_synced_height() const = 0; virtual vnx::optional get_synced_vdf_height() const = 0; virtual ::mmx::hash_t get_vdf_peak() const = 0; virtual std::shared_ptr get_block(const ::mmx::hash_t& hash) const = 0; virtual std::shared_ptr get_block_at(const uint32_t& height) const = 0; virtual std::shared_ptr get_header(const ::mmx::hash_t& hash) const = 0; virtual std::shared_ptr get_header_at(const uint32_t& height) const = 0; virtual vnx::optional<::mmx::hash_t> get_block_hash(const uint32_t& height) const = 0; virtual vnx::optional> get_block_hash_ex(const uint32_t& height) const = 0; virtual vnx::optional get_tx_height(const ::mmx::hash_t& id) const = 0; virtual vnx::optional<::mmx::tx_info_t> get_tx_info(const ::mmx::hash_t& id) const = 0; virtual vnx::optional<::mmx::tx_info_t> get_tx_info_for(std::shared_ptr tx) const = 0; virtual std::vector<::mmx::hash_t> get_tx_ids(const uint32_t& limit) const = 0; virtual std::vector<::mmx::hash_t> get_tx_ids_at(const uint32_t& height) const = 0; virtual std::vector<::mmx::hash_t> get_tx_ids_since(const uint32_t& height) const = 0; virtual ::mmx::exec_result_t validate(std::shared_ptr tx) const = 0; virtual void add_block(std::shared_ptr block) = 0; virtual void add_transaction(std::shared_ptr tx, const vnx::bool_t& pre_validate) = 0; virtual std::shared_ptr get_contract(const ::mmx::addr_t& address) const = 0; virtual std::shared_ptr get_contract_for(const ::mmx::addr_t& address) const = 0; virtual std::vector> get_contracts(const std::vector<::mmx::addr_t>& addresses) const = 0; virtual std::vector<::mmx::addr_t> get_contracts_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash) const = 0; virtual std::vector<::mmx::addr_t> get_contracts_owned_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash) const = 0; virtual std::shared_ptr get_transaction(const ::mmx::hash_t& id, const vnx::bool_t& pending) const = 0; virtual std::vector> get_transactions(const std::vector<::mmx::hash_t>& ids) const = 0; virtual std::vector<::mmx::tx_entry_t> get_history(const std::vector<::mmx::addr_t>& addresses, const ::mmx::query_filter_t& filter) const = 0; virtual std::vector<::mmx::tx_entry_t> get_history_memo(const std::vector<::mmx::addr_t>& addresses, const std::string& memo, const ::mmx::query_filter_t& filter) const = 0; virtual ::mmx::uint128 get_balance(const ::mmx::addr_t& address, const ::mmx::addr_t& currency) const = 0; virtual std::map<::mmx::addr_t, ::mmx::uint128> get_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) const = 0; virtual std::map<::mmx::addr_t, ::mmx::balance_t> get_contract_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) const = 0; virtual ::mmx::uint128 get_total_balance(const std::vector<::mmx::addr_t>& addresses, const ::mmx::addr_t& currency) const = 0; virtual std::map<::mmx::addr_t, ::mmx::uint128> get_total_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) const = 0; virtual std::map, ::mmx::uint128> get_all_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) const = 0; virtual std::vector<::mmx::exec_entry_t> get_exec_history(const ::mmx::addr_t& address, const int32_t& limit, const vnx::bool_t& recent) const = 0; virtual std::map read_storage(const ::mmx::addr_t& contract, const uint32_t& height) const = 0; virtual std::map dump_storage(const ::mmx::addr_t& contract, const uint32_t& height) const = 0; virtual ::mmx::vm::varptr_t read_storage_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) const = 0; virtual ::mmx::vm::varptr_t read_storage_entry_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint64_t& key, const uint32_t& height) const = 0; virtual std::pair<::mmx::vm::varptr_t, uint64_t> read_storage_field(const ::mmx::addr_t& contract, const std::string& name, const uint32_t& height) const = 0; virtual std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> read_storage_entry_addr(const ::mmx::addr_t& contract, const std::string& name, const ::mmx::addr_t& key, const uint32_t& height) const = 0; virtual std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> read_storage_entry_string(const ::mmx::addr_t& contract, const std::string& name, const std::string& key, const uint32_t& height) const = 0; virtual std::vector<::mmx::vm::varptr_t> read_storage_array(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) const = 0; virtual std::map<::mmx::vm::varptr_t, ::mmx::vm::varptr_t> read_storage_map(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) const = 0; virtual std::map read_storage_object(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) const = 0; virtual ::vnx::Variant call_contract(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional<::mmx::addr_t>& user, const vnx::optional>& deposit) const = 0; virtual vnx::optional<::mmx::plot_nft_info_t> get_plot_nft_info(const ::mmx::addr_t& address) const = 0; virtual ::mmx::addr_t get_plot_nft_target(const ::mmx::addr_t& address, const vnx::optional<::mmx::addr_t>& farmer_addr) const = 0; virtual ::mmx::offer_data_t get_offer(const ::mmx::addr_t& address) const = 0; virtual std::vector<::mmx::offer_data_t> get_offers(const uint32_t& since, const vnx::bool_t& state) const = 0; virtual std::vector<::mmx::offer_data_t> get_offers_by(const std::vector<::mmx::addr_t>& owners, const vnx::bool_t& state) const = 0; virtual std::vector<::mmx::offer_data_t> fetch_offers(const std::vector<::mmx::addr_t>& addresses, const vnx::bool_t& state, const vnx::bool_t& closed) const = 0; virtual std::vector<::mmx::offer_data_t> get_recent_offers(const int32_t& limit, const vnx::bool_t& state) const = 0; virtual std::vector<::mmx::offer_data_t> get_recent_offers_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const ::mmx::uint128& min_bid, const int32_t& limit, const vnx::bool_t& state) const = 0; virtual std::vector<::mmx::trade_entry_t> get_trade_history(const int32_t& limit, const uint32_t& since) const = 0; virtual std::vector<::mmx::trade_entry_t> get_trade_history_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const int32_t& limit, const uint32_t& since) const = 0; virtual std::vector<::mmx::swap_info_t> get_swaps(const uint32_t& since, const vnx::optional<::mmx::addr_t>& token, const vnx::optional<::mmx::addr_t>& currency, const int32_t& limit) const = 0; virtual ::mmx::swap_info_t get_swap_info(const ::mmx::addr_t& address) const = 0; virtual ::mmx::swap_user_info_t get_swap_user_info(const ::mmx::addr_t& address, const ::mmx::addr_t& user) const = 0; virtual std::vector<::mmx::swap_entry_t> get_swap_history(const ::mmx::addr_t& address, const int32_t& limit) const = 0; virtual std::array<::mmx::uint128, 2> get_swap_trade_estimate(const ::mmx::addr_t& address, const uint32_t& i, const ::mmx::uint128& amount, const int32_t& num_iter) const = 0; virtual std::array<::mmx::uint128, 2> get_swap_fees_earned(const ::mmx::addr_t& address, const ::mmx::addr_t& user) const = 0; virtual std::array<::mmx::uint128, 2> get_swap_equivalent_liquidity(const ::mmx::addr_t& address, const ::mmx::addr_t& user) const = 0; virtual std::map<::mmx::addr_t, std::array, 2>> get_swap_liquidity_by(const std::vector<::mmx::addr_t>& addresses) const = 0; virtual ::mmx::uint128 get_total_supply(const ::mmx::addr_t& currency) const = 0; virtual std::vector> get_farmed_blocks(const std::vector<::mmx::pubkey_t>& farmer_keys, const vnx::bool_t& full_blocks, const uint32_t& since, const int32_t& limit) const = 0; virtual ::mmx::farmed_block_summary_t get_farmed_block_summary(const std::vector<::mmx::pubkey_t>& farmer_keys, const uint32_t& since) const = 0; virtual std::vector> get_farmer_ranking(const int32_t& limit) const = 0; virtual std::tuple<::mmx::pooling_error_e, std::string> verify_plot_nft_target(const ::mmx::addr_t& address, const ::mmx::addr_t& pool_target) const = 0; virtual std::tuple<::mmx::pooling_error_e, std::string> verify_partial(std::shared_ptr partial, const vnx::optional<::mmx::addr_t>& pool_target) const = 0; virtual void start_sync(const vnx::bool_t& force) = 0; virtual void revert_sync(const uint32_t& height) = 0; virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& _request_id) const = 0; void http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& _request_id) const = 0; void http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void NodeBase::accept_generic(T& _visitor) const { _visitor.template type_begin(50); _visitor.type_field("input_vdfs", 0); _visitor.accept(input_vdfs); _visitor.type_field("input_votes", 1); _visitor.accept(input_votes); _visitor.type_field("input_proof", 2); _visitor.accept(input_proof); _visitor.type_field("input_blocks", 3); _visitor.accept(input_blocks); _visitor.type_field("input_transactions", 4); _visitor.accept(input_transactions); _visitor.type_field("input_timelord_vdfs", 5); _visitor.accept(input_timelord_vdfs); _visitor.type_field("input_harvester_proof", 6); _visitor.accept(input_harvester_proof); _visitor.type_field("input_vdf_points", 7); _visitor.accept(input_vdf_points); _visitor.type_field("output_verified_vdfs", 8); _visitor.accept(output_verified_vdfs); _visitor.type_field("output_verified_votes", 9); _visitor.accept(output_verified_votes); _visitor.type_field("output_verified_proof", 10); _visitor.accept(output_verified_proof); _visitor.type_field("output_verified_blocks", 11); _visitor.accept(output_verified_blocks); _visitor.type_field("output_verified_transactions", 12); _visitor.accept(output_verified_transactions); _visitor.type_field("output_committed_blocks", 13); _visitor.accept(output_committed_blocks); _visitor.type_field("output_transactions", 14); _visitor.accept(output_transactions); _visitor.type_field("output_interval_request", 15); _visitor.accept(output_interval_request); _visitor.type_field("output_challenges", 16); _visitor.accept(output_challenges); _visitor.type_field("output_vdf_points", 17); _visitor.accept(output_vdf_points); _visitor.type_field("output_votes", 18); _visitor.accept(output_votes); _visitor.type_field("max_queue_ms", 19); _visitor.accept(max_queue_ms); _visitor.type_field("update_interval_ms", 20); _visitor.accept(update_interval_ms); _visitor.type_field("validate_interval_ms", 21); _visitor.accept(validate_interval_ms); _visitor.type_field("sync_loss_delay", 22); _visitor.accept(sync_loss_delay); _visitor.type_field("max_history", 23); _visitor.accept(max_history); _visitor.type_field("max_tx_pool", 24); _visitor.accept(max_tx_pool); _visitor.type_field("max_tx_queue", 25); _visitor.accept(max_tx_queue); _visitor.type_field("max_sync_jobs", 26); _visitor.accept(max_sync_jobs); _visitor.type_field("max_sync_ahead", 27); _visitor.accept(max_sync_ahead); _visitor.type_field("num_sync_retries", 28); _visitor.accept(num_sync_retries); _visitor.type_field("revert_height", 29); _visitor.accept(revert_height); _visitor.type_field("num_threads", 30); _visitor.accept(num_threads); _visitor.type_field("num_db_threads", 31); _visitor.accept(num_db_threads); _visitor.type_field("num_api_threads", 32); _visitor.accept(num_api_threads); _visitor.type_field("commit_threshold", 33); _visitor.accept(commit_threshold); _visitor.type_field("max_future_sync", 34); _visitor.accept(max_future_sync); _visitor.type_field("max_vdf_verify_pending", 35); _visitor.accept(max_vdf_verify_pending); _visitor.type_field("opencl_device", 36); _visitor.accept(opencl_device); _visitor.type_field("opencl_device_name", 37); _visitor.accept(opencl_device_name); _visitor.type_field("do_sync", 38); _visitor.accept(do_sync); _visitor.type_field("show_warnings", 39); _visitor.accept(show_warnings); _visitor.type_field("vdf_slave_mode", 40); _visitor.accept(vdf_slave_mode); _visitor.type_field("run_tests", 41); _visitor.accept(run_tests); _visitor.type_field("exec_debug", 42); _visitor.accept(exec_debug); _visitor.type_field("exec_profile", 43); _visitor.accept(exec_profile); _visitor.type_field("exec_trace", 44); _visitor.accept(exec_trace); _visitor.type_field("storage_path", 45); _visitor.accept(storage_path); _visitor.type_field("database_path", 46); _visitor.accept(database_path); _visitor.type_field("router_name", 47); _visitor.accept(router_name); _visitor.type_field("mmx_usd_swap_addr", 48); _visitor.accept(mmx_usd_swap_addr); _visitor.type_field("metalsdev_api_key", 49); _visitor.accept(metalsdev_api_key); _visitor.template type_end(50); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_NodeBase_HXX_ ================================================ FILE: generated/include/mmx/NodeClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_CLIENT_HXX_ #define INCLUDE_mmx_Node_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class NodeClient : public vnx::Client { public: NodeClient(const std::string& service_name); NodeClient(vnx::Hash64 service_addr); std::shared_ptr get_params(); std::shared_ptr get_network_info(); ::mmx::hash_t get_genesis_hash(); uint32_t get_height(); uint32_t get_vdf_height(); vnx::optional get_synced_height(); vnx::optional get_synced_vdf_height(); ::mmx::hash_t get_vdf_peak(); std::shared_ptr get_block(const ::mmx::hash_t& hash = ::mmx::hash_t()); std::shared_ptr get_block_at(const uint32_t& height = 0); std::shared_ptr get_header(const ::mmx::hash_t& hash = ::mmx::hash_t()); std::shared_ptr get_header_at(const uint32_t& height = 0); vnx::optional<::mmx::hash_t> get_block_hash(const uint32_t& height = 0); vnx::optional> get_block_hash_ex(const uint32_t& height = 0); vnx::optional get_tx_height(const ::mmx::hash_t& id = ::mmx::hash_t()); vnx::optional<::mmx::tx_info_t> get_tx_info(const ::mmx::hash_t& id = ::mmx::hash_t()); vnx::optional<::mmx::tx_info_t> get_tx_info_for(std::shared_ptr tx = nullptr); std::vector<::mmx::hash_t> get_tx_ids(const uint32_t& limit = 0); std::vector<::mmx::hash_t> get_tx_ids_at(const uint32_t& height = 0); std::vector<::mmx::hash_t> get_tx_ids_since(const uint32_t& height = 0); ::mmx::exec_result_t validate(std::shared_ptr tx = nullptr); void add_block(std::shared_ptr block = nullptr); void add_block_async(std::shared_ptr block = nullptr); void add_transaction(std::shared_ptr tx = nullptr, const vnx::bool_t& pre_validate = 0); void add_transaction_async(std::shared_ptr tx = nullptr, const vnx::bool_t& pre_validate = 0); std::shared_ptr get_contract(const ::mmx::addr_t& address = ::mmx::addr_t()); std::shared_ptr get_contract_for(const ::mmx::addr_t& address = ::mmx::addr_t()); std::vector> get_contracts(const std::vector<::mmx::addr_t>& addresses = {}); std::vector<::mmx::addr_t> get_contracts_by(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::optional<::mmx::hash_t>& type_hash = nullptr); std::vector<::mmx::addr_t> get_contracts_owned_by(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::optional<::mmx::hash_t>& type_hash = nullptr); std::shared_ptr get_transaction(const ::mmx::hash_t& id = ::mmx::hash_t(), const vnx::bool_t& pending = 0); std::vector> get_transactions(const std::vector<::mmx::hash_t>& ids = {}); std::vector<::mmx::tx_entry_t> get_history(const std::vector<::mmx::addr_t>& addresses = {}, const ::mmx::query_filter_t& filter = ::mmx::query_filter_t()); std::vector<::mmx::tx_entry_t> get_history_memo(const std::vector<::mmx::addr_t>& addresses = {}, const std::string& memo = "", const ::mmx::query_filter_t& filter = ::mmx::query_filter_t()); ::mmx::uint128 get_balance(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t()); std::map<::mmx::addr_t, ::mmx::uint128> get_balances(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100); std::map<::mmx::addr_t, ::mmx::balance_t> get_contract_balances(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100); ::mmx::uint128 get_total_balance(const std::vector<::mmx::addr_t>& addresses = {}, const ::mmx::addr_t& currency = ::mmx::addr_t()); std::map<::mmx::addr_t, ::mmx::uint128> get_total_balances(const std::vector<::mmx::addr_t>& addresses = {}, const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100); std::map, ::mmx::uint128> get_all_balances(const std::vector<::mmx::addr_t>& addresses = {}, const std::set<::mmx::addr_t>& whitelist = {}, const int32_t& limit = 100); std::vector<::mmx::exec_entry_t> get_exec_history(const ::mmx::addr_t& address = ::mmx::addr_t(), const int32_t& limit = 100, const vnx::bool_t& recent = 0); std::map read_storage(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint32_t& height = -1); std::map dump_storage(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint32_t& height = -1); ::mmx::vm::varptr_t read_storage_var(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1); ::mmx::vm::varptr_t read_storage_entry_var(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint64_t& key = 0, const uint32_t& height = -1); std::pair<::mmx::vm::varptr_t, uint64_t> read_storage_field(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const uint32_t& height = -1); std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> read_storage_entry_addr(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const ::mmx::addr_t& key = ::mmx::addr_t(), const uint32_t& height = -1); std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> read_storage_entry_string(const ::mmx::addr_t& contract = ::mmx::addr_t(), const std::string& name = "", const std::string& key = "", const uint32_t& height = -1); std::vector<::mmx::vm::varptr_t> read_storage_array(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1); std::map<::mmx::vm::varptr_t, ::mmx::vm::varptr_t> read_storage_map(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1); std::map read_storage_object(const ::mmx::addr_t& contract = ::mmx::addr_t(), const uint64_t& address = 0, const uint32_t& height = -1); ::vnx::Variant call_contract(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const vnx::optional<::mmx::addr_t>& user = nullptr, const vnx::optional>& deposit = nullptr); vnx::optional<::mmx::plot_nft_info_t> get_plot_nft_info(const ::mmx::addr_t& address = ::mmx::addr_t()); ::mmx::addr_t get_plot_nft_target(const ::mmx::addr_t& address = ::mmx::addr_t(), const vnx::optional<::mmx::addr_t>& farmer_addr = nullptr); ::mmx::offer_data_t get_offer(const ::mmx::addr_t& address = ::mmx::addr_t()); std::vector<::mmx::offer_data_t> get_offers(const uint32_t& since = 0, const vnx::bool_t& state = 0); std::vector<::mmx::offer_data_t> get_offers_by(const std::vector<::mmx::addr_t>& owners = {}, const vnx::bool_t& state = 0); std::vector<::mmx::offer_data_t> fetch_offers(const std::vector<::mmx::addr_t>& addresses = {}, const vnx::bool_t& state = 0, const vnx::bool_t& closed = 0); std::vector<::mmx::offer_data_t> get_recent_offers(const int32_t& limit = 100, const vnx::bool_t& state = true); std::vector<::mmx::offer_data_t> get_recent_offers_for(const vnx::optional<::mmx::addr_t>& bid = nullptr, const vnx::optional<::mmx::addr_t>& ask = nullptr, const ::mmx::uint128& min_bid = ::mmx::uint128(), const int32_t& limit = 100, const vnx::bool_t& state = true); std::vector<::mmx::trade_entry_t> get_trade_history(const int32_t& limit = 100, const uint32_t& since = 0); std::vector<::mmx::trade_entry_t> get_trade_history_for(const vnx::optional<::mmx::addr_t>& bid = nullptr, const vnx::optional<::mmx::addr_t>& ask = nullptr, const int32_t& limit = 100, const uint32_t& since = 0); std::vector<::mmx::swap_info_t> get_swaps(const uint32_t& since = 0, const vnx::optional<::mmx::addr_t>& token = nullptr, const vnx::optional<::mmx::addr_t>& currency = nullptr, const int32_t& limit = 100); ::mmx::swap_info_t get_swap_info(const ::mmx::addr_t& address = ::mmx::addr_t()); ::mmx::swap_user_info_t get_swap_user_info(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t()); std::vector<::mmx::swap_entry_t> get_swap_history(const ::mmx::addr_t& address = ::mmx::addr_t(), const int32_t& limit = 100); std::array<::mmx::uint128, 2> get_swap_trade_estimate(const ::mmx::addr_t& address = ::mmx::addr_t(), const uint32_t& i = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const int32_t& num_iter = 20); std::array<::mmx::uint128, 2> get_swap_fees_earned(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t()); std::array<::mmx::uint128, 2> get_swap_equivalent_liquidity(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& user = ::mmx::addr_t()); std::map<::mmx::addr_t, std::array, 2>> get_swap_liquidity_by(const std::vector<::mmx::addr_t>& addresses = {}); ::mmx::uint128 get_total_supply(const ::mmx::addr_t& currency = ::mmx::addr_t()); std::vector> get_farmed_blocks(const std::vector<::mmx::pubkey_t>& farmer_keys = {}, const vnx::bool_t& full_blocks = 0, const uint32_t& since = 0, const int32_t& limit = 100); ::mmx::farmed_block_summary_t get_farmed_block_summary(const std::vector<::mmx::pubkey_t>& farmer_keys = {}, const uint32_t& since = 0); std::vector> get_farmer_ranking(const int32_t& limit = -1); std::tuple<::mmx::pooling_error_e, std::string> verify_plot_nft_target(const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::addr_t& pool_target = ::mmx::addr_t()); std::tuple<::mmx::pooling_error_e, std::string> verify_partial(std::shared_ptr partial = nullptr, const vnx::optional<::mmx::addr_t>& pool_target = nullptr); void start_sync(const vnx::bool_t& force = 0); void start_sync_async(const vnx::bool_t& force = 0); void revert_sync(const uint32_t& height = 0); void revert_sync_async(const uint32_t& height = 0); std::shared_ptr http_request(std::shared_ptr request = nullptr, const std::string& sub_path = ""); std::shared_ptr http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_Node_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/Node_add_block.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_add_block_HXX_ #define INCLUDE_mmx_Node_add_block_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_add_block : public ::vnx::Value { public: std::shared_ptr block; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x63abca4d23f93894ull; Node_add_block() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_add_block& _value); friend std::istream& operator>>(std::istream& _in, Node_add_block& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_add_block::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("block", 0); _visitor.accept(block); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_add_block_HXX_ ================================================ FILE: generated/include/mmx/Node_add_block_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_add_block_return_HXX_ #define INCLUDE_mmx_Node_add_block_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_add_block_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb6d1115db03a6d6aull; Node_add_block_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_add_block_return& _value); friend std::istream& operator>>(std::istream& _in, Node_add_block_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_add_block_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_add_block_return_HXX_ ================================================ FILE: generated/include/mmx/Node_add_transaction.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_add_transaction_HXX_ #define INCLUDE_mmx_Node_add_transaction_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_add_transaction : public ::vnx::Value { public: std::shared_ptr tx; vnx::bool_t pre_validate = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd9782531c0e3f766ull; Node_add_transaction() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_add_transaction& _value); friend std::istream& operator>>(std::istream& _in, Node_add_transaction& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_add_transaction::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("tx", 0); _visitor.accept(tx); _visitor.type_field("pre_validate", 1); _visitor.accept(pre_validate); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_add_transaction_HXX_ ================================================ FILE: generated/include/mmx/Node_add_transaction_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_add_transaction_return_HXX_ #define INCLUDE_mmx_Node_add_transaction_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_add_transaction_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2ded8c10e1721ba8ull; Node_add_transaction_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_add_transaction_return& _value); friend std::istream& operator>>(std::istream& _in, Node_add_transaction_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_add_transaction_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_add_transaction_return_HXX_ ================================================ FILE: generated/include/mmx/Node_call_contract.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_call_contract_HXX_ #define INCLUDE_mmx_Node_call_contract_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Node_call_contract : public ::vnx::Value { public: ::mmx::addr_t address; std::string method; std::vector<::vnx::Variant> args; vnx::optional<::mmx::addr_t> user; vnx::optional> deposit; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6a21b0dfe3e541e8ull; Node_call_contract() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_call_contract& _value); friend std::istream& operator>>(std::istream& _in, Node_call_contract& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_call_contract::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("method", 1); _visitor.accept(method); _visitor.type_field("args", 2); _visitor.accept(args); _visitor.type_field("user", 3); _visitor.accept(user); _visitor.type_field("deposit", 4); _visitor.accept(deposit); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_call_contract_HXX_ ================================================ FILE: generated/include/mmx/Node_call_contract_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_call_contract_return_HXX_ #define INCLUDE_mmx_Node_call_contract_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_call_contract_return : public ::vnx::Value { public: ::vnx::Variant _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8449f6656a89f7aeull; Node_call_contract_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_call_contract_return& _value); friend std::istream& operator>>(std::istream& _in, Node_call_contract_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_call_contract_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_call_contract_return_HXX_ ================================================ FILE: generated/include/mmx/Node_dump_storage.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_dump_storage_HXX_ #define INCLUDE_mmx_Node_dump_storage_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_dump_storage : public ::vnx::Value { public: ::mmx::addr_t contract; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b66a712eea839bbull; Node_dump_storage() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_dump_storage& _value); friend std::istream& operator>>(std::istream& _in, Node_dump_storage& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_dump_storage::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("height", 1); _visitor.accept(height); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_dump_storage_HXX_ ================================================ FILE: generated/include/mmx/Node_dump_storage_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_dump_storage_return_HXX_ #define INCLUDE_mmx_Node_dump_storage_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_dump_storage_return : public ::vnx::Value { public: std::map _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xbc8c0b1ce37def41ull; Node_dump_storage_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_dump_storage_return& _value); friend std::istream& operator>>(std::istream& _in, Node_dump_storage_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_dump_storage_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_dump_storage_return_HXX_ ================================================ FILE: generated/include/mmx/Node_fetch_offers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_fetch_offers_HXX_ #define INCLUDE_mmx_Node_fetch_offers_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_fetch_offers : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; vnx::bool_t state = 0; vnx::bool_t closed = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfca08ee41b997129ull; Node_fetch_offers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_fetch_offers& _value); friend std::istream& operator>>(std::istream& _in, Node_fetch_offers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_fetch_offers::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("state", 1); _visitor.accept(state); _visitor.type_field("closed", 2); _visitor.accept(closed); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_fetch_offers_HXX_ ================================================ FILE: generated/include/mmx/Node_fetch_offers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_fetch_offers_return_HXX_ #define INCLUDE_mmx_Node_fetch_offers_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_fetch_offers_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8c5cc826b759938bull; Node_fetch_offers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_fetch_offers_return& _value); friend std::istream& operator>>(std::istream& _in, Node_fetch_offers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_fetch_offers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_fetch_offers_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_all_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_all_balances_HXX_ #define INCLUDE_mmx_Node_get_all_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_all_balances : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; std::set<::mmx::addr_t> whitelist; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe099ac5aea49433ull; Node_get_all_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_all_balances& _value); friend std::istream& operator>>(std::istream& _in, Node_get_all_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_all_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("whitelist", 1); _visitor.accept(whitelist); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_all_balances_HXX_ ================================================ FILE: generated/include/mmx/Node_get_all_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_all_balances_return_HXX_ #define INCLUDE_mmx_Node_get_all_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_all_balances_return : public ::vnx::Value { public: std::map, ::mmx::uint128> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x80800e710295b3c1ull; Node_get_all_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_all_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_all_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_all_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_all_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_balance.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_balance_HXX_ #define INCLUDE_mmx_Node_get_balance_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_balance : public ::vnx::Value { public: ::mmx::addr_t address; ::mmx::addr_t currency; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2e00172d0470479ull; Node_get_balance() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_balance& _value); friend std::istream& operator>>(std::istream& _in, Node_get_balance& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_balance::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("currency", 1); _visitor.accept(currency); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_balance_HXX_ ================================================ FILE: generated/include/mmx/Node_get_balance_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_balance_return_HXX_ #define INCLUDE_mmx_Node_get_balance_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_balance_return : public ::vnx::Value { public: ::mmx::uint128 _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe29d98f8f1ab3e21ull; Node_get_balance_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_balance_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_balance_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_balance_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_balance_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_balances_HXX_ #define INCLUDE_mmx_Node_get_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_balances : public ::vnx::Value { public: ::mmx::addr_t address; std::set<::mmx::addr_t> whitelist; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1c8af02c41e96460ull; Node_get_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_balances& _value); friend std::istream& operator>>(std::istream& _in, Node_get_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("whitelist", 1); _visitor.accept(whitelist); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_balances_HXX_ ================================================ FILE: generated/include/mmx/Node_get_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_balances_return_HXX_ #define INCLUDE_mmx_Node_get_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::uint128> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1e00f02ae6304cf0ull; Node_get_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_HXX_ #define INCLUDE_mmx_Node_get_block_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_block : public ::vnx::Value { public: ::mmx::hash_t hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xeb3fabe56dec161aull; Node_get_block() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_at.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_at_HXX_ #define INCLUDE_mmx_Node_get_block_at_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_block_at : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc69c9f876a00e48full; Node_get_block_at() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_at& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_at& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_at::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_at_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_at_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_at_return_HXX_ #define INCLUDE_mmx_Node_get_block_at_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_block_at_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6e3c22a7391c5491ull; Node_get_block_at_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_at_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_at_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_at_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_at_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_hash.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_hash_HXX_ #define INCLUDE_mmx_Node_get_block_hash_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_block_hash : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x43c5087066b73f38ull; Node_get_block_hash() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_hash& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_hash::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_hash_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_hash_ex.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_hash_ex_HXX_ #define INCLUDE_mmx_Node_get_block_hash_ex_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_block_hash_ex : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6024ae54abca18cbull; Node_get_block_hash_ex() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_ex& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_hash_ex& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_hash_ex::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_hash_ex_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_hash_ex_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_hash_ex_return_HXX_ #define INCLUDE_mmx_Node_get_block_hash_ex_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_block_hash_ex_return : public ::vnx::Value { public: vnx::optional> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8d82a7b11dfd7a4ull; Node_get_block_hash_ex_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_ex_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_hash_ex_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_hash_ex_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_hash_ex_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_hash_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_hash_return_HXX_ #define INCLUDE_mmx_Node_get_block_hash_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_block_hash_return : public ::vnx::Value { public: vnx::optional<::mmx::hash_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x47877c5597b978dfull; Node_get_block_hash_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_hash_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_hash_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_hash_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_block_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_block_return_HXX_ #define INCLUDE_mmx_Node_get_block_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_block_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6d9abdbf20c4b4d2ull; Node_get_block_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_block_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_block_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_block_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_block_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_HXX_ #define INCLUDE_mmx_Node_get_contract_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa28704c65a67a293ull; Node_get_contract() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_balances_HXX_ #define INCLUDE_mmx_Node_get_contract_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract_balances : public ::vnx::Value { public: ::mmx::addr_t address; std::set<::mmx::addr_t> whitelist; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xeb1e66155927b13aull; Node_get_contract_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract_balances& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("whitelist", 1); _visitor.accept(whitelist); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_balances_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_balances_return_HXX_ #define INCLUDE_mmx_Node_get_contract_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::balance_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4974c6093398e264ull; Node_get_contract_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract_for.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_for_HXX_ #define INCLUDE_mmx_Node_get_contract_for_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract_for : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6a953dcea83b9832ull; Node_get_contract_for() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract_for& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract_for& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract_for::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_for_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract_for_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_for_return_HXX_ #define INCLUDE_mmx_Node_get_contract_for_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract_for_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xde97319367a6d647ull; Node_get_contract_for_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract_for_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract_for_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract_for_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_for_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contract_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contract_return_HXX_ #define INCLUDE_mmx_Node_get_contract_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contract_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x314d0901de362f8cull; Node_get_contract_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contract_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contract_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contract_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contract_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_HXX_ #define INCLUDE_mmx_Node_get_contracts_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x49e218583c1f1c8aull; Node_get_contracts() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts_by.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_by_HXX_ #define INCLUDE_mmx_Node_get_contracts_by_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts_by : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; vnx::optional<::mmx::hash_t> type_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe7c397362a63f57cull; Node_get_contracts_by() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_by& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts_by& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts_by::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("type_hash", 1); _visitor.accept(type_hash); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_by_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts_by_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_by_return_HXX_ #define INCLUDE_mmx_Node_get_contracts_by_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts_by_return : public ::vnx::Value { public: std::vector<::mmx::addr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9ad1099f1adf2565ull; Node_get_contracts_by_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_by_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts_by_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts_by_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_by_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts_owned_by.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_owned_by_HXX_ #define INCLUDE_mmx_Node_get_contracts_owned_by_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts_owned_by : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; vnx::optional<::mmx::hash_t> type_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x63989a04fee2fba4ull; Node_get_contracts_owned_by() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_owned_by& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts_owned_by& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts_owned_by::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("type_hash", 1); _visitor.accept(type_hash); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_owned_by_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts_owned_by_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_owned_by_return_HXX_ #define INCLUDE_mmx_Node_get_contracts_owned_by_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts_owned_by_return : public ::vnx::Value { public: std::vector<::mmx::addr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3b9dbec85ee482bfull; Node_get_contracts_owned_by_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_owned_by_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts_owned_by_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts_owned_by_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_owned_by_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_contracts_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_contracts_return_HXX_ #define INCLUDE_mmx_Node_get_contracts_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_contracts_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x13d73d6d69c8af0bull; Node_get_contracts_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_contracts_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_contracts_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_contracts_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_exec_history.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_exec_history_HXX_ #define INCLUDE_mmx_Node_get_exec_history_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_exec_history : public ::vnx::Value { public: ::mmx::addr_t address; int32_t limit = 100; vnx::bool_t recent = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf17c2f67bedb9df6ull; Node_get_exec_history() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_exec_history& _value); friend std::istream& operator>>(std::istream& _in, Node_get_exec_history& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_exec_history::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("limit", 1); _visitor.accept(limit); _visitor.type_field("recent", 2); _visitor.accept(recent); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_exec_history_HXX_ ================================================ FILE: generated/include/mmx/Node_get_exec_history_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_exec_history_return_HXX_ #define INCLUDE_mmx_Node_get_exec_history_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_exec_history_return : public ::vnx::Value { public: std::vector<::mmx::exec_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x17079d265ede8785ull; Node_get_exec_history_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_exec_history_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_exec_history_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_exec_history_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_exec_history_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmed_block_summary.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmed_block_summary_HXX_ #define INCLUDE_mmx_Node_get_farmed_block_summary_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_farmed_block_summary : public ::vnx::Value { public: std::vector<::mmx::pubkey_t> farmer_keys; uint32_t since = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa6cda1247bd4f537ull; Node_get_farmed_block_summary() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_block_summary& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmed_block_summary& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmed_block_summary::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("farmer_keys", 0); _visitor.accept(farmer_keys); _visitor.type_field("since", 1); _visitor.accept(since); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmed_block_summary_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmed_block_summary_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmed_block_summary_return_HXX_ #define INCLUDE_mmx_Node_get_farmed_block_summary_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_farmed_block_summary_return : public ::vnx::Value { public: ::mmx::farmed_block_summary_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xef3dcd5d4d2a58e3ull; Node_get_farmed_block_summary_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_block_summary_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmed_block_summary_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmed_block_summary_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmed_block_summary_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmed_blocks.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmed_blocks_HXX_ #define INCLUDE_mmx_Node_get_farmed_blocks_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_farmed_blocks : public ::vnx::Value { public: std::vector<::mmx::pubkey_t> farmer_keys; vnx::bool_t full_blocks = 0; uint32_t since = 0; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfc412d06ff25542eull; Node_get_farmed_blocks() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_blocks& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmed_blocks& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmed_blocks::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("farmer_keys", 0); _visitor.accept(farmer_keys); _visitor.type_field("full_blocks", 1); _visitor.accept(full_blocks); _visitor.type_field("since", 2); _visitor.accept(since); _visitor.type_field("limit", 3); _visitor.accept(limit); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmed_blocks_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmed_blocks_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmed_blocks_return_HXX_ #define INCLUDE_mmx_Node_get_farmed_blocks_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_farmed_blocks_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe8697ffd381616baull; Node_get_farmed_blocks_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_blocks_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmed_blocks_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmed_blocks_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmed_blocks_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmer_ranking.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmer_ranking_HXX_ #define INCLUDE_mmx_Node_get_farmer_ranking_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_farmer_ranking : public ::vnx::Value { public: int32_t limit = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x548d571d6384bd43ull; Node_get_farmer_ranking() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmer_ranking& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmer_ranking& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmer_ranking::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("limit", 0); _visitor.accept(limit); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmer_ranking_HXX_ ================================================ FILE: generated/include/mmx/Node_get_farmer_ranking_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_farmer_ranking_return_HXX_ #define INCLUDE_mmx_Node_get_farmer_ranking_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_farmer_ranking_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb74e7f1a70a60ecdull; Node_get_farmer_ranking_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_farmer_ranking_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_farmer_ranking_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_farmer_ranking_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_farmer_ranking_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_genesis_hash.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_genesis_hash_HXX_ #define INCLUDE_mmx_Node_get_genesis_hash_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_genesis_hash : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xbfab786cb64c5a3ull; Node_get_genesis_hash() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_genesis_hash& _value); friend std::istream& operator>>(std::istream& _in, Node_get_genesis_hash& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_genesis_hash::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_genesis_hash_HXX_ ================================================ FILE: generated/include/mmx/Node_get_genesis_hash_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_genesis_hash_return_HXX_ #define INCLUDE_mmx_Node_get_genesis_hash_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_genesis_hash_return : public ::vnx::Value { public: ::mmx::hash_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5c5ea53e3163fd5ull; Node_get_genesis_hash_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_genesis_hash_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_genesis_hash_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_genesis_hash_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_genesis_hash_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_header.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_header_HXX_ #define INCLUDE_mmx_Node_get_header_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_header : public ::vnx::Value { public: ::mmx::hash_t hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf17a5d0c180db198ull; Node_get_header() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_header& _value); friend std::istream& operator>>(std::istream& _in, Node_get_header& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_header::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_header_HXX_ ================================================ FILE: generated/include/mmx/Node_get_header_at.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_header_at_HXX_ #define INCLUDE_mmx_Node_get_header_at_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_header_at : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x52658163d8767c79ull; Node_get_header_at() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_header_at& _value); friend std::istream& operator>>(std::istream& _in, Node_get_header_at& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_header_at::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_header_at_HXX_ ================================================ FILE: generated/include/mmx/Node_get_header_at_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_header_at_return_HXX_ #define INCLUDE_mmx_Node_get_header_at_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_header_at_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4efc6897885ee521ull; Node_get_header_at_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_header_at_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_header_at_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_header_at_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_header_at_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_header_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_header_return_HXX_ #define INCLUDE_mmx_Node_get_header_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_header_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xeffae31958103da7ull; Node_get_header_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_header_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_header_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_header_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_header_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_height.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_height_HXX_ #define INCLUDE_mmx_Node_get_height_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_height : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x55f0d4ef7a117716ull; Node_get_height() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_height& _value); friend std::istream& operator>>(std::istream& _in, Node_get_height& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_height::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_height_HXX_ ================================================ FILE: generated/include/mmx/Node_get_height_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_height_return_HXX_ #define INCLUDE_mmx_Node_get_height_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_height_return : public ::vnx::Value { public: uint32_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5fb0ff1e11add033ull; Node_get_height_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_height_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_height_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_height_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_height_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_history.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_history_HXX_ #define INCLUDE_mmx_Node_get_history_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_history : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; ::mmx::query_filter_t filter; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b3db05c6e91011dull; Node_get_history() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_history& _value); friend std::istream& operator>>(std::istream& _in, Node_get_history& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_history::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("filter", 1); _visitor.accept(filter); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_history_HXX_ ================================================ FILE: generated/include/mmx/Node_get_history_memo.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_history_memo_HXX_ #define INCLUDE_mmx_Node_get_history_memo_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_history_memo : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; std::string memo; ::mmx::query_filter_t filter; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x693c0c791039287cull; Node_get_history_memo() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_history_memo& _value); friend std::istream& operator>>(std::istream& _in, Node_get_history_memo& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_history_memo::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("memo", 1); _visitor.accept(memo); _visitor.type_field("filter", 2); _visitor.accept(filter); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_history_memo_HXX_ ================================================ FILE: generated/include/mmx/Node_get_history_memo_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_history_memo_return_HXX_ #define INCLUDE_mmx_Node_get_history_memo_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_history_memo_return : public ::vnx::Value { public: std::vector<::mmx::tx_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3bba2b40c2e82885ull; Node_get_history_memo_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_history_memo_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_history_memo_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_history_memo_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_history_memo_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_history_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_history_return_HXX_ #define INCLUDE_mmx_Node_get_history_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_history_return : public ::vnx::Value { public: std::vector<::mmx::tx_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa925b7aa92603121ull; Node_get_history_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_history_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_history_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_history_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_history_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_network_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_network_info_HXX_ #define INCLUDE_mmx_Node_get_network_info_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_network_info : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x79cedc8662eeb2e4ull; Node_get_network_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_network_info& _value); friend std::istream& operator>>(std::istream& _in, Node_get_network_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_network_info::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_network_info_HXX_ ================================================ FILE: generated/include/mmx/Node_get_network_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_network_info_return_HXX_ #define INCLUDE_mmx_Node_get_network_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_network_info_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x28541acc5945ae0eull; Node_get_network_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_network_info_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_network_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_network_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_network_info_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offer.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offer_HXX_ #define INCLUDE_mmx_Node_get_offer_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_offer : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd3e336e279686563ull; Node_get_offer() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offer& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offer& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offer::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offer_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offer_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offer_return_HXX_ #define INCLUDE_mmx_Node_get_offer_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_offer_return : public ::vnx::Value { public: ::mmx::offer_data_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa92bb7b910e3424full; Node_get_offer_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offer_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offer_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offer_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offer_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offers_HXX_ #define INCLUDE_mmx_Node_get_offers_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_offers : public ::vnx::Value { public: uint32_t since = 0; vnx::bool_t state = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x62e5e37dd72d3175ull; Node_get_offers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offers& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offers::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("since", 0); _visitor.accept(since); _visitor.type_field("state", 1); _visitor.accept(state); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offers_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offers_by.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offers_by_HXX_ #define INCLUDE_mmx_Node_get_offers_by_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_offers_by : public ::vnx::Value { public: std::vector<::mmx::addr_t> owners; vnx::bool_t state = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf83c55f59e407411ull; Node_get_offers_by() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offers_by& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offers_by& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offers_by::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("owners", 0); _visitor.accept(owners); _visitor.type_field("state", 1); _visitor.accept(state); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offers_by_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offers_by_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offers_by_return_HXX_ #define INCLUDE_mmx_Node_get_offers_by_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_offers_by_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x59efe1350028d6f4ull; Node_get_offers_by_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offers_by_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offers_by_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offers_by_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offers_by_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_offers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_offers_return_HXX_ #define INCLUDE_mmx_Node_get_offers_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_offers_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf93f5d6546a50db1ull; Node_get_offers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_offers_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_offers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_offers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_offers_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_params.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_params_HXX_ #define INCLUDE_mmx_Node_get_params_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_params : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6384b34900c2e465ull; Node_get_params() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_params& _value); friend std::istream& operator>>(std::istream& _in, Node_get_params& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_params::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_params_HXX_ ================================================ FILE: generated/include/mmx/Node_get_params_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_params_return_HXX_ #define INCLUDE_mmx_Node_get_params_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_params_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd0a614f2ed037180ull; Node_get_params_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_params_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_params_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_params_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_params_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_plot_nft_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_plot_nft_info_HXX_ #define INCLUDE_mmx_Node_get_plot_nft_info_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_plot_nft_info : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x23efbfd355a3741full; Node_get_plot_nft_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_info& _value); friend std::istream& operator>>(std::istream& _in, Node_get_plot_nft_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_plot_nft_info::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_plot_nft_info_HXX_ ================================================ FILE: generated/include/mmx/Node_get_plot_nft_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_plot_nft_info_return_HXX_ #define INCLUDE_mmx_Node_get_plot_nft_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_plot_nft_info_return : public ::vnx::Value { public: vnx::optional<::mmx::plot_nft_info_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4d3661c719d8496bull; Node_get_plot_nft_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_info_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_plot_nft_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_plot_nft_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_plot_nft_info_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_plot_nft_target.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_plot_nft_target_HXX_ #define INCLUDE_mmx_Node_get_plot_nft_target_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_plot_nft_target : public ::vnx::Value { public: ::mmx::addr_t address; vnx::optional<::mmx::addr_t> farmer_addr; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x14dfd6e2b1f3282eull; Node_get_plot_nft_target() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_target& _value); friend std::istream& operator>>(std::istream& _in, Node_get_plot_nft_target& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_plot_nft_target::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("farmer_addr", 1); _visitor.accept(farmer_addr); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_plot_nft_target_HXX_ ================================================ FILE: generated/include/mmx/Node_get_plot_nft_target_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_plot_nft_target_return_HXX_ #define INCLUDE_mmx_Node_get_plot_nft_target_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_plot_nft_target_return : public ::vnx::Value { public: ::mmx::addr_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6d6444fd1b89732ull; Node_get_plot_nft_target_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_target_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_plot_nft_target_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_plot_nft_target_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_plot_nft_target_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_recent_offers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_recent_offers_HXX_ #define INCLUDE_mmx_Node_get_recent_offers_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_recent_offers : public ::vnx::Value { public: int32_t limit = 100; vnx::bool_t state = true; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfcd729efd0504fdeull; Node_get_recent_offers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers& _value); friend std::istream& operator>>(std::istream& _in, Node_get_recent_offers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_recent_offers::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("limit", 0); _visitor.accept(limit); _visitor.type_field("state", 1); _visitor.accept(state); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_recent_offers_HXX_ ================================================ FILE: generated/include/mmx/Node_get_recent_offers_for.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_recent_offers_for_HXX_ #define INCLUDE_mmx_Node_get_recent_offers_for_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_recent_offers_for : public ::vnx::Value { public: vnx::optional<::mmx::addr_t> bid; vnx::optional<::mmx::addr_t> ask; ::mmx::uint128 min_bid; int32_t limit = 100; vnx::bool_t state = true; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd89f845556eb17a0ull; Node_get_recent_offers_for() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_for& _value); friend std::istream& operator>>(std::istream& _in, Node_get_recent_offers_for& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_recent_offers_for::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("bid", 0); _visitor.accept(bid); _visitor.type_field("ask", 1); _visitor.accept(ask); _visitor.type_field("min_bid", 2); _visitor.accept(min_bid); _visitor.type_field("limit", 3); _visitor.accept(limit); _visitor.type_field("state", 4); _visitor.accept(state); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_recent_offers_for_HXX_ ================================================ FILE: generated/include/mmx/Node_get_recent_offers_for_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_recent_offers_for_return_HXX_ #define INCLUDE_mmx_Node_get_recent_offers_for_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_recent_offers_for_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8fbaa054b954ea7bull; Node_get_recent_offers_for_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_for_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_recent_offers_for_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_recent_offers_for_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_recent_offers_for_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_recent_offers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_recent_offers_return_HXX_ #define INCLUDE_mmx_Node_get_recent_offers_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_recent_offers_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x15933813d284d584ull; Node_get_recent_offers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_recent_offers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_recent_offers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_recent_offers_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_equivalent_liquidity.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_equivalent_liquidity_HXX_ #define INCLUDE_mmx_Node_get_swap_equivalent_liquidity_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_equivalent_liquidity : public ::vnx::Value { public: ::mmx::addr_t address; ::mmx::addr_t user; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc43a3083725aa480ull; Node_get_swap_equivalent_liquidity() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_equivalent_liquidity& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_equivalent_liquidity& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_equivalent_liquidity::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("user", 1); _visitor.accept(user); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_equivalent_liquidity_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_equivalent_liquidity_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_equivalent_liquidity_return_HXX_ #define INCLUDE_mmx_Node_get_swap_equivalent_liquidity_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_equivalent_liquidity_return : public ::vnx::Value { public: std::array<::mmx::uint128, 2> _ret_0 = {}; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8222183b679ab5f4ull; Node_get_swap_equivalent_liquidity_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_equivalent_liquidity_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_equivalent_liquidity_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_equivalent_liquidity_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_equivalent_liquidity_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_fees_earned.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_fees_earned_HXX_ #define INCLUDE_mmx_Node_get_swap_fees_earned_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_fees_earned : public ::vnx::Value { public: ::mmx::addr_t address; ::mmx::addr_t user; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1dae57fb82265b93ull; Node_get_swap_fees_earned() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_fees_earned& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_fees_earned& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_fees_earned::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("user", 1); _visitor.accept(user); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_fees_earned_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_fees_earned_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_fees_earned_return_HXX_ #define INCLUDE_mmx_Node_get_swap_fees_earned_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_fees_earned_return : public ::vnx::Value { public: std::array<::mmx::uint128, 2> _ret_0 = {}; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x57002afc89a8db98ull; Node_get_swap_fees_earned_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_fees_earned_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_fees_earned_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_fees_earned_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_fees_earned_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_history.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_history_HXX_ #define INCLUDE_mmx_Node_get_swap_history_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_history : public ::vnx::Value { public: ::mmx::addr_t address; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc16faaf15fcc9f36ull; Node_get_swap_history() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_history& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_history& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_history::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("limit", 1); _visitor.accept(limit); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_history_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_history_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_history_return_HXX_ #define INCLUDE_mmx_Node_get_swap_history_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_history_return : public ::vnx::Value { public: std::vector<::mmx::swap_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe5d18002a6793518ull; Node_get_swap_history_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_history_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_history_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_history_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_history_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_info_HXX_ #define INCLUDE_mmx_Node_get_swap_info_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_info : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x14f546a807fae18cull; Node_get_swap_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_info& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_info::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_info_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_info_return_HXX_ #define INCLUDE_mmx_Node_get_swap_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_info_return : public ::vnx::Value { public: ::mmx::swap_info_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x302116742171428ull; Node_get_swap_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_info_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_info_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_liquidity_by.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_liquidity_by_HXX_ #define INCLUDE_mmx_Node_get_swap_liquidity_by_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_liquidity_by : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x426cded100da751eull; Node_get_swap_liquidity_by() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_liquidity_by& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_liquidity_by& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_liquidity_by::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_liquidity_by_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_liquidity_by_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_liquidity_by_return_HXX_ #define INCLUDE_mmx_Node_get_swap_liquidity_by_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_liquidity_by_return : public ::vnx::Value { public: std::map<::mmx::addr_t, std::array, 2>> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8401973e1930a6c0ull; Node_get_swap_liquidity_by_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_liquidity_by_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_liquidity_by_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_liquidity_by_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_liquidity_by_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_trade_estimate.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_trade_estimate_HXX_ #define INCLUDE_mmx_Node_get_swap_trade_estimate_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_trade_estimate : public ::vnx::Value { public: ::mmx::addr_t address; uint32_t i = 0; ::mmx::uint128 amount; int32_t num_iter = 20; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1c3d2e0c3a431e9eull; Node_get_swap_trade_estimate() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_trade_estimate& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_trade_estimate& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_trade_estimate::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("i", 1); _visitor.accept(i); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("num_iter", 3); _visitor.accept(num_iter); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_trade_estimate_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_trade_estimate_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_trade_estimate_return_HXX_ #define INCLUDE_mmx_Node_get_swap_trade_estimate_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_trade_estimate_return : public ::vnx::Value { public: std::array<::mmx::uint128, 2> _ret_0 = {}; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdad9da7cd6d250a8ull; Node_get_swap_trade_estimate_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_trade_estimate_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_trade_estimate_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_trade_estimate_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_trade_estimate_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_user_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_user_info_HXX_ #define INCLUDE_mmx_Node_get_swap_user_info_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_user_info : public ::vnx::Value { public: ::mmx::addr_t address; ::mmx::addr_t user; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb92b8fb7df56ec0full; Node_get_swap_user_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_user_info& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_user_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_user_info::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("user", 1); _visitor.accept(user); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_user_info_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swap_user_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swap_user_info_return_HXX_ #define INCLUDE_mmx_Node_get_swap_user_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swap_user_info_return : public ::vnx::Value { public: ::mmx::swap_user_info_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x50fb0bab9551a420ull; Node_get_swap_user_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swap_user_info_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swap_user_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swap_user_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swap_user_info_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swaps.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swaps_HXX_ #define INCLUDE_mmx_Node_get_swaps_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swaps : public ::vnx::Value { public: uint32_t since = 0; vnx::optional<::mmx::addr_t> token; vnx::optional<::mmx::addr_t> currency; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x219bbb3e5dcd19eaull; Node_get_swaps() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swaps& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swaps& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swaps::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("since", 0); _visitor.accept(since); _visitor.type_field("token", 1); _visitor.accept(token); _visitor.type_field("currency", 2); _visitor.accept(currency); _visitor.type_field("limit", 3); _visitor.accept(limit); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swaps_HXX_ ================================================ FILE: generated/include/mmx/Node_get_swaps_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_swaps_return_HXX_ #define INCLUDE_mmx_Node_get_swaps_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_swaps_return : public ::vnx::Value { public: std::vector<::mmx::swap_info_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6c94172788fc0d28ull; Node_get_swaps_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_swaps_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_swaps_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_swaps_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_swaps_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_synced_height.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_synced_height_HXX_ #define INCLUDE_mmx_Node_get_synced_height_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_synced_height : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc4fb44ec3d1a8bb7ull; Node_get_synced_height() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_synced_height& _value); friend std::istream& operator>>(std::istream& _in, Node_get_synced_height& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_synced_height::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_synced_height_HXX_ ================================================ FILE: generated/include/mmx/Node_get_synced_height_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_synced_height_return_HXX_ #define INCLUDE_mmx_Node_get_synced_height_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_synced_height_return : public ::vnx::Value { public: vnx::optional _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd466ce92d1bbe9dbull; Node_get_synced_height_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_synced_height_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_synced_height_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_synced_height_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_synced_height_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_synced_vdf_height.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_synced_vdf_height_HXX_ #define INCLUDE_mmx_Node_get_synced_vdf_height_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_synced_vdf_height : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3c9ce92abd3b42c6ull; Node_get_synced_vdf_height() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_synced_vdf_height& _value); friend std::istream& operator>>(std::istream& _in, Node_get_synced_vdf_height& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_synced_vdf_height::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_synced_vdf_height_HXX_ ================================================ FILE: generated/include/mmx/Node_get_synced_vdf_height_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_synced_vdf_height_return_HXX_ #define INCLUDE_mmx_Node_get_synced_vdf_height_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_synced_vdf_height_return : public ::vnx::Value { public: vnx::optional _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1122764a35c86b4ull; Node_get_synced_vdf_height_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_synced_vdf_height_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_synced_vdf_height_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_synced_vdf_height_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_synced_vdf_height_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_balance.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_balance_HXX_ #define INCLUDE_mmx_Node_get_total_balance_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_balance : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; ::mmx::addr_t currency; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x91e9019d224db4b0ull; Node_get_total_balance() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_balance& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_balance& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_balance::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("currency", 1); _visitor.accept(currency); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_balance_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_balance_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_balance_return_HXX_ #define INCLUDE_mmx_Node_get_total_balance_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_balance_return : public ::vnx::Value { public: ::mmx::uint128 _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3336380a894f52a8ull; Node_get_total_balance_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_balance_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_balance_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_balance_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_balance_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_balances_HXX_ #define INCLUDE_mmx_Node_get_total_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_balances : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; std::set<::mmx::addr_t> whitelist; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf54c4ec46ee6053aull; Node_get_total_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_balances& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.type_field("whitelist", 1); _visitor.accept(whitelist); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_balances_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_balances_return_HXX_ #define INCLUDE_mmx_Node_get_total_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::uint128> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9332c7a83f7644d7ull; Node_get_total_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_supply.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_supply_HXX_ #define INCLUDE_mmx_Node_get_total_supply_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_supply : public ::vnx::Value { public: ::mmx::addr_t currency; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x17d971db6900bd9dull; Node_get_total_supply() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_supply& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_supply& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_supply::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("currency", 0); _visitor.accept(currency); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_supply_HXX_ ================================================ FILE: generated/include/mmx/Node_get_total_supply_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_total_supply_return_HXX_ #define INCLUDE_mmx_Node_get_total_supply_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_total_supply_return : public ::vnx::Value { public: ::mmx::uint128 _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe69f15a0766eaf27ull; Node_get_total_supply_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_total_supply_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_total_supply_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_total_supply_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_total_supply_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_trade_history.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_trade_history_HXX_ #define INCLUDE_mmx_Node_get_trade_history_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_trade_history : public ::vnx::Value { public: int32_t limit = 100; uint32_t since = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x62736b035e3995cdull; Node_get_trade_history() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history& _value); friend std::istream& operator>>(std::istream& _in, Node_get_trade_history& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_trade_history::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("limit", 0); _visitor.accept(limit); _visitor.type_field("since", 1); _visitor.accept(since); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_trade_history_HXX_ ================================================ FILE: generated/include/mmx/Node_get_trade_history_for.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_trade_history_for_HXX_ #define INCLUDE_mmx_Node_get_trade_history_for_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_trade_history_for : public ::vnx::Value { public: vnx::optional<::mmx::addr_t> bid; vnx::optional<::mmx::addr_t> ask; int32_t limit = 100; uint32_t since = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd55cda633e3dd5b8ull; Node_get_trade_history_for() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_for& _value); friend std::istream& operator>>(std::istream& _in, Node_get_trade_history_for& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_trade_history_for::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("bid", 0); _visitor.accept(bid); _visitor.type_field("ask", 1); _visitor.accept(ask); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.type_field("since", 3); _visitor.accept(since); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_trade_history_for_HXX_ ================================================ FILE: generated/include/mmx/Node_get_trade_history_for_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_trade_history_for_return_HXX_ #define INCLUDE_mmx_Node_get_trade_history_for_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_trade_history_for_return : public ::vnx::Value { public: std::vector<::mmx::trade_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd61154789cdb246bull; Node_get_trade_history_for_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_for_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_trade_history_for_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_trade_history_for_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_trade_history_for_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_trade_history_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_trade_history_return_HXX_ #define INCLUDE_mmx_Node_get_trade_history_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_trade_history_return : public ::vnx::Value { public: std::vector<::mmx::trade_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4d3692b594dd7f9eull; Node_get_trade_history_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_trade_history_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_trade_history_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_trade_history_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_transaction.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_transaction_HXX_ #define INCLUDE_mmx_Node_get_transaction_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_transaction : public ::vnx::Value { public: ::mmx::hash_t id; vnx::bool_t pending = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9c76ca142292750full; Node_get_transaction() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_transaction& _value); friend std::istream& operator>>(std::istream& _in, Node_get_transaction& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_transaction::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("pending", 1); _visitor.accept(pending); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_transaction_HXX_ ================================================ FILE: generated/include/mmx/Node_get_transaction_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_transaction_return_HXX_ #define INCLUDE_mmx_Node_get_transaction_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_transaction_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3848f078ff4024dull; Node_get_transaction_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_transaction_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_transaction_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_transaction_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_transaction_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_transactions.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_transactions_HXX_ #define INCLUDE_mmx_Node_get_transactions_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_transactions : public ::vnx::Value { public: std::vector<::mmx::hash_t> ids; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x715a5bb668426203ull; Node_get_transactions() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_transactions& _value); friend std::istream& operator>>(std::istream& _in, Node_get_transactions& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_transactions::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("ids", 0); _visitor.accept(ids); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_transactions_HXX_ ================================================ FILE: generated/include/mmx/Node_get_transactions_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_transactions_return_HXX_ #define INCLUDE_mmx_Node_get_transactions_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_transactions_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd11c40a507abaaaull; Node_get_transactions_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_transactions_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_transactions_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_transactions_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_transactions_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_height.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_height_HXX_ #define INCLUDE_mmx_Node_get_tx_height_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_height : public ::vnx::Value { public: ::mmx::hash_t id; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf6f917fad9361e3aull; Node_get_tx_height() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_height& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_height& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_height::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_height_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_height_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_height_return_HXX_ #define INCLUDE_mmx_Node_get_tx_height_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_tx_height_return : public ::vnx::Value { public: vnx::optional _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xda69a0d06f4b5c3eull; Node_get_tx_height_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_height_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_height_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_height_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_height_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids : public ::vnx::Value { public: uint32_t limit = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe268e5bf2a7f22d6ull; Node_get_tx_ids() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("limit", 0); _visitor.accept(limit); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids_at.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_at_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_at_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids_at : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x904c686b59c101c3ull; Node_get_tx_ids_at() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_at& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids_at& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids_at::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_at_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids_at_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_at_return_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_at_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids_at_return : public ::vnx::Value { public: std::vector<::mmx::hash_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x945565d9cbfadc31ull; Node_get_tx_ids_at_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_at_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids_at_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids_at_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_at_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_return_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids_return : public ::vnx::Value { public: std::vector<::mmx::hash_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xba3ffcf776e64920ull; Node_get_tx_ids_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids_since.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_since_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_since_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids_since : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x640af36b555e1606ull; Node_get_tx_ids_since() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_since& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids_since& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids_since::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_since_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_ids_since_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_ids_since_return_HXX_ #define INCLUDE_mmx_Node_get_tx_ids_since_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_ids_since_return : public ::vnx::Value { public: std::vector<::mmx::hash_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe5c1511a48d2d288ull; Node_get_tx_ids_since_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_since_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_ids_since_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_ids_since_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_ids_since_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_info_HXX_ #define INCLUDE_mmx_Node_get_tx_info_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_info : public ::vnx::Value { public: ::mmx::hash_t id; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb5409a3aaa19d1d2ull; Node_get_tx_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_info::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_info_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_info_for.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_info_for_HXX_ #define INCLUDE_mmx_Node_get_tx_info_for_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_info_for : public ::vnx::Value { public: std::shared_ptr tx; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xba1c6e6eccfe9369ull; Node_get_tx_info_for() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_for& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_info_for& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_info_for::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("tx", 0); _visitor.accept(tx); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_info_for_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_info_for_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_info_for_return_HXX_ #define INCLUDE_mmx_Node_get_tx_info_for_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_info_for_return : public ::vnx::Value { public: vnx::optional<::mmx::tx_info_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfd527dc84681a04ull; Node_get_tx_info_for_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_for_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_info_for_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_info_for_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_info_for_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_tx_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_tx_info_return_HXX_ #define INCLUDE_mmx_Node_get_tx_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_tx_info_return : public ::vnx::Value { public: vnx::optional<::mmx::tx_info_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3668f41cc643227full; Node_get_tx_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_tx_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_tx_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_tx_info_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_vdf_height.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_vdf_height_HXX_ #define INCLUDE_mmx_Node_get_vdf_height_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_vdf_height : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x33db3aa655c4e5feull; Node_get_vdf_height() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_height& _value); friend std::istream& operator>>(std::istream& _in, Node_get_vdf_height& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_vdf_height::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_vdf_height_HXX_ ================================================ FILE: generated/include/mmx/Node_get_vdf_height_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_vdf_height_return_HXX_ #define INCLUDE_mmx_Node_get_vdf_height_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_vdf_height_return : public ::vnx::Value { public: uint32_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5f83cae2903e53bfull; Node_get_vdf_height_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_height_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_vdf_height_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_vdf_height_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_vdf_height_return_HXX_ ================================================ FILE: generated/include/mmx/Node_get_vdf_peak.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_vdf_peak_HXX_ #define INCLUDE_mmx_Node_get_vdf_peak_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_get_vdf_peak : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf3449b43830283ddull; Node_get_vdf_peak() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_peak& _value); friend std::istream& operator>>(std::istream& _in, Node_get_vdf_peak& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_vdf_peak::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_vdf_peak_HXX_ ================================================ FILE: generated/include/mmx/Node_get_vdf_peak_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_get_vdf_peak_return_HXX_ #define INCLUDE_mmx_Node_get_vdf_peak_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_get_vdf_peak_return : public ::vnx::Value { public: ::mmx::hash_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x837f2b6433a274a1ull; Node_get_vdf_peak_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_peak_return& _value); friend std::istream& operator>>(std::istream& _in, Node_get_vdf_peak_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_get_vdf_peak_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_get_vdf_peak_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_HXX_ #define INCLUDE_mmx_Node_read_storage_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage : public ::vnx::Value { public: ::mmx::addr_t contract; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd74cd2b291cb9cd6ull; Node_read_storage() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("height", 1); _visitor.accept(height); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_array.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_array_HXX_ #define INCLUDE_mmx_Node_read_storage_array_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_array : public ::vnx::Value { public: ::mmx::addr_t contract; uint64_t address = 0; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe5826950ca0a442bull; Node_read_storage_array() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_array& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_array& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_array::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("height", 2); _visitor.accept(height); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_array_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_array_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_array_return_HXX_ #define INCLUDE_mmx_Node_read_storage_array_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_array_return : public ::vnx::Value { public: std::vector<::mmx::vm::varptr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xba7fed069216454dull; Node_read_storage_array_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_array_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_array_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_array_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_array_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_addr.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_addr_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_addr_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_addr : public ::vnx::Value { public: ::mmx::addr_t contract; std::string name; ::mmx::addr_t key; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xffbf8c4478bb5ab5ull; Node_read_storage_entry_addr() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_addr& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_addr& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_addr::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("key", 2); _visitor.accept(key); _visitor.type_field("height", 3); _visitor.accept(height); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_addr_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_addr_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_addr_return_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_addr_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_addr_return : public ::vnx::Value { public: std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xacd2f58f1ca8df54ull; Node_read_storage_entry_addr_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_addr_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_addr_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_addr_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_addr_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_string.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_string_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_string_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_string : public ::vnx::Value { public: ::mmx::addr_t contract; std::string name; std::string key; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe5b52723a3714e9full; Node_read_storage_entry_string() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_string& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_string& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_string::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("key", 2); _visitor.accept(key); _visitor.type_field("height", 3); _visitor.accept(height); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_string_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_string_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_string_return_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_string_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_string_return : public ::vnx::Value { public: std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x56c6103ea03d7ceaull; Node_read_storage_entry_string_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_string_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_string_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_string_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_string_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_var.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_var_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_var_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_var : public ::vnx::Value { public: ::mmx::addr_t contract; uint64_t address = 0; uint64_t key = 0; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb0ebcc688396e6dbull; Node_read_storage_entry_var() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_var& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_var& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_var::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("key", 2); _visitor.accept(key); _visitor.type_field("height", 3); _visitor.accept(height); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_var_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_entry_var_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_entry_var_return_HXX_ #define INCLUDE_mmx_Node_read_storage_entry_var_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_entry_var_return : public ::vnx::Value { public: ::mmx::vm::varptr_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x773a90b50f714a11ull; Node_read_storage_entry_var_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_var_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_entry_var_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_entry_var_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_entry_var_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_field.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_field_HXX_ #define INCLUDE_mmx_Node_read_storage_field_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_field : public ::vnx::Value { public: ::mmx::addr_t contract; std::string name; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc9a10c9f7f2cef16ull; Node_read_storage_field() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_field& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_field& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_field::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("height", 2); _visitor.accept(height); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_field_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_field_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_field_return_HXX_ #define INCLUDE_mmx_Node_read_storage_field_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_field_return : public ::vnx::Value { public: std::pair<::mmx::vm::varptr_t, uint64_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf817bcace12b9ef3ull; Node_read_storage_field_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_field_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_field_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_field_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_field_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_map.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_map_HXX_ #define INCLUDE_mmx_Node_read_storage_map_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_map : public ::vnx::Value { public: ::mmx::addr_t contract; uint64_t address = 0; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1cc0cc12bc2c1b4eull; Node_read_storage_map() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_map& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_map& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_map::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("height", 2); _visitor.accept(height); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_map_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_map_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_map_return_HXX_ #define INCLUDE_mmx_Node_read_storage_map_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_map_return : public ::vnx::Value { public: std::map<::mmx::vm::varptr_t, ::mmx::vm::varptr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1d56300164b3e79ull; Node_read_storage_map_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_map_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_map_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_map_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_map_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_object.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_object_HXX_ #define INCLUDE_mmx_Node_read_storage_object_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_object : public ::vnx::Value { public: ::mmx::addr_t contract; uint64_t address = 0; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5930cf36eeb662fbull; Node_read_storage_object() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_object& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_object& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_object::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("height", 2); _visitor.accept(height); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_object_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_object_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_object_return_HXX_ #define INCLUDE_mmx_Node_read_storage_object_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_object_return : public ::vnx::Value { public: std::map _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x48c9a69123ef41afull; Node_read_storage_object_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_object_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_object_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_object_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_object_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_return_HXX_ #define INCLUDE_mmx_Node_read_storage_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_return : public ::vnx::Value { public: std::map _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xab73866ba23ed19aull; Node_read_storage_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_return_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_var.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_var_HXX_ #define INCLUDE_mmx_Node_read_storage_var_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_var : public ::vnx::Value { public: ::mmx::addr_t contract; uint64_t address = 0; uint32_t height = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x16d0361bcb359c2full; Node_read_storage_var() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_var& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_var& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_var::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("height", 2); _visitor.accept(height); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_var_HXX_ ================================================ FILE: generated/include/mmx/Node_read_storage_var_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_read_storage_var_return_HXX_ #define INCLUDE_mmx_Node_read_storage_var_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_read_storage_var_return : public ::vnx::Value { public: ::mmx::vm::varptr_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xaaa6685b20943467ull; Node_read_storage_var_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_read_storage_var_return& _value); friend std::istream& operator>>(std::istream& _in, Node_read_storage_var_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_read_storage_var_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_read_storage_var_return_HXX_ ================================================ FILE: generated/include/mmx/Node_revert_sync.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_revert_sync_HXX_ #define INCLUDE_mmx_Node_revert_sync_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_revert_sync : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8c1cc38a7a8a6c1dull; Node_revert_sync() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_revert_sync& _value); friend std::istream& operator>>(std::istream& _in, Node_revert_sync& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_revert_sync::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_revert_sync_HXX_ ================================================ FILE: generated/include/mmx/Node_revert_sync_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_revert_sync_return_HXX_ #define INCLUDE_mmx_Node_revert_sync_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_revert_sync_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3962a4b86b203e0aull; Node_revert_sync_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_revert_sync_return& _value); friend std::istream& operator>>(std::istream& _in, Node_revert_sync_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_revert_sync_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_revert_sync_return_HXX_ ================================================ FILE: generated/include/mmx/Node_start_sync.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_start_sync_HXX_ #define INCLUDE_mmx_Node_start_sync_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_start_sync : public ::vnx::Value { public: vnx::bool_t force = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6c5be8aeb25ef3c8ull; Node_start_sync() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_start_sync& _value); friend std::istream& operator>>(std::istream& _in, Node_start_sync& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_start_sync::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("force", 0); _visitor.accept(force); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_start_sync_HXX_ ================================================ FILE: generated/include/mmx/Node_start_sync_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_start_sync_return_HXX_ #define INCLUDE_mmx_Node_start_sync_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Node_start_sync_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe75b8e6a62d7e744ull; Node_start_sync_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_start_sync_return& _value); friend std::istream& operator>>(std::istream& _in, Node_start_sync_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_start_sync_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_start_sync_return_HXX_ ================================================ FILE: generated/include/mmx/Node_validate.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_validate_HXX_ #define INCLUDE_mmx_Node_validate_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_validate : public ::vnx::Value { public: std::shared_ptr tx; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x95dbbd65f36b618ull; Node_validate() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_validate& _value); friend std::istream& operator>>(std::istream& _in, Node_validate& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_validate::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("tx", 0); _visitor.accept(tx); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_validate_HXX_ ================================================ FILE: generated/include/mmx/Node_validate_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_validate_return_HXX_ #define INCLUDE_mmx_Node_validate_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_validate_return : public ::vnx::Value { public: ::mmx::exec_result_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe3c465d0fc0c4a4cull; Node_validate_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_validate_return& _value); friend std::istream& operator>>(std::istream& _in, Node_validate_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_validate_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_validate_return_HXX_ ================================================ FILE: generated/include/mmx/Node_verify_partial.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_verify_partial_HXX_ #define INCLUDE_mmx_Node_verify_partial_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Node_verify_partial : public ::vnx::Value { public: std::shared_ptr partial; vnx::optional<::mmx::addr_t> pool_target; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xeb15396685387f88ull; Node_verify_partial() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_verify_partial& _value); friend std::istream& operator>>(std::istream& _in, Node_verify_partial& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_verify_partial::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("partial", 0); _visitor.accept(partial); _visitor.type_field("pool_target", 1); _visitor.accept(pool_target); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_verify_partial_HXX_ ================================================ FILE: generated/include/mmx/Node_verify_partial_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_verify_partial_return_HXX_ #define INCLUDE_mmx_Node_verify_partial_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_verify_partial_return : public ::vnx::Value { public: std::tuple<::mmx::pooling_error_e, std::string> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb64fb769c6ffcf36ull; Node_verify_partial_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_verify_partial_return& _value); friend std::istream& operator>>(std::istream& _in, Node_verify_partial_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_verify_partial_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_verify_partial_return_HXX_ ================================================ FILE: generated/include/mmx/Node_verify_plot_nft_target.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_verify_plot_nft_target_HXX_ #define INCLUDE_mmx_Node_verify_plot_nft_target_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_verify_plot_nft_target : public ::vnx::Value { public: ::mmx::addr_t address; ::mmx::addr_t pool_target; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf3ac786edcae50e1ull; Node_verify_plot_nft_target() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_verify_plot_nft_target& _value); friend std::istream& operator>>(std::istream& _in, Node_verify_plot_nft_target& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_verify_plot_nft_target::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("pool_target", 1); _visitor.accept(pool_target); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_verify_plot_nft_target_HXX_ ================================================ FILE: generated/include/mmx/Node_verify_plot_nft_target_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Node_verify_plot_nft_target_return_HXX_ #define INCLUDE_mmx_Node_verify_plot_nft_target_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Node_verify_plot_nft_target_return : public ::vnx::Value { public: std::tuple<::mmx::pooling_error_e, std::string> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x82f0f6ed43a0c4bull; Node_verify_plot_nft_target_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Node_verify_plot_nft_target_return& _value); friend std::istream& operator>>(std::istream& _in, Node_verify_plot_nft_target_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Node_verify_plot_nft_target_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Node_verify_plot_nft_target_return_HXX_ ================================================ FILE: generated/include/mmx/Operation.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Operation_HXX_ #define INCLUDE_mmx_Operation_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Operation : public ::vnx::Value { public: static const uint16_t NO_SOLUTION = -1; uint32_t version = 0; ::mmx::addr_t address; uint16_t solution = -1; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfd69dd82e906e619ull; Operation() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Operation& _value); friend std::istream& operator>>(std::istream& _in, Operation& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Operation::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("solution", 2); _visitor.accept(solution); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Operation_HXX_ ================================================ FILE: generated/include/mmx/Partial.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Partial_HXX_ #define INCLUDE_mmx_Partial_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT Partial : public ::vnx::Value { public: uint32_t vdf_height = 0; ::mmx::hash_t hash; ::mmx::addr_t contract; ::mmx::addr_t account; std::string pool_url; std::string harvester; uint32_t lookup_time_ms = 0; std::shared_ptr proof; vnx::optional<::mmx::signature_t> farmer_sig; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2c849b13a7efd71aull; Partial() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual ::mmx::hash_t calc_hash() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Partial& _value); friend std::istream& operator>>(std::istream& _in, Partial& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Partial::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("vdf_height", 0); _visitor.accept(vdf_height); _visitor.type_field("hash", 1); _visitor.accept(hash); _visitor.type_field("contract", 2); _visitor.accept(contract); _visitor.type_field("account", 3); _visitor.accept(account); _visitor.type_field("pool_url", 4); _visitor.accept(pool_url); _visitor.type_field("harvester", 5); _visitor.accept(harvester); _visitor.type_field("lookup_time_ms", 6); _visitor.accept(lookup_time_ms); _visitor.type_field("proof", 7); _visitor.accept(proof); _visitor.type_field("farmer_sig", 8); _visitor.accept(farmer_sig); _visitor.template type_end(9); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Partial_HXX_ ================================================ FILE: generated/include/mmx/PeerInfo.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_PeerInfo_HXX_ #define INCLUDE_mmx_PeerInfo_HXX_ #include #include #include namespace mmx { class MMX_EXPORT PeerInfo : public ::vnx::Value { public: std::vector<::mmx::peer_info_t> peers; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf7a37f624c94a121ull; PeerInfo() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const PeerInfo& _value); friend std::istream& operator>>(std::istream& _in, PeerInfo& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void PeerInfo::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("peers", 0); _visitor.accept(peers); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_PeerInfo_HXX_ ================================================ FILE: generated/include/mmx/PlotHeader.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_PlotHeader_HXX_ #define INCLUDE_mmx_PlotHeader_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT PlotHeader : public ::vnx::Value { public: int32_t version = 0; int32_t ksize = 0; int32_t xbits = 0; vnx::bool_t has_meta = 0; ::mmx::hash_t seed; ::mmx::hash_t plot_id; ::mmx::pubkey_t farmer_key; vnx::optional<::mmx::addr_t> contract; uint64_t plot_size = 0; int32_t park_size_x = 0; int32_t park_size_y = 0; int32_t park_size_pd = 0; int32_t park_size_meta = 0; int32_t park_bytes_x = 0; int32_t park_bytes_y = 0; int32_t park_bytes_pd = 0; int32_t park_bytes_meta = 0; int32_t entry_bits_x = 0; uint64_t num_entries_y = 0; uint64_t table_offset_x = -1; uint64_t table_offset_y = -1; uint64_t table_offset_meta = -1; std::vector table_offset_pd; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x299c5790983c47b6ull; PlotHeader() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const PlotHeader& _value); friend std::istream& operator>>(std::istream& _in, PlotHeader& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void PlotHeader::accept_generic(T& _visitor) const { _visitor.template type_begin(23); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("ksize", 1); _visitor.accept(ksize); _visitor.type_field("xbits", 2); _visitor.accept(xbits); _visitor.type_field("has_meta", 3); _visitor.accept(has_meta); _visitor.type_field("seed", 4); _visitor.accept(seed); _visitor.type_field("plot_id", 5); _visitor.accept(plot_id); _visitor.type_field("farmer_key", 6); _visitor.accept(farmer_key); _visitor.type_field("contract", 7); _visitor.accept(contract); _visitor.type_field("plot_size", 8); _visitor.accept(plot_size); _visitor.type_field("park_size_x", 9); _visitor.accept(park_size_x); _visitor.type_field("park_size_y", 10); _visitor.accept(park_size_y); _visitor.type_field("park_size_pd", 11); _visitor.accept(park_size_pd); _visitor.type_field("park_size_meta", 12); _visitor.accept(park_size_meta); _visitor.type_field("park_bytes_x", 13); _visitor.accept(park_bytes_x); _visitor.type_field("park_bytes_y", 14); _visitor.accept(park_bytes_y); _visitor.type_field("park_bytes_pd", 15); _visitor.accept(park_bytes_pd); _visitor.type_field("park_bytes_meta", 16); _visitor.accept(park_bytes_meta); _visitor.type_field("entry_bits_x", 17); _visitor.accept(entry_bits_x); _visitor.type_field("num_entries_y", 18); _visitor.accept(num_entries_y); _visitor.type_field("table_offset_x", 19); _visitor.accept(table_offset_x); _visitor.type_field("table_offset_y", 20); _visitor.accept(table_offset_y); _visitor.type_field("table_offset_meta", 21); _visitor.accept(table_offset_meta); _visitor.type_field("table_offset_pd", 22); _visitor.accept(table_offset_pd); _visitor.template type_end(23); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_PlotHeader_HXX_ ================================================ FILE: generated/include/mmx/ProofOfSpace.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofOfSpace_HXX_ #define INCLUDE_mmx_ProofOfSpace_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT ProofOfSpace : public ::vnx::Value { public: uint16_t score = 0; ::mmx::hash_t plot_id; ::mmx::hash_t challenge; uint64_t difficulty = 0; ::mmx::pubkey_t farmer_key; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9269760ad5fd0058ull; ProofOfSpace() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; virtual ::mmx::hash_t calc_proof_hash() const; virtual void validate() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofOfSpace& _value); friend std::istream& operator>>(std::istream& _in, ProofOfSpace& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ProofOfSpace::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("score", 0); _visitor.accept(score); _visitor.type_field("plot_id", 1); _visitor.accept(plot_id); _visitor.type_field("challenge", 2); _visitor.accept(challenge); _visitor.type_field("difficulty", 3); _visitor.accept(difficulty); _visitor.type_field("farmer_key", 4); _visitor.accept(farmer_key); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofOfSpace_HXX_ ================================================ FILE: generated/include/mmx/ProofOfSpaceNFT.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofOfSpaceNFT_HXX_ #define INCLUDE_mmx_ProofOfSpaceNFT_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT ProofOfSpaceNFT : public ::mmx::ProofOfSpace { public: uint8_t ksize = 0; ::mmx::hash_t seed; std::vector proof_xs; ::mmx::addr_t contract; typedef ::mmx::ProofOfSpace Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x22a4d97166711bd9ull; ProofOfSpaceNFT() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash() const override; virtual ::mmx::hash_t calc_proof_hash() const override; virtual void validate() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofOfSpaceNFT& _value); friend std::istream& operator>>(std::istream& _in, ProofOfSpaceNFT& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ProofOfSpaceNFT::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("score", 0); _visitor.accept(score); _visitor.type_field("plot_id", 1); _visitor.accept(plot_id); _visitor.type_field("challenge", 2); _visitor.accept(challenge); _visitor.type_field("difficulty", 3); _visitor.accept(difficulty); _visitor.type_field("farmer_key", 4); _visitor.accept(farmer_key); _visitor.type_field("ksize", 5); _visitor.accept(ksize); _visitor.type_field("seed", 6); _visitor.accept(seed); _visitor.type_field("proof_xs", 7); _visitor.accept(proof_xs); _visitor.type_field("contract", 8); _visitor.accept(contract); _visitor.template type_end(9); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofOfSpaceNFT_HXX_ ================================================ FILE: generated/include/mmx/ProofOfSpaceOG.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofOfSpaceOG_HXX_ #define INCLUDE_mmx_ProofOfSpaceOG_HXX_ #include #include #include namespace mmx { class MMX_EXPORT ProofOfSpaceOG : public ::mmx::ProofOfSpace { public: uint8_t ksize = 0; ::mmx::hash_t seed; std::vector proof_xs; typedef ::mmx::ProofOfSpace Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6def5518efc37b4ull; ProofOfSpaceOG() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash() const override; virtual ::mmx::hash_t calc_proof_hash() const override; virtual void validate() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofOfSpaceOG& _value); friend std::istream& operator>>(std::istream& _in, ProofOfSpaceOG& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ProofOfSpaceOG::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("score", 0); _visitor.accept(score); _visitor.type_field("plot_id", 1); _visitor.accept(plot_id); _visitor.type_field("challenge", 2); _visitor.accept(challenge); _visitor.type_field("difficulty", 3); _visitor.accept(difficulty); _visitor.type_field("farmer_key", 4); _visitor.accept(farmer_key); _visitor.type_field("ksize", 5); _visitor.accept(ksize); _visitor.type_field("seed", 6); _visitor.accept(seed); _visitor.type_field("proof_xs", 7); _visitor.accept(proof_xs); _visitor.template type_end(8); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofOfSpaceOG_HXX_ ================================================ FILE: generated/include/mmx/ProofOfTime.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofOfTime_HXX_ #define INCLUDE_mmx_ProofOfTime_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT ProofOfTime : public ::vnx::Value { public: uint32_t version = 0; ::mmx::hash_t hash; uint32_t vdf_height = 0; uint64_t start = 0; uint64_t num_iters = 0; uint32_t segment_size = 0; ::mmx::hash_t input; ::mmx::hash_t prev; ::mmx::addr_t reward_addr; std::vector<::mmx::hash_t> segments; ::mmx::pubkey_t timelord_key; ::mmx::signature_t timelord_sig; ::mmx::hash_t content_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa84a63942b8e5c6aull; ProofOfTime() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; virtual ::mmx::hash_t calc_content_hash() const; virtual ::mmx::hash_t get_output() const; virtual uint64_t get_vdf_iters() const; virtual void validate() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofOfTime& _value); friend std::istream& operator>>(std::istream& _in, ProofOfTime& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ProofOfTime::accept_generic(T& _visitor) const { _visitor.template type_begin(13); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("hash", 1); _visitor.accept(hash); _visitor.type_field("vdf_height", 2); _visitor.accept(vdf_height); _visitor.type_field("start", 3); _visitor.accept(start); _visitor.type_field("num_iters", 4); _visitor.accept(num_iters); _visitor.type_field("segment_size", 5); _visitor.accept(segment_size); _visitor.type_field("input", 6); _visitor.accept(input); _visitor.type_field("prev", 7); _visitor.accept(prev); _visitor.type_field("reward_addr", 8); _visitor.accept(reward_addr); _visitor.type_field("segments", 9); _visitor.accept(segments); _visitor.type_field("timelord_key", 10); _visitor.accept(timelord_key); _visitor.type_field("timelord_sig", 11); _visitor.accept(timelord_sig); _visitor.type_field("content_hash", 12); _visitor.accept(content_hash); _visitor.template type_end(13); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofOfTime_HXX_ ================================================ FILE: generated/include/mmx/ProofResponse.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofResponse_HXX_ #define INCLUDE_mmx_ProofResponse_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT ProofResponse : public ::vnx::Value { public: ::mmx::hash_t hash; uint32_t vdf_height = 0; std::shared_ptr proof; ::mmx::signature_t farmer_sig; ::mmx::hash_t content_hash; ::vnx::Hash64 farmer_addr; std::string harvester; int64_t lookup_time_ms = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x816e898b36befae0ull; ProofResponse() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; virtual ::mmx::hash_t calc_content_hash() const; virtual void validate() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofResponse& _value); friend std::istream& operator>>(std::istream& _in, ProofResponse& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ProofResponse::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.type_field("vdf_height", 1); _visitor.accept(vdf_height); _visitor.type_field("proof", 2); _visitor.accept(proof); _visitor.type_field("farmer_sig", 3); _visitor.accept(farmer_sig); _visitor.type_field("content_hash", 4); _visitor.accept(content_hash); _visitor.type_field("farmer_addr", 5); _visitor.accept(farmer_addr); _visitor.type_field("harvester", 6); _visitor.accept(harvester); _visitor.type_field("lookup_time_ms", 7); _visitor.accept(lookup_time_ms); _visitor.template type_end(8); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofResponse_HXX_ ================================================ FILE: generated/include/mmx/ProofServerAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofServer_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_ProofServer_ASYNC_CLIENT_HXX_ #include #include #include #include namespace mmx { class ProofServerAsyncClient : public vnx::AsyncClient { public: ProofServerAsyncClient(const std::string& service_name); ProofServerAsyncClient(vnx::Hash64 service_addr); uint64_t compute(const std::vector& X_values = {}, const ::mmx::hash_t& id = ::mmx::hash_t(), const int32_t& ksize = 0, const int32_t& xbits = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map&)>, std::function>> vnx_queue_compute; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_ProofServer_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/ProofServerBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofServerBase_HXX_ #define INCLUDE_mmx_ProofServerBase_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT ProofServerBase : public ::vnx::Module { public: uint32_t num_threads = 32; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa531590f144986a6ull; ProofServerBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofServerBase& _value); friend std::istream& operator>>(std::istream& _in, ProofServerBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual void compute_async(const std::vector& X_values, const ::mmx::hash_t& id, const int32_t& ksize, const int32_t& xbits, const vnx::request_id_t& _request_id) const = 0; void compute_async_return(const vnx::request_id_t& _request_id, const std::vector<::mmx::table_entry_t>& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void ProofServerBase::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("num_threads", 0); _visitor.accept(num_threads); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofServerBase_HXX_ ================================================ FILE: generated/include/mmx/ProofServerClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofServer_CLIENT_HXX_ #define INCLUDE_mmx_ProofServer_CLIENT_HXX_ #include #include #include #include namespace mmx { class ProofServerClient : public vnx::Client { public: ProofServerClient(const std::string& service_name); ProofServerClient(vnx::Hash64 service_addr); std::vector<::mmx::table_entry_t> compute(const std::vector& X_values = {}, const ::mmx::hash_t& id = ::mmx::hash_t(), const int32_t& ksize = 0, const int32_t& xbits = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_ProofServer_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/ProofServer_compute.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofServer_compute_HXX_ #define INCLUDE_mmx_ProofServer_compute_HXX_ #include #include #include namespace mmx { class MMX_EXPORT ProofServer_compute : public ::vnx::Value { public: std::vector X_values; ::mmx::hash_t id; int32_t ksize = 0; int32_t xbits = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1565fa29d1604750ull; ProofServer_compute() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofServer_compute& _value); friend std::istream& operator>>(std::istream& _in, ProofServer_compute& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void ProofServer_compute::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("X_values", 0); _visitor.accept(X_values); _visitor.type_field("id", 1); _visitor.accept(id); _visitor.type_field("ksize", 2); _visitor.accept(ksize); _visitor.type_field("xbits", 3); _visitor.accept(xbits); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofServer_compute_HXX_ ================================================ FILE: generated/include/mmx/ProofServer_compute_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ProofServer_compute_return_HXX_ #define INCLUDE_mmx_ProofServer_compute_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT ProofServer_compute_return : public ::vnx::Value { public: std::vector<::mmx::table_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5b42e049360ce028ull; ProofServer_compute_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ProofServer_compute_return& _value); friend std::istream& operator>>(std::istream& _in, ProofServer_compute_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void ProofServer_compute_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ProofServer_compute_return_HXX_ ================================================ FILE: generated/include/mmx/ReceiveNote.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ReceiveNote_HXX_ #define INCLUDE_mmx_ReceiveNote_HXX_ #include #include #include namespace mmx { class MMX_EXPORT ReceiveNote : public ::vnx::Value { public: int64_t time = 0; ::mmx::hash_t hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x30439468cf29fa4bull; ReceiveNote() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ReceiveNote& _value); friend std::istream& operator>>(std::istream& _in, ReceiveNote& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ReceiveNote::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("time", 0); _visitor.accept(time); _visitor.type_field("hash", 1); _visitor.accept(hash); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ReceiveNote_HXX_ ================================================ FILE: generated/include/mmx/Request.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Request_HXX_ #define INCLUDE_mmx_Request_HXX_ #include #include namespace mmx { class MMX_EXPORT Request : public ::vnx::Value { public: uint32_t id = 0; std::shared_ptr method; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x110ce6958669f66bull; Request() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Request& _value); friend std::istream& operator>>(std::istream& _in, Request& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Request::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("method", 1); _visitor.accept(method); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Request_HXX_ ================================================ FILE: generated/include/mmx/Return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Return_HXX_ #define INCLUDE_mmx_Return_HXX_ #include #include namespace mmx { class MMX_EXPORT Return : public ::vnx::Value { public: uint32_t id = 0; std::shared_ptr result; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb479dce669278664ull; Return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Return& _value); friend std::istream& operator>>(std::istream& _in, Return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Return::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("result", 1); _visitor.accept(result); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Return_HXX_ ================================================ FILE: generated/include/mmx/RouterAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_Router_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class RouterAsyncClient : public vnx::AsyncClient { public: RouterAsyncClient(const std::string& service_name); RouterAsyncClient(vnx::Hash64 service_addr); uint64_t discover( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_id( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_info( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t sign_msg(const ::mmx::hash_t& msg = ::mmx::hash_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_peers(const uint32_t& max_count = 10, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_known_peers( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_connected_peers( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_peer_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t kick_peer(const std::string& address = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_blocks_at(const uint32_t& height = 0, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t fetch_block(const ::mmx::hash_t& hash = ::mmx::hash_t(), const vnx::optional& address = nullptr, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t fetch_block_at(const uint32_t& height = 0, const std::string& address = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request(std::shared_ptr request = nullptr, const std::string& sub_path = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map, std::function>> vnx_queue_discover; std::unordered_map, std::function>> vnx_queue_get_id; std::unordered_map, std::function>> vnx_queue_get_info; std::unordered_map&)>, std::function>> vnx_queue_sign_msg; std::unordered_map&)>, std::function>> vnx_queue_get_peers; std::unordered_map&)>, std::function>> vnx_queue_get_known_peers; std::unordered_map&)>, std::function>> vnx_queue_get_connected_peers; std::unordered_map)>, std::function>> vnx_queue_get_peer_info; std::unordered_map, std::function>> vnx_queue_kick_peer; std::unordered_map>&)>, std::function>> vnx_queue_get_blocks_at; std::unordered_map)>, std::function>> vnx_queue_fetch_block; std::unordered_map)>, std::function>> vnx_queue_fetch_block_at; std::unordered_map)>, std::function>> vnx_queue_http_request; std::unordered_map)>, std::function>> vnx_queue_http_request_chunk; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_Router_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/RouterBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_RouterBase_HXX_ #define INCLUDE_mmx_RouterBase_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT RouterBase : public ::vnx::addons::MsgServer { public: ::vnx::TopicPtr input_verified_vdfs = "node.verified_vdfs"; ::vnx::TopicPtr input_verified_votes = "node.verified_votes"; ::vnx::TopicPtr input_verified_proof = "node.verified_proof"; ::vnx::TopicPtr input_verified_blocks = "node.verified_blocks"; ::vnx::TopicPtr input_verified_transactions = "node.verified_transactions"; ::vnx::TopicPtr input_transactions = "node.transactions"; ::vnx::TopicPtr input_vdf_points = "node.vdf_points"; ::vnx::TopicPtr input_vdfs = "timelord.proof"; ::vnx::TopicPtr output_vdfs = "network.vdfs"; ::vnx::TopicPtr output_votes = "network.votes"; ::vnx::TopicPtr output_proof = "network.proof"; ::vnx::TopicPtr output_blocks = "network.blocks"; ::vnx::TopicPtr output_transactions = "network.transactions"; ::vnx::TopicPtr output_vdf_points = "network.vdf_points"; int32_t max_queue_ms = 1000; int32_t send_interval_ms = 20; int32_t query_interval_ms = 10000; int32_t update_interval_ms = 1000; int32_t connect_interval_ms = 10000; int32_t fetch_timeout_ms = 10000; int32_t relay_target_ms = 5000; uint32_t sync_loss_delay = 60; uint32_t discover_interval = 60; uint32_t disconnect_interval = 0; uint32_t peer_retry_interval = 360; uint32_t num_peers_out = 8; uint32_t min_sync_peers = 2; uint32_t max_peer_set = 100; uint32_t max_sent_cache = 20000; uint32_t max_hash_cache = 100000; uint32_t max_vdf_segments = 65536; uint32_t node_version = 103; ::mmx::node_type_e mode = ::mmx::node_type_e::FULL_NODE; vnx::bool_t do_relay = true; vnx::bool_t open_port = false; vnx::float64_t max_tx_upload = 2; vnx::float64_t max_pending_cost = 0.2; uint32_t priority_queue_size = 262144; std::set seed_peers; std::set fixed_peers; std::set block_peers; std::set master_nodes; std::string storage_path; std::string node_server = "Node"; typedef ::vnx::addons::MsgServer Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x952c4ef2956f31c4ull; RouterBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const RouterBase& _value); friend std::istream& operator>>(std::istream& _in, RouterBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual void discover() = 0; virtual ::mmx::hash_t get_id() const = 0; virtual ::mmx::node_info_t get_info() const = 0; virtual std::pair<::mmx::pubkey_t, ::mmx::signature_t> sign_msg(const ::mmx::hash_t& msg) const = 0; virtual std::vector get_peers(const uint32_t& max_count) const = 0; virtual std::vector get_known_peers() const = 0; virtual std::vector get_connected_peers() const = 0; virtual std::shared_ptr get_peer_info() const = 0; virtual void kick_peer(const std::string& address) = 0; virtual void get_blocks_at_async(const uint32_t& height, const vnx::request_id_t& _request_id) const = 0; void get_blocks_at_async_return(const vnx::request_id_t& _request_id, const std::vector>& _ret_0) const; virtual void fetch_block_async(const ::mmx::hash_t& hash, const vnx::optional& address, const vnx::request_id_t& _request_id) const = 0; void fetch_block_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void fetch_block_at_async(const uint32_t& height, const std::string& address, const vnx::request_id_t& _request_id) const = 0; void fetch_block_at_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& _request_id) const = 0; void http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& _request_id) const = 0; void http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void RouterBase::accept_generic(T& _visitor) const { _visitor.template type_begin(58); _visitor.type_field("port", 0); _visitor.accept(port); _visitor.type_field("host", 1); _visitor.accept(host); _visitor.type_field("max_connections", 2); _visitor.accept(max_connections); _visitor.type_field("listen_queue_size", 3); _visitor.accept(listen_queue_size); _visitor.type_field("stats_interval_ms", 4); _visitor.accept(stats_interval_ms); _visitor.type_field("connection_timeout_ms", 5); _visitor.accept(connection_timeout_ms); _visitor.type_field("send_buffer_size", 6); _visitor.accept(send_buffer_size); _visitor.type_field("receive_buffer_size", 7); _visitor.accept(receive_buffer_size); _visitor.type_field("tcp_no_delay", 8); _visitor.accept(tcp_no_delay); _visitor.type_field("tcp_keepalive", 9); _visitor.accept(tcp_keepalive); _visitor.type_field("show_warnings", 10); _visitor.accept(show_warnings); _visitor.type_field("compress_level", 11); _visitor.accept(compress_level); _visitor.type_field("max_msg_size", 12); _visitor.accept(max_msg_size); _visitor.type_field("max_write_queue", 13); _visitor.accept(max_write_queue); _visitor.type_field("input_verified_vdfs", 14); _visitor.accept(input_verified_vdfs); _visitor.type_field("input_verified_votes", 15); _visitor.accept(input_verified_votes); _visitor.type_field("input_verified_proof", 16); _visitor.accept(input_verified_proof); _visitor.type_field("input_verified_blocks", 17); _visitor.accept(input_verified_blocks); _visitor.type_field("input_verified_transactions", 18); _visitor.accept(input_verified_transactions); _visitor.type_field("input_transactions", 19); _visitor.accept(input_transactions); _visitor.type_field("input_vdf_points", 20); _visitor.accept(input_vdf_points); _visitor.type_field("input_vdfs", 21); _visitor.accept(input_vdfs); _visitor.type_field("output_vdfs", 22); _visitor.accept(output_vdfs); _visitor.type_field("output_votes", 23); _visitor.accept(output_votes); _visitor.type_field("output_proof", 24); _visitor.accept(output_proof); _visitor.type_field("output_blocks", 25); _visitor.accept(output_blocks); _visitor.type_field("output_transactions", 26); _visitor.accept(output_transactions); _visitor.type_field("output_vdf_points", 27); _visitor.accept(output_vdf_points); _visitor.type_field("max_queue_ms", 28); _visitor.accept(max_queue_ms); _visitor.type_field("send_interval_ms", 29); _visitor.accept(send_interval_ms); _visitor.type_field("query_interval_ms", 30); _visitor.accept(query_interval_ms); _visitor.type_field("update_interval_ms", 31); _visitor.accept(update_interval_ms); _visitor.type_field("connect_interval_ms", 32); _visitor.accept(connect_interval_ms); _visitor.type_field("fetch_timeout_ms", 33); _visitor.accept(fetch_timeout_ms); _visitor.type_field("relay_target_ms", 34); _visitor.accept(relay_target_ms); _visitor.type_field("sync_loss_delay", 35); _visitor.accept(sync_loss_delay); _visitor.type_field("discover_interval", 36); _visitor.accept(discover_interval); _visitor.type_field("disconnect_interval", 37); _visitor.accept(disconnect_interval); _visitor.type_field("peer_retry_interval", 38); _visitor.accept(peer_retry_interval); _visitor.type_field("num_peers_out", 39); _visitor.accept(num_peers_out); _visitor.type_field("min_sync_peers", 40); _visitor.accept(min_sync_peers); _visitor.type_field("max_peer_set", 41); _visitor.accept(max_peer_set); _visitor.type_field("max_sent_cache", 42); _visitor.accept(max_sent_cache); _visitor.type_field("max_hash_cache", 43); _visitor.accept(max_hash_cache); _visitor.type_field("max_vdf_segments", 44); _visitor.accept(max_vdf_segments); _visitor.type_field("node_version", 45); _visitor.accept(node_version); _visitor.type_field("mode", 46); _visitor.accept(mode); _visitor.type_field("do_relay", 47); _visitor.accept(do_relay); _visitor.type_field("open_port", 48); _visitor.accept(open_port); _visitor.type_field("max_tx_upload", 49); _visitor.accept(max_tx_upload); _visitor.type_field("max_pending_cost", 50); _visitor.accept(max_pending_cost); _visitor.type_field("priority_queue_size", 51); _visitor.accept(priority_queue_size); _visitor.type_field("seed_peers", 52); _visitor.accept(seed_peers); _visitor.type_field("fixed_peers", 53); _visitor.accept(fixed_peers); _visitor.type_field("block_peers", 54); _visitor.accept(block_peers); _visitor.type_field("master_nodes", 55); _visitor.accept(master_nodes); _visitor.type_field("storage_path", 56); _visitor.accept(storage_path); _visitor.type_field("node_server", 57); _visitor.accept(node_server); _visitor.template type_end(58); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_RouterBase_HXX_ ================================================ FILE: generated/include/mmx/RouterClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_CLIENT_HXX_ #define INCLUDE_mmx_Router_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class RouterClient : public vnx::Client { public: RouterClient(const std::string& service_name); RouterClient(vnx::Hash64 service_addr); void discover(); void discover_async(); ::mmx::hash_t get_id(); ::mmx::node_info_t get_info(); std::pair<::mmx::pubkey_t, ::mmx::signature_t> sign_msg(const ::mmx::hash_t& msg = ::mmx::hash_t()); std::vector get_peers(const uint32_t& max_count = 10); std::vector get_known_peers(); std::vector get_connected_peers(); std::shared_ptr get_peer_info(); void kick_peer(const std::string& address = ""); void kick_peer_async(const std::string& address = ""); std::vector> get_blocks_at(const uint32_t& height = 0); std::shared_ptr fetch_block(const ::mmx::hash_t& hash = ::mmx::hash_t(), const vnx::optional& address = nullptr); std::shared_ptr fetch_block_at(const uint32_t& height = 0, const std::string& address = ""); std::shared_ptr http_request(std::shared_ptr request = nullptr, const std::string& sub_path = ""); std::shared_ptr http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_Router_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/Router_discover.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_discover_HXX_ #define INCLUDE_mmx_Router_discover_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_discover : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xeda51767d96e246cull; Router_discover() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_discover& _value); friend std::istream& operator>>(std::istream& _in, Router_discover& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_discover::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_discover_HXX_ ================================================ FILE: generated/include/mmx/Router_discover_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_discover_return_HXX_ #define INCLUDE_mmx_Router_discover_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_discover_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb4e47e012f264f94ull; Router_discover_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_discover_return& _value); friend std::istream& operator>>(std::istream& _in, Router_discover_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_discover_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_discover_return_HXX_ ================================================ FILE: generated/include/mmx/Router_fetch_block.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_fetch_block_HXX_ #define INCLUDE_mmx_Router_fetch_block_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_fetch_block : public ::vnx::Value { public: ::mmx::hash_t hash; vnx::optional address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7c2f762681e7cc51ull; Router_fetch_block() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_fetch_block& _value); friend std::istream& operator>>(std::istream& _in, Router_fetch_block& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_fetch_block::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_fetch_block_HXX_ ================================================ FILE: generated/include/mmx/Router_fetch_block_at.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_fetch_block_at_HXX_ #define INCLUDE_mmx_Router_fetch_block_at_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_fetch_block_at : public ::vnx::Value { public: uint32_t height = 0; std::string address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa4deba522ed6f8adull; Router_fetch_block_at() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_at& _value); friend std::istream& operator>>(std::istream& _in, Router_fetch_block_at& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_fetch_block_at::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_fetch_block_at_HXX_ ================================================ FILE: generated/include/mmx/Router_fetch_block_at_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_fetch_block_at_return_HXX_ #define INCLUDE_mmx_Router_fetch_block_at_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_fetch_block_at_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xff711a762d6f885ull; Router_fetch_block_at_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_at_return& _value); friend std::istream& operator>>(std::istream& _in, Router_fetch_block_at_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_fetch_block_at_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_fetch_block_at_return_HXX_ ================================================ FILE: generated/include/mmx/Router_fetch_block_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_fetch_block_return_HXX_ #define INCLUDE_mmx_Router_fetch_block_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_fetch_block_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xcbe76155006bbb44ull; Router_fetch_block_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_return& _value); friend std::istream& operator>>(std::istream& _in, Router_fetch_block_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_fetch_block_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_fetch_block_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_blocks_at.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_blocks_at_HXX_ #define INCLUDE_mmx_Router_get_blocks_at_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_blocks_at : public ::vnx::Value { public: uint32_t height = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1eb0c0d7eae3c33aull; Router_get_blocks_at() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_blocks_at& _value); friend std::istream& operator>>(std::istream& _in, Router_get_blocks_at& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_blocks_at::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_blocks_at_HXX_ ================================================ FILE: generated/include/mmx/Router_get_blocks_at_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_blocks_at_return_HXX_ #define INCLUDE_mmx_Router_get_blocks_at_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_get_blocks_at_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x70f0e9e7aa72b810ull; Router_get_blocks_at_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_blocks_at_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_blocks_at_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_blocks_at_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_blocks_at_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_connected_peers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_connected_peers_HXX_ #define INCLUDE_mmx_Router_get_connected_peers_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_connected_peers : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8682feb65fbb77feull; Router_get_connected_peers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_connected_peers& _value); friend std::istream& operator>>(std::istream& _in, Router_get_connected_peers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_connected_peers::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_connected_peers_HXX_ ================================================ FILE: generated/include/mmx/Router_get_connected_peers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_connected_peers_return_HXX_ #define INCLUDE_mmx_Router_get_connected_peers_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_connected_peers_return : public ::vnx::Value { public: std::vector _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5c96b95e03d32e32ull; Router_get_connected_peers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_connected_peers_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_connected_peers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_connected_peers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_connected_peers_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_id.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_id_HXX_ #define INCLUDE_mmx_Router_get_id_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_id : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb9f7168b5ae94cd9ull; Router_get_id() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_id& _value); friend std::istream& operator>>(std::istream& _in, Router_get_id& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_id::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_id_HXX_ ================================================ FILE: generated/include/mmx/Router_get_id_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_id_return_HXX_ #define INCLUDE_mmx_Router_get_id_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_get_id_return : public ::vnx::Value { public: ::mmx::hash_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3924146b7a803806ull; Router_get_id_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_id_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_id_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_id_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_id_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_info_HXX_ #define INCLUDE_mmx_Router_get_info_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_info : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x364ea887c149a265ull; Router_get_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_info& _value); friend std::istream& operator>>(std::istream& _in, Router_get_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_info::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_info_HXX_ ================================================ FILE: generated/include/mmx/Router_get_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_info_return_HXX_ #define INCLUDE_mmx_Router_get_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_get_info_return : public ::vnx::Value { public: ::mmx::node_info_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x15170c71ca9209a9ull; Router_get_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_info_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_info_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_known_peers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_known_peers_HXX_ #define INCLUDE_mmx_Router_get_known_peers_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_known_peers : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xaa408b6bf4e8168dull; Router_get_known_peers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_known_peers& _value); friend std::istream& operator>>(std::istream& _in, Router_get_known_peers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_known_peers::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_known_peers_HXX_ ================================================ FILE: generated/include/mmx/Router_get_known_peers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_known_peers_return_HXX_ #define INCLUDE_mmx_Router_get_known_peers_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_known_peers_return : public ::vnx::Value { public: std::vector _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc08cde4fbf7f2abcull; Router_get_known_peers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_known_peers_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_known_peers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_known_peers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_known_peers_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_peer_info.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_peer_info_HXX_ #define INCLUDE_mmx_Router_get_peer_info_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_peer_info : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x520a467ef9324cb3ull; Router_get_peer_info() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_peer_info& _value); friend std::istream& operator>>(std::istream& _in, Router_get_peer_info& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_peer_info::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_peer_info_HXX_ ================================================ FILE: generated/include/mmx/Router_get_peer_info_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_peer_info_return_HXX_ #define INCLUDE_mmx_Router_get_peer_info_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_get_peer_info_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xffff4ae0244281b5ull; Router_get_peer_info_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_peer_info_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_peer_info_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_peer_info_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_peer_info_return_HXX_ ================================================ FILE: generated/include/mmx/Router_get_peers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_peers_HXX_ #define INCLUDE_mmx_Router_get_peers_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_peers : public ::vnx::Value { public: uint32_t max_count = 10; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x66d68bd91b462049ull; Router_get_peers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_peers& _value); friend std::istream& operator>>(std::istream& _in, Router_get_peers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_peers::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("max_count", 0); _visitor.accept(max_count); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_peers_HXX_ ================================================ FILE: generated/include/mmx/Router_get_peers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_get_peers_return_HXX_ #define INCLUDE_mmx_Router_get_peers_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_get_peers_return : public ::vnx::Value { public: std::vector _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x595714f80f272d86ull; Router_get_peers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_get_peers_return& _value); friend std::istream& operator>>(std::istream& _in, Router_get_peers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_get_peers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_get_peers_return_HXX_ ================================================ FILE: generated/include/mmx/Router_kick_peer.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_kick_peer_HXX_ #define INCLUDE_mmx_Router_kick_peer_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_kick_peer : public ::vnx::Value { public: std::string address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x359a21379021beedull; Router_kick_peer() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_kick_peer& _value); friend std::istream& operator>>(std::istream& _in, Router_kick_peer& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_kick_peer::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_kick_peer_HXX_ ================================================ FILE: generated/include/mmx/Router_kick_peer_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_kick_peer_return_HXX_ #define INCLUDE_mmx_Router_kick_peer_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Router_kick_peer_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd7189e110cc3a50full; Router_kick_peer_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_kick_peer_return& _value); friend std::istream& operator>>(std::istream& _in, Router_kick_peer_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_kick_peer_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_kick_peer_return_HXX_ ================================================ FILE: generated/include/mmx/Router_sign_msg.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_sign_msg_HXX_ #define INCLUDE_mmx_Router_sign_msg_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Router_sign_msg : public ::vnx::Value { public: ::mmx::hash_t msg; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x88ede2fbb99ab63eull; Router_sign_msg() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_sign_msg& _value); friend std::istream& operator>>(std::istream& _in, Router_sign_msg& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_sign_msg::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("msg", 0); _visitor.accept(msg); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_sign_msg_HXX_ ================================================ FILE: generated/include/mmx/Router_sign_msg_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Router_sign_msg_return_HXX_ #define INCLUDE_mmx_Router_sign_msg_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Router_sign_msg_return : public ::vnx::Value { public: std::pair<::mmx::pubkey_t, ::mmx::signature_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x67c8c37a7b5fc991ull; Router_sign_msg_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Router_sign_msg_return& _value); friend std::istream& operator>>(std::istream& _in, Router_sign_msg_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Router_sign_msg_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Router_sign_msg_return_HXX_ ================================================ FILE: generated/include/mmx/Solution.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Solution_HXX_ #define INCLUDE_mmx_Solution_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Solution : public ::vnx::Value { public: uint32_t version = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9f693babd1a91ccdull; Solution() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Solution& _value); friend std::istream& operator>>(std::istream& _in, Solution& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Solution::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Solution_HXX_ ================================================ FILE: generated/include/mmx/TimeLordAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TimeLord_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_TimeLord_ASYNC_CLIENT_HXX_ #include #include #include #include #include namespace mmx { class TimeLordAsyncClient : public vnx::AsyncClient { public: TimeLordAsyncClient(const std::string& service_name); TimeLordAsyncClient(vnx::Hash64 service_addr); uint64_t stop_vdf( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map, std::function>> vnx_queue_stop_vdf; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_TimeLord_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/TimeLordBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TimeLordBase_HXX_ #define INCLUDE_mmx_TimeLordBase_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT TimeLordBase : public ::vnx::Module { public: ::vnx::TopicPtr input_request = "timelord.requests"; ::vnx::TopicPtr output_proofs = "timelord.proof"; uint32_t max_history = 1000000; std::string node_server = "Node"; std::string wallet_server = "Wallet"; std::string storage_path; vnx::optional<::mmx::addr_t> reward_addr; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x311081636f6570efull; TimeLordBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const TimeLordBase& _value); friend std::istream& operator>>(std::istream& _in, TimeLordBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual void stop_vdf() = 0; virtual void handle(std::shared_ptr _value) {} void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void TimeLordBase::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("input_request", 0); _visitor.accept(input_request); _visitor.type_field("output_proofs", 1); _visitor.accept(output_proofs); _visitor.type_field("max_history", 2); _visitor.accept(max_history); _visitor.type_field("node_server", 3); _visitor.accept(node_server); _visitor.type_field("wallet_server", 4); _visitor.accept(wallet_server); _visitor.type_field("storage_path", 5); _visitor.accept(storage_path); _visitor.type_field("reward_addr", 6); _visitor.accept(reward_addr); _visitor.template type_end(7); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_TimeLordBase_HXX_ ================================================ FILE: generated/include/mmx/TimeLordClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TimeLord_CLIENT_HXX_ #define INCLUDE_mmx_TimeLord_CLIENT_HXX_ #include #include #include #include #include namespace mmx { class TimeLordClient : public vnx::Client { public: TimeLordClient(const std::string& service_name); TimeLordClient(vnx::Hash64 service_addr); void stop_vdf(); void stop_vdf_async(); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_TimeLord_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/TimeLord_stop_vdf.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TimeLord_stop_vdf_HXX_ #define INCLUDE_mmx_TimeLord_stop_vdf_HXX_ #include #include namespace mmx { class MMX_EXPORT TimeLord_stop_vdf : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf7f78eb9f371e6e7ull; TimeLord_stop_vdf() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const TimeLord_stop_vdf& _value); friend std::istream& operator>>(std::istream& _in, TimeLord_stop_vdf& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void TimeLord_stop_vdf::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_TimeLord_stop_vdf_HXX_ ================================================ FILE: generated/include/mmx/TimeLord_stop_vdf_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TimeLord_stop_vdf_return_HXX_ #define INCLUDE_mmx_TimeLord_stop_vdf_return_HXX_ #include #include namespace mmx { class MMX_EXPORT TimeLord_stop_vdf_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x53e37fb500ea3a9full; TimeLord_stop_vdf_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const TimeLord_stop_vdf_return& _value); friend std::istream& operator>>(std::istream& _in, TimeLord_stop_vdf_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void TimeLord_stop_vdf_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_TimeLord_stop_vdf_return_HXX_ ================================================ FILE: generated/include/mmx/Transaction.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Transaction_HXX_ #define INCLUDE_mmx_Transaction_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT Transaction : public ::mmx::TransactionBase { public: static const uint32_t MAX_SOLUTIONS = 65535; uint32_t version = 0; uint32_t expires = -1; uint32_t fee_ratio = 1024; uint32_t static_cost = 0; uint32_t max_fee_amount = 0; ::mmx::tx_note_e note; uint64_t nonce = 0; std::string network; vnx::optional<::mmx::addr_t> sender; std::vector<::mmx::txin_t> inputs; std::vector<::mmx::txout_t> outputs; std::vector> execute; std::vector> solutions; std::shared_ptr deploy; vnx::optional<::mmx::exec_result_t> exec_result; ::mmx::hash_t content_hash; typedef ::mmx::TransactionBase Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xce0462acdceaa5bcull; Transaction() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual void reset(std::shared_ptr params = nullptr); virtual void update(const ::mmx::exec_result_t& result = ::mmx::exec_result_t(), std::shared_ptr params = nullptr); virtual void finalize(); virtual void add_input(const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128()); virtual void add_output(const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128(), const vnx::optional& memo = nullptr); virtual void merge_sign(std::shared_ptr tx = nullptr); virtual vnx::bool_t is_valid(std::shared_ptr params = nullptr) const; virtual vnx::bool_t is_signed() const; virtual vnx::bool_t did_fail() const; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = false) const override; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const override; virtual std::shared_ptr get_solution(const uint32_t& index = 0) const; virtual std::vector<::mmx::txin_t> get_inputs() const; virtual std::vector<::mmx::txout_t> get_outputs() const; virtual std::vector> get_operations() const; virtual std::map<::mmx::addr_t, std::pair<::mmx::uint128, ::mmx::uint128>> get_balance() const; virtual std::vector hash_serialize(const vnx::bool_t& full_hash = false) const; virtual ::mmx::tx_index_t get_tx_index(std::shared_ptr params = nullptr, std::shared_ptr block = nullptr, const int64_t& file_offset = 0) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Transaction& _value); friend std::istream& operator>>(std::istream& _in, Transaction& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Transaction::accept_generic(T& _visitor) const { _visitor.template type_begin(17); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("version", 1); _visitor.accept(version); _visitor.type_field("expires", 2); _visitor.accept(expires); _visitor.type_field("fee_ratio", 3); _visitor.accept(fee_ratio); _visitor.type_field("static_cost", 4); _visitor.accept(static_cost); _visitor.type_field("max_fee_amount", 5); _visitor.accept(max_fee_amount); _visitor.type_field("note", 6); _visitor.accept(note); _visitor.type_field("nonce", 7); _visitor.accept(nonce); _visitor.type_field("network", 8); _visitor.accept(network); _visitor.type_field("sender", 9); _visitor.accept(sender); _visitor.type_field("inputs", 10); _visitor.accept(inputs); _visitor.type_field("outputs", 11); _visitor.accept(outputs); _visitor.type_field("execute", 12); _visitor.accept(execute); _visitor.type_field("solutions", 13); _visitor.accept(solutions); _visitor.type_field("deploy", 14); _visitor.accept(deploy); _visitor.type_field("exec_result", 15); _visitor.accept(exec_result); _visitor.type_field("content_hash", 16); _visitor.accept(content_hash); _visitor.template type_end(17); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Transaction_HXX_ ================================================ FILE: generated/include/mmx/TransactionBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_TransactionBase_HXX_ #define INCLUDE_mmx_TransactionBase_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT TransactionBase : public ::vnx::Value { public: ::mmx::hash_t id; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6697ffbf3611887dull; TransactionBase() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = false) const; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const; static std::shared_ptr create_ex(const ::mmx::hash_t& id = ::mmx::hash_t()); static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const TransactionBase& _value); friend std::istream& operator>>(std::istream& _in, TransactionBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void TransactionBase::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_TransactionBase_HXX_ ================================================ FILE: generated/include/mmx/VDF_Point.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_VDF_Point_HXX_ #define INCLUDE_mmx_VDF_Point_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT VDF_Point : public ::vnx::Value { public: uint32_t vdf_height = 0; uint64_t start = 0; uint64_t num_iters = 0; ::mmx::hash_t input; ::mmx::hash_t output; ::mmx::hash_t prev; ::mmx::addr_t reward_addr; ::mmx::hash_t content_hash; int64_t recv_time = 0; std::shared_ptr proof; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1671551501b6c956ull; VDF_Point() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_hash() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const VDF_Point& _value); friend std::istream& operator>>(std::istream& _in, VDF_Point& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void VDF_Point::accept_generic(T& _visitor) const { _visitor.template type_begin(10); _visitor.type_field("vdf_height", 0); _visitor.accept(vdf_height); _visitor.type_field("start", 1); _visitor.accept(start); _visitor.type_field("num_iters", 2); _visitor.accept(num_iters); _visitor.type_field("input", 3); _visitor.accept(input); _visitor.type_field("output", 4); _visitor.accept(output); _visitor.type_field("prev", 5); _visitor.accept(prev); _visitor.type_field("reward_addr", 6); _visitor.accept(reward_addr); _visitor.type_field("content_hash", 7); _visitor.accept(content_hash); _visitor.type_field("recv_time", 8); _visitor.accept(recv_time); _visitor.type_field("proof", 9); _visitor.accept(proof); _visitor.template type_end(10); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_VDF_Point_HXX_ ================================================ FILE: generated/include/mmx/ValidatorVote.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ValidatorVote_HXX_ #define INCLUDE_mmx_ValidatorVote_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT ValidatorVote : public ::vnx::Value { public: ::mmx::hash_t hash; ::mmx::pubkey_t farmer_key; ::mmx::signature_t farmer_sig; ::mmx::hash_t content_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc056a2ff24cdee25ull; ValidatorVote() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const; virtual ::mmx::hash_t calc_content_hash() const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const ValidatorVote& _value); friend std::istream& operator>>(std::istream& _in, ValidatorVote& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void ValidatorVote::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.type_field("farmer_key", 1); _visitor.accept(farmer_key); _visitor.type_field("farmer_sig", 2); _visitor.accept(farmer_sig); _visitor.type_field("content_hash", 3); _visitor.accept(content_hash); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_ValidatorVote_HXX_ ================================================ FILE: generated/include/mmx/WalletAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_Wallet_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class WalletAsyncClient : public vnx::AsyncClient { public: WalletAsyncClient(const std::string& service_name); WalletAsyncClient(vnx::Hash64 service_addr); uint64_t send(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& dst_addr = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t send_many(const uint32_t& index = 0, const std::vector>& amounts = {}, const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t send_from(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& dst_addr = ::mmx::addr_t(), const ::mmx::addr_t& src_addr = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t deploy(const uint32_t& index = 0, std::shared_ptr contract = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t execute(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const vnx::optional& user = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t deposit(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t make_offer(const uint32_t& index = 0, const uint32_t& owner = 0, const ::mmx::uint128& bid_amount = ::mmx::uint128(), const ::mmx::addr_t& bid_currency = ::mmx::addr_t(), const ::mmx::uint128& ask_amount = ::mmx::uint128(), const ::mmx::addr_t& ask_currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t offer_trade(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128(), const uint32_t& dst_addr = 0, const ::mmx::uint128& price = ::mmx::uint128(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t offer_withdraw(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t accept_offer(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const uint32_t& dst_addr = 0, const ::mmx::uint128& price = ::mmx::uint128(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t cancel_offer(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t swap_trade(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const vnx::optional<::mmx::uint128>& min_trade = nullptr, const int32_t& num_iter = 20, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t swap_add_liquid(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::array<::mmx::uint128, 2>& amount = {}, const uint32_t& pool_idx = 0, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t swap_rem_liquid(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::array<::mmx::uint128, 2>& amount = {}, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t plotnft_exec(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t plotnft_create(const uint32_t& index = 0, const std::string& name = "", const vnx::optional& owner = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t complete(const uint32_t& index = 0, std::shared_ptr tx = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t sign_off(const uint32_t& index = 0, std::shared_ptr tx = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t sign_msg(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::hash_t& msg = ::mmx::hash_t(), const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t send_off(const uint32_t& index = 0, std::shared_ptr tx = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t mark_spent(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t reserve(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t release(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t release_all( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t reset_cache(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t update_cache(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_history(const uint32_t& index = 0, const ::mmx::query_filter_t& filter = ::mmx::query_filter_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_tx_log(const uint32_t& index = 0, const int32_t& limit = 100, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t gather_inputs_for(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_balance(const uint32_t& index = 0, const ::mmx::addr_t& currency = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_balances(const uint32_t& index = 0, const vnx::bool_t& with_zero = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_total_balances(const std::vector<::mmx::addr_t>& addresses = {}, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_contract_balances(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_contracts(const uint32_t& index = 0, const vnx::optional& type_name = nullptr, const vnx::optional<::mmx::hash_t>& type_hash = nullptr, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_contracts_owned(const uint32_t& index = 0, const vnx::optional& type_name = nullptr, const vnx::optional<::mmx::hash_t>& type_hash = nullptr, const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t get_offers(const uint32_t& index = 0, const vnx::bool_t& state = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_swap_liquidity(const uint32_t& index = 0, const std::function, 2>>&)>& _callback = std::function, 2>>&)>(), const std::function& _error_callback = std::function()); uint64_t get_address(const uint32_t& index = 0, const uint32_t& offset = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_all_addresses(const int32_t& index = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t find_wallet_by_addr(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_account(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_all_accounts( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t is_locked(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t lock(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t unlock(const uint32_t& index = 0, const std::string& passphrase = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t add_account(const uint32_t& index = 0, const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t create_account(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t create_wallet(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& words = nullptr, const vnx::optional& passphrase = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t import_wallet(const ::mmx::account_t& config = ::mmx::account_t(), std::shared_ptr key_file = nullptr, const vnx::optional& passphrase = nullptr, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t remove_account(const uint32_t& index = 0, const uint32_t& account = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t set_address_count(const uint32_t& index = 0, const uint32_t& count = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_mnemonic_wordlist(const std::string& lang = "en", const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_token_list( const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t add_token(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t rem_token(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t export_wallet(const uint32_t& index = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t get_master_seed(const uint32_t& index = 0, const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t get_mnemonic_seed(const uint32_t& index = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_farmer_keys(const uint32_t& index = 0, const std::function&)>& _callback = std::function&)>(), const std::function& _error_callback = std::function()); uint64_t get_all_farmer_keys( const std::function>&)>& _callback = std::function>&)>(), const std::function& _error_callback = std::function()); uint64_t http_request(std::shared_ptr request = nullptr, const std::string& sub_path = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map)>, std::function>> vnx_queue_send; std::unordered_map)>, std::function>> vnx_queue_send_many; std::unordered_map)>, std::function>> vnx_queue_send_from; std::unordered_map)>, std::function>> vnx_queue_deploy; std::unordered_map)>, std::function>> vnx_queue_execute; std::unordered_map)>, std::function>> vnx_queue_deposit; std::unordered_map)>, std::function>> vnx_queue_make_offer; std::unordered_map)>, std::function>> vnx_queue_offer_trade; std::unordered_map)>, std::function>> vnx_queue_offer_withdraw; std::unordered_map)>, std::function>> vnx_queue_accept_offer; std::unordered_map)>, std::function>> vnx_queue_cancel_offer; std::unordered_map)>, std::function>> vnx_queue_swap_trade; std::unordered_map)>, std::function>> vnx_queue_swap_add_liquid; std::unordered_map)>, std::function>> vnx_queue_swap_rem_liquid; std::unordered_map)>, std::function>> vnx_queue_plotnft_exec; std::unordered_map)>, std::function>> vnx_queue_plotnft_create; std::unordered_map)>, std::function>> vnx_queue_complete; std::unordered_map)>, std::function>> vnx_queue_sign_off; std::unordered_map)>, std::function>> vnx_queue_sign_msg; std::unordered_map, std::function>> vnx_queue_send_off; std::unordered_map, std::function>> vnx_queue_mark_spent; std::unordered_map, std::function>> vnx_queue_reserve; std::unordered_map, std::function>> vnx_queue_release; std::unordered_map, std::function>> vnx_queue_release_all; std::unordered_map, std::function>> vnx_queue_reset_cache; std::unordered_map, std::function>> vnx_queue_update_cache; std::unordered_map&)>, std::function>> vnx_queue_get_history; std::unordered_map&)>, std::function>> vnx_queue_get_tx_log; std::unordered_map&)>, std::function>> vnx_queue_gather_inputs_for; std::unordered_map, std::function>> vnx_queue_get_balance; std::unordered_map&)>, std::function>> vnx_queue_get_balances; std::unordered_map&)>, std::function>> vnx_queue_get_total_balances; std::unordered_map&)>, std::function>> vnx_queue_get_contract_balances; std::unordered_map>&)>, std::function>> vnx_queue_get_contracts; std::unordered_map>&)>, std::function>> vnx_queue_get_contracts_owned; std::unordered_map&)>, std::function>> vnx_queue_get_offers; std::unordered_map, 2>>&)>, std::function>> vnx_queue_get_swap_liquidity; std::unordered_map, std::function>> vnx_queue_get_address; std::unordered_map&)>, std::function>> vnx_queue_get_all_addresses; std::unordered_map, std::function>> vnx_queue_find_wallet_by_addr; std::unordered_map, std::function>> vnx_queue_get_account; std::unordered_map&)>, std::function>> vnx_queue_get_all_accounts; std::unordered_map, std::function>> vnx_queue_is_locked; std::unordered_map, std::function>> vnx_queue_lock; std::unordered_map, std::function>> vnx_queue_unlock; std::unordered_map, std::function>> vnx_queue_add_account; std::unordered_map, std::function>> vnx_queue_create_account; std::unordered_map, std::function>> vnx_queue_create_wallet; std::unordered_map, std::function>> vnx_queue_import_wallet; std::unordered_map, std::function>> vnx_queue_remove_account; std::unordered_map, std::function>> vnx_queue_set_address_count; std::unordered_map&)>, std::function>> vnx_queue_get_mnemonic_wordlist; std::unordered_map&)>, std::function>> vnx_queue_get_token_list; std::unordered_map, std::function>> vnx_queue_add_token; std::unordered_map, std::function>> vnx_queue_rem_token; std::unordered_map)>, std::function>> vnx_queue_export_wallet; std::unordered_map, std::function>> vnx_queue_get_master_seed; std::unordered_map&)>, std::function>> vnx_queue_get_mnemonic_seed; std::unordered_map&)>, std::function>> vnx_queue_get_farmer_keys; std::unordered_map>&)>, std::function>> vnx_queue_get_all_farmer_keys; std::unordered_map)>, std::function>> vnx_queue_http_request; std::unordered_map)>, std::function>> vnx_queue_http_request_chunk; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_Wallet_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/WalletBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WalletBase_HXX_ #define INCLUDE_mmx_WalletBase_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT WalletBase : public ::vnx::Module { public: std::vector key_files; std::vector<::mmx::account_t> accounts; std::string config_path; std::string storage_path; std::string database_path = "wallet/"; std::string node_server = "Node"; uint32_t max_key_files = 100; uint32_t num_addresses = 100; uint32_t max_addresses = 10000; uint32_t default_expire = 100; int32_t lock_timeout_sec = 600; int32_t cache_timeout_ms = 1000; std::set<::mmx::addr_t> token_whitelist; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x62207fd96d3aead7ull; WalletBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WalletBase& _value); friend std::istream& operator>>(std::istream& _in, WalletBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual std::shared_ptr send(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr send_many(const uint32_t& index, const std::vector>& amounts, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr send_from(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& src_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr deploy(const uint32_t& index, std::shared_ptr contract, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr execute(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional& user, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr deposit(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr make_offer(const uint32_t& index, const uint32_t& owner, const ::mmx::uint128& bid_amount, const ::mmx::addr_t& bid_currency, const ::mmx::uint128& ask_amount, const ::mmx::addr_t& ask_currency, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr offer_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr offer_withdraw(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr accept_offer(const uint32_t& index, const ::mmx::addr_t& address, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr cancel_offer(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr swap_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const vnx::optional<::mmx::uint128>& min_trade, const int32_t& num_iter, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr swap_add_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const uint32_t& pool_idx, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr swap_rem_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr plotnft_exec(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr plotnft_create(const uint32_t& index, const std::string& name, const vnx::optional& owner, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr complete(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr sign_off(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options) const = 0; virtual std::shared_ptr sign_msg(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::hash_t& msg) const = 0; virtual void send_off(const uint32_t& index, std::shared_ptr tx) const = 0; virtual void mark_spent(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) = 0; virtual void reserve(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) = 0; virtual void release(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) = 0; virtual void release_all() = 0; virtual void reset_cache(const uint32_t& index) = 0; virtual void update_cache(const uint32_t& index) const = 0; virtual std::vector<::mmx::tx_entry_t> get_history(const uint32_t& index, const ::mmx::query_filter_t& filter) const = 0; virtual std::vector<::mmx::tx_log_entry_t> get_tx_log(const uint32_t& index, const int32_t& limit) const = 0; virtual std::vector<::mmx::txin_t> gather_inputs_for(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) const = 0; virtual ::mmx::balance_t get_balance(const uint32_t& index, const ::mmx::addr_t& currency) const = 0; virtual std::map<::mmx::addr_t, ::mmx::balance_t> get_balances(const uint32_t& index, const vnx::bool_t& with_zero) const = 0; virtual std::map<::mmx::addr_t, ::mmx::balance_t> get_total_balances(const std::vector<::mmx::addr_t>& addresses) const = 0; virtual std::map<::mmx::addr_t, ::mmx::balance_t> get_contract_balances(const ::mmx::addr_t& address) const = 0; virtual std::map<::mmx::addr_t, std::shared_ptr> get_contracts(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash) const = 0; virtual std::map<::mmx::addr_t, std::shared_ptr> get_contracts_owned(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash) const = 0; virtual std::vector<::mmx::offer_data_t> get_offers(const uint32_t& index, const vnx::bool_t& state) const = 0; virtual std::map<::mmx::addr_t, std::array, 2>> get_swap_liquidity(const uint32_t& index) const = 0; virtual ::mmx::addr_t get_address(const uint32_t& index, const uint32_t& offset) const = 0; virtual std::vector<::mmx::addr_t> get_all_addresses(const int32_t& index) const = 0; virtual int32_t find_wallet_by_addr(const ::mmx::addr_t& address) const = 0; virtual ::mmx::account_info_t get_account(const uint32_t& index) const = 0; virtual std::vector<::mmx::account_info_t> get_all_accounts() const = 0; virtual vnx::bool_t is_locked(const uint32_t& index) const = 0; virtual void lock(const uint32_t& index) = 0; virtual void unlock(const uint32_t& index, const std::string& passphrase) = 0; virtual void add_account(const uint32_t& index, const ::mmx::account_t& config, const vnx::optional& passphrase) = 0; virtual void create_account(const ::mmx::account_t& config, const vnx::optional& passphrase) = 0; virtual void create_wallet(const ::mmx::account_t& config, const vnx::optional& words, const vnx::optional& passphrase) = 0; virtual void import_wallet(const ::mmx::account_t& config, std::shared_ptr key_file, const vnx::optional& passphrase) = 0; virtual void remove_account(const uint32_t& index, const uint32_t& account) = 0; virtual void set_address_count(const uint32_t& index, const uint32_t& count) = 0; virtual std::vector get_mnemonic_wordlist(const std::string& lang) const = 0; virtual std::set<::mmx::addr_t> get_token_list() const = 0; virtual void add_token(const ::mmx::addr_t& address) = 0; virtual void rem_token(const ::mmx::addr_t& address) = 0; virtual std::shared_ptr export_wallet(const uint32_t& index) const = 0; virtual ::mmx::hash_t get_master_seed(const uint32_t& index) const = 0; virtual std::vector get_mnemonic_seed(const uint32_t& index) const = 0; virtual std::pair<::mmx::skey_t, ::mmx::pubkey_t> get_farmer_keys(const uint32_t& index) const = 0; virtual std::vector> get_all_farmer_keys() const = 0; virtual void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& _request_id) const = 0; void http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& _request_id) const = 0; void http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void WalletBase::accept_generic(T& _visitor) const { _visitor.template type_begin(13); _visitor.type_field("key_files", 0); _visitor.accept(key_files); _visitor.type_field("accounts", 1); _visitor.accept(accounts); _visitor.type_field("config_path", 2); _visitor.accept(config_path); _visitor.type_field("storage_path", 3); _visitor.accept(storage_path); _visitor.type_field("database_path", 4); _visitor.accept(database_path); _visitor.type_field("node_server", 5); _visitor.accept(node_server); _visitor.type_field("max_key_files", 6); _visitor.accept(max_key_files); _visitor.type_field("num_addresses", 7); _visitor.accept(num_addresses); _visitor.type_field("max_addresses", 8); _visitor.accept(max_addresses); _visitor.type_field("default_expire", 9); _visitor.accept(default_expire); _visitor.type_field("lock_timeout_sec", 10); _visitor.accept(lock_timeout_sec); _visitor.type_field("cache_timeout_ms", 11); _visitor.accept(cache_timeout_ms); _visitor.type_field("token_whitelist", 12); _visitor.accept(token_whitelist); _visitor.template type_end(13); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_WalletBase_HXX_ ================================================ FILE: generated/include/mmx/WalletClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_CLIENT_HXX_ #define INCLUDE_mmx_Wallet_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class WalletClient : public vnx::Client { public: WalletClient(const std::string& service_name); WalletClient(vnx::Hash64 service_addr); std::shared_ptr send(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& dst_addr = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr send_many(const uint32_t& index = 0, const std::vector>& amounts = {}, const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr send_from(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& dst_addr = ::mmx::addr_t(), const ::mmx::addr_t& src_addr = ::mmx::addr_t(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr deploy(const uint32_t& index = 0, std::shared_ptr contract = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr execute(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const vnx::optional& user = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr deposit(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr make_offer(const uint32_t& index = 0, const uint32_t& owner = 0, const ::mmx::uint128& bid_amount = ::mmx::uint128(), const ::mmx::addr_t& bid_currency = ::mmx::addr_t(), const ::mmx::uint128& ask_amount = ::mmx::uint128(), const ::mmx::addr_t& ask_currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr offer_trade(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128(), const uint32_t& dst_addr = 0, const ::mmx::uint128& price = ::mmx::uint128(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr offer_withdraw(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr accept_offer(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const uint32_t& dst_addr = 0, const ::mmx::uint128& price = ::mmx::uint128(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr cancel_offer(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr swap_trade(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const vnx::optional<::mmx::uint128>& min_trade = nullptr, const int32_t& num_iter = 20, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr swap_add_liquid(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::array<::mmx::uint128, 2>& amount = {}, const uint32_t& pool_idx = 0, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr swap_rem_liquid(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const std::array<::mmx::uint128, 2>& amount = {}, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr plotnft_exec(const ::mmx::addr_t& address = ::mmx::addr_t(), const std::string& method = "", const std::vector<::vnx::Variant>& args = {}, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr plotnft_create(const uint32_t& index = 0, const std::string& name = "", const vnx::optional& owner = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr complete(const uint32_t& index = 0, std::shared_ptr tx = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr sign_off(const uint32_t& index = 0, std::shared_ptr tx = nullptr, const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); std::shared_ptr sign_msg(const uint32_t& index = 0, const ::mmx::addr_t& address = ::mmx::addr_t(), const ::mmx::hash_t& msg = ::mmx::hash_t()); void send_off(const uint32_t& index = 0, std::shared_ptr tx = nullptr); void send_off_async(const uint32_t& index = 0, std::shared_ptr tx = nullptr); void mark_spent(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void mark_spent_async(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void reserve(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void reserve_async(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void release(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void release_async(const uint32_t& index = 0, const std::map, ::mmx::uint128>& amounts = {}); void release_all(); void release_all_async(); void reset_cache(const uint32_t& index = 0); void reset_cache_async(const uint32_t& index = 0); void update_cache(const uint32_t& index = 0); void update_cache_async(const uint32_t& index = 0); std::vector<::mmx::tx_entry_t> get_history(const uint32_t& index = 0, const ::mmx::query_filter_t& filter = ::mmx::query_filter_t()); std::vector<::mmx::tx_log_entry_t> get_tx_log(const uint32_t& index = 0, const int32_t& limit = 100); std::vector<::mmx::txin_t> gather_inputs_for(const uint32_t& index = 0, const ::mmx::uint128& amount = ::mmx::uint128(), const ::mmx::addr_t& currency = ::mmx::addr_t(), const ::mmx::spend_options_t& options = ::mmx::spend_options_t()); ::mmx::balance_t get_balance(const uint32_t& index = 0, const ::mmx::addr_t& currency = ::mmx::addr_t()); std::map<::mmx::addr_t, ::mmx::balance_t> get_balances(const uint32_t& index = 0, const vnx::bool_t& with_zero = 0); std::map<::mmx::addr_t, ::mmx::balance_t> get_total_balances(const std::vector<::mmx::addr_t>& addresses = {}); std::map<::mmx::addr_t, ::mmx::balance_t> get_contract_balances(const ::mmx::addr_t& address = ::mmx::addr_t()); std::map<::mmx::addr_t, std::shared_ptr> get_contracts(const uint32_t& index = 0, const vnx::optional& type_name = nullptr, const vnx::optional<::mmx::hash_t>& type_hash = nullptr); std::map<::mmx::addr_t, std::shared_ptr> get_contracts_owned(const uint32_t& index = 0, const vnx::optional& type_name = nullptr, const vnx::optional<::mmx::hash_t>& type_hash = nullptr); std::vector<::mmx::offer_data_t> get_offers(const uint32_t& index = 0, const vnx::bool_t& state = 0); std::map<::mmx::addr_t, std::array, 2>> get_swap_liquidity(const uint32_t& index = 0); ::mmx::addr_t get_address(const uint32_t& index = 0, const uint32_t& offset = 0); std::vector<::mmx::addr_t> get_all_addresses(const int32_t& index = 0); int32_t find_wallet_by_addr(const ::mmx::addr_t& address = ::mmx::addr_t()); ::mmx::account_info_t get_account(const uint32_t& index = 0); std::vector<::mmx::account_info_t> get_all_accounts(); vnx::bool_t is_locked(const uint32_t& index = 0); void lock(const uint32_t& index = 0); void lock_async(const uint32_t& index = 0); void unlock(const uint32_t& index = 0, const std::string& passphrase = ""); void unlock_async(const uint32_t& index = 0, const std::string& passphrase = ""); void add_account(const uint32_t& index = 0, const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr); void add_account_async(const uint32_t& index = 0, const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr); void create_account(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr); void create_account_async(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& passphrase = nullptr); void create_wallet(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& words = nullptr, const vnx::optional& passphrase = nullptr); void create_wallet_async(const ::mmx::account_t& config = ::mmx::account_t(), const vnx::optional& words = nullptr, const vnx::optional& passphrase = nullptr); void import_wallet(const ::mmx::account_t& config = ::mmx::account_t(), std::shared_ptr key_file = nullptr, const vnx::optional& passphrase = nullptr); void import_wallet_async(const ::mmx::account_t& config = ::mmx::account_t(), std::shared_ptr key_file = nullptr, const vnx::optional& passphrase = nullptr); void remove_account(const uint32_t& index = 0, const uint32_t& account = 0); void remove_account_async(const uint32_t& index = 0, const uint32_t& account = 0); void set_address_count(const uint32_t& index = 0, const uint32_t& count = 0); void set_address_count_async(const uint32_t& index = 0, const uint32_t& count = 0); std::vector get_mnemonic_wordlist(const std::string& lang = "en"); std::set<::mmx::addr_t> get_token_list(); void add_token(const ::mmx::addr_t& address = ::mmx::addr_t()); void add_token_async(const ::mmx::addr_t& address = ::mmx::addr_t()); void rem_token(const ::mmx::addr_t& address = ::mmx::addr_t()); void rem_token_async(const ::mmx::addr_t& address = ::mmx::addr_t()); std::shared_ptr export_wallet(const uint32_t& index = 0); ::mmx::hash_t get_master_seed(const uint32_t& index = 0); std::vector get_mnemonic_seed(const uint32_t& index = 0); std::pair<::mmx::skey_t, ::mmx::pubkey_t> get_farmer_keys(const uint32_t& index = 0); std::vector> get_all_farmer_keys(); std::shared_ptr http_request(std::shared_ptr request = nullptr, const std::string& sub_path = ""); std::shared_ptr http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_Wallet_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/WalletFile.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WalletFile_HXX_ #define INCLUDE_mmx_WalletFile_HXX_ #include #include #include namespace mmx { class MMX_EXPORT WalletFile : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xefcdc0f20fc4360eull; WalletFile() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WalletFile& _value); friend std::istream& operator>>(std::istream& _in, WalletFile& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void WalletFile::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_WalletFile_HXX_ ================================================ FILE: generated/include/mmx/Wallet_accept_offer.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_accept_offer_HXX_ #define INCLUDE_mmx_Wallet_accept_offer_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_accept_offer : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; uint32_t dst_addr = 0; ::mmx::uint128 price; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3299e81eb354b78full; Wallet_accept_offer() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_accept_offer& _value); friend std::istream& operator>>(std::istream& _in, Wallet_accept_offer& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_accept_offer::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("dst_addr", 2); _visitor.accept(dst_addr); _visitor.type_field("price", 3); _visitor.accept(price); _visitor.type_field("options", 4); _visitor.accept(options); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_accept_offer_HXX_ ================================================ FILE: generated/include/mmx/Wallet_accept_offer_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_accept_offer_return_HXX_ #define INCLUDE_mmx_Wallet_accept_offer_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_accept_offer_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb44ec1a26ab66acdull; Wallet_accept_offer_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_accept_offer_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_accept_offer_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_accept_offer_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_accept_offer_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_add_account.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_add_account_HXX_ #define INCLUDE_mmx_Wallet_add_account_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_add_account : public ::vnx::Value { public: uint32_t index = 0; ::mmx::account_t config; vnx::optional passphrase; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x92d2d3518d9c33aeull; Wallet_add_account() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_add_account& _value); friend std::istream& operator>>(std::istream& _in, Wallet_add_account& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_add_account::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("config", 1); _visitor.accept(config); _visitor.type_field("passphrase", 2); _visitor.accept(passphrase); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_add_account_HXX_ ================================================ FILE: generated/include/mmx/Wallet_add_account_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_add_account_return_HXX_ #define INCLUDE_mmx_Wallet_add_account_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_add_account_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xda0b2d71dd9e8336ull; Wallet_add_account_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_add_account_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_add_account_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_add_account_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_add_account_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_add_token.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_add_token_HXX_ #define INCLUDE_mmx_Wallet_add_token_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_add_token : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x15fcc67eabc550b6ull; Wallet_add_token() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_add_token& _value); friend std::istream& operator>>(std::istream& _in, Wallet_add_token& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_add_token::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_add_token_HXX_ ================================================ FILE: generated/include/mmx/Wallet_add_token_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_add_token_return_HXX_ #define INCLUDE_mmx_Wallet_add_token_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_add_token_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb0b00a9f88ea83b5ull; Wallet_add_token_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_add_token_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_add_token_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_add_token_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_add_token_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_cancel_offer.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_cancel_offer_HXX_ #define INCLUDE_mmx_Wallet_cancel_offer_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_cancel_offer : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x200cca704ba873c6ull; Wallet_cancel_offer() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_cancel_offer& _value); friend std::istream& operator>>(std::istream& _in, Wallet_cancel_offer& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_cancel_offer::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("options", 2); _visitor.accept(options); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_cancel_offer_HXX_ ================================================ FILE: generated/include/mmx/Wallet_cancel_offer_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_cancel_offer_return_HXX_ #define INCLUDE_mmx_Wallet_cancel_offer_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_cancel_offer_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x86f3531ebf8c56a2ull; Wallet_cancel_offer_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_cancel_offer_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_cancel_offer_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_cancel_offer_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_cancel_offer_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_complete.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_complete_HXX_ #define INCLUDE_mmx_Wallet_complete_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_complete : public ::vnx::Value { public: uint32_t index = 0; std::shared_ptr tx; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x20da222e7c7de702ull; Wallet_complete() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_complete& _value); friend std::istream& operator>>(std::istream& _in, Wallet_complete& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_complete::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("tx", 1); _visitor.accept(tx); _visitor.type_field("options", 2); _visitor.accept(options); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_complete_HXX_ ================================================ FILE: generated/include/mmx/Wallet_complete_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_complete_return_HXX_ #define INCLUDE_mmx_Wallet_complete_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_complete_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x490ab9293f9dbfd0ull; Wallet_complete_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_complete_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_complete_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_complete_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_complete_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_create_account.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_create_account_HXX_ #define INCLUDE_mmx_Wallet_create_account_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_create_account : public ::vnx::Value { public: ::mmx::account_t config; vnx::optional passphrase; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x11cd618b00e9e56cull; Wallet_create_account() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_create_account& _value); friend std::istream& operator>>(std::istream& _in, Wallet_create_account& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_create_account::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("config", 0); _visitor.accept(config); _visitor.type_field("passphrase", 1); _visitor.accept(passphrase); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_create_account_HXX_ ================================================ FILE: generated/include/mmx/Wallet_create_account_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_create_account_return_HXX_ #define INCLUDE_mmx_Wallet_create_account_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_create_account_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3a0ff64dc755a8d8ull; Wallet_create_account_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_create_account_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_create_account_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_create_account_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_create_account_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_create_wallet.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_create_wallet_HXX_ #define INCLUDE_mmx_Wallet_create_wallet_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_create_wallet : public ::vnx::Value { public: ::mmx::account_t config; vnx::optional words; vnx::optional passphrase; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdcc08a3a1b171a19ull; Wallet_create_wallet() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_create_wallet& _value); friend std::istream& operator>>(std::istream& _in, Wallet_create_wallet& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_create_wallet::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("config", 0); _visitor.accept(config); _visitor.type_field("words", 1); _visitor.accept(words); _visitor.type_field("passphrase", 2); _visitor.accept(passphrase); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_create_wallet_HXX_ ================================================ FILE: generated/include/mmx/Wallet_create_wallet_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_create_wallet_return_HXX_ #define INCLUDE_mmx_Wallet_create_wallet_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_create_wallet_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb417dca300f1949bull; Wallet_create_wallet_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_create_wallet_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_create_wallet_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_create_wallet_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_create_wallet_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_deploy.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_deploy_HXX_ #define INCLUDE_mmx_Wallet_deploy_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_deploy : public ::vnx::Value { public: uint32_t index = 0; std::shared_ptr contract; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xcd71b07853d17497ull; Wallet_deploy() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_deploy& _value); friend std::istream& operator>>(std::istream& _in, Wallet_deploy& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_deploy::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("options", 2); _visitor.accept(options); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_deploy_HXX_ ================================================ FILE: generated/include/mmx/Wallet_deploy_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_deploy_return_HXX_ #define INCLUDE_mmx_Wallet_deploy_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_deploy_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7de4805b16e313f6ull; Wallet_deploy_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_deploy_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_deploy_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_deploy_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_deploy_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_deposit.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_deposit_HXX_ #define INCLUDE_mmx_Wallet_deposit_HXX_ #include #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_deposit : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; std::string method; std::vector<::vnx::Variant> args; ::mmx::uint128 amount; ::mmx::addr_t currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4bf71b9049e1c689ull; Wallet_deposit() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_deposit& _value); friend std::istream& operator>>(std::istream& _in, Wallet_deposit& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_deposit::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("method", 2); _visitor.accept(method); _visitor.type_field("args", 3); _visitor.accept(args); _visitor.type_field("amount", 4); _visitor.accept(amount); _visitor.type_field("currency", 5); _visitor.accept(currency); _visitor.type_field("options", 6); _visitor.accept(options); _visitor.template type_end(7); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_deposit_HXX_ ================================================ FILE: generated/include/mmx/Wallet_deposit_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_deposit_return_HXX_ #define INCLUDE_mmx_Wallet_deposit_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_deposit_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf21ba8f2309d78aeull; Wallet_deposit_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_deposit_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_deposit_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_deposit_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_deposit_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_execute.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_execute_HXX_ #define INCLUDE_mmx_Wallet_execute_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_execute : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; std::string method; std::vector<::vnx::Variant> args; vnx::optional user; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x51a1276a27db7b4ull; Wallet_execute() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_execute& _value); friend std::istream& operator>>(std::istream& _in, Wallet_execute& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_execute::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("method", 2); _visitor.accept(method); _visitor.type_field("args", 3); _visitor.accept(args); _visitor.type_field("user", 4); _visitor.accept(user); _visitor.type_field("options", 5); _visitor.accept(options); _visitor.template type_end(6); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_execute_HXX_ ================================================ FILE: generated/include/mmx/Wallet_execute_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_execute_return_HXX_ #define INCLUDE_mmx_Wallet_execute_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_execute_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9a51f18a1c26c764ull; Wallet_execute_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_execute_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_execute_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_execute_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_execute_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_export_wallet.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_export_wallet_HXX_ #define INCLUDE_mmx_Wallet_export_wallet_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_export_wallet : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd52b494df565ce7ull; Wallet_export_wallet() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_export_wallet& _value); friend std::istream& operator>>(std::istream& _in, Wallet_export_wallet& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_export_wallet::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_export_wallet_HXX_ ================================================ FILE: generated/include/mmx/Wallet_export_wallet_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_export_wallet_return_HXX_ #define INCLUDE_mmx_Wallet_export_wallet_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_export_wallet_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1c82818ba92b03f4ull; Wallet_export_wallet_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_export_wallet_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_export_wallet_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_export_wallet_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_export_wallet_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_find_wallet_by_addr.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_find_wallet_by_addr_HXX_ #define INCLUDE_mmx_Wallet_find_wallet_by_addr_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_find_wallet_by_addr : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x320237e79adcef6bull; Wallet_find_wallet_by_addr() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_find_wallet_by_addr& _value); friend std::istream& operator>>(std::istream& _in, Wallet_find_wallet_by_addr& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_find_wallet_by_addr::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_find_wallet_by_addr_HXX_ ================================================ FILE: generated/include/mmx/Wallet_find_wallet_by_addr_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_find_wallet_by_addr_return_HXX_ #define INCLUDE_mmx_Wallet_find_wallet_by_addr_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_find_wallet_by_addr_return : public ::vnx::Value { public: int32_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdae07576f8844f6aull; Wallet_find_wallet_by_addr_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_find_wallet_by_addr_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_find_wallet_by_addr_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_find_wallet_by_addr_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_find_wallet_by_addr_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_gather_inputs_for.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_gather_inputs_for_HXX_ #define INCLUDE_mmx_Wallet_gather_inputs_for_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_gather_inputs_for : public ::vnx::Value { public: uint32_t index = 0; ::mmx::uint128 amount; ::mmx::addr_t currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x31d9b9888b8c2de3ull; Wallet_gather_inputs_for() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_gather_inputs_for& _value); friend std::istream& operator>>(std::istream& _in, Wallet_gather_inputs_for& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_gather_inputs_for::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amount", 1); _visitor.accept(amount); _visitor.type_field("currency", 2); _visitor.accept(currency); _visitor.type_field("options", 3); _visitor.accept(options); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_gather_inputs_for_HXX_ ================================================ FILE: generated/include/mmx/Wallet_gather_inputs_for_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_gather_inputs_for_return_HXX_ #define INCLUDE_mmx_Wallet_gather_inputs_for_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_gather_inputs_for_return : public ::vnx::Value { public: std::vector<::mmx::txin_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb099ed949b98dc77ull; Wallet_gather_inputs_for_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_gather_inputs_for_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_gather_inputs_for_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_gather_inputs_for_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_gather_inputs_for_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_account.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_account_HXX_ #define INCLUDE_mmx_Wallet_get_account_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_account : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf9669d0d42aec09eull; Wallet_get_account() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_account& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_account& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_account::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_account_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_account_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_account_return_HXX_ #define INCLUDE_mmx_Wallet_get_account_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_account_return : public ::vnx::Value { public: ::mmx::account_info_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xaed020aa500eed2bull; Wallet_get_account_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_account_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_account_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_account_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_account_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_address.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_address_HXX_ #define INCLUDE_mmx_Wallet_get_address_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_address : public ::vnx::Value { public: uint32_t index = 0; uint32_t offset = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xccad8dfe1543aa77ull; Wallet_get_address() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_address& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_address& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_address::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("offset", 1); _visitor.accept(offset); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_address_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_address_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_address_return_HXX_ #define INCLUDE_mmx_Wallet_get_address_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_address_return : public ::vnx::Value { public: ::mmx::addr_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4c76a08d8d85c4e4ull; Wallet_get_address_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_address_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_address_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_address_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_address_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_accounts.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_accounts_HXX_ #define INCLUDE_mmx_Wallet_get_all_accounts_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_accounts : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdf8bfad64085cb83ull; Wallet_get_all_accounts() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_accounts& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_accounts& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_accounts::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_accounts_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_accounts_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_accounts_return_HXX_ #define INCLUDE_mmx_Wallet_get_all_accounts_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_accounts_return : public ::vnx::Value { public: std::vector<::mmx::account_info_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2bb48cc4299c5782ull; Wallet_get_all_accounts_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_accounts_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_accounts_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_accounts_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_accounts_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_addresses.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_addresses_HXX_ #define INCLUDE_mmx_Wallet_get_all_addresses_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_addresses : public ::vnx::Value { public: int32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf5e2b4554613fd97ull; Wallet_get_all_addresses() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_addresses& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_addresses& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_addresses::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_addresses_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_addresses_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_addresses_return_HXX_ #define INCLUDE_mmx_Wallet_get_all_addresses_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_addresses_return : public ::vnx::Value { public: std::vector<::mmx::addr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2f16846155284194ull; Wallet_get_all_addresses_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_addresses_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_addresses_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_addresses_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_addresses_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_farmer_keys.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_farmer_keys_HXX_ #define INCLUDE_mmx_Wallet_get_all_farmer_keys_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_farmer_keys : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc6a03b3f813d071dull; Wallet_get_all_farmer_keys() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_farmer_keys& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_farmer_keys& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_farmer_keys::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_farmer_keys_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_all_farmer_keys_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_all_farmer_keys_return_HXX_ #define INCLUDE_mmx_Wallet_get_all_farmer_keys_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_all_farmer_keys_return : public ::vnx::Value { public: std::vector> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa2de9b0aaffc515aull; Wallet_get_all_farmer_keys_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_farmer_keys_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_all_farmer_keys_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_all_farmer_keys_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_all_farmer_keys_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_balance.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_balance_HXX_ #define INCLUDE_mmx_Wallet_get_balance_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_balance : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t currency; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1bc2c2dd67ab2829ull; Wallet_get_balance() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_balance& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_balance& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_balance::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("currency", 1); _visitor.accept(currency); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_balance_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_balance_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_balance_return_HXX_ #define INCLUDE_mmx_Wallet_get_balance_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_balance_return : public ::vnx::Value { public: ::mmx::balance_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfa00e6f62563141full; Wallet_get_balance_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_balance_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_balance_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_balance_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_balance_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_balances_HXX_ #define INCLUDE_mmx_Wallet_get_balances_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_balances : public ::vnx::Value { public: uint32_t index = 0; vnx::bool_t with_zero = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5be581d54ae69a4ull; Wallet_get_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_balances& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("with_zero", 1); _visitor.accept(with_zero); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_balances_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_balances_return_HXX_ #define INCLUDE_mmx_Wallet_get_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::balance_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe041fcc6b3606c0full; Wallet_get_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contract_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contract_balances_HXX_ #define INCLUDE_mmx_Wallet_get_contract_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contract_balances : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4d6b36c0c2804d26ull; Wallet_get_contract_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contract_balances& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contract_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contract_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contract_balances_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contract_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contract_balances_return_HXX_ #define INCLUDE_mmx_Wallet_get_contract_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contract_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::balance_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7800bce5a77b8bdcull; Wallet_get_contract_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contract_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contract_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contract_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contract_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contracts.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contracts_HXX_ #define INCLUDE_mmx_Wallet_get_contracts_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contracts : public ::vnx::Value { public: uint32_t index = 0; vnx::optional type_name; vnx::optional<::mmx::hash_t> type_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9ff1932bcec18d57ull; Wallet_get_contracts() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contracts& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contracts::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("type_name", 1); _visitor.accept(type_name); _visitor.type_field("type_hash", 2); _visitor.accept(type_hash); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contracts_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contracts_owned.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contracts_owned_HXX_ #define INCLUDE_mmx_Wallet_get_contracts_owned_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contracts_owned : public ::vnx::Value { public: uint32_t index = 0; vnx::optional type_name; vnx::optional<::mmx::hash_t> type_hash; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7834485ec000f577ull; Wallet_get_contracts_owned() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_owned& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contracts_owned& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contracts_owned::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("type_name", 1); _visitor.accept(type_name); _visitor.type_field("type_hash", 2); _visitor.accept(type_hash); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contracts_owned_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contracts_owned_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contracts_owned_return_HXX_ #define INCLUDE_mmx_Wallet_get_contracts_owned_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contracts_owned_return : public ::vnx::Value { public: std::map<::mmx::addr_t, std::shared_ptr> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x40aec1bc5f5f5c90ull; Wallet_get_contracts_owned_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_owned_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contracts_owned_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contracts_owned_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contracts_owned_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_contracts_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_contracts_return_HXX_ #define INCLUDE_mmx_Wallet_get_contracts_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_contracts_return : public ::vnx::Value { public: std::map<::mmx::addr_t, std::shared_ptr> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf384dd12e1fac072ull; Wallet_get_contracts_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_contracts_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_contracts_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_contracts_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_farmer_keys.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_farmer_keys_HXX_ #define INCLUDE_mmx_Wallet_get_farmer_keys_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_farmer_keys : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x44709e11ff3ff3eeull; Wallet_get_farmer_keys() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_farmer_keys& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_farmer_keys& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_farmer_keys::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_farmer_keys_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_farmer_keys_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_farmer_keys_return_HXX_ #define INCLUDE_mmx_Wallet_get_farmer_keys_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_farmer_keys_return : public ::vnx::Value { public: std::pair<::mmx::skey_t, ::mmx::pubkey_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x25479f868269fbb0ull; Wallet_get_farmer_keys_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_farmer_keys_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_farmer_keys_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_farmer_keys_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_farmer_keys_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_history.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_history_HXX_ #define INCLUDE_mmx_Wallet_get_history_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_history : public ::vnx::Value { public: uint32_t index = 0; ::mmx::query_filter_t filter; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x921f73f3d97d2d4dull; Wallet_get_history() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_history& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_history& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_history::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("filter", 1); _visitor.accept(filter); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_history_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_history_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_history_return_HXX_ #define INCLUDE_mmx_Wallet_get_history_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_history_return : public ::vnx::Value { public: std::vector<::mmx::tx_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb1b8c9a446a81b1full; Wallet_get_history_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_history_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_history_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_history_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_history_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_master_seed.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_master_seed_HXX_ #define INCLUDE_mmx_Wallet_get_master_seed_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_master_seed : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8fddd77ece4d295bull; Wallet_get_master_seed() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_master_seed& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_master_seed& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_master_seed::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_master_seed_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_master_seed_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_master_seed_return_HXX_ #define INCLUDE_mmx_Wallet_get_master_seed_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_master_seed_return : public ::vnx::Value { public: ::mmx::hash_t _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b0f38e742e132f0ull; Wallet_get_master_seed_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_master_seed_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_master_seed_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_master_seed_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_master_seed_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_mnemonic_seed.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_mnemonic_seed_HXX_ #define INCLUDE_mmx_Wallet_get_mnemonic_seed_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_mnemonic_seed : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xacf58d3b1a8ce4c0ull; Wallet_get_mnemonic_seed() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_seed& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_seed& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_mnemonic_seed::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_mnemonic_seed_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_mnemonic_seed_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_mnemonic_seed_return_HXX_ #define INCLUDE_mmx_Wallet_get_mnemonic_seed_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_mnemonic_seed_return : public ::vnx::Value { public: std::vector _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd02dd0736911ac8bull; Wallet_get_mnemonic_seed_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_seed_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_seed_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_mnemonic_seed_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_mnemonic_seed_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_mnemonic_wordlist.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_mnemonic_wordlist_HXX_ #define INCLUDE_mmx_Wallet_get_mnemonic_wordlist_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_mnemonic_wordlist : public ::vnx::Value { public: std::string lang = "en"; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb833298e3ff28a44ull; Wallet_get_mnemonic_wordlist() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_wordlist& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_wordlist& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_mnemonic_wordlist::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("lang", 0); _visitor.accept(lang); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_mnemonic_wordlist_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_mnemonic_wordlist_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_mnemonic_wordlist_return_HXX_ #define INCLUDE_mmx_Wallet_get_mnemonic_wordlist_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_mnemonic_wordlist_return : public ::vnx::Value { public: std::vector _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8ce49a9b57ee5789ull; Wallet_get_mnemonic_wordlist_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_wordlist_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_wordlist_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_mnemonic_wordlist_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_mnemonic_wordlist_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_offers.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_offers_HXX_ #define INCLUDE_mmx_Wallet_get_offers_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_offers : public ::vnx::Value { public: uint32_t index = 0; vnx::bool_t state = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6dacbe70cbe08925ull; Wallet_get_offers() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_offers& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_offers& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_offers::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("state", 1); _visitor.accept(state); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_offers_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_offers_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_offers_return_HXX_ #define INCLUDE_mmx_Wallet_get_offers_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_offers_return : public ::vnx::Value { public: std::vector<::mmx::offer_data_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdb130e20d160c564ull; Wallet_get_offers_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_offers_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_offers_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_offers_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_offers_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_swap_liquidity.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_swap_liquidity_HXX_ #define INCLUDE_mmx_Wallet_get_swap_liquidity_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_swap_liquidity : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3a8f17d496f625bull; Wallet_get_swap_liquidity() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_swap_liquidity& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_swap_liquidity& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_swap_liquidity::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_swap_liquidity_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_swap_liquidity_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_swap_liquidity_return_HXX_ #define INCLUDE_mmx_Wallet_get_swap_liquidity_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_swap_liquidity_return : public ::vnx::Value { public: std::map<::mmx::addr_t, std::array, 2>> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6846e8caa82b1463ull; Wallet_get_swap_liquidity_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_swap_liquidity_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_swap_liquidity_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_swap_liquidity_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_swap_liquidity_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_token_list.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_token_list_HXX_ #define INCLUDE_mmx_Wallet_get_token_list_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_token_list : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x322b4f4af3737efcull; Wallet_get_token_list() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_token_list& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_token_list& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_token_list::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_token_list_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_token_list_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_token_list_return_HXX_ #define INCLUDE_mmx_Wallet_get_token_list_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_token_list_return : public ::vnx::Value { public: std::set<::mmx::addr_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe36d7210ddf3d216ull; Wallet_get_token_list_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_token_list_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_token_list_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_token_list_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_token_list_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_total_balances.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_total_balances_HXX_ #define INCLUDE_mmx_Wallet_get_total_balances_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_total_balances : public ::vnx::Value { public: std::vector<::mmx::addr_t> addresses; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xedd130caba2e2f04ull; Wallet_get_total_balances() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_total_balances& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_total_balances& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_total_balances::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("addresses", 0); _visitor.accept(addresses); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_total_balances_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_total_balances_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_total_balances_return_HXX_ #define INCLUDE_mmx_Wallet_get_total_balances_return_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_total_balances_return : public ::vnx::Value { public: std::map<::mmx::addr_t, ::mmx::balance_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x46f0368d7c4e45ddull; Wallet_get_total_balances_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_total_balances_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_total_balances_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_total_balances_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_total_balances_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_tx_log.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_tx_log_HXX_ #define INCLUDE_mmx_Wallet_get_tx_log_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_get_tx_log : public ::vnx::Value { public: uint32_t index = 0; int32_t limit = 100; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc5570936be29c0ebull; Wallet_get_tx_log() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_tx_log& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_tx_log& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_tx_log::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("limit", 1); _visitor.accept(limit); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_tx_log_HXX_ ================================================ FILE: generated/include/mmx/Wallet_get_tx_log_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_get_tx_log_return_HXX_ #define INCLUDE_mmx_Wallet_get_tx_log_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_get_tx_log_return : public ::vnx::Value { public: std::vector<::mmx::tx_log_entry_t> _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5c6d4b8fc9820ec1ull; Wallet_get_tx_log_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_get_tx_log_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_get_tx_log_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_get_tx_log_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_get_tx_log_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_import_wallet.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_import_wallet_HXX_ #define INCLUDE_mmx_Wallet_import_wallet_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_import_wallet : public ::vnx::Value { public: ::mmx::account_t config; std::shared_ptr key_file; vnx::optional passphrase; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x63a1d5b2fe482dd1ull; Wallet_import_wallet() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_import_wallet& _value); friend std::istream& operator>>(std::istream& _in, Wallet_import_wallet& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_import_wallet::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("config", 0); _visitor.accept(config); _visitor.type_field("key_file", 1); _visitor.accept(key_file); _visitor.type_field("passphrase", 2); _visitor.accept(passphrase); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_import_wallet_HXX_ ================================================ FILE: generated/include/mmx/Wallet_import_wallet_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_import_wallet_return_HXX_ #define INCLUDE_mmx_Wallet_import_wallet_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_import_wallet_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc6edac537d44ecd1ull; Wallet_import_wallet_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_import_wallet_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_import_wallet_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_import_wallet_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_import_wallet_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_is_locked.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_is_locked_HXX_ #define INCLUDE_mmx_Wallet_is_locked_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_is_locked : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6087e83febcc233ull; Wallet_is_locked() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_is_locked& _value); friend std::istream& operator>>(std::istream& _in, Wallet_is_locked& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_is_locked::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_is_locked_HXX_ ================================================ FILE: generated/include/mmx/Wallet_is_locked_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_is_locked_return_HXX_ #define INCLUDE_mmx_Wallet_is_locked_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_is_locked_return : public ::vnx::Value { public: vnx::bool_t _ret_0 = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1ea1b30193de8d7bull; Wallet_is_locked_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_is_locked_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_is_locked_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_is_locked_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_is_locked_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_lock.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_lock_HXX_ #define INCLUDE_mmx_Wallet_lock_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_lock : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9072deb8ab538b2bull; Wallet_lock() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_lock& _value); friend std::istream& operator>>(std::istream& _in, Wallet_lock& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_lock::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_lock_HXX_ ================================================ FILE: generated/include/mmx/Wallet_lock_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_lock_return_HXX_ #define INCLUDE_mmx_Wallet_lock_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_lock_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x74cb9d670ae675f3ull; Wallet_lock_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_lock_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_lock_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_lock_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_lock_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_make_offer.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_make_offer_HXX_ #define INCLUDE_mmx_Wallet_make_offer_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_make_offer : public ::vnx::Value { public: uint32_t index = 0; uint32_t owner = 0; ::mmx::uint128 bid_amount; ::mmx::addr_t bid_currency; ::mmx::uint128 ask_amount; ::mmx::addr_t ask_currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b0cf597e8265a73ull; Wallet_make_offer() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_make_offer& _value); friend std::istream& operator>>(std::istream& _in, Wallet_make_offer& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_make_offer::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("owner", 1); _visitor.accept(owner); _visitor.type_field("bid_amount", 2); _visitor.accept(bid_amount); _visitor.type_field("bid_currency", 3); _visitor.accept(bid_currency); _visitor.type_field("ask_amount", 4); _visitor.accept(ask_amount); _visitor.type_field("ask_currency", 5); _visitor.accept(ask_currency); _visitor.type_field("options", 6); _visitor.accept(options); _visitor.template type_end(7); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_make_offer_HXX_ ================================================ FILE: generated/include/mmx/Wallet_make_offer_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_make_offer_return_HXX_ #define INCLUDE_mmx_Wallet_make_offer_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_make_offer_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf8ecff218266aadaull; Wallet_make_offer_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_make_offer_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_make_offer_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_make_offer_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_make_offer_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_mark_spent.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_mark_spent_HXX_ #define INCLUDE_mmx_Wallet_mark_spent_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_mark_spent : public ::vnx::Value { public: uint32_t index = 0; std::map, ::mmx::uint128> amounts; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x107fed23348b3333ull; Wallet_mark_spent() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_mark_spent& _value); friend std::istream& operator>>(std::istream& _in, Wallet_mark_spent& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_mark_spent::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amounts", 1); _visitor.accept(amounts); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_mark_spent_HXX_ ================================================ FILE: generated/include/mmx/Wallet_mark_spent_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_mark_spent_return_HXX_ #define INCLUDE_mmx_Wallet_mark_spent_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_mark_spent_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf28950d2b8f874dfull; Wallet_mark_spent_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_mark_spent_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_mark_spent_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_mark_spent_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_mark_spent_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_offer_trade.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_offer_trade_HXX_ #define INCLUDE_mmx_Wallet_offer_trade_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_offer_trade : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; ::mmx::uint128 amount; uint32_t dst_addr = 0; ::mmx::uint128 price; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x557a94a5a4887bf2ull; Wallet_offer_trade() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_offer_trade& _value); friend std::istream& operator>>(std::istream& _in, Wallet_offer_trade& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_offer_trade::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("dst_addr", 3); _visitor.accept(dst_addr); _visitor.type_field("price", 4); _visitor.accept(price); _visitor.type_field("options", 5); _visitor.accept(options); _visitor.template type_end(6); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_offer_trade_HXX_ ================================================ FILE: generated/include/mmx/Wallet_offer_trade_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_offer_trade_return_HXX_ #define INCLUDE_mmx_Wallet_offer_trade_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_offer_trade_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb43f9bef89670cebull; Wallet_offer_trade_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_offer_trade_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_offer_trade_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_offer_trade_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_offer_trade_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_offer_withdraw.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_offer_withdraw_HXX_ #define INCLUDE_mmx_Wallet_offer_withdraw_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_offer_withdraw : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x790a334fbf5dd1e6ull; Wallet_offer_withdraw() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_offer_withdraw& _value); friend std::istream& operator>>(std::istream& _in, Wallet_offer_withdraw& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_offer_withdraw::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("options", 2); _visitor.accept(options); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_offer_withdraw_HXX_ ================================================ FILE: generated/include/mmx/Wallet_offer_withdraw_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_offer_withdraw_return_HXX_ #define INCLUDE_mmx_Wallet_offer_withdraw_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_offer_withdraw_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xea9f43cd17c41965ull; Wallet_offer_withdraw_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_offer_withdraw_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_offer_withdraw_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_offer_withdraw_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_offer_withdraw_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_plotnft_create.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_plotnft_create_HXX_ #define INCLUDE_mmx_Wallet_plotnft_create_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_plotnft_create : public ::vnx::Value { public: uint32_t index = 0; std::string name; vnx::optional owner; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6b0c985ca2c555c9ull; Wallet_plotnft_create() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_create& _value); friend std::istream& operator>>(std::istream& _in, Wallet_plotnft_create& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_plotnft_create::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("owner", 2); _visitor.accept(owner); _visitor.type_field("options", 3); _visitor.accept(options); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_plotnft_create_HXX_ ================================================ FILE: generated/include/mmx/Wallet_plotnft_create_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_plotnft_create_return_HXX_ #define INCLUDE_mmx_Wallet_plotnft_create_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_plotnft_create_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x349cedc7d1d4dcfull; Wallet_plotnft_create_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_create_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_plotnft_create_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_plotnft_create_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_plotnft_create_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_plotnft_exec.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_plotnft_exec_HXX_ #define INCLUDE_mmx_Wallet_plotnft_exec_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_plotnft_exec : public ::vnx::Value { public: ::mmx::addr_t address; std::string method; std::vector<::vnx::Variant> args; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xca9e9d0dfde795d1ull; Wallet_plotnft_exec() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_exec& _value); friend std::istream& operator>>(std::istream& _in, Wallet_plotnft_exec& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_plotnft_exec::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("method", 1); _visitor.accept(method); _visitor.type_field("args", 2); _visitor.accept(args); _visitor.type_field("options", 3); _visitor.accept(options); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_plotnft_exec_HXX_ ================================================ FILE: generated/include/mmx/Wallet_plotnft_exec_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_plotnft_exec_return_HXX_ #define INCLUDE_mmx_Wallet_plotnft_exec_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_plotnft_exec_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8330b38d9cb47b24ull; Wallet_plotnft_exec_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_exec_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_plotnft_exec_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_plotnft_exec_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_plotnft_exec_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_release.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_release_HXX_ #define INCLUDE_mmx_Wallet_release_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_release : public ::vnx::Value { public: uint32_t index = 0; std::map, ::mmx::uint128> amounts; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2cd72a3370e05db3ull; Wallet_release() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_release& _value); friend std::istream& operator>>(std::istream& _in, Wallet_release& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_release::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amounts", 1); _visitor.accept(amounts); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_release_HXX_ ================================================ FILE: generated/include/mmx/Wallet_release_all.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_release_all_HXX_ #define INCLUDE_mmx_Wallet_release_all_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_release_all : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4bd57b9deca4be51ull; Wallet_release_all() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_release_all& _value); friend std::istream& operator>>(std::istream& _in, Wallet_release_all& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_release_all::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_release_all_HXX_ ================================================ FILE: generated/include/mmx/Wallet_release_all_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_release_all_return_HXX_ #define INCLUDE_mmx_Wallet_release_all_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_release_all_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf7029fb06b3b3fa5ull; Wallet_release_all_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_release_all_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_release_all_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_release_all_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_release_all_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_release_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_release_return_HXX_ #define INCLUDE_mmx_Wallet_release_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_release_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd302995a8c4dcf83ull; Wallet_release_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_release_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_release_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_release_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_release_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_rem_token.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_rem_token_HXX_ #define INCLUDE_mmx_Wallet_rem_token_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_rem_token : public ::vnx::Value { public: ::mmx::addr_t address; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc913cdd1600a2609ull; Wallet_rem_token() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_rem_token& _value); friend std::istream& operator>>(std::istream& _in, Wallet_rem_token& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_rem_token::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_rem_token_HXX_ ================================================ FILE: generated/include/mmx/Wallet_rem_token_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_rem_token_return_HXX_ #define INCLUDE_mmx_Wallet_rem_token_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_rem_token_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb59ee8fb44d30755ull; Wallet_rem_token_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_rem_token_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_rem_token_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_rem_token_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_rem_token_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_remove_account.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_remove_account_HXX_ #define INCLUDE_mmx_Wallet_remove_account_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_remove_account : public ::vnx::Value { public: uint32_t index = 0; uint32_t account = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xdf7d8816958bcb8bull; Wallet_remove_account() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_remove_account& _value); friend std::istream& operator>>(std::istream& _in, Wallet_remove_account& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_remove_account::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("account", 1); _visitor.accept(account); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_remove_account_HXX_ ================================================ FILE: generated/include/mmx/Wallet_remove_account_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_remove_account_return_HXX_ #define INCLUDE_mmx_Wallet_remove_account_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_remove_account_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8e0d71e4003dca80ull; Wallet_remove_account_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_remove_account_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_remove_account_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_remove_account_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_remove_account_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_reserve.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_reserve_HXX_ #define INCLUDE_mmx_Wallet_reserve_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_reserve : public ::vnx::Value { public: uint32_t index = 0; std::map, ::mmx::uint128> amounts; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd14c466e8e7ebd76ull; Wallet_reserve() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_reserve& _value); friend std::istream& operator>>(std::istream& _in, Wallet_reserve& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_reserve::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amounts", 1); _visitor.accept(amounts); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_reserve_HXX_ ================================================ FILE: generated/include/mmx/Wallet_reserve_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_reserve_return_HXX_ #define INCLUDE_mmx_Wallet_reserve_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_reserve_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x79de0793f575d4d6ull; Wallet_reserve_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_reserve_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_reserve_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_reserve_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_reserve_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_reset_cache.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_reset_cache_HXX_ #define INCLUDE_mmx_Wallet_reset_cache_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_reset_cache : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x922c4f0299ea0bf4ull; Wallet_reset_cache() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_reset_cache& _value); friend std::istream& operator>>(std::istream& _in, Wallet_reset_cache& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_reset_cache::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_reset_cache_HXX_ ================================================ FILE: generated/include/mmx/Wallet_reset_cache_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_reset_cache_return_HXX_ #define INCLUDE_mmx_Wallet_reset_cache_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_reset_cache_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x59e9fbfbf5d8218bull; Wallet_reset_cache_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_reset_cache_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_reset_cache_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_reset_cache_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_reset_cache_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_HXX_ #define INCLUDE_mmx_Wallet_send_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_send : public ::vnx::Value { public: uint32_t index = 0; ::mmx::uint128 amount; ::mmx::addr_t dst_addr; ::mmx::addr_t currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3842658ae3c2d5ebull; Wallet_send() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amount", 1); _visitor.accept(amount); _visitor.type_field("dst_addr", 2); _visitor.accept(dst_addr); _visitor.type_field("currency", 3); _visitor.accept(currency); _visitor.type_field("options", 4); _visitor.accept(options); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_from.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_from_HXX_ #define INCLUDE_mmx_Wallet_send_from_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_from : public ::vnx::Value { public: uint32_t index = 0; ::mmx::uint128 amount; ::mmx::addr_t dst_addr; ::mmx::addr_t src_addr; ::mmx::addr_t currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x40c3c88665341592ull; Wallet_send_from() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_from& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_from& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_from::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amount", 1); _visitor.accept(amount); _visitor.type_field("dst_addr", 2); _visitor.accept(dst_addr); _visitor.type_field("src_addr", 3); _visitor.accept(src_addr); _visitor.type_field("currency", 4); _visitor.accept(currency); _visitor.type_field("options", 5); _visitor.accept(options); _visitor.template type_end(6); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_from_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_from_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_from_return_HXX_ #define INCLUDE_mmx_Wallet_send_from_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_from_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf578239f07abf05dull; Wallet_send_from_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_from_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_from_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_from_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_from_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_many.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_many_HXX_ #define INCLUDE_mmx_Wallet_send_many_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_many : public ::vnx::Value { public: uint32_t index = 0; std::vector> amounts; ::mmx::addr_t currency; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4f35769a1b4c6786ull; Wallet_send_many() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_many& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_many& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_many::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("amounts", 1); _visitor.accept(amounts); _visitor.type_field("currency", 2); _visitor.accept(currency); _visitor.type_field("options", 3); _visitor.accept(options); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_many_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_many_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_many_return_HXX_ #define INCLUDE_mmx_Wallet_send_many_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_many_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x828bddc86fbaf1e1ull; Wallet_send_many_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_many_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_many_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_many_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_many_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_off.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_off_HXX_ #define INCLUDE_mmx_Wallet_send_off_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_off : public ::vnx::Value { public: uint32_t index = 0; std::shared_ptr tx; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8b7bfc0751d27adbull; Wallet_send_off() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_off& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_off& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_off::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("tx", 1); _visitor.accept(tx); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_off_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_off_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_off_return_HXX_ #define INCLUDE_mmx_Wallet_send_off_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_send_off_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9b9017e8636e8571ull; Wallet_send_off_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_off_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_off_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_off_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_off_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_send_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_send_return_HXX_ #define INCLUDE_mmx_Wallet_send_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_send_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5df7b911342a1e6full; Wallet_send_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_send_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_send_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_send_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_send_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_set_address_count.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_set_address_count_HXX_ #define INCLUDE_mmx_Wallet_set_address_count_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_set_address_count : public ::vnx::Value { public: uint32_t index = 0; uint32_t count = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9638ddc0c1d52b15ull; Wallet_set_address_count() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_set_address_count& _value); friend std::istream& operator>>(std::istream& _in, Wallet_set_address_count& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_set_address_count::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("count", 1); _visitor.accept(count); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_set_address_count_HXX_ ================================================ FILE: generated/include/mmx/Wallet_set_address_count_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_set_address_count_return_HXX_ #define INCLUDE_mmx_Wallet_set_address_count_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_set_address_count_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5948620640c50bf8ull; Wallet_set_address_count_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_set_address_count_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_set_address_count_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_set_address_count_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_set_address_count_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_sign_msg.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_sign_msg_HXX_ #define INCLUDE_mmx_Wallet_sign_msg_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_sign_msg : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; ::mmx::hash_t msg; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5bc54cc8b0112d3aull; Wallet_sign_msg() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_sign_msg& _value); friend std::istream& operator>>(std::istream& _in, Wallet_sign_msg& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_sign_msg::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("msg", 2); _visitor.accept(msg); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_sign_msg_HXX_ ================================================ FILE: generated/include/mmx/Wallet_sign_msg_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_sign_msg_return_HXX_ #define INCLUDE_mmx_Wallet_sign_msg_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_sign_msg_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5cf2f6b20fa33f51ull; Wallet_sign_msg_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_sign_msg_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_sign_msg_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_sign_msg_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_sign_msg_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_sign_off.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_sign_off_HXX_ #define INCLUDE_mmx_Wallet_sign_off_HXX_ #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_sign_off : public ::vnx::Value { public: uint32_t index = 0; std::shared_ptr tx; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x232c89cf3ed4d5b1ull; Wallet_sign_off() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_sign_off& _value); friend std::istream& operator>>(std::istream& _in, Wallet_sign_off& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_sign_off::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("tx", 1); _visitor.accept(tx); _visitor.type_field("options", 2); _visitor.accept(options); _visitor.template type_end(3); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_sign_off_HXX_ ================================================ FILE: generated/include/mmx/Wallet_sign_off_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_sign_off_return_HXX_ #define INCLUDE_mmx_Wallet_sign_off_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_sign_off_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4b2ee7febe4ec00aull; Wallet_sign_off_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_sign_off_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_sign_off_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_sign_off_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_sign_off_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_add_liquid.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_add_liquid_HXX_ #define INCLUDE_mmx_Wallet_swap_add_liquid_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_add_liquid : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; std::array<::mmx::uint128, 2> amount = {}; uint32_t pool_idx = 0; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe053d1ae718e2f64ull; Wallet_swap_add_liquid() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_add_liquid& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_add_liquid& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_add_liquid::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("pool_idx", 3); _visitor.accept(pool_idx); _visitor.type_field("options", 4); _visitor.accept(options); _visitor.template type_end(5); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_add_liquid_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_add_liquid_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_add_liquid_return_HXX_ #define INCLUDE_mmx_Wallet_swap_add_liquid_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_add_liquid_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc2812565c73ec527ull; Wallet_swap_add_liquid_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_add_liquid_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_add_liquid_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_add_liquid_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_add_liquid_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_rem_liquid.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_rem_liquid_HXX_ #define INCLUDE_mmx_Wallet_swap_rem_liquid_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_rem_liquid : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; std::array<::mmx::uint128, 2> amount = {}; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6494b41c51e158eaull; Wallet_swap_rem_liquid() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_rem_liquid& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_rem_liquid& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_rem_liquid::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("options", 3); _visitor.accept(options); _visitor.template type_end(4); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_rem_liquid_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_rem_liquid_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_rem_liquid_return_HXX_ #define INCLUDE_mmx_Wallet_swap_rem_liquid_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_rem_liquid_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x946935a83dd0b8d2ull; Wallet_swap_rem_liquid_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_rem_liquid_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_rem_liquid_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_rem_liquid_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_rem_liquid_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_trade.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_trade_HXX_ #define INCLUDE_mmx_Wallet_swap_trade_HXX_ #include #include #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_trade : public ::vnx::Value { public: uint32_t index = 0; ::mmx::addr_t address; ::mmx::uint128 amount; ::mmx::addr_t currency; vnx::optional<::mmx::uint128> min_trade; int32_t num_iter = 20; ::mmx::spend_options_t options; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x4b5a42cbf6657910ull; Wallet_swap_trade() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_trade& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_trade& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_trade::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("currency", 3); _visitor.accept(currency); _visitor.type_field("min_trade", 4); _visitor.accept(min_trade); _visitor.type_field("num_iter", 5); _visitor.accept(num_iter); _visitor.type_field("options", 6); _visitor.accept(options); _visitor.template type_end(7); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_trade_HXX_ ================================================ FILE: generated/include/mmx/Wallet_swap_trade_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_swap_trade_return_HXX_ #define INCLUDE_mmx_Wallet_swap_trade_return_HXX_ #include #include #include namespace mmx { class MMX_EXPORT Wallet_swap_trade_return : public ::vnx::Value { public: std::shared_ptr _ret_0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8fe4c13b007c63f4ull; Wallet_swap_trade_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_swap_trade_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_swap_trade_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_swap_trade_return::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("_ret_0", 0); _visitor.accept(_ret_0); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_swap_trade_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_unlock.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_unlock_HXX_ #define INCLUDE_mmx_Wallet_unlock_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_unlock : public ::vnx::Value { public: uint32_t index = 0; std::string passphrase; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x800deedf12a4df74ull; Wallet_unlock() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_unlock& _value); friend std::istream& operator>>(std::istream& _in, Wallet_unlock& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_unlock::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("passphrase", 1); _visitor.accept(passphrase); _visitor.template type_end(2); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_unlock_HXX_ ================================================ FILE: generated/include/mmx/Wallet_unlock_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_unlock_return_HXX_ #define INCLUDE_mmx_Wallet_unlock_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_unlock_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe8e5c839343f6bbcull; Wallet_unlock_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_unlock_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_unlock_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_unlock_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_unlock_return_HXX_ ================================================ FILE: generated/include/mmx/Wallet_update_cache.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_update_cache_HXX_ #define INCLUDE_mmx_Wallet_update_cache_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_update_cache : public ::vnx::Value { public: uint32_t index = 0; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf98cf07accda73b8ull; Wallet_update_cache() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_update_cache& _value); friend std::istream& operator>>(std::istream& _in, Wallet_update_cache& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_update_cache::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.template type_end(1); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_update_cache_HXX_ ================================================ FILE: generated/include/mmx/Wallet_update_cache_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_Wallet_update_cache_return_HXX_ #define INCLUDE_mmx_Wallet_update_cache_return_HXX_ #include #include namespace mmx { class MMX_EXPORT Wallet_update_cache_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7e1b25fb37caf248ull; Wallet_update_cache_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Wallet_update_cache_return& _value); friend std::istream& operator>>(std::istream& _in, Wallet_update_cache_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void Wallet_update_cache_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_Wallet_update_cache_return_HXX_ ================================================ FILE: generated/include/mmx/WebAPIAsyncClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WebAPI_ASYNC_CLIENT_HXX_ #define INCLUDE_mmx_WebAPI_ASYNC_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include namespace mmx { class WebAPIAsyncClient : public vnx::AsyncClient { public: WebAPIAsyncClient(const std::string& service_name); WebAPIAsyncClient(vnx::Hash64 service_addr); uint64_t shutdown( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t http_request(std::shared_ptr request = nullptr, const std::string& sub_path = "", const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0, const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config_object( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_config(const std::string& name = "", const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant(), const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_type_code( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_get_module_info( const std::function)>& _callback = std::function)>(), const std::function& _error_callback = std::function()); uint64_t vnx_restart( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_stop( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); uint64_t vnx_self_test( const std::function& _callback = std::function(), const std::function& _error_callback = std::function()); protected: int32_t vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) override; int32_t vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) override; private: std::unordered_map, std::function>> vnx_queue_shutdown; std::unordered_map)>, std::function>> vnx_queue_http_request; std::unordered_map)>, std::function>> vnx_queue_http_request_chunk; std::unordered_map, std::function>> vnx_queue_vnx_get_config_object; std::unordered_map, std::function>> vnx_queue_vnx_get_config; std::unordered_map, std::function>> vnx_queue_vnx_set_config_object; std::unordered_map, std::function>> vnx_queue_vnx_set_config; std::unordered_map, std::function>> vnx_queue_vnx_get_type_code; std::unordered_map)>, std::function>> vnx_queue_vnx_get_module_info; std::unordered_map, std::function>> vnx_queue_vnx_restart; std::unordered_map, std::function>> vnx_queue_vnx_stop; std::unordered_map, std::function>> vnx_queue_vnx_self_test; }; } // namespace mmx #endif // INCLUDE_mmx_WebAPI_ASYNC_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/WebAPIBase.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WebAPIBase_HXX_ #define INCLUDE_mmx_WebAPIBase_HXX_ #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT WebAPIBase : public ::vnx::Module { public: ::vnx::TopicPtr input_blocks = "node.verified_blocks"; ::vnx::TopicPtr input_proofs = "harvester.proof"; std::string node_server = "Node"; std::string wallet_server = "Wallet"; std::string farmer_server = "Farmer"; std::string exchange_server = "ExchClient"; std::string config_path; uint32_t max_recursion = 100; uint32_t max_log_history = 10000; uint32_t sync_delay = 18; uint32_t cache_max_age = 0; typedef ::vnx::Module Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xfe90ce601fcc0cc6ull; WebAPIBase(const std::string& _vnx_name); vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WebAPIBase& _value); friend std::istream& operator>>(std::istream& _in, WebAPIBase& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: using Super::handle; virtual void shutdown() = 0; virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void handle(std::shared_ptr _value) {} virtual void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& _request_id) const = 0; void http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; virtual void http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& _request_id) const = 0; void http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const; void vnx_handle_switch(std::shared_ptr _value) override; std::shared_ptr vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) override; }; template void WebAPIBase::accept_generic(T& _visitor) const { _visitor.template type_begin(11); _visitor.type_field("input_blocks", 0); _visitor.accept(input_blocks); _visitor.type_field("input_proofs", 1); _visitor.accept(input_proofs); _visitor.type_field("node_server", 2); _visitor.accept(node_server); _visitor.type_field("wallet_server", 3); _visitor.accept(wallet_server); _visitor.type_field("farmer_server", 4); _visitor.accept(farmer_server); _visitor.type_field("exchange_server", 5); _visitor.accept(exchange_server); _visitor.type_field("config_path", 6); _visitor.accept(config_path); _visitor.type_field("max_recursion", 7); _visitor.accept(max_recursion); _visitor.type_field("max_log_history", 8); _visitor.accept(max_log_history); _visitor.type_field("sync_delay", 9); _visitor.accept(sync_delay); _visitor.type_field("cache_max_age", 10); _visitor.accept(cache_max_age); _visitor.template type_end(11); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_WebAPIBase_HXX_ ================================================ FILE: generated/include/mmx/WebAPIClient.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WebAPI_CLIENT_HXX_ #define INCLUDE_mmx_WebAPI_CLIENT_HXX_ #include #include #include #include #include #include #include #include #include namespace mmx { class WebAPIClient : public vnx::Client { public: WebAPIClient(const std::string& service_name); WebAPIClient(vnx::Hash64 service_addr); void shutdown(); void shutdown_async(); std::shared_ptr http_request(std::shared_ptr request = nullptr, const std::string& sub_path = ""); std::shared_ptr http_request_chunk(std::shared_ptr request = nullptr, const std::string& sub_path = "", const int64_t& offset = 0, const int64_t& max_bytes = 0); ::vnx::Object vnx_get_config_object(); ::vnx::Variant vnx_get_config(const std::string& name = ""); void vnx_set_config_object(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config_object_async(const ::vnx::Object& config = ::vnx::Object()); void vnx_set_config(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); void vnx_set_config_async(const std::string& name = "", const ::vnx::Variant& value = ::vnx::Variant()); ::vnx::TypeCode vnx_get_type_code(); std::shared_ptr vnx_get_module_info(); void vnx_restart(); void vnx_restart_async(); void vnx_stop(); void vnx_stop_async(); vnx::bool_t vnx_self_test(); }; } // namespace mmx #endif // INCLUDE_mmx_WebAPI_CLIENT_HXX_ ================================================ FILE: generated/include/mmx/WebAPI_shutdown.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WebAPI_shutdown_HXX_ #define INCLUDE_mmx_WebAPI_shutdown_HXX_ #include #include namespace mmx { class MMX_EXPORT WebAPI_shutdown : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x75dd6111dc25b9d6ull; WebAPI_shutdown() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WebAPI_shutdown& _value); friend std::istream& operator>>(std::istream& _in, WebAPI_shutdown& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void WebAPI_shutdown::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_WebAPI_shutdown_HXX_ ================================================ FILE: generated/include/mmx/WebAPI_shutdown_return.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_WebAPI_shutdown_return_HXX_ #define INCLUDE_mmx_WebAPI_shutdown_return_HXX_ #include #include namespace mmx { class MMX_EXPORT WebAPI_shutdown_return : public ::vnx::Value { public: typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x248624ff297c34ull; WebAPI_shutdown_return() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const WebAPI_shutdown_return& _value); friend std::istream& operator>>(std::istream& _in, WebAPI_shutdown_return& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void WebAPI_shutdown_return::accept_generic(T& _visitor) const { _visitor.template type_begin(0); _visitor.template type_end(0); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_WebAPI_shutdown_return_HXX_ ================================================ FILE: generated/include/mmx/accept_generic.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ACCEPT_GENERIC_HXX_ #define INCLUDE_mmx_ACCEPT_GENERIC_HXX_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace vnx { template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else { value->accept_generic(visitor); } } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else { value->accept_generic(visitor); } } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else { value->accept_generic(visitor); } } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } } // namespace vnx #endif // INCLUDE_mmx_ACCEPT_GENERIC_HXX_ ================================================ FILE: generated/include/mmx/account_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_account_info_t_HXX_ #define INCLUDE_mmx_account_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT account_info_t : ::mmx::account_t { vnx::optional<::mmx::addr_t> address; uint32_t account = 0; typedef ::mmx::account_t Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5858a2f32468feaeull; account_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static ::mmx::account_info_t make(const uint32_t& account = 0, const vnx::optional<::mmx::addr_t>& address = nullptr, const ::mmx::account_t& config = ::mmx::account_t()); static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const account_info_t& _value); friend std::istream& operator>>(std::istream& _in, account_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void account_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("num_addresses", 1); _visitor.accept(num_addresses); _visitor.type_field("name", 2); _visitor.accept(name); _visitor.type_field("key_file", 3); _visitor.accept(key_file); _visitor.type_field("finger_print", 4); _visitor.accept(finger_print); _visitor.type_field("with_passphrase", 5); _visitor.accept(with_passphrase); _visitor.type_field("is_hidden", 6); _visitor.accept(is_hidden); _visitor.type_field("address", 7); _visitor.accept(address); _visitor.type_field("account", 8); _visitor.accept(account); _visitor.template type_end(9); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::account_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_account_info_t_HXX_ ================================================ FILE: generated/include/mmx/account_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_account_t_HXX_ #define INCLUDE_mmx_account_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT account_t : vnx::struct_t { uint32_t index = 0; uint32_t num_addresses = 1; std::string name; std::string key_file; std::string finger_print; vnx::bool_t with_passphrase = 0; vnx::bool_t is_hidden = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc0c163f453729a7ull; account_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const account_t& _value); friend std::istream& operator>>(std::istream& _in, account_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void account_t::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("index", 0); _visitor.accept(index); _visitor.type_field("num_addresses", 1); _visitor.accept(num_addresses); _visitor.type_field("name", 2); _visitor.accept(name); _visitor.type_field("key_file", 3); _visitor.accept(key_file); _visitor.type_field("finger_print", 4); _visitor.accept(finger_print); _visitor.type_field("with_passphrase", 5); _visitor.accept(with_passphrase); _visitor.type_field("is_hidden", 6); _visitor.accept(is_hidden); _visitor.template type_end(7); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::account_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_account_t_HXX_ ================================================ FILE: generated/include/mmx/balance_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_balance_t_HXX_ #define INCLUDE_mmx_balance_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT balance_t : vnx::struct_t { ::mmx::uint128 spendable; ::mmx::uint128 reserved; ::mmx::uint128 locked; ::mmx::uint128 total; vnx::bool_t is_validated = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x613173c7e5ce65b4ull; balance_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const balance_t& _value); friend std::istream& operator>>(std::istream& _in, balance_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void balance_t::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("spendable", 0); _visitor.accept(spendable); _visitor.type_field("reserved", 1); _visitor.accept(reserved); _visitor.type_field("locked", 2); _visitor.accept(locked); _visitor.type_field("total", 3); _visitor.accept(total); _visitor.type_field("is_validated", 4); _visitor.accept(is_validated); _visitor.template type_end(5); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::balance_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_balance_t_HXX_ ================================================ FILE: generated/include/mmx/block_index_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_block_index_t_HXX_ #define INCLUDE_mmx_block_index_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT block_index_t : vnx::struct_t { ::mmx::hash_t hash; ::mmx::hash_t content_hash; uint32_t static_cost = 0; uint32_t total_cost = 0; int64_t file_offset = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd00c722670bca900ull; block_index_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const block_index_t& _value); friend std::istream& operator>>(std::istream& _in, block_index_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void block_index_t::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("hash", 0); _visitor.accept(hash); _visitor.type_field("content_hash", 1); _visitor.accept(content_hash); _visitor.type_field("static_cost", 2); _visitor.accept(static_cost); _visitor.type_field("total_cost", 3); _visitor.accept(total_cost); _visitor.type_field("file_offset", 4); _visitor.accept(file_offset); _visitor.template type_end(5); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::block_index_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_block_index_t_HXX_ ================================================ FILE: generated/include/mmx/compile_flags_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_compile_flags_t_HXX_ #define INCLUDE_mmx_compile_flags_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT compile_flags_t : vnx::struct_t { int32_t verbose = 0; int32_t opt_level = 3; vnx::bool_t catch_overflow = true; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2d1279b3d438d884ull; compile_flags_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const compile_flags_t& _value); friend std::istream& operator>>(std::istream& _in, compile_flags_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void compile_flags_t::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("verbose", 0); _visitor.accept(verbose); _visitor.type_field("opt_level", 1); _visitor.accept(opt_level); _visitor.type_field("catch_overflow", 2); _visitor.accept(catch_overflow); _visitor.template type_end(3); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::compile_flags_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_compile_flags_t_HXX_ ================================================ FILE: generated/include/mmx/error_code_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_error_code_e_HXX_ #define INCLUDE_mmx_error_code_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT error_code_e { enum enum_t : uint32_t { INSUFFICIENT_FUNDS = 1975784893l, INSUFFICIENT_FUNDS_TXFEE = 1882923049l, INVALID_CONTRACT = 914919857l, INVALID_OPERATION = 2667583392l, TXFEE_OVERRUN = 3169221647l, TX_EXPIRED = 327454547l, }; ::mmx::error_code_e::enum_t value = ::mmx::error_code_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc3330407879f46ull; error_code_e() {} error_code_e(const enum_t& _value) { value = _value; } error_code_e(const ::mmx::error_code_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } error_code_e& operator=(const enum_t& _value) { value = _value; return *this; } error_code_e& operator=(const ::mmx::error_code_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const error_code_e& _value); friend std::istream& operator>>(std::istream& _in, error_code_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void error_code_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::error_code_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::error_code_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::error_code_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::error_code_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::error_code_e& _value); ///< \private template<> std::string to_string(const ::mmx::error_code_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::error_code_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::error_code_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::error_code_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_error_code_e_HXX_ ================================================ FILE: generated/include/mmx/exec_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_exec_entry_t_HXX_ #define INCLUDE_mmx_exec_entry_t_HXX_ #include #include #include #include #include #include namespace mmx { struct MMX_EXPORT exec_entry_t : vnx::struct_t { uint32_t height = 0; int64_t time_stamp = 0; ::mmx::hash_t txid; std::string method; std::vector<::vnx::Variant> args; vnx::optional<::mmx::addr_t> user; vnx::optional> deposit; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xd30282844b1862a4ull; exec_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const exec_entry_t& _value); friend std::istream& operator>>(std::istream& _in, exec_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void exec_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("time_stamp", 1); _visitor.accept(time_stamp); _visitor.type_field("txid", 2); _visitor.accept(txid); _visitor.type_field("method", 3); _visitor.accept(method); _visitor.type_field("args", 4); _visitor.accept(args); _visitor.type_field("user", 5); _visitor.accept(user); _visitor.type_field("deposit", 6); _visitor.accept(deposit); _visitor.template type_end(7); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::exec_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_exec_entry_t_HXX_ ================================================ FILE: generated/include/mmx/exec_error_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_exec_error_t_HXX_ #define INCLUDE_mmx_exec_error_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT exec_error_t : vnx::struct_t { static const uint32_t MAX_MESSAGE_LENGTH = 160; uint32_t code = 0; uint32_t address = -1; uint32_t operation = -1; vnx::optional line; std::string message; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x5cd84f2d984d4bfull; exec_error_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; vnx::bool_t is_valid() const; ::mmx::hash_t calc_hash() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const exec_error_t& _value); friend std::istream& operator>>(std::istream& _in, exec_error_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void exec_error_t::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("code", 0); _visitor.accept(code); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("operation", 2); _visitor.accept(operation); _visitor.type_field("line", 3); _visitor.accept(line); _visitor.type_field("message", 4); _visitor.accept(message); _visitor.template type_end(5); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::exec_error_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_exec_error_t_HXX_ ================================================ FILE: generated/include/mmx/exec_result_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_exec_result_t_HXX_ #define INCLUDE_mmx_exec_result_t_HXX_ #include #include #include #include #include #include #include namespace mmx { struct MMX_EXPORT exec_result_t : vnx::struct_t { vnx::bool_t did_fail = 0; uint32_t total_cost = 0; uint32_t total_fee = 0; std::vector<::mmx::txin_t> inputs; std::vector<::mmx::txout_t> outputs; vnx::optional<::mmx::exec_error_t> error; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x18fe02e2374b039eull; exec_result_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; vnx::bool_t is_valid() const; ::mmx::hash_t calc_hash() const; uint64_t calc_cost(std::shared_ptr params = nullptr) const; std::string get_error_msg() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const exec_result_t& _value); friend std::istream& operator>>(std::istream& _in, exec_result_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void exec_result_t::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("did_fail", 0); _visitor.accept(did_fail); _visitor.type_field("total_cost", 1); _visitor.accept(total_cost); _visitor.type_field("total_fee", 2); _visitor.accept(total_fee); _visitor.type_field("inputs", 3); _visitor.accept(inputs); _visitor.type_field("outputs", 4); _visitor.accept(outputs); _visitor.type_field("error", 5); _visitor.accept(error); _visitor.template type_end(6); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::exec_result_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_exec_result_t_HXX_ ================================================ FILE: generated/include/mmx/farmed_block_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_farmed_block_info_t_HXX_ #define INCLUDE_mmx_farmed_block_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT farmed_block_info_t : vnx::struct_t { uint32_t height = 0; uint32_t reward = 0; ::mmx::addr_t reward_addr; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2e10154a52617b19ull; farmed_block_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const farmed_block_info_t& _value); friend std::istream& operator>>(std::istream& _in, farmed_block_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void farmed_block_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("reward", 1); _visitor.accept(reward); _visitor.type_field("reward_addr", 2); _visitor.accept(reward_addr); _visitor.template type_end(3); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::farmed_block_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_farmed_block_info_t_HXX_ ================================================ FILE: generated/include/mmx/farmed_block_summary_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_farmed_block_summary_t_HXX_ #define INCLUDE_mmx_farmed_block_summary_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT farmed_block_summary_t : vnx::struct_t { uint32_t num_blocks = 0; uint32_t last_height = 0; uint64_t total_rewards = 0; std::map<::mmx::addr_t, uint64_t> reward_map; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9fe2bac01782721dull; farmed_block_summary_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const farmed_block_summary_t& _value); friend std::istream& operator>>(std::istream& _in, farmed_block_summary_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void farmed_block_summary_t::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("num_blocks", 0); _visitor.accept(num_blocks); _visitor.type_field("last_height", 1); _visitor.accept(last_height); _visitor.type_field("total_rewards", 2); _visitor.accept(total_rewards); _visitor.type_field("reward_map", 3); _visitor.accept(reward_map); _visitor.template type_end(4); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::farmed_block_summary_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_farmed_block_summary_t_HXX_ ================================================ FILE: generated/include/mmx/node_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_node_info_t_HXX_ #define INCLUDE_mmx_node_info_t_HXX_ #include #include #include #include namespace mmx { struct MMX_EXPORT node_info_t : vnx::struct_t { ::mmx::hash_t id; uint32_t version = 0; ::mmx::node_type_e type; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xda45b5e3a527588eull; node_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const node_info_t& _value); friend std::istream& operator>>(std::istream& _in, node_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void node_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("version", 1); _visitor.accept(version); _visitor.type_field("type", 2); _visitor.accept(type); _visitor.template type_end(3); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::node_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_node_info_t_HXX_ ================================================ FILE: generated/include/mmx/node_type_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_node_type_e_HXX_ #define INCLUDE_mmx_node_type_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT node_type_e { enum enum_t : uint32_t { API_CLIENT = 1802393446l, FULL_NODE = 2903686019l, LIGHT_NODE = 3477499945l, }; ::mmx::node_type_e::enum_t value = ::mmx::node_type_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xa5de458f1ce5539aull; node_type_e() {} node_type_e(const enum_t& _value) { value = _value; } node_type_e(const ::mmx::node_type_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } node_type_e& operator=(const enum_t& _value) { value = _value; return *this; } node_type_e& operator=(const ::mmx::node_type_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const node_type_e& _value); friend std::istream& operator>>(std::istream& _in, node_type_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void node_type_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::node_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::node_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::node_type_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::node_type_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::node_type_e& _value); ///< \private template<> std::string to_string(const ::mmx::node_type_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::node_type_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::node_type_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::node_type_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_node_type_e_HXX_ ================================================ FILE: generated/include/mmx/offer_data_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_offer_data_t_HXX_ #define INCLUDE_mmx_offer_data_t_HXX_ #include #include #include #include namespace mmx { struct MMX_EXPORT offer_data_t : vnx::struct_t { uint32_t height = 0; uint32_t last_update = 0; int64_t time_stamp = 0; ::mmx::addr_t owner; ::mmx::addr_t address; vnx::optional<::mmx::addr_t> partner; ::mmx::addr_t bid_currency; ::mmx::addr_t ask_currency; ::mmx::uint128 bid_balance; ::mmx::uint128 ask_balance; ::mmx::uint128 ask_amount; ::mmx::uint128 inv_price; vnx::float64_t price = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc97a08a709a5f1efull; offer_data_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; vnx::bool_t is_scam() const; vnx::bool_t is_open() const; vnx::float64_t get_price() const; ::mmx::uint128 get_bid_amount(const ::mmx::uint128& ask_amount = ::mmx::uint128()) const; ::mmx::uint128 get_ask_amount(const ::mmx::uint128& bid_amount = ::mmx::uint128()) const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const offer_data_t& _value); friend std::istream& operator>>(std::istream& _in, offer_data_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void offer_data_t::accept_generic(T& _visitor) const { _visitor.template type_begin(13); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("last_update", 1); _visitor.accept(last_update); _visitor.type_field("time_stamp", 2); _visitor.accept(time_stamp); _visitor.type_field("owner", 3); _visitor.accept(owner); _visitor.type_field("address", 4); _visitor.accept(address); _visitor.type_field("partner", 5); _visitor.accept(partner); _visitor.type_field("bid_currency", 6); _visitor.accept(bid_currency); _visitor.type_field("ask_currency", 7); _visitor.accept(ask_currency); _visitor.type_field("bid_balance", 8); _visitor.accept(bid_balance); _visitor.type_field("ask_balance", 9); _visitor.accept(ask_balance); _visitor.type_field("ask_amount", 10); _visitor.accept(ask_amount); _visitor.type_field("inv_price", 11); _visitor.accept(inv_price); _visitor.type_field("price", 12); _visitor.accept(price); _visitor.template type_end(13); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::offer_data_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_offer_data_t_HXX_ ================================================ FILE: generated/include/mmx/package.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_PACKAGE_HXX_ #define INCLUDE_mmx_PACKAGE_HXX_ #include #include #include #include #ifdef MMX_EXPORT_ENABLE #include #else #ifndef MMX_EXPORT #define MMX_EXPORT #endif #endif namespace mmx { void register_all_types(); class Block; class BlockHeader; class ChainParams; class Challenge; class Contract; class FarmInfo; class FarmerBase; class Farmer_get_farm_info; class Farmer_get_farm_info_return; class Farmer_get_farmer_keys; class Farmer_get_farmer_keys_return; class Farmer_get_mac_addr; class Farmer_get_mac_addr_return; class Farmer_get_partial_diff; class Farmer_get_partial_diff_return; class Farmer_get_partial_diffs; class Farmer_get_partial_diffs_return; class Farmer_sign_block; class Farmer_sign_block_return; class Farmer_sign_vote; class Farmer_sign_vote_return; class HarvesterBase; class Harvester_add_plot_dir; class Harvester_add_plot_dir_return; class Harvester_get_farm_info; class Harvester_get_farm_info_return; class Harvester_get_total_bytes; class Harvester_get_total_bytes_return; class Harvester_reload; class Harvester_reload_return; class Harvester_rem_plot_dir; class Harvester_rem_plot_dir_return; class IntervalRequest; class KeyFile; class LookupInfo; class NetworkInfo; class NodeBase; class Node_add_block; class Node_add_block_return; class Node_add_transaction; class Node_add_transaction_return; class Node_call_contract; class Node_call_contract_return; class Node_dump_storage; class Node_dump_storage_return; class Node_fetch_offers; class Node_fetch_offers_return; class Node_get_all_balances; class Node_get_all_balances_return; class Node_get_balance; class Node_get_balance_return; class Node_get_balances; class Node_get_balances_return; class Node_get_block; class Node_get_block_return; class Node_get_block_at; class Node_get_block_at_return; class Node_get_block_hash; class Node_get_block_hash_return; class Node_get_block_hash_ex; class Node_get_block_hash_ex_return; class Node_get_contract; class Node_get_contract_return; class Node_get_contract_balances; class Node_get_contract_balances_return; class Node_get_contract_for; class Node_get_contract_for_return; class Node_get_contracts; class Node_get_contracts_return; class Node_get_contracts_by; class Node_get_contracts_by_return; class Node_get_contracts_owned_by; class Node_get_contracts_owned_by_return; class Node_get_exec_history; class Node_get_exec_history_return; class Node_get_farmed_block_summary; class Node_get_farmed_block_summary_return; class Node_get_farmed_blocks; class Node_get_farmed_blocks_return; class Node_get_farmer_ranking; class Node_get_farmer_ranking_return; class Node_get_genesis_hash; class Node_get_genesis_hash_return; class Node_get_header; class Node_get_header_return; class Node_get_header_at; class Node_get_header_at_return; class Node_get_height; class Node_get_height_return; class Node_get_history; class Node_get_history_return; class Node_get_history_memo; class Node_get_history_memo_return; class Node_get_network_info; class Node_get_network_info_return; class Node_get_offer; class Node_get_offer_return; class Node_get_offers; class Node_get_offers_return; class Node_get_offers_by; class Node_get_offers_by_return; class Node_get_params; class Node_get_params_return; class Node_get_plot_nft_info; class Node_get_plot_nft_info_return; class Node_get_plot_nft_target; class Node_get_plot_nft_target_return; class Node_get_recent_offers; class Node_get_recent_offers_return; class Node_get_recent_offers_for; class Node_get_recent_offers_for_return; class Node_get_swap_equivalent_liquidity; class Node_get_swap_equivalent_liquidity_return; class Node_get_swap_fees_earned; class Node_get_swap_fees_earned_return; class Node_get_swap_history; class Node_get_swap_history_return; class Node_get_swap_info; class Node_get_swap_info_return; class Node_get_swap_liquidity_by; class Node_get_swap_liquidity_by_return; class Node_get_swap_trade_estimate; class Node_get_swap_trade_estimate_return; class Node_get_swap_user_info; class Node_get_swap_user_info_return; class Node_get_swaps; class Node_get_swaps_return; class Node_get_synced_height; class Node_get_synced_height_return; class Node_get_synced_vdf_height; class Node_get_synced_vdf_height_return; class Node_get_total_balance; class Node_get_total_balance_return; class Node_get_total_balances; class Node_get_total_balances_return; class Node_get_total_supply; class Node_get_total_supply_return; class Node_get_trade_history; class Node_get_trade_history_return; class Node_get_trade_history_for; class Node_get_trade_history_for_return; class Node_get_transaction; class Node_get_transaction_return; class Node_get_transactions; class Node_get_transactions_return; class Node_get_tx_height; class Node_get_tx_height_return; class Node_get_tx_ids; class Node_get_tx_ids_return; class Node_get_tx_ids_at; class Node_get_tx_ids_at_return; class Node_get_tx_ids_since; class Node_get_tx_ids_since_return; class Node_get_tx_info; class Node_get_tx_info_return; class Node_get_tx_info_for; class Node_get_tx_info_for_return; class Node_get_vdf_height; class Node_get_vdf_height_return; class Node_get_vdf_peak; class Node_get_vdf_peak_return; class Node_read_storage; class Node_read_storage_return; class Node_read_storage_array; class Node_read_storage_array_return; class Node_read_storage_entry_addr; class Node_read_storage_entry_addr_return; class Node_read_storage_entry_string; class Node_read_storage_entry_string_return; class Node_read_storage_entry_var; class Node_read_storage_entry_var_return; class Node_read_storage_field; class Node_read_storage_field_return; class Node_read_storage_map; class Node_read_storage_map_return; class Node_read_storage_object; class Node_read_storage_object_return; class Node_read_storage_var; class Node_read_storage_var_return; class Node_revert_sync; class Node_revert_sync_return; class Node_start_sync; class Node_start_sync_return; class Node_validate; class Node_validate_return; class Node_verify_partial; class Node_verify_partial_return; class Node_verify_plot_nft_target; class Node_verify_plot_nft_target_return; class Operation; class Partial; class PeerInfo; class PlotHeader; class ProofOfSpace; class ProofOfSpaceNFT; class ProofOfSpaceOG; class ProofOfTime; class ProofResponse; class ProofServerBase; class ProofServer_compute; class ProofServer_compute_return; class ReceiveNote; class Request; class Return; class RouterBase; class Router_discover; class Router_discover_return; class Router_fetch_block; class Router_fetch_block_return; class Router_fetch_block_at; class Router_fetch_block_at_return; class Router_get_blocks_at; class Router_get_blocks_at_return; class Router_get_connected_peers; class Router_get_connected_peers_return; class Router_get_id; class Router_get_id_return; class Router_get_info; class Router_get_info_return; class Router_get_known_peers; class Router_get_known_peers_return; class Router_get_peer_info; class Router_get_peer_info_return; class Router_get_peers; class Router_get_peers_return; class Router_kick_peer; class Router_kick_peer_return; class Router_sign_msg; class Router_sign_msg_return; class Solution; class TimeLordBase; class TimeLord_stop_vdf; class TimeLord_stop_vdf_return; class Transaction; class TransactionBase; class VDF_Point; class ValidatorVote; class WalletBase; class Wallet_accept_offer; class Wallet_accept_offer_return; class Wallet_add_account; class Wallet_add_account_return; class Wallet_add_token; class Wallet_add_token_return; class Wallet_cancel_offer; class Wallet_cancel_offer_return; class Wallet_complete; class Wallet_complete_return; class Wallet_create_account; class Wallet_create_account_return; class Wallet_create_wallet; class Wallet_create_wallet_return; class Wallet_deploy; class Wallet_deploy_return; class Wallet_deposit; class Wallet_deposit_return; class Wallet_execute; class Wallet_execute_return; class Wallet_export_wallet; class Wallet_export_wallet_return; class Wallet_find_wallet_by_addr; class Wallet_find_wallet_by_addr_return; class Wallet_gather_inputs_for; class Wallet_gather_inputs_for_return; class Wallet_get_account; class Wallet_get_account_return; class Wallet_get_address; class Wallet_get_address_return; class Wallet_get_all_accounts; class Wallet_get_all_accounts_return; class Wallet_get_all_addresses; class Wallet_get_all_addresses_return; class Wallet_get_all_farmer_keys; class Wallet_get_all_farmer_keys_return; class Wallet_get_balance; class Wallet_get_balance_return; class Wallet_get_balances; class Wallet_get_balances_return; class Wallet_get_contract_balances; class Wallet_get_contract_balances_return; class Wallet_get_contracts; class Wallet_get_contracts_return; class Wallet_get_contracts_owned; class Wallet_get_contracts_owned_return; class Wallet_get_farmer_keys; class Wallet_get_farmer_keys_return; class Wallet_get_history; class Wallet_get_history_return; class Wallet_get_master_seed; class Wallet_get_master_seed_return; class Wallet_get_mnemonic_seed; class Wallet_get_mnemonic_seed_return; class Wallet_get_mnemonic_wordlist; class Wallet_get_mnemonic_wordlist_return; class Wallet_get_offers; class Wallet_get_offers_return; class Wallet_get_swap_liquidity; class Wallet_get_swap_liquidity_return; class Wallet_get_token_list; class Wallet_get_token_list_return; class Wallet_get_total_balances; class Wallet_get_total_balances_return; class Wallet_get_tx_log; class Wallet_get_tx_log_return; class Wallet_import_wallet; class Wallet_import_wallet_return; class Wallet_is_locked; class Wallet_is_locked_return; class Wallet_lock; class Wallet_lock_return; class Wallet_make_offer; class Wallet_make_offer_return; class Wallet_mark_spent; class Wallet_mark_spent_return; class Wallet_offer_trade; class Wallet_offer_trade_return; class Wallet_offer_withdraw; class Wallet_offer_withdraw_return; class Wallet_plotnft_create; class Wallet_plotnft_create_return; class Wallet_plotnft_exec; class Wallet_plotnft_exec_return; class Wallet_release; class Wallet_release_return; class Wallet_release_all; class Wallet_release_all_return; class Wallet_rem_token; class Wallet_rem_token_return; class Wallet_remove_account; class Wallet_remove_account_return; class Wallet_reserve; class Wallet_reserve_return; class Wallet_reset_cache; class Wallet_reset_cache_return; class Wallet_send; class Wallet_send_return; class Wallet_send_from; class Wallet_send_from_return; class Wallet_send_many; class Wallet_send_many_return; class Wallet_send_off; class Wallet_send_off_return; class Wallet_set_address_count; class Wallet_set_address_count_return; class Wallet_sign_msg; class Wallet_sign_msg_return; class Wallet_sign_off; class Wallet_sign_off_return; class Wallet_swap_add_liquid; class Wallet_swap_add_liquid_return; class Wallet_swap_rem_liquid; class Wallet_swap_rem_liquid_return; class Wallet_swap_trade; class Wallet_swap_trade_return; class Wallet_unlock; class Wallet_unlock_return; class Wallet_update_cache; class Wallet_update_cache_return; class WalletFile; class WebAPIBase; class WebAPI_shutdown; class WebAPI_shutdown_return; struct account_info_t; struct account_t; class addr_t; struct balance_t; struct block_index_t; struct compile_flags_t; struct error_code_e; struct exec_entry_t; struct exec_error_t; struct exec_result_t; struct farmed_block_info_t; struct farmed_block_summary_t; class fixed128; class hash_512_t; class hash_t; struct node_info_t; struct node_type_e; struct offer_data_t; struct peer_info_t; struct permission_e; struct plot_nft_info_t; struct pooling_error_e; struct pooling_info_t; struct pooling_stats_t; class pubkey_t; struct query_filter_t; class signature_t; class skey_t; struct spend_options_t; struct swap_entry_t; struct swap_info_t; struct swap_pool_info_t; struct swap_user_info_t; struct table_entry_t; struct trade_entry_t; struct trade_log_t; struct tx_entry_t; struct tx_index_t; class tx_info_t; struct tx_log_entry_t; struct tx_note_e; struct tx_type_e; struct txin_t; struct txio_entry_t; struct txio_t; struct txout_t; class uint128; struct uint_fraction_t; struct ulong_fraction_t; struct virtual_plot_info_t; MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Block; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_BlockHeader; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ChainParams; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Challenge; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Contract; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_FarmInfo; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_FarmerBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farm_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farm_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farmer_keys; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farmer_keys_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_mac_addr; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_mac_addr_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diff; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diff_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diffs; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diffs_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_block; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_block_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_vote; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_vote_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_HarvesterBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_add_plot_dir; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_add_plot_dir_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_get_farm_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_get_farm_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_get_total_bytes; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_get_total_bytes_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_reload; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_reload_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_rem_plot_dir; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Harvester_rem_plot_dir_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_IntervalRequest; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_KeyFile; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_LookupInfo; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_NetworkInfo; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_NodeBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_add_block; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_add_block_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_add_transaction; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_add_transaction_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_call_contract; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_call_contract_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_dump_storage; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_dump_storage_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_fetch_offers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_fetch_offers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_all_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_all_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_balance; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_balance_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_at; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_at_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_ex; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_ex_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_for; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_for_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_by; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_by_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_owned_by; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_owned_by_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_exec_history; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_exec_history_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_block_summary; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_block_summary_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_blocks; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_blocks_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmer_ranking; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_farmer_ranking_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_genesis_hash; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_genesis_hash_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_header; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_header_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_header_at; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_header_at_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_height; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_height_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_history; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_history_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_history_memo; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_history_memo_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_network_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_network_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offer; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offer_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_by; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_by_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_params; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_params_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_target; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_target_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_for; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_for_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_equivalent_liquidity; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_equivalent_liquidity_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_fees_earned; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_fees_earned_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_history; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_history_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_liquidity_by; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_liquidity_by_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_trade_estimate; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_trade_estimate_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_user_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_user_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swaps; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_swaps_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_height; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_height_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_vdf_height; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_vdf_height_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balance; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balance_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_supply; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_total_supply_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_for; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_for_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_transaction; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_transaction_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_transactions; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_transactions_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_height; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_height_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_at; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_at_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_since; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_since_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_for; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_for_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_height; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_height_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_peak; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_peak_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_array; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_array_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_addr; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_addr_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_string; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_string_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_var; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_var_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_field; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_field_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_map; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_map_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_object; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_object_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_var; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_var_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_revert_sync; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_revert_sync_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_start_sync; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_start_sync_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_validate; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_validate_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_verify_partial; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_verify_partial_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_verify_plot_nft_target; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Node_verify_plot_nft_target_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Operation; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Partial; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PeerInfo; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PlotHeader; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpace; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpaceNFT; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfSpaceOG; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofOfTime; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofResponse; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofServerBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofServer_compute; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ProofServer_compute_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ReceiveNote; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Request; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_RouterBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_discover; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_discover_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_at; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_at_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_blocks_at; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_blocks_at_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_id; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_id_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_known_peers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_known_peers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_peer_info; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_peer_info_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_peers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_get_peers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_kick_peer; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_kick_peer_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_sign_msg; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Router_sign_msg_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Solution; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_TimeLordBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_TimeLord_stop_vdf; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_TimeLord_stop_vdf_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Transaction; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_TransactionBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_VDF_Point; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ValidatorVote; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WalletBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_accept_offer; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_accept_offer_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_add_account; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_add_account_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_add_token; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_add_token_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_cancel_offer; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_cancel_offer_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_complete; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_complete_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_create_account; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_create_account_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_create_wallet; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_create_wallet_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_deploy; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_deploy_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_deposit; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_deposit_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_execute; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_execute_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_export_wallet; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_export_wallet_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_find_wallet_by_addr; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_find_wallet_by_addr_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_gather_inputs_for; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_gather_inputs_for_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_account; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_account_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_address; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_address_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_accounts; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_accounts_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_addresses; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_addresses_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_farmer_keys; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_farmer_keys_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balance; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balance_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contract_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contract_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_owned; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_owned_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_farmer_keys; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_farmer_keys_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_history; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_history_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_master_seed; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_master_seed_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_seed; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_seed_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_wordlist; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_wordlist_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_offers; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_offers_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_swap_liquidity; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_swap_liquidity_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_token_list; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_token_list_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_total_balances; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_total_balances_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_tx_log; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_get_tx_log_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_import_wallet; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_import_wallet_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_is_locked; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_is_locked_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_lock; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_lock_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_make_offer; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_make_offer_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_mark_spent; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_mark_spent_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_trade; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_trade_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_withdraw; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_withdraw_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_create; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_create_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_exec; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_exec_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_release; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_release_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_release_all; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_release_all_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_rem_token; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_rem_token_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_remove_account; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_remove_account_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_reserve; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_reserve_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_reset_cache; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_reset_cache_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_from; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_from_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_many; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_many_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_off; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_send_off_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_set_address_count; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_set_address_count_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_msg; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_msg_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_off; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_off_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_add_liquid; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_add_liquid_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_rem_liquid; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_rem_liquid_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_trade; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_trade_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_unlock; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_unlock_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_update_cache; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Wallet_update_cache_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WalletFile; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WebAPIBase; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WebAPI_shutdown; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_WebAPI_shutdown_return; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_account_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_account_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_balance_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_block_index_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_compile_flags_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_error_code_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_exec_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_exec_error_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_exec_result_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_farmed_block_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_farmed_block_summary_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_node_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_node_type_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_offer_data_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_peer_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_permission_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_plot_nft_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_pooling_error_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_pooling_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_pooling_stats_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_query_filter_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_spend_options_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_swap_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_swap_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_swap_pool_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_swap_user_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_table_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_trade_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_trade_log_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_index_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_info_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_log_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_note_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_tx_type_e; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_txin_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_txio_entry_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_txio_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_txout_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_uint_fraction_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_ulong_fraction_t; ///< \private MMX_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_virtual_plot_info_t; ///< \private } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::addr_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::fixed128& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::hash_512_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::hash_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::pubkey_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::signature_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::skey_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::uint128& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::addr_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::fixed128& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::hash_512_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::hash_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::pubkey_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::signature_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::skey_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::uint128& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(std::istream& in, ::mmx::Block& value); ///< \private void read(std::istream& in, ::mmx::BlockHeader& value); ///< \private void read(std::istream& in, ::mmx::ChainParams& value); ///< \private void read(std::istream& in, ::mmx::Challenge& value); ///< \private void read(std::istream& in, ::mmx::Contract& value); ///< \private void read(std::istream& in, ::mmx::FarmInfo& value); ///< \private void read(std::istream& in, ::mmx::FarmerBase& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_farm_info& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_farm_info_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_farmer_keys& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_farmer_keys_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_mac_addr& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_mac_addr_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_partial_diff& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_partial_diff_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_partial_diffs& value); ///< \private void read(std::istream& in, ::mmx::Farmer_get_partial_diffs_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_sign_block& value); ///< \private void read(std::istream& in, ::mmx::Farmer_sign_block_return& value); ///< \private void read(std::istream& in, ::mmx::Farmer_sign_vote& value); ///< \private void read(std::istream& in, ::mmx::Farmer_sign_vote_return& value); ///< \private void read(std::istream& in, ::mmx::HarvesterBase& value); ///< \private void read(std::istream& in, ::mmx::Harvester_add_plot_dir& value); ///< \private void read(std::istream& in, ::mmx::Harvester_add_plot_dir_return& value); ///< \private void read(std::istream& in, ::mmx::Harvester_get_farm_info& value); ///< \private void read(std::istream& in, ::mmx::Harvester_get_farm_info_return& value); ///< \private void read(std::istream& in, ::mmx::Harvester_get_total_bytes& value); ///< \private void read(std::istream& in, ::mmx::Harvester_get_total_bytes_return& value); ///< \private void read(std::istream& in, ::mmx::Harvester_reload& value); ///< \private void read(std::istream& in, ::mmx::Harvester_reload_return& value); ///< \private void read(std::istream& in, ::mmx::Harvester_rem_plot_dir& value); ///< \private void read(std::istream& in, ::mmx::Harvester_rem_plot_dir_return& value); ///< \private void read(std::istream& in, ::mmx::IntervalRequest& value); ///< \private void read(std::istream& in, ::mmx::KeyFile& value); ///< \private void read(std::istream& in, ::mmx::LookupInfo& value); ///< \private void read(std::istream& in, ::mmx::NetworkInfo& value); ///< \private void read(std::istream& in, ::mmx::NodeBase& value); ///< \private void read(std::istream& in, ::mmx::Node_add_block& value); ///< \private void read(std::istream& in, ::mmx::Node_add_block_return& value); ///< \private void read(std::istream& in, ::mmx::Node_add_transaction& value); ///< \private void read(std::istream& in, ::mmx::Node_add_transaction_return& value); ///< \private void read(std::istream& in, ::mmx::Node_call_contract& value); ///< \private void read(std::istream& in, ::mmx::Node_call_contract_return& value); ///< \private void read(std::istream& in, ::mmx::Node_dump_storage& value); ///< \private void read(std::istream& in, ::mmx::Node_dump_storage_return& value); ///< \private void read(std::istream& in, ::mmx::Node_fetch_offers& value); ///< \private void read(std::istream& in, ::mmx::Node_fetch_offers_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_all_balances& value); ///< \private void read(std::istream& in, ::mmx::Node_get_all_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_balance& value); ///< \private void read(std::istream& in, ::mmx::Node_get_balance_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_balances& value); ///< \private void read(std::istream& in, ::mmx::Node_get_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_at& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_at_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_hash& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_hash_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_hash_ex& value); ///< \private void read(std::istream& in, ::mmx::Node_get_block_hash_ex_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract_balances& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract_for& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contract_for_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts_by& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts_by_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts_owned_by& value); ///< \private void read(std::istream& in, ::mmx::Node_get_contracts_owned_by_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_exec_history& value); ///< \private void read(std::istream& in, ::mmx::Node_get_exec_history_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmed_block_summary& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmed_block_summary_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmed_blocks& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmed_blocks_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmer_ranking& value); ///< \private void read(std::istream& in, ::mmx::Node_get_farmer_ranking_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_genesis_hash& value); ///< \private void read(std::istream& in, ::mmx::Node_get_genesis_hash_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_header& value); ///< \private void read(std::istream& in, ::mmx::Node_get_header_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_header_at& value); ///< \private void read(std::istream& in, ::mmx::Node_get_header_at_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_height& value); ///< \private void read(std::istream& in, ::mmx::Node_get_height_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_history& value); ///< \private void read(std::istream& in, ::mmx::Node_get_history_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_history_memo& value); ///< \private void read(std::istream& in, ::mmx::Node_get_history_memo_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_network_info& value); ///< \private void read(std::istream& in, ::mmx::Node_get_network_info_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offer& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offer_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offers& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offers_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offers_by& value); ///< \private void read(std::istream& in, ::mmx::Node_get_offers_by_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_params& value); ///< \private void read(std::istream& in, ::mmx::Node_get_params_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_plot_nft_info& value); ///< \private void read(std::istream& in, ::mmx::Node_get_plot_nft_info_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_plot_nft_target& value); ///< \private void read(std::istream& in, ::mmx::Node_get_plot_nft_target_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_recent_offers& value); ///< \private void read(std::istream& in, ::mmx::Node_get_recent_offers_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_recent_offers_for& value); ///< \private void read(std::istream& in, ::mmx::Node_get_recent_offers_for_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_fees_earned& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_fees_earned_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_history& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_history_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_info& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_info_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_user_info& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swap_user_info_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swaps& value); ///< \private void read(std::istream& in, ::mmx::Node_get_swaps_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_synced_height& value); ///< \private void read(std::istream& in, ::mmx::Node_get_synced_height_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_synced_vdf_height& value); ///< \private void read(std::istream& in, ::mmx::Node_get_synced_vdf_height_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_balance& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_balance_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_balances& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_supply& value); ///< \private void read(std::istream& in, ::mmx::Node_get_total_supply_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_trade_history& value); ///< \private void read(std::istream& in, ::mmx::Node_get_trade_history_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_trade_history_for& value); ///< \private void read(std::istream& in, ::mmx::Node_get_trade_history_for_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_transaction& value); ///< \private void read(std::istream& in, ::mmx::Node_get_transaction_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_transactions& value); ///< \private void read(std::istream& in, ::mmx::Node_get_transactions_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_height& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_height_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids_at& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids_at_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids_since& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_ids_since_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_info& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_info_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_info_for& value); ///< \private void read(std::istream& in, ::mmx::Node_get_tx_info_for_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_vdf_height& value); ///< \private void read(std::istream& in, ::mmx::Node_get_vdf_height_return& value); ///< \private void read(std::istream& in, ::mmx::Node_get_vdf_peak& value); ///< \private void read(std::istream& in, ::mmx::Node_get_vdf_peak_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_array& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_array_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_addr& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_addr_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_string& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_string_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_var& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_entry_var_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_field& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_field_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_map& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_map_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_object& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_object_return& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_var& value); ///< \private void read(std::istream& in, ::mmx::Node_read_storage_var_return& value); ///< \private void read(std::istream& in, ::mmx::Node_revert_sync& value); ///< \private void read(std::istream& in, ::mmx::Node_revert_sync_return& value); ///< \private void read(std::istream& in, ::mmx::Node_start_sync& value); ///< \private void read(std::istream& in, ::mmx::Node_start_sync_return& value); ///< \private void read(std::istream& in, ::mmx::Node_validate& value); ///< \private void read(std::istream& in, ::mmx::Node_validate_return& value); ///< \private void read(std::istream& in, ::mmx::Node_verify_partial& value); ///< \private void read(std::istream& in, ::mmx::Node_verify_partial_return& value); ///< \private void read(std::istream& in, ::mmx::Node_verify_plot_nft_target& value); ///< \private void read(std::istream& in, ::mmx::Node_verify_plot_nft_target_return& value); ///< \private void read(std::istream& in, ::mmx::Operation& value); ///< \private void read(std::istream& in, ::mmx::Partial& value); ///< \private void read(std::istream& in, ::mmx::PeerInfo& value); ///< \private void read(std::istream& in, ::mmx::PlotHeader& value); ///< \private void read(std::istream& in, ::mmx::ProofOfSpace& value); ///< \private void read(std::istream& in, ::mmx::ProofOfSpaceNFT& value); ///< \private void read(std::istream& in, ::mmx::ProofOfSpaceOG& value); ///< \private void read(std::istream& in, ::mmx::ProofOfTime& value); ///< \private void read(std::istream& in, ::mmx::ProofResponse& value); ///< \private void read(std::istream& in, ::mmx::ProofServerBase& value); ///< \private void read(std::istream& in, ::mmx::ProofServer_compute& value); ///< \private void read(std::istream& in, ::mmx::ProofServer_compute_return& value); ///< \private void read(std::istream& in, ::mmx::ReceiveNote& value); ///< \private void read(std::istream& in, ::mmx::Request& value); ///< \private void read(std::istream& in, ::mmx::Return& value); ///< \private void read(std::istream& in, ::mmx::RouterBase& value); ///< \private void read(std::istream& in, ::mmx::Router_discover& value); ///< \private void read(std::istream& in, ::mmx::Router_discover_return& value); ///< \private void read(std::istream& in, ::mmx::Router_fetch_block& value); ///< \private void read(std::istream& in, ::mmx::Router_fetch_block_return& value); ///< \private void read(std::istream& in, ::mmx::Router_fetch_block_at& value); ///< \private void read(std::istream& in, ::mmx::Router_fetch_block_at_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_blocks_at& value); ///< \private void read(std::istream& in, ::mmx::Router_get_blocks_at_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_connected_peers& value); ///< \private void read(std::istream& in, ::mmx::Router_get_connected_peers_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_id& value); ///< \private void read(std::istream& in, ::mmx::Router_get_id_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_info& value); ///< \private void read(std::istream& in, ::mmx::Router_get_info_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_known_peers& value); ///< \private void read(std::istream& in, ::mmx::Router_get_known_peers_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_peer_info& value); ///< \private void read(std::istream& in, ::mmx::Router_get_peer_info_return& value); ///< \private void read(std::istream& in, ::mmx::Router_get_peers& value); ///< \private void read(std::istream& in, ::mmx::Router_get_peers_return& value); ///< \private void read(std::istream& in, ::mmx::Router_kick_peer& value); ///< \private void read(std::istream& in, ::mmx::Router_kick_peer_return& value); ///< \private void read(std::istream& in, ::mmx::Router_sign_msg& value); ///< \private void read(std::istream& in, ::mmx::Router_sign_msg_return& value); ///< \private void read(std::istream& in, ::mmx::Solution& value); ///< \private void read(std::istream& in, ::mmx::TimeLordBase& value); ///< \private void read(std::istream& in, ::mmx::TimeLord_stop_vdf& value); ///< \private void read(std::istream& in, ::mmx::TimeLord_stop_vdf_return& value); ///< \private void read(std::istream& in, ::mmx::Transaction& value); ///< \private void read(std::istream& in, ::mmx::TransactionBase& value); ///< \private void read(std::istream& in, ::mmx::VDF_Point& value); ///< \private void read(std::istream& in, ::mmx::ValidatorVote& value); ///< \private void read(std::istream& in, ::mmx::WalletBase& value); ///< \private void read(std::istream& in, ::mmx::Wallet_accept_offer& value); ///< \private void read(std::istream& in, ::mmx::Wallet_accept_offer_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_add_account& value); ///< \private void read(std::istream& in, ::mmx::Wallet_add_account_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_add_token& value); ///< \private void read(std::istream& in, ::mmx::Wallet_add_token_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_cancel_offer& value); ///< \private void read(std::istream& in, ::mmx::Wallet_cancel_offer_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_complete& value); ///< \private void read(std::istream& in, ::mmx::Wallet_complete_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_create_account& value); ///< \private void read(std::istream& in, ::mmx::Wallet_create_account_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_create_wallet& value); ///< \private void read(std::istream& in, ::mmx::Wallet_create_wallet_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_deploy& value); ///< \private void read(std::istream& in, ::mmx::Wallet_deploy_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_deposit& value); ///< \private void read(std::istream& in, ::mmx::Wallet_deposit_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_execute& value); ///< \private void read(std::istream& in, ::mmx::Wallet_execute_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_export_wallet& value); ///< \private void read(std::istream& in, ::mmx::Wallet_export_wallet_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr& value); ///< \private void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_gather_inputs_for& value); ///< \private void read(std::istream& in, ::mmx::Wallet_gather_inputs_for_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_account& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_account_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_address& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_address_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_accounts& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_accounts_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_addresses& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_addresses_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_balance& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_balance_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_balances& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contract_balances& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contract_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contracts& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contracts_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contracts_owned& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_contracts_owned_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_farmer_keys& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_farmer_keys_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_history& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_history_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_master_seed& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_master_seed_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_offers& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_offers_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_token_list& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_token_list_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_total_balances& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_total_balances_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_tx_log& value); ///< \private void read(std::istream& in, ::mmx::Wallet_get_tx_log_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_import_wallet& value); ///< \private void read(std::istream& in, ::mmx::Wallet_import_wallet_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_is_locked& value); ///< \private void read(std::istream& in, ::mmx::Wallet_is_locked_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_lock& value); ///< \private void read(std::istream& in, ::mmx::Wallet_lock_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_make_offer& value); ///< \private void read(std::istream& in, ::mmx::Wallet_make_offer_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_mark_spent& value); ///< \private void read(std::istream& in, ::mmx::Wallet_mark_spent_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_offer_trade& value); ///< \private void read(std::istream& in, ::mmx::Wallet_offer_trade_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_offer_withdraw& value); ///< \private void read(std::istream& in, ::mmx::Wallet_offer_withdraw_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_plotnft_create& value); ///< \private void read(std::istream& in, ::mmx::Wallet_plotnft_create_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_plotnft_exec& value); ///< \private void read(std::istream& in, ::mmx::Wallet_plotnft_exec_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_release& value); ///< \private void read(std::istream& in, ::mmx::Wallet_release_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_release_all& value); ///< \private void read(std::istream& in, ::mmx::Wallet_release_all_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_rem_token& value); ///< \private void read(std::istream& in, ::mmx::Wallet_rem_token_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_remove_account& value); ///< \private void read(std::istream& in, ::mmx::Wallet_remove_account_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_reserve& value); ///< \private void read(std::istream& in, ::mmx::Wallet_reserve_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_reset_cache& value); ///< \private void read(std::istream& in, ::mmx::Wallet_reset_cache_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_from& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_from_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_many& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_many_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_off& value); ///< \private void read(std::istream& in, ::mmx::Wallet_send_off_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_set_address_count& value); ///< \private void read(std::istream& in, ::mmx::Wallet_set_address_count_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_sign_msg& value); ///< \private void read(std::istream& in, ::mmx::Wallet_sign_msg_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_sign_off& value); ///< \private void read(std::istream& in, ::mmx::Wallet_sign_off_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_add_liquid& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_add_liquid_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_trade& value); ///< \private void read(std::istream& in, ::mmx::Wallet_swap_trade_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_unlock& value); ///< \private void read(std::istream& in, ::mmx::Wallet_unlock_return& value); ///< \private void read(std::istream& in, ::mmx::Wallet_update_cache& value); ///< \private void read(std::istream& in, ::mmx::Wallet_update_cache_return& value); ///< \private void read(std::istream& in, ::mmx::WalletFile& value); ///< \private void read(std::istream& in, ::mmx::WebAPIBase& value); ///< \private void read(std::istream& in, ::mmx::WebAPI_shutdown& value); ///< \private void read(std::istream& in, ::mmx::WebAPI_shutdown_return& value); ///< \private void read(std::istream& in, ::mmx::account_info_t& value); ///< \private void read(std::istream& in, ::mmx::account_t& value); ///< \private void read(std::istream& in, ::mmx::addr_t& value); ///< \private void read(std::istream& in, ::mmx::balance_t& value); ///< \private void read(std::istream& in, ::mmx::block_index_t& value); ///< \private void read(std::istream& in, ::mmx::compile_flags_t& value); ///< \private void read(std::istream& in, ::mmx::error_code_e& value); ///< \private void read(std::istream& in, ::mmx::exec_entry_t& value); ///< \private void read(std::istream& in, ::mmx::exec_error_t& value); ///< \private void read(std::istream& in, ::mmx::exec_result_t& value); ///< \private void read(std::istream& in, ::mmx::farmed_block_info_t& value); ///< \private void read(std::istream& in, ::mmx::farmed_block_summary_t& value); ///< \private void read(std::istream& in, ::mmx::fixed128& value); ///< \private void read(std::istream& in, ::mmx::hash_512_t& value); ///< \private void read(std::istream& in, ::mmx::hash_t& value); ///< \private void read(std::istream& in, ::mmx::node_info_t& value); ///< \private void read(std::istream& in, ::mmx::node_type_e& value); ///< \private void read(std::istream& in, ::mmx::offer_data_t& value); ///< \private void read(std::istream& in, ::mmx::peer_info_t& value); ///< \private void read(std::istream& in, ::mmx::permission_e& value); ///< \private void read(std::istream& in, ::mmx::plot_nft_info_t& value); ///< \private void read(std::istream& in, ::mmx::pooling_error_e& value); ///< \private void read(std::istream& in, ::mmx::pooling_info_t& value); ///< \private void read(std::istream& in, ::mmx::pooling_stats_t& value); ///< \private void read(std::istream& in, ::mmx::pubkey_t& value); ///< \private void read(std::istream& in, ::mmx::query_filter_t& value); ///< \private void read(std::istream& in, ::mmx::signature_t& value); ///< \private void read(std::istream& in, ::mmx::skey_t& value); ///< \private void read(std::istream& in, ::mmx::spend_options_t& value); ///< \private void read(std::istream& in, ::mmx::swap_entry_t& value); ///< \private void read(std::istream& in, ::mmx::swap_info_t& value); ///< \private void read(std::istream& in, ::mmx::swap_pool_info_t& value); ///< \private void read(std::istream& in, ::mmx::swap_user_info_t& value); ///< \private void read(std::istream& in, ::mmx::table_entry_t& value); ///< \private void read(std::istream& in, ::mmx::trade_entry_t& value); ///< \private void read(std::istream& in, ::mmx::trade_log_t& value); ///< \private void read(std::istream& in, ::mmx::tx_entry_t& value); ///< \private void read(std::istream& in, ::mmx::tx_index_t& value); ///< \private void read(std::istream& in, ::mmx::tx_info_t& value); ///< \private void read(std::istream& in, ::mmx::tx_log_entry_t& value); ///< \private void read(std::istream& in, ::mmx::tx_note_e& value); ///< \private void read(std::istream& in, ::mmx::tx_type_e& value); ///< \private void read(std::istream& in, ::mmx::txin_t& value); ///< \private void read(std::istream& in, ::mmx::txio_entry_t& value); ///< \private void read(std::istream& in, ::mmx::txio_t& value); ///< \private void read(std::istream& in, ::mmx::txout_t& value); ///< \private void read(std::istream& in, ::mmx::uint128& value); ///< \private void read(std::istream& in, ::mmx::uint_fraction_t& value); ///< \private void read(std::istream& in, ::mmx::ulong_fraction_t& value); ///< \private void read(std::istream& in, ::mmx::virtual_plot_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::Block& value); ///< \private void write(std::ostream& out, const ::mmx::BlockHeader& value); ///< \private void write(std::ostream& out, const ::mmx::ChainParams& value); ///< \private void write(std::ostream& out, const ::mmx::Challenge& value); ///< \private void write(std::ostream& out, const ::mmx::Contract& value); ///< \private void write(std::ostream& out, const ::mmx::FarmInfo& value); ///< \private void write(std::ostream& out, const ::mmx::FarmerBase& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_farm_info& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_farm_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_sign_block& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_sign_block_return& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_sign_vote& value); ///< \private void write(std::ostream& out, const ::mmx::Farmer_sign_vote_return& value); ///< \private void write(std::ostream& out, const ::mmx::HarvesterBase& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir_return& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_get_farm_info& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_get_farm_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes_return& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_reload& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_reload_return& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir& value); ///< \private void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir_return& value); ///< \private void write(std::ostream& out, const ::mmx::IntervalRequest& value); ///< \private void write(std::ostream& out, const ::mmx::KeyFile& value); ///< \private void write(std::ostream& out, const ::mmx::LookupInfo& value); ///< \private void write(std::ostream& out, const ::mmx::NetworkInfo& value); ///< \private void write(std::ostream& out, const ::mmx::NodeBase& value); ///< \private void write(std::ostream& out, const ::mmx::Node_add_block& value); ///< \private void write(std::ostream& out, const ::mmx::Node_add_block_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_add_transaction& value); ///< \private void write(std::ostream& out, const ::mmx::Node_add_transaction_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_call_contract& value); ///< \private void write(std::ostream& out, const ::mmx::Node_call_contract_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_dump_storage& value); ///< \private void write(std::ostream& out, const ::mmx::Node_dump_storage_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_fetch_offers& value); ///< \private void write(std::ostream& out, const ::mmx::Node_fetch_offers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_all_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_all_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_balance& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_balance_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_at& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_at_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_hash& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_hash_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract_for& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contract_for_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts_by& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts_by_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_exec_history& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_exec_history_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_genesis_hash& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_genesis_hash_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_header& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_header_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_header_at& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_header_at_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_height& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_height_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_history& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_history_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_history_memo& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_history_memo_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_network_info& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_network_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offer& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offer_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offers& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offers_by& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_offers_by_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_params& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_params_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_recent_offers& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_recent_offers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_history& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_history_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_info& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_user_info& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swap_user_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swaps& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_swaps_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_synced_height& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_synced_height_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_balance& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_balance_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_supply& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_total_supply_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_trade_history& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_trade_history_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_trade_history_for& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_trade_history_for_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_transaction& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_transaction_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_transactions& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_transactions_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_height& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_height_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_info& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_info_for& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_tx_info_for_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_vdf_height& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_vdf_height_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_vdf_peak& value); ///< \private void write(std::ostream& out, const ::mmx::Node_get_vdf_peak_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_array& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_array_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_field& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_field_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_map& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_map_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_object& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_object_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_var& value); ///< \private void write(std::ostream& out, const ::mmx::Node_read_storage_var_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_revert_sync& value); ///< \private void write(std::ostream& out, const ::mmx::Node_revert_sync_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_start_sync& value); ///< \private void write(std::ostream& out, const ::mmx::Node_start_sync_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_validate& value); ///< \private void write(std::ostream& out, const ::mmx::Node_validate_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_verify_partial& value); ///< \private void write(std::ostream& out, const ::mmx::Node_verify_partial_return& value); ///< \private void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target& value); ///< \private void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target_return& value); ///< \private void write(std::ostream& out, const ::mmx::Operation& value); ///< \private void write(std::ostream& out, const ::mmx::Partial& value); ///< \private void write(std::ostream& out, const ::mmx::PeerInfo& value); ///< \private void write(std::ostream& out, const ::mmx::PlotHeader& value); ///< \private void write(std::ostream& out, const ::mmx::ProofOfSpace& value); ///< \private void write(std::ostream& out, const ::mmx::ProofOfSpaceNFT& value); ///< \private void write(std::ostream& out, const ::mmx::ProofOfSpaceOG& value); ///< \private void write(std::ostream& out, const ::mmx::ProofOfTime& value); ///< \private void write(std::ostream& out, const ::mmx::ProofResponse& value); ///< \private void write(std::ostream& out, const ::mmx::ProofServerBase& value); ///< \private void write(std::ostream& out, const ::mmx::ProofServer_compute& value); ///< \private void write(std::ostream& out, const ::mmx::ProofServer_compute_return& value); ///< \private void write(std::ostream& out, const ::mmx::ReceiveNote& value); ///< \private void write(std::ostream& out, const ::mmx::Request& value); ///< \private void write(std::ostream& out, const ::mmx::Return& value); ///< \private void write(std::ostream& out, const ::mmx::RouterBase& value); ///< \private void write(std::ostream& out, const ::mmx::Router_discover& value); ///< \private void write(std::ostream& out, const ::mmx::Router_discover_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_fetch_block& value); ///< \private void write(std::ostream& out, const ::mmx::Router_fetch_block_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_fetch_block_at& value); ///< \private void write(std::ostream& out, const ::mmx::Router_fetch_block_at_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_blocks_at& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_blocks_at_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_connected_peers& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_connected_peers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_id& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_id_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_info& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_known_peers& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_known_peers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_peer_info& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_peer_info_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_peers& value); ///< \private void write(std::ostream& out, const ::mmx::Router_get_peers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_kick_peer& value); ///< \private void write(std::ostream& out, const ::mmx::Router_kick_peer_return& value); ///< \private void write(std::ostream& out, const ::mmx::Router_sign_msg& value); ///< \private void write(std::ostream& out, const ::mmx::Router_sign_msg_return& value); ///< \private void write(std::ostream& out, const ::mmx::Solution& value); ///< \private void write(std::ostream& out, const ::mmx::TimeLordBase& value); ///< \private void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf& value); ///< \private void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf_return& value); ///< \private void write(std::ostream& out, const ::mmx::Transaction& value); ///< \private void write(std::ostream& out, const ::mmx::TransactionBase& value); ///< \private void write(std::ostream& out, const ::mmx::VDF_Point& value); ///< \private void write(std::ostream& out, const ::mmx::ValidatorVote& value); ///< \private void write(std::ostream& out, const ::mmx::WalletBase& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_accept_offer& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_accept_offer_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_add_account& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_add_account_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_add_token& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_add_token_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_cancel_offer& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_cancel_offer_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_complete& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_complete_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_create_account& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_create_account_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_create_wallet& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_create_wallet_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_deploy& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_deploy_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_deposit& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_deposit_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_execute& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_execute_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_export_wallet& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_export_wallet_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_account& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_account_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_address& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_address_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_balance& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_balance_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contracts& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contracts_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_history& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_history_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_master_seed& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_master_seed_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_offers& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_offers_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_token_list& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_token_list_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_total_balances& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_total_balances_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_tx_log& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_get_tx_log_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_import_wallet& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_import_wallet_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_is_locked& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_is_locked_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_lock& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_lock_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_make_offer& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_make_offer_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_mark_spent& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_mark_spent_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_offer_trade& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_offer_trade_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_plotnft_create& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_plotnft_create_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_release& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_release_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_release_all& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_release_all_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_rem_token& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_rem_token_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_remove_account& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_remove_account_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_reserve& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_reserve_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_reset_cache& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_reset_cache_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_from& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_from_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_many& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_many_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_off& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_send_off_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_set_address_count& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_set_address_count_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_sign_msg& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_sign_msg_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_sign_off& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_sign_off_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_trade& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_swap_trade_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_unlock& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_unlock_return& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_update_cache& value); ///< \private void write(std::ostream& out, const ::mmx::Wallet_update_cache_return& value); ///< \private void write(std::ostream& out, const ::mmx::WalletFile& value); ///< \private void write(std::ostream& out, const ::mmx::WebAPIBase& value); ///< \private void write(std::ostream& out, const ::mmx::WebAPI_shutdown& value); ///< \private void write(std::ostream& out, const ::mmx::WebAPI_shutdown_return& value); ///< \private void write(std::ostream& out, const ::mmx::account_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::account_t& value); ///< \private void write(std::ostream& out, const ::mmx::addr_t& value); ///< \private void write(std::ostream& out, const ::mmx::balance_t& value); ///< \private void write(std::ostream& out, const ::mmx::block_index_t& value); ///< \private void write(std::ostream& out, const ::mmx::compile_flags_t& value); ///< \private void write(std::ostream& out, const ::mmx::error_code_e& value); ///< \private void write(std::ostream& out, const ::mmx::exec_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::exec_error_t& value); ///< \private void write(std::ostream& out, const ::mmx::exec_result_t& value); ///< \private void write(std::ostream& out, const ::mmx::farmed_block_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::farmed_block_summary_t& value); ///< \private void write(std::ostream& out, const ::mmx::fixed128& value); ///< \private void write(std::ostream& out, const ::mmx::hash_512_t& value); ///< \private void write(std::ostream& out, const ::mmx::hash_t& value); ///< \private void write(std::ostream& out, const ::mmx::node_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::node_type_e& value); ///< \private void write(std::ostream& out, const ::mmx::offer_data_t& value); ///< \private void write(std::ostream& out, const ::mmx::peer_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::permission_e& value); ///< \private void write(std::ostream& out, const ::mmx::plot_nft_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::pooling_error_e& value); ///< \private void write(std::ostream& out, const ::mmx::pooling_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::pooling_stats_t& value); ///< \private void write(std::ostream& out, const ::mmx::pubkey_t& value); ///< \private void write(std::ostream& out, const ::mmx::query_filter_t& value); ///< \private void write(std::ostream& out, const ::mmx::signature_t& value); ///< \private void write(std::ostream& out, const ::mmx::skey_t& value); ///< \private void write(std::ostream& out, const ::mmx::spend_options_t& value); ///< \private void write(std::ostream& out, const ::mmx::swap_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::swap_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::swap_pool_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::swap_user_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::table_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::trade_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::trade_log_t& value); ///< \private void write(std::ostream& out, const ::mmx::tx_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::tx_index_t& value); ///< \private void write(std::ostream& out, const ::mmx::tx_info_t& value); ///< \private void write(std::ostream& out, const ::mmx::tx_log_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::tx_note_e& value); ///< \private void write(std::ostream& out, const ::mmx::tx_type_e& value); ///< \private void write(std::ostream& out, const ::mmx::txin_t& value); ///< \private void write(std::ostream& out, const ::mmx::txio_entry_t& value); ///< \private void write(std::ostream& out, const ::mmx::txio_t& value); ///< \private void write(std::ostream& out, const ::mmx::txout_t& value); ///< \private void write(std::ostream& out, const ::mmx::uint128& value); ///< \private void write(std::ostream& out, const ::mmx::uint_fraction_t& value); ///< \private void write(std::ostream& out, const ::mmx::ulong_fraction_t& value); ///< \private void write(std::ostream& out, const ::mmx::virtual_plot_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::Block& value); ///< \private void accept(Visitor& visitor, const ::mmx::BlockHeader& value); ///< \private void accept(Visitor& visitor, const ::mmx::ChainParams& value); ///< \private void accept(Visitor& visitor, const ::mmx::Challenge& value); ///< \private void accept(Visitor& visitor, const ::mmx::Contract& value); ///< \private void accept(Visitor& visitor, const ::mmx::FarmInfo& value); ///< \private void accept(Visitor& visitor, const ::mmx::FarmerBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_sign_block& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_sign_block_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote& value); ///< \private void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::HarvesterBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_reload& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_reload_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir& value); ///< \private void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::IntervalRequest& value); ///< \private void accept(Visitor& visitor, const ::mmx::KeyFile& value); ///< \private void accept(Visitor& visitor, const ::mmx::LookupInfo& value); ///< \private void accept(Visitor& visitor, const ::mmx::NetworkInfo& value); ///< \private void accept(Visitor& visitor, const ::mmx::NodeBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_add_block& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_add_block_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_add_transaction& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_add_transaction_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_call_contract& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_call_contract_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_dump_storage& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_dump_storage_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_fetch_offers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_fetch_offers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_all_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_all_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_balance& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_balance_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_at& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_at_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_hash& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract_for& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contract_for_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_exec_history& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_exec_history_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_header& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_header_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_header_at& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_header_at_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_height& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_height_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_history& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_history_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_history_memo& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_history_memo_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_network_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_network_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offer& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offer_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offers_by& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_offers_by_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_params& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_params_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_history& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_history_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swaps& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_swaps_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_synced_height& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_synced_height_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_balance& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_balance_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_supply& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_total_supply_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_trade_history& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_transaction& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_transaction_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_transactions& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_transactions_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_height& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_height_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_array& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_array_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_field& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_field_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_map& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_map_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_object& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_object_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_var& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_read_storage_var_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_revert_sync& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_revert_sync_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_start_sync& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_start_sync_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_validate& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_validate_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_verify_partial& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_verify_partial_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target& value); ///< \private void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Operation& value); ///< \private void accept(Visitor& visitor, const ::mmx::Partial& value); ///< \private void accept(Visitor& visitor, const ::mmx::PeerInfo& value); ///< \private void accept(Visitor& visitor, const ::mmx::PlotHeader& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofOfSpace& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofOfSpaceNFT& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofOfSpaceOG& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofOfTime& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofResponse& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofServerBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofServer_compute& value); ///< \private void accept(Visitor& visitor, const ::mmx::ProofServer_compute_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::ReceiveNote& value); ///< \private void accept(Visitor& visitor, const ::mmx::Request& value); ///< \private void accept(Visitor& visitor, const ::mmx::Return& value); ///< \private void accept(Visitor& visitor, const ::mmx::RouterBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_discover& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_discover_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_fetch_block& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_fetch_block_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_id& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_id_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_known_peers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_known_peers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_peer_info& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_peer_info_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_peers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_get_peers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_kick_peer& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_kick_peer_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_sign_msg& value); ///< \private void accept(Visitor& visitor, const ::mmx::Router_sign_msg_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Solution& value); ///< \private void accept(Visitor& visitor, const ::mmx::TimeLordBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf& value); ///< \private void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Transaction& value); ///< \private void accept(Visitor& visitor, const ::mmx::TransactionBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::VDF_Point& value); ///< \private void accept(Visitor& visitor, const ::mmx::ValidatorVote& value); ///< \private void accept(Visitor& visitor, const ::mmx::WalletBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_add_account& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_add_account_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_add_token& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_add_token_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_complete& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_complete_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_create_account& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_create_account_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_deploy& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_deploy_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_deposit& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_deposit_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_execute& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_execute_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_account& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_account_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_address& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_address_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_balance& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_balance_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_history& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_history_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_offers& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_offers_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_is_locked& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_is_locked_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_lock& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_lock_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_make_offer& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_make_offer_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_release& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_release_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_release_all& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_release_all_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_rem_token& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_rem_token_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_remove_account& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_remove_account_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_reserve& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_reserve_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_from& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_from_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_many& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_many_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_off& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_send_off_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_sign_off& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_sign_off_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_unlock& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_unlock_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_update_cache& value); ///< \private void accept(Visitor& visitor, const ::mmx::Wallet_update_cache_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::WalletFile& value); ///< \private void accept(Visitor& visitor, const ::mmx::WebAPIBase& value); ///< \private void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown& value); ///< \private void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown_return& value); ///< \private void accept(Visitor& visitor, const ::mmx::account_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::account_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::addr_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::balance_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::block_index_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::compile_flags_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::error_code_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::exec_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::exec_error_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::exec_result_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::farmed_block_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::farmed_block_summary_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::fixed128& value); ///< \private void accept(Visitor& visitor, const ::mmx::hash_512_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::hash_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::node_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::node_type_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::offer_data_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::peer_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::permission_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::plot_nft_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::pooling_error_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::pooling_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::pooling_stats_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::pubkey_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::query_filter_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::signature_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::skey_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::spend_options_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::swap_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::swap_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::swap_pool_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::swap_user_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::table_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::trade_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::trade_log_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_index_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_info_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_log_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_note_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::tx_type_e& value); ///< \private void accept(Visitor& visitor, const ::mmx::txin_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::txio_entry_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::txio_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::txout_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::uint128& value); ///< \private void accept(Visitor& visitor, const ::mmx::uint_fraction_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::ulong_fraction_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::virtual_plot_info_t& value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private /// \private template<> struct type<::mmx::Block> { void read(TypeInput& in, ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Block& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Block& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Block& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Block& value, bool special = false); }; /// \private template<> struct type<::mmx::BlockHeader> { void read(TypeInput& in, ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::BlockHeader& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::BlockHeader& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::BlockHeader& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::BlockHeader& value, bool special = false); }; /// \private template<> struct type<::mmx::ChainParams> { void read(TypeInput& in, ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ChainParams& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ChainParams& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ChainParams& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ChainParams& value, bool special = false); }; /// \private template<> struct type<::mmx::Challenge> { void read(TypeInput& in, ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Challenge& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Challenge& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Challenge& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Challenge& value, bool special = false); }; /// \private template<> struct type<::mmx::Contract> { void read(TypeInput& in, ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Contract& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Contract& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Contract& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Contract& value, bool special = false); }; /// \private template<> struct type<::mmx::FarmInfo> { void read(TypeInput& in, ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::FarmInfo& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::FarmInfo& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::FarmInfo& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::FarmInfo& value, bool special = false); }; /// \private template<> struct type<::mmx::FarmerBase> { void read(TypeInput& in, ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::FarmerBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::FarmerBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::FarmerBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::Farmer_get_farm_info> { void read(TypeInput& in, ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_farm_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_farm_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farm_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_farm_info_return> { void read(TypeInput& in, ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_farm_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_farm_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farm_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_farmer_keys> { void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_farmer_keys& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farmer_keys& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_farmer_keys_return> { void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_farmer_keys_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farmer_keys_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_mac_addr> { void read(TypeInput& in, ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_mac_addr& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_mac_addr& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_mac_addr_return> { void read(TypeInput& in, ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_mac_addr_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_mac_addr_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_partial_diff> { void read(TypeInput& in, ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_partial_diff& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diff& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_partial_diff_return> { void read(TypeInput& in, ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_partial_diff_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diff_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_partial_diffs> { void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_partial_diffs& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diffs& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_get_partial_diffs_return> { void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_get_partial_diffs_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diffs_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_sign_block> { void read(TypeInput& in, ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_sign_block& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_sign_block& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_block& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_block& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_sign_block_return> { void read(TypeInput& in, ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_sign_block_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_sign_block_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_block_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_block_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_sign_vote> { void read(TypeInput& in, ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_sign_vote& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_sign_vote& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_vote& value, bool special = false); }; /// \private template<> struct type<::mmx::Farmer_sign_vote_return> { void read(TypeInput& in, ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Farmer_sign_vote_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Farmer_sign_vote_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_vote_return& value, bool special = false); }; /// \private template<> struct type<::mmx::HarvesterBase> { void read(TypeInput& in, ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::HarvesterBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::HarvesterBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::HarvesterBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::Harvester_add_plot_dir> { void read(TypeInput& in, ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_add_plot_dir& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_add_plot_dir& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_add_plot_dir_return> { void read(TypeInput& in, ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_add_plot_dir_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_add_plot_dir_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_get_farm_info> { void read(TypeInput& in, ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_get_farm_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_get_farm_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_farm_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_get_farm_info_return> { void read(TypeInput& in, ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_get_farm_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_get_farm_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_farm_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_get_total_bytes> { void read(TypeInput& in, ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_get_total_bytes& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_total_bytes& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_get_total_bytes_return> { void read(TypeInput& in, ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_get_total_bytes_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_total_bytes_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_reload> { void read(TypeInput& in, ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_reload& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_reload& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_reload& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_reload& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_reload_return> { void read(TypeInput& in, ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_reload_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_reload_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_reload_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_reload_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_rem_plot_dir> { void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_rem_plot_dir& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_rem_plot_dir& value, bool special = false); }; /// \private template<> struct type<::mmx::Harvester_rem_plot_dir_return> { void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Harvester_rem_plot_dir_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Harvester_rem_plot_dir_return& value, bool special = false); }; /// \private template<> struct type<::mmx::IntervalRequest> { void read(TypeInput& in, ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::IntervalRequest& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::IntervalRequest& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::IntervalRequest& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::IntervalRequest& value, bool special = false); }; /// \private template<> struct type<::mmx::KeyFile> { void read(TypeInput& in, ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::KeyFile& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::KeyFile& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::KeyFile& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::KeyFile& value, bool special = false); }; /// \private template<> struct type<::mmx::LookupInfo> { void read(TypeInput& in, ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::LookupInfo& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::LookupInfo& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::LookupInfo& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::LookupInfo& value, bool special = false); }; /// \private template<> struct type<::mmx::NetworkInfo> { void read(TypeInput& in, ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::NetworkInfo& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::NetworkInfo& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::NetworkInfo& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::NetworkInfo& value, bool special = false); }; /// \private template<> struct type<::mmx::NodeBase> { void read(TypeInput& in, ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::NodeBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::NodeBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::NodeBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::Node_add_block> { void read(TypeInput& in, ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_add_block& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_add_block& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_add_block& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_add_block& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_add_block_return> { void read(TypeInput& in, ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_add_block_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_add_block_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_add_block_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_add_block_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_add_transaction> { void read(TypeInput& in, ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_add_transaction& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_add_transaction& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_add_transaction& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_add_transaction& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_add_transaction_return> { void read(TypeInput& in, ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_add_transaction_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_add_transaction_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_add_transaction_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_add_transaction_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_call_contract> { void read(TypeInput& in, ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_call_contract& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_call_contract& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_call_contract& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_call_contract& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_call_contract_return> { void read(TypeInput& in, ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_call_contract_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_call_contract_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_call_contract_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_call_contract_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_dump_storage> { void read(TypeInput& in, ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_dump_storage& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_dump_storage& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_dump_storage& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_dump_storage& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_dump_storage_return> { void read(TypeInput& in, ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_dump_storage_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_dump_storage_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_dump_storage_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_dump_storage_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_fetch_offers> { void read(TypeInput& in, ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_fetch_offers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_fetch_offers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_fetch_offers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_fetch_offers& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_fetch_offers_return> { void read(TypeInput& in, ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_fetch_offers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_fetch_offers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_fetch_offers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_fetch_offers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_all_balances> { void read(TypeInput& in, ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_all_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_all_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_all_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_all_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_all_balances_return> { void read(TypeInput& in, ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_all_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_all_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_all_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_all_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_balance> { void read(TypeInput& in, ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_balance& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_balance& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_balance& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_balance& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_balance_return> { void read(TypeInput& in, ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_balance_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_balance_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_balance_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_balance_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_balances> { void read(TypeInput& in, ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_balances_return> { void read(TypeInput& in, ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block> { void read(TypeInput& in, ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_return> { void read(TypeInput& in, ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_at> { void read(TypeInput& in, ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_at& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_at& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_at& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_at& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_at_return> { void read(TypeInput& in, ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_at_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_at_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_at_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_at_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_hash> { void read(TypeInput& in, ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_hash& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_hash& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_hash_return> { void read(TypeInput& in, ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_hash_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_hash_ex> { void read(TypeInput& in, ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_hash_ex& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_ex& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_block_hash_ex_return> { void read(TypeInput& in, ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_block_hash_ex_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_ex_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract> { void read(TypeInput& in, ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract_return> { void read(TypeInput& in, ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract_balances> { void read(TypeInput& in, ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract_balances_return> { void read(TypeInput& in, ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract_for> { void read(TypeInput& in, ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract_for& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract_for& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_for& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_for& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contract_for_return> { void read(TypeInput& in, ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contract_for_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contract_for_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_for_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_for_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts> { void read(TypeInput& in, ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts_return> { void read(TypeInput& in, ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts_by> { void read(TypeInput& in, ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts_by& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts_by& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_by& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts_by_return> { void read(TypeInput& in, ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts_by_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts_by_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_by_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts_owned_by> { void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts_owned_by& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_owned_by& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_contracts_owned_by_return> { void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_contracts_owned_by_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_owned_by_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_exec_history> { void read(TypeInput& in, ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_exec_history& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_exec_history& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_exec_history& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_exec_history& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_exec_history_return> { void read(TypeInput& in, ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_exec_history_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_exec_history_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_exec_history_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_exec_history_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmed_block_summary> { void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmed_block_summary& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_block_summary& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmed_block_summary_return> { void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmed_block_summary_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_block_summary_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmed_blocks> { void read(TypeInput& in, ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmed_blocks& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_blocks& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmed_blocks_return> { void read(TypeInput& in, ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmed_blocks_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_blocks_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmer_ranking> { void read(TypeInput& in, ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmer_ranking& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmer_ranking& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_farmer_ranking_return> { void read(TypeInput& in, ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_farmer_ranking_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmer_ranking_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_genesis_hash> { void read(TypeInput& in, ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_genesis_hash& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_genesis_hash& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_genesis_hash& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_genesis_hash_return> { void read(TypeInput& in, ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_genesis_hash_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_genesis_hash_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_genesis_hash_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_header> { void read(TypeInput& in, ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_header& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_header& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_header& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_header& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_header_return> { void read(TypeInput& in, ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_header_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_header_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_header_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_header_at> { void read(TypeInput& in, ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_header_at& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_header_at& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_header_at& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_at& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_header_at_return> { void read(TypeInput& in, ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_header_at_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_header_at_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_header_at_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_at_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_height> { void read(TypeInput& in, ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_height& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_height& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_height& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_height& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_height_return> { void read(TypeInput& in, ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_height_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_height_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_height_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_height_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_history> { void read(TypeInput& in, ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_history& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_history& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_history& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_history& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_history_return> { void read(TypeInput& in, ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_history_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_history_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_history_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_history_memo> { void read(TypeInput& in, ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_history_memo& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_history_memo& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_history_memo& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_memo& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_history_memo_return> { void read(TypeInput& in, ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_history_memo_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_history_memo_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_history_memo_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_memo_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_network_info> { void read(TypeInput& in, ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_network_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_network_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_network_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_network_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_network_info_return> { void read(TypeInput& in, ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_network_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_network_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_network_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_network_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offer> { void read(TypeInput& in, ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offer& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offer& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offer& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offer& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offer_return> { void read(TypeInput& in, ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offer_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offer_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offer_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offer_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offers> { void read(TypeInput& in, ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offers_return> { void read(TypeInput& in, ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offers_by> { void read(TypeInput& in, ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offers_by& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offers_by& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_by& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_by& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_offers_by_return> { void read(TypeInput& in, ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_offers_by_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_offers_by_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_by_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_by_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_params> { void read(TypeInput& in, ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_params& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_params& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_params& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_params& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_params_return> { void read(TypeInput& in, ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_params_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_params_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_params_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_params_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_plot_nft_info> { void read(TypeInput& in, ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_plot_nft_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_plot_nft_info_return> { void read(TypeInput& in, ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_plot_nft_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_plot_nft_target> { void read(TypeInput& in, ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_plot_nft_target& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_target& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_plot_nft_target_return> { void read(TypeInput& in, ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_plot_nft_target_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_target_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_recent_offers> { void read(TypeInput& in, ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_recent_offers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_recent_offers_return> { void read(TypeInput& in, ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_recent_offers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_recent_offers_for> { void read(TypeInput& in, ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_recent_offers_for& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_for& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_recent_offers_for_return> { void read(TypeInput& in, ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_recent_offers_for_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_for_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_equivalent_liquidity> { void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_equivalent_liquidity& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_equivalent_liquidity_return> { void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_equivalent_liquidity_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_fees_earned> { void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_fees_earned& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_fees_earned& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_fees_earned_return> { void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_fees_earned_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_fees_earned_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_history> { void read(TypeInput& in, ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_history& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_history& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_history& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_history& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_history_return> { void read(TypeInput& in, ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_history_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_history_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_history_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_history_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_info> { void read(TypeInput& in, ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_info_return> { void read(TypeInput& in, ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_liquidity_by> { void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_liquidity_by& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_liquidity_by_return> { void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_liquidity_by_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_trade_estimate> { void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_trade_estimate& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_trade_estimate_return> { void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_trade_estimate_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_user_info> { void read(TypeInput& in, ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_user_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_user_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_user_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swap_user_info_return> { void read(TypeInput& in, ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swap_user_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swap_user_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_user_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swaps> { void read(TypeInput& in, ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swaps& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swaps& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swaps& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swaps& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_swaps_return> { void read(TypeInput& in, ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_swaps_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_swaps_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_swaps_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_swaps_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_synced_height> { void read(TypeInput& in, ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_synced_height& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_synced_height& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_height& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_height& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_synced_height_return> { void read(TypeInput& in, ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_synced_height_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_synced_height_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_height_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_height_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_synced_vdf_height> { void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_synced_vdf_height& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_vdf_height& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_synced_vdf_height_return> { void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_synced_vdf_height_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_vdf_height_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_balance> { void read(TypeInput& in, ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_balance& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_balance& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balance& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balance& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_balance_return> { void read(TypeInput& in, ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_balance_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_balance_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balance_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balance_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_balances> { void read(TypeInput& in, ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_balances_return> { void read(TypeInput& in, ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_supply> { void read(TypeInput& in, ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_supply& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_supply& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_supply& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_supply& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_total_supply_return> { void read(TypeInput& in, ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_total_supply_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_total_supply_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_total_supply_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_supply_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_trade_history> { void read(TypeInput& in, ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_trade_history& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_trade_history& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_trade_history_return> { void read(TypeInput& in, ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_trade_history_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_trade_history_for> { void read(TypeInput& in, ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_trade_history_for& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_for& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_for& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_trade_history_for_return> { void read(TypeInput& in, ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_trade_history_for_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_for_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_for_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_transaction> { void read(TypeInput& in, ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_transaction& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_transaction& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_transaction& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_transaction& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_transaction_return> { void read(TypeInput& in, ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_transaction_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_transaction_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_transaction_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_transaction_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_transactions> { void read(TypeInput& in, ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_transactions& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_transactions& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_transactions& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_transactions& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_transactions_return> { void read(TypeInput& in, ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_transactions_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_transactions_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_transactions_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_transactions_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_height> { void read(TypeInput& in, ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_height& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_height& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_height& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_height& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_height_return> { void read(TypeInput& in, ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_height_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_height_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_height_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_height_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids> { void read(TypeInput& in, ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids_return> { void read(TypeInput& in, ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids_at> { void read(TypeInput& in, ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids_at& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_at& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids_at_return> { void read(TypeInput& in, ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids_at_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_at_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids_since> { void read(TypeInput& in, ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids_since& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_since& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_ids_since_return> { void read(TypeInput& in, ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_ids_since_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_since_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_info> { void read(TypeInput& in, ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_info_return> { void read(TypeInput& in, ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_info_for> { void read(TypeInput& in, ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_info_for& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_for& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_for& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_tx_info_for_return> { void read(TypeInput& in, ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_tx_info_for_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_for_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_for_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_vdf_height> { void read(TypeInput& in, ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_vdf_height& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_vdf_height& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_height& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_vdf_height_return> { void read(TypeInput& in, ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_vdf_height_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_vdf_height_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_height_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_vdf_peak> { void read(TypeInput& in, ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_vdf_peak& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_vdf_peak& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_peak& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_get_vdf_peak_return> { void read(TypeInput& in, ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_get_vdf_peak_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_get_vdf_peak_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_peak_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage> { void read(TypeInput& in, ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_return> { void read(TypeInput& in, ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_array> { void read(TypeInput& in, ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_array& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_array& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_array& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_array& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_array_return> { void read(TypeInput& in, ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_array_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_array_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_array_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_array_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_addr> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_addr& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_addr& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_addr_return> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_addr_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_addr_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_string> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_string& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_string& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_string_return> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_string_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_string_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_var> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_var& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_var& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_entry_var_return> { void read(TypeInput& in, ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_entry_var_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_var_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_field> { void read(TypeInput& in, ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_field& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_field& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_field& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_field& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_field_return> { void read(TypeInput& in, ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_field_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_field_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_field_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_field_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_map> { void read(TypeInput& in, ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_map& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_map& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_map& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_map& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_map_return> { void read(TypeInput& in, ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_map_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_map_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_map_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_map_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_object> { void read(TypeInput& in, ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_object& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_object& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_object& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_object& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_object_return> { void read(TypeInput& in, ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_object_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_object_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_object_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_object_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_var> { void read(TypeInput& in, ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_var& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_var& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_var& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_var& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_read_storage_var_return> { void read(TypeInput& in, ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_read_storage_var_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_read_storage_var_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_var_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_var_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_revert_sync> { void read(TypeInput& in, ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_revert_sync& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_revert_sync& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_revert_sync& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_revert_sync& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_revert_sync_return> { void read(TypeInput& in, ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_revert_sync_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_revert_sync_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_revert_sync_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_revert_sync_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_start_sync> { void read(TypeInput& in, ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_start_sync& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_start_sync& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_start_sync& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_start_sync& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_start_sync_return> { void read(TypeInput& in, ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_start_sync_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_start_sync_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_start_sync_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_start_sync_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_validate> { void read(TypeInput& in, ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_validate& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_validate& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_validate& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_validate& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_validate_return> { void read(TypeInput& in, ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_validate_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_validate_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_validate_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_validate_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_verify_partial> { void read(TypeInput& in, ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_verify_partial& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_verify_partial& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_verify_partial& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_verify_partial& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_verify_partial_return> { void read(TypeInput& in, ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_verify_partial_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_verify_partial_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_verify_partial_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_verify_partial_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_verify_plot_nft_target> { void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_verify_plot_nft_target& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_verify_plot_nft_target& value, bool special = false); }; /// \private template<> struct type<::mmx::Node_verify_plot_nft_target_return> { void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Node_verify_plot_nft_target_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Node_verify_plot_nft_target_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Operation> { void read(TypeInput& in, ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Operation& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Operation& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Operation& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Operation& value, bool special = false); }; /// \private template<> struct type<::mmx::Partial> { void read(TypeInput& in, ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Partial& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Partial& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Partial& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Partial& value, bool special = false); }; /// \private template<> struct type<::mmx::PeerInfo> { void read(TypeInput& in, ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::PeerInfo& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::PeerInfo& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::PeerInfo& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::PeerInfo& value, bool special = false); }; /// \private template<> struct type<::mmx::PlotHeader> { void read(TypeInput& in, ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::PlotHeader& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::PlotHeader& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::PlotHeader& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::PlotHeader& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofOfSpace> { void read(TypeInput& in, ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofOfSpace& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofOfSpace& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofOfSpace& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpace& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofOfSpaceNFT> { void read(TypeInput& in, ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofOfSpaceNFT& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofOfSpaceNFT& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofOfSpaceNFT& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpaceNFT& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofOfSpaceOG> { void read(TypeInput& in, ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofOfSpaceOG& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofOfSpaceOG& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofOfSpaceOG& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpaceOG& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofOfTime> { void read(TypeInput& in, ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofOfTime& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofOfTime& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofOfTime& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofOfTime& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofResponse> { void read(TypeInput& in, ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofResponse& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofResponse& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofResponse& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofResponse& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofServerBase> { void read(TypeInput& in, ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofServerBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofServerBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofServerBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::ProofServer_compute> { void read(TypeInput& in, ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofServer_compute& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofServer_compute& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofServer_compute& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofServer_compute& value, bool special = false); }; /// \private template<> struct type<::mmx::ProofServer_compute_return> { void read(TypeInput& in, ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ProofServer_compute_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ProofServer_compute_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ProofServer_compute_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ProofServer_compute_return& value, bool special = false); }; /// \private template<> struct type<::mmx::ReceiveNote> { void read(TypeInput& in, ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ReceiveNote& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ReceiveNote& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ReceiveNote& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ReceiveNote& value, bool special = false); }; /// \private template<> struct type<::mmx::Request> { void read(TypeInput& in, ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Request& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Request& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Request& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Request& value, bool special = false); }; /// \private template<> struct type<::mmx::Return> { void read(TypeInput& in, ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Return& value, bool special = false); }; /// \private template<> struct type<::mmx::RouterBase> { void read(TypeInput& in, ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::RouterBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::RouterBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::RouterBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::Router_discover> { void read(TypeInput& in, ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_discover& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_discover& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_discover& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_discover& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_discover_return> { void read(TypeInput& in, ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_discover_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_discover_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_discover_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_discover_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_fetch_block> { void read(TypeInput& in, ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_fetch_block& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_fetch_block& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_fetch_block_return> { void read(TypeInput& in, ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_fetch_block_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_fetch_block_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_fetch_block_at> { void read(TypeInput& in, ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_fetch_block_at& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_fetch_block_at& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_at& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_fetch_block_at_return> { void read(TypeInput& in, ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_fetch_block_at_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_fetch_block_at_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_at_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_blocks_at> { void read(TypeInput& in, ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_blocks_at& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_blocks_at& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_blocks_at& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_blocks_at_return> { void read(TypeInput& in, ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_blocks_at_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_blocks_at_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_blocks_at_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_connected_peers> { void read(TypeInput& in, ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_connected_peers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_connected_peers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_connected_peers& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_connected_peers_return> { void read(TypeInput& in, ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_connected_peers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_connected_peers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_connected_peers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_id> { void read(TypeInput& in, ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_id& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_id& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_id& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_id& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_id_return> { void read(TypeInput& in, ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_id_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_id_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_id_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_id_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_info> { void read(TypeInput& in, ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_info_return> { void read(TypeInput& in, ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_known_peers> { void read(TypeInput& in, ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_known_peers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_known_peers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_known_peers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_known_peers& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_known_peers_return> { void read(TypeInput& in, ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_known_peers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_known_peers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_known_peers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_known_peers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_peer_info> { void read(TypeInput& in, ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_peer_info& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_peer_info& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_peer_info& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_peer_info& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_peer_info_return> { void read(TypeInput& in, ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_peer_info_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_peer_info_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_peer_info_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_peer_info_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_peers> { void read(TypeInput& in, ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_peers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_peers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_peers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_peers& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_get_peers_return> { void read(TypeInput& in, ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_get_peers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_get_peers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_get_peers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_get_peers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_kick_peer> { void read(TypeInput& in, ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_kick_peer& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_kick_peer& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_kick_peer& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_kick_peer& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_kick_peer_return> { void read(TypeInput& in, ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_kick_peer_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_kick_peer_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_kick_peer_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_kick_peer_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_sign_msg> { void read(TypeInput& in, ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_sign_msg& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_sign_msg& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_sign_msg& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_sign_msg& value, bool special = false); }; /// \private template<> struct type<::mmx::Router_sign_msg_return> { void read(TypeInput& in, ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Router_sign_msg_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Router_sign_msg_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Router_sign_msg_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Router_sign_msg_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Solution> { void read(TypeInput& in, ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Solution& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Solution& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Solution& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Solution& value, bool special = false); }; /// \private template<> struct type<::mmx::TimeLordBase> { void read(TypeInput& in, ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::TimeLordBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::TimeLordBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::TimeLordBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::TimeLord_stop_vdf> { void read(TypeInput& in, ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::TimeLord_stop_vdf& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::TimeLord_stop_vdf& value, bool special = false); }; /// \private template<> struct type<::mmx::TimeLord_stop_vdf_return> { void read(TypeInput& in, ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::TimeLord_stop_vdf_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::TimeLord_stop_vdf_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Transaction> { void read(TypeInput& in, ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Transaction& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Transaction& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Transaction& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Transaction& value, bool special = false); }; /// \private template<> struct type<::mmx::TransactionBase> { void read(TypeInput& in, ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::TransactionBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::TransactionBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::TransactionBase& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::TransactionBase& value, bool special = false); }; /// \private template<> struct type<::mmx::VDF_Point> { void read(TypeInput& in, ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::VDF_Point& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::VDF_Point& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::VDF_Point& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::VDF_Point& value, bool special = false); }; /// \private template<> struct type<::mmx::ValidatorVote> { void read(TypeInput& in, ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ValidatorVote& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ValidatorVote& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ValidatorVote& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ValidatorVote& value, bool special = false); }; /// \private template<> struct type<::mmx::WalletBase> { void read(TypeInput& in, ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::WalletBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::WalletBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::WalletBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::Wallet_accept_offer> { void read(TypeInput& in, ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_accept_offer& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_accept_offer& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_accept_offer& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_accept_offer_return> { void read(TypeInput& in, ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_accept_offer_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_accept_offer_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_accept_offer_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_add_account> { void read(TypeInput& in, ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_add_account& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_add_account& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_add_account& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_account& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_add_account_return> { void read(TypeInput& in, ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_add_account_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_add_account_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_add_account_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_account_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_add_token> { void read(TypeInput& in, ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_add_token& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_add_token& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_add_token& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_token& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_add_token_return> { void read(TypeInput& in, ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_add_token_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_add_token_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_add_token_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_token_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_cancel_offer> { void read(TypeInput& in, ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_cancel_offer& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_cancel_offer& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_cancel_offer& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_cancel_offer_return> { void read(TypeInput& in, ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_cancel_offer_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_cancel_offer_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_cancel_offer_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_complete> { void read(TypeInput& in, ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_complete& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_complete& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_complete& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_complete& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_complete_return> { void read(TypeInput& in, ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_complete_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_complete_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_complete_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_complete_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_create_account> { void read(TypeInput& in, ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_create_account& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_create_account& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_create_account& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_account& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_create_account_return> { void read(TypeInput& in, ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_create_account_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_create_account_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_create_account_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_account_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_create_wallet> { void read(TypeInput& in, ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_create_wallet& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_create_wallet& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_wallet& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_create_wallet_return> { void read(TypeInput& in, ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_create_wallet_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_create_wallet_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_wallet_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_deploy> { void read(TypeInput& in, ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_deploy& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_deploy& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_deploy& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_deploy& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_deploy_return> { void read(TypeInput& in, ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_deploy_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_deploy_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_deploy_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_deploy_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_deposit> { void read(TypeInput& in, ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_deposit& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_deposit& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_deposit& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_deposit& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_deposit_return> { void read(TypeInput& in, ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_deposit_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_deposit_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_deposit_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_deposit_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_execute> { void read(TypeInput& in, ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_execute& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_execute& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_execute& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_execute& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_execute_return> { void read(TypeInput& in, ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_execute_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_execute_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_execute_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_execute_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_export_wallet> { void read(TypeInput& in, ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_export_wallet& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_export_wallet& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_export_wallet& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_export_wallet_return> { void read(TypeInput& in, ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_export_wallet_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_export_wallet_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_export_wallet_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_find_wallet_by_addr> { void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_find_wallet_by_addr& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_find_wallet_by_addr_return> { void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_find_wallet_by_addr_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_gather_inputs_for> { void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_gather_inputs_for& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_gather_inputs_for& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_gather_inputs_for_return> { void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_gather_inputs_for_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_gather_inputs_for_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_account> { void read(TypeInput& in, ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_account& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_account& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_account& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_account& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_account_return> { void read(TypeInput& in, ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_account_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_account_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_account_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_account_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_address> { void read(TypeInput& in, ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_address& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_address& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_address& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_address& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_address_return> { void read(TypeInput& in, ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_address_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_address_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_address_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_address_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_accounts> { void read(TypeInput& in, ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_accounts& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_accounts& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_accounts_return> { void read(TypeInput& in, ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_accounts_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_accounts_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_addresses> { void read(TypeInput& in, ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_addresses& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_addresses& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_addresses_return> { void read(TypeInput& in, ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_addresses_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_addresses_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_farmer_keys> { void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_farmer_keys& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_all_farmer_keys_return> { void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_farmer_keys_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_balance> { void read(TypeInput& in, ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_balance& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_balance& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balance& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balance& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_balance_return> { void read(TypeInput& in, ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_balance_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_balance_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balance_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balance_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_balances> { void read(TypeInput& in, ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_balances_return> { void read(TypeInput& in, ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contract_balances> { void read(TypeInput& in, ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contract_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contract_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contract_balances_return> { void read(TypeInput& in, ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contract_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contract_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contracts> { void read(TypeInput& in, ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contracts& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contracts_return> { void read(TypeInput& in, ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contracts_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contracts_owned> { void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contracts_owned& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_owned& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_contracts_owned_return> { void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_contracts_owned_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_owned_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_farmer_keys> { void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_farmer_keys& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_farmer_keys& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_farmer_keys_return> { void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_farmer_keys_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_farmer_keys_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_history> { void read(TypeInput& in, ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_history& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_history& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_history& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_history& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_history_return> { void read(TypeInput& in, ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_history_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_history_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_history_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_history_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_master_seed> { void read(TypeInput& in, ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_master_seed& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_master_seed& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_master_seed& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_master_seed_return> { void read(TypeInput& in, ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_master_seed_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_master_seed_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_master_seed_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_mnemonic_seed> { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_seed& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_mnemonic_seed_return> { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_seed_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_mnemonic_wordlist> { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_wordlist& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_mnemonic_wordlist_return> { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_wordlist_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_offers> { void read(TypeInput& in, ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_offers& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_offers& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_offers& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_offers& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_offers_return> { void read(TypeInput& in, ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_offers_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_offers_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_offers_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_offers_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_swap_liquidity> { void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_swap_liquidity& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_swap_liquidity_return> { void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_swap_liquidity_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_token_list> { void read(TypeInput& in, ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_token_list& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_token_list& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_token_list& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_token_list_return> { void read(TypeInput& in, ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_token_list_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_token_list_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_token_list_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_total_balances> { void read(TypeInput& in, ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_total_balances& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_total_balances& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_total_balances& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_total_balances_return> { void read(TypeInput& in, ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_total_balances_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_total_balances_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_total_balances_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_tx_log> { void read(TypeInput& in, ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_tx_log& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_tx_log& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_tx_log& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_get_tx_log_return> { void read(TypeInput& in, ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_get_tx_log_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_get_tx_log_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_tx_log_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_import_wallet> { void read(TypeInput& in, ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_import_wallet& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_import_wallet& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_import_wallet& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_import_wallet_return> { void read(TypeInput& in, ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_import_wallet_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_import_wallet_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_import_wallet_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_is_locked> { void read(TypeInput& in, ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_is_locked& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_is_locked& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_is_locked& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_is_locked& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_is_locked_return> { void read(TypeInput& in, ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_is_locked_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_is_locked_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_is_locked_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_is_locked_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_lock> { void read(TypeInput& in, ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_lock& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_lock& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_lock& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_lock& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_lock_return> { void read(TypeInput& in, ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_lock_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_lock_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_lock_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_lock_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_make_offer> { void read(TypeInput& in, ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_make_offer& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_make_offer& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_make_offer& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_make_offer& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_make_offer_return> { void read(TypeInput& in, ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_make_offer_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_make_offer_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_make_offer_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_make_offer_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_mark_spent> { void read(TypeInput& in, ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_mark_spent& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_mark_spent& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_mark_spent& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_mark_spent_return> { void read(TypeInput& in, ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_mark_spent_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_mark_spent_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_mark_spent_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_offer_trade> { void read(TypeInput& in, ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_offer_trade& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_offer_trade& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_trade& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_offer_trade_return> { void read(TypeInput& in, ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_offer_trade_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_offer_trade_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_trade_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_offer_withdraw> { void read(TypeInput& in, ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_offer_withdraw& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_withdraw& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_offer_withdraw_return> { void read(TypeInput& in, ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_offer_withdraw_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_withdraw_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_plotnft_create> { void read(TypeInput& in, ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_plotnft_create& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_create& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_create& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_plotnft_create_return> { void read(TypeInput& in, ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_plotnft_create_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_create_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_create_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_plotnft_exec> { void read(TypeInput& in, ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_plotnft_exec& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_exec& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_plotnft_exec_return> { void read(TypeInput& in, ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_plotnft_exec_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_exec_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_release> { void read(TypeInput& in, ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_release& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_release& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_release& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_release& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_release_return> { void read(TypeInput& in, ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_release_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_release_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_release_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_release_all> { void read(TypeInput& in, ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_release_all& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_release_all& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_release_all& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_all& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_release_all_return> { void read(TypeInput& in, ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_release_all_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_release_all_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_release_all_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_all_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_rem_token> { void read(TypeInput& in, ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_rem_token& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_rem_token& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_rem_token& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_rem_token& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_rem_token_return> { void read(TypeInput& in, ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_rem_token_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_rem_token_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_rem_token_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_rem_token_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_remove_account> { void read(TypeInput& in, ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_remove_account& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_remove_account& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_remove_account& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_remove_account& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_remove_account_return> { void read(TypeInput& in, ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_remove_account_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_remove_account_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_remove_account_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_remove_account_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_reserve> { void read(TypeInput& in, ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_reserve& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_reserve& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_reserve& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_reserve& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_reserve_return> { void read(TypeInput& in, ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_reserve_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_reserve_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_reserve_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_reserve_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_reset_cache> { void read(TypeInput& in, ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_reset_cache& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_reset_cache& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_reset_cache& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_reset_cache_return> { void read(TypeInput& in, ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_reset_cache_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_reset_cache_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_reset_cache_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send> { void read(TypeInput& in, ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_return> { void read(TypeInput& in, ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_from> { void read(TypeInput& in, ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_from& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_from& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_from& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_from& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_from_return> { void read(TypeInput& in, ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_from_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_from_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_from_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_from_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_many> { void read(TypeInput& in, ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_many& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_many& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_many& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_many& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_many_return> { void read(TypeInput& in, ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_many_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_many_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_many_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_many_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_off> { void read(TypeInput& in, ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_off& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_off& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_off& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_off& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_send_off_return> { void read(TypeInput& in, ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_send_off_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_send_off_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_send_off_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_off_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_set_address_count> { void read(TypeInput& in, ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_set_address_count& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_set_address_count& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_set_address_count& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_set_address_count_return> { void read(TypeInput& in, ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_set_address_count_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_set_address_count_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_set_address_count_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_sign_msg> { void read(TypeInput& in, ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_sign_msg& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_sign_msg& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_msg& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_sign_msg_return> { void read(TypeInput& in, ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_sign_msg_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_sign_msg_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_msg_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_sign_off> { void read(TypeInput& in, ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_sign_off& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_sign_off& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_off& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_off& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_sign_off_return> { void read(TypeInput& in, ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_sign_off_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_sign_off_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_off_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_off_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_add_liquid> { void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_add_liquid& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_add_liquid& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_add_liquid_return> { void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_add_liquid_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_add_liquid_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_rem_liquid> { void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_rem_liquid& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_rem_liquid_return> { void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_rem_liquid_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_trade> { void read(TypeInput& in, ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_trade& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_trade& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_trade& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_swap_trade_return> { void read(TypeInput& in, ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_swap_trade_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_swap_trade_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_trade_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_unlock> { void read(TypeInput& in, ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_unlock& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_unlock& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_unlock& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_unlock& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_unlock_return> { void read(TypeInput& in, ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_unlock_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_unlock_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_unlock_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_unlock_return& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_update_cache> { void read(TypeInput& in, ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_update_cache& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_update_cache& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_update_cache& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_update_cache& value, bool special = false); }; /// \private template<> struct type<::mmx::Wallet_update_cache_return> { void read(TypeInput& in, ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::Wallet_update_cache_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::Wallet_update_cache_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::Wallet_update_cache_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::Wallet_update_cache_return& value, bool special = false); }; /// \private template<> struct type<::mmx::WalletFile> { void read(TypeInput& in, ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::WalletFile& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::WalletFile& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::WalletFile& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::WalletFile& value, bool special = false); }; /// \private template<> struct type<::mmx::WebAPIBase> { void read(TypeInput& in, ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::WebAPIBase& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::WebAPIBase& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::WebAPIBase& value) { vnx::accept(visitor, value); } }; /// \private template<> struct type<::mmx::WebAPI_shutdown> { void read(TypeInput& in, ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::WebAPI_shutdown& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::WebAPI_shutdown& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::WebAPI_shutdown& value, bool special = false); }; /// \private template<> struct type<::mmx::WebAPI_shutdown_return> { void read(TypeInput& in, ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::WebAPI_shutdown_return& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::WebAPI_shutdown_return& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown_return& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::WebAPI_shutdown_return& value, bool special = false); }; /// \private template<> struct type<::mmx::account_info_t> { void read(TypeInput& in, ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::account_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::account_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::account_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::account_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::account_t> { void read(TypeInput& in, ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::account_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::account_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::account_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::account_t& value, bool special = false); }; /// \private template<> struct type<::mmx::addr_t> { void read(TypeInput& in, ::mmx::addr_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::addr_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::addr_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::addr_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::addr_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::addr_t& value, bool special = false); }; /// \private template<> struct type<::mmx::balance_t> { void read(TypeInput& in, ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::balance_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::balance_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::balance_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::balance_t& value, bool special = false); }; /// \private template<> struct type<::mmx::block_index_t> { void read(TypeInput& in, ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::block_index_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::block_index_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::block_index_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::block_index_t& value, bool special = false); }; /// \private template<> struct type<::mmx::compile_flags_t> { void read(TypeInput& in, ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::compile_flags_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::compile_flags_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::compile_flags_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::compile_flags_t& value, bool special = false); }; /// \private template<> struct type<::mmx::error_code_e> { void read(TypeInput& in, ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::error_code_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::error_code_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::error_code_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::error_code_e& value, bool special = false); }; /// \private template<> struct type<::mmx::exec_entry_t> { void read(TypeInput& in, ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::exec_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::exec_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::exec_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::exec_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::exec_error_t> { void read(TypeInput& in, ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::exec_error_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::exec_error_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::exec_error_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::exec_error_t& value, bool special = false); }; /// \private template<> struct type<::mmx::exec_result_t> { void read(TypeInput& in, ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::exec_result_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::exec_result_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::exec_result_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::exec_result_t& value, bool special = false); }; /// \private template<> struct type<::mmx::farmed_block_info_t> { void read(TypeInput& in, ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::farmed_block_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::farmed_block_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::farmed_block_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::farmed_block_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::farmed_block_summary_t> { void read(TypeInput& in, ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::farmed_block_summary_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::farmed_block_summary_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::farmed_block_summary_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::farmed_block_summary_t& value, bool special = false); }; /// \private template<> struct type<::mmx::fixed128> { void read(TypeInput& in, ::mmx::fixed128& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::fixed128& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::fixed128& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::fixed128& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::fixed128& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::fixed128& value, bool special = false); }; /// \private template<> struct type<::mmx::hash_512_t> { void read(TypeInput& in, ::mmx::hash_512_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::hash_512_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::hash_512_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::hash_512_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::hash_512_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::hash_512_t& value, bool special = false); }; /// \private template<> struct type<::mmx::hash_t> { void read(TypeInput& in, ::mmx::hash_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::hash_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::hash_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::hash_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::hash_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::hash_t& value, bool special = false); }; /// \private template<> struct type<::mmx::node_info_t> { void read(TypeInput& in, ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::node_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::node_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::node_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::node_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::node_type_e> { void read(TypeInput& in, ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::node_type_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::node_type_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::node_type_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::node_type_e& value, bool special = false); }; /// \private template<> struct type<::mmx::offer_data_t> { void read(TypeInput& in, ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::offer_data_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::offer_data_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::offer_data_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::offer_data_t& value, bool special = false); }; /// \private template<> struct type<::mmx::peer_info_t> { void read(TypeInput& in, ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::peer_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::peer_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::peer_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::peer_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::permission_e> { void read(TypeInput& in, ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::permission_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::permission_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::permission_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::permission_e& value, bool special = false); }; /// \private template<> struct type<::mmx::plot_nft_info_t> { void read(TypeInput& in, ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::plot_nft_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::plot_nft_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::plot_nft_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::plot_nft_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::pooling_error_e> { void read(TypeInput& in, ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::pooling_error_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::pooling_error_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::pooling_error_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::pooling_error_e& value, bool special = false); }; /// \private template<> struct type<::mmx::pooling_info_t> { void read(TypeInput& in, ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::pooling_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::pooling_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::pooling_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::pooling_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::pooling_stats_t> { void read(TypeInput& in, ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::pooling_stats_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::pooling_stats_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::pooling_stats_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::pooling_stats_t& value, bool special = false); }; /// \private template<> struct type<::mmx::pubkey_t> { void read(TypeInput& in, ::mmx::pubkey_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::pubkey_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::pubkey_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::pubkey_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::pubkey_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::pubkey_t& value, bool special = false); }; /// \private template<> struct type<::mmx::query_filter_t> { void read(TypeInput& in, ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::query_filter_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::query_filter_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::query_filter_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::query_filter_t& value, bool special = false); }; /// \private template<> struct type<::mmx::signature_t> { void read(TypeInput& in, ::mmx::signature_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::signature_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::signature_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::signature_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::signature_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::signature_t& value, bool special = false); }; /// \private template<> struct type<::mmx::skey_t> { void read(TypeInput& in, ::mmx::skey_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::skey_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::skey_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::skey_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::skey_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::skey_t& value, bool special = false); }; /// \private template<> struct type<::mmx::spend_options_t> { void read(TypeInput& in, ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::spend_options_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::spend_options_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::spend_options_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::spend_options_t& value, bool special = false); }; /// \private template<> struct type<::mmx::swap_entry_t> { void read(TypeInput& in, ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::swap_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::swap_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::swap_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::swap_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::swap_info_t> { void read(TypeInput& in, ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::swap_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::swap_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::swap_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::swap_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::swap_pool_info_t> { void read(TypeInput& in, ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::swap_pool_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::swap_pool_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::swap_pool_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::swap_pool_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::swap_user_info_t> { void read(TypeInput& in, ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::swap_user_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::swap_user_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::swap_user_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::swap_user_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::table_entry_t> { void read(TypeInput& in, ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::table_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::table_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::table_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::table_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::trade_entry_t> { void read(TypeInput& in, ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::trade_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::trade_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::trade_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::trade_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::trade_log_t> { void read(TypeInput& in, ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::trade_log_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::trade_log_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::trade_log_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::trade_log_t& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_entry_t> { void read(TypeInput& in, ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_index_t> { void read(TypeInput& in, ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_index_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_index_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_index_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_index_t& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_info_t> { void read(TypeInput& in, ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_info_t& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_log_entry_t> { void read(TypeInput& in, ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_log_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_log_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_log_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_log_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_note_e> { void read(TypeInput& in, ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_note_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_note_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_note_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_note_e& value, bool special = false); }; /// \private template<> struct type<::mmx::tx_type_e> { void read(TypeInput& in, ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::tx_type_e& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::tx_type_e& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::tx_type_e& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::tx_type_e& value, bool special = false); }; /// \private template<> struct type<::mmx::txin_t> { void read(TypeInput& in, ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::txin_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::txin_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::txin_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::txin_t& value, bool special = false); }; /// \private template<> struct type<::mmx::txio_entry_t> { void read(TypeInput& in, ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::txio_entry_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::txio_entry_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::txio_entry_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::txio_entry_t& value, bool special = false); }; /// \private template<> struct type<::mmx::txio_t> { void read(TypeInput& in, ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::txio_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::txio_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::txio_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::txio_t& value, bool special = false); }; /// \private template<> struct type<::mmx::txout_t> { void read(TypeInput& in, ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::txout_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::txout_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::txout_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::txout_t& value, bool special = false); }; /// \private template<> struct type<::mmx::uint128> { void read(TypeInput& in, ::mmx::uint128& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::uint128& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::uint128& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::uint128& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::uint128& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::uint128& value, bool special = false); }; /// \private template<> struct type<::mmx::uint_fraction_t> { void read(TypeInput& in, ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::uint_fraction_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::uint_fraction_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::uint_fraction_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::uint_fraction_t& value, bool special = false); }; /// \private template<> struct type<::mmx::ulong_fraction_t> { void read(TypeInput& in, ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::ulong_fraction_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::ulong_fraction_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::ulong_fraction_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::ulong_fraction_t& value, bool special = false); }; /// \private template<> struct type<::mmx::virtual_plot_info_t> { void read(TypeInput& in, ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::virtual_plot_info_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::virtual_plot_info_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::virtual_plot_info_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::virtual_plot_info_t& value, bool special = false); }; } // namespace vnx #endif // INCLUDE_mmx_PACKAGE_HXX_ ================================================ FILE: generated/include/mmx/peer_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_peer_info_t_HXX_ #define INCLUDE_mmx_peer_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT peer_info_t : vnx::struct_t { uint64_t id = 0; std::string address; ::mmx::node_type_e type; int32_t ping_ms = 0; uint32_t height = 0; uint32_t version = 0; int64_t recv_timeout_ms = 0; int64_t connect_time_ms = 0; uint64_t bytes_send = 0; uint64_t bytes_recv = 0; vnx::float64_t pending_cost = 0; vnx::float64_t compression_ratio = 0; vnx::bool_t is_synced = 0; vnx::bool_t is_paused = 0; vnx::bool_t is_blocked = 0; vnx::bool_t is_outbound = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xce0ff32e89625afbull; peer_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const peer_info_t& _value); friend std::istream& operator>>(std::istream& _in, peer_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void peer_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(16); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("type", 2); _visitor.accept(type); _visitor.type_field("ping_ms", 3); _visitor.accept(ping_ms); _visitor.type_field("height", 4); _visitor.accept(height); _visitor.type_field("version", 5); _visitor.accept(version); _visitor.type_field("recv_timeout_ms", 6); _visitor.accept(recv_timeout_ms); _visitor.type_field("connect_time_ms", 7); _visitor.accept(connect_time_ms); _visitor.type_field("bytes_send", 8); _visitor.accept(bytes_send); _visitor.type_field("bytes_recv", 9); _visitor.accept(bytes_recv); _visitor.type_field("pending_cost", 10); _visitor.accept(pending_cost); _visitor.type_field("compression_ratio", 11); _visitor.accept(compression_ratio); _visitor.type_field("is_synced", 12); _visitor.accept(is_synced); _visitor.type_field("is_paused", 13); _visitor.accept(is_paused); _visitor.type_field("is_blocked", 14); _visitor.accept(is_blocked); _visitor.type_field("is_outbound", 15); _visitor.accept(is_outbound); _visitor.template type_end(16); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::peer_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_peer_info_t_HXX_ ================================================ FILE: generated/include/mmx/permission_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_permission_e_HXX_ #define INCLUDE_mmx_permission_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT permission_e { enum enum_t : uint32_t { PUBLIC = 2166575688l, REMOTE = 412167022l, SIGN_BLOCK = 1091809605l, SPENDING = 1957258863l, }; ::mmx::permission_e::enum_t value = ::mmx::permission_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7d75a3f04c313898ull; permission_e() {} permission_e(const enum_t& _value) { value = _value; } permission_e(const ::mmx::permission_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } permission_e& operator=(const enum_t& _value) { value = _value; return *this; } permission_e& operator=(const ::mmx::permission_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const permission_e& _value); friend std::istream& operator>>(std::istream& _in, permission_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void permission_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::permission_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::permission_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::permission_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::permission_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::permission_e& _value); ///< \private template<> std::string to_string(const ::mmx::permission_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::permission_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::permission_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::permission_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_permission_e_HXX_ ================================================ FILE: generated/include/mmx/plot_nft_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_plot_nft_info_t_HXX_ #define INCLUDE_mmx_plot_nft_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT plot_nft_info_t : vnx::struct_t { std::string name; ::mmx::addr_t owner; ::mmx::addr_t address; vnx::bool_t is_locked = 0; vnx::optional<::mmx::addr_t> target; vnx::optional unlock_height; vnx::optional server_url; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xf8e0b44f3c0a54aeull; plot_nft_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const plot_nft_info_t& _value); friend std::istream& operator>>(std::istream& _in, plot_nft_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void plot_nft_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("name", 0); _visitor.accept(name); _visitor.type_field("owner", 1); _visitor.accept(owner); _visitor.type_field("address", 2); _visitor.accept(address); _visitor.type_field("is_locked", 3); _visitor.accept(is_locked); _visitor.type_field("target", 4); _visitor.accept(target); _visitor.type_field("unlock_height", 5); _visitor.accept(unlock_height); _visitor.type_field("server_url", 6); _visitor.accept(server_url); _visitor.template type_end(7); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::plot_nft_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_plot_nft_info_t_HXX_ ================================================ FILE: generated/include/mmx/pooling_error_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_pooling_error_e_HXX_ #define INCLUDE_mmx_pooling_error_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT pooling_error_e { enum enum_t : uint32_t { CHALLENGE_NOT_CONFIRMED = 1645788267l, CHALLENGE_NOT_FOUND = 471927302l, CHALLENGE_REVERTED = 1760085717l, DUPLICATE_PARTIAL = 271202490l, INVALID_ACCOUNT = 3369359198l, INVALID_AUTH_KEY = 1953340654l, INVALID_CONTRACT = 914919857l, INVALID_DIFFICULTY = 1883406896l, INVALID_PARTIAL = 405897781l, INVALID_PROOF = 3117556933l, INVALID_SIGNATURE = 3529800621l, INVALID_TIMESTAMP = 2157722321l, NONE = 0l, PARTIAL_NOT_GOOD_ENOUGH = 1161496011l, PARTIAL_TOO_LATE = 2832488076l, POOL_LOST_SYNC = 1324712875l, SERVER_ERROR = 2095599592l, }; ::mmx::pooling_error_e::enum_t value = ::mmx::pooling_error_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xec786b877a93f17ull; pooling_error_e() {} pooling_error_e(const enum_t& _value) { value = _value; } pooling_error_e(const ::mmx::pooling_error_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } pooling_error_e& operator=(const enum_t& _value) { value = _value; return *this; } pooling_error_e& operator=(const ::mmx::pooling_error_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const pooling_error_e& _value); friend std::istream& operator>>(std::istream& _in, pooling_error_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void pooling_error_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::pooling_error_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::pooling_error_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::pooling_error_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::pooling_error_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::pooling_error_e& _value); ///< \private template<> std::string to_string(const ::mmx::pooling_error_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::pooling_error_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::pooling_error_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::pooling_error_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_pooling_error_e_HXX_ ================================================ FILE: generated/include/mmx/pooling_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_pooling_info_t_HXX_ #define INCLUDE_mmx_pooling_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT pooling_info_t : vnx::struct_t { ::mmx::addr_t contract; vnx::optional name; vnx::optional server_url; vnx::optional<::mmx::addr_t> pool_target; uint64_t partial_diff = 0; uint32_t plot_count = 0; vnx::bool_t is_plot_nft = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xbddcc977498f516full; pooling_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const pooling_info_t& _value); friend std::istream& operator>>(std::istream& _in, pooling_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void pooling_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("contract", 0); _visitor.accept(contract); _visitor.type_field("name", 1); _visitor.accept(name); _visitor.type_field("server_url", 2); _visitor.accept(server_url); _visitor.type_field("pool_target", 3); _visitor.accept(pool_target); _visitor.type_field("partial_diff", 4); _visitor.accept(partial_diff); _visitor.type_field("plot_count", 5); _visitor.accept(plot_count); _visitor.type_field("is_plot_nft", 6); _visitor.accept(is_plot_nft); _visitor.template type_end(7); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::pooling_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_pooling_info_t_HXX_ ================================================ FILE: generated/include/mmx/pooling_stats_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_pooling_stats_t_HXX_ #define INCLUDE_mmx_pooling_stats_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT pooling_stats_t : vnx::struct_t { std::string server_url; uint64_t partial_diff = 0; uint64_t valid_points = 0; uint64_t failed_points = 0; uint32_t total_partials = 0; int64_t total_response_time = 0; int64_t last_partial = 0; std::map<::mmx::pooling_error_e, uint32_t> error_count; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xb2441a254359df11ull; pooling_stats_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const pooling_stats_t& _value); friend std::istream& operator>>(std::istream& _in, pooling_stats_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void pooling_stats_t::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("server_url", 0); _visitor.accept(server_url); _visitor.type_field("partial_diff", 1); _visitor.accept(partial_diff); _visitor.type_field("valid_points", 2); _visitor.accept(valid_points); _visitor.type_field("failed_points", 3); _visitor.accept(failed_points); _visitor.type_field("total_partials", 4); _visitor.accept(total_partials); _visitor.type_field("total_response_time", 5); _visitor.accept(total_response_time); _visitor.type_field("last_partial", 6); _visitor.accept(last_partial); _visitor.type_field("error_count", 7); _visitor.accept(error_count); _visitor.template type_end(8); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::pooling_stats_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_pooling_stats_t_HXX_ ================================================ FILE: generated/include/mmx/query_filter_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_query_filter_t_HXX_ #define INCLUDE_mmx_query_filter_t_HXX_ #include #include #include #include namespace mmx { struct MMX_EXPORT query_filter_t : vnx::struct_t { uint32_t since = 0; uint32_t until = -1; int32_t limit = -1; uint32_t max_search = 0; std::set<::mmx::addr_t> currency; vnx::optional<::mmx::tx_type_e> type; vnx::optional memo; vnx::bool_t white_list = 0; vnx::bool_t with_pending = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x92b02006aeea9a76ull; query_filter_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const query_filter_t& _value); friend std::istream& operator>>(std::istream& _in, query_filter_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void query_filter_t::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("since", 0); _visitor.accept(since); _visitor.type_field("until", 1); _visitor.accept(until); _visitor.type_field("limit", 2); _visitor.accept(limit); _visitor.type_field("max_search", 3); _visitor.accept(max_search); _visitor.type_field("currency", 4); _visitor.accept(currency); _visitor.type_field("type", 5); _visitor.accept(type); _visitor.type_field("memo", 6); _visitor.accept(memo); _visitor.type_field("white_list", 7); _visitor.accept(white_list); _visitor.type_field("with_pending", 8); _visitor.accept(with_pending); _visitor.template type_end(9); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::query_filter_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_query_filter_t_HXX_ ================================================ FILE: generated/include/mmx/spend_options_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_spend_options_t_HXX_ #define INCLUDE_mmx_spend_options_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT spend_options_t : vnx::struct_t { vnx::bool_t auto_send = true; vnx::bool_t mark_spent = false; uint32_t fee_ratio = 1024; uint32_t gas_limit = 5000000; vnx::optional expire_at; vnx::optional expire_delta; vnx::optional nonce; vnx::optional<::mmx::addr_t> user; vnx::optional<::mmx::addr_t> sender; vnx::optional passphrase; vnx::optional<::mmx::tx_note_e> note; vnx::optional memo; std::map<::mmx::addr_t, ::mmx::addr_t> owner_map; std::map<::mmx::addr_t, std::shared_ptr> contract_map; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x37f7c6d377362e95ull; spend_options_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const spend_options_t& _value); friend std::istream& operator>>(std::istream& _in, spend_options_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void spend_options_t::accept_generic(T& _visitor) const { _visitor.template type_begin(14); _visitor.type_field("auto_send", 0); _visitor.accept(auto_send); _visitor.type_field("mark_spent", 1); _visitor.accept(mark_spent); _visitor.type_field("fee_ratio", 2); _visitor.accept(fee_ratio); _visitor.type_field("gas_limit", 3); _visitor.accept(gas_limit); _visitor.type_field("expire_at", 4); _visitor.accept(expire_at); _visitor.type_field("expire_delta", 5); _visitor.accept(expire_delta); _visitor.type_field("nonce", 6); _visitor.accept(nonce); _visitor.type_field("user", 7); _visitor.accept(user); _visitor.type_field("sender", 8); _visitor.accept(sender); _visitor.type_field("passphrase", 9); _visitor.accept(passphrase); _visitor.type_field("note", 10); _visitor.accept(note); _visitor.type_field("memo", 11); _visitor.accept(memo); _visitor.type_field("owner_map", 12); _visitor.accept(owner_map); _visitor.type_field("contract_map", 13); _visitor.accept(contract_map); _visitor.template type_end(14); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::spend_options_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_spend_options_t_HXX_ ================================================ FILE: generated/include/mmx/swap_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_swap_entry_t_HXX_ #define INCLUDE_mmx_swap_entry_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT swap_entry_t : vnx::struct_t { uint32_t height = 0; int64_t time_stamp = 0; ::mmx::hash_t txid; std::string type; uint8_t index = 0; ::mmx::uint128 amount; vnx::optional value; vnx::optional symbol; vnx::optional<::mmx::addr_t> user; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe3110712aa0f6064ull; swap_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const swap_entry_t& _value); friend std::istream& operator>>(std::istream& _in, swap_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void swap_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("time_stamp", 1); _visitor.accept(time_stamp); _visitor.type_field("txid", 2); _visitor.accept(txid); _visitor.type_field("type", 3); _visitor.accept(type); _visitor.type_field("index", 4); _visitor.accept(index); _visitor.type_field("amount", 5); _visitor.accept(amount); _visitor.type_field("value", 6); _visitor.accept(value); _visitor.type_field("symbol", 7); _visitor.accept(symbol); _visitor.type_field("user", 8); _visitor.accept(user); _visitor.template type_end(9); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::swap_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_swap_entry_t_HXX_ ================================================ FILE: generated/include/mmx/swap_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_swap_info_t_HXX_ #define INCLUDE_mmx_swap_info_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT swap_info_t : vnx::struct_t { std::string name; ::mmx::addr_t address; std::array<::mmx::addr_t, 2> tokens = {}; std::array<::mmx::uint128, 2> wallet = {}; std::array<::mmx::uint128, 2> balance = {}; std::array<::mmx::uint128, 2> volume = {}; std::array<::mmx::uint128, 2> fees_paid = {}; std::array<::mmx::uint128, 2> fees_claimed = {}; std::array<::mmx::uint128, 2> user_total = {}; std::array<::mmx::uint128, 2> volume_1d = {}; std::array<::mmx::uint128, 2> volume_7d = {}; std::array avg_apy_1d = {}; std::array avg_apy_7d = {}; std::vector fee_rates; std::vector<::mmx::swap_pool_info_t> pools; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x7586be908f15ae8ull; swap_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const swap_info_t& _value); friend std::istream& operator>>(std::istream& _in, swap_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void swap_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(15); _visitor.type_field("name", 0); _visitor.accept(name); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("tokens", 2); _visitor.accept(tokens); _visitor.type_field("wallet", 3); _visitor.accept(wallet); _visitor.type_field("balance", 4); _visitor.accept(balance); _visitor.type_field("volume", 5); _visitor.accept(volume); _visitor.type_field("fees_paid", 6); _visitor.accept(fees_paid); _visitor.type_field("fees_claimed", 7); _visitor.accept(fees_claimed); _visitor.type_field("user_total", 8); _visitor.accept(user_total); _visitor.type_field("volume_1d", 9); _visitor.accept(volume_1d); _visitor.type_field("volume_7d", 10); _visitor.accept(volume_7d); _visitor.type_field("avg_apy_1d", 11); _visitor.accept(avg_apy_1d); _visitor.type_field("avg_apy_7d", 12); _visitor.accept(avg_apy_7d); _visitor.type_field("fee_rates", 13); _visitor.accept(fee_rates); _visitor.type_field("pools", 14); _visitor.accept(pools); _visitor.template type_end(15); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::swap_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_swap_info_t_HXX_ ================================================ FILE: generated/include/mmx/swap_pool_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_swap_pool_info_t_HXX_ #define INCLUDE_mmx_swap_pool_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT swap_pool_info_t : vnx::struct_t { std::array<::mmx::uint128, 2> balance = {}; std::array<::mmx::uint128, 2> fees_paid = {}; std::array<::mmx::uint128, 2> fees_claimed = {}; std::array<::mmx::uint128, 2> user_total = {}; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x6502e235a743dabull; swap_pool_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const swap_pool_info_t& _value); friend std::istream& operator>>(std::istream& _in, swap_pool_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void swap_pool_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("balance", 0); _visitor.accept(balance); _visitor.type_field("fees_paid", 1); _visitor.accept(fees_paid); _visitor.type_field("fees_claimed", 2); _visitor.accept(fees_claimed); _visitor.type_field("user_total", 3); _visitor.accept(user_total); _visitor.template type_end(4); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::swap_pool_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_swap_pool_info_t_HXX_ ================================================ FILE: generated/include/mmx/swap_user_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_swap_user_info_t_HXX_ #define INCLUDE_mmx_swap_user_info_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT swap_user_info_t : vnx::struct_t { int32_t pool_idx = -1; std::array<::mmx::uint128, 2> balance = {}; std::array<::mmx::uint128, 2> last_user_total = {}; std::array<::mmx::uint128, 2> last_fees_paid = {}; std::array<::mmx::uint128, 2> fees_earned = {}; std::array<::mmx::uint128, 2> equivalent_liquidity = {}; uint32_t unlock_height = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x1b6c720bff2d638cull; swap_user_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const swap_user_info_t& _value); friend std::istream& operator>>(std::istream& _in, swap_user_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void swap_user_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(7); _visitor.type_field("pool_idx", 0); _visitor.accept(pool_idx); _visitor.type_field("balance", 1); _visitor.accept(balance); _visitor.type_field("last_user_total", 2); _visitor.accept(last_user_total); _visitor.type_field("last_fees_paid", 3); _visitor.accept(last_fees_paid); _visitor.type_field("fees_earned", 4); _visitor.accept(fees_earned); _visitor.type_field("equivalent_liquidity", 5); _visitor.accept(equivalent_liquidity); _visitor.type_field("unlock_height", 6); _visitor.accept(unlock_height); _visitor.template type_end(7); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::swap_user_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_swap_user_info_t_HXX_ ================================================ FILE: generated/include/mmx/table_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_table_entry_t_HXX_ #define INCLUDE_mmx_table_entry_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT table_entry_t : vnx::struct_t { uint32_t y = 0; std::array meta = {}; std::vector x_values; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x9bdbee40872de9a7ull; table_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const table_entry_t& _value); friend std::istream& operator>>(std::istream& _in, table_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void table_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("y", 0); _visitor.accept(y); _visitor.type_field("meta", 1); _visitor.accept(meta); _visitor.type_field("x_values", 2); _visitor.accept(x_values); _visitor.template type_end(3); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::table_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_table_entry_t_HXX_ ================================================ FILE: generated/include/mmx/trade_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_trade_entry_t_HXX_ #define INCLUDE_mmx_trade_entry_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT trade_entry_t : vnx::struct_t { uint32_t height = 0; int64_t time_stamp = 0; ::mmx::addr_t address; ::mmx::hash_t txid; ::mmx::addr_t bid_currency; ::mmx::addr_t ask_currency; ::mmx::uint128 bid_amount; ::mmx::uint128 ask_amount; vnx::float64_t price = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xed7d8e67cb8db394ull; trade_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const trade_entry_t& _value); friend std::istream& operator>>(std::istream& _in, trade_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void trade_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(9); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("time_stamp", 1); _visitor.accept(time_stamp); _visitor.type_field("address", 2); _visitor.accept(address); _visitor.type_field("txid", 3); _visitor.accept(txid); _visitor.type_field("bid_currency", 4); _visitor.accept(bid_currency); _visitor.type_field("ask_currency", 5); _visitor.accept(ask_currency); _visitor.type_field("bid_amount", 6); _visitor.accept(bid_amount); _visitor.type_field("ask_amount", 7); _visitor.accept(ask_amount); _visitor.type_field("price", 8); _visitor.accept(price); _visitor.template type_end(9); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::trade_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_trade_entry_t_HXX_ ================================================ FILE: generated/include/mmx/trade_log_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_trade_log_t_HXX_ #define INCLUDE_mmx_trade_log_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT trade_log_t : vnx::struct_t { int64_t time_stamp = 0; ::mmx::hash_t txid; ::mmx::addr_t address; ::mmx::uint128 inv_price; ::mmx::uint128 ask_amount; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xafedf6853c645eb8ull; trade_log_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; ::mmx::uint128 get_bid_amount() const; vnx::float64_t get_price() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const trade_log_t& _value); friend std::istream& operator>>(std::istream& _in, trade_log_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void trade_log_t::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("time_stamp", 0); _visitor.accept(time_stamp); _visitor.type_field("txid", 1); _visitor.accept(txid); _visitor.type_field("address", 2); _visitor.accept(address); _visitor.type_field("inv_price", 3); _visitor.accept(inv_price); _visitor.type_field("ask_amount", 4); _visitor.accept(ask_amount); _visitor.template type_end(5); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::trade_log_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_trade_log_t_HXX_ ================================================ FILE: generated/include/mmx/tx_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_entry_t_HXX_ #define INCLUDE_mmx_tx_entry_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT tx_entry_t : ::mmx::txio_entry_t { vnx::bool_t is_validated = 0; vnx::bool_t is_pending = 0; typedef ::mmx::txio_entry_t Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x438cda5719015870ull; tx_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static ::mmx::tx_entry_t create_ex(const ::mmx::txio_entry_t& entry = ::mmx::txio_entry_t(), const vnx::bool_t& validated = 0); static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const tx_entry_t& _value); friend std::istream& operator>>(std::istream& _in, tx_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void tx_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(10); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("memo", 3); _visitor.accept(memo); _visitor.type_field("txid", 4); _visitor.accept(txid); _visitor.type_field("height", 5); _visitor.accept(height); _visitor.type_field("time_stamp", 6); _visitor.accept(time_stamp); _visitor.type_field("type", 7); _visitor.accept(type); _visitor.type_field("is_validated", 8); _visitor.accept(is_validated); _visitor.type_field("is_pending", 9); _visitor.accept(is_pending); _visitor.template type_end(10); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::tx_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_tx_entry_t_HXX_ ================================================ FILE: generated/include/mmx/tx_index_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_index_t_HXX_ #define INCLUDE_mmx_tx_index_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT tx_index_t : vnx::struct_t { uint32_t height = 0; uint32_t static_cost = 0; uint32_t contract_read_cost = 0; int64_t time_stamp = 0; int64_t file_offset = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc326e232ee2ebb41ull; tx_index_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const tx_index_t& _value); friend std::istream& operator>>(std::istream& _in, tx_index_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void tx_index_t::accept_generic(T& _visitor) const { _visitor.template type_begin(5); _visitor.type_field("height", 0); _visitor.accept(height); _visitor.type_field("static_cost", 1); _visitor.accept(static_cost); _visitor.type_field("contract_read_cost", 2); _visitor.accept(contract_read_cost); _visitor.type_field("time_stamp", 3); _visitor.accept(time_stamp); _visitor.type_field("file_offset", 4); _visitor.accept(file_offset); _visitor.template type_end(5); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::tx_index_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_tx_index_t_HXX_ ================================================ FILE: generated/include/mmx/tx_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_info_t_HXX_ #define INCLUDE_mmx_tx_info_t_HXX_ #include #include #include #include #include #include #include #include #include #include namespace mmx { class MMX_EXPORT tx_info_t : public ::vnx::Value { public: ::mmx::hash_t id; uint32_t expires = 0; vnx::bool_t did_fail = 0; vnx::optional height; vnx::optional time_stamp; vnx::optional<::mmx::hash_t> block; vnx::optional message; uint32_t fee = 0; uint32_t cost = 0; ::mmx::tx_note_e note; vnx::optional<::mmx::addr_t> sender; std::vector<::mmx::txin_t> inputs; std::vector<::mmx::txout_t> outputs; std::vector> operations; std::shared_ptr deployed; std::map<::mmx::addr_t, ::mmx::uint128> input_amounts; std::map<::mmx::addr_t, ::mmx::uint128> output_amounts; std::map<::mmx::addr_t, std::shared_ptr> contracts; typedef ::vnx::Value Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x44e4a710953f4785ull; tx_info_t() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const tx_info_t& _value); friend std::istream& operator>>(std::istream& _in, tx_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void tx_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(18); _visitor.type_field("id", 0); _visitor.accept(id); _visitor.type_field("expires", 1); _visitor.accept(expires); _visitor.type_field("did_fail", 2); _visitor.accept(did_fail); _visitor.type_field("height", 3); _visitor.accept(height); _visitor.type_field("time_stamp", 4); _visitor.accept(time_stamp); _visitor.type_field("block", 5); _visitor.accept(block); _visitor.type_field("message", 6); _visitor.accept(message); _visitor.type_field("fee", 7); _visitor.accept(fee); _visitor.type_field("cost", 8); _visitor.accept(cost); _visitor.type_field("note", 9); _visitor.accept(note); _visitor.type_field("sender", 10); _visitor.accept(sender); _visitor.type_field("inputs", 11); _visitor.accept(inputs); _visitor.type_field("outputs", 12); _visitor.accept(outputs); _visitor.type_field("operations", 13); _visitor.accept(operations); _visitor.type_field("deployed", 14); _visitor.accept(deployed); _visitor.type_field("input_amounts", 15); _visitor.accept(input_amounts); _visitor.type_field("output_amounts", 16); _visitor.accept(output_amounts); _visitor.type_field("contracts", 17); _visitor.accept(contracts); _visitor.template type_end(18); } } // namespace mmx namespace vnx { } // vnx #endif // INCLUDE_mmx_tx_info_t_HXX_ ================================================ FILE: generated/include/mmx/tx_log_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_log_entry_t_HXX_ #define INCLUDE_mmx_tx_log_entry_t_HXX_ #include #include #include namespace mmx { struct MMX_EXPORT tx_log_entry_t : vnx::struct_t { int64_t time = 0; std::shared_ptr tx; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc29d95c24aff8b43ull; tx_log_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const tx_log_entry_t& _value); friend std::istream& operator>>(std::istream& _in, tx_log_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void tx_log_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("time", 0); _visitor.accept(time); _visitor.type_field("tx", 1); _visitor.accept(tx); _visitor.template type_end(2); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::tx_log_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_tx_log_entry_t_HXX_ ================================================ FILE: generated/include/mmx/tx_note_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_note_e_HXX_ #define INCLUDE_mmx_tx_note_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT tx_note_e { enum enum_t : uint32_t { BURN = 1273454750l, CLAIM = 3251493825l, DEPLOY = 251696509l, DEPOSIT = 4272391094l, EXECUTE = 356250251l, MINT = 2140500429l, MUTATE = 2579166487l, OFFER = 1549148948l, REVOKE = 3821531424l, REWARD = 3842121424l, TIMELORD_REWARD = 1783340485l, TRADE = 329618288l, TRANSFER = 858544509l, WITHDRAW = 4266232802l, }; ::mmx::tx_note_e::enum_t value = ::mmx::tx_note_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x347c1deca0a9c9cull; tx_note_e() {} tx_note_e(const enum_t& _value) { value = _value; } tx_note_e(const ::mmx::tx_note_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } tx_note_e& operator=(const enum_t& _value) { value = _value; return *this; } tx_note_e& operator=(const ::mmx::tx_note_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const tx_note_e& _value); friend std::istream& operator>>(std::istream& _in, tx_note_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void tx_note_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_note_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_note_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::tx_note_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::tx_note_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::tx_note_e& _value); ///< \private template<> std::string to_string(const ::mmx::tx_note_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::tx_note_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::tx_note_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::tx_note_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_tx_note_e_HXX_ ================================================ FILE: generated/include/mmx/tx_type_e.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_tx_type_e_HXX_ #define INCLUDE_mmx_tx_type_e_HXX_ #include #include namespace mmx { struct MMX_EXPORT tx_type_e { enum enum_t : uint32_t { PROJECT_REWARD = 795347438l, RECEIVE = 940023181l, REWARD = 3842121424l, SPEND = 2341768809l, TXFEE = 3965595220l, VDF_REWARD = 1923446990l, }; ::mmx::tx_type_e::enum_t value = ::mmx::tx_type_e::enum_t(0); static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x3b7f577c2cfd4c91ull; tx_type_e() {} tx_type_e(const enum_t& _value) { value = _value; } tx_type_e(const ::mmx::tx_type_e& _other) { value = _other.value; } vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; operator enum_t() const { return value; } tx_type_e& operator=(const enum_t& _value) { value = _value; return *this; } tx_type_e& operator=(const ::mmx::tx_type_e& _other) { value = _other.value; return *this; } static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::bool_t is_valid() const; std::string to_string() const; std::string to_string_value() const; std::string to_string_value_full() const; void from_string(const std::string& str); void from_string_value(const std::string& name); vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const tx_type_e& _value); friend std::istream& operator>>(std::istream& _in, tx_type_e& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void tx_type_e::accept_generic(T& _visitor) const { _visitor.template type_begin(1); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.template type_end(1); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::tx_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private template<> std::string to_string(const ::mmx::tx_type_e& _value); ///< \private template<> std::string to_string_value(const ::mmx::tx_type_e& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::tx_type_e& _value); ///< \private template<> std::string to_string(const ::mmx::tx_type_e::enum_t& _value); ///< \private template<> std::string to_string_value(const ::mmx::tx_type_e::enum_t& _value); ///< \private template<> std::string to_string_value_full(const ::mmx::tx_type_e::enum_t& _value); ///< \private template<> struct is_equivalent<::mmx::tx_type_e> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_tx_type_e_HXX_ ================================================ FILE: generated/include/mmx/txin_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_txin_t_HXX_ #define INCLUDE_mmx_txin_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT txin_t : ::mmx::txio_t { static const uint8_t IS_EXEC = 1; static const uint16_t NO_SOLUTION = -1; uint16_t solution = -1; uint8_t flags = 0; typedef ::mmx::txio_t Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xda6587114a2413full; txin_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const txin_t& _value); friend std::istream& operator>>(std::istream& _in, txin_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void txin_t::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("memo", 3); _visitor.accept(memo); _visitor.type_field("solution", 4); _visitor.accept(solution); _visitor.type_field("flags", 5); _visitor.accept(flags); _visitor.template type_end(6); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::txin_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_txin_t_HXX_ ================================================ FILE: generated/include/mmx/txio_entry_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_txio_entry_t_HXX_ #define INCLUDE_mmx_txio_entry_t_HXX_ #include #include #include #include namespace mmx { struct MMX_EXPORT txio_entry_t : ::mmx::txio_t { ::mmx::hash_t txid; uint32_t height = 0; int64_t time_stamp = 0; ::mmx::tx_type_e type; typedef ::mmx::txio_t Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x2d1c65e166ab244bull; txio_entry_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static ::mmx::txio_entry_t create_ex(const ::mmx::hash_t& txid = ::mmx::hash_t(), const uint32_t& height = 0, const int64_t& time_stamp = 0, const ::mmx::tx_type_e& type = ::mmx::tx_type_e(), const ::mmx::txio_t& txio = ::mmx::txio_t()); static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const txio_entry_t& _value); friend std::istream& operator>>(std::istream& _in, txio_entry_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void txio_entry_t::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("memo", 3); _visitor.accept(memo); _visitor.type_field("txid", 4); _visitor.accept(txid); _visitor.type_field("height", 5); _visitor.accept(height); _visitor.type_field("time_stamp", 6); _visitor.accept(time_stamp); _visitor.type_field("type", 7); _visitor.accept(type); _visitor.template type_end(8); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::txio_entry_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_txio_entry_t_HXX_ ================================================ FILE: generated/include/mmx/txio_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_txio_t_HXX_ #define INCLUDE_mmx_txio_t_HXX_ #include #include #include #include #include namespace mmx { struct MMX_EXPORT txio_t : vnx::struct_t { static const uint32_t MAX_MEMO_SIZE = 64; ::mmx::addr_t address; ::mmx::addr_t contract; ::mmx::uint128 amount; vnx::optional memo; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x32adb93b85c82cf4ull; txio_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; uint64_t calc_cost(std::shared_ptr params = nullptr) const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const txio_t& _value); friend std::istream& operator>>(std::istream& _in, txio_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void txio_t::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("memo", 3); _visitor.accept(memo); _visitor.template type_end(4); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::txio_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_txio_t_HXX_ ================================================ FILE: generated/include/mmx/txout_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_txout_t_HXX_ #define INCLUDE_mmx_txout_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT txout_t : ::mmx::txio_t { typedef ::mmx::txio_t Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xaa91772752216576ull; txout_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const txout_t& _value); friend std::istream& operator>>(std::istream& _in, txout_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void txout_t::accept_generic(T& _visitor) const { _visitor.template type_begin(4); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("contract", 1); _visitor.accept(contract); _visitor.type_field("amount", 2); _visitor.accept(amount); _visitor.type_field("memo", 3); _visitor.accept(memo); _visitor.template type_end(4); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::txout_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_txout_t_HXX_ ================================================ FILE: generated/include/mmx/uint_fraction_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_uint_fraction_t_HXX_ #define INCLUDE_mmx_uint_fraction_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT uint_fraction_t : vnx::struct_t { uint32_t value = 0; uint32_t inverse = 1; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe5632136b5a3ed5aull; uint_fraction_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const uint_fraction_t& _value); friend std::istream& operator>>(std::istream& _in, uint_fraction_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void uint_fraction_t::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.type_field("inverse", 1); _visitor.accept(inverse); _visitor.template type_end(2); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::uint_fraction_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_uint_fraction_t_HXX_ ================================================ FILE: generated/include/mmx/ulong_fraction_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_ulong_fraction_t_HXX_ #define INCLUDE_mmx_ulong_fraction_t_HXX_ #include #include namespace mmx { struct MMX_EXPORT ulong_fraction_t : vnx::struct_t { uint64_t value = 0; uint64_t inverse = 1; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe9c2388a9c35ce06ull; ulong_fraction_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const ulong_fraction_t& _value); friend std::istream& operator>>(std::istream& _in, ulong_fraction_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void ulong_fraction_t::accept_generic(T& _visitor) const { _visitor.template type_begin(2); _visitor.type_field("value", 0); _visitor.accept(value); _visitor.type_field("inverse", 1); _visitor.accept(inverse); _visitor.template type_end(2); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::ulong_fraction_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_ulong_fraction_t_HXX_ ================================================ FILE: generated/include/mmx/virtual_plot_info_t.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_virtual_plot_info_t_HXX_ #define INCLUDE_mmx_virtual_plot_info_t_HXX_ #include #include #include #include namespace mmx { struct MMX_EXPORT virtual_plot_info_t : vnx::struct_t { ::mmx::addr_t address; ::mmx::addr_t owner; ::mmx::pubkey_t farmer_key; vnx::optional<::mmx::addr_t> reward_address; uint64_t balance = 0; uint64_t size_bytes = 0; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xcbcd7c49be95180eull; virtual_plot_info_t() {} vnx::Hash64 get_type_hash() const; std::string get_type_name() const; const vnx::TypeCode* get_type_code() const; static std::shared_ptr create(); std::shared_ptr clone() const; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code); void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const; void read(std::istream& _in); void write(std::ostream& _out) const; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const; vnx::Object to_object() const; void from_object(const vnx::Object& object); vnx::Variant get_field(const std::string& name) const; void set_field(const std::string& name, const vnx::Variant& value); friend std::ostream& operator<<(std::ostream& _out, const virtual_plot_info_t& _value); friend std::istream& operator>>(std::istream& _in, virtual_plot_info_t& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); }; template void virtual_plot_info_t::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("address", 0); _visitor.accept(address); _visitor.type_field("owner", 1); _visitor.accept(owner); _visitor.type_field("farmer_key", 2); _visitor.accept(farmer_key); _visitor.type_field("reward_address", 3); _visitor.accept(reward_address); _visitor.type_field("balance", 4); _visitor.accept(balance); _visitor.type_field("size_bytes", 5); _visitor.accept(size_bytes); _visitor.template type_end(6); } } // namespace mmx namespace vnx { template<> struct is_equivalent<::mmx::virtual_plot_info_t> { bool operator()(const uint16_t* code, const TypeCode* type_code); }; } // vnx #endif // INCLUDE_mmx_virtual_plot_info_t_HXX_ ================================================ FILE: generated/operation/include/mmx/operation/Deposit.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_operation_Deposit_HXX_ #define INCLUDE_mmx_operation_Deposit_HXX_ #include #include #include #include #include namespace mmx { namespace operation { class MMX_OPERATION_EXPORT Deposit : public ::mmx::operation::Execute { public: ::mmx::addr_t currency; ::mmx::uint128 amount; typedef ::mmx::operation::Execute Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xc23408cb7b04b0ecull; Deposit() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Deposit& _value); friend std::istream& operator>>(std::istream& _in, Deposit& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Deposit::accept_generic(T& _visitor) const { _visitor.template type_begin(8); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("solution", 2); _visitor.accept(solution); _visitor.type_field("method", 3); _visitor.accept(method); _visitor.type_field("args", 4); _visitor.accept(args); _visitor.type_field("user", 5); _visitor.accept(user); _visitor.type_field("currency", 6); _visitor.accept(currency); _visitor.type_field("amount", 7); _visitor.accept(amount); _visitor.template type_end(8); } } // namespace mmx } // namespace operation namespace vnx { } // vnx #endif // INCLUDE_mmx_operation_Deposit_HXX_ ================================================ FILE: generated/operation/include/mmx/operation/Execute.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_operation_Execute_HXX_ #define INCLUDE_mmx_operation_Execute_HXX_ #include #include #include #include #include #include namespace mmx { namespace operation { class MMX_OPERATION_EXPORT Execute : public ::mmx::Operation { public: std::string method; std::vector<::vnx::Variant> args; vnx::optional<::mmx::addr_t> user; typedef ::mmx::Operation Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x8cd9012d9098c1d1ull; Execute() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash(const vnx::bool_t& full_hash = 0) const override; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const override; virtual ::vnx::Variant get_arg(const uint32_t& index = 0) const; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const Execute& _value); friend std::istream& operator>>(std::istream& _in, Execute& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void Execute::accept_generic(T& _visitor) const { _visitor.template type_begin(6); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("address", 1); _visitor.accept(address); _visitor.type_field("solution", 2); _visitor.accept(solution); _visitor.type_field("method", 3); _visitor.accept(method); _visitor.type_field("args", 4); _visitor.accept(args); _visitor.type_field("user", 5); _visitor.accept(user); _visitor.template type_end(6); } } // namespace mmx } // namespace operation namespace vnx { } // vnx #endif // INCLUDE_mmx_operation_Execute_HXX_ ================================================ FILE: generated/operation/include/mmx/operation/accept_generic.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_operation_ACCEPT_GENERIC_HXX_ #define INCLUDE_mmx_operation_ACCEPT_GENERIC_HXX_ #include #include namespace vnx { template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { if(auto tmp = std::dynamic_pointer_cast(value)) { vnx::accept_generic(visitor, tmp); } else { value->accept_generic(visitor); } } else { visitor.accept(nullptr); } } } // namespace vnx #endif // INCLUDE_mmx_operation_ACCEPT_GENERIC_HXX_ ================================================ FILE: generated/operation/include/mmx/operation/package.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_operation_PACKAGE_HXX_ #define INCLUDE_mmx_operation_PACKAGE_HXX_ #include #include #include #ifdef MMX_OPERATION_EXPORT_ENABLE #include #else #ifndef MMX_OPERATION_EXPORT #define MMX_OPERATION_EXPORT #endif #endif namespace mmx { namespace operation { void register_all_types(); class Deposit; class Execute; MMX_OPERATION_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Deposit; ///< \private MMX_OPERATION_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_Execute; ///< \private } // namespace mmx } // namespace operation namespace vnx { void read(TypeInput& in, ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(std::istream& in, ::mmx::operation::Deposit& value); ///< \private void read(std::istream& in, ::mmx::operation::Execute& value); ///< \private void write(std::ostream& out, const ::mmx::operation::Deposit& value); ///< \private void write(std::ostream& out, const ::mmx::operation::Execute& value); ///< \private void accept(Visitor& visitor, const ::mmx::operation::Deposit& value); ///< \private void accept(Visitor& visitor, const ::mmx::operation::Execute& value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private /// \private template<> struct type<::mmx::operation::Deposit> { void read(TypeInput& in, ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::operation::Deposit& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::operation::Deposit& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::operation::Deposit& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::operation::Deposit& value, bool special = false); }; /// \private template<> struct type<::mmx::operation::Execute> { void read(TypeInput& in, ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::operation::Execute& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::operation::Execute& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::operation::Execute& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::operation::Execute& value, bool special = false); }; } // namespace vnx #endif // INCLUDE_mmx_operation_PACKAGE_HXX_ ================================================ FILE: generated/operation/src/Deposit.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { namespace operation { const vnx::Hash64 Deposit::VNX_TYPE_HASH(0xc23408cb7b04b0ecull); const vnx::Hash64 Deposit::VNX_CODE_HASH(0xc1722b8fe9ad5dc0ull); vnx::Hash64 Deposit::get_type_hash() const { return VNX_TYPE_HASH; } std::string Deposit::get_type_name() const { return "mmx.operation.Deposit"; } const vnx::TypeCode* Deposit::get_type_code() const { return mmx::operation::vnx_native_type_code_Deposit; } std::shared_ptr Deposit::create() { return std::make_shared(); } std::shared_ptr Deposit::clone() const { return std::make_shared(*this); } void Deposit::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Deposit::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Deposit::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::operation::vnx_native_type_code_Deposit; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, solution); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, user); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, amount); _visitor.type_end(*_type_code); } void Deposit::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.operation.Deposit\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"solution\": "; vnx::write(_out, solution); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"user\": "; vnx::write(_out, user); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"amount\": "; vnx::write(_out, amount); _out << "}"; } void Deposit::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Deposit::to_object() const { vnx::Object _object; _object["__type"] = "mmx.operation.Deposit"; _object["version"] = version; _object["address"] = address; _object["solution"] = solution; _object["method"] = method; _object["args"] = args; _object["user"] = user; _object["currency"] = currency; _object["amount"] = amount; return _object; } void Deposit::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "solution") { _entry.second.to(solution); } else if(_entry.first == "user") { _entry.second.to(user); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Deposit::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "address") { return vnx::Variant(address); } if(_name == "solution") { return vnx::Variant(solution); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "user") { return vnx::Variant(user); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "amount") { return vnx::Variant(amount); } return vnx::Variant(); } void Deposit::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "address") { _value.to(address); } else if(_name == "solution") { _value.to(solution); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "user") { _value.to(user); } else if(_name == "currency") { _value.to(currency); } else if(_name == "amount") { _value.to(amount); } } /// \private std::ostream& operator<<(std::ostream& _out, const Deposit& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Deposit& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Deposit::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Deposit::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.operation.Deposit"; type_code->type_hash = vnx::Hash64(0xc23408cb7b04b0ecull); type_code->code_hash = vnx::Hash64(0xc1722b8fe9ad5dc0ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::operation::Deposit); type_code->parents.resize(2); type_code->parents[0] = ::mmx::operation::Execute::static_get_type_code(); type_code->parents[1] = ::mmx::Operation::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 2; field.name = "solution"; field.value = vnx::to_string(-1); field.code = {2}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } type_code->build(); return type_code; } std::shared_ptr Deposit::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace operation namespace vnx { void read(TypeInput& in, ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.solution, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 3: vnx::read(in, value.method, type_code, _field->code.data()); break; case 4: vnx::read(in, value.args, type_code, _field->code.data()); break; case 5: vnx::read(in, value.user, type_code, _field->code.data()); break; case 6: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 7: vnx::read(in, value.amount, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::operation::Deposit& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::operation::vnx_native_type_code_Deposit; out.write_type_code(type_code); vnx::write_class_header<::mmx::operation::Deposit>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(6); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.solution); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.method, type_code, type_code->fields[3].code.data()); vnx::write(out, value.args, type_code, type_code->fields[4].code.data()); vnx::write(out, value.user, type_code, type_code->fields[5].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[6].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::operation::Deposit& value) { value.read(in); } void write(std::ostream& out, const ::mmx::operation::Deposit& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::operation::Deposit& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/operation/src/Execute.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace operation { const vnx::Hash64 Execute::VNX_TYPE_HASH(0x8cd9012d9098c1d1ull); const vnx::Hash64 Execute::VNX_CODE_HASH(0x493c06d4cf1f1792ull); vnx::Hash64 Execute::get_type_hash() const { return VNX_TYPE_HASH; } std::string Execute::get_type_name() const { return "mmx.operation.Execute"; } const vnx::TypeCode* Execute::get_type_code() const { return mmx::operation::vnx_native_type_code_Execute; } std::shared_ptr Execute::create() { return std::make_shared(); } std::shared_ptr Execute::clone() const { return std::make_shared(*this); } void Execute::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Execute::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Execute::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::operation::vnx_native_type_code_Execute; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, solution); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, user); _visitor.type_end(*_type_code); } void Execute::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.operation.Execute\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"solution\": "; vnx::write(_out, solution); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"user\": "; vnx::write(_out, user); _out << "}"; } void Execute::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Execute::to_object() const { vnx::Object _object; _object["__type"] = "mmx.operation.Execute"; _object["version"] = version; _object["address"] = address; _object["solution"] = solution; _object["method"] = method; _object["args"] = args; _object["user"] = user; return _object; } void Execute::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "solution") { _entry.second.to(solution); } else if(_entry.first == "user") { _entry.second.to(user); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Execute::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "address") { return vnx::Variant(address); } if(_name == "solution") { return vnx::Variant(solution); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "user") { return vnx::Variant(user); } return vnx::Variant(); } void Execute::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "address") { _value.to(address); } else if(_name == "solution") { _value.to(solution); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "user") { _value.to(user); } } /// \private std::ostream& operator<<(std::ostream& _out, const Execute& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Execute& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Execute::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Execute::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.operation.Execute"; type_code->type_hash = vnx::Hash64(0x8cd9012d9098c1d1ull); type_code->code_hash = vnx::Hash64(0x493c06d4cf1f1792ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::operation::Execute); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Operation::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 2; field.name = "solution"; field.value = vnx::to_string(-1); field.code = {2}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr Execute::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace operation namespace vnx { void read(TypeInput& in, ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.solution, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 3: vnx::read(in, value.method, type_code, _field->code.data()); break; case 4: vnx::read(in, value.args, type_code, _field->code.data()); break; case 5: vnx::read(in, value.user, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::operation::Execute& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::operation::vnx_native_type_code_Execute; out.write_type_code(type_code); vnx::write_class_header<::mmx::operation::Execute>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(6); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.solution); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.method, type_code, type_code->fields[3].code.data()); vnx::write(out, value.args, type_code, type_code->fields[4].code.data()); vnx::write(out, value.user, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::operation::Execute& value) { value.read(in); } void write(std::ostream& out, const ::mmx::operation::Execute& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::operation::Execute& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/operation/src/package.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace vnx { const TypeCode* type<::mmx::operation::Deposit>::get_type_code() { return mmx::operation::vnx_native_type_code_Deposit; } void type<::mmx::operation::Deposit>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::operation::Deposit()); } void type<::mmx::operation::Deposit>::create_dynamic_code(std::vector& code, const ::mmx::operation::Deposit& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::operation::Execute>::get_type_code() { return mmx::operation::vnx_native_type_code_Execute; } void type<::mmx::operation::Execute>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::operation::Execute()); } void type<::mmx::operation::Execute>::create_dynamic_code(std::vector& code, const ::mmx::operation::Execute& value, bool special) { code.push_back(CODE_OBJECT); } } // namespace vnx namespace mmx { namespace operation { void register_all_types() { vnx::register_type_code(::mmx::operation::Deposit::static_create_type_code()); vnx::register_type_code(::mmx::operation::Execute::static_create_type_code()); } static struct vnx_static_init { vnx_static_init() { register_all_types(); } } vnx_static_init_; const vnx::TypeCode* const vnx_native_type_code_Deposit = vnx::get_type_code(vnx::Hash64(0xc23408cb7b04b0ecull)); const vnx::TypeCode* const vnx_native_type_code_Execute = vnx::get_type_code(vnx::Hash64(0x8cd9012d9098c1d1ull)); } // namespace mmx } // namespace operation ================================================ FILE: generated/solution/include/mmx/solution/MultiSig.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_solution_MultiSig_HXX_ #define INCLUDE_mmx_solution_MultiSig_HXX_ #include #include #include #include #include namespace mmx { namespace solution { class MMX_SOLUTION_EXPORT MultiSig : public ::mmx::Solution { public: std::map<::mmx::addr_t, std::shared_ptr> solutions; uint32_t num_required = 0; typedef ::mmx::Solution Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0x64ffa2f8fc8dffd1ull; MultiSig() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual vnx::bool_t is_valid() const override; virtual ::mmx::hash_t calc_hash() const override; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const MultiSig& _value); friend std::istream& operator>>(std::istream& _in, MultiSig& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void MultiSig::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("solutions", 1); _visitor.accept(solutions); _visitor.type_field("num_required", 2); _visitor.accept(num_required); _visitor.template type_end(3); } } // namespace mmx } // namespace solution namespace vnx { } // vnx #endif // INCLUDE_mmx_solution_MultiSig_HXX_ ================================================ FILE: generated/solution/include/mmx/solution/PubKey.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_solution_PubKey_HXX_ #define INCLUDE_mmx_solution_PubKey_HXX_ #include #include #include #include #include #include namespace mmx { namespace solution { class MMX_SOLUTION_EXPORT PubKey : public ::mmx::Solution { public: ::mmx::pubkey_t pubkey; ::mmx::signature_t signature; typedef ::mmx::Solution Super; static const vnx::Hash64 VNX_TYPE_HASH; static const vnx::Hash64 VNX_CODE_HASH; static constexpr uint64_t VNX_TYPE_ID = 0xe47af6fcacfcefa5ull; PubKey() {} vnx::Hash64 get_type_hash() const override; std::string get_type_name() const override; const vnx::TypeCode* get_type_code() const override; virtual ::mmx::hash_t calc_hash() const override; virtual uint64_t calc_cost(std::shared_ptr params = nullptr) const override; static std::shared_ptr create(); std::shared_ptr clone() const override; void read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) override; void write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const override; void read(std::istream& _in) override; void write(std::ostream& _out) const override; template void accept_generic(T& _visitor) const; void accept(vnx::Visitor& _visitor) const override; vnx::Object to_object() const override; void from_object(const vnx::Object& object) override; vnx::Variant get_field(const std::string& name) const override; void set_field(const std::string& name, const vnx::Variant& value) override; friend std::ostream& operator<<(std::ostream& _out, const PubKey& _value); friend std::istream& operator>>(std::istream& _in, PubKey& _value); static const vnx::TypeCode* static_get_type_code(); static std::shared_ptr static_create_type_code(); protected: std::shared_ptr vnx_call_switch(std::shared_ptr _method) override; }; template void PubKey::accept_generic(T& _visitor) const { _visitor.template type_begin(3); _visitor.type_field("version", 0); _visitor.accept(version); _visitor.type_field("pubkey", 1); _visitor.accept(pubkey); _visitor.type_field("signature", 2); _visitor.accept(signature); _visitor.template type_end(3); } } // namespace mmx } // namespace solution namespace vnx { } // vnx #endif // INCLUDE_mmx_solution_PubKey_HXX_ ================================================ FILE: generated/solution/include/mmx/solution/accept_generic.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_solution_ACCEPT_GENERIC_HXX_ #define INCLUDE_mmx_solution_ACCEPT_GENERIC_HXX_ #include #include namespace vnx { template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } template void accept_generic(V& visitor, std::shared_ptr value) { if(value) { value->accept_generic(visitor); } else { visitor.accept(nullptr); } } } // namespace vnx #endif // INCLUDE_mmx_solution_ACCEPT_GENERIC_HXX_ ================================================ FILE: generated/solution/include/mmx/solution/package.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_solution_PACKAGE_HXX_ #define INCLUDE_mmx_solution_PACKAGE_HXX_ #include #include #include #ifdef MMX_SOLUTION_EXPORT_ENABLE #include #else #ifndef MMX_SOLUTION_EXPORT #define MMX_SOLUTION_EXPORT #endif #endif namespace mmx { namespace solution { void register_all_types(); class MultiSig; class PubKey; MMX_SOLUTION_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_MultiSig; ///< \private MMX_SOLUTION_EXPORT extern const vnx::TypeCode* const vnx_native_type_code_PubKey; ///< \private } // namespace mmx } // namespace solution namespace vnx { void read(TypeInput& in, ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(TypeInput& in, ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(std::istream& in, ::mmx::solution::MultiSig& value); ///< \private void read(std::istream& in, ::mmx::solution::PubKey& value); ///< \private void write(std::ostream& out, const ::mmx::solution::MultiSig& value); ///< \private void write(std::ostream& out, const ::mmx::solution::PubKey& value); ///< \private void accept(Visitor& visitor, const ::mmx::solution::MultiSig& value); ///< \private void accept(Visitor& visitor, const ::mmx::solution::PubKey& value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private template void accept_generic(V& visitor, std::shared_ptr value); ///< \private /// \private template<> struct type<::mmx::solution::MultiSig> { void read(TypeInput& in, ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::solution::MultiSig& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::solution::MultiSig& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::solution::MultiSig& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::solution::MultiSig& value, bool special = false); }; /// \private template<> struct type<::mmx::solution::PubKey> { void read(TypeInput& in, ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::solution::PubKey& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::solution::PubKey& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::solution::PubKey& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::solution::PubKey& value, bool special = false); }; } // namespace vnx #endif // INCLUDE_mmx_solution_PACKAGE_HXX_ ================================================ FILE: generated/solution/src/MultiSig.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { namespace solution { const vnx::Hash64 MultiSig::VNX_TYPE_HASH(0x64ffa2f8fc8dffd1ull); const vnx::Hash64 MultiSig::VNX_CODE_HASH(0x6cd2454ba41c5e6dull); vnx::Hash64 MultiSig::get_type_hash() const { return VNX_TYPE_HASH; } std::string MultiSig::get_type_name() const { return "mmx.solution.MultiSig"; } const vnx::TypeCode* MultiSig::get_type_code() const { return mmx::solution::vnx_native_type_code_MultiSig; } std::shared_ptr MultiSig::create() { return std::make_shared(); } std::shared_ptr MultiSig::clone() const { return std::make_shared(*this); } void MultiSig::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void MultiSig::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void MultiSig::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::solution::vnx_native_type_code_MultiSig; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, solutions); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, num_required); _visitor.type_end(*_type_code); } void MultiSig::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.solution.MultiSig\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"solutions\": "; vnx::write(_out, solutions); _out << ", \"num_required\": "; vnx::write(_out, num_required); _out << "}"; } void MultiSig::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object MultiSig::to_object() const { vnx::Object _object; _object["__type"] = "mmx.solution.MultiSig"; _object["version"] = version; _object["solutions"] = solutions; _object["num_required"] = num_required; return _object; } void MultiSig::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "num_required") { _entry.second.to(num_required); } else if(_entry.first == "solutions") { _entry.second.to(solutions); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant MultiSig::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "solutions") { return vnx::Variant(solutions); } if(_name == "num_required") { return vnx::Variant(num_required); } return vnx::Variant(); } void MultiSig::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "solutions") { _value.to(solutions); } else if(_name == "num_required") { _value.to(num_required); } } /// \private std::ostream& operator<<(std::ostream& _out, const MultiSig& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, MultiSig& _value) { _value.read(_in); return _in; } const vnx::TypeCode* MultiSig::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr MultiSig::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.solution.MultiSig"; type_code->type_hash = vnx::Hash64(0x64ffa2f8fc8dffd1ull); type_code->code_hash = vnx::Hash64(0x6cd2454ba41c5e6dull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::solution::MultiSig); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Solution::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "solutions"; field.code = {13, 5, 11, 32, 1, 16}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "num_required"; field.code = {3}; } type_code->build(); return type_code; } std::shared_ptr MultiSig::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace solution namespace vnx { void read(TypeInput& in, ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.num_required, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.solutions, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::solution::MultiSig& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::solution::vnx_native_type_code_MultiSig; out.write_type_code(type_code); vnx::write_class_header<::mmx::solution::MultiSig>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.num_required); vnx::write(out, value.solutions, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::solution::MultiSig& value) { value.read(in); } void write(std::ostream& out, const ::mmx::solution::MultiSig& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::solution::MultiSig& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/solution/src/PubKey.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { namespace solution { const vnx::Hash64 PubKey::VNX_TYPE_HASH(0xe47af6fcacfcefa5ull); const vnx::Hash64 PubKey::VNX_CODE_HASH(0xd8d22390f30ffec7ull); vnx::Hash64 PubKey::get_type_hash() const { return VNX_TYPE_HASH; } std::string PubKey::get_type_name() const { return "mmx.solution.PubKey"; } const vnx::TypeCode* PubKey::get_type_code() const { return mmx::solution::vnx_native_type_code_PubKey; } std::shared_ptr PubKey::create() { return std::make_shared(); } std::shared_ptr PubKey::clone() const { return std::make_shared(*this); } void PubKey::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void PubKey::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void PubKey::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::solution::vnx_native_type_code_PubKey; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, pubkey); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, signature); _visitor.type_end(*_type_code); } void PubKey::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.solution.PubKey\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"pubkey\": "; vnx::write(_out, pubkey); _out << ", \"signature\": "; vnx::write(_out, signature); _out << "}"; } void PubKey::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object PubKey::to_object() const { vnx::Object _object; _object["__type"] = "mmx.solution.PubKey"; _object["version"] = version; _object["pubkey"] = pubkey; _object["signature"] = signature; return _object; } void PubKey::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "pubkey") { _entry.second.to(pubkey); } else if(_entry.first == "signature") { _entry.second.to(signature); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant PubKey::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "pubkey") { return vnx::Variant(pubkey); } if(_name == "signature") { return vnx::Variant(signature); } return vnx::Variant(); } void PubKey::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "pubkey") { _value.to(pubkey); } else if(_name == "signature") { _value.to(signature); } } /// \private std::ostream& operator<<(std::ostream& _out, const PubKey& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, PubKey& _value) { _value.read(_in); return _in; } const vnx::TypeCode* PubKey::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr PubKey::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.solution.PubKey"; type_code->type_hash = vnx::Hash64(0xe47af6fcacfcefa5ull); type_code->code_hash = vnx::Hash64(0xd8d22390f30ffec7ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::solution::PubKey); type_code->parents.resize(1); type_code->parents[0] = ::mmx::Solution::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "pubkey"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "signature"; field.code = {11, 64, 1}; } type_code->build(); return type_code; } std::shared_ptr PubKey::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx } // namespace solution namespace vnx { void read(TypeInput& in, ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.pubkey, type_code, _field->code.data()); break; case 2: vnx::read(in, value.signature, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::solution::PubKey& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::solution::vnx_native_type_code_PubKey; out.write_type_code(type_code); vnx::write_class_header<::mmx::solution::PubKey>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.pubkey, type_code, type_code->fields[1].code.data()); vnx::write(out, value.signature, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::solution::PubKey& value) { value.read(in); } void write(std::ostream& out, const ::mmx::solution::PubKey& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::solution::PubKey& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/solution/src/package.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace vnx { const TypeCode* type<::mmx::solution::MultiSig>::get_type_code() { return mmx::solution::vnx_native_type_code_MultiSig; } void type<::mmx::solution::MultiSig>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::solution::MultiSig()); } void type<::mmx::solution::MultiSig>::create_dynamic_code(std::vector& code, const ::mmx::solution::MultiSig& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::solution::PubKey>::get_type_code() { return mmx::solution::vnx_native_type_code_PubKey; } void type<::mmx::solution::PubKey>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::solution::PubKey()); } void type<::mmx::solution::PubKey>::create_dynamic_code(std::vector& code, const ::mmx::solution::PubKey& value, bool special) { code.push_back(CODE_OBJECT); } } // namespace vnx namespace mmx { namespace solution { void register_all_types() { vnx::register_type_code(::mmx::solution::MultiSig::static_create_type_code()); vnx::register_type_code(::mmx::solution::PubKey::static_create_type_code()); } static struct vnx_static_init { vnx_static_init() { register_all_types(); } } vnx_static_init_; const vnx::TypeCode* const vnx_native_type_code_MultiSig = vnx::get_type_code(vnx::Hash64(0x64ffa2f8fc8dffd1ull)); const vnx::TypeCode* const vnx_native_type_code_PubKey = vnx::get_type_code(vnx::Hash64(0xe47af6fcacfcefa5ull)); } // namespace mmx } // namespace solution ================================================ FILE: generated/src/Block.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Block::VNX_TYPE_HASH(0x94965d816d328467ull); const vnx::Hash64 Block::VNX_CODE_HASH(0x3d36c5edbb8788e3ull); vnx::Hash64 Block::get_type_hash() const { return VNX_TYPE_HASH; } std::string Block::get_type_name() const { return "mmx.Block"; } const vnx::TypeCode* Block::get_type_code() const { return mmx::vnx_native_type_code_Block; } std::shared_ptr Block::create() { return std::make_shared(); } std::shared_ptr Block::clone() const { return std::make_shared(*this); } void Block::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Block::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Block::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Block; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, support_flags); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, prev); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, nonce); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, time_diff); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, space_diff); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, weight); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, total_weight); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, vdf_count); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, vdf_iters); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, vdf_output); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, vdf_reward_addr); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, vdf_reward_payout); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, proof); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, proof_hash); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, is_space_fork); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, space_fork_len); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, space_fork_proofs); _visitor.type_field(_type_code->fields[23], 23); vnx::accept(_visitor, reward_amount); _visitor.type_field(_type_code->fields[24], 24); vnx::accept(_visitor, reward_addr); _visitor.type_field(_type_code->fields[25], 25); vnx::accept(_visitor, reward_contract); _visitor.type_field(_type_code->fields[26], 26); vnx::accept(_visitor, reward_account); _visitor.type_field(_type_code->fields[27], 27); vnx::accept(_visitor, reward_vote); _visitor.type_field(_type_code->fields[28], 28); vnx::accept(_visitor, reward_vote_sum); _visitor.type_field(_type_code->fields[29], 29); vnx::accept(_visitor, reward_vote_count); _visitor.type_field(_type_code->fields[30], 30); vnx::accept(_visitor, base_reward); _visitor.type_field(_type_code->fields[31], 31); vnx::accept(_visitor, project_addr); _visitor.type_field(_type_code->fields[32], 32); vnx::accept(_visitor, static_cost); _visitor.type_field(_type_code->fields[33], 33); vnx::accept(_visitor, total_cost); _visitor.type_field(_type_code->fields[34], 34); vnx::accept(_visitor, tx_count); _visitor.type_field(_type_code->fields[35], 35); vnx::accept(_visitor, tx_fees); _visitor.type_field(_type_code->fields[36], 36); vnx::accept(_visitor, txfee_buffer); _visitor.type_field(_type_code->fields[37], 37); vnx::accept(_visitor, tx_hash); _visitor.type_field(_type_code->fields[38], 38); vnx::accept(_visitor, farmer_sig); _visitor.type_field(_type_code->fields[39], 39); vnx::accept(_visitor, content_hash); _visitor.type_field(_type_code->fields[40], 40); vnx::accept(_visitor, tx_list); _visitor.type_end(*_type_code); } void Block::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Block\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"support_flags\": "; vnx::write(_out, support_flags); _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"prev\": "; vnx::write(_out, prev); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"nonce\": "; vnx::write(_out, nonce); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"time_diff\": "; vnx::write(_out, time_diff); _out << ", \"space_diff\": "; vnx::write(_out, space_diff); _out << ", \"weight\": "; vnx::write(_out, weight); _out << ", \"total_weight\": "; vnx::write(_out, total_weight); _out << ", \"vdf_count\": "; vnx::write(_out, vdf_count); _out << ", \"vdf_iters\": "; vnx::write(_out, vdf_iters); _out << ", \"vdf_output\": "; vnx::write(_out, vdf_output); _out << ", \"vdf_reward_addr\": "; vnx::write(_out, vdf_reward_addr); _out << ", \"vdf_reward_payout\": "; vnx::write(_out, vdf_reward_payout); _out << ", \"proof\": "; vnx::write(_out, proof); _out << ", \"proof_hash\": "; vnx::write(_out, proof_hash); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"is_space_fork\": "; vnx::write(_out, is_space_fork); _out << ", \"space_fork_len\": "; vnx::write(_out, space_fork_len); _out << ", \"space_fork_proofs\": "; vnx::write(_out, space_fork_proofs); _out << ", \"reward_amount\": "; vnx::write(_out, reward_amount); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << ", \"reward_contract\": "; vnx::write(_out, reward_contract); _out << ", \"reward_account\": "; vnx::write(_out, reward_account); _out << ", \"reward_vote\": "; vnx::write(_out, reward_vote); _out << ", \"reward_vote_sum\": "; vnx::write(_out, reward_vote_sum); _out << ", \"reward_vote_count\": "; vnx::write(_out, reward_vote_count); _out << ", \"base_reward\": "; vnx::write(_out, base_reward); _out << ", \"project_addr\": "; vnx::write(_out, project_addr); _out << ", \"static_cost\": "; vnx::write(_out, static_cost); _out << ", \"total_cost\": "; vnx::write(_out, total_cost); _out << ", \"tx_count\": "; vnx::write(_out, tx_count); _out << ", \"tx_fees\": "; vnx::write(_out, tx_fees); _out << ", \"txfee_buffer\": "; vnx::write(_out, txfee_buffer); _out << ", \"tx_hash\": "; vnx::write(_out, tx_hash); _out << ", \"farmer_sig\": "; vnx::write(_out, farmer_sig); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << ", \"tx_list\": "; vnx::write(_out, tx_list); _out << "}"; } void Block::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Block::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Block"; _object["version"] = version; _object["support_flags"] = support_flags; _object["hash"] = hash; _object["prev"] = prev; _object["height"] = height; _object["vdf_height"] = vdf_height; _object["nonce"] = nonce; _object["time_stamp"] = time_stamp; _object["time_diff"] = time_diff; _object["space_diff"] = space_diff; _object["weight"] = weight; _object["total_weight"] = total_weight; _object["vdf_count"] = vdf_count; _object["vdf_iters"] = vdf_iters; _object["vdf_output"] = vdf_output; _object["vdf_reward_addr"] = vdf_reward_addr; _object["vdf_reward_payout"] = vdf_reward_payout; _object["proof"] = proof; _object["proof_hash"] = proof_hash; _object["challenge"] = challenge; _object["is_space_fork"] = is_space_fork; _object["space_fork_len"] = space_fork_len; _object["space_fork_proofs"] = space_fork_proofs; _object["reward_amount"] = reward_amount; _object["reward_addr"] = reward_addr; _object["reward_contract"] = reward_contract; _object["reward_account"] = reward_account; _object["reward_vote"] = reward_vote; _object["reward_vote_sum"] = reward_vote_sum; _object["reward_vote_count"] = reward_vote_count; _object["base_reward"] = base_reward; _object["project_addr"] = project_addr; _object["static_cost"] = static_cost; _object["total_cost"] = total_cost; _object["tx_count"] = tx_count; _object["tx_fees"] = tx_fees; _object["txfee_buffer"] = txfee_buffer; _object["tx_hash"] = tx_hash; _object["farmer_sig"] = farmer_sig; _object["content_hash"] = content_hash; _object["tx_list"] = tx_list; return _object; } void Block::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "base_reward") { _entry.second.to(base_reward); } else if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "farmer_sig") { _entry.second.to(farmer_sig); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "is_space_fork") { _entry.second.to(is_space_fork); } else if(_entry.first == "nonce") { _entry.second.to(nonce); } else if(_entry.first == "prev") { _entry.second.to(prev); } else if(_entry.first == "project_addr") { _entry.second.to(project_addr); } else if(_entry.first == "proof") { _entry.second.to(proof); } else if(_entry.first == "proof_hash") { _entry.second.to(proof_hash); } else if(_entry.first == "reward_account") { _entry.second.to(reward_account); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "reward_amount") { _entry.second.to(reward_amount); } else if(_entry.first == "reward_contract") { _entry.second.to(reward_contract); } else if(_entry.first == "reward_vote") { _entry.second.to(reward_vote); } else if(_entry.first == "reward_vote_count") { _entry.second.to(reward_vote_count); } else if(_entry.first == "reward_vote_sum") { _entry.second.to(reward_vote_sum); } else if(_entry.first == "space_diff") { _entry.second.to(space_diff); } else if(_entry.first == "space_fork_len") { _entry.second.to(space_fork_len); } else if(_entry.first == "space_fork_proofs") { _entry.second.to(space_fork_proofs); } else if(_entry.first == "static_cost") { _entry.second.to(static_cost); } else if(_entry.first == "support_flags") { _entry.second.to(support_flags); } else if(_entry.first == "time_diff") { _entry.second.to(time_diff); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "total_cost") { _entry.second.to(total_cost); } else if(_entry.first == "total_weight") { _entry.second.to(total_weight); } else if(_entry.first == "tx_count") { _entry.second.to(tx_count); } else if(_entry.first == "tx_fees") { _entry.second.to(tx_fees); } else if(_entry.first == "tx_hash") { _entry.second.to(tx_hash); } else if(_entry.first == "tx_list") { _entry.second.to(tx_list); } else if(_entry.first == "txfee_buffer") { _entry.second.to(txfee_buffer); } else if(_entry.first == "vdf_count") { _entry.second.to(vdf_count); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } else if(_entry.first == "vdf_iters") { _entry.second.to(vdf_iters); } else if(_entry.first == "vdf_output") { _entry.second.to(vdf_output); } else if(_entry.first == "vdf_reward_addr") { _entry.second.to(vdf_reward_addr); } else if(_entry.first == "vdf_reward_payout") { _entry.second.to(vdf_reward_payout); } else if(_entry.first == "version") { _entry.second.to(version); } else if(_entry.first == "weight") { _entry.second.to(weight); } } } vnx::Variant Block::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "support_flags") { return vnx::Variant(support_flags); } if(_name == "hash") { return vnx::Variant(hash); } if(_name == "prev") { return vnx::Variant(prev); } if(_name == "height") { return vnx::Variant(height); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "nonce") { return vnx::Variant(nonce); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "time_diff") { return vnx::Variant(time_diff); } if(_name == "space_diff") { return vnx::Variant(space_diff); } if(_name == "weight") { return vnx::Variant(weight); } if(_name == "total_weight") { return vnx::Variant(total_weight); } if(_name == "vdf_count") { return vnx::Variant(vdf_count); } if(_name == "vdf_iters") { return vnx::Variant(vdf_iters); } if(_name == "vdf_output") { return vnx::Variant(vdf_output); } if(_name == "vdf_reward_addr") { return vnx::Variant(vdf_reward_addr); } if(_name == "vdf_reward_payout") { return vnx::Variant(vdf_reward_payout); } if(_name == "proof") { return vnx::Variant(proof); } if(_name == "proof_hash") { return vnx::Variant(proof_hash); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "is_space_fork") { return vnx::Variant(is_space_fork); } if(_name == "space_fork_len") { return vnx::Variant(space_fork_len); } if(_name == "space_fork_proofs") { return vnx::Variant(space_fork_proofs); } if(_name == "reward_amount") { return vnx::Variant(reward_amount); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } if(_name == "reward_contract") { return vnx::Variant(reward_contract); } if(_name == "reward_account") { return vnx::Variant(reward_account); } if(_name == "reward_vote") { return vnx::Variant(reward_vote); } if(_name == "reward_vote_sum") { return vnx::Variant(reward_vote_sum); } if(_name == "reward_vote_count") { return vnx::Variant(reward_vote_count); } if(_name == "base_reward") { return vnx::Variant(base_reward); } if(_name == "project_addr") { return vnx::Variant(project_addr); } if(_name == "static_cost") { return vnx::Variant(static_cost); } if(_name == "total_cost") { return vnx::Variant(total_cost); } if(_name == "tx_count") { return vnx::Variant(tx_count); } if(_name == "tx_fees") { return vnx::Variant(tx_fees); } if(_name == "txfee_buffer") { return vnx::Variant(txfee_buffer); } if(_name == "tx_hash") { return vnx::Variant(tx_hash); } if(_name == "farmer_sig") { return vnx::Variant(farmer_sig); } if(_name == "content_hash") { return vnx::Variant(content_hash); } if(_name == "tx_list") { return vnx::Variant(tx_list); } return vnx::Variant(); } void Block::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "support_flags") { _value.to(support_flags); } else if(_name == "hash") { _value.to(hash); } else if(_name == "prev") { _value.to(prev); } else if(_name == "height") { _value.to(height); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "nonce") { _value.to(nonce); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "time_diff") { _value.to(time_diff); } else if(_name == "space_diff") { _value.to(space_diff); } else if(_name == "weight") { _value.to(weight); } else if(_name == "total_weight") { _value.to(total_weight); } else if(_name == "vdf_count") { _value.to(vdf_count); } else if(_name == "vdf_iters") { _value.to(vdf_iters); } else if(_name == "vdf_output") { _value.to(vdf_output); } else if(_name == "vdf_reward_addr") { _value.to(vdf_reward_addr); } else if(_name == "vdf_reward_payout") { _value.to(vdf_reward_payout); } else if(_name == "proof") { _value.to(proof); } else if(_name == "proof_hash") { _value.to(proof_hash); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "is_space_fork") { _value.to(is_space_fork); } else if(_name == "space_fork_len") { _value.to(space_fork_len); } else if(_name == "space_fork_proofs") { _value.to(space_fork_proofs); } else if(_name == "reward_amount") { _value.to(reward_amount); } else if(_name == "reward_addr") { _value.to(reward_addr); } else if(_name == "reward_contract") { _value.to(reward_contract); } else if(_name == "reward_account") { _value.to(reward_account); } else if(_name == "reward_vote") { _value.to(reward_vote); } else if(_name == "reward_vote_sum") { _value.to(reward_vote_sum); } else if(_name == "reward_vote_count") { _value.to(reward_vote_count); } else if(_name == "base_reward") { _value.to(base_reward); } else if(_name == "project_addr") { _value.to(project_addr); } else if(_name == "static_cost") { _value.to(static_cost); } else if(_name == "total_cost") { _value.to(total_cost); } else if(_name == "tx_count") { _value.to(tx_count); } else if(_name == "tx_fees") { _value.to(tx_fees); } else if(_name == "txfee_buffer") { _value.to(txfee_buffer); } else if(_name == "tx_hash") { _value.to(tx_hash); } else if(_name == "farmer_sig") { _value.to(farmer_sig); } else if(_name == "content_hash") { _value.to(content_hash); } else if(_name == "tx_list") { _value.to(tx_list); } } /// \private std::ostream& operator<<(std::ostream& _out, const Block& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Block& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Block::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Block::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Block"; type_code->type_hash = vnx::Hash64(0x94965d816d328467ull); type_code->code_hash = vnx::Hash64(0x3d36c5edbb8788e3ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Block); type_code->parents.resize(1); type_code->parents[0] = ::mmx::BlockHeader::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(41); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "support_flags"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "prev"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "nonce"; field.code = {4}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "time_diff"; field.code = {4}; } { auto& field = type_code->fields[9]; field.data_size = 8; field.name = "space_diff"; field.code = {4}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "weight"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "total_weight"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "vdf_count"; field.code = {3}; } { auto& field = type_code->fields[13]; field.data_size = 8; field.name = "vdf_iters"; field.code = {4}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "vdf_output"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "vdf_reward_addr"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "vdf_reward_payout"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "proof"; field.code = {12, 16}; } { auto& field = type_code->fields[18]; field.is_extended = true; field.name = "proof_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[19]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[20]; field.data_size = 1; field.name = "is_space_fork"; field.code = {31}; } { auto& field = type_code->fields[21]; field.data_size = 4; field.name = "space_fork_len"; field.code = {3}; } { auto& field = type_code->fields[22]; field.data_size = 4; field.name = "space_fork_proofs"; field.code = {3}; } { auto& field = type_code->fields[23]; field.data_size = 8; field.name = "reward_amount"; field.code = {4}; } { auto& field = type_code->fields[24]; field.is_extended = true; field.name = "reward_addr"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[25]; field.is_extended = true; field.name = "reward_contract"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[26]; field.is_extended = true; field.name = "reward_account"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[27]; field.data_size = 1; field.name = "reward_vote"; field.code = {5}; } { auto& field = type_code->fields[28]; field.data_size = 4; field.name = "reward_vote_sum"; field.code = {7}; } { auto& field = type_code->fields[29]; field.data_size = 4; field.name = "reward_vote_count"; field.code = {3}; } { auto& field = type_code->fields[30]; field.data_size = 8; field.name = "base_reward"; field.code = {4}; } { auto& field = type_code->fields[31]; field.is_extended = true; field.name = "project_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[32]; field.data_size = 8; field.name = "static_cost"; field.code = {4}; } { auto& field = type_code->fields[33]; field.data_size = 8; field.name = "total_cost"; field.code = {4}; } { auto& field = type_code->fields[34]; field.data_size = 4; field.name = "tx_count"; field.code = {3}; } { auto& field = type_code->fields[35]; field.data_size = 8; field.name = "tx_fees"; field.code = {4}; } { auto& field = type_code->fields[36]; field.data_size = 8; field.name = "txfee_buffer"; field.code = {4}; } { auto& field = type_code->fields[37]; field.is_extended = true; field.name = "tx_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[38]; field.is_extended = true; field.name = "farmer_sig"; field.code = {33, 11, 64, 1}; } { auto& field = type_code->fields[39]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[40]; field.is_extended = true; field.name = "tx_list"; field.code = {12, 16}; } type_code->build(); return type_code; } std::shared_ptr Block::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.support_flags, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.nonce, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.time_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.space_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.vdf_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.vdf_iters, _field->code.data()); } if(const auto* const _field = type_code->field_map[20]) { vnx::read_value(_buf + _field->offset, value.is_space_fork, _field->code.data()); } if(const auto* const _field = type_code->field_map[21]) { vnx::read_value(_buf + _field->offset, value.space_fork_len, _field->code.data()); } if(const auto* const _field = type_code->field_map[22]) { vnx::read_value(_buf + _field->offset, value.space_fork_proofs, _field->code.data()); } if(const auto* const _field = type_code->field_map[23]) { vnx::read_value(_buf + _field->offset, value.reward_amount, _field->code.data()); } if(const auto* const _field = type_code->field_map[27]) { vnx::read_value(_buf + _field->offset, value.reward_vote, _field->code.data()); } if(const auto* const _field = type_code->field_map[28]) { vnx::read_value(_buf + _field->offset, value.reward_vote_sum, _field->code.data()); } if(const auto* const _field = type_code->field_map[29]) { vnx::read_value(_buf + _field->offset, value.reward_vote_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[30]) { vnx::read_value(_buf + _field->offset, value.base_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[32]) { vnx::read_value(_buf + _field->offset, value.static_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[33]) { vnx::read_value(_buf + _field->offset, value.total_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[34]) { vnx::read_value(_buf + _field->offset, value.tx_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[35]) { vnx::read_value(_buf + _field->offset, value.tx_fees, _field->code.data()); } if(const auto* const _field = type_code->field_map[36]) { vnx::read_value(_buf + _field->offset, value.txfee_buffer, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 3: vnx::read(in, value.prev, type_code, _field->code.data()); break; case 10: vnx::read(in, value.weight, type_code, _field->code.data()); break; case 11: vnx::read(in, value.total_weight, type_code, _field->code.data()); break; case 14: vnx::read(in, value.vdf_output, type_code, _field->code.data()); break; case 15: vnx::read(in, value.vdf_reward_addr, type_code, _field->code.data()); break; case 16: vnx::read(in, value.vdf_reward_payout, type_code, _field->code.data()); break; case 17: vnx::read(in, value.proof, type_code, _field->code.data()); break; case 18: vnx::read(in, value.proof_hash, type_code, _field->code.data()); break; case 19: vnx::read(in, value.challenge, type_code, _field->code.data()); break; case 24: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; case 25: vnx::read(in, value.reward_contract, type_code, _field->code.data()); break; case 26: vnx::read(in, value.reward_account, type_code, _field->code.data()); break; case 31: vnx::read(in, value.project_addr, type_code, _field->code.data()); break; case 37: vnx::read(in, value.tx_hash, type_code, _field->code.data()); break; case 38: vnx::read(in, value.farmer_sig, type_code, _field->code.data()); break; case 39: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; case 40: vnx::read(in, value.tx_list, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Block& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Block; out.write_type_code(type_code); vnx::write_class_header<::mmx::Block>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(130); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.support_flags); vnx::write_value(_buf + 8, value.height); vnx::write_value(_buf + 12, value.vdf_height); vnx::write_value(_buf + 16, value.nonce); vnx::write_value(_buf + 24, value.time_stamp); vnx::write_value(_buf + 32, value.time_diff); vnx::write_value(_buf + 40, value.space_diff); vnx::write_value(_buf + 48, value.vdf_count); vnx::write_value(_buf + 52, value.vdf_iters); vnx::write_value(_buf + 60, value.is_space_fork); vnx::write_value(_buf + 61, value.space_fork_len); vnx::write_value(_buf + 65, value.space_fork_proofs); vnx::write_value(_buf + 69, value.reward_amount); vnx::write_value(_buf + 77, value.reward_vote); vnx::write_value(_buf + 78, value.reward_vote_sum); vnx::write_value(_buf + 82, value.reward_vote_count); vnx::write_value(_buf + 86, value.base_reward); vnx::write_value(_buf + 94, value.static_cost); vnx::write_value(_buf + 102, value.total_cost); vnx::write_value(_buf + 110, value.tx_count); vnx::write_value(_buf + 114, value.tx_fees); vnx::write_value(_buf + 122, value.txfee_buffer); vnx::write(out, value.hash, type_code, type_code->fields[2].code.data()); vnx::write(out, value.prev, type_code, type_code->fields[3].code.data()); vnx::write(out, value.weight, type_code, type_code->fields[10].code.data()); vnx::write(out, value.total_weight, type_code, type_code->fields[11].code.data()); vnx::write(out, value.vdf_output, type_code, type_code->fields[14].code.data()); vnx::write(out, value.vdf_reward_addr, type_code, type_code->fields[15].code.data()); vnx::write(out, value.vdf_reward_payout, type_code, type_code->fields[16].code.data()); vnx::write(out, value.proof, type_code, type_code->fields[17].code.data()); vnx::write(out, value.proof_hash, type_code, type_code->fields[18].code.data()); vnx::write(out, value.challenge, type_code, type_code->fields[19].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[24].code.data()); vnx::write(out, value.reward_contract, type_code, type_code->fields[25].code.data()); vnx::write(out, value.reward_account, type_code, type_code->fields[26].code.data()); vnx::write(out, value.project_addr, type_code, type_code->fields[31].code.data()); vnx::write(out, value.tx_hash, type_code, type_code->fields[37].code.data()); vnx::write(out, value.farmer_sig, type_code, type_code->fields[38].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[39].code.data()); vnx::write(out, value.tx_list, type_code, type_code->fields[40].code.data()); } void read(std::istream& in, ::mmx::Block& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Block& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Block& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/BlockHeader.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const uint32_t BlockHeader::SUPPORT_HARDFORK1; const vnx::Hash64 BlockHeader::VNX_TYPE_HASH(0xcaae941a2fc712a6ull); const vnx::Hash64 BlockHeader::VNX_CODE_HASH(0xa96ccf5d216026e8ull); vnx::Hash64 BlockHeader::get_type_hash() const { return VNX_TYPE_HASH; } std::string BlockHeader::get_type_name() const { return "mmx.BlockHeader"; } const vnx::TypeCode* BlockHeader::get_type_code() const { return mmx::vnx_native_type_code_BlockHeader; } std::shared_ptr BlockHeader::create() { return std::make_shared(); } std::shared_ptr BlockHeader::clone() const { return std::make_shared(*this); } void BlockHeader::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void BlockHeader::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void BlockHeader::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_BlockHeader; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, support_flags); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, prev); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, nonce); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, time_diff); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, space_diff); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, weight); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, total_weight); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, vdf_count); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, vdf_iters); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, vdf_output); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, vdf_reward_addr); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, vdf_reward_payout); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, proof); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, proof_hash); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, is_space_fork); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, space_fork_len); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, space_fork_proofs); _visitor.type_field(_type_code->fields[23], 23); vnx::accept(_visitor, reward_amount); _visitor.type_field(_type_code->fields[24], 24); vnx::accept(_visitor, reward_addr); _visitor.type_field(_type_code->fields[25], 25); vnx::accept(_visitor, reward_contract); _visitor.type_field(_type_code->fields[26], 26); vnx::accept(_visitor, reward_account); _visitor.type_field(_type_code->fields[27], 27); vnx::accept(_visitor, reward_vote); _visitor.type_field(_type_code->fields[28], 28); vnx::accept(_visitor, reward_vote_sum); _visitor.type_field(_type_code->fields[29], 29); vnx::accept(_visitor, reward_vote_count); _visitor.type_field(_type_code->fields[30], 30); vnx::accept(_visitor, base_reward); _visitor.type_field(_type_code->fields[31], 31); vnx::accept(_visitor, project_addr); _visitor.type_field(_type_code->fields[32], 32); vnx::accept(_visitor, static_cost); _visitor.type_field(_type_code->fields[33], 33); vnx::accept(_visitor, total_cost); _visitor.type_field(_type_code->fields[34], 34); vnx::accept(_visitor, tx_count); _visitor.type_field(_type_code->fields[35], 35); vnx::accept(_visitor, tx_fees); _visitor.type_field(_type_code->fields[36], 36); vnx::accept(_visitor, txfee_buffer); _visitor.type_field(_type_code->fields[37], 37); vnx::accept(_visitor, tx_hash); _visitor.type_field(_type_code->fields[38], 38); vnx::accept(_visitor, farmer_sig); _visitor.type_field(_type_code->fields[39], 39); vnx::accept(_visitor, content_hash); _visitor.type_end(*_type_code); } void BlockHeader::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.BlockHeader\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"support_flags\": "; vnx::write(_out, support_flags); _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"prev\": "; vnx::write(_out, prev); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"nonce\": "; vnx::write(_out, nonce); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"time_diff\": "; vnx::write(_out, time_diff); _out << ", \"space_diff\": "; vnx::write(_out, space_diff); _out << ", \"weight\": "; vnx::write(_out, weight); _out << ", \"total_weight\": "; vnx::write(_out, total_weight); _out << ", \"vdf_count\": "; vnx::write(_out, vdf_count); _out << ", \"vdf_iters\": "; vnx::write(_out, vdf_iters); _out << ", \"vdf_output\": "; vnx::write(_out, vdf_output); _out << ", \"vdf_reward_addr\": "; vnx::write(_out, vdf_reward_addr); _out << ", \"vdf_reward_payout\": "; vnx::write(_out, vdf_reward_payout); _out << ", \"proof\": "; vnx::write(_out, proof); _out << ", \"proof_hash\": "; vnx::write(_out, proof_hash); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"is_space_fork\": "; vnx::write(_out, is_space_fork); _out << ", \"space_fork_len\": "; vnx::write(_out, space_fork_len); _out << ", \"space_fork_proofs\": "; vnx::write(_out, space_fork_proofs); _out << ", \"reward_amount\": "; vnx::write(_out, reward_amount); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << ", \"reward_contract\": "; vnx::write(_out, reward_contract); _out << ", \"reward_account\": "; vnx::write(_out, reward_account); _out << ", \"reward_vote\": "; vnx::write(_out, reward_vote); _out << ", \"reward_vote_sum\": "; vnx::write(_out, reward_vote_sum); _out << ", \"reward_vote_count\": "; vnx::write(_out, reward_vote_count); _out << ", \"base_reward\": "; vnx::write(_out, base_reward); _out << ", \"project_addr\": "; vnx::write(_out, project_addr); _out << ", \"static_cost\": "; vnx::write(_out, static_cost); _out << ", \"total_cost\": "; vnx::write(_out, total_cost); _out << ", \"tx_count\": "; vnx::write(_out, tx_count); _out << ", \"tx_fees\": "; vnx::write(_out, tx_fees); _out << ", \"txfee_buffer\": "; vnx::write(_out, txfee_buffer); _out << ", \"tx_hash\": "; vnx::write(_out, tx_hash); _out << ", \"farmer_sig\": "; vnx::write(_out, farmer_sig); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << "}"; } void BlockHeader::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object BlockHeader::to_object() const { vnx::Object _object; _object["__type"] = "mmx.BlockHeader"; _object["version"] = version; _object["support_flags"] = support_flags; _object["hash"] = hash; _object["prev"] = prev; _object["height"] = height; _object["vdf_height"] = vdf_height; _object["nonce"] = nonce; _object["time_stamp"] = time_stamp; _object["time_diff"] = time_diff; _object["space_diff"] = space_diff; _object["weight"] = weight; _object["total_weight"] = total_weight; _object["vdf_count"] = vdf_count; _object["vdf_iters"] = vdf_iters; _object["vdf_output"] = vdf_output; _object["vdf_reward_addr"] = vdf_reward_addr; _object["vdf_reward_payout"] = vdf_reward_payout; _object["proof"] = proof; _object["proof_hash"] = proof_hash; _object["challenge"] = challenge; _object["is_space_fork"] = is_space_fork; _object["space_fork_len"] = space_fork_len; _object["space_fork_proofs"] = space_fork_proofs; _object["reward_amount"] = reward_amount; _object["reward_addr"] = reward_addr; _object["reward_contract"] = reward_contract; _object["reward_account"] = reward_account; _object["reward_vote"] = reward_vote; _object["reward_vote_sum"] = reward_vote_sum; _object["reward_vote_count"] = reward_vote_count; _object["base_reward"] = base_reward; _object["project_addr"] = project_addr; _object["static_cost"] = static_cost; _object["total_cost"] = total_cost; _object["tx_count"] = tx_count; _object["tx_fees"] = tx_fees; _object["txfee_buffer"] = txfee_buffer; _object["tx_hash"] = tx_hash; _object["farmer_sig"] = farmer_sig; _object["content_hash"] = content_hash; return _object; } void BlockHeader::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "base_reward") { _entry.second.to(base_reward); } else if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "farmer_sig") { _entry.second.to(farmer_sig); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "is_space_fork") { _entry.second.to(is_space_fork); } else if(_entry.first == "nonce") { _entry.second.to(nonce); } else if(_entry.first == "prev") { _entry.second.to(prev); } else if(_entry.first == "project_addr") { _entry.second.to(project_addr); } else if(_entry.first == "proof") { _entry.second.to(proof); } else if(_entry.first == "proof_hash") { _entry.second.to(proof_hash); } else if(_entry.first == "reward_account") { _entry.second.to(reward_account); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "reward_amount") { _entry.second.to(reward_amount); } else if(_entry.first == "reward_contract") { _entry.second.to(reward_contract); } else if(_entry.first == "reward_vote") { _entry.second.to(reward_vote); } else if(_entry.first == "reward_vote_count") { _entry.second.to(reward_vote_count); } else if(_entry.first == "reward_vote_sum") { _entry.second.to(reward_vote_sum); } else if(_entry.first == "space_diff") { _entry.second.to(space_diff); } else if(_entry.first == "space_fork_len") { _entry.second.to(space_fork_len); } else if(_entry.first == "space_fork_proofs") { _entry.second.to(space_fork_proofs); } else if(_entry.first == "static_cost") { _entry.second.to(static_cost); } else if(_entry.first == "support_flags") { _entry.second.to(support_flags); } else if(_entry.first == "time_diff") { _entry.second.to(time_diff); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "total_cost") { _entry.second.to(total_cost); } else if(_entry.first == "total_weight") { _entry.second.to(total_weight); } else if(_entry.first == "tx_count") { _entry.second.to(tx_count); } else if(_entry.first == "tx_fees") { _entry.second.to(tx_fees); } else if(_entry.first == "tx_hash") { _entry.second.to(tx_hash); } else if(_entry.first == "txfee_buffer") { _entry.second.to(txfee_buffer); } else if(_entry.first == "vdf_count") { _entry.second.to(vdf_count); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } else if(_entry.first == "vdf_iters") { _entry.second.to(vdf_iters); } else if(_entry.first == "vdf_output") { _entry.second.to(vdf_output); } else if(_entry.first == "vdf_reward_addr") { _entry.second.to(vdf_reward_addr); } else if(_entry.first == "vdf_reward_payout") { _entry.second.to(vdf_reward_payout); } else if(_entry.first == "version") { _entry.second.to(version); } else if(_entry.first == "weight") { _entry.second.to(weight); } } } vnx::Variant BlockHeader::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "support_flags") { return vnx::Variant(support_flags); } if(_name == "hash") { return vnx::Variant(hash); } if(_name == "prev") { return vnx::Variant(prev); } if(_name == "height") { return vnx::Variant(height); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "nonce") { return vnx::Variant(nonce); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "time_diff") { return vnx::Variant(time_diff); } if(_name == "space_diff") { return vnx::Variant(space_diff); } if(_name == "weight") { return vnx::Variant(weight); } if(_name == "total_weight") { return vnx::Variant(total_weight); } if(_name == "vdf_count") { return vnx::Variant(vdf_count); } if(_name == "vdf_iters") { return vnx::Variant(vdf_iters); } if(_name == "vdf_output") { return vnx::Variant(vdf_output); } if(_name == "vdf_reward_addr") { return vnx::Variant(vdf_reward_addr); } if(_name == "vdf_reward_payout") { return vnx::Variant(vdf_reward_payout); } if(_name == "proof") { return vnx::Variant(proof); } if(_name == "proof_hash") { return vnx::Variant(proof_hash); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "is_space_fork") { return vnx::Variant(is_space_fork); } if(_name == "space_fork_len") { return vnx::Variant(space_fork_len); } if(_name == "space_fork_proofs") { return vnx::Variant(space_fork_proofs); } if(_name == "reward_amount") { return vnx::Variant(reward_amount); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } if(_name == "reward_contract") { return vnx::Variant(reward_contract); } if(_name == "reward_account") { return vnx::Variant(reward_account); } if(_name == "reward_vote") { return vnx::Variant(reward_vote); } if(_name == "reward_vote_sum") { return vnx::Variant(reward_vote_sum); } if(_name == "reward_vote_count") { return vnx::Variant(reward_vote_count); } if(_name == "base_reward") { return vnx::Variant(base_reward); } if(_name == "project_addr") { return vnx::Variant(project_addr); } if(_name == "static_cost") { return vnx::Variant(static_cost); } if(_name == "total_cost") { return vnx::Variant(total_cost); } if(_name == "tx_count") { return vnx::Variant(tx_count); } if(_name == "tx_fees") { return vnx::Variant(tx_fees); } if(_name == "txfee_buffer") { return vnx::Variant(txfee_buffer); } if(_name == "tx_hash") { return vnx::Variant(tx_hash); } if(_name == "farmer_sig") { return vnx::Variant(farmer_sig); } if(_name == "content_hash") { return vnx::Variant(content_hash); } return vnx::Variant(); } void BlockHeader::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "support_flags") { _value.to(support_flags); } else if(_name == "hash") { _value.to(hash); } else if(_name == "prev") { _value.to(prev); } else if(_name == "height") { _value.to(height); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "nonce") { _value.to(nonce); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "time_diff") { _value.to(time_diff); } else if(_name == "space_diff") { _value.to(space_diff); } else if(_name == "weight") { _value.to(weight); } else if(_name == "total_weight") { _value.to(total_weight); } else if(_name == "vdf_count") { _value.to(vdf_count); } else if(_name == "vdf_iters") { _value.to(vdf_iters); } else if(_name == "vdf_output") { _value.to(vdf_output); } else if(_name == "vdf_reward_addr") { _value.to(vdf_reward_addr); } else if(_name == "vdf_reward_payout") { _value.to(vdf_reward_payout); } else if(_name == "proof") { _value.to(proof); } else if(_name == "proof_hash") { _value.to(proof_hash); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "is_space_fork") { _value.to(is_space_fork); } else if(_name == "space_fork_len") { _value.to(space_fork_len); } else if(_name == "space_fork_proofs") { _value.to(space_fork_proofs); } else if(_name == "reward_amount") { _value.to(reward_amount); } else if(_name == "reward_addr") { _value.to(reward_addr); } else if(_name == "reward_contract") { _value.to(reward_contract); } else if(_name == "reward_account") { _value.to(reward_account); } else if(_name == "reward_vote") { _value.to(reward_vote); } else if(_name == "reward_vote_sum") { _value.to(reward_vote_sum); } else if(_name == "reward_vote_count") { _value.to(reward_vote_count); } else if(_name == "base_reward") { _value.to(base_reward); } else if(_name == "project_addr") { _value.to(project_addr); } else if(_name == "static_cost") { _value.to(static_cost); } else if(_name == "total_cost") { _value.to(total_cost); } else if(_name == "tx_count") { _value.to(tx_count); } else if(_name == "tx_fees") { _value.to(tx_fees); } else if(_name == "txfee_buffer") { _value.to(txfee_buffer); } else if(_name == "tx_hash") { _value.to(tx_hash); } else if(_name == "farmer_sig") { _value.to(farmer_sig); } else if(_name == "content_hash") { _value.to(content_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const BlockHeader& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, BlockHeader& _value) { _value.read(_in); return _in; } const vnx::TypeCode* BlockHeader::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr BlockHeader::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.BlockHeader"; type_code->type_hash = vnx::Hash64(0xcaae941a2fc712a6ull); type_code->code_hash = vnx::Hash64(0xa96ccf5d216026e8ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::BlockHeader); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(40); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "support_flags"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "prev"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "nonce"; field.code = {4}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "time_diff"; field.code = {4}; } { auto& field = type_code->fields[9]; field.data_size = 8; field.name = "space_diff"; field.code = {4}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "weight"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "total_weight"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "vdf_count"; field.code = {3}; } { auto& field = type_code->fields[13]; field.data_size = 8; field.name = "vdf_iters"; field.code = {4}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "vdf_output"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "vdf_reward_addr"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "vdf_reward_payout"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "proof"; field.code = {12, 16}; } { auto& field = type_code->fields[18]; field.is_extended = true; field.name = "proof_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[19]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[20]; field.data_size = 1; field.name = "is_space_fork"; field.code = {31}; } { auto& field = type_code->fields[21]; field.data_size = 4; field.name = "space_fork_len"; field.code = {3}; } { auto& field = type_code->fields[22]; field.data_size = 4; field.name = "space_fork_proofs"; field.code = {3}; } { auto& field = type_code->fields[23]; field.data_size = 8; field.name = "reward_amount"; field.code = {4}; } { auto& field = type_code->fields[24]; field.is_extended = true; field.name = "reward_addr"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[25]; field.is_extended = true; field.name = "reward_contract"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[26]; field.is_extended = true; field.name = "reward_account"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[27]; field.data_size = 1; field.name = "reward_vote"; field.code = {5}; } { auto& field = type_code->fields[28]; field.data_size = 4; field.name = "reward_vote_sum"; field.code = {7}; } { auto& field = type_code->fields[29]; field.data_size = 4; field.name = "reward_vote_count"; field.code = {3}; } { auto& field = type_code->fields[30]; field.data_size = 8; field.name = "base_reward"; field.code = {4}; } { auto& field = type_code->fields[31]; field.is_extended = true; field.name = "project_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[32]; field.data_size = 8; field.name = "static_cost"; field.code = {4}; } { auto& field = type_code->fields[33]; field.data_size = 8; field.name = "total_cost"; field.code = {4}; } { auto& field = type_code->fields[34]; field.data_size = 4; field.name = "tx_count"; field.code = {3}; } { auto& field = type_code->fields[35]; field.data_size = 8; field.name = "tx_fees"; field.code = {4}; } { auto& field = type_code->fields[36]; field.data_size = 8; field.name = "txfee_buffer"; field.code = {4}; } { auto& field = type_code->fields[37]; field.is_extended = true; field.name = "tx_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[38]; field.is_extended = true; field.name = "farmer_sig"; field.code = {33, 11, 64, 1}; } { auto& field = type_code->fields[39]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr BlockHeader::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.support_flags, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.nonce, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.time_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.space_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.vdf_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.vdf_iters, _field->code.data()); } if(const auto* const _field = type_code->field_map[20]) { vnx::read_value(_buf + _field->offset, value.is_space_fork, _field->code.data()); } if(const auto* const _field = type_code->field_map[21]) { vnx::read_value(_buf + _field->offset, value.space_fork_len, _field->code.data()); } if(const auto* const _field = type_code->field_map[22]) { vnx::read_value(_buf + _field->offset, value.space_fork_proofs, _field->code.data()); } if(const auto* const _field = type_code->field_map[23]) { vnx::read_value(_buf + _field->offset, value.reward_amount, _field->code.data()); } if(const auto* const _field = type_code->field_map[27]) { vnx::read_value(_buf + _field->offset, value.reward_vote, _field->code.data()); } if(const auto* const _field = type_code->field_map[28]) { vnx::read_value(_buf + _field->offset, value.reward_vote_sum, _field->code.data()); } if(const auto* const _field = type_code->field_map[29]) { vnx::read_value(_buf + _field->offset, value.reward_vote_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[30]) { vnx::read_value(_buf + _field->offset, value.base_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[32]) { vnx::read_value(_buf + _field->offset, value.static_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[33]) { vnx::read_value(_buf + _field->offset, value.total_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[34]) { vnx::read_value(_buf + _field->offset, value.tx_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[35]) { vnx::read_value(_buf + _field->offset, value.tx_fees, _field->code.data()); } if(const auto* const _field = type_code->field_map[36]) { vnx::read_value(_buf + _field->offset, value.txfee_buffer, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 3: vnx::read(in, value.prev, type_code, _field->code.data()); break; case 10: vnx::read(in, value.weight, type_code, _field->code.data()); break; case 11: vnx::read(in, value.total_weight, type_code, _field->code.data()); break; case 14: vnx::read(in, value.vdf_output, type_code, _field->code.data()); break; case 15: vnx::read(in, value.vdf_reward_addr, type_code, _field->code.data()); break; case 16: vnx::read(in, value.vdf_reward_payout, type_code, _field->code.data()); break; case 17: vnx::read(in, value.proof, type_code, _field->code.data()); break; case 18: vnx::read(in, value.proof_hash, type_code, _field->code.data()); break; case 19: vnx::read(in, value.challenge, type_code, _field->code.data()); break; case 24: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; case 25: vnx::read(in, value.reward_contract, type_code, _field->code.data()); break; case 26: vnx::read(in, value.reward_account, type_code, _field->code.data()); break; case 31: vnx::read(in, value.project_addr, type_code, _field->code.data()); break; case 37: vnx::read(in, value.tx_hash, type_code, _field->code.data()); break; case 38: vnx::read(in, value.farmer_sig, type_code, _field->code.data()); break; case 39: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::BlockHeader& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_BlockHeader; out.write_type_code(type_code); vnx::write_class_header<::mmx::BlockHeader>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(130); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.support_flags); vnx::write_value(_buf + 8, value.height); vnx::write_value(_buf + 12, value.vdf_height); vnx::write_value(_buf + 16, value.nonce); vnx::write_value(_buf + 24, value.time_stamp); vnx::write_value(_buf + 32, value.time_diff); vnx::write_value(_buf + 40, value.space_diff); vnx::write_value(_buf + 48, value.vdf_count); vnx::write_value(_buf + 52, value.vdf_iters); vnx::write_value(_buf + 60, value.is_space_fork); vnx::write_value(_buf + 61, value.space_fork_len); vnx::write_value(_buf + 65, value.space_fork_proofs); vnx::write_value(_buf + 69, value.reward_amount); vnx::write_value(_buf + 77, value.reward_vote); vnx::write_value(_buf + 78, value.reward_vote_sum); vnx::write_value(_buf + 82, value.reward_vote_count); vnx::write_value(_buf + 86, value.base_reward); vnx::write_value(_buf + 94, value.static_cost); vnx::write_value(_buf + 102, value.total_cost); vnx::write_value(_buf + 110, value.tx_count); vnx::write_value(_buf + 114, value.tx_fees); vnx::write_value(_buf + 122, value.txfee_buffer); vnx::write(out, value.hash, type_code, type_code->fields[2].code.data()); vnx::write(out, value.prev, type_code, type_code->fields[3].code.data()); vnx::write(out, value.weight, type_code, type_code->fields[10].code.data()); vnx::write(out, value.total_weight, type_code, type_code->fields[11].code.data()); vnx::write(out, value.vdf_output, type_code, type_code->fields[14].code.data()); vnx::write(out, value.vdf_reward_addr, type_code, type_code->fields[15].code.data()); vnx::write(out, value.vdf_reward_payout, type_code, type_code->fields[16].code.data()); vnx::write(out, value.proof, type_code, type_code->fields[17].code.data()); vnx::write(out, value.proof_hash, type_code, type_code->fields[18].code.data()); vnx::write(out, value.challenge, type_code, type_code->fields[19].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[24].code.data()); vnx::write(out, value.reward_contract, type_code, type_code->fields[25].code.data()); vnx::write(out, value.reward_account, type_code, type_code->fields[26].code.data()); vnx::write(out, value.project_addr, type_code, type_code->fields[31].code.data()); vnx::write(out, value.tx_hash, type_code, type_code->fields[37].code.data()); vnx::write(out, value.farmer_sig, type_code, type_code->fields[38].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[39].code.data()); } void read(std::istream& in, ::mmx::BlockHeader& value) { value.read(in); } void write(std::ostream& out, const ::mmx::BlockHeader& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::BlockHeader& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ChainParams.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ChainParams::VNX_TYPE_HASH(0x51bba8d28881e8e7ull); const vnx::Hash64 ChainParams::VNX_CODE_HASH(0xc82fa8ec51986073ull); vnx::Hash64 ChainParams::get_type_hash() const { return VNX_TYPE_HASH; } std::string ChainParams::get_type_name() const { return "mmx.ChainParams"; } const vnx::TypeCode* ChainParams::get_type_code() const { return mmx::vnx_native_type_code_ChainParams; } std::shared_ptr ChainParams::create() { return std::make_shared(); } std::shared_ptr ChainParams::clone() const { return std::make_shared(*this); } void ChainParams::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ChainParams::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ChainParams::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ChainParams; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, port); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, decimals); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, min_ksize); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, max_ksize); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, plot_filter); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, post_filter); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, commit_delay); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, infuse_delay); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, challenge_delay); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, challenge_interval); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, max_diff_adjust); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, max_vdf_count); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, avg_proof_count); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, max_proof_count); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, max_validators); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, min_reward); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, vdf_reward); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, vdf_reward_interval); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, vdf_segment_size); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, reward_adjust_div); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, reward_adjust_tick); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, reward_adjust_interval); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, target_mmx_gold_price); _visitor.type_field(_type_code->fields[23], 23); vnx::accept(_visitor, time_diff_divider); _visitor.type_field(_type_code->fields[24], 24); vnx::accept(_visitor, time_diff_constant); _visitor.type_field(_type_code->fields[25], 25); vnx::accept(_visitor, space_diff_constant); _visitor.type_field(_type_code->fields[26], 26); vnx::accept(_visitor, initial_time_diff); _visitor.type_field(_type_code->fields[27], 27); vnx::accept(_visitor, initial_space_diff); _visitor.type_field(_type_code->fields[28], 28); vnx::accept(_visitor, initial_time_stamp); _visitor.type_field(_type_code->fields[29], 29); vnx::accept(_visitor, min_txfee); _visitor.type_field(_type_code->fields[30], 30); vnx::accept(_visitor, min_txfee_io); _visitor.type_field(_type_code->fields[31], 31); vnx::accept(_visitor, min_txfee_sign); _visitor.type_field(_type_code->fields[32], 32); vnx::accept(_visitor, min_txfee_memo); _visitor.type_field(_type_code->fields[33], 33); vnx::accept(_visitor, min_txfee_exec); _visitor.type_field(_type_code->fields[34], 34); vnx::accept(_visitor, min_txfee_deploy); _visitor.type_field(_type_code->fields[35], 35); vnx::accept(_visitor, min_txfee_depend); _visitor.type_field(_type_code->fields[36], 36); vnx::accept(_visitor, min_txfee_byte); _visitor.type_field(_type_code->fields[37], 37); vnx::accept(_visitor, min_txfee_read); _visitor.type_field(_type_code->fields[38], 38); vnx::accept(_visitor, min_txfee_read_kbyte); _visitor.type_field(_type_code->fields[39], 39); vnx::accept(_visitor, max_block_size); _visitor.type_field(_type_code->fields[40], 40); vnx::accept(_visitor, max_block_cost); _visitor.type_field(_type_code->fields[41], 41); vnx::accept(_visitor, max_tx_cost); _visitor.type_field(_type_code->fields[42], 42); vnx::accept(_visitor, max_rcall_depth); _visitor.type_field(_type_code->fields[43], 43); vnx::accept(_visitor, max_rcall_width); _visitor.type_field(_type_code->fields[44], 44); vnx::accept(_visitor, min_fee_ratio); _visitor.type_field(_type_code->fields[45], 45); vnx::accept(_visitor, block_interval_ms); _visitor.type_field(_type_code->fields[46], 46); vnx::accept(_visitor, network); _visitor.type_field(_type_code->fields[47], 47); vnx::accept(_visitor, nft_binary); _visitor.type_field(_type_code->fields[48], 48); vnx::accept(_visitor, swap_binary); _visitor.type_field(_type_code->fields[49], 49); vnx::accept(_visitor, offer_binary); _visitor.type_field(_type_code->fields[50], 50); vnx::accept(_visitor, token_binary); _visitor.type_field(_type_code->fields[51], 51); vnx::accept(_visitor, plot_nft_binary); _visitor.type_field(_type_code->fields[52], 52); vnx::accept(_visitor, escrow_binary); _visitor.type_field(_type_code->fields[53], 53); vnx::accept(_visitor, time_lock_binary); _visitor.type_field(_type_code->fields[54], 54); vnx::accept(_visitor, relay_binary); _visitor.type_field(_type_code->fields[55], 55); vnx::accept(_visitor, fixed_project_reward); _visitor.type_field(_type_code->fields[56], 56); vnx::accept(_visitor, project_ratio); _visitor.type_field(_type_code->fields[57], 57); vnx::accept(_visitor, reward_activation); _visitor.type_field(_type_code->fields[58], 58); vnx::accept(_visitor, transaction_activation); _visitor.type_field(_type_code->fields[59], 59); vnx::accept(_visitor, hardfork1_height); _visitor.type_end(*_type_code); } void ChainParams::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ChainParams\""; _out << ", \"port\": "; vnx::write(_out, port); _out << ", \"decimals\": "; vnx::write(_out, decimals); _out << ", \"min_ksize\": "; vnx::write(_out, min_ksize); _out << ", \"max_ksize\": "; vnx::write(_out, max_ksize); _out << ", \"plot_filter\": "; vnx::write(_out, plot_filter); _out << ", \"post_filter\": "; vnx::write(_out, post_filter); _out << ", \"commit_delay\": "; vnx::write(_out, commit_delay); _out << ", \"infuse_delay\": "; vnx::write(_out, infuse_delay); _out << ", \"challenge_delay\": "; vnx::write(_out, challenge_delay); _out << ", \"challenge_interval\": "; vnx::write(_out, challenge_interval); _out << ", \"max_diff_adjust\": "; vnx::write(_out, max_diff_adjust); _out << ", \"max_vdf_count\": "; vnx::write(_out, max_vdf_count); _out << ", \"avg_proof_count\": "; vnx::write(_out, avg_proof_count); _out << ", \"max_proof_count\": "; vnx::write(_out, max_proof_count); _out << ", \"max_validators\": "; vnx::write(_out, max_validators); _out << ", \"min_reward\": "; vnx::write(_out, min_reward); _out << ", \"vdf_reward\": "; vnx::write(_out, vdf_reward); _out << ", \"vdf_reward_interval\": "; vnx::write(_out, vdf_reward_interval); _out << ", \"vdf_segment_size\": "; vnx::write(_out, vdf_segment_size); _out << ", \"reward_adjust_div\": "; vnx::write(_out, reward_adjust_div); _out << ", \"reward_adjust_tick\": "; vnx::write(_out, reward_adjust_tick); _out << ", \"reward_adjust_interval\": "; vnx::write(_out, reward_adjust_interval); _out << ", \"target_mmx_gold_price\": "; vnx::write(_out, target_mmx_gold_price); _out << ", \"time_diff_divider\": "; vnx::write(_out, time_diff_divider); _out << ", \"time_diff_constant\": "; vnx::write(_out, time_diff_constant); _out << ", \"space_diff_constant\": "; vnx::write(_out, space_diff_constant); _out << ", \"initial_time_diff\": "; vnx::write(_out, initial_time_diff); _out << ", \"initial_space_diff\": "; vnx::write(_out, initial_space_diff); _out << ", \"initial_time_stamp\": "; vnx::write(_out, initial_time_stamp); _out << ", \"min_txfee\": "; vnx::write(_out, min_txfee); _out << ", \"min_txfee_io\": "; vnx::write(_out, min_txfee_io); _out << ", \"min_txfee_sign\": "; vnx::write(_out, min_txfee_sign); _out << ", \"min_txfee_memo\": "; vnx::write(_out, min_txfee_memo); _out << ", \"min_txfee_exec\": "; vnx::write(_out, min_txfee_exec); _out << ", \"min_txfee_deploy\": "; vnx::write(_out, min_txfee_deploy); _out << ", \"min_txfee_depend\": "; vnx::write(_out, min_txfee_depend); _out << ", \"min_txfee_byte\": "; vnx::write(_out, min_txfee_byte); _out << ", \"min_txfee_read\": "; vnx::write(_out, min_txfee_read); _out << ", \"min_txfee_read_kbyte\": "; vnx::write(_out, min_txfee_read_kbyte); _out << ", \"max_block_size\": "; vnx::write(_out, max_block_size); _out << ", \"max_block_cost\": "; vnx::write(_out, max_block_cost); _out << ", \"max_tx_cost\": "; vnx::write(_out, max_tx_cost); _out << ", \"max_rcall_depth\": "; vnx::write(_out, max_rcall_depth); _out << ", \"max_rcall_width\": "; vnx::write(_out, max_rcall_width); _out << ", \"min_fee_ratio\": "; vnx::write(_out, min_fee_ratio); _out << ", \"block_interval_ms\": "; vnx::write(_out, block_interval_ms); _out << ", \"network\": "; vnx::write(_out, network); _out << ", \"nft_binary\": "; vnx::write(_out, nft_binary); _out << ", \"swap_binary\": "; vnx::write(_out, swap_binary); _out << ", \"offer_binary\": "; vnx::write(_out, offer_binary); _out << ", \"token_binary\": "; vnx::write(_out, token_binary); _out << ", \"plot_nft_binary\": "; vnx::write(_out, plot_nft_binary); _out << ", \"escrow_binary\": "; vnx::write(_out, escrow_binary); _out << ", \"time_lock_binary\": "; vnx::write(_out, time_lock_binary); _out << ", \"relay_binary\": "; vnx::write(_out, relay_binary); _out << ", \"fixed_project_reward\": "; vnx::write(_out, fixed_project_reward); _out << ", \"project_ratio\": "; vnx::write(_out, project_ratio); _out << ", \"reward_activation\": "; vnx::write(_out, reward_activation); _out << ", \"transaction_activation\": "; vnx::write(_out, transaction_activation); _out << ", \"hardfork1_height\": "; vnx::write(_out, hardfork1_height); _out << "}"; } void ChainParams::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ChainParams::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ChainParams"; _object["port"] = port; _object["decimals"] = decimals; _object["min_ksize"] = min_ksize; _object["max_ksize"] = max_ksize; _object["plot_filter"] = plot_filter; _object["post_filter"] = post_filter; _object["commit_delay"] = commit_delay; _object["infuse_delay"] = infuse_delay; _object["challenge_delay"] = challenge_delay; _object["challenge_interval"] = challenge_interval; _object["max_diff_adjust"] = max_diff_adjust; _object["max_vdf_count"] = max_vdf_count; _object["avg_proof_count"] = avg_proof_count; _object["max_proof_count"] = max_proof_count; _object["max_validators"] = max_validators; _object["min_reward"] = min_reward; _object["vdf_reward"] = vdf_reward; _object["vdf_reward_interval"] = vdf_reward_interval; _object["vdf_segment_size"] = vdf_segment_size; _object["reward_adjust_div"] = reward_adjust_div; _object["reward_adjust_tick"] = reward_adjust_tick; _object["reward_adjust_interval"] = reward_adjust_interval; _object["target_mmx_gold_price"] = target_mmx_gold_price; _object["time_diff_divider"] = time_diff_divider; _object["time_diff_constant"] = time_diff_constant; _object["space_diff_constant"] = space_diff_constant; _object["initial_time_diff"] = initial_time_diff; _object["initial_space_diff"] = initial_space_diff; _object["initial_time_stamp"] = initial_time_stamp; _object["min_txfee"] = min_txfee; _object["min_txfee_io"] = min_txfee_io; _object["min_txfee_sign"] = min_txfee_sign; _object["min_txfee_memo"] = min_txfee_memo; _object["min_txfee_exec"] = min_txfee_exec; _object["min_txfee_deploy"] = min_txfee_deploy; _object["min_txfee_depend"] = min_txfee_depend; _object["min_txfee_byte"] = min_txfee_byte; _object["min_txfee_read"] = min_txfee_read; _object["min_txfee_read_kbyte"] = min_txfee_read_kbyte; _object["max_block_size"] = max_block_size; _object["max_block_cost"] = max_block_cost; _object["max_tx_cost"] = max_tx_cost; _object["max_rcall_depth"] = max_rcall_depth; _object["max_rcall_width"] = max_rcall_width; _object["min_fee_ratio"] = min_fee_ratio; _object["block_interval_ms"] = block_interval_ms; _object["network"] = network; _object["nft_binary"] = nft_binary; _object["swap_binary"] = swap_binary; _object["offer_binary"] = offer_binary; _object["token_binary"] = token_binary; _object["plot_nft_binary"] = plot_nft_binary; _object["escrow_binary"] = escrow_binary; _object["time_lock_binary"] = time_lock_binary; _object["relay_binary"] = relay_binary; _object["fixed_project_reward"] = fixed_project_reward; _object["project_ratio"] = project_ratio; _object["reward_activation"] = reward_activation; _object["transaction_activation"] = transaction_activation; _object["hardfork1_height"] = hardfork1_height; return _object; } void ChainParams::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "avg_proof_count") { _entry.second.to(avg_proof_count); } else if(_entry.first == "block_interval_ms") { _entry.second.to(block_interval_ms); } else if(_entry.first == "challenge_delay") { _entry.second.to(challenge_delay); } else if(_entry.first == "challenge_interval") { _entry.second.to(challenge_interval); } else if(_entry.first == "commit_delay") { _entry.second.to(commit_delay); } else if(_entry.first == "decimals") { _entry.second.to(decimals); } else if(_entry.first == "escrow_binary") { _entry.second.to(escrow_binary); } else if(_entry.first == "fixed_project_reward") { _entry.second.to(fixed_project_reward); } else if(_entry.first == "hardfork1_height") { _entry.second.to(hardfork1_height); } else if(_entry.first == "infuse_delay") { _entry.second.to(infuse_delay); } else if(_entry.first == "initial_space_diff") { _entry.second.to(initial_space_diff); } else if(_entry.first == "initial_time_diff") { _entry.second.to(initial_time_diff); } else if(_entry.first == "initial_time_stamp") { _entry.second.to(initial_time_stamp); } else if(_entry.first == "max_block_cost") { _entry.second.to(max_block_cost); } else if(_entry.first == "max_block_size") { _entry.second.to(max_block_size); } else if(_entry.first == "max_diff_adjust") { _entry.second.to(max_diff_adjust); } else if(_entry.first == "max_ksize") { _entry.second.to(max_ksize); } else if(_entry.first == "max_proof_count") { _entry.second.to(max_proof_count); } else if(_entry.first == "max_rcall_depth") { _entry.second.to(max_rcall_depth); } else if(_entry.first == "max_rcall_width") { _entry.second.to(max_rcall_width); } else if(_entry.first == "max_tx_cost") { _entry.second.to(max_tx_cost); } else if(_entry.first == "max_validators") { _entry.second.to(max_validators); } else if(_entry.first == "max_vdf_count") { _entry.second.to(max_vdf_count); } else if(_entry.first == "min_fee_ratio") { _entry.second.to(min_fee_ratio); } else if(_entry.first == "min_ksize") { _entry.second.to(min_ksize); } else if(_entry.first == "min_reward") { _entry.second.to(min_reward); } else if(_entry.first == "min_txfee") { _entry.second.to(min_txfee); } else if(_entry.first == "min_txfee_byte") { _entry.second.to(min_txfee_byte); } else if(_entry.first == "min_txfee_depend") { _entry.second.to(min_txfee_depend); } else if(_entry.first == "min_txfee_deploy") { _entry.second.to(min_txfee_deploy); } else if(_entry.first == "min_txfee_exec") { _entry.second.to(min_txfee_exec); } else if(_entry.first == "min_txfee_io") { _entry.second.to(min_txfee_io); } else if(_entry.first == "min_txfee_memo") { _entry.second.to(min_txfee_memo); } else if(_entry.first == "min_txfee_read") { _entry.second.to(min_txfee_read); } else if(_entry.first == "min_txfee_read_kbyte") { _entry.second.to(min_txfee_read_kbyte); } else if(_entry.first == "min_txfee_sign") { _entry.second.to(min_txfee_sign); } else if(_entry.first == "network") { _entry.second.to(network); } else if(_entry.first == "nft_binary") { _entry.second.to(nft_binary); } else if(_entry.first == "offer_binary") { _entry.second.to(offer_binary); } else if(_entry.first == "plot_filter") { _entry.second.to(plot_filter); } else if(_entry.first == "plot_nft_binary") { _entry.second.to(plot_nft_binary); } else if(_entry.first == "port") { _entry.second.to(port); } else if(_entry.first == "post_filter") { _entry.second.to(post_filter); } else if(_entry.first == "project_ratio") { _entry.second.to(project_ratio); } else if(_entry.first == "relay_binary") { _entry.second.to(relay_binary); } else if(_entry.first == "reward_activation") { _entry.second.to(reward_activation); } else if(_entry.first == "reward_adjust_div") { _entry.second.to(reward_adjust_div); } else if(_entry.first == "reward_adjust_interval") { _entry.second.to(reward_adjust_interval); } else if(_entry.first == "reward_adjust_tick") { _entry.second.to(reward_adjust_tick); } else if(_entry.first == "space_diff_constant") { _entry.second.to(space_diff_constant); } else if(_entry.first == "swap_binary") { _entry.second.to(swap_binary); } else if(_entry.first == "target_mmx_gold_price") { _entry.second.to(target_mmx_gold_price); } else if(_entry.first == "time_diff_constant") { _entry.second.to(time_diff_constant); } else if(_entry.first == "time_diff_divider") { _entry.second.to(time_diff_divider); } else if(_entry.first == "time_lock_binary") { _entry.second.to(time_lock_binary); } else if(_entry.first == "token_binary") { _entry.second.to(token_binary); } else if(_entry.first == "transaction_activation") { _entry.second.to(transaction_activation); } else if(_entry.first == "vdf_reward") { _entry.second.to(vdf_reward); } else if(_entry.first == "vdf_reward_interval") { _entry.second.to(vdf_reward_interval); } else if(_entry.first == "vdf_segment_size") { _entry.second.to(vdf_segment_size); } } } vnx::Variant ChainParams::get_field(const std::string& _name) const { if(_name == "port") { return vnx::Variant(port); } if(_name == "decimals") { return vnx::Variant(decimals); } if(_name == "min_ksize") { return vnx::Variant(min_ksize); } if(_name == "max_ksize") { return vnx::Variant(max_ksize); } if(_name == "plot_filter") { return vnx::Variant(plot_filter); } if(_name == "post_filter") { return vnx::Variant(post_filter); } if(_name == "commit_delay") { return vnx::Variant(commit_delay); } if(_name == "infuse_delay") { return vnx::Variant(infuse_delay); } if(_name == "challenge_delay") { return vnx::Variant(challenge_delay); } if(_name == "challenge_interval") { return vnx::Variant(challenge_interval); } if(_name == "max_diff_adjust") { return vnx::Variant(max_diff_adjust); } if(_name == "max_vdf_count") { return vnx::Variant(max_vdf_count); } if(_name == "avg_proof_count") { return vnx::Variant(avg_proof_count); } if(_name == "max_proof_count") { return vnx::Variant(max_proof_count); } if(_name == "max_validators") { return vnx::Variant(max_validators); } if(_name == "min_reward") { return vnx::Variant(min_reward); } if(_name == "vdf_reward") { return vnx::Variant(vdf_reward); } if(_name == "vdf_reward_interval") { return vnx::Variant(vdf_reward_interval); } if(_name == "vdf_segment_size") { return vnx::Variant(vdf_segment_size); } if(_name == "reward_adjust_div") { return vnx::Variant(reward_adjust_div); } if(_name == "reward_adjust_tick") { return vnx::Variant(reward_adjust_tick); } if(_name == "reward_adjust_interval") { return vnx::Variant(reward_adjust_interval); } if(_name == "target_mmx_gold_price") { return vnx::Variant(target_mmx_gold_price); } if(_name == "time_diff_divider") { return vnx::Variant(time_diff_divider); } if(_name == "time_diff_constant") { return vnx::Variant(time_diff_constant); } if(_name == "space_diff_constant") { return vnx::Variant(space_diff_constant); } if(_name == "initial_time_diff") { return vnx::Variant(initial_time_diff); } if(_name == "initial_space_diff") { return vnx::Variant(initial_space_diff); } if(_name == "initial_time_stamp") { return vnx::Variant(initial_time_stamp); } if(_name == "min_txfee") { return vnx::Variant(min_txfee); } if(_name == "min_txfee_io") { return vnx::Variant(min_txfee_io); } if(_name == "min_txfee_sign") { return vnx::Variant(min_txfee_sign); } if(_name == "min_txfee_memo") { return vnx::Variant(min_txfee_memo); } if(_name == "min_txfee_exec") { return vnx::Variant(min_txfee_exec); } if(_name == "min_txfee_deploy") { return vnx::Variant(min_txfee_deploy); } if(_name == "min_txfee_depend") { return vnx::Variant(min_txfee_depend); } if(_name == "min_txfee_byte") { return vnx::Variant(min_txfee_byte); } if(_name == "min_txfee_read") { return vnx::Variant(min_txfee_read); } if(_name == "min_txfee_read_kbyte") { return vnx::Variant(min_txfee_read_kbyte); } if(_name == "max_block_size") { return vnx::Variant(max_block_size); } if(_name == "max_block_cost") { return vnx::Variant(max_block_cost); } if(_name == "max_tx_cost") { return vnx::Variant(max_tx_cost); } if(_name == "max_rcall_depth") { return vnx::Variant(max_rcall_depth); } if(_name == "max_rcall_width") { return vnx::Variant(max_rcall_width); } if(_name == "min_fee_ratio") { return vnx::Variant(min_fee_ratio); } if(_name == "block_interval_ms") { return vnx::Variant(block_interval_ms); } if(_name == "network") { return vnx::Variant(network); } if(_name == "nft_binary") { return vnx::Variant(nft_binary); } if(_name == "swap_binary") { return vnx::Variant(swap_binary); } if(_name == "offer_binary") { return vnx::Variant(offer_binary); } if(_name == "token_binary") { return vnx::Variant(token_binary); } if(_name == "plot_nft_binary") { return vnx::Variant(plot_nft_binary); } if(_name == "escrow_binary") { return vnx::Variant(escrow_binary); } if(_name == "time_lock_binary") { return vnx::Variant(time_lock_binary); } if(_name == "relay_binary") { return vnx::Variant(relay_binary); } if(_name == "fixed_project_reward") { return vnx::Variant(fixed_project_reward); } if(_name == "project_ratio") { return vnx::Variant(project_ratio); } if(_name == "reward_activation") { return vnx::Variant(reward_activation); } if(_name == "transaction_activation") { return vnx::Variant(transaction_activation); } if(_name == "hardfork1_height") { return vnx::Variant(hardfork1_height); } return vnx::Variant(); } void ChainParams::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "port") { _value.to(port); } else if(_name == "decimals") { _value.to(decimals); } else if(_name == "min_ksize") { _value.to(min_ksize); } else if(_name == "max_ksize") { _value.to(max_ksize); } else if(_name == "plot_filter") { _value.to(plot_filter); } else if(_name == "post_filter") { _value.to(post_filter); } else if(_name == "commit_delay") { _value.to(commit_delay); } else if(_name == "infuse_delay") { _value.to(infuse_delay); } else if(_name == "challenge_delay") { _value.to(challenge_delay); } else if(_name == "challenge_interval") { _value.to(challenge_interval); } else if(_name == "max_diff_adjust") { _value.to(max_diff_adjust); } else if(_name == "max_vdf_count") { _value.to(max_vdf_count); } else if(_name == "avg_proof_count") { _value.to(avg_proof_count); } else if(_name == "max_proof_count") { _value.to(max_proof_count); } else if(_name == "max_validators") { _value.to(max_validators); } else if(_name == "min_reward") { _value.to(min_reward); } else if(_name == "vdf_reward") { _value.to(vdf_reward); } else if(_name == "vdf_reward_interval") { _value.to(vdf_reward_interval); } else if(_name == "vdf_segment_size") { _value.to(vdf_segment_size); } else if(_name == "reward_adjust_div") { _value.to(reward_adjust_div); } else if(_name == "reward_adjust_tick") { _value.to(reward_adjust_tick); } else if(_name == "reward_adjust_interval") { _value.to(reward_adjust_interval); } else if(_name == "target_mmx_gold_price") { _value.to(target_mmx_gold_price); } else if(_name == "time_diff_divider") { _value.to(time_diff_divider); } else if(_name == "time_diff_constant") { _value.to(time_diff_constant); } else if(_name == "space_diff_constant") { _value.to(space_diff_constant); } else if(_name == "initial_time_diff") { _value.to(initial_time_diff); } else if(_name == "initial_space_diff") { _value.to(initial_space_diff); } else if(_name == "initial_time_stamp") { _value.to(initial_time_stamp); } else if(_name == "min_txfee") { _value.to(min_txfee); } else if(_name == "min_txfee_io") { _value.to(min_txfee_io); } else if(_name == "min_txfee_sign") { _value.to(min_txfee_sign); } else if(_name == "min_txfee_memo") { _value.to(min_txfee_memo); } else if(_name == "min_txfee_exec") { _value.to(min_txfee_exec); } else if(_name == "min_txfee_deploy") { _value.to(min_txfee_deploy); } else if(_name == "min_txfee_depend") { _value.to(min_txfee_depend); } else if(_name == "min_txfee_byte") { _value.to(min_txfee_byte); } else if(_name == "min_txfee_read") { _value.to(min_txfee_read); } else if(_name == "min_txfee_read_kbyte") { _value.to(min_txfee_read_kbyte); } else if(_name == "max_block_size") { _value.to(max_block_size); } else if(_name == "max_block_cost") { _value.to(max_block_cost); } else if(_name == "max_tx_cost") { _value.to(max_tx_cost); } else if(_name == "max_rcall_depth") { _value.to(max_rcall_depth); } else if(_name == "max_rcall_width") { _value.to(max_rcall_width); } else if(_name == "min_fee_ratio") { _value.to(min_fee_ratio); } else if(_name == "block_interval_ms") { _value.to(block_interval_ms); } else if(_name == "network") { _value.to(network); } else if(_name == "nft_binary") { _value.to(nft_binary); } else if(_name == "swap_binary") { _value.to(swap_binary); } else if(_name == "offer_binary") { _value.to(offer_binary); } else if(_name == "token_binary") { _value.to(token_binary); } else if(_name == "plot_nft_binary") { _value.to(plot_nft_binary); } else if(_name == "escrow_binary") { _value.to(escrow_binary); } else if(_name == "time_lock_binary") { _value.to(time_lock_binary); } else if(_name == "relay_binary") { _value.to(relay_binary); } else if(_name == "fixed_project_reward") { _value.to(fixed_project_reward); } else if(_name == "project_ratio") { _value.to(project_ratio); } else if(_name == "reward_activation") { _value.to(reward_activation); } else if(_name == "transaction_activation") { _value.to(transaction_activation); } else if(_name == "hardfork1_height") { _value.to(hardfork1_height); } } /// \private std::ostream& operator<<(std::ostream& _out, const ChainParams& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ChainParams& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ChainParams::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ChainParams::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ChainParams"; type_code->type_hash = vnx::Hash64(0x51bba8d28881e8e7ull); type_code->code_hash = vnx::Hash64(0xc82fa8ec51986073ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ChainParams); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::uint_fraction_t::static_get_type_code(); type_code->fields.resize(60); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "port"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "decimals"; field.value = vnx::to_string(6); field.code = {7}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "min_ksize"; field.value = vnx::to_string(29); field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "max_ksize"; field.value = vnx::to_string(32); field.code = {3}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "plot_filter"; field.value = vnx::to_string(4); field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "post_filter"; field.value = vnx::to_string(10); field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "commit_delay"; field.value = vnx::to_string(18); field.code = {3}; } { auto& field = type_code->fields[7]; field.data_size = 4; field.name = "infuse_delay"; field.value = vnx::to_string(6); field.code = {3}; } { auto& field = type_code->fields[8]; field.data_size = 4; field.name = "challenge_delay"; field.value = vnx::to_string(9); field.code = {3}; } { auto& field = type_code->fields[9]; field.data_size = 4; field.name = "challenge_interval"; field.value = vnx::to_string(48); field.code = {3}; } { auto& field = type_code->fields[10]; field.data_size = 4; field.name = "max_diff_adjust"; field.value = vnx::to_string(10); field.code = {3}; } { auto& field = type_code->fields[11]; field.data_size = 4; field.name = "max_vdf_count"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "avg_proof_count"; field.value = vnx::to_string(3); field.code = {3}; } { auto& field = type_code->fields[13]; field.data_size = 4; field.name = "max_proof_count"; field.value = vnx::to_string(50); field.code = {3}; } { auto& field = type_code->fields[14]; field.data_size = 4; field.name = "max_validators"; field.value = vnx::to_string(11); field.code = {3}; } { auto& field = type_code->fields[15]; field.data_size = 8; field.name = "min_reward"; field.value = vnx::to_string(200000); field.code = {4}; } { auto& field = type_code->fields[16]; field.data_size = 8; field.name = "vdf_reward"; field.value = vnx::to_string(500000); field.code = {4}; } { auto& field = type_code->fields[17]; field.data_size = 4; field.name = "vdf_reward_interval"; field.value = vnx::to_string(50); field.code = {3}; } { auto& field = type_code->fields[18]; field.data_size = 4; field.name = "vdf_segment_size"; field.value = vnx::to_string(50000); field.code = {3}; } { auto& field = type_code->fields[19]; field.data_size = 4; field.name = "reward_adjust_div"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[20]; field.data_size = 4; field.name = "reward_adjust_tick"; field.value = vnx::to_string(10000); field.code = {3}; } { auto& field = type_code->fields[21]; field.data_size = 4; field.name = "reward_adjust_interval"; field.value = vnx::to_string(8640); field.code = {3}; } { auto& field = type_code->fields[22]; field.data_size = 4; field.name = "target_mmx_gold_price"; field.value = vnx::to_string(2000); field.code = {3}; } { auto& field = type_code->fields[23]; field.data_size = 8; field.name = "time_diff_divider"; field.value = vnx::to_string(1000); field.code = {4}; } { auto& field = type_code->fields[24]; field.data_size = 8; field.name = "time_diff_constant"; field.value = vnx::to_string(1000000); field.code = {4}; } { auto& field = type_code->fields[25]; field.data_size = 8; field.name = "space_diff_constant"; field.value = vnx::to_string(100000000); field.code = {4}; } { auto& field = type_code->fields[26]; field.data_size = 8; field.name = "initial_time_diff"; field.value = vnx::to_string(50); field.code = {4}; } { auto& field = type_code->fields[27]; field.data_size = 8; field.name = "initial_space_diff"; field.value = vnx::to_string(10); field.code = {4}; } { auto& field = type_code->fields[28]; field.data_size = 8; field.name = "initial_time_stamp"; field.value = vnx::to_string(0); field.code = {4}; } { auto& field = type_code->fields[29]; field.data_size = 8; field.name = "min_txfee"; field.value = vnx::to_string(100); field.code = {4}; } { auto& field = type_code->fields[30]; field.data_size = 8; field.name = "min_txfee_io"; field.value = vnx::to_string(100); field.code = {4}; } { auto& field = type_code->fields[31]; field.data_size = 8; field.name = "min_txfee_sign"; field.value = vnx::to_string(1000); field.code = {4}; } { auto& field = type_code->fields[32]; field.data_size = 8; field.name = "min_txfee_memo"; field.value = vnx::to_string(50); field.code = {4}; } { auto& field = type_code->fields[33]; field.data_size = 8; field.name = "min_txfee_exec"; field.value = vnx::to_string(10000); field.code = {4}; } { auto& field = type_code->fields[34]; field.data_size = 8; field.name = "min_txfee_deploy"; field.value = vnx::to_string(100000); field.code = {4}; } { auto& field = type_code->fields[35]; field.data_size = 8; field.name = "min_txfee_depend"; field.value = vnx::to_string(50000); field.code = {4}; } { auto& field = type_code->fields[36]; field.data_size = 8; field.name = "min_txfee_byte"; field.value = vnx::to_string(10); field.code = {4}; } { auto& field = type_code->fields[37]; field.data_size = 8; field.name = "min_txfee_read"; field.value = vnx::to_string(1000); field.code = {4}; } { auto& field = type_code->fields[38]; field.data_size = 8; field.name = "min_txfee_read_kbyte"; field.value = vnx::to_string(1000); field.code = {4}; } { auto& field = type_code->fields[39]; field.data_size = 8; field.name = "max_block_size"; field.value = vnx::to_string(10000000); field.code = {4}; } { auto& field = type_code->fields[40]; field.data_size = 8; field.name = "max_block_cost"; field.value = vnx::to_string(100000000); field.code = {4}; } { auto& field = type_code->fields[41]; field.data_size = 8; field.name = "max_tx_cost"; field.value = vnx::to_string(1000000); field.code = {4}; } { auto& field = type_code->fields[42]; field.data_size = 4; field.name = "max_rcall_depth"; field.value = vnx::to_string(3); field.code = {3}; } { auto& field = type_code->fields[43]; field.data_size = 4; field.name = "max_rcall_width"; field.value = vnx::to_string(10); field.code = {3}; } { auto& field = type_code->fields[44]; field.is_extended = true; field.name = "min_fee_ratio"; field.code = {12, 3}; } { auto& field = type_code->fields[45]; field.data_size = 8; field.name = "block_interval_ms"; field.value = vnx::to_string(10000); field.code = {8}; } { auto& field = type_code->fields[46]; field.is_extended = true; field.name = "network"; field.code = {32}; } { auto& field = type_code->fields[47]; field.is_extended = true; field.name = "nft_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[48]; field.is_extended = true; field.name = "swap_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[49]; field.is_extended = true; field.name = "offer_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[50]; field.is_extended = true; field.name = "token_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[51]; field.is_extended = true; field.name = "plot_nft_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[52]; field.is_extended = true; field.name = "escrow_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[53]; field.is_extended = true; field.name = "time_lock_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[54]; field.is_extended = true; field.name = "relay_binary"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[55]; field.data_size = 8; field.name = "fixed_project_reward"; field.value = vnx::to_string(50000); field.code = {4}; } { auto& field = type_code->fields[56]; field.is_extended = true; field.name = "project_ratio"; field.code = {19, 0}; } { auto& field = type_code->fields[57]; field.data_size = 4; field.name = "reward_activation"; field.value = vnx::to_string(50000); field.code = {3}; } { auto& field = type_code->fields[58]; field.data_size = 4; field.name = "transaction_activation"; field.value = vnx::to_string(100000); field.code = {3}; } { auto& field = type_code->fields[59]; field.data_size = 4; field.name = "hardfork1_height"; field.value = vnx::to_string(1000000); field.code = {3}; } type_code->build(); return type_code; } std::shared_ptr ChainParams::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.port, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.decimals, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.min_ksize, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.max_ksize, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.plot_filter, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.post_filter, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.commit_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.infuse_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.challenge_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.challenge_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.max_diff_adjust, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.max_vdf_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.avg_proof_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.max_proof_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[14]) { vnx::read_value(_buf + _field->offset, value.max_validators, _field->code.data()); } if(const auto* const _field = type_code->field_map[15]) { vnx::read_value(_buf + _field->offset, value.min_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[16]) { vnx::read_value(_buf + _field->offset, value.vdf_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[17]) { vnx::read_value(_buf + _field->offset, value.vdf_reward_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[18]) { vnx::read_value(_buf + _field->offset, value.vdf_segment_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[19]) { vnx::read_value(_buf + _field->offset, value.reward_adjust_div, _field->code.data()); } if(const auto* const _field = type_code->field_map[20]) { vnx::read_value(_buf + _field->offset, value.reward_adjust_tick, _field->code.data()); } if(const auto* const _field = type_code->field_map[21]) { vnx::read_value(_buf + _field->offset, value.reward_adjust_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[22]) { vnx::read_value(_buf + _field->offset, value.target_mmx_gold_price, _field->code.data()); } if(const auto* const _field = type_code->field_map[23]) { vnx::read_value(_buf + _field->offset, value.time_diff_divider, _field->code.data()); } if(const auto* const _field = type_code->field_map[24]) { vnx::read_value(_buf + _field->offset, value.time_diff_constant, _field->code.data()); } if(const auto* const _field = type_code->field_map[25]) { vnx::read_value(_buf + _field->offset, value.space_diff_constant, _field->code.data()); } if(const auto* const _field = type_code->field_map[26]) { vnx::read_value(_buf + _field->offset, value.initial_time_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[27]) { vnx::read_value(_buf + _field->offset, value.initial_space_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[28]) { vnx::read_value(_buf + _field->offset, value.initial_time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[29]) { vnx::read_value(_buf + _field->offset, value.min_txfee, _field->code.data()); } if(const auto* const _field = type_code->field_map[30]) { vnx::read_value(_buf + _field->offset, value.min_txfee_io, _field->code.data()); } if(const auto* const _field = type_code->field_map[31]) { vnx::read_value(_buf + _field->offset, value.min_txfee_sign, _field->code.data()); } if(const auto* const _field = type_code->field_map[32]) { vnx::read_value(_buf + _field->offset, value.min_txfee_memo, _field->code.data()); } if(const auto* const _field = type_code->field_map[33]) { vnx::read_value(_buf + _field->offset, value.min_txfee_exec, _field->code.data()); } if(const auto* const _field = type_code->field_map[34]) { vnx::read_value(_buf + _field->offset, value.min_txfee_deploy, _field->code.data()); } if(const auto* const _field = type_code->field_map[35]) { vnx::read_value(_buf + _field->offset, value.min_txfee_depend, _field->code.data()); } if(const auto* const _field = type_code->field_map[36]) { vnx::read_value(_buf + _field->offset, value.min_txfee_byte, _field->code.data()); } if(const auto* const _field = type_code->field_map[37]) { vnx::read_value(_buf + _field->offset, value.min_txfee_read, _field->code.data()); } if(const auto* const _field = type_code->field_map[38]) { vnx::read_value(_buf + _field->offset, value.min_txfee_read_kbyte, _field->code.data()); } if(const auto* const _field = type_code->field_map[39]) { vnx::read_value(_buf + _field->offset, value.max_block_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[40]) { vnx::read_value(_buf + _field->offset, value.max_block_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[41]) { vnx::read_value(_buf + _field->offset, value.max_tx_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[42]) { vnx::read_value(_buf + _field->offset, value.max_rcall_depth, _field->code.data()); } if(const auto* const _field = type_code->field_map[43]) { vnx::read_value(_buf + _field->offset, value.max_rcall_width, _field->code.data()); } if(const auto* const _field = type_code->field_map[45]) { vnx::read_value(_buf + _field->offset, value.block_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[55]) { vnx::read_value(_buf + _field->offset, value.fixed_project_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[57]) { vnx::read_value(_buf + _field->offset, value.reward_activation, _field->code.data()); } if(const auto* const _field = type_code->field_map[58]) { vnx::read_value(_buf + _field->offset, value.transaction_activation, _field->code.data()); } if(const auto* const _field = type_code->field_map[59]) { vnx::read_value(_buf + _field->offset, value.hardfork1_height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 44: vnx::read(in, value.min_fee_ratio, type_code, _field->code.data()); break; case 46: vnx::read(in, value.network, type_code, _field->code.data()); break; case 47: vnx::read(in, value.nft_binary, type_code, _field->code.data()); break; case 48: vnx::read(in, value.swap_binary, type_code, _field->code.data()); break; case 49: vnx::read(in, value.offer_binary, type_code, _field->code.data()); break; case 50: vnx::read(in, value.token_binary, type_code, _field->code.data()); break; case 51: vnx::read(in, value.plot_nft_binary, type_code, _field->code.data()); break; case 52: vnx::read(in, value.escrow_binary, type_code, _field->code.data()); break; case 53: vnx::read(in, value.time_lock_binary, type_code, _field->code.data()); break; case 54: vnx::read(in, value.relay_binary, type_code, _field->code.data()); break; case 56: vnx::read(in, value.project_ratio, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ChainParams& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ChainParams; out.write_type_code(type_code); vnx::write_class_header<::mmx::ChainParams>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(288); vnx::write_value(_buf + 0, value.port); vnx::write_value(_buf + 4, value.decimals); vnx::write_value(_buf + 8, value.min_ksize); vnx::write_value(_buf + 12, value.max_ksize); vnx::write_value(_buf + 16, value.plot_filter); vnx::write_value(_buf + 20, value.post_filter); vnx::write_value(_buf + 24, value.commit_delay); vnx::write_value(_buf + 28, value.infuse_delay); vnx::write_value(_buf + 32, value.challenge_delay); vnx::write_value(_buf + 36, value.challenge_interval); vnx::write_value(_buf + 40, value.max_diff_adjust); vnx::write_value(_buf + 44, value.max_vdf_count); vnx::write_value(_buf + 48, value.avg_proof_count); vnx::write_value(_buf + 52, value.max_proof_count); vnx::write_value(_buf + 56, value.max_validators); vnx::write_value(_buf + 60, value.min_reward); vnx::write_value(_buf + 68, value.vdf_reward); vnx::write_value(_buf + 76, value.vdf_reward_interval); vnx::write_value(_buf + 80, value.vdf_segment_size); vnx::write_value(_buf + 84, value.reward_adjust_div); vnx::write_value(_buf + 88, value.reward_adjust_tick); vnx::write_value(_buf + 92, value.reward_adjust_interval); vnx::write_value(_buf + 96, value.target_mmx_gold_price); vnx::write_value(_buf + 100, value.time_diff_divider); vnx::write_value(_buf + 108, value.time_diff_constant); vnx::write_value(_buf + 116, value.space_diff_constant); vnx::write_value(_buf + 124, value.initial_time_diff); vnx::write_value(_buf + 132, value.initial_space_diff); vnx::write_value(_buf + 140, value.initial_time_stamp); vnx::write_value(_buf + 148, value.min_txfee); vnx::write_value(_buf + 156, value.min_txfee_io); vnx::write_value(_buf + 164, value.min_txfee_sign); vnx::write_value(_buf + 172, value.min_txfee_memo); vnx::write_value(_buf + 180, value.min_txfee_exec); vnx::write_value(_buf + 188, value.min_txfee_deploy); vnx::write_value(_buf + 196, value.min_txfee_depend); vnx::write_value(_buf + 204, value.min_txfee_byte); vnx::write_value(_buf + 212, value.min_txfee_read); vnx::write_value(_buf + 220, value.min_txfee_read_kbyte); vnx::write_value(_buf + 228, value.max_block_size); vnx::write_value(_buf + 236, value.max_block_cost); vnx::write_value(_buf + 244, value.max_tx_cost); vnx::write_value(_buf + 252, value.max_rcall_depth); vnx::write_value(_buf + 256, value.max_rcall_width); vnx::write_value(_buf + 260, value.block_interval_ms); vnx::write_value(_buf + 268, value.fixed_project_reward); vnx::write_value(_buf + 276, value.reward_activation); vnx::write_value(_buf + 280, value.transaction_activation); vnx::write_value(_buf + 284, value.hardfork1_height); vnx::write(out, value.min_fee_ratio, type_code, type_code->fields[44].code.data()); vnx::write(out, value.network, type_code, type_code->fields[46].code.data()); vnx::write(out, value.nft_binary, type_code, type_code->fields[47].code.data()); vnx::write(out, value.swap_binary, type_code, type_code->fields[48].code.data()); vnx::write(out, value.offer_binary, type_code, type_code->fields[49].code.data()); vnx::write(out, value.token_binary, type_code, type_code->fields[50].code.data()); vnx::write(out, value.plot_nft_binary, type_code, type_code->fields[51].code.data()); vnx::write(out, value.escrow_binary, type_code, type_code->fields[52].code.data()); vnx::write(out, value.time_lock_binary, type_code, type_code->fields[53].code.data()); vnx::write(out, value.relay_binary, type_code, type_code->fields[54].code.data()); vnx::write(out, value.project_ratio, type_code, type_code->fields[56].code.data()); } void read(std::istream& in, ::mmx::ChainParams& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ChainParams& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ChainParams& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Challenge.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Challenge::VNX_TYPE_HASH(0x4bf49f8022405249ull); const vnx::Hash64 Challenge::VNX_CODE_HASH(0xeb1ddd8570e0e195ull); vnx::Hash64 Challenge::get_type_hash() const { return VNX_TYPE_HASH; } std::string Challenge::get_type_name() const { return "mmx.Challenge"; } const vnx::TypeCode* Challenge::get_type_code() const { return mmx::vnx_native_type_code_Challenge; } std::shared_ptr Challenge::create() { return std::make_shared(); } std::shared_ptr Challenge::clone() const { return std::make_shared(*this); } void Challenge::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Challenge::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Challenge::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Challenge; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, difficulty); _visitor.type_end(*_type_code); } void Challenge::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Challenge\""; _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"difficulty\": "; vnx::write(_out, difficulty); _out << "}"; } void Challenge::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Challenge::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Challenge"; _object["vdf_height"] = vdf_height; _object["challenge"] = challenge; _object["difficulty"] = difficulty; return _object; } void Challenge::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "difficulty") { _entry.second.to(difficulty); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant Challenge::get_field(const std::string& _name) const { if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "difficulty") { return vnx::Variant(difficulty); } return vnx::Variant(); } void Challenge::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "difficulty") { _value.to(difficulty); } } /// \private std::ostream& operator<<(std::ostream& _out, const Challenge& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Challenge& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Challenge::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Challenge::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Challenge"; type_code->type_hash = vnx::Hash64(0x4bf49f8022405249ull); type_code->code_hash = vnx::Hash64(0xeb1ddd8570e0e195ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Challenge); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "difficulty"; field.code = {4}; } type_code->build(); return type_code; } std::shared_ptr Challenge::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.difficulty, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.challenge, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Challenge& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Challenge; out.write_type_code(type_code); vnx::write_class_header<::mmx::Challenge>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.difficulty); vnx::write(out, value.challenge, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Challenge& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Challenge& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Challenge& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Contract.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Contract::VNX_TYPE_HASH(0x26b896ae8c415285ull); const vnx::Hash64 Contract::VNX_CODE_HASH(0x2fd731fcdf7b88aull); vnx::Hash64 Contract::get_type_hash() const { return VNX_TYPE_HASH; } std::string Contract::get_type_name() const { return "mmx.Contract"; } const vnx::TypeCode* Contract::get_type_code() const { return mmx::vnx_native_type_code_Contract; } std::shared_ptr Contract::create() { return std::make_shared(); } std::shared_ptr Contract::clone() const { return std::make_shared(*this); } void Contract::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Contract::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Contract::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Contract; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_end(*_type_code); } void Contract::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Contract\""; _out << ", \"version\": "; vnx::write(_out, version); _out << "}"; } void Contract::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Contract::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Contract"; _object["version"] = version; return _object; } void Contract::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Contract::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } return vnx::Variant(); } void Contract::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } } /// \private std::ostream& operator<<(std::ostream& _out, const Contract& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Contract& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Contract::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Contract::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Contract"; type_code->type_hash = vnx::Hash64(0x26b896ae8c415285ull); type_code->code_hash = vnx::Hash64(0x2fd731fcdf7b88aull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Contract); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } type_code->build(); return type_code; } std::shared_ptr Contract::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Contract& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Contract; out.write_type_code(type_code); vnx::write_class_header<::mmx::Contract>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); } void read(std::istream& in, ::mmx::Contract& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Contract& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Contract& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/FarmInfo.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 FarmInfo::VNX_TYPE_HASH(0xa2701372b9137f0eull); const vnx::Hash64 FarmInfo::VNX_CODE_HASH(0xd67b28eb2cb51c62ull); vnx::Hash64 FarmInfo::get_type_hash() const { return VNX_TYPE_HASH; } std::string FarmInfo::get_type_name() const { return "mmx.FarmInfo"; } const vnx::TypeCode* FarmInfo::get_type_code() const { return mmx::vnx_native_type_code_FarmInfo; } std::shared_ptr FarmInfo::create() { return std::make_shared(); } std::shared_ptr FarmInfo::clone() const { return std::make_shared(*this); } void FarmInfo::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void FarmInfo::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void FarmInfo::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_FarmInfo; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, plot_dirs); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, plot_count); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, harvester_bytes); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, pool_info); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, pool_stats); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, total_bytes); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, total_bytes_effective); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, total_balance); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, harvester); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, harvester_id); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, reward_addr); _visitor.type_end(*_type_code); } void FarmInfo::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.FarmInfo\""; _out << ", \"plot_dirs\": "; vnx::write(_out, plot_dirs); _out << ", \"plot_count\": "; vnx::write(_out, plot_count); _out << ", \"harvester_bytes\": "; vnx::write(_out, harvester_bytes); _out << ", \"pool_info\": "; vnx::write(_out, pool_info); _out << ", \"pool_stats\": "; vnx::write(_out, pool_stats); _out << ", \"total_bytes\": "; vnx::write(_out, total_bytes); _out << ", \"total_bytes_effective\": "; vnx::write(_out, total_bytes_effective); _out << ", \"total_balance\": "; vnx::write(_out, total_balance); _out << ", \"harvester\": "; vnx::write(_out, harvester); _out << ", \"harvester_id\": "; vnx::write(_out, harvester_id); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << "}"; } void FarmInfo::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object FarmInfo::to_object() const { vnx::Object _object; _object["__type"] = "mmx.FarmInfo"; _object["plot_dirs"] = plot_dirs; _object["plot_count"] = plot_count; _object["harvester_bytes"] = harvester_bytes; _object["pool_info"] = pool_info; _object["pool_stats"] = pool_stats; _object["total_bytes"] = total_bytes; _object["total_bytes_effective"] = total_bytes_effective; _object["total_balance"] = total_balance; _object["harvester"] = harvester; _object["harvester_id"] = harvester_id; _object["reward_addr"] = reward_addr; return _object; } void FarmInfo::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "harvester") { _entry.second.to(harvester); } else if(_entry.first == "harvester_bytes") { _entry.second.to(harvester_bytes); } else if(_entry.first == "harvester_id") { _entry.second.to(harvester_id); } else if(_entry.first == "plot_count") { _entry.second.to(plot_count); } else if(_entry.first == "plot_dirs") { _entry.second.to(plot_dirs); } else if(_entry.first == "pool_info") { _entry.second.to(pool_info); } else if(_entry.first == "pool_stats") { _entry.second.to(pool_stats); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "total_balance") { _entry.second.to(total_balance); } else if(_entry.first == "total_bytes") { _entry.second.to(total_bytes); } else if(_entry.first == "total_bytes_effective") { _entry.second.to(total_bytes_effective); } } } vnx::Variant FarmInfo::get_field(const std::string& _name) const { if(_name == "plot_dirs") { return vnx::Variant(plot_dirs); } if(_name == "plot_count") { return vnx::Variant(plot_count); } if(_name == "harvester_bytes") { return vnx::Variant(harvester_bytes); } if(_name == "pool_info") { return vnx::Variant(pool_info); } if(_name == "pool_stats") { return vnx::Variant(pool_stats); } if(_name == "total_bytes") { return vnx::Variant(total_bytes); } if(_name == "total_bytes_effective") { return vnx::Variant(total_bytes_effective); } if(_name == "total_balance") { return vnx::Variant(total_balance); } if(_name == "harvester") { return vnx::Variant(harvester); } if(_name == "harvester_id") { return vnx::Variant(harvester_id); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } return vnx::Variant(); } void FarmInfo::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "plot_dirs") { _value.to(plot_dirs); } else if(_name == "plot_count") { _value.to(plot_count); } else if(_name == "harvester_bytes") { _value.to(harvester_bytes); } else if(_name == "pool_info") { _value.to(pool_info); } else if(_name == "pool_stats") { _value.to(pool_stats); } else if(_name == "total_bytes") { _value.to(total_bytes); } else if(_name == "total_bytes_effective") { _value.to(total_bytes_effective); } else if(_name == "total_balance") { _value.to(total_balance); } else if(_name == "harvester") { _value.to(harvester); } else if(_name == "harvester_id") { _value.to(harvester_id); } else if(_name == "reward_addr") { _value.to(reward_addr); } } /// \private std::ostream& operator<<(std::ostream& _out, const FarmInfo& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, FarmInfo& _value) { _value.read(_in); return _in; } const vnx::TypeCode* FarmInfo::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr FarmInfo::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.FarmInfo"; type_code->type_hash = vnx::Hash64(0xa2701372b9137f0eull); type_code->code_hash = vnx::Hash64(0xd67b28eb2cb51c62ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::FarmInfo); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(2); type_code->depends[0] = ::mmx::pooling_info_t::static_get_type_code(); type_code->depends[1] = ::mmx::pooling_stats_t::static_get_type_code(); type_code->fields.resize(11); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "plot_dirs"; field.code = {12, 32}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "plot_count"; field.code = {13, 3, 1, 3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "harvester_bytes"; field.code = {13, 3, 32, 23, 2, 4, 5, 4, 4}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "pool_info"; field.code = {13, 5, 11, 32, 1, 19, 0}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "pool_stats"; field.code = {13, 5, 11, 32, 1, 19, 1}; } { auto& field = type_code->fields[5]; field.data_size = 8; field.name = "total_bytes"; field.code = {4}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "total_bytes_effective"; field.code = {4}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "total_balance"; field.code = {4}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "harvester"; field.code = {33, 32}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "harvester_id"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "reward_addr"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr FarmInfo::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.total_bytes, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.total_bytes_effective, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.total_balance, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.plot_dirs, type_code, _field->code.data()); break; case 1: vnx::read(in, value.plot_count, type_code, _field->code.data()); break; case 2: vnx::read(in, value.harvester_bytes, type_code, _field->code.data()); break; case 3: vnx::read(in, value.pool_info, type_code, _field->code.data()); break; case 4: vnx::read(in, value.pool_stats, type_code, _field->code.data()); break; case 8: vnx::read(in, value.harvester, type_code, _field->code.data()); break; case 9: vnx::read(in, value.harvester_id, type_code, _field->code.data()); break; case 10: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::FarmInfo& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_FarmInfo; out.write_type_code(type_code); vnx::write_class_header<::mmx::FarmInfo>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(24); vnx::write_value(_buf + 0, value.total_bytes); vnx::write_value(_buf + 8, value.total_bytes_effective); vnx::write_value(_buf + 16, value.total_balance); vnx::write(out, value.plot_dirs, type_code, type_code->fields[0].code.data()); vnx::write(out, value.plot_count, type_code, type_code->fields[1].code.data()); vnx::write(out, value.harvester_bytes, type_code, type_code->fields[2].code.data()); vnx::write(out, value.pool_info, type_code, type_code->fields[3].code.data()); vnx::write(out, value.pool_stats, type_code, type_code->fields[4].code.data()); vnx::write(out, value.harvester, type_code, type_code->fields[8].code.data()); vnx::write(out, value.harvester_id, type_code, type_code->fields[9].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[10].code.data()); } void read(std::istream& in, ::mmx::FarmInfo& value) { value.read(in); } void write(std::ostream& out, const ::mmx::FarmInfo& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::FarmInfo& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/FarmerAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { FarmerAsyncClient::FarmerAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } FarmerAsyncClient::FarmerAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t FarmerAsyncClient::get_mac_addr(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_get_mac_addr::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_get_mac_addr[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::get_partial_diff(const ::mmx::addr_t& plot_nft, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_get_partial_diff::create(); _method->plot_nft = plot_nft; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_get_partial_diff[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::get_partial_diffs(const std::vector<::mmx::addr_t>& plot_nfts, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_get_partial_diffs::create(); _method->plot_nfts = plot_nfts; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_get_partial_diffs[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::get_farmer_keys(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_get_farmer_keys::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_get_farmer_keys[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::get_farm_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_get_farm_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_get_farm_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::sign_block(std::shared_ptr block, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_sign_block::create(); _method->block = block; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_sign_block[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::sign_vote(std::shared_ptr vote, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Farmer_sign_vote::create(); _method->vote = vote; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_sign_vote[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 12; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 13; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 14; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t FarmerAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 15; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t FarmerAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_get_mac_addr.find(_request_id); if(_iter != vnx_queue_get_mac_addr.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_mac_addr.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_get_partial_diff.find(_request_id); if(_iter != vnx_queue_get_partial_diff.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_partial_diff.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_get_partial_diffs.find(_request_id); if(_iter != vnx_queue_get_partial_diffs.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_partial_diffs.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_get_farmer_keys.find(_request_id); if(_iter != vnx_queue_get_farmer_keys.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_get_farm_info.find(_request_id); if(_iter != vnx_queue_get_farm_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farm_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_sign_block.find(_request_id); if(_iter != vnx_queue_sign_block.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_sign_block.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_sign_vote.find(_request_id); if(_iter != vnx_queue_sign_vote.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_sign_vote.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 12: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 13: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 14: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 15: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t FarmerAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("FarmerAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_get_mac_addr.find(_request_id); if(_iter == vnx_queue_get_mac_addr.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_mac_addr.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Hash64>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 1: { const auto _iter = vnx_queue_get_partial_diff.find(_request_id); if(_iter == vnx_queue_get_partial_diff.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_partial_diff.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_get_partial_diffs.find(_request_id); if(_iter == vnx_queue_get_partial_diffs.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_partial_diffs.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_get_farmer_keys.find(_request_id); if(_iter == vnx_queue_get_farmer_keys.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_get_farm_info.find(_request_id); if(_iter == vnx_queue_get_farm_info.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farm_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_sign_block.find(_request_id); if(_iter == vnx_queue_sign_block.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_sign_block.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_sign_vote.find(_request_id); if(_iter == vnx_queue_sign_vote.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_sign_vote.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::signature_t>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 9: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 10: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 11: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 12: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } case 13: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 14: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 15: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("FarmerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("FarmerAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("FarmerAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/FarmerBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 FarmerBase::VNX_TYPE_HASH(0xff732ba14d9d1abull); const vnx::Hash64 FarmerBase::VNX_CODE_HASH(0x4183adfd55745a8dull); FarmerBase::FarmerBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".input_info", input_info); vnx::read_config(vnx_name + ".input_proofs", input_proofs); vnx::read_config(vnx_name + ".input_partials", input_partials); vnx::read_config(vnx_name + ".output_proofs", output_proofs); vnx::read_config(vnx_name + ".output_partials", output_partials); vnx::read_config(vnx_name + ".harvester_timeout", harvester_timeout); vnx::read_config(vnx_name + ".difficulty_interval", difficulty_interval); vnx::read_config(vnx_name + ".node_server", node_server); vnx::read_config(vnx_name + ".wallet_server", wallet_server); vnx::read_config(vnx_name + ".reward_addr", reward_addr); vnx::read_config(vnx_name + ".partial_diff", partial_diff); vnx::read_config(vnx_name + ".payout_threshold", payout_threshold); } vnx::Hash64 FarmerBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string FarmerBase::get_type_name() const { return "mmx.Farmer"; } const vnx::TypeCode* FarmerBase::get_type_code() const { return mmx::vnx_native_type_code_FarmerBase; } void FarmerBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_FarmerBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, input_info); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, input_proofs); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, input_partials); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, output_proofs); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, output_partials); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, harvester_timeout); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, difficulty_interval); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, node_server); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, wallet_server); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, reward_addr); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, partial_diff); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, payout_threshold); _visitor.type_end(*_type_code); } void FarmerBase::write(std::ostream& _out) const { _out << "{"; _out << "\"input_info\": "; vnx::write(_out, input_info); _out << ", \"input_proofs\": "; vnx::write(_out, input_proofs); _out << ", \"input_partials\": "; vnx::write(_out, input_partials); _out << ", \"output_proofs\": "; vnx::write(_out, output_proofs); _out << ", \"output_partials\": "; vnx::write(_out, output_partials); _out << ", \"harvester_timeout\": "; vnx::write(_out, harvester_timeout); _out << ", \"difficulty_interval\": "; vnx::write(_out, difficulty_interval); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << ", \"wallet_server\": "; vnx::write(_out, wallet_server); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << ", \"partial_diff\": "; vnx::write(_out, partial_diff); _out << ", \"payout_threshold\": "; vnx::write(_out, payout_threshold); _out << "}"; } void FarmerBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object FarmerBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer"; _object["input_info"] = input_info; _object["input_proofs"] = input_proofs; _object["input_partials"] = input_partials; _object["output_proofs"] = output_proofs; _object["output_partials"] = output_partials; _object["harvester_timeout"] = harvester_timeout; _object["difficulty_interval"] = difficulty_interval; _object["node_server"] = node_server; _object["wallet_server"] = wallet_server; _object["reward_addr"] = reward_addr; _object["partial_diff"] = partial_diff; _object["payout_threshold"] = payout_threshold; return _object; } void FarmerBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "difficulty_interval") { _entry.second.to(difficulty_interval); } else if(_entry.first == "harvester_timeout") { _entry.second.to(harvester_timeout); } else if(_entry.first == "input_info") { _entry.second.to(input_info); } else if(_entry.first == "input_partials") { _entry.second.to(input_partials); } else if(_entry.first == "input_proofs") { _entry.second.to(input_proofs); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "output_partials") { _entry.second.to(output_partials); } else if(_entry.first == "output_proofs") { _entry.second.to(output_proofs); } else if(_entry.first == "partial_diff") { _entry.second.to(partial_diff); } else if(_entry.first == "payout_threshold") { _entry.second.to(payout_threshold); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "wallet_server") { _entry.second.to(wallet_server); } } } vnx::Variant FarmerBase::get_field(const std::string& _name) const { if(_name == "input_info") { return vnx::Variant(input_info); } if(_name == "input_proofs") { return vnx::Variant(input_proofs); } if(_name == "input_partials") { return vnx::Variant(input_partials); } if(_name == "output_proofs") { return vnx::Variant(output_proofs); } if(_name == "output_partials") { return vnx::Variant(output_partials); } if(_name == "harvester_timeout") { return vnx::Variant(harvester_timeout); } if(_name == "difficulty_interval") { return vnx::Variant(difficulty_interval); } if(_name == "node_server") { return vnx::Variant(node_server); } if(_name == "wallet_server") { return vnx::Variant(wallet_server); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } if(_name == "partial_diff") { return vnx::Variant(partial_diff); } if(_name == "payout_threshold") { return vnx::Variant(payout_threshold); } return vnx::Variant(); } void FarmerBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "input_info") { _value.to(input_info); } else if(_name == "input_proofs") { _value.to(input_proofs); } else if(_name == "input_partials") { _value.to(input_partials); } else if(_name == "output_proofs") { _value.to(output_proofs); } else if(_name == "output_partials") { _value.to(output_partials); } else if(_name == "harvester_timeout") { _value.to(harvester_timeout); } else if(_name == "difficulty_interval") { _value.to(difficulty_interval); } else if(_name == "node_server") { _value.to(node_server); } else if(_name == "wallet_server") { _value.to(wallet_server); } else if(_name == "reward_addr") { _value.to(reward_addr); } else if(_name == "partial_diff") { _value.to(partial_diff); } else if(_name == "payout_threshold") { _value.to(payout_threshold); } } /// \private std::ostream& operator<<(std::ostream& _out, const FarmerBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, FarmerBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* FarmerBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr FarmerBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer"; type_code->type_hash = vnx::Hash64(0xff732ba14d9d1abull); type_code->code_hash = vnx::Hash64(0x4183adfd55745a8dull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::FarmerBase); type_code->methods.resize(16); type_code->methods[0] = ::mmx::Farmer_get_farm_info::static_get_type_code(); type_code->methods[1] = ::mmx::Farmer_get_farmer_keys::static_get_type_code(); type_code->methods[2] = ::mmx::Farmer_get_mac_addr::static_get_type_code(); type_code->methods[3] = ::mmx::Farmer_get_partial_diff::static_get_type_code(); type_code->methods[4] = ::mmx::Farmer_get_partial_diffs::static_get_type_code(); type_code->methods[5] = ::mmx::Farmer_sign_block::static_get_type_code(); type_code->methods[6] = ::mmx::Farmer_sign_vote::static_get_type_code(); type_code->methods[7] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[8] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[9] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[10] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[11] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[12] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[13] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[14] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[15] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->fields.resize(12); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "input_info"; field.value = vnx::to_string("harvester.info"); field.code = {12, 5}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "input_proofs"; field.value = vnx::to_string("harvester.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "input_partials"; field.value = vnx::to_string("harvester.partials"); field.code = {12, 5}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "output_proofs"; field.value = vnx::to_string("farmer.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "output_partials"; field.value = vnx::to_string("farmer.partials"); field.code = {12, 5}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "harvester_timeout"; field.value = vnx::to_string(60); field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "difficulty_interval"; field.value = vnx::to_string(300); field.code = {3}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "wallet_server"; field.value = vnx::to_string("Wallet"); field.code = {32}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "reward_addr"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "partial_diff"; field.code = {33, 4}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "payout_threshold"; field.code = {33, 4}; } type_code->build(); return type_code; } void FarmerBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0xa2701372b9137f0eull: handle(std::static_pointer_cast(_value)); return; case 0x2c849b13a7efd71aull: handle(std::static_pointer_cast(_value)); return; case 0x816e898b36befae0ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr FarmerBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x7e72655f6f215b5aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_get_farm_info_return::create(); _return_value->_ret_0 = get_farm_info(); return _return_value; } case 0x784507b4594a776aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_get_farmer_keys_return::create(); _return_value->_ret_0 = get_farmer_keys(); return _return_value; } case 0xe9ced9f6feb676b3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_get_mac_addr_return::create(); _return_value->_ret_0 = get_mac_addr(); return _return_value; } case 0x40f08b90e2eb4ca0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_get_partial_diff_return::create(); _return_value->_ret_0 = get_partial_diff(_args->plot_nft); return _return_value; } case 0x8806f6763215c58bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_get_partial_diffs_return::create(); _return_value->_ret_0 = get_partial_diffs(_args->plot_nfts); return _return_value; } case 0x6924b10f345eb316ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_sign_block_return::create(); _return_value->_ret_0 = sign_block(_args->block); return _return_value; } case 0x655117e05d64b5fcull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Farmer_sign_vote_return::create(); _return_value->_ret_0 = sign_vote(_args->vote); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.harvester_timeout, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.difficulty_interval, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.input_info, type_code, _field->code.data()); break; case 1: vnx::read(in, value.input_proofs, type_code, _field->code.data()); break; case 2: vnx::read(in, value.input_partials, type_code, _field->code.data()); break; case 3: vnx::read(in, value.output_proofs, type_code, _field->code.data()); break; case 4: vnx::read(in, value.output_partials, type_code, _field->code.data()); break; case 7: vnx::read(in, value.node_server, type_code, _field->code.data()); break; case 8: vnx::read(in, value.wallet_server, type_code, _field->code.data()); break; case 9: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; case 10: vnx::read(in, value.partial_diff, type_code, _field->code.data()); break; case 11: vnx::read(in, value.payout_threshold, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::FarmerBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_FarmerBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::FarmerBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.harvester_timeout); vnx::write_value(_buf + 4, value.difficulty_interval); vnx::write(out, value.input_info, type_code, type_code->fields[0].code.data()); vnx::write(out, value.input_proofs, type_code, type_code->fields[1].code.data()); vnx::write(out, value.input_partials, type_code, type_code->fields[2].code.data()); vnx::write(out, value.output_proofs, type_code, type_code->fields[3].code.data()); vnx::write(out, value.output_partials, type_code, type_code->fields[4].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[7].code.data()); vnx::write(out, value.wallet_server, type_code, type_code->fields[8].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[9].code.data()); vnx::write(out, value.partial_diff, type_code, type_code->fields[10].code.data()); vnx::write(out, value.payout_threshold, type_code, type_code->fields[11].code.data()); } void read(std::istream& in, ::mmx::FarmerBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::FarmerBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::FarmerBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/FarmerClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { FarmerClient::FarmerClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } FarmerClient::FarmerClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } ::vnx::Hash64 FarmerClient::get_mac_addr() { auto _method = ::mmx::Farmer_get_mac_addr::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Hash64>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } uint64_t FarmerClient::get_partial_diff(const ::mmx::addr_t& plot_nft) { auto _method = ::mmx::Farmer_get_partial_diff::create(); _method->plot_nft = plot_nft; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } std::map<::mmx::addr_t, uint64_t> FarmerClient::get_partial_diffs(const std::vector<::mmx::addr_t>& plot_nfts) { auto _method = ::mmx::Farmer_get_partial_diffs::create(); _method->plot_nfts = plot_nfts; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } std::vector<::mmx::pubkey_t> FarmerClient::get_farmer_keys() { auto _method = ::mmx::Farmer_get_farmer_keys::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } std::shared_ptr FarmerClient::get_farm_info() { auto _method = ::mmx::Farmer_get_farm_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } std::shared_ptr FarmerClient::sign_block(std::shared_ptr block) { auto _method = ::mmx::Farmer_sign_block::create(); _method->block = block; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } ::mmx::signature_t FarmerClient::sign_vote(std::shared_ptr vote) { auto _method = ::mmx::Farmer_sign_vote::create(); _method->vote = vote; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::signature_t>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } ::vnx::Object FarmerClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } ::vnx::Variant FarmerClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } void FarmerClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void FarmerClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void FarmerClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void FarmerClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode FarmerClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } std::shared_ptr FarmerClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } void FarmerClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void FarmerClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void FarmerClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void FarmerClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t FarmerClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("FarmerClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/Farmer_get_farm_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_farm_info::VNX_TYPE_HASH(0x7e72655f6f215b5aull); const vnx::Hash64 Farmer_get_farm_info::VNX_CODE_HASH(0xc9fddb65815daabcull); vnx::Hash64 Farmer_get_farm_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_farm_info::get_type_name() const { return "mmx.Farmer.get_farm_info"; } const vnx::TypeCode* Farmer_get_farm_info::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_farm_info; } std::shared_ptr Farmer_get_farm_info::create() { return std::make_shared(); } std::shared_ptr Farmer_get_farm_info::clone() const { return std::make_shared(*this); } void Farmer_get_farm_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_farm_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_farm_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_farm_info; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Farmer_get_farm_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_farm_info\""; _out << "}"; } void Farmer_get_farm_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_farm_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_farm_info"; return _object; } void Farmer_get_farm_info::from_object(const vnx::Object& _object) { } vnx::Variant Farmer_get_farm_info::get_field(const std::string& _name) const { return vnx::Variant(); } void Farmer_get_farm_info::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_farm_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_farm_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_farm_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_farm_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_farm_info"; type_code->type_hash = vnx::Hash64(0x7e72655f6f215b5aull); type_code->code_hash = vnx::Hash64(0xc9fddb65815daabcull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_get_farm_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_get_farm_info_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_farm_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_farm_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Farmer_get_farm_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_farm_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_farm_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_farm_info_return::VNX_TYPE_HASH(0xccf47453b394d3e3ull); const vnx::Hash64 Farmer_get_farm_info_return::VNX_CODE_HASH(0xa46178ce418c5d0full); vnx::Hash64 Farmer_get_farm_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_farm_info_return::get_type_name() const { return "mmx.Farmer.get_farm_info.return"; } const vnx::TypeCode* Farmer_get_farm_info_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_farm_info_return; } std::shared_ptr Farmer_get_farm_info_return::create() { return std::make_shared(); } std::shared_ptr Farmer_get_farm_info_return::clone() const { return std::make_shared(*this); } void Farmer_get_farm_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_farm_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_farm_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_farm_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_get_farm_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_farm_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_get_farm_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_farm_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_farm_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_get_farm_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_get_farm_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_get_farm_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_farm_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_farm_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_farm_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_farm_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_farm_info.return"; type_code->type_hash = vnx::Hash64(0xccf47453b394d3e3ull); type_code->code_hash = vnx::Hash64(0xa46178ce418c5d0full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_get_farm_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_farm_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_farm_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_farm_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_farm_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farm_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_farmer_keys.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_farmer_keys::VNX_TYPE_HASH(0x784507b4594a776aull); const vnx::Hash64 Farmer_get_farmer_keys::VNX_CODE_HASH(0xf4ff08aa4b1da8afull); vnx::Hash64 Farmer_get_farmer_keys::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_farmer_keys::get_type_name() const { return "mmx.Farmer.get_farmer_keys"; } const vnx::TypeCode* Farmer_get_farmer_keys::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_farmer_keys; } std::shared_ptr Farmer_get_farmer_keys::create() { return std::make_shared(); } std::shared_ptr Farmer_get_farmer_keys::clone() const { return std::make_shared(*this); } void Farmer_get_farmer_keys::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_farmer_keys::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_farmer_keys::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_farmer_keys; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Farmer_get_farmer_keys::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_farmer_keys\""; _out << "}"; } void Farmer_get_farmer_keys::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_farmer_keys::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_farmer_keys"; return _object; } void Farmer_get_farmer_keys::from_object(const vnx::Object& _object) { } vnx::Variant Farmer_get_farmer_keys::get_field(const std::string& _name) const { return vnx::Variant(); } void Farmer_get_farmer_keys::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_farmer_keys& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_farmer_keys& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_farmer_keys::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_farmer_keys::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_farmer_keys"; type_code->type_hash = vnx::Hash64(0x784507b4594a776aull); type_code->code_hash = vnx::Hash64(0xf4ff08aa4b1da8afull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_get_farmer_keys); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_get_farmer_keys_return::static_get_type_code(); type_code->permission = "mmx.permission_e.REMOTE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_farmer_keys; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_farmer_keys>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Farmer_get_farmer_keys& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_farmer_keys_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_farmer_keys_return::VNX_TYPE_HASH(0xdb382c476694095full); const vnx::Hash64 Farmer_get_farmer_keys_return::VNX_CODE_HASH(0x1a7e307cac6ebf2eull); vnx::Hash64 Farmer_get_farmer_keys_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_farmer_keys_return::get_type_name() const { return "mmx.Farmer.get_farmer_keys.return"; } const vnx::TypeCode* Farmer_get_farmer_keys_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_farmer_keys_return; } std::shared_ptr Farmer_get_farmer_keys_return::create() { return std::make_shared(); } std::shared_ptr Farmer_get_farmer_keys_return::clone() const { return std::make_shared(*this); } void Farmer_get_farmer_keys_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_farmer_keys_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_farmer_keys_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_farmer_keys_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_get_farmer_keys_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_farmer_keys.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_get_farmer_keys_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_farmer_keys_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_farmer_keys.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_get_farmer_keys_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_get_farmer_keys_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_get_farmer_keys_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_farmer_keys_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_farmer_keys_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_farmer_keys_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_farmer_keys_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_farmer_keys.return"; type_code->type_hash = vnx::Hash64(0xdb382c476694095full); type_code->code_hash = vnx::Hash64(0x1a7e307cac6ebf2eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_get_farmer_keys_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 33, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_farmer_keys_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_farmer_keys_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_farmer_keys_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_farmer_keys_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_farmer_keys_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_mac_addr.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_mac_addr::VNX_TYPE_HASH(0xe9ced9f6feb676b3ull); const vnx::Hash64 Farmer_get_mac_addr::VNX_CODE_HASH(0xe3c688375d36cbbaull); vnx::Hash64 Farmer_get_mac_addr::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_mac_addr::get_type_name() const { return "mmx.Farmer.get_mac_addr"; } const vnx::TypeCode* Farmer_get_mac_addr::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_mac_addr; } std::shared_ptr Farmer_get_mac_addr::create() { return std::make_shared(); } std::shared_ptr Farmer_get_mac_addr::clone() const { return std::make_shared(*this); } void Farmer_get_mac_addr::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_mac_addr::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_mac_addr::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_mac_addr; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Farmer_get_mac_addr::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_mac_addr\""; _out << "}"; } void Farmer_get_mac_addr::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_mac_addr::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_mac_addr"; return _object; } void Farmer_get_mac_addr::from_object(const vnx::Object& _object) { } vnx::Variant Farmer_get_mac_addr::get_field(const std::string& _name) const { return vnx::Variant(); } void Farmer_get_mac_addr::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_mac_addr& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_mac_addr& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_mac_addr::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_mac_addr::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_mac_addr"; type_code->type_hash = vnx::Hash64(0xe9ced9f6feb676b3ull); type_code->code_hash = vnx::Hash64(0xe3c688375d36cbbaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_get_mac_addr); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_get_mac_addr_return::static_get_type_code(); type_code->permission = "mmx.permission_e.REMOTE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_mac_addr; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_mac_addr>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Farmer_get_mac_addr& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_mac_addr_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_mac_addr_return::VNX_TYPE_HASH(0x9e4caad2ffaba990ull); const vnx::Hash64 Farmer_get_mac_addr_return::VNX_CODE_HASH(0x9f2ca199df5167e6ull); vnx::Hash64 Farmer_get_mac_addr_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_mac_addr_return::get_type_name() const { return "mmx.Farmer.get_mac_addr.return"; } const vnx::TypeCode* Farmer_get_mac_addr_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_mac_addr_return; } std::shared_ptr Farmer_get_mac_addr_return::create() { return std::make_shared(); } std::shared_ptr Farmer_get_mac_addr_return::clone() const { return std::make_shared(*this); } void Farmer_get_mac_addr_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_mac_addr_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_mac_addr_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_mac_addr_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_get_mac_addr_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_mac_addr.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_get_mac_addr_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_mac_addr_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_mac_addr.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_get_mac_addr_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_get_mac_addr_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_get_mac_addr_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_mac_addr_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_mac_addr_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_mac_addr_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_mac_addr_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_mac_addr.return"; type_code->type_hash = vnx::Hash64(0x9e4caad2ffaba990ull); type_code->code_hash = vnx::Hash64(0x9f2ca199df5167e6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_get_mac_addr_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_mac_addr_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_mac_addr_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_mac_addr_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_mac_addr_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_mac_addr_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_mac_addr_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_partial_diff.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_partial_diff::VNX_TYPE_HASH(0x40f08b90e2eb4ca0ull); const vnx::Hash64 Farmer_get_partial_diff::VNX_CODE_HASH(0xd015e85ad9f093aaull); vnx::Hash64 Farmer_get_partial_diff::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_partial_diff::get_type_name() const { return "mmx.Farmer.get_partial_diff"; } const vnx::TypeCode* Farmer_get_partial_diff::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_partial_diff; } std::shared_ptr Farmer_get_partial_diff::create() { return std::make_shared(); } std::shared_ptr Farmer_get_partial_diff::clone() const { return std::make_shared(*this); } void Farmer_get_partial_diff::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_partial_diff::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_partial_diff::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_partial_diff; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, plot_nft); _visitor.type_end(*_type_code); } void Farmer_get_partial_diff::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_partial_diff\""; _out << ", \"plot_nft\": "; vnx::write(_out, plot_nft); _out << "}"; } void Farmer_get_partial_diff::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_partial_diff::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_partial_diff"; _object["plot_nft"] = plot_nft; return _object; } void Farmer_get_partial_diff::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "plot_nft") { _entry.second.to(plot_nft); } } } vnx::Variant Farmer_get_partial_diff::get_field(const std::string& _name) const { if(_name == "plot_nft") { return vnx::Variant(plot_nft); } return vnx::Variant(); } void Farmer_get_partial_diff::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "plot_nft") { _value.to(plot_nft); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diff& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_partial_diff& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_partial_diff::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_partial_diff::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_partial_diff"; type_code->type_hash = vnx::Hash64(0x40f08b90e2eb4ca0ull); type_code->code_hash = vnx::Hash64(0xd015e85ad9f093aaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_get_partial_diff); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_get_partial_diff_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "plot_nft"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.REMOTE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.plot_nft, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_partial_diff; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_partial_diff>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.plot_nft, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_partial_diff& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_partial_diff_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_partial_diff_return::VNX_TYPE_HASH(0xd5650a69bbe8d978ull); const vnx::Hash64 Farmer_get_partial_diff_return::VNX_CODE_HASH(0xda8258450a2c6f6full); vnx::Hash64 Farmer_get_partial_diff_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_partial_diff_return::get_type_name() const { return "mmx.Farmer.get_partial_diff.return"; } const vnx::TypeCode* Farmer_get_partial_diff_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_partial_diff_return; } std::shared_ptr Farmer_get_partial_diff_return::create() { return std::make_shared(); } std::shared_ptr Farmer_get_partial_diff_return::clone() const { return std::make_shared(*this); } void Farmer_get_partial_diff_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_partial_diff_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_partial_diff_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_partial_diff_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_get_partial_diff_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_partial_diff.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_get_partial_diff_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_partial_diff_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_partial_diff.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_get_partial_diff_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_get_partial_diff_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_get_partial_diff_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diff_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_partial_diff_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_partial_diff_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_partial_diff_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_partial_diff.return"; type_code->type_hash = vnx::Hash64(0xd5650a69bbe8d978ull); type_code->code_hash = vnx::Hash64(0xda8258450a2c6f6full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_get_partial_diff_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "_ret_0"; field.code = {4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diff_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_partial_diff_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_partial_diff_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Farmer_get_partial_diff_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diff_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diff_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_partial_diffs.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_partial_diffs::VNX_TYPE_HASH(0x8806f6763215c58bull); const vnx::Hash64 Farmer_get_partial_diffs::VNX_CODE_HASH(0xeff9197ef3d645f9ull); vnx::Hash64 Farmer_get_partial_diffs::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_partial_diffs::get_type_name() const { return "mmx.Farmer.get_partial_diffs"; } const vnx::TypeCode* Farmer_get_partial_diffs::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_partial_diffs; } std::shared_ptr Farmer_get_partial_diffs::create() { return std::make_shared(); } std::shared_ptr Farmer_get_partial_diffs::clone() const { return std::make_shared(*this); } void Farmer_get_partial_diffs::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_partial_diffs::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_partial_diffs::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_partial_diffs; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, plot_nfts); _visitor.type_end(*_type_code); } void Farmer_get_partial_diffs::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_partial_diffs\""; _out << ", \"plot_nfts\": "; vnx::write(_out, plot_nfts); _out << "}"; } void Farmer_get_partial_diffs::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_partial_diffs::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_partial_diffs"; _object["plot_nfts"] = plot_nfts; return _object; } void Farmer_get_partial_diffs::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "plot_nfts") { _entry.second.to(plot_nfts); } } } vnx::Variant Farmer_get_partial_diffs::get_field(const std::string& _name) const { if(_name == "plot_nfts") { return vnx::Variant(plot_nfts); } return vnx::Variant(); } void Farmer_get_partial_diffs::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "plot_nfts") { _value.to(plot_nfts); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diffs& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_partial_diffs& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_partial_diffs::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_partial_diffs::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_partial_diffs"; type_code->type_hash = vnx::Hash64(0x8806f6763215c58bull); type_code->code_hash = vnx::Hash64(0xeff9197ef3d645f9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_get_partial_diffs); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_get_partial_diffs_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "plot_nfts"; field.code = {12, 11, 32, 1}; } type_code->permission = "mmx.permission_e.REMOTE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.plot_nfts, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_partial_diffs; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_partial_diffs>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.plot_nfts, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_partial_diffs& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_get_partial_diffs_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_get_partial_diffs_return::VNX_TYPE_HASH(0x439549fd31330df6ull); const vnx::Hash64 Farmer_get_partial_diffs_return::VNX_CODE_HASH(0x4263fa634163becdull); vnx::Hash64 Farmer_get_partial_diffs_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_get_partial_diffs_return::get_type_name() const { return "mmx.Farmer.get_partial_diffs.return"; } const vnx::TypeCode* Farmer_get_partial_diffs_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_get_partial_diffs_return; } std::shared_ptr Farmer_get_partial_diffs_return::create() { return std::make_shared(); } std::shared_ptr Farmer_get_partial_diffs_return::clone() const { return std::make_shared(*this); } void Farmer_get_partial_diffs_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_get_partial_diffs_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_get_partial_diffs_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_get_partial_diffs_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_get_partial_diffs_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.get_partial_diffs.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_get_partial_diffs_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_get_partial_diffs_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.get_partial_diffs.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_get_partial_diffs_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_get_partial_diffs_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_get_partial_diffs_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_get_partial_diffs_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_get_partial_diffs_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_get_partial_diffs_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_get_partial_diffs_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.get_partial_diffs.return"; type_code->type_hash = vnx::Hash64(0x439549fd31330df6ull); type_code->code_hash = vnx::Hash64(0x4263fa634163becdull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_get_partial_diffs_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_get_partial_diffs_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_get_partial_diffs_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_get_partial_diffs_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_get_partial_diffs_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_get_partial_diffs_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_get_partial_diffs_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_sign_block.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_sign_block::VNX_TYPE_HASH(0x6924b10f345eb316ull); const vnx::Hash64 Farmer_sign_block::VNX_CODE_HASH(0xd84096d5d18122aaull); vnx::Hash64 Farmer_sign_block::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_sign_block::get_type_name() const { return "mmx.Farmer.sign_block"; } const vnx::TypeCode* Farmer_sign_block::get_type_code() const { return mmx::vnx_native_type_code_Farmer_sign_block; } std::shared_ptr Farmer_sign_block::create() { return std::make_shared(); } std::shared_ptr Farmer_sign_block::clone() const { return std::make_shared(*this); } void Farmer_sign_block::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_sign_block::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_sign_block::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_sign_block; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, block); _visitor.type_end(*_type_code); } void Farmer_sign_block::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.sign_block\""; _out << ", \"block\": "; vnx::write(_out, block); _out << "}"; } void Farmer_sign_block::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_sign_block::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.sign_block"; _object["block"] = block; return _object; } void Farmer_sign_block::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "block") { _entry.second.to(block); } } } vnx::Variant Farmer_sign_block::get_field(const std::string& _name) const { if(_name == "block") { return vnx::Variant(block); } return vnx::Variant(); } void Farmer_sign_block::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "block") { _value.to(block); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_sign_block& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_sign_block& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_sign_block::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_sign_block::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.sign_block"; type_code->type_hash = vnx::Hash64(0x6924b10f345eb316ull); type_code->code_hash = vnx::Hash64(0xd84096d5d18122aaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_sign_block); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_sign_block_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "block"; field.code = {16}; } type_code->permission = "mmx.permission_e.SIGN_BLOCK"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.block, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_sign_block& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_sign_block; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_sign_block>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.block, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_sign_block& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_sign_block& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_block& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_sign_block_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_sign_block_return::VNX_TYPE_HASH(0xb8acce9269f91310ull); const vnx::Hash64 Farmer_sign_block_return::VNX_CODE_HASH(0x69a912a2cab09d49ull); vnx::Hash64 Farmer_sign_block_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_sign_block_return::get_type_name() const { return "mmx.Farmer.sign_block.return"; } const vnx::TypeCode* Farmer_sign_block_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_sign_block_return; } std::shared_ptr Farmer_sign_block_return::create() { return std::make_shared(); } std::shared_ptr Farmer_sign_block_return::clone() const { return std::make_shared(*this); } void Farmer_sign_block_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_sign_block_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_sign_block_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_sign_block_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_sign_block_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.sign_block.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_sign_block_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_sign_block_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.sign_block.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_sign_block_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_sign_block_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_sign_block_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_sign_block_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_sign_block_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_sign_block_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_sign_block_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.sign_block.return"; type_code->type_hash = vnx::Hash64(0xb8acce9269f91310ull); type_code->code_hash = vnx::Hash64(0x69a912a2cab09d49ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_sign_block_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_sign_block_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_sign_block_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_sign_block_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_sign_block_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_sign_block_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_block_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_sign_vote.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_sign_vote::VNX_TYPE_HASH(0x655117e05d64b5fcull); const vnx::Hash64 Farmer_sign_vote::VNX_CODE_HASH(0x876984d9a19504a8ull); vnx::Hash64 Farmer_sign_vote::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_sign_vote::get_type_name() const { return "mmx.Farmer.sign_vote"; } const vnx::TypeCode* Farmer_sign_vote::get_type_code() const { return mmx::vnx_native_type_code_Farmer_sign_vote; } std::shared_ptr Farmer_sign_vote::create() { return std::make_shared(); } std::shared_ptr Farmer_sign_vote::clone() const { return std::make_shared(*this); } void Farmer_sign_vote::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_sign_vote::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_sign_vote::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_sign_vote; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, vote); _visitor.type_end(*_type_code); } void Farmer_sign_vote::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.sign_vote\""; _out << ", \"vote\": "; vnx::write(_out, vote); _out << "}"; } void Farmer_sign_vote::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_sign_vote::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.sign_vote"; _object["vote"] = vote; return _object; } void Farmer_sign_vote::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "vote") { _entry.second.to(vote); } } } vnx::Variant Farmer_sign_vote::get_field(const std::string& _name) const { if(_name == "vote") { return vnx::Variant(vote); } return vnx::Variant(); } void Farmer_sign_vote::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "vote") { _value.to(vote); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_sign_vote& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_sign_vote& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_sign_vote::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_sign_vote::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.sign_vote"; type_code->type_hash = vnx::Hash64(0x655117e05d64b5fcull); type_code->code_hash = vnx::Hash64(0x876984d9a19504a8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Farmer_sign_vote); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Farmer_sign_vote_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "vote"; field.code = {16}; } type_code->permission = "mmx.permission_e.SIGN_BLOCK"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.vote, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_sign_vote& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_sign_vote; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_sign_vote>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.vote, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_sign_vote& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_sign_vote& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Farmer_sign_vote_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Farmer_sign_vote_return::VNX_TYPE_HASH(0x40848c38fe18b587ull); const vnx::Hash64 Farmer_sign_vote_return::VNX_CODE_HASH(0x89aefca825f366c5ull); vnx::Hash64 Farmer_sign_vote_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Farmer_sign_vote_return::get_type_name() const { return "mmx.Farmer.sign_vote.return"; } const vnx::TypeCode* Farmer_sign_vote_return::get_type_code() const { return mmx::vnx_native_type_code_Farmer_sign_vote_return; } std::shared_ptr Farmer_sign_vote_return::create() { return std::make_shared(); } std::shared_ptr Farmer_sign_vote_return::clone() const { return std::make_shared(*this); } void Farmer_sign_vote_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Farmer_sign_vote_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Farmer_sign_vote_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Farmer_sign_vote_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Farmer_sign_vote_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Farmer.sign_vote.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Farmer_sign_vote_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Farmer_sign_vote_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Farmer.sign_vote.return"; _object["_ret_0"] = _ret_0; return _object; } void Farmer_sign_vote_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Farmer_sign_vote_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Farmer_sign_vote_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Farmer_sign_vote_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Farmer_sign_vote_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Farmer_sign_vote_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Farmer_sign_vote_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Farmer.sign_vote.return"; type_code->type_hash = vnx::Hash64(0x40848c38fe18b587ull); type_code->code_hash = vnx::Hash64(0x89aefca825f366c5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Farmer_sign_vote_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 64, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Farmer_sign_vote_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Farmer_sign_vote_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Farmer_sign_vote_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Farmer_sign_vote_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Farmer_sign_vote_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Farmer_sign_vote_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/HarvesterAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { HarvesterAsyncClient::HarvesterAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } HarvesterAsyncClient::HarvesterAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t HarvesterAsyncClient::reload(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Harvester_reload::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_reload[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::add_plot_dir(const std::string& path, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Harvester_add_plot_dir::create(); _method->path = path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_add_plot_dir[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::rem_plot_dir(const std::string& path, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Harvester_rem_plot_dir::create(); _method->path = path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_rem_plot_dir[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::get_farm_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Harvester_get_farm_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_get_farm_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::get_total_bytes(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Harvester_get_total_bytes::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_get_total_bytes[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::http_request(std::shared_ptr request, const std::string& sub_path, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_http_request[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_http_request_chunk[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 12; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 13; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 14; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t HarvesterAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 15; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t HarvesterAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_reload.find(_request_id); if(_iter != vnx_queue_reload.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_reload.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_add_plot_dir.find(_request_id); if(_iter != vnx_queue_add_plot_dir.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_add_plot_dir.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_rem_plot_dir.find(_request_id); if(_iter != vnx_queue_rem_plot_dir.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_rem_plot_dir.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_get_farm_info.find(_request_id); if(_iter != vnx_queue_get_farm_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farm_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_get_total_bytes.find(_request_id); if(_iter != vnx_queue_get_total_bytes.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_total_bytes.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter != vnx_queue_http_request.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter != vnx_queue_http_request_chunk.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 12: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 13: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 14: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 15: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t HarvesterAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("HarvesterAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_reload.find(_request_id); if(_iter == vnx_queue_reload.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_reload.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 1: { const auto _iter = vnx_queue_add_plot_dir.find(_request_id); if(_iter == vnx_queue_add_plot_dir.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_add_plot_dir.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 2: { const auto _iter = vnx_queue_rem_plot_dir.find(_request_id); if(_iter == vnx_queue_rem_plot_dir.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_rem_plot_dir.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 3: { const auto _iter = vnx_queue_get_farm_info.find(_request_id); if(_iter == vnx_queue_get_farm_info.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farm_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_get_total_bytes.find(_request_id); if(_iter == vnx_queue_get_total_bytes.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_total_bytes.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter == vnx_queue_http_request.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter == vnx_queue_http_request_chunk.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 9: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 10: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 11: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 12: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } case 13: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 14: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 15: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("HarvesterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("HarvesterAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("HarvesterAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/HarvesterBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 HarvesterBase::VNX_TYPE_HASH(0xc17118896cde1555ull); const vnx::Hash64 HarvesterBase::VNX_CODE_HASH(0x58f3117ab806b859ull); HarvesterBase::HarvesterBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".input_challenges", input_challenges); vnx::read_config(vnx_name + ".output_info", output_info); vnx::read_config(vnx_name + ".output_proofs", output_proofs); vnx::read_config(vnx_name + ".output_lookups", output_lookups); vnx::read_config(vnx_name + ".output_partials", output_partials); vnx::read_config(vnx_name + ".plot_dirs", plot_dirs); vnx::read_config(vnx_name + ".dir_blacklist", dir_blacklist); vnx::read_config(vnx_name + ".node_server", node_server); vnx::read_config(vnx_name + ".farmer_server", farmer_server); vnx::read_config(vnx_name + ".config_path", config_path); vnx::read_config(vnx_name + ".storage_path", storage_path); vnx::read_config(vnx_name + ".my_name", my_name); vnx::read_config(vnx_name + ".max_queue_ms", max_queue_ms); vnx::read_config(vnx_name + ".reload_interval", reload_interval); vnx::read_config(vnx_name + ".nft_query_interval", nft_query_interval); vnx::read_config(vnx_name + ".num_threads", num_threads); vnx::read_config(vnx_name + ".max_recursion", max_recursion); vnx::read_config(vnx_name + ".recursive_search", recursive_search); vnx::read_config(vnx_name + ".farm_virtual_plots", farm_virtual_plots); } vnx::Hash64 HarvesterBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string HarvesterBase::get_type_name() const { return "mmx.Harvester"; } const vnx::TypeCode* HarvesterBase::get_type_code() const { return mmx::vnx_native_type_code_HarvesterBase; } void HarvesterBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_HarvesterBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, input_challenges); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, output_info); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, output_proofs); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, output_lookups); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, output_partials); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, plot_dirs); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, dir_blacklist); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, node_server); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, farmer_server); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, config_path); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, storage_path); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, my_name); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, max_queue_ms); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, reload_interval); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, nft_query_interval); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, num_threads); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, max_recursion); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, recursive_search); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, farm_virtual_plots); _visitor.type_end(*_type_code); } void HarvesterBase::write(std::ostream& _out) const { _out << "{"; _out << "\"input_challenges\": "; vnx::write(_out, input_challenges); _out << ", \"output_info\": "; vnx::write(_out, output_info); _out << ", \"output_proofs\": "; vnx::write(_out, output_proofs); _out << ", \"output_lookups\": "; vnx::write(_out, output_lookups); _out << ", \"output_partials\": "; vnx::write(_out, output_partials); _out << ", \"plot_dirs\": "; vnx::write(_out, plot_dirs); _out << ", \"dir_blacklist\": "; vnx::write(_out, dir_blacklist); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << ", \"farmer_server\": "; vnx::write(_out, farmer_server); _out << ", \"config_path\": "; vnx::write(_out, config_path); _out << ", \"storage_path\": "; vnx::write(_out, storage_path); _out << ", \"my_name\": "; vnx::write(_out, my_name); _out << ", \"max_queue_ms\": "; vnx::write(_out, max_queue_ms); _out << ", \"reload_interval\": "; vnx::write(_out, reload_interval); _out << ", \"nft_query_interval\": "; vnx::write(_out, nft_query_interval); _out << ", \"num_threads\": "; vnx::write(_out, num_threads); _out << ", \"max_recursion\": "; vnx::write(_out, max_recursion); _out << ", \"recursive_search\": "; vnx::write(_out, recursive_search); _out << ", \"farm_virtual_plots\": "; vnx::write(_out, farm_virtual_plots); _out << "}"; } void HarvesterBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object HarvesterBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester"; _object["input_challenges"] = input_challenges; _object["output_info"] = output_info; _object["output_proofs"] = output_proofs; _object["output_lookups"] = output_lookups; _object["output_partials"] = output_partials; _object["plot_dirs"] = plot_dirs; _object["dir_blacklist"] = dir_blacklist; _object["node_server"] = node_server; _object["farmer_server"] = farmer_server; _object["config_path"] = config_path; _object["storage_path"] = storage_path; _object["my_name"] = my_name; _object["max_queue_ms"] = max_queue_ms; _object["reload_interval"] = reload_interval; _object["nft_query_interval"] = nft_query_interval; _object["num_threads"] = num_threads; _object["max_recursion"] = max_recursion; _object["recursive_search"] = recursive_search; _object["farm_virtual_plots"] = farm_virtual_plots; return _object; } void HarvesterBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "config_path") { _entry.second.to(config_path); } else if(_entry.first == "dir_blacklist") { _entry.second.to(dir_blacklist); } else if(_entry.first == "farm_virtual_plots") { _entry.second.to(farm_virtual_plots); } else if(_entry.first == "farmer_server") { _entry.second.to(farmer_server); } else if(_entry.first == "input_challenges") { _entry.second.to(input_challenges); } else if(_entry.first == "max_queue_ms") { _entry.second.to(max_queue_ms); } else if(_entry.first == "max_recursion") { _entry.second.to(max_recursion); } else if(_entry.first == "my_name") { _entry.second.to(my_name); } else if(_entry.first == "nft_query_interval") { _entry.second.to(nft_query_interval); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "num_threads") { _entry.second.to(num_threads); } else if(_entry.first == "output_info") { _entry.second.to(output_info); } else if(_entry.first == "output_lookups") { _entry.second.to(output_lookups); } else if(_entry.first == "output_partials") { _entry.second.to(output_partials); } else if(_entry.first == "output_proofs") { _entry.second.to(output_proofs); } else if(_entry.first == "plot_dirs") { _entry.second.to(plot_dirs); } else if(_entry.first == "recursive_search") { _entry.second.to(recursive_search); } else if(_entry.first == "reload_interval") { _entry.second.to(reload_interval); } else if(_entry.first == "storage_path") { _entry.second.to(storage_path); } } } vnx::Variant HarvesterBase::get_field(const std::string& _name) const { if(_name == "input_challenges") { return vnx::Variant(input_challenges); } if(_name == "output_info") { return vnx::Variant(output_info); } if(_name == "output_proofs") { return vnx::Variant(output_proofs); } if(_name == "output_lookups") { return vnx::Variant(output_lookups); } if(_name == "output_partials") { return vnx::Variant(output_partials); } if(_name == "plot_dirs") { return vnx::Variant(plot_dirs); } if(_name == "dir_blacklist") { return vnx::Variant(dir_blacklist); } if(_name == "node_server") { return vnx::Variant(node_server); } if(_name == "farmer_server") { return vnx::Variant(farmer_server); } if(_name == "config_path") { return vnx::Variant(config_path); } if(_name == "storage_path") { return vnx::Variant(storage_path); } if(_name == "my_name") { return vnx::Variant(my_name); } if(_name == "max_queue_ms") { return vnx::Variant(max_queue_ms); } if(_name == "reload_interval") { return vnx::Variant(reload_interval); } if(_name == "nft_query_interval") { return vnx::Variant(nft_query_interval); } if(_name == "num_threads") { return vnx::Variant(num_threads); } if(_name == "max_recursion") { return vnx::Variant(max_recursion); } if(_name == "recursive_search") { return vnx::Variant(recursive_search); } if(_name == "farm_virtual_plots") { return vnx::Variant(farm_virtual_plots); } return vnx::Variant(); } void HarvesterBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "input_challenges") { _value.to(input_challenges); } else if(_name == "output_info") { _value.to(output_info); } else if(_name == "output_proofs") { _value.to(output_proofs); } else if(_name == "output_lookups") { _value.to(output_lookups); } else if(_name == "output_partials") { _value.to(output_partials); } else if(_name == "plot_dirs") { _value.to(plot_dirs); } else if(_name == "dir_blacklist") { _value.to(dir_blacklist); } else if(_name == "node_server") { _value.to(node_server); } else if(_name == "farmer_server") { _value.to(farmer_server); } else if(_name == "config_path") { _value.to(config_path); } else if(_name == "storage_path") { _value.to(storage_path); } else if(_name == "my_name") { _value.to(my_name); } else if(_name == "max_queue_ms") { _value.to(max_queue_ms); } else if(_name == "reload_interval") { _value.to(reload_interval); } else if(_name == "nft_query_interval") { _value.to(nft_query_interval); } else if(_name == "num_threads") { _value.to(num_threads); } else if(_name == "max_recursion") { _value.to(max_recursion); } else if(_name == "recursive_search") { _value.to(recursive_search); } else if(_name == "farm_virtual_plots") { _value.to(farm_virtual_plots); } } /// \private std::ostream& operator<<(std::ostream& _out, const HarvesterBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, HarvesterBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* HarvesterBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr HarvesterBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester"; type_code->type_hash = vnx::Hash64(0xc17118896cde1555ull); type_code->code_hash = vnx::Hash64(0x58f3117ab806b859ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::HarvesterBase); type_code->methods.resize(16); type_code->methods[0] = ::mmx::Harvester_add_plot_dir::static_get_type_code(); type_code->methods[1] = ::mmx::Harvester_get_farm_info::static_get_type_code(); type_code->methods[2] = ::mmx::Harvester_get_total_bytes::static_get_type_code(); type_code->methods[3] = ::mmx::Harvester_reload::static_get_type_code(); type_code->methods[4] = ::mmx::Harvester_rem_plot_dir::static_get_type_code(); type_code->methods[5] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[6] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[7] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[8] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[9] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[10] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[11] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[12] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[13] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->methods[14] = ::vnx::addons::HttpComponent_http_request::static_get_type_code(); type_code->methods[15] = ::vnx::addons::HttpComponent_http_request_chunk::static_get_type_code(); type_code->fields.resize(19); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "input_challenges"; field.value = vnx::to_string("harvester.challenges"); field.code = {12, 5}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "output_info"; field.value = vnx::to_string("harvester.info"); field.code = {12, 5}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "output_proofs"; field.value = vnx::to_string("harvester.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "output_lookups"; field.value = vnx::to_string("harvester.lookups"); field.code = {12, 5}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "output_partials"; field.value = vnx::to_string("harvester.partials"); field.code = {12, 5}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "plot_dirs"; field.code = {12, 32}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "dir_blacklist"; field.code = {12, 32}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "farmer_server"; field.value = vnx::to_string("Farmer"); field.code = {32}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "config_path"; field.code = {32}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "storage_path"; field.code = {32}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "my_name"; field.code = {32}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "max_queue_ms"; field.value = vnx::to_string(10000); field.code = {7}; } { auto& field = type_code->fields[13]; field.data_size = 4; field.name = "reload_interval"; field.value = vnx::to_string(3600); field.code = {7}; } { auto& field = type_code->fields[14]; field.data_size = 4; field.name = "nft_query_interval"; field.value = vnx::to_string(60); field.code = {7}; } { auto& field = type_code->fields[15]; field.data_size = 4; field.name = "num_threads"; field.value = vnx::to_string(32); field.code = {3}; } { auto& field = type_code->fields[16]; field.data_size = 4; field.name = "max_recursion"; field.value = vnx::to_string(4); field.code = {3}; } { auto& field = type_code->fields[17]; field.data_size = 1; field.name = "recursive_search"; field.value = vnx::to_string(true); field.code = {31}; } { auto& field = type_code->fields[18]; field.data_size = 1; field.name = "farm_virtual_plots"; field.value = vnx::to_string(true); field.code = {31}; } type_code->build(); return type_code; } void HarvesterBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0x4bf49f8022405249ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr HarvesterBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x61714d1c7ecaffddull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Harvester_add_plot_dir_return::create(); add_plot_dir(_args->path); return _return_value; } case 0x129f91b9ade2891full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Harvester_get_farm_info_return::create(); _return_value->_ret_0 = get_farm_info(); return _return_value; } case 0x36f2104b41d9a25cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Harvester_get_total_bytes_return::create(); _return_value->_ret_0 = get_total_bytes(); return _return_value; } case 0xc67a4577de7e85caull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Harvester_reload_return::create(); reload(); return _return_value; } case 0x57674e56f3ab6076ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Harvester_rem_plot_dir_return::create(); rem_plot_dir(_args->path); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } case 0xe0b6c38f619bad92ull: { auto _args = std::static_pointer_cast(_method); http_request_async(_args->request, _args->sub_path, _request_id); return nullptr; } case 0x97e79d08440406d5ull: { auto _args = std::static_pointer_cast(_method); http_request_chunk_async(_args->request, _args->sub_path, _args->offset, _args->max_bytes, _request_id); return nullptr; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void HarvesterBase::http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void HarvesterBase::http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_chunk_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.max_queue_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.reload_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[14]) { vnx::read_value(_buf + _field->offset, value.nft_query_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[15]) { vnx::read_value(_buf + _field->offset, value.num_threads, _field->code.data()); } if(const auto* const _field = type_code->field_map[16]) { vnx::read_value(_buf + _field->offset, value.max_recursion, _field->code.data()); } if(const auto* const _field = type_code->field_map[17]) { vnx::read_value(_buf + _field->offset, value.recursive_search, _field->code.data()); } if(const auto* const _field = type_code->field_map[18]) { vnx::read_value(_buf + _field->offset, value.farm_virtual_plots, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.input_challenges, type_code, _field->code.data()); break; case 1: vnx::read(in, value.output_info, type_code, _field->code.data()); break; case 2: vnx::read(in, value.output_proofs, type_code, _field->code.data()); break; case 3: vnx::read(in, value.output_lookups, type_code, _field->code.data()); break; case 4: vnx::read(in, value.output_partials, type_code, _field->code.data()); break; case 5: vnx::read(in, value.plot_dirs, type_code, _field->code.data()); break; case 6: vnx::read(in, value.dir_blacklist, type_code, _field->code.data()); break; case 7: vnx::read(in, value.node_server, type_code, _field->code.data()); break; case 8: vnx::read(in, value.farmer_server, type_code, _field->code.data()); break; case 9: vnx::read(in, value.config_path, type_code, _field->code.data()); break; case 10: vnx::read(in, value.storage_path, type_code, _field->code.data()); break; case 11: vnx::read(in, value.my_name, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::HarvesterBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_HarvesterBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::HarvesterBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(22); vnx::write_value(_buf + 0, value.max_queue_ms); vnx::write_value(_buf + 4, value.reload_interval); vnx::write_value(_buf + 8, value.nft_query_interval); vnx::write_value(_buf + 12, value.num_threads); vnx::write_value(_buf + 16, value.max_recursion); vnx::write_value(_buf + 20, value.recursive_search); vnx::write_value(_buf + 21, value.farm_virtual_plots); vnx::write(out, value.input_challenges, type_code, type_code->fields[0].code.data()); vnx::write(out, value.output_info, type_code, type_code->fields[1].code.data()); vnx::write(out, value.output_proofs, type_code, type_code->fields[2].code.data()); vnx::write(out, value.output_lookups, type_code, type_code->fields[3].code.data()); vnx::write(out, value.output_partials, type_code, type_code->fields[4].code.data()); vnx::write(out, value.plot_dirs, type_code, type_code->fields[5].code.data()); vnx::write(out, value.dir_blacklist, type_code, type_code->fields[6].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[7].code.data()); vnx::write(out, value.farmer_server, type_code, type_code->fields[8].code.data()); vnx::write(out, value.config_path, type_code, type_code->fields[9].code.data()); vnx::write(out, value.storage_path, type_code, type_code->fields[10].code.data()); vnx::write(out, value.my_name, type_code, type_code->fields[11].code.data()); } void read(std::istream& in, ::mmx::HarvesterBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::HarvesterBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::HarvesterBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/HarvesterClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { HarvesterClient::HarvesterClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } HarvesterClient::HarvesterClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } void HarvesterClient::reload() { auto _method = ::mmx::Harvester_reload::create(); vnx_request(_method, false); } void HarvesterClient::reload_async() { auto _method = ::mmx::Harvester_reload::create(); vnx_request(_method, true); } void HarvesterClient::add_plot_dir(const std::string& path) { auto _method = ::mmx::Harvester_add_plot_dir::create(); _method->path = path; vnx_request(_method, false); } void HarvesterClient::add_plot_dir_async(const std::string& path) { auto _method = ::mmx::Harvester_add_plot_dir::create(); _method->path = path; vnx_request(_method, true); } void HarvesterClient::rem_plot_dir(const std::string& path) { auto _method = ::mmx::Harvester_rem_plot_dir::create(); _method->path = path; vnx_request(_method, false); } void HarvesterClient::rem_plot_dir_async(const std::string& path) { auto _method = ::mmx::Harvester_rem_plot_dir::create(); _method->path = path; vnx_request(_method, true); } std::shared_ptr HarvesterClient::get_farm_info() { auto _method = ::mmx::Harvester_get_farm_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } uint64_t HarvesterClient::get_total_bytes() { auto _method = ::mmx::Harvester_get_total_bytes::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } std::shared_ptr HarvesterClient::http_request(std::shared_ptr request, const std::string& sub_path) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } std::shared_ptr HarvesterClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } ::vnx::Object HarvesterClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } ::vnx::Variant HarvesterClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } void HarvesterClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void HarvesterClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void HarvesterClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void HarvesterClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode HarvesterClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } std::shared_ptr HarvesterClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } void HarvesterClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void HarvesterClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void HarvesterClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void HarvesterClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t HarvesterClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("HarvesterClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/Harvester_add_plot_dir.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_add_plot_dir::VNX_TYPE_HASH(0x61714d1c7ecaffddull); const vnx::Hash64 Harvester_add_plot_dir::VNX_CODE_HASH(0x27700f9e3aa5b127ull); vnx::Hash64 Harvester_add_plot_dir::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_add_plot_dir::get_type_name() const { return "mmx.Harvester.add_plot_dir"; } const vnx::TypeCode* Harvester_add_plot_dir::get_type_code() const { return mmx::vnx_native_type_code_Harvester_add_plot_dir; } std::shared_ptr Harvester_add_plot_dir::create() { return std::make_shared(); } std::shared_ptr Harvester_add_plot_dir::clone() const { return std::make_shared(*this); } void Harvester_add_plot_dir::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_add_plot_dir::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_add_plot_dir::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_add_plot_dir; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, path); _visitor.type_end(*_type_code); } void Harvester_add_plot_dir::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.add_plot_dir\""; _out << ", \"path\": "; vnx::write(_out, path); _out << "}"; } void Harvester_add_plot_dir::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_add_plot_dir::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.add_plot_dir"; _object["path"] = path; return _object; } void Harvester_add_plot_dir::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "path") { _entry.second.to(path); } } } vnx::Variant Harvester_add_plot_dir::get_field(const std::string& _name) const { if(_name == "path") { return vnx::Variant(path); } return vnx::Variant(); } void Harvester_add_plot_dir::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "path") { _value.to(path); } } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_add_plot_dir& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_add_plot_dir& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_add_plot_dir::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_add_plot_dir::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.add_plot_dir"; type_code->type_hash = vnx::Hash64(0x61714d1c7ecaffddull); type_code->code_hash = vnx::Hash64(0x27700f9e3aa5b127ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Harvester_add_plot_dir); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Harvester_add_plot_dir_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "path"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.path, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_add_plot_dir; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_add_plot_dir>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.path, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Harvester_add_plot_dir& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_add_plot_dir_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_add_plot_dir_return::VNX_TYPE_HASH(0x8b5f7bc4f34fb5d5ull); const vnx::Hash64 Harvester_add_plot_dir_return::VNX_CODE_HASH(0x6dee0a09bf98e15bull); vnx::Hash64 Harvester_add_plot_dir_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_add_plot_dir_return::get_type_name() const { return "mmx.Harvester.add_plot_dir.return"; } const vnx::TypeCode* Harvester_add_plot_dir_return::get_type_code() const { return mmx::vnx_native_type_code_Harvester_add_plot_dir_return; } std::shared_ptr Harvester_add_plot_dir_return::create() { return std::make_shared(); } std::shared_ptr Harvester_add_plot_dir_return::clone() const { return std::make_shared(*this); } void Harvester_add_plot_dir_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_add_plot_dir_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_add_plot_dir_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_add_plot_dir_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_add_plot_dir_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.add_plot_dir.return\""; _out << "}"; } void Harvester_add_plot_dir_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_add_plot_dir_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.add_plot_dir.return"; return _object; } void Harvester_add_plot_dir_return::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_add_plot_dir_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_add_plot_dir_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_add_plot_dir_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_add_plot_dir_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_add_plot_dir_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_add_plot_dir_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.add_plot_dir.return"; type_code->type_hash = vnx::Hash64(0x8b5f7bc4f34fb5d5ull); type_code->code_hash = vnx::Hash64(0x6dee0a09bf98e15bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Harvester_add_plot_dir_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_add_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_add_plot_dir_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_add_plot_dir_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_add_plot_dir_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_add_plot_dir_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_add_plot_dir_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_get_farm_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_get_farm_info::VNX_TYPE_HASH(0x129f91b9ade2891full); const vnx::Hash64 Harvester_get_farm_info::VNX_CODE_HASH(0xd4167a038fab3753ull); vnx::Hash64 Harvester_get_farm_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_get_farm_info::get_type_name() const { return "mmx.Harvester.get_farm_info"; } const vnx::TypeCode* Harvester_get_farm_info::get_type_code() const { return mmx::vnx_native_type_code_Harvester_get_farm_info; } std::shared_ptr Harvester_get_farm_info::create() { return std::make_shared(); } std::shared_ptr Harvester_get_farm_info::clone() const { return std::make_shared(*this); } void Harvester_get_farm_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_get_farm_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_get_farm_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_get_farm_info; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_get_farm_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.get_farm_info\""; _out << "}"; } void Harvester_get_farm_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_get_farm_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.get_farm_info"; return _object; } void Harvester_get_farm_info::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_get_farm_info::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_get_farm_info::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_get_farm_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_get_farm_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_get_farm_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_get_farm_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.get_farm_info"; type_code->type_hash = vnx::Hash64(0x129f91b9ade2891full); type_code->code_hash = vnx::Hash64(0xd4167a038fab3753ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Harvester_get_farm_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Harvester_get_farm_info_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_get_farm_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_get_farm_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_get_farm_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_get_farm_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_get_farm_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_get_farm_info_return::VNX_TYPE_HASH(0x87a91b15ec42441full); const vnx::Hash64 Harvester_get_farm_info_return::VNX_CODE_HASH(0x29322cece6a1e12aull); vnx::Hash64 Harvester_get_farm_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_get_farm_info_return::get_type_name() const { return "mmx.Harvester.get_farm_info.return"; } const vnx::TypeCode* Harvester_get_farm_info_return::get_type_code() const { return mmx::vnx_native_type_code_Harvester_get_farm_info_return; } std::shared_ptr Harvester_get_farm_info_return::create() { return std::make_shared(); } std::shared_ptr Harvester_get_farm_info_return::clone() const { return std::make_shared(*this); } void Harvester_get_farm_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_get_farm_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_get_farm_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_get_farm_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Harvester_get_farm_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.get_farm_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Harvester_get_farm_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_get_farm_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.get_farm_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Harvester_get_farm_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Harvester_get_farm_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Harvester_get_farm_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_get_farm_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_get_farm_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_get_farm_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_get_farm_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.get_farm_info.return"; type_code->type_hash = vnx::Hash64(0x87a91b15ec42441full); type_code->code_hash = vnx::Hash64(0x29322cece6a1e12aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Harvester_get_farm_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_get_farm_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_get_farm_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_get_farm_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Harvester_get_farm_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_get_farm_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_get_farm_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_get_total_bytes.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_get_total_bytes::VNX_TYPE_HASH(0x36f2104b41d9a25cull); const vnx::Hash64 Harvester_get_total_bytes::VNX_CODE_HASH(0x608650213b31d022ull); vnx::Hash64 Harvester_get_total_bytes::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_get_total_bytes::get_type_name() const { return "mmx.Harvester.get_total_bytes"; } const vnx::TypeCode* Harvester_get_total_bytes::get_type_code() const { return mmx::vnx_native_type_code_Harvester_get_total_bytes; } std::shared_ptr Harvester_get_total_bytes::create() { return std::make_shared(); } std::shared_ptr Harvester_get_total_bytes::clone() const { return std::make_shared(*this); } void Harvester_get_total_bytes::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_get_total_bytes::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_get_total_bytes::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_get_total_bytes; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_get_total_bytes::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.get_total_bytes\""; _out << "}"; } void Harvester_get_total_bytes::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_get_total_bytes::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.get_total_bytes"; return _object; } void Harvester_get_total_bytes::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_get_total_bytes::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_get_total_bytes::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_get_total_bytes& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_get_total_bytes& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_get_total_bytes::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_get_total_bytes::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.get_total_bytes"; type_code->type_hash = vnx::Hash64(0x36f2104b41d9a25cull); type_code->code_hash = vnx::Hash64(0x608650213b31d022ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Harvester_get_total_bytes); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Harvester_get_total_bytes_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_get_total_bytes; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_get_total_bytes>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_get_total_bytes& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_get_total_bytes_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_get_total_bytes_return::VNX_TYPE_HASH(0xd9a9fe83ba7d6918ull); const vnx::Hash64 Harvester_get_total_bytes_return::VNX_CODE_HASH(0x5d9df696f4c3824cull); vnx::Hash64 Harvester_get_total_bytes_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_get_total_bytes_return::get_type_name() const { return "mmx.Harvester.get_total_bytes.return"; } const vnx::TypeCode* Harvester_get_total_bytes_return::get_type_code() const { return mmx::vnx_native_type_code_Harvester_get_total_bytes_return; } std::shared_ptr Harvester_get_total_bytes_return::create() { return std::make_shared(); } std::shared_ptr Harvester_get_total_bytes_return::clone() const { return std::make_shared(*this); } void Harvester_get_total_bytes_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_get_total_bytes_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_get_total_bytes_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_get_total_bytes_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Harvester_get_total_bytes_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.get_total_bytes.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Harvester_get_total_bytes_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_get_total_bytes_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.get_total_bytes.return"; _object["_ret_0"] = _ret_0; return _object; } void Harvester_get_total_bytes_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Harvester_get_total_bytes_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Harvester_get_total_bytes_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_get_total_bytes_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_get_total_bytes_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_get_total_bytes_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_get_total_bytes_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.get_total_bytes.return"; type_code->type_hash = vnx::Hash64(0xd9a9fe83ba7d6918ull); type_code->code_hash = vnx::Hash64(0x5d9df696f4c3824cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Harvester_get_total_bytes_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "_ret_0"; field.code = {4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_get_total_bytes_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_get_total_bytes_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_get_total_bytes_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Harvester_get_total_bytes_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_get_total_bytes_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_get_total_bytes_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_reload.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_reload::VNX_TYPE_HASH(0xc67a4577de7e85caull); const vnx::Hash64 Harvester_reload::VNX_CODE_HASH(0xa01f4f9a3b23c380ull); vnx::Hash64 Harvester_reload::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_reload::get_type_name() const { return "mmx.Harvester.reload"; } const vnx::TypeCode* Harvester_reload::get_type_code() const { return mmx::vnx_native_type_code_Harvester_reload; } std::shared_ptr Harvester_reload::create() { return std::make_shared(); } std::shared_ptr Harvester_reload::clone() const { return std::make_shared(*this); } void Harvester_reload::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_reload::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_reload::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_reload; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_reload::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.reload\""; _out << "}"; } void Harvester_reload::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_reload::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.reload"; return _object; } void Harvester_reload::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_reload::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_reload::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_reload& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_reload& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_reload::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_reload::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.reload"; type_code->type_hash = vnx::Hash64(0xc67a4577de7e85caull); type_code->code_hash = vnx::Hash64(0xa01f4f9a3b23c380ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Harvester_reload); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Harvester_reload_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_reload& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_reload; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_reload>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_reload& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_reload& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_reload& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_reload_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_reload_return::VNX_TYPE_HASH(0x39fc8cc53bcf4659ull); const vnx::Hash64 Harvester_reload_return::VNX_CODE_HASH(0xdb56d8b06101b0b3ull); vnx::Hash64 Harvester_reload_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_reload_return::get_type_name() const { return "mmx.Harvester.reload.return"; } const vnx::TypeCode* Harvester_reload_return::get_type_code() const { return mmx::vnx_native_type_code_Harvester_reload_return; } std::shared_ptr Harvester_reload_return::create() { return std::make_shared(); } std::shared_ptr Harvester_reload_return::clone() const { return std::make_shared(*this); } void Harvester_reload_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_reload_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_reload_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_reload_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_reload_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.reload.return\""; _out << "}"; } void Harvester_reload_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_reload_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.reload.return"; return _object; } void Harvester_reload_return::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_reload_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_reload_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_reload_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_reload_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_reload_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_reload_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.reload.return"; type_code->type_hash = vnx::Hash64(0x39fc8cc53bcf4659ull); type_code->code_hash = vnx::Hash64(0xdb56d8b06101b0b3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Harvester_reload_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_reload_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_reload_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_reload_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_reload_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_reload_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_reload_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_rem_plot_dir.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_rem_plot_dir::VNX_TYPE_HASH(0x57674e56f3ab6076ull); const vnx::Hash64 Harvester_rem_plot_dir::VNX_CODE_HASH(0xa08c1cef8ea0dc95ull); vnx::Hash64 Harvester_rem_plot_dir::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_rem_plot_dir::get_type_name() const { return "mmx.Harvester.rem_plot_dir"; } const vnx::TypeCode* Harvester_rem_plot_dir::get_type_code() const { return mmx::vnx_native_type_code_Harvester_rem_plot_dir; } std::shared_ptr Harvester_rem_plot_dir::create() { return std::make_shared(); } std::shared_ptr Harvester_rem_plot_dir::clone() const { return std::make_shared(*this); } void Harvester_rem_plot_dir::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_rem_plot_dir::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_rem_plot_dir::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_rem_plot_dir; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, path); _visitor.type_end(*_type_code); } void Harvester_rem_plot_dir::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.rem_plot_dir\""; _out << ", \"path\": "; vnx::write(_out, path); _out << "}"; } void Harvester_rem_plot_dir::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_rem_plot_dir::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.rem_plot_dir"; _object["path"] = path; return _object; } void Harvester_rem_plot_dir::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "path") { _entry.second.to(path); } } } vnx::Variant Harvester_rem_plot_dir::get_field(const std::string& _name) const { if(_name == "path") { return vnx::Variant(path); } return vnx::Variant(); } void Harvester_rem_plot_dir::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "path") { _value.to(path); } } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_rem_plot_dir& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_rem_plot_dir& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_rem_plot_dir::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_rem_plot_dir::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.rem_plot_dir"; type_code->type_hash = vnx::Hash64(0x57674e56f3ab6076ull); type_code->code_hash = vnx::Hash64(0xa08c1cef8ea0dc95ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Harvester_rem_plot_dir); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Harvester_rem_plot_dir_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "path"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.path, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_rem_plot_dir; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_rem_plot_dir>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.path, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Harvester_rem_plot_dir& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Harvester_rem_plot_dir_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Harvester_rem_plot_dir_return::VNX_TYPE_HASH(0xb2a8cfb3633bf358ull); const vnx::Hash64 Harvester_rem_plot_dir_return::VNX_CODE_HASH(0xafc69c65405196eeull); vnx::Hash64 Harvester_rem_plot_dir_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Harvester_rem_plot_dir_return::get_type_name() const { return "mmx.Harvester.rem_plot_dir.return"; } const vnx::TypeCode* Harvester_rem_plot_dir_return::get_type_code() const { return mmx::vnx_native_type_code_Harvester_rem_plot_dir_return; } std::shared_ptr Harvester_rem_plot_dir_return::create() { return std::make_shared(); } std::shared_ptr Harvester_rem_plot_dir_return::clone() const { return std::make_shared(*this); } void Harvester_rem_plot_dir_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Harvester_rem_plot_dir_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Harvester_rem_plot_dir_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Harvester_rem_plot_dir_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Harvester_rem_plot_dir_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Harvester.rem_plot_dir.return\""; _out << "}"; } void Harvester_rem_plot_dir_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Harvester_rem_plot_dir_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Harvester.rem_plot_dir.return"; return _object; } void Harvester_rem_plot_dir_return::from_object(const vnx::Object& _object) { } vnx::Variant Harvester_rem_plot_dir_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Harvester_rem_plot_dir_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Harvester_rem_plot_dir_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Harvester_rem_plot_dir_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Harvester_rem_plot_dir_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Harvester_rem_plot_dir_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Harvester.rem_plot_dir.return"; type_code->type_hash = vnx::Hash64(0xb2a8cfb3633bf358ull); type_code->code_hash = vnx::Hash64(0xafc69c65405196eeull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Harvester_rem_plot_dir_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Harvester_rem_plot_dir_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Harvester_rem_plot_dir_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Harvester_rem_plot_dir_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Harvester_rem_plot_dir_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Harvester_rem_plot_dir_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Harvester_rem_plot_dir_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/IntervalRequest.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 IntervalRequest::VNX_TYPE_HASH(0xa4e39be061f13d71ull); const vnx::Hash64 IntervalRequest::VNX_CODE_HASH(0x7da3de79e64223a8ull); vnx::Hash64 IntervalRequest::get_type_hash() const { return VNX_TYPE_HASH; } std::string IntervalRequest::get_type_name() const { return "mmx.IntervalRequest"; } const vnx::TypeCode* IntervalRequest::get_type_code() const { return mmx::vnx_native_type_code_IntervalRequest; } std::shared_ptr IntervalRequest::create() { return std::make_shared(); } std::shared_ptr IntervalRequest::clone() const { return std::make_shared(*this); } void IntervalRequest::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void IntervalRequest::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void IntervalRequest::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_IntervalRequest; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, start); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, end); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, infuse); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, input); _visitor.type_end(*_type_code); } void IntervalRequest::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.IntervalRequest\""; _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"start\": "; vnx::write(_out, start); _out << ", \"end\": "; vnx::write(_out, end); _out << ", \"infuse\": "; vnx::write(_out, infuse); _out << ", \"input\": "; vnx::write(_out, input); _out << "}"; } void IntervalRequest::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object IntervalRequest::to_object() const { vnx::Object _object; _object["__type"] = "mmx.IntervalRequest"; _object["vdf_height"] = vdf_height; _object["start"] = start; _object["end"] = end; _object["infuse"] = infuse; _object["input"] = input; return _object; } void IntervalRequest::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "end") { _entry.second.to(end); } else if(_entry.first == "infuse") { _entry.second.to(infuse); } else if(_entry.first == "input") { _entry.second.to(input); } else if(_entry.first == "start") { _entry.second.to(start); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant IntervalRequest::get_field(const std::string& _name) const { if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "start") { return vnx::Variant(start); } if(_name == "end") { return vnx::Variant(end); } if(_name == "infuse") { return vnx::Variant(infuse); } if(_name == "input") { return vnx::Variant(input); } return vnx::Variant(); } void IntervalRequest::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "start") { _value.to(start); } else if(_name == "end") { _value.to(end); } else if(_name == "infuse") { _value.to(infuse); } else if(_name == "input") { _value.to(input); } } /// \private std::ostream& operator<<(std::ostream& _out, const IntervalRequest& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, IntervalRequest& _value) { _value.read(_in); return _in; } const vnx::TypeCode* IntervalRequest::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr IntervalRequest::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.IntervalRequest"; type_code->type_hash = vnx::Hash64(0xa4e39be061f13d71ull); type_code->code_hash = vnx::Hash64(0x7da3de79e64223a8ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::IntervalRequest); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "start"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "end"; field.code = {4}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "infuse"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "input"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr IntervalRequest::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.start, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.end, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.infuse, type_code, _field->code.data()); break; case 4: vnx::read(in, value.input, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::IntervalRequest& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_IntervalRequest; out.write_type_code(type_code); vnx::write_class_header<::mmx::IntervalRequest>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(20); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.start); vnx::write_value(_buf + 12, value.end); vnx::write(out, value.infuse, type_code, type_code->fields[3].code.data()); vnx::write(out, value.input, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::IntervalRequest& value) { value.read(in); } void write(std::ostream& out, const ::mmx::IntervalRequest& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::IntervalRequest& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/KeyFile.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 KeyFile::VNX_TYPE_HASH(0xdf868931a939cba1ull); const vnx::Hash64 KeyFile::VNX_CODE_HASH(0x35062c98e95706b2ull); vnx::Hash64 KeyFile::get_type_hash() const { return VNX_TYPE_HASH; } std::string KeyFile::get_type_name() const { return "mmx.KeyFile"; } const vnx::TypeCode* KeyFile::get_type_code() const { return mmx::vnx_native_type_code_KeyFile; } std::shared_ptr KeyFile::create() { return std::make_shared(); } std::shared_ptr KeyFile::clone() const { return std::make_shared(*this); } void KeyFile::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void KeyFile::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void KeyFile::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_KeyFile; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, seed_value); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, finger_print); _visitor.type_end(*_type_code); } void KeyFile::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.KeyFile\""; _out << ", \"seed_value\": "; vnx::write(_out, seed_value); _out << ", \"finger_print\": "; vnx::write(_out, finger_print); _out << "}"; } void KeyFile::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object KeyFile::to_object() const { vnx::Object _object; _object["__type"] = "mmx.KeyFile"; _object["seed_value"] = seed_value; _object["finger_print"] = finger_print; return _object; } void KeyFile::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "finger_print") { _entry.second.to(finger_print); } else if(_entry.first == "seed_value") { _entry.second.to(seed_value); } } } vnx::Variant KeyFile::get_field(const std::string& _name) const { if(_name == "seed_value") { return vnx::Variant(seed_value); } if(_name == "finger_print") { return vnx::Variant(finger_print); } return vnx::Variant(); } void KeyFile::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "seed_value") { _value.to(seed_value); } else if(_name == "finger_print") { _value.to(finger_print); } } /// \private std::ostream& operator<<(std::ostream& _out, const KeyFile& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, KeyFile& _value) { _value.read(_in); return _in; } const vnx::TypeCode* KeyFile::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr KeyFile::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.KeyFile"; type_code->type_hash = vnx::Hash64(0xdf868931a939cba1ull); type_code->code_hash = vnx::Hash64(0x35062c98e95706b2ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::KeyFile); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "seed_value"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "finger_print"; field.code = {33, 32}; } type_code->build(); return type_code; } std::shared_ptr KeyFile::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.seed_value, type_code, _field->code.data()); break; case 1: vnx::read(in, value.finger_print, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::KeyFile& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_KeyFile; out.write_type_code(type_code); vnx::write_class_header<::mmx::KeyFile>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.seed_value, type_code, type_code->fields[0].code.data()); vnx::write(out, value.finger_print, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::KeyFile& value) { value.read(in); } void write(std::ostream& out, const ::mmx::KeyFile& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::KeyFile& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/LookupInfo.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 LookupInfo::VNX_TYPE_HASH(0xb7b2ff343487dd63ull); const vnx::Hash64 LookupInfo::VNX_CODE_HASH(0x62dcd0e9316eb657ull); vnx::Hash64 LookupInfo::get_type_hash() const { return VNX_TYPE_HASH; } std::string LookupInfo::get_type_name() const { return "mmx.LookupInfo"; } const vnx::TypeCode* LookupInfo::get_type_code() const { return mmx::vnx_native_type_code_LookupInfo; } std::shared_ptr LookupInfo::create() { return std::make_shared(); } std::shared_ptr LookupInfo::clone() const { return std::make_shared(*this); } void LookupInfo::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void LookupInfo::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void LookupInfo::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_LookupInfo; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, num_passed); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, num_total); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, slow_time_ms); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, total_time_ms); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, total_delay_ms); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, slow_plot); _visitor.type_end(*_type_code); } void LookupInfo::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.LookupInfo\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"num_passed\": "; vnx::write(_out, num_passed); _out << ", \"num_total\": "; vnx::write(_out, num_total); _out << ", \"slow_time_ms\": "; vnx::write(_out, slow_time_ms); _out << ", \"total_time_ms\": "; vnx::write(_out, total_time_ms); _out << ", \"total_delay_ms\": "; vnx::write(_out, total_delay_ms); _out << ", \"slow_plot\": "; vnx::write(_out, slow_plot); _out << "}"; } void LookupInfo::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object LookupInfo::to_object() const { vnx::Object _object; _object["__type"] = "mmx.LookupInfo"; _object["id"] = id; _object["name"] = name; _object["vdf_height"] = vdf_height; _object["num_passed"] = num_passed; _object["num_total"] = num_total; _object["slow_time_ms"] = slow_time_ms; _object["total_time_ms"] = total_time_ms; _object["total_delay_ms"] = total_delay_ms; _object["slow_plot"] = slow_plot; return _object; } void LookupInfo::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "num_passed") { _entry.second.to(num_passed); } else if(_entry.first == "num_total") { _entry.second.to(num_total); } else if(_entry.first == "slow_plot") { _entry.second.to(slow_plot); } else if(_entry.first == "slow_time_ms") { _entry.second.to(slow_time_ms); } else if(_entry.first == "total_delay_ms") { _entry.second.to(total_delay_ms); } else if(_entry.first == "total_time_ms") { _entry.second.to(total_time_ms); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant LookupInfo::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "name") { return vnx::Variant(name); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "num_passed") { return vnx::Variant(num_passed); } if(_name == "num_total") { return vnx::Variant(num_total); } if(_name == "slow_time_ms") { return vnx::Variant(slow_time_ms); } if(_name == "total_time_ms") { return vnx::Variant(total_time_ms); } if(_name == "total_delay_ms") { return vnx::Variant(total_delay_ms); } if(_name == "slow_plot") { return vnx::Variant(slow_plot); } return vnx::Variant(); } void LookupInfo::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "name") { _value.to(name); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "num_passed") { _value.to(num_passed); } else if(_name == "num_total") { _value.to(num_total); } else if(_name == "slow_time_ms") { _value.to(slow_time_ms); } else if(_name == "total_time_ms") { _value.to(total_time_ms); } else if(_name == "total_delay_ms") { _value.to(total_delay_ms); } else if(_name == "slow_plot") { _value.to(slow_plot); } } /// \private std::ostream& operator<<(std::ostream& _out, const LookupInfo& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, LookupInfo& _value) { _value.read(_in); return _in; } const vnx::TypeCode* LookupInfo::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr LookupInfo::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.LookupInfo"; type_code->type_hash = vnx::Hash64(0xb7b2ff343487dd63ull); type_code->code_hash = vnx::Hash64(0x62dcd0e9316eb657ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::LookupInfo); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "num_passed"; field.code = {3}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "num_total"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 8; field.name = "slow_time_ms"; field.code = {8}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "total_time_ms"; field.code = {8}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "total_delay_ms"; field.code = {8}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "slow_plot"; field.code = {33, 32}; } type_code->build(); return type_code; } std::shared_ptr LookupInfo::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.num_passed, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.num_total, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.slow_time_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.total_time_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.total_delay_ms, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 8: vnx::read(in, value.slow_plot, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::LookupInfo& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_LookupInfo; out.write_type_code(type_code); vnx::write_class_header<::mmx::LookupInfo>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(36); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.num_passed); vnx::write_value(_buf + 8, value.num_total); vnx::write_value(_buf + 12, value.slow_time_ms); vnx::write_value(_buf + 20, value.total_time_ms); vnx::write_value(_buf + 28, value.total_delay_ms); vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.slow_plot, type_code, type_code->fields[8].code.data()); } void read(std::istream& in, ::mmx::LookupInfo& value) { value.read(in); } void write(std::ostream& out, const ::mmx::LookupInfo& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::LookupInfo& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/NetworkInfo.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 NetworkInfo::VNX_TYPE_HASH(0xd984018819746101ull); const vnx::Hash64 NetworkInfo::VNX_CODE_HASH(0xb17f3fd89a5445bfull); vnx::Hash64 NetworkInfo::get_type_hash() const { return VNX_TYPE_HASH; } std::string NetworkInfo::get_type_name() const { return "mmx.NetworkInfo"; } const vnx::TypeCode* NetworkInfo::get_type_code() const { return mmx::vnx_native_type_code_NetworkInfo; } std::shared_ptr NetworkInfo::create() { return std::make_shared(); } std::shared_ptr NetworkInfo::clone() const { return std::make_shared(*this); } void NetworkInfo::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void NetworkInfo::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void NetworkInfo::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_NetworkInfo; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, is_synced); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, synced_since); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, time_diff); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, space_diff); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, block_reward); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, total_space); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, total_supply); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, address_count); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, vdf_speed); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, block_size); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, average_txfee); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, genesis_hash); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, node_commit); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, node_version); _visitor.type_end(*_type_code); } void NetworkInfo::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.NetworkInfo\""; _out << ", \"is_synced\": "; vnx::write(_out, is_synced); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"synced_since\": "; vnx::write(_out, synced_since); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"time_diff\": "; vnx::write(_out, time_diff); _out << ", \"space_diff\": "; vnx::write(_out, space_diff); _out << ", \"block_reward\": "; vnx::write(_out, block_reward); _out << ", \"total_space\": "; vnx::write(_out, total_space); _out << ", \"total_supply\": "; vnx::write(_out, total_supply); _out << ", \"address_count\": "; vnx::write(_out, address_count); _out << ", \"vdf_speed\": "; vnx::write(_out, vdf_speed); _out << ", \"block_size\": "; vnx::write(_out, block_size); _out << ", \"average_txfee\": "; vnx::write(_out, average_txfee); _out << ", \"genesis_hash\": "; vnx::write(_out, genesis_hash); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"node_commit\": "; vnx::write(_out, node_commit); _out << ", \"node_version\": "; vnx::write(_out, node_version); _out << "}"; } void NetworkInfo::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object NetworkInfo::to_object() const { vnx::Object _object; _object["__type"] = "mmx.NetworkInfo"; _object["is_synced"] = is_synced; _object["height"] = height; _object["vdf_height"] = vdf_height; _object["synced_since"] = synced_since; _object["time_stamp"] = time_stamp; _object["time_diff"] = time_diff; _object["space_diff"] = space_diff; _object["block_reward"] = block_reward; _object["total_space"] = total_space; _object["total_supply"] = total_supply; _object["address_count"] = address_count; _object["vdf_speed"] = vdf_speed; _object["block_size"] = block_size; _object["average_txfee"] = average_txfee; _object["genesis_hash"] = genesis_hash; _object["name"] = name; _object["node_commit"] = node_commit; _object["node_version"] = node_version; return _object; } void NetworkInfo::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address_count") { _entry.second.to(address_count); } else if(_entry.first == "average_txfee") { _entry.second.to(average_txfee); } else if(_entry.first == "block_reward") { _entry.second.to(block_reward); } else if(_entry.first == "block_size") { _entry.second.to(block_size); } else if(_entry.first == "genesis_hash") { _entry.second.to(genesis_hash); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "is_synced") { _entry.second.to(is_synced); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "node_commit") { _entry.second.to(node_commit); } else if(_entry.first == "node_version") { _entry.second.to(node_version); } else if(_entry.first == "space_diff") { _entry.second.to(space_diff); } else if(_entry.first == "synced_since") { _entry.second.to(synced_since); } else if(_entry.first == "time_diff") { _entry.second.to(time_diff); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "total_space") { _entry.second.to(total_space); } else if(_entry.first == "total_supply") { _entry.second.to(total_supply); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } else if(_entry.first == "vdf_speed") { _entry.second.to(vdf_speed); } } } vnx::Variant NetworkInfo::get_field(const std::string& _name) const { if(_name == "is_synced") { return vnx::Variant(is_synced); } if(_name == "height") { return vnx::Variant(height); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "synced_since") { return vnx::Variant(synced_since); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "time_diff") { return vnx::Variant(time_diff); } if(_name == "space_diff") { return vnx::Variant(space_diff); } if(_name == "block_reward") { return vnx::Variant(block_reward); } if(_name == "total_space") { return vnx::Variant(total_space); } if(_name == "total_supply") { return vnx::Variant(total_supply); } if(_name == "address_count") { return vnx::Variant(address_count); } if(_name == "vdf_speed") { return vnx::Variant(vdf_speed); } if(_name == "block_size") { return vnx::Variant(block_size); } if(_name == "average_txfee") { return vnx::Variant(average_txfee); } if(_name == "genesis_hash") { return vnx::Variant(genesis_hash); } if(_name == "name") { return vnx::Variant(name); } if(_name == "node_commit") { return vnx::Variant(node_commit); } if(_name == "node_version") { return vnx::Variant(node_version); } return vnx::Variant(); } void NetworkInfo::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "is_synced") { _value.to(is_synced); } else if(_name == "height") { _value.to(height); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "synced_since") { _value.to(synced_since); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "time_diff") { _value.to(time_diff); } else if(_name == "space_diff") { _value.to(space_diff); } else if(_name == "block_reward") { _value.to(block_reward); } else if(_name == "total_space") { _value.to(total_space); } else if(_name == "total_supply") { _value.to(total_supply); } else if(_name == "address_count") { _value.to(address_count); } else if(_name == "vdf_speed") { _value.to(vdf_speed); } else if(_name == "block_size") { _value.to(block_size); } else if(_name == "average_txfee") { _value.to(average_txfee); } else if(_name == "genesis_hash") { _value.to(genesis_hash); } else if(_name == "name") { _value.to(name); } else if(_name == "node_commit") { _value.to(node_commit); } else if(_name == "node_version") { _value.to(node_version); } } /// \private std::ostream& operator<<(std::ostream& _out, const NetworkInfo& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, NetworkInfo& _value) { _value.read(_in); return _in; } const vnx::TypeCode* NetworkInfo::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr NetworkInfo::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.NetworkInfo"; type_code->type_hash = vnx::Hash64(0xd984018819746101ull); type_code->code_hash = vnx::Hash64(0xb17f3fd89a5445bfull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::NetworkInfo); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(18); { auto& field = type_code->fields[0]; field.data_size = 1; field.name = "is_synced"; field.code = {31}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "synced_since"; field.code = {3}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[5]; field.data_size = 8; field.name = "time_diff"; field.code = {4}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "space_diff"; field.code = {4}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "block_reward"; field.code = {4}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "total_space"; field.code = {4}; } { auto& field = type_code->fields[9]; field.data_size = 8; field.name = "total_supply"; field.code = {4}; } { auto& field = type_code->fields[10]; field.data_size = 8; field.name = "address_count"; field.code = {4}; } { auto& field = type_code->fields[11]; field.data_size = 8; field.name = "vdf_speed"; field.code = {10}; } { auto& field = type_code->fields[12]; field.data_size = 8; field.name = "block_size"; field.code = {10}; } { auto& field = type_code->fields[13]; field.data_size = 8; field.name = "average_txfee"; field.code = {4}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "genesis_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "node_commit"; field.code = {32}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "node_version"; field.code = {32}; } type_code->build(); return type_code; } std::shared_ptr NetworkInfo::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.is_synced, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.synced_since, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.time_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.space_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.block_reward, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.total_space, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.total_supply, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.address_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.vdf_speed, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.block_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.average_txfee, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 14: vnx::read(in, value.genesis_hash, type_code, _field->code.data()); break; case 15: vnx::read(in, value.name, type_code, _field->code.data()); break; case 16: vnx::read(in, value.node_commit, type_code, _field->code.data()); break; case 17: vnx::read(in, value.node_version, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::NetworkInfo& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_NetworkInfo; out.write_type_code(type_code); vnx::write_class_header<::mmx::NetworkInfo>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(93); vnx::write_value(_buf + 0, value.is_synced); vnx::write_value(_buf + 1, value.height); vnx::write_value(_buf + 5, value.vdf_height); vnx::write_value(_buf + 9, value.synced_since); vnx::write_value(_buf + 13, value.time_stamp); vnx::write_value(_buf + 21, value.time_diff); vnx::write_value(_buf + 29, value.space_diff); vnx::write_value(_buf + 37, value.block_reward); vnx::write_value(_buf + 45, value.total_space); vnx::write_value(_buf + 53, value.total_supply); vnx::write_value(_buf + 61, value.address_count); vnx::write_value(_buf + 69, value.vdf_speed); vnx::write_value(_buf + 77, value.block_size); vnx::write_value(_buf + 85, value.average_txfee); vnx::write(out, value.genesis_hash, type_code, type_code->fields[14].code.data()); vnx::write(out, value.name, type_code, type_code->fields[15].code.data()); vnx::write(out, value.node_commit, type_code, type_code->fields[16].code.data()); vnx::write(out, value.node_version, type_code, type_code->fields[17].code.data()); } void read(std::istream& in, ::mmx::NetworkInfo& value) { value.read(in); } void write(std::ostream& out, const ::mmx::NetworkInfo& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::NetworkInfo& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/NodeAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { NodeAsyncClient::NodeAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } NodeAsyncClient::NodeAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t NodeAsyncClient::get_params(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_params::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_get_params[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_network_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_network_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_get_network_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_genesis_hash(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_genesis_hash::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_get_genesis_hash[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_height(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_height::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_get_height[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_vdf_height(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_vdf_height::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_get_vdf_height[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_synced_height(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_synced_height::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_get_synced_height[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_synced_vdf_height(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_synced_vdf_height::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_get_synced_vdf_height[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_vdf_peak(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_vdf_peak::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_get_vdf_peak[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_block(const ::mmx::hash_t& hash, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_block::create(); _method->hash = hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_get_block[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_block_at(const uint32_t& height, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_block_at::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_get_block_at[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_header(const ::mmx::hash_t& hash, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_header::create(); _method->hash = hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_get_header[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_header_at(const uint32_t& height, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_header_at::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_get_header_at[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_block_hash(const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_block_hash::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 12; vnx_queue_get_block_hash[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_block_hash_ex(const uint32_t& height, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_block_hash_ex::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 13; vnx_queue_get_block_hash_ex[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_height(const ::mmx::hash_t& id, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_height::create(); _method->id = id; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 14; vnx_queue_get_tx_height[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_info(const ::mmx::hash_t& id, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_info::create(); _method->id = id; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 15; vnx_queue_get_tx_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_info_for(std::shared_ptr tx, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_info_for::create(); _method->tx = tx; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 16; vnx_queue_get_tx_info_for[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_ids(const uint32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_ids::create(); _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 17; vnx_queue_get_tx_ids[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_ids_at(const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_ids_at::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 18; vnx_queue_get_tx_ids_at[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_tx_ids_since(const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_tx_ids_since::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 19; vnx_queue_get_tx_ids_since[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::validate(std::shared_ptr tx, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_validate::create(); _method->tx = tx; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 20; vnx_queue_validate[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::add_block(std::shared_ptr block, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_add_block::create(); _method->block = block; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 21; vnx_queue_add_block[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::add_transaction(std::shared_ptr tx, const vnx::bool_t& pre_validate, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_add_transaction::create(); _method->tx = tx; _method->pre_validate = pre_validate; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 22; vnx_queue_add_transaction[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contract(const ::mmx::addr_t& address, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contract::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 23; vnx_queue_get_contract[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contract_for(const ::mmx::addr_t& address, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contract_for::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 24; vnx_queue_get_contract_for[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contracts(const std::vector<::mmx::addr_t>& addresses, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contracts::create(); _method->addresses = addresses; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 25; vnx_queue_get_contracts[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contracts_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contracts_by::create(); _method->addresses = addresses; _method->type_hash = type_hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 26; vnx_queue_get_contracts_by[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contracts_owned_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contracts_owned_by::create(); _method->addresses = addresses; _method->type_hash = type_hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 27; vnx_queue_get_contracts_owned_by[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_transaction(const ::mmx::hash_t& id, const vnx::bool_t& pending, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_transaction::create(); _method->id = id; _method->pending = pending; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 28; vnx_queue_get_transaction[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_transactions(const std::vector<::mmx::hash_t>& ids, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_transactions::create(); _method->ids = ids; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 29; vnx_queue_get_transactions[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_history(const std::vector<::mmx::addr_t>& addresses, const ::mmx::query_filter_t& filter, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_history::create(); _method->addresses = addresses; _method->filter = filter; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 30; vnx_queue_get_history[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_history_memo(const std::vector<::mmx::addr_t>& addresses, const std::string& memo, const ::mmx::query_filter_t& filter, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_history_memo::create(); _method->addresses = addresses; _method->memo = memo; _method->filter = filter; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 31; vnx_queue_get_history_memo[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_balance(const ::mmx::addr_t& address, const ::mmx::addr_t& currency, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_balance::create(); _method->address = address; _method->currency = currency; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 32; vnx_queue_get_balance[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_balances::create(); _method->address = address; _method->whitelist = whitelist; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 33; vnx_queue_get_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_contract_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_contract_balances::create(); _method->address = address; _method->whitelist = whitelist; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 34; vnx_queue_get_contract_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_total_balance(const std::vector<::mmx::addr_t>& addresses, const ::mmx::addr_t& currency, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_total_balance::create(); _method->addresses = addresses; _method->currency = currency; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 35; vnx_queue_get_total_balance[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_total_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_total_balances::create(); _method->addresses = addresses; _method->whitelist = whitelist; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 36; vnx_queue_get_total_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_all_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit, const std::function, ::mmx::uint128>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_all_balances::create(); _method->addresses = addresses; _method->whitelist = whitelist; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 37; vnx_queue_get_all_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_exec_history(const ::mmx::addr_t& address, const int32_t& limit, const vnx::bool_t& recent, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_exec_history::create(); _method->address = address; _method->limit = limit; _method->recent = recent; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 38; vnx_queue_get_exec_history[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage(const ::mmx::addr_t& contract, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage::create(); _method->contract = contract; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 39; vnx_queue_read_storage[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::dump_storage(const ::mmx::addr_t& contract, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_dump_storage::create(); _method->contract = contract; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 40; vnx_queue_dump_storage[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_var::create(); _method->contract = contract; _method->address = address; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 41; vnx_queue_read_storage_var[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_entry_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint64_t& key, const uint32_t& height, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_entry_var::create(); _method->contract = contract; _method->address = address; _method->key = key; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 42; vnx_queue_read_storage_entry_var[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_field(const ::mmx::addr_t& contract, const std::string& name, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_field::create(); _method->contract = contract; _method->name = name; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 43; vnx_queue_read_storage_field[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_entry_addr(const ::mmx::addr_t& contract, const std::string& name, const ::mmx::addr_t& key, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_entry_addr::create(); _method->contract = contract; _method->name = name; _method->key = key; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 44; vnx_queue_read_storage_entry_addr[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_entry_string(const ::mmx::addr_t& contract, const std::string& name, const std::string& key, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_entry_string::create(); _method->contract = contract; _method->name = name; _method->key = key; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 45; vnx_queue_read_storage_entry_string[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_array(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_array::create(); _method->contract = contract; _method->address = address; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 46; vnx_queue_read_storage_array[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_map(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_map::create(); _method->contract = contract; _method->address = address; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 47; vnx_queue_read_storage_map[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::read_storage_object(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_read_storage_object::create(); _method->contract = contract; _method->address = address; _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 48; vnx_queue_read_storage_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::call_contract(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional<::mmx::addr_t>& user, const vnx::optional>& deposit, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_call_contract::create(); _method->address = address; _method->method = method; _method->args = args; _method->user = user; _method->deposit = deposit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 49; vnx_queue_call_contract[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_plot_nft_info(const ::mmx::addr_t& address, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_plot_nft_info::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 50; vnx_queue_get_plot_nft_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_plot_nft_target(const ::mmx::addr_t& address, const vnx::optional<::mmx::addr_t>& farmer_addr, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_plot_nft_target::create(); _method->address = address; _method->farmer_addr = farmer_addr; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 51; vnx_queue_get_plot_nft_target[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_offer(const ::mmx::addr_t& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_offer::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 52; vnx_queue_get_offer[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_offers(const uint32_t& since, const vnx::bool_t& state, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_offers::create(); _method->since = since; _method->state = state; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 53; vnx_queue_get_offers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_offers_by(const std::vector<::mmx::addr_t>& owners, const vnx::bool_t& state, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_offers_by::create(); _method->owners = owners; _method->state = state; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 54; vnx_queue_get_offers_by[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::fetch_offers(const std::vector<::mmx::addr_t>& addresses, const vnx::bool_t& state, const vnx::bool_t& closed, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_fetch_offers::create(); _method->addresses = addresses; _method->state = state; _method->closed = closed; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 55; vnx_queue_fetch_offers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_recent_offers(const int32_t& limit, const vnx::bool_t& state, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_recent_offers::create(); _method->limit = limit; _method->state = state; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 56; vnx_queue_get_recent_offers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_recent_offers_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const ::mmx::uint128& min_bid, const int32_t& limit, const vnx::bool_t& state, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_recent_offers_for::create(); _method->bid = bid; _method->ask = ask; _method->min_bid = min_bid; _method->limit = limit; _method->state = state; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 57; vnx_queue_get_recent_offers_for[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_trade_history(const int32_t& limit, const uint32_t& since, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_trade_history::create(); _method->limit = limit; _method->since = since; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 58; vnx_queue_get_trade_history[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_trade_history_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const int32_t& limit, const uint32_t& since, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_trade_history_for::create(); _method->bid = bid; _method->ask = ask; _method->limit = limit; _method->since = since; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 59; vnx_queue_get_trade_history_for[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swaps(const uint32_t& since, const vnx::optional<::mmx::addr_t>& token, const vnx::optional<::mmx::addr_t>& currency, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swaps::create(); _method->since = since; _method->token = token; _method->currency = currency; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 60; vnx_queue_get_swaps[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_info(const ::mmx::addr_t& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_info::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 61; vnx_queue_get_swap_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_user_info(const ::mmx::addr_t& address, const ::mmx::addr_t& user, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_user_info::create(); _method->address = address; _method->user = user; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 62; vnx_queue_get_swap_user_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_history(const ::mmx::addr_t& address, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_history::create(); _method->address = address; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 63; vnx_queue_get_swap_history[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_trade_estimate(const ::mmx::addr_t& address, const uint32_t& i, const ::mmx::uint128& amount, const int32_t& num_iter, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_trade_estimate::create(); _method->address = address; _method->i = i; _method->amount = amount; _method->num_iter = num_iter; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 64; vnx_queue_get_swap_trade_estimate[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_fees_earned(const ::mmx::addr_t& address, const ::mmx::addr_t& user, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_fees_earned::create(); _method->address = address; _method->user = user; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 65; vnx_queue_get_swap_fees_earned[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_equivalent_liquidity(const ::mmx::addr_t& address, const ::mmx::addr_t& user, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_equivalent_liquidity::create(); _method->address = address; _method->user = user; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 66; vnx_queue_get_swap_equivalent_liquidity[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_swap_liquidity_by(const std::vector<::mmx::addr_t>& addresses, const std::function, 2>>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_swap_liquidity_by::create(); _method->addresses = addresses; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 67; vnx_queue_get_swap_liquidity_by[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_total_supply(const ::mmx::addr_t& currency, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_total_supply::create(); _method->currency = currency; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 68; vnx_queue_get_total_supply[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_farmed_blocks(const std::vector<::mmx::pubkey_t>& farmer_keys, const vnx::bool_t& full_blocks, const uint32_t& since, const int32_t& limit, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_farmed_blocks::create(); _method->farmer_keys = farmer_keys; _method->full_blocks = full_blocks; _method->since = since; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 69; vnx_queue_get_farmed_blocks[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_farmed_block_summary(const std::vector<::mmx::pubkey_t>& farmer_keys, const uint32_t& since, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_farmed_block_summary::create(); _method->farmer_keys = farmer_keys; _method->since = since; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 70; vnx_queue_get_farmed_block_summary[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::get_farmer_ranking(const int32_t& limit, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_get_farmer_ranking::create(); _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 71; vnx_queue_get_farmer_ranking[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::verify_plot_nft_target(const ::mmx::addr_t& address, const ::mmx::addr_t& pool_target, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_verify_plot_nft_target::create(); _method->address = address; _method->pool_target = pool_target; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 72; vnx_queue_verify_plot_nft_target[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::verify_partial(std::shared_ptr partial, const vnx::optional<::mmx::addr_t>& pool_target, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_verify_partial::create(); _method->partial = partial; _method->pool_target = pool_target; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 73; vnx_queue_verify_partial[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::start_sync(const vnx::bool_t& force, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_start_sync::create(); _method->force = force; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 74; vnx_queue_start_sync[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::revert_sync(const uint32_t& height, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Node_revert_sync::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 75; vnx_queue_revert_sync[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::http_request(std::shared_ptr request, const std::string& sub_path, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 76; vnx_queue_http_request[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 77; vnx_queue_http_request_chunk[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 78; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 79; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 80; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 81; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 82; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 83; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 84; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 85; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t NodeAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 86; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t NodeAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_get_params.find(_request_id); if(_iter != vnx_queue_get_params.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_params.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_get_network_info.find(_request_id); if(_iter != vnx_queue_get_network_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_network_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_get_genesis_hash.find(_request_id); if(_iter != vnx_queue_get_genesis_hash.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_genesis_hash.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_get_height.find(_request_id); if(_iter != vnx_queue_get_height.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_height.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_get_vdf_height.find(_request_id); if(_iter != vnx_queue_get_vdf_height.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_vdf_height.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_get_synced_height.find(_request_id); if(_iter != vnx_queue_get_synced_height.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_synced_height.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_get_synced_vdf_height.find(_request_id); if(_iter != vnx_queue_get_synced_vdf_height.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_synced_vdf_height.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_get_vdf_peak.find(_request_id); if(_iter != vnx_queue_get_vdf_peak.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_vdf_peak.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_get_block.find(_request_id); if(_iter != vnx_queue_get_block.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_block.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_get_block_at.find(_request_id); if(_iter != vnx_queue_get_block_at.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_block_at.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_get_header.find(_request_id); if(_iter != vnx_queue_get_header.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_header.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_get_header_at.find(_request_id); if(_iter != vnx_queue_get_header_at.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_header_at.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 12: { const auto _iter = vnx_queue_get_block_hash.find(_request_id); if(_iter != vnx_queue_get_block_hash.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_block_hash.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 13: { const auto _iter = vnx_queue_get_block_hash_ex.find(_request_id); if(_iter != vnx_queue_get_block_hash_ex.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_block_hash_ex.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 14: { const auto _iter = vnx_queue_get_tx_height.find(_request_id); if(_iter != vnx_queue_get_tx_height.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_height.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 15: { const auto _iter = vnx_queue_get_tx_info.find(_request_id); if(_iter != vnx_queue_get_tx_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 16: { const auto _iter = vnx_queue_get_tx_info_for.find(_request_id); if(_iter != vnx_queue_get_tx_info_for.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_info_for.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 17: { const auto _iter = vnx_queue_get_tx_ids.find(_request_id); if(_iter != vnx_queue_get_tx_ids.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_ids.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 18: { const auto _iter = vnx_queue_get_tx_ids_at.find(_request_id); if(_iter != vnx_queue_get_tx_ids_at.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_ids_at.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 19: { const auto _iter = vnx_queue_get_tx_ids_since.find(_request_id); if(_iter != vnx_queue_get_tx_ids_since.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_ids_since.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 20: { const auto _iter = vnx_queue_validate.find(_request_id); if(_iter != vnx_queue_validate.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_validate.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 21: { const auto _iter = vnx_queue_add_block.find(_request_id); if(_iter != vnx_queue_add_block.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_add_block.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 22: { const auto _iter = vnx_queue_add_transaction.find(_request_id); if(_iter != vnx_queue_add_transaction.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_add_transaction.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 23: { const auto _iter = vnx_queue_get_contract.find(_request_id); if(_iter != vnx_queue_get_contract.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contract.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 24: { const auto _iter = vnx_queue_get_contract_for.find(_request_id); if(_iter != vnx_queue_get_contract_for.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contract_for.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 25: { const auto _iter = vnx_queue_get_contracts.find(_request_id); if(_iter != vnx_queue_get_contracts.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contracts.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 26: { const auto _iter = vnx_queue_get_contracts_by.find(_request_id); if(_iter != vnx_queue_get_contracts_by.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contracts_by.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 27: { const auto _iter = vnx_queue_get_contracts_owned_by.find(_request_id); if(_iter != vnx_queue_get_contracts_owned_by.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contracts_owned_by.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 28: { const auto _iter = vnx_queue_get_transaction.find(_request_id); if(_iter != vnx_queue_get_transaction.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_transaction.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 29: { const auto _iter = vnx_queue_get_transactions.find(_request_id); if(_iter != vnx_queue_get_transactions.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_transactions.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 30: { const auto _iter = vnx_queue_get_history.find(_request_id); if(_iter != vnx_queue_get_history.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_history.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 31: { const auto _iter = vnx_queue_get_history_memo.find(_request_id); if(_iter != vnx_queue_get_history_memo.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_history_memo.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 32: { const auto _iter = vnx_queue_get_balance.find(_request_id); if(_iter != vnx_queue_get_balance.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_balance.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 33: { const auto _iter = vnx_queue_get_balances.find(_request_id); if(_iter != vnx_queue_get_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 34: { const auto _iter = vnx_queue_get_contract_balances.find(_request_id); if(_iter != vnx_queue_get_contract_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contract_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 35: { const auto _iter = vnx_queue_get_total_balance.find(_request_id); if(_iter != vnx_queue_get_total_balance.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_total_balance.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 36: { const auto _iter = vnx_queue_get_total_balances.find(_request_id); if(_iter != vnx_queue_get_total_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_total_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 37: { const auto _iter = vnx_queue_get_all_balances.find(_request_id); if(_iter != vnx_queue_get_all_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_all_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 38: { const auto _iter = vnx_queue_get_exec_history.find(_request_id); if(_iter != vnx_queue_get_exec_history.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_exec_history.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 39: { const auto _iter = vnx_queue_read_storage.find(_request_id); if(_iter != vnx_queue_read_storage.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 40: { const auto _iter = vnx_queue_dump_storage.find(_request_id); if(_iter != vnx_queue_dump_storage.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_dump_storage.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 41: { const auto _iter = vnx_queue_read_storage_var.find(_request_id); if(_iter != vnx_queue_read_storage_var.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_var.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 42: { const auto _iter = vnx_queue_read_storage_entry_var.find(_request_id); if(_iter != vnx_queue_read_storage_entry_var.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_entry_var.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 43: { const auto _iter = vnx_queue_read_storage_field.find(_request_id); if(_iter != vnx_queue_read_storage_field.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_field.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 44: { const auto _iter = vnx_queue_read_storage_entry_addr.find(_request_id); if(_iter != vnx_queue_read_storage_entry_addr.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_entry_addr.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 45: { const auto _iter = vnx_queue_read_storage_entry_string.find(_request_id); if(_iter != vnx_queue_read_storage_entry_string.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_entry_string.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 46: { const auto _iter = vnx_queue_read_storage_array.find(_request_id); if(_iter != vnx_queue_read_storage_array.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_array.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 47: { const auto _iter = vnx_queue_read_storage_map.find(_request_id); if(_iter != vnx_queue_read_storage_map.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_map.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 48: { const auto _iter = vnx_queue_read_storage_object.find(_request_id); if(_iter != vnx_queue_read_storage_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_read_storage_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 49: { const auto _iter = vnx_queue_call_contract.find(_request_id); if(_iter != vnx_queue_call_contract.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_call_contract.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 50: { const auto _iter = vnx_queue_get_plot_nft_info.find(_request_id); if(_iter != vnx_queue_get_plot_nft_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_plot_nft_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 51: { const auto _iter = vnx_queue_get_plot_nft_target.find(_request_id); if(_iter != vnx_queue_get_plot_nft_target.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_plot_nft_target.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 52: { const auto _iter = vnx_queue_get_offer.find(_request_id); if(_iter != vnx_queue_get_offer.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_offer.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 53: { const auto _iter = vnx_queue_get_offers.find(_request_id); if(_iter != vnx_queue_get_offers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_offers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 54: { const auto _iter = vnx_queue_get_offers_by.find(_request_id); if(_iter != vnx_queue_get_offers_by.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_offers_by.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 55: { const auto _iter = vnx_queue_fetch_offers.find(_request_id); if(_iter != vnx_queue_fetch_offers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_fetch_offers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 56: { const auto _iter = vnx_queue_get_recent_offers.find(_request_id); if(_iter != vnx_queue_get_recent_offers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_recent_offers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 57: { const auto _iter = vnx_queue_get_recent_offers_for.find(_request_id); if(_iter != vnx_queue_get_recent_offers_for.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_recent_offers_for.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 58: { const auto _iter = vnx_queue_get_trade_history.find(_request_id); if(_iter != vnx_queue_get_trade_history.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_trade_history.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 59: { const auto _iter = vnx_queue_get_trade_history_for.find(_request_id); if(_iter != vnx_queue_get_trade_history_for.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_trade_history_for.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 60: { const auto _iter = vnx_queue_get_swaps.find(_request_id); if(_iter != vnx_queue_get_swaps.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swaps.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 61: { const auto _iter = vnx_queue_get_swap_info.find(_request_id); if(_iter != vnx_queue_get_swap_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 62: { const auto _iter = vnx_queue_get_swap_user_info.find(_request_id); if(_iter != vnx_queue_get_swap_user_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_user_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 63: { const auto _iter = vnx_queue_get_swap_history.find(_request_id); if(_iter != vnx_queue_get_swap_history.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_history.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 64: { const auto _iter = vnx_queue_get_swap_trade_estimate.find(_request_id); if(_iter != vnx_queue_get_swap_trade_estimate.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_trade_estimate.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 65: { const auto _iter = vnx_queue_get_swap_fees_earned.find(_request_id); if(_iter != vnx_queue_get_swap_fees_earned.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_fees_earned.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 66: { const auto _iter = vnx_queue_get_swap_equivalent_liquidity.find(_request_id); if(_iter != vnx_queue_get_swap_equivalent_liquidity.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_equivalent_liquidity.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 67: { const auto _iter = vnx_queue_get_swap_liquidity_by.find(_request_id); if(_iter != vnx_queue_get_swap_liquidity_by.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_liquidity_by.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 68: { const auto _iter = vnx_queue_get_total_supply.find(_request_id); if(_iter != vnx_queue_get_total_supply.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_total_supply.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 69: { const auto _iter = vnx_queue_get_farmed_blocks.find(_request_id); if(_iter != vnx_queue_get_farmed_blocks.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farmed_blocks.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 70: { const auto _iter = vnx_queue_get_farmed_block_summary.find(_request_id); if(_iter != vnx_queue_get_farmed_block_summary.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farmed_block_summary.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 71: { const auto _iter = vnx_queue_get_farmer_ranking.find(_request_id); if(_iter != vnx_queue_get_farmer_ranking.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farmer_ranking.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 72: { const auto _iter = vnx_queue_verify_plot_nft_target.find(_request_id); if(_iter != vnx_queue_verify_plot_nft_target.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_verify_plot_nft_target.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 73: { const auto _iter = vnx_queue_verify_partial.find(_request_id); if(_iter != vnx_queue_verify_partial.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_verify_partial.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 74: { const auto _iter = vnx_queue_start_sync.find(_request_id); if(_iter != vnx_queue_start_sync.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_start_sync.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 75: { const auto _iter = vnx_queue_revert_sync.find(_request_id); if(_iter != vnx_queue_revert_sync.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_revert_sync.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 76: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter != vnx_queue_http_request.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 77: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter != vnx_queue_http_request_chunk.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 78: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 79: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 80: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 81: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 82: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 83: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 84: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 85: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 86: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t NodeAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("NodeAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_get_params.find(_request_id); if(_iter == vnx_queue_get_params.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_params.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 1: { const auto _iter = vnx_queue_get_network_info.find(_request_id); if(_iter == vnx_queue_get_network_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_network_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_get_genesis_hash.find(_request_id); if(_iter == vnx_queue_get_genesis_hash.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_genesis_hash.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::hash_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_get_height.find(_request_id); if(_iter == vnx_queue_get_height.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_height.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_get_vdf_height.find(_request_id); if(_iter == vnx_queue_get_vdf_height.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_vdf_height.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_get_synced_height.find(_request_id); if(_iter == vnx_queue_get_synced_height.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_synced_height.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_get_synced_vdf_height.find(_request_id); if(_iter == vnx_queue_get_synced_vdf_height.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_synced_vdf_height.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_get_vdf_peak.find(_request_id); if(_iter == vnx_queue_get_vdf_peak.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_vdf_peak.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::hash_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_get_block.find(_request_id); if(_iter == vnx_queue_get_block.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_block.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 9: { const auto _iter = vnx_queue_get_block_at.find(_request_id); if(_iter == vnx_queue_get_block_at.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_block_at.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 10: { const auto _iter = vnx_queue_get_header.find(_request_id); if(_iter == vnx_queue_get_header.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_header.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 11: { const auto _iter = vnx_queue_get_header_at.find(_request_id); if(_iter == vnx_queue_get_header_at.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_header_at.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 12: { const auto _iter = vnx_queue_get_block_hash.find(_request_id); if(_iter == vnx_queue_get_block_hash.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_block_hash.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 13: { const auto _iter = vnx_queue_get_block_hash_ex.find(_request_id); if(_iter == vnx_queue_get_block_hash_ex.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_block_hash_ex.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 14: { const auto _iter = vnx_queue_get_tx_height.find(_request_id); if(_iter == vnx_queue_get_tx_height.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_height.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 15: { const auto _iter = vnx_queue_get_tx_info.find(_request_id); if(_iter == vnx_queue_get_tx_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 16: { const auto _iter = vnx_queue_get_tx_info_for.find(_request_id); if(_iter == vnx_queue_get_tx_info_for.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_info_for.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 17: { const auto _iter = vnx_queue_get_tx_ids.find(_request_id); if(_iter == vnx_queue_get_tx_ids.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_ids.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 18: { const auto _iter = vnx_queue_get_tx_ids_at.find(_request_id); if(_iter == vnx_queue_get_tx_ids_at.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_ids_at.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 19: { const auto _iter = vnx_queue_get_tx_ids_since.find(_request_id); if(_iter == vnx_queue_get_tx_ids_since.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_ids_since.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 20: { const auto _iter = vnx_queue_validate.find(_request_id); if(_iter == vnx_queue_validate.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_validate.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::exec_result_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 21: { const auto _iter = vnx_queue_add_block.find(_request_id); if(_iter == vnx_queue_add_block.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_add_block.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 22: { const auto _iter = vnx_queue_add_transaction.find(_request_id); if(_iter == vnx_queue_add_transaction.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_add_transaction.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 23: { const auto _iter = vnx_queue_get_contract.find(_request_id); if(_iter == vnx_queue_get_contract.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contract.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 24: { const auto _iter = vnx_queue_get_contract_for.find(_request_id); if(_iter == vnx_queue_get_contract_for.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contract_for.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 25: { const auto _iter = vnx_queue_get_contracts.find(_request_id); if(_iter == vnx_queue_get_contracts.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contracts.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 26: { const auto _iter = vnx_queue_get_contracts_by.find(_request_id); if(_iter == vnx_queue_get_contracts_by.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contracts_by.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 27: { const auto _iter = vnx_queue_get_contracts_owned_by.find(_request_id); if(_iter == vnx_queue_get_contracts_owned_by.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contracts_owned_by.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 28: { const auto _iter = vnx_queue_get_transaction.find(_request_id); if(_iter == vnx_queue_get_transaction.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_transaction.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 29: { const auto _iter = vnx_queue_get_transactions.find(_request_id); if(_iter == vnx_queue_get_transactions.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_transactions.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 30: { const auto _iter = vnx_queue_get_history.find(_request_id); if(_iter == vnx_queue_get_history.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_history.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 31: { const auto _iter = vnx_queue_get_history_memo.find(_request_id); if(_iter == vnx_queue_get_history_memo.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_history_memo.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 32: { const auto _iter = vnx_queue_get_balance.find(_request_id); if(_iter == vnx_queue_get_balance.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_balance.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::uint128>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 33: { const auto _iter = vnx_queue_get_balances.find(_request_id); if(_iter == vnx_queue_get_balances.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 34: { const auto _iter = vnx_queue_get_contract_balances.find(_request_id); if(_iter == vnx_queue_get_contract_balances.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contract_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 35: { const auto _iter = vnx_queue_get_total_balance.find(_request_id); if(_iter == vnx_queue_get_total_balance.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_total_balance.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::uint128>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 36: { const auto _iter = vnx_queue_get_total_balances.find(_request_id); if(_iter == vnx_queue_get_total_balances.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_total_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 37: { const auto _iter = vnx_queue_get_all_balances.find(_request_id); if(_iter == vnx_queue_get_all_balances.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_all_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to, ::mmx::uint128>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 38: { const auto _iter = vnx_queue_get_exec_history.find(_request_id); if(_iter == vnx_queue_get_exec_history.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_exec_history.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 39: { const auto _iter = vnx_queue_read_storage.find(_request_id); if(_iter == vnx_queue_read_storage.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 40: { const auto _iter = vnx_queue_dump_storage.find(_request_id); if(_iter == vnx_queue_dump_storage.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_dump_storage.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 41: { const auto _iter = vnx_queue_read_storage_var.find(_request_id); if(_iter == vnx_queue_read_storage_var.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_var.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::vm::varptr_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 42: { const auto _iter = vnx_queue_read_storage_entry_var.find(_request_id); if(_iter == vnx_queue_read_storage_entry_var.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_entry_var.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::vm::varptr_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 43: { const auto _iter = vnx_queue_read_storage_field.find(_request_id); if(_iter == vnx_queue_read_storage_field.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_field.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 44: { const auto _iter = vnx_queue_read_storage_entry_addr.find(_request_id); if(_iter == vnx_queue_read_storage_entry_addr.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_entry_addr.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 45: { const auto _iter = vnx_queue_read_storage_entry_string.find(_request_id); if(_iter == vnx_queue_read_storage_entry_string.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_entry_string.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 46: { const auto _iter = vnx_queue_read_storage_array.find(_request_id); if(_iter == vnx_queue_read_storage_array.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_array.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 47: { const auto _iter = vnx_queue_read_storage_map.find(_request_id); if(_iter == vnx_queue_read_storage_map.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_map.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 48: { const auto _iter = vnx_queue_read_storage_object.find(_request_id); if(_iter == vnx_queue_read_storage_object.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_read_storage_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 49: { const auto _iter = vnx_queue_call_contract.find(_request_id); if(_iter == vnx_queue_call_contract.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_call_contract.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 50: { const auto _iter = vnx_queue_get_plot_nft_info.find(_request_id); if(_iter == vnx_queue_get_plot_nft_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_plot_nft_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 51: { const auto _iter = vnx_queue_get_plot_nft_target.find(_request_id); if(_iter == vnx_queue_get_plot_nft_target.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_plot_nft_target.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::addr_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 52: { const auto _iter = vnx_queue_get_offer.find(_request_id); if(_iter == vnx_queue_get_offer.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_offer.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::offer_data_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 53: { const auto _iter = vnx_queue_get_offers.find(_request_id); if(_iter == vnx_queue_get_offers.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_offers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 54: { const auto _iter = vnx_queue_get_offers_by.find(_request_id); if(_iter == vnx_queue_get_offers_by.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_offers_by.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 55: { const auto _iter = vnx_queue_fetch_offers.find(_request_id); if(_iter == vnx_queue_fetch_offers.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_fetch_offers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 56: { const auto _iter = vnx_queue_get_recent_offers.find(_request_id); if(_iter == vnx_queue_get_recent_offers.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_recent_offers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 57: { const auto _iter = vnx_queue_get_recent_offers_for.find(_request_id); if(_iter == vnx_queue_get_recent_offers_for.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_recent_offers_for.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 58: { const auto _iter = vnx_queue_get_trade_history.find(_request_id); if(_iter == vnx_queue_get_trade_history.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_trade_history.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 59: { const auto _iter = vnx_queue_get_trade_history_for.find(_request_id); if(_iter == vnx_queue_get_trade_history_for.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_trade_history_for.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 60: { const auto _iter = vnx_queue_get_swaps.find(_request_id); if(_iter == vnx_queue_get_swaps.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swaps.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 61: { const auto _iter = vnx_queue_get_swap_info.find(_request_id); if(_iter == vnx_queue_get_swap_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::swap_info_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 62: { const auto _iter = vnx_queue_get_swap_user_info.find(_request_id); if(_iter == vnx_queue_get_swap_user_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_user_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::swap_user_info_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 63: { const auto _iter = vnx_queue_get_swap_history.find(_request_id); if(_iter == vnx_queue_get_swap_history.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_history.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 64: { const auto _iter = vnx_queue_get_swap_trade_estimate.find(_request_id); if(_iter == vnx_queue_get_swap_trade_estimate.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_trade_estimate.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 65: { const auto _iter = vnx_queue_get_swap_fees_earned.find(_request_id); if(_iter == vnx_queue_get_swap_fees_earned.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_fees_earned.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 66: { const auto _iter = vnx_queue_get_swap_equivalent_liquidity.find(_request_id); if(_iter == vnx_queue_get_swap_equivalent_liquidity.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_equivalent_liquidity.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 67: { const auto _iter = vnx_queue_get_swap_liquidity_by.find(_request_id); if(_iter == vnx_queue_get_swap_liquidity_by.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_liquidity_by.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to, 2>>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 68: { const auto _iter = vnx_queue_get_total_supply.find(_request_id); if(_iter == vnx_queue_get_total_supply.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_total_supply.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::uint128>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 69: { const auto _iter = vnx_queue_get_farmed_blocks.find(_request_id); if(_iter == vnx_queue_get_farmed_blocks.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farmed_blocks.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 70: { const auto _iter = vnx_queue_get_farmed_block_summary.find(_request_id); if(_iter == vnx_queue_get_farmed_block_summary.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farmed_block_summary.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::farmed_block_summary_t>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 71: { const auto _iter = vnx_queue_get_farmer_ranking.find(_request_id); if(_iter == vnx_queue_get_farmer_ranking.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farmer_ranking.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 72: { const auto _iter = vnx_queue_verify_plot_nft_target.find(_request_id); if(_iter == vnx_queue_verify_plot_nft_target.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_verify_plot_nft_target.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 73: { const auto _iter = vnx_queue_verify_partial.find(_request_id); if(_iter == vnx_queue_verify_partial.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_verify_partial.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 74: { const auto _iter = vnx_queue_start_sync.find(_request_id); if(_iter == vnx_queue_start_sync.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_start_sync.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 75: { const auto _iter = vnx_queue_revert_sync.find(_request_id); if(_iter == vnx_queue_revert_sync.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_revert_sync.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 76: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter == vnx_queue_http_request.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 77: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter == vnx_queue_http_request_chunk.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 78: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 79: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 80: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 81: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 82: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 83: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } case 84: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 85: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 86: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("NodeAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("NodeAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("NodeAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/NodeBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 NodeBase::VNX_TYPE_HASH(0x289d7651582d76a3ull); const vnx::Hash64 NodeBase::VNX_CODE_HASH(0xda70f535dbe8e2eaull); NodeBase::NodeBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".input_vdfs", input_vdfs); vnx::read_config(vnx_name + ".input_votes", input_votes); vnx::read_config(vnx_name + ".input_proof", input_proof); vnx::read_config(vnx_name + ".input_blocks", input_blocks); vnx::read_config(vnx_name + ".input_transactions", input_transactions); vnx::read_config(vnx_name + ".input_timelord_vdfs", input_timelord_vdfs); vnx::read_config(vnx_name + ".input_harvester_proof", input_harvester_proof); vnx::read_config(vnx_name + ".input_vdf_points", input_vdf_points); vnx::read_config(vnx_name + ".output_verified_vdfs", output_verified_vdfs); vnx::read_config(vnx_name + ".output_verified_votes", output_verified_votes); vnx::read_config(vnx_name + ".output_verified_proof", output_verified_proof); vnx::read_config(vnx_name + ".output_verified_blocks", output_verified_blocks); vnx::read_config(vnx_name + ".output_verified_transactions", output_verified_transactions); vnx::read_config(vnx_name + ".output_committed_blocks", output_committed_blocks); vnx::read_config(vnx_name + ".output_transactions", output_transactions); vnx::read_config(vnx_name + ".output_interval_request", output_interval_request); vnx::read_config(vnx_name + ".output_challenges", output_challenges); vnx::read_config(vnx_name + ".output_vdf_points", output_vdf_points); vnx::read_config(vnx_name + ".output_votes", output_votes); vnx::read_config(vnx_name + ".max_queue_ms", max_queue_ms); vnx::read_config(vnx_name + ".update_interval_ms", update_interval_ms); vnx::read_config(vnx_name + ".validate_interval_ms", validate_interval_ms); vnx::read_config(vnx_name + ".sync_loss_delay", sync_loss_delay); vnx::read_config(vnx_name + ".max_history", max_history); vnx::read_config(vnx_name + ".max_tx_pool", max_tx_pool); vnx::read_config(vnx_name + ".max_tx_queue", max_tx_queue); vnx::read_config(vnx_name + ".max_sync_jobs", max_sync_jobs); vnx::read_config(vnx_name + ".max_sync_ahead", max_sync_ahead); vnx::read_config(vnx_name + ".num_sync_retries", num_sync_retries); vnx::read_config(vnx_name + ".revert_height", revert_height); vnx::read_config(vnx_name + ".num_threads", num_threads); vnx::read_config(vnx_name + ".num_db_threads", num_db_threads); vnx::read_config(vnx_name + ".num_api_threads", num_api_threads); vnx::read_config(vnx_name + ".commit_threshold", commit_threshold); vnx::read_config(vnx_name + ".max_future_sync", max_future_sync); vnx::read_config(vnx_name + ".max_vdf_verify_pending", max_vdf_verify_pending); vnx::read_config(vnx_name + ".opencl_device", opencl_device); vnx::read_config(vnx_name + ".opencl_device_name", opencl_device_name); vnx::read_config(vnx_name + ".do_sync", do_sync); vnx::read_config(vnx_name + ".show_warnings", show_warnings); vnx::read_config(vnx_name + ".vdf_slave_mode", vdf_slave_mode); vnx::read_config(vnx_name + ".run_tests", run_tests); vnx::read_config(vnx_name + ".exec_debug", exec_debug); vnx::read_config(vnx_name + ".exec_profile", exec_profile); vnx::read_config(vnx_name + ".exec_trace", exec_trace); vnx::read_config(vnx_name + ".storage_path", storage_path); vnx::read_config(vnx_name + ".database_path", database_path); vnx::read_config(vnx_name + ".router_name", router_name); vnx::read_config(vnx_name + ".mmx_usd_swap_addr", mmx_usd_swap_addr); vnx::read_config(vnx_name + ".metalsdev_api_key", metalsdev_api_key); } vnx::Hash64 NodeBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string NodeBase::get_type_name() const { return "mmx.Node"; } const vnx::TypeCode* NodeBase::get_type_code() const { return mmx::vnx_native_type_code_NodeBase; } void NodeBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_NodeBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, input_vdfs); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, input_votes); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, input_proof); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, input_blocks); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, input_transactions); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, input_timelord_vdfs); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, input_harvester_proof); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, input_vdf_points); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, output_verified_vdfs); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, output_verified_votes); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, output_verified_proof); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, output_verified_blocks); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, output_verified_transactions); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, output_committed_blocks); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, output_transactions); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, output_interval_request); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, output_challenges); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, output_vdf_points); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, output_votes); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, max_queue_ms); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, update_interval_ms); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, validate_interval_ms); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, sync_loss_delay); _visitor.type_field(_type_code->fields[23], 23); vnx::accept(_visitor, max_history); _visitor.type_field(_type_code->fields[24], 24); vnx::accept(_visitor, max_tx_pool); _visitor.type_field(_type_code->fields[25], 25); vnx::accept(_visitor, max_tx_queue); _visitor.type_field(_type_code->fields[26], 26); vnx::accept(_visitor, max_sync_jobs); _visitor.type_field(_type_code->fields[27], 27); vnx::accept(_visitor, max_sync_ahead); _visitor.type_field(_type_code->fields[28], 28); vnx::accept(_visitor, num_sync_retries); _visitor.type_field(_type_code->fields[29], 29); vnx::accept(_visitor, revert_height); _visitor.type_field(_type_code->fields[30], 30); vnx::accept(_visitor, num_threads); _visitor.type_field(_type_code->fields[31], 31); vnx::accept(_visitor, num_db_threads); _visitor.type_field(_type_code->fields[32], 32); vnx::accept(_visitor, num_api_threads); _visitor.type_field(_type_code->fields[33], 33); vnx::accept(_visitor, commit_threshold); _visitor.type_field(_type_code->fields[34], 34); vnx::accept(_visitor, max_future_sync); _visitor.type_field(_type_code->fields[35], 35); vnx::accept(_visitor, max_vdf_verify_pending); _visitor.type_field(_type_code->fields[36], 36); vnx::accept(_visitor, opencl_device); _visitor.type_field(_type_code->fields[37], 37); vnx::accept(_visitor, opencl_device_name); _visitor.type_field(_type_code->fields[38], 38); vnx::accept(_visitor, do_sync); _visitor.type_field(_type_code->fields[39], 39); vnx::accept(_visitor, show_warnings); _visitor.type_field(_type_code->fields[40], 40); vnx::accept(_visitor, vdf_slave_mode); _visitor.type_field(_type_code->fields[41], 41); vnx::accept(_visitor, run_tests); _visitor.type_field(_type_code->fields[42], 42); vnx::accept(_visitor, exec_debug); _visitor.type_field(_type_code->fields[43], 43); vnx::accept(_visitor, exec_profile); _visitor.type_field(_type_code->fields[44], 44); vnx::accept(_visitor, exec_trace); _visitor.type_field(_type_code->fields[45], 45); vnx::accept(_visitor, storage_path); _visitor.type_field(_type_code->fields[46], 46); vnx::accept(_visitor, database_path); _visitor.type_field(_type_code->fields[47], 47); vnx::accept(_visitor, router_name); _visitor.type_field(_type_code->fields[48], 48); vnx::accept(_visitor, mmx_usd_swap_addr); _visitor.type_field(_type_code->fields[49], 49); vnx::accept(_visitor, metalsdev_api_key); _visitor.type_end(*_type_code); } void NodeBase::write(std::ostream& _out) const { _out << "{"; _out << "\"input_vdfs\": "; vnx::write(_out, input_vdfs); _out << ", \"input_votes\": "; vnx::write(_out, input_votes); _out << ", \"input_proof\": "; vnx::write(_out, input_proof); _out << ", \"input_blocks\": "; vnx::write(_out, input_blocks); _out << ", \"input_transactions\": "; vnx::write(_out, input_transactions); _out << ", \"input_timelord_vdfs\": "; vnx::write(_out, input_timelord_vdfs); _out << ", \"input_harvester_proof\": "; vnx::write(_out, input_harvester_proof); _out << ", \"input_vdf_points\": "; vnx::write(_out, input_vdf_points); _out << ", \"output_verified_vdfs\": "; vnx::write(_out, output_verified_vdfs); _out << ", \"output_verified_votes\": "; vnx::write(_out, output_verified_votes); _out << ", \"output_verified_proof\": "; vnx::write(_out, output_verified_proof); _out << ", \"output_verified_blocks\": "; vnx::write(_out, output_verified_blocks); _out << ", \"output_verified_transactions\": "; vnx::write(_out, output_verified_transactions); _out << ", \"output_committed_blocks\": "; vnx::write(_out, output_committed_blocks); _out << ", \"output_transactions\": "; vnx::write(_out, output_transactions); _out << ", \"output_interval_request\": "; vnx::write(_out, output_interval_request); _out << ", \"output_challenges\": "; vnx::write(_out, output_challenges); _out << ", \"output_vdf_points\": "; vnx::write(_out, output_vdf_points); _out << ", \"output_votes\": "; vnx::write(_out, output_votes); _out << ", \"max_queue_ms\": "; vnx::write(_out, max_queue_ms); _out << ", \"update_interval_ms\": "; vnx::write(_out, update_interval_ms); _out << ", \"validate_interval_ms\": "; vnx::write(_out, validate_interval_ms); _out << ", \"sync_loss_delay\": "; vnx::write(_out, sync_loss_delay); _out << ", \"max_history\": "; vnx::write(_out, max_history); _out << ", \"max_tx_pool\": "; vnx::write(_out, max_tx_pool); _out << ", \"max_tx_queue\": "; vnx::write(_out, max_tx_queue); _out << ", \"max_sync_jobs\": "; vnx::write(_out, max_sync_jobs); _out << ", \"max_sync_ahead\": "; vnx::write(_out, max_sync_ahead); _out << ", \"num_sync_retries\": "; vnx::write(_out, num_sync_retries); _out << ", \"revert_height\": "; vnx::write(_out, revert_height); _out << ", \"num_threads\": "; vnx::write(_out, num_threads); _out << ", \"num_db_threads\": "; vnx::write(_out, num_db_threads); _out << ", \"num_api_threads\": "; vnx::write(_out, num_api_threads); _out << ", \"commit_threshold\": "; vnx::write(_out, commit_threshold); _out << ", \"max_future_sync\": "; vnx::write(_out, max_future_sync); _out << ", \"max_vdf_verify_pending\": "; vnx::write(_out, max_vdf_verify_pending); _out << ", \"opencl_device\": "; vnx::write(_out, opencl_device); _out << ", \"opencl_device_name\": "; vnx::write(_out, opencl_device_name); _out << ", \"do_sync\": "; vnx::write(_out, do_sync); _out << ", \"show_warnings\": "; vnx::write(_out, show_warnings); _out << ", \"vdf_slave_mode\": "; vnx::write(_out, vdf_slave_mode); _out << ", \"run_tests\": "; vnx::write(_out, run_tests); _out << ", \"exec_debug\": "; vnx::write(_out, exec_debug); _out << ", \"exec_profile\": "; vnx::write(_out, exec_profile); _out << ", \"exec_trace\": "; vnx::write(_out, exec_trace); _out << ", \"storage_path\": "; vnx::write(_out, storage_path); _out << ", \"database_path\": "; vnx::write(_out, database_path); _out << ", \"router_name\": "; vnx::write(_out, router_name); _out << ", \"mmx_usd_swap_addr\": "; vnx::write(_out, mmx_usd_swap_addr); _out << ", \"metalsdev_api_key\": "; vnx::write(_out, metalsdev_api_key); _out << "}"; } void NodeBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object NodeBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node"; _object["input_vdfs"] = input_vdfs; _object["input_votes"] = input_votes; _object["input_proof"] = input_proof; _object["input_blocks"] = input_blocks; _object["input_transactions"] = input_transactions; _object["input_timelord_vdfs"] = input_timelord_vdfs; _object["input_harvester_proof"] = input_harvester_proof; _object["input_vdf_points"] = input_vdf_points; _object["output_verified_vdfs"] = output_verified_vdfs; _object["output_verified_votes"] = output_verified_votes; _object["output_verified_proof"] = output_verified_proof; _object["output_verified_blocks"] = output_verified_blocks; _object["output_verified_transactions"] = output_verified_transactions; _object["output_committed_blocks"] = output_committed_blocks; _object["output_transactions"] = output_transactions; _object["output_interval_request"] = output_interval_request; _object["output_challenges"] = output_challenges; _object["output_vdf_points"] = output_vdf_points; _object["output_votes"] = output_votes; _object["max_queue_ms"] = max_queue_ms; _object["update_interval_ms"] = update_interval_ms; _object["validate_interval_ms"] = validate_interval_ms; _object["sync_loss_delay"] = sync_loss_delay; _object["max_history"] = max_history; _object["max_tx_pool"] = max_tx_pool; _object["max_tx_queue"] = max_tx_queue; _object["max_sync_jobs"] = max_sync_jobs; _object["max_sync_ahead"] = max_sync_ahead; _object["num_sync_retries"] = num_sync_retries; _object["revert_height"] = revert_height; _object["num_threads"] = num_threads; _object["num_db_threads"] = num_db_threads; _object["num_api_threads"] = num_api_threads; _object["commit_threshold"] = commit_threshold; _object["max_future_sync"] = max_future_sync; _object["max_vdf_verify_pending"] = max_vdf_verify_pending; _object["opencl_device"] = opencl_device; _object["opencl_device_name"] = opencl_device_name; _object["do_sync"] = do_sync; _object["show_warnings"] = show_warnings; _object["vdf_slave_mode"] = vdf_slave_mode; _object["run_tests"] = run_tests; _object["exec_debug"] = exec_debug; _object["exec_profile"] = exec_profile; _object["exec_trace"] = exec_trace; _object["storage_path"] = storage_path; _object["database_path"] = database_path; _object["router_name"] = router_name; _object["mmx_usd_swap_addr"] = mmx_usd_swap_addr; _object["metalsdev_api_key"] = metalsdev_api_key; return _object; } void NodeBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "commit_threshold") { _entry.second.to(commit_threshold); } else if(_entry.first == "database_path") { _entry.second.to(database_path); } else if(_entry.first == "do_sync") { _entry.second.to(do_sync); } else if(_entry.first == "exec_debug") { _entry.second.to(exec_debug); } else if(_entry.first == "exec_profile") { _entry.second.to(exec_profile); } else if(_entry.first == "exec_trace") { _entry.second.to(exec_trace); } else if(_entry.first == "input_blocks") { _entry.second.to(input_blocks); } else if(_entry.first == "input_harvester_proof") { _entry.second.to(input_harvester_proof); } else if(_entry.first == "input_proof") { _entry.second.to(input_proof); } else if(_entry.first == "input_timelord_vdfs") { _entry.second.to(input_timelord_vdfs); } else if(_entry.first == "input_transactions") { _entry.second.to(input_transactions); } else if(_entry.first == "input_vdf_points") { _entry.second.to(input_vdf_points); } else if(_entry.first == "input_vdfs") { _entry.second.to(input_vdfs); } else if(_entry.first == "input_votes") { _entry.second.to(input_votes); } else if(_entry.first == "max_future_sync") { _entry.second.to(max_future_sync); } else if(_entry.first == "max_history") { _entry.second.to(max_history); } else if(_entry.first == "max_queue_ms") { _entry.second.to(max_queue_ms); } else if(_entry.first == "max_sync_ahead") { _entry.second.to(max_sync_ahead); } else if(_entry.first == "max_sync_jobs") { _entry.second.to(max_sync_jobs); } else if(_entry.first == "max_tx_pool") { _entry.second.to(max_tx_pool); } else if(_entry.first == "max_tx_queue") { _entry.second.to(max_tx_queue); } else if(_entry.first == "max_vdf_verify_pending") { _entry.second.to(max_vdf_verify_pending); } else if(_entry.first == "metalsdev_api_key") { _entry.second.to(metalsdev_api_key); } else if(_entry.first == "mmx_usd_swap_addr") { _entry.second.to(mmx_usd_swap_addr); } else if(_entry.first == "num_api_threads") { _entry.second.to(num_api_threads); } else if(_entry.first == "num_db_threads") { _entry.second.to(num_db_threads); } else if(_entry.first == "num_sync_retries") { _entry.second.to(num_sync_retries); } else if(_entry.first == "num_threads") { _entry.second.to(num_threads); } else if(_entry.first == "opencl_device") { _entry.second.to(opencl_device); } else if(_entry.first == "opencl_device_name") { _entry.second.to(opencl_device_name); } else if(_entry.first == "output_challenges") { _entry.second.to(output_challenges); } else if(_entry.first == "output_committed_blocks") { _entry.second.to(output_committed_blocks); } else if(_entry.first == "output_interval_request") { _entry.second.to(output_interval_request); } else if(_entry.first == "output_transactions") { _entry.second.to(output_transactions); } else if(_entry.first == "output_vdf_points") { _entry.second.to(output_vdf_points); } else if(_entry.first == "output_verified_blocks") { _entry.second.to(output_verified_blocks); } else if(_entry.first == "output_verified_proof") { _entry.second.to(output_verified_proof); } else if(_entry.first == "output_verified_transactions") { _entry.second.to(output_verified_transactions); } else if(_entry.first == "output_verified_vdfs") { _entry.second.to(output_verified_vdfs); } else if(_entry.first == "output_verified_votes") { _entry.second.to(output_verified_votes); } else if(_entry.first == "output_votes") { _entry.second.to(output_votes); } else if(_entry.first == "revert_height") { _entry.second.to(revert_height); } else if(_entry.first == "router_name") { _entry.second.to(router_name); } else if(_entry.first == "run_tests") { _entry.second.to(run_tests); } else if(_entry.first == "show_warnings") { _entry.second.to(show_warnings); } else if(_entry.first == "storage_path") { _entry.second.to(storage_path); } else if(_entry.first == "sync_loss_delay") { _entry.second.to(sync_loss_delay); } else if(_entry.first == "update_interval_ms") { _entry.second.to(update_interval_ms); } else if(_entry.first == "validate_interval_ms") { _entry.second.to(validate_interval_ms); } else if(_entry.first == "vdf_slave_mode") { _entry.second.to(vdf_slave_mode); } } } vnx::Variant NodeBase::get_field(const std::string& _name) const { if(_name == "input_vdfs") { return vnx::Variant(input_vdfs); } if(_name == "input_votes") { return vnx::Variant(input_votes); } if(_name == "input_proof") { return vnx::Variant(input_proof); } if(_name == "input_blocks") { return vnx::Variant(input_blocks); } if(_name == "input_transactions") { return vnx::Variant(input_transactions); } if(_name == "input_timelord_vdfs") { return vnx::Variant(input_timelord_vdfs); } if(_name == "input_harvester_proof") { return vnx::Variant(input_harvester_proof); } if(_name == "input_vdf_points") { return vnx::Variant(input_vdf_points); } if(_name == "output_verified_vdfs") { return vnx::Variant(output_verified_vdfs); } if(_name == "output_verified_votes") { return vnx::Variant(output_verified_votes); } if(_name == "output_verified_proof") { return vnx::Variant(output_verified_proof); } if(_name == "output_verified_blocks") { return vnx::Variant(output_verified_blocks); } if(_name == "output_verified_transactions") { return vnx::Variant(output_verified_transactions); } if(_name == "output_committed_blocks") { return vnx::Variant(output_committed_blocks); } if(_name == "output_transactions") { return vnx::Variant(output_transactions); } if(_name == "output_interval_request") { return vnx::Variant(output_interval_request); } if(_name == "output_challenges") { return vnx::Variant(output_challenges); } if(_name == "output_vdf_points") { return vnx::Variant(output_vdf_points); } if(_name == "output_votes") { return vnx::Variant(output_votes); } if(_name == "max_queue_ms") { return vnx::Variant(max_queue_ms); } if(_name == "update_interval_ms") { return vnx::Variant(update_interval_ms); } if(_name == "validate_interval_ms") { return vnx::Variant(validate_interval_ms); } if(_name == "sync_loss_delay") { return vnx::Variant(sync_loss_delay); } if(_name == "max_history") { return vnx::Variant(max_history); } if(_name == "max_tx_pool") { return vnx::Variant(max_tx_pool); } if(_name == "max_tx_queue") { return vnx::Variant(max_tx_queue); } if(_name == "max_sync_jobs") { return vnx::Variant(max_sync_jobs); } if(_name == "max_sync_ahead") { return vnx::Variant(max_sync_ahead); } if(_name == "num_sync_retries") { return vnx::Variant(num_sync_retries); } if(_name == "revert_height") { return vnx::Variant(revert_height); } if(_name == "num_threads") { return vnx::Variant(num_threads); } if(_name == "num_db_threads") { return vnx::Variant(num_db_threads); } if(_name == "num_api_threads") { return vnx::Variant(num_api_threads); } if(_name == "commit_threshold") { return vnx::Variant(commit_threshold); } if(_name == "max_future_sync") { return vnx::Variant(max_future_sync); } if(_name == "max_vdf_verify_pending") { return vnx::Variant(max_vdf_verify_pending); } if(_name == "opencl_device") { return vnx::Variant(opencl_device); } if(_name == "opencl_device_name") { return vnx::Variant(opencl_device_name); } if(_name == "do_sync") { return vnx::Variant(do_sync); } if(_name == "show_warnings") { return vnx::Variant(show_warnings); } if(_name == "vdf_slave_mode") { return vnx::Variant(vdf_slave_mode); } if(_name == "run_tests") { return vnx::Variant(run_tests); } if(_name == "exec_debug") { return vnx::Variant(exec_debug); } if(_name == "exec_profile") { return vnx::Variant(exec_profile); } if(_name == "exec_trace") { return vnx::Variant(exec_trace); } if(_name == "storage_path") { return vnx::Variant(storage_path); } if(_name == "database_path") { return vnx::Variant(database_path); } if(_name == "router_name") { return vnx::Variant(router_name); } if(_name == "mmx_usd_swap_addr") { return vnx::Variant(mmx_usd_swap_addr); } if(_name == "metalsdev_api_key") { return vnx::Variant(metalsdev_api_key); } return vnx::Variant(); } void NodeBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "input_vdfs") { _value.to(input_vdfs); } else if(_name == "input_votes") { _value.to(input_votes); } else if(_name == "input_proof") { _value.to(input_proof); } else if(_name == "input_blocks") { _value.to(input_blocks); } else if(_name == "input_transactions") { _value.to(input_transactions); } else if(_name == "input_timelord_vdfs") { _value.to(input_timelord_vdfs); } else if(_name == "input_harvester_proof") { _value.to(input_harvester_proof); } else if(_name == "input_vdf_points") { _value.to(input_vdf_points); } else if(_name == "output_verified_vdfs") { _value.to(output_verified_vdfs); } else if(_name == "output_verified_votes") { _value.to(output_verified_votes); } else if(_name == "output_verified_proof") { _value.to(output_verified_proof); } else if(_name == "output_verified_blocks") { _value.to(output_verified_blocks); } else if(_name == "output_verified_transactions") { _value.to(output_verified_transactions); } else if(_name == "output_committed_blocks") { _value.to(output_committed_blocks); } else if(_name == "output_transactions") { _value.to(output_transactions); } else if(_name == "output_interval_request") { _value.to(output_interval_request); } else if(_name == "output_challenges") { _value.to(output_challenges); } else if(_name == "output_vdf_points") { _value.to(output_vdf_points); } else if(_name == "output_votes") { _value.to(output_votes); } else if(_name == "max_queue_ms") { _value.to(max_queue_ms); } else if(_name == "update_interval_ms") { _value.to(update_interval_ms); } else if(_name == "validate_interval_ms") { _value.to(validate_interval_ms); } else if(_name == "sync_loss_delay") { _value.to(sync_loss_delay); } else if(_name == "max_history") { _value.to(max_history); } else if(_name == "max_tx_pool") { _value.to(max_tx_pool); } else if(_name == "max_tx_queue") { _value.to(max_tx_queue); } else if(_name == "max_sync_jobs") { _value.to(max_sync_jobs); } else if(_name == "max_sync_ahead") { _value.to(max_sync_ahead); } else if(_name == "num_sync_retries") { _value.to(num_sync_retries); } else if(_name == "revert_height") { _value.to(revert_height); } else if(_name == "num_threads") { _value.to(num_threads); } else if(_name == "num_db_threads") { _value.to(num_db_threads); } else if(_name == "num_api_threads") { _value.to(num_api_threads); } else if(_name == "commit_threshold") { _value.to(commit_threshold); } else if(_name == "max_future_sync") { _value.to(max_future_sync); } else if(_name == "max_vdf_verify_pending") { _value.to(max_vdf_verify_pending); } else if(_name == "opencl_device") { _value.to(opencl_device); } else if(_name == "opencl_device_name") { _value.to(opencl_device_name); } else if(_name == "do_sync") { _value.to(do_sync); } else if(_name == "show_warnings") { _value.to(show_warnings); } else if(_name == "vdf_slave_mode") { _value.to(vdf_slave_mode); } else if(_name == "run_tests") { _value.to(run_tests); } else if(_name == "exec_debug") { _value.to(exec_debug); } else if(_name == "exec_profile") { _value.to(exec_profile); } else if(_name == "exec_trace") { _value.to(exec_trace); } else if(_name == "storage_path") { _value.to(storage_path); } else if(_name == "database_path") { _value.to(database_path); } else if(_name == "router_name") { _value.to(router_name); } else if(_name == "mmx_usd_swap_addr") { _value.to(mmx_usd_swap_addr); } else if(_name == "metalsdev_api_key") { _value.to(metalsdev_api_key); } } /// \private std::ostream& operator<<(std::ostream& _out, const NodeBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, NodeBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* NodeBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr NodeBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node"; type_code->type_hash = vnx::Hash64(0x289d7651582d76a3ull); type_code->code_hash = vnx::Hash64(0xda70f535dbe8e2eaull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::NodeBase); type_code->methods.resize(87); type_code->methods[0] = ::mmx::Node_add_block::static_get_type_code(); type_code->methods[1] = ::mmx::Node_add_transaction::static_get_type_code(); type_code->methods[2] = ::mmx::Node_call_contract::static_get_type_code(); type_code->methods[3] = ::mmx::Node_dump_storage::static_get_type_code(); type_code->methods[4] = ::mmx::Node_fetch_offers::static_get_type_code(); type_code->methods[5] = ::mmx::Node_get_all_balances::static_get_type_code(); type_code->methods[6] = ::mmx::Node_get_balance::static_get_type_code(); type_code->methods[7] = ::mmx::Node_get_balances::static_get_type_code(); type_code->methods[8] = ::mmx::Node_get_block::static_get_type_code(); type_code->methods[9] = ::mmx::Node_get_block_at::static_get_type_code(); type_code->methods[10] = ::mmx::Node_get_block_hash::static_get_type_code(); type_code->methods[11] = ::mmx::Node_get_block_hash_ex::static_get_type_code(); type_code->methods[12] = ::mmx::Node_get_contract::static_get_type_code(); type_code->methods[13] = ::mmx::Node_get_contract_balances::static_get_type_code(); type_code->methods[14] = ::mmx::Node_get_contract_for::static_get_type_code(); type_code->methods[15] = ::mmx::Node_get_contracts::static_get_type_code(); type_code->methods[16] = ::mmx::Node_get_contracts_by::static_get_type_code(); type_code->methods[17] = ::mmx::Node_get_contracts_owned_by::static_get_type_code(); type_code->methods[18] = ::mmx::Node_get_exec_history::static_get_type_code(); type_code->methods[19] = ::mmx::Node_get_farmed_block_summary::static_get_type_code(); type_code->methods[20] = ::mmx::Node_get_farmed_blocks::static_get_type_code(); type_code->methods[21] = ::mmx::Node_get_farmer_ranking::static_get_type_code(); type_code->methods[22] = ::mmx::Node_get_genesis_hash::static_get_type_code(); type_code->methods[23] = ::mmx::Node_get_header::static_get_type_code(); type_code->methods[24] = ::mmx::Node_get_header_at::static_get_type_code(); type_code->methods[25] = ::mmx::Node_get_height::static_get_type_code(); type_code->methods[26] = ::mmx::Node_get_history::static_get_type_code(); type_code->methods[27] = ::mmx::Node_get_history_memo::static_get_type_code(); type_code->methods[28] = ::mmx::Node_get_network_info::static_get_type_code(); type_code->methods[29] = ::mmx::Node_get_offer::static_get_type_code(); type_code->methods[30] = ::mmx::Node_get_offers::static_get_type_code(); type_code->methods[31] = ::mmx::Node_get_offers_by::static_get_type_code(); type_code->methods[32] = ::mmx::Node_get_params::static_get_type_code(); type_code->methods[33] = ::mmx::Node_get_plot_nft_info::static_get_type_code(); type_code->methods[34] = ::mmx::Node_get_plot_nft_target::static_get_type_code(); type_code->methods[35] = ::mmx::Node_get_recent_offers::static_get_type_code(); type_code->methods[36] = ::mmx::Node_get_recent_offers_for::static_get_type_code(); type_code->methods[37] = ::mmx::Node_get_swap_equivalent_liquidity::static_get_type_code(); type_code->methods[38] = ::mmx::Node_get_swap_fees_earned::static_get_type_code(); type_code->methods[39] = ::mmx::Node_get_swap_history::static_get_type_code(); type_code->methods[40] = ::mmx::Node_get_swap_info::static_get_type_code(); type_code->methods[41] = ::mmx::Node_get_swap_liquidity_by::static_get_type_code(); type_code->methods[42] = ::mmx::Node_get_swap_trade_estimate::static_get_type_code(); type_code->methods[43] = ::mmx::Node_get_swap_user_info::static_get_type_code(); type_code->methods[44] = ::mmx::Node_get_swaps::static_get_type_code(); type_code->methods[45] = ::mmx::Node_get_synced_height::static_get_type_code(); type_code->methods[46] = ::mmx::Node_get_synced_vdf_height::static_get_type_code(); type_code->methods[47] = ::mmx::Node_get_total_balance::static_get_type_code(); type_code->methods[48] = ::mmx::Node_get_total_balances::static_get_type_code(); type_code->methods[49] = ::mmx::Node_get_total_supply::static_get_type_code(); type_code->methods[50] = ::mmx::Node_get_trade_history::static_get_type_code(); type_code->methods[51] = ::mmx::Node_get_trade_history_for::static_get_type_code(); type_code->methods[52] = ::mmx::Node_get_transaction::static_get_type_code(); type_code->methods[53] = ::mmx::Node_get_transactions::static_get_type_code(); type_code->methods[54] = ::mmx::Node_get_tx_height::static_get_type_code(); type_code->methods[55] = ::mmx::Node_get_tx_ids::static_get_type_code(); type_code->methods[56] = ::mmx::Node_get_tx_ids_at::static_get_type_code(); type_code->methods[57] = ::mmx::Node_get_tx_ids_since::static_get_type_code(); type_code->methods[58] = ::mmx::Node_get_tx_info::static_get_type_code(); type_code->methods[59] = ::mmx::Node_get_tx_info_for::static_get_type_code(); type_code->methods[60] = ::mmx::Node_get_vdf_height::static_get_type_code(); type_code->methods[61] = ::mmx::Node_get_vdf_peak::static_get_type_code(); type_code->methods[62] = ::mmx::Node_read_storage::static_get_type_code(); type_code->methods[63] = ::mmx::Node_read_storage_array::static_get_type_code(); type_code->methods[64] = ::mmx::Node_read_storage_entry_addr::static_get_type_code(); type_code->methods[65] = ::mmx::Node_read_storage_entry_string::static_get_type_code(); type_code->methods[66] = ::mmx::Node_read_storage_entry_var::static_get_type_code(); type_code->methods[67] = ::mmx::Node_read_storage_field::static_get_type_code(); type_code->methods[68] = ::mmx::Node_read_storage_map::static_get_type_code(); type_code->methods[69] = ::mmx::Node_read_storage_object::static_get_type_code(); type_code->methods[70] = ::mmx::Node_read_storage_var::static_get_type_code(); type_code->methods[71] = ::mmx::Node_revert_sync::static_get_type_code(); type_code->methods[72] = ::mmx::Node_start_sync::static_get_type_code(); type_code->methods[73] = ::mmx::Node_validate::static_get_type_code(); type_code->methods[74] = ::mmx::Node_verify_partial::static_get_type_code(); type_code->methods[75] = ::mmx::Node_verify_plot_nft_target::static_get_type_code(); type_code->methods[76] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[77] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[78] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[79] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[80] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[81] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[82] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[83] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[84] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->methods[85] = ::vnx::addons::HttpComponent_http_request::static_get_type_code(); type_code->methods[86] = ::vnx::addons::HttpComponent_http_request_chunk::static_get_type_code(); type_code->fields.resize(50); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "input_vdfs"; field.value = vnx::to_string("network.vdfs"); field.code = {12, 5}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "input_votes"; field.value = vnx::to_string("network.votes"); field.code = {12, 5}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "input_proof"; field.value = vnx::to_string("network.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "input_blocks"; field.value = vnx::to_string("network.blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "input_transactions"; field.value = vnx::to_string("network.transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "input_timelord_vdfs"; field.value = vnx::to_string("timelord.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "input_harvester_proof"; field.value = vnx::to_string("farmer.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "input_vdf_points"; field.value = vnx::to_string("network.vdf_points"); field.code = {12, 5}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "output_verified_vdfs"; field.value = vnx::to_string("node.verified_vdfs"); field.code = {12, 5}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "output_verified_votes"; field.value = vnx::to_string("node.verified_votes"); field.code = {12, 5}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "output_verified_proof"; field.value = vnx::to_string("node.verified_proof"); field.code = {12, 5}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "output_verified_blocks"; field.value = vnx::to_string("node.verified_blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "output_verified_transactions"; field.value = vnx::to_string("node.verified_transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[13]; field.is_extended = true; field.name = "output_committed_blocks"; field.value = vnx::to_string("node.committed_blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "output_transactions"; field.value = vnx::to_string("node.transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "output_interval_request"; field.value = vnx::to_string("timelord.requests"); field.code = {12, 5}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "output_challenges"; field.value = vnx::to_string("harvester.challenges"); field.code = {12, 5}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "output_vdf_points"; field.value = vnx::to_string("node.vdf_points"); field.code = {12, 5}; } { auto& field = type_code->fields[18]; field.is_extended = true; field.name = "output_votes"; field.value = vnx::to_string("node.votes"); field.code = {12, 5}; } { auto& field = type_code->fields[19]; field.data_size = 4; field.name = "max_queue_ms"; field.value = vnx::to_string(10000); field.code = {7}; } { auto& field = type_code->fields[20]; field.data_size = 4; field.name = "update_interval_ms"; field.value = vnx::to_string(1000); field.code = {7}; } { auto& field = type_code->fields[21]; field.data_size = 4; field.name = "validate_interval_ms"; field.value = vnx::to_string(500); field.code = {7}; } { auto& field = type_code->fields[22]; field.data_size = 4; field.name = "sync_loss_delay"; field.value = vnx::to_string(60); field.code = {7}; } { auto& field = type_code->fields[23]; field.data_size = 4; field.name = "max_history"; field.value = vnx::to_string(1000); field.code = {3}; } { auto& field = type_code->fields[24]; field.data_size = 4; field.name = "max_tx_pool"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[25]; field.data_size = 4; field.name = "max_tx_queue"; field.value = vnx::to_string(10000); field.code = {3}; } { auto& field = type_code->fields[26]; field.data_size = 4; field.name = "max_sync_jobs"; field.value = vnx::to_string(64); field.code = {3}; } { auto& field = type_code->fields[27]; field.data_size = 4; field.name = "max_sync_ahead"; field.value = vnx::to_string(1000); field.code = {3}; } { auto& field = type_code->fields[28]; field.data_size = 4; field.name = "num_sync_retries"; field.value = vnx::to_string(3); field.code = {3}; } { auto& field = type_code->fields[29]; field.data_size = 4; field.name = "revert_height"; field.value = vnx::to_string(-1); field.code = {3}; } { auto& field = type_code->fields[30]; field.data_size = 4; field.name = "num_threads"; field.value = vnx::to_string(24); field.code = {3}; } { auto& field = type_code->fields[31]; field.data_size = 4; field.name = "num_db_threads"; field.value = vnx::to_string(8); field.code = {3}; } { auto& field = type_code->fields[32]; field.data_size = 4; field.name = "num_api_threads"; field.value = vnx::to_string(8); field.code = {3}; } { auto& field = type_code->fields[33]; field.data_size = 4; field.name = "commit_threshold"; field.value = vnx::to_string(80); field.code = {3}; } { auto& field = type_code->fields[34]; field.data_size = 4; field.name = "max_future_sync"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[35]; field.data_size = 4; field.name = "max_vdf_verify_pending"; field.value = vnx::to_string(2); field.code = {3}; } { auto& field = type_code->fields[36]; field.data_size = 4; field.name = "opencl_device"; field.value = vnx::to_string(0); field.code = {7}; } { auto& field = type_code->fields[37]; field.is_extended = true; field.name = "opencl_device_name"; field.code = {32}; } { auto& field = type_code->fields[38]; field.data_size = 1; field.name = "do_sync"; field.value = vnx::to_string(true); field.code = {31}; } { auto& field = type_code->fields[39]; field.data_size = 1; field.name = "show_warnings"; field.code = {31}; } { auto& field = type_code->fields[40]; field.data_size = 1; field.name = "vdf_slave_mode"; field.code = {31}; } { auto& field = type_code->fields[41]; field.data_size = 1; field.name = "run_tests"; field.code = {31}; } { auto& field = type_code->fields[42]; field.data_size = 1; field.name = "exec_debug"; field.code = {31}; } { auto& field = type_code->fields[43]; field.data_size = 1; field.name = "exec_profile"; field.code = {31}; } { auto& field = type_code->fields[44]; field.data_size = 1; field.name = "exec_trace"; field.code = {31}; } { auto& field = type_code->fields[45]; field.is_extended = true; field.name = "storage_path"; field.code = {32}; } { auto& field = type_code->fields[46]; field.is_extended = true; field.name = "database_path"; field.value = vnx::to_string("db/"); field.code = {32}; } { auto& field = type_code->fields[47]; field.is_extended = true; field.name = "router_name"; field.value = vnx::to_string("Router"); field.code = {32}; } { auto& field = type_code->fields[48]; field.is_extended = true; field.name = "mmx_usd_swap_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[49]; field.is_extended = true; field.name = "metalsdev_api_key"; field.code = {32}; } type_code->build(); return type_code; } void NodeBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0x94965d816d328467ull: handle(std::static_pointer_cast(_value)); return; case 0xa84a63942b8e5c6aull: handle(std::static_pointer_cast(_value)); return; case 0x816e898b36befae0ull: handle(std::static_pointer_cast(_value)); return; case 0xce0462acdceaa5bcull: handle(std::static_pointer_cast(_value)); return; case 0x1671551501b6c956ull: handle(std::static_pointer_cast(_value)); return; case 0xc056a2ff24cdee25ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr NodeBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x63abca4d23f93894ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_add_block_return::create(); add_block(_args->block); return _return_value; } case 0xd9782531c0e3f766ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_add_transaction_return::create(); add_transaction(_args->tx, _args->pre_validate); return _return_value; } case 0x6a21b0dfe3e541e8ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_call_contract_return::create(); _return_value->_ret_0 = call_contract(_args->address, _args->method, _args->args, _args->user, _args->deposit); return _return_value; } case 0x8b66a712eea839bbull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_dump_storage_return::create(); _return_value->_ret_0 = dump_storage(_args->contract, _args->height); return _return_value; } case 0xfca08ee41b997129ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_fetch_offers_return::create(); _return_value->_ret_0 = fetch_offers(_args->addresses, _args->state, _args->closed); return _return_value; } case 0xe099ac5aea49433ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_all_balances_return::create(); _return_value->_ret_0 = get_all_balances(_args->addresses, _args->whitelist, _args->limit); return _return_value; } case 0x2e00172d0470479ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_balance_return::create(); _return_value->_ret_0 = get_balance(_args->address, _args->currency); return _return_value; } case 0x1c8af02c41e96460ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_balances_return::create(); _return_value->_ret_0 = get_balances(_args->address, _args->whitelist, _args->limit); return _return_value; } case 0xeb3fabe56dec161aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_block_return::create(); _return_value->_ret_0 = get_block(_args->hash); return _return_value; } case 0xc69c9f876a00e48full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_block_at_return::create(); _return_value->_ret_0 = get_block_at(_args->height); return _return_value; } case 0x43c5087066b73f38ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_block_hash_return::create(); _return_value->_ret_0 = get_block_hash(_args->height); return _return_value; } case 0x6024ae54abca18cbull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_block_hash_ex_return::create(); _return_value->_ret_0 = get_block_hash_ex(_args->height); return _return_value; } case 0xa28704c65a67a293ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contract_return::create(); _return_value->_ret_0 = get_contract(_args->address); return _return_value; } case 0xeb1e66155927b13aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contract_balances_return::create(); _return_value->_ret_0 = get_contract_balances(_args->address, _args->whitelist, _args->limit); return _return_value; } case 0x6a953dcea83b9832ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contract_for_return::create(); _return_value->_ret_0 = get_contract_for(_args->address); return _return_value; } case 0x49e218583c1f1c8aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contracts_return::create(); _return_value->_ret_0 = get_contracts(_args->addresses); return _return_value; } case 0xe7c397362a63f57cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contracts_by_return::create(); _return_value->_ret_0 = get_contracts_by(_args->addresses, _args->type_hash); return _return_value; } case 0x63989a04fee2fba4ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_contracts_owned_by_return::create(); _return_value->_ret_0 = get_contracts_owned_by(_args->addresses, _args->type_hash); return _return_value; } case 0xf17c2f67bedb9df6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_exec_history_return::create(); _return_value->_ret_0 = get_exec_history(_args->address, _args->limit, _args->recent); return _return_value; } case 0xa6cda1247bd4f537ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_farmed_block_summary_return::create(); _return_value->_ret_0 = get_farmed_block_summary(_args->farmer_keys, _args->since); return _return_value; } case 0xfc412d06ff25542eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_farmed_blocks_return::create(); _return_value->_ret_0 = get_farmed_blocks(_args->farmer_keys, _args->full_blocks, _args->since, _args->limit); return _return_value; } case 0x548d571d6384bd43ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_farmer_ranking_return::create(); _return_value->_ret_0 = get_farmer_ranking(_args->limit); return _return_value; } case 0xbfab786cb64c5a3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_genesis_hash_return::create(); _return_value->_ret_0 = get_genesis_hash(); return _return_value; } case 0xf17a5d0c180db198ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_header_return::create(); _return_value->_ret_0 = get_header(_args->hash); return _return_value; } case 0x52658163d8767c79ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_header_at_return::create(); _return_value->_ret_0 = get_header_at(_args->height); return _return_value; } case 0x55f0d4ef7a117716ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_height_return::create(); _return_value->_ret_0 = get_height(); return _return_value; } case 0x8b3db05c6e91011dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_history_return::create(); _return_value->_ret_0 = get_history(_args->addresses, _args->filter); return _return_value; } case 0x693c0c791039287cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_history_memo_return::create(); _return_value->_ret_0 = get_history_memo(_args->addresses, _args->memo, _args->filter); return _return_value; } case 0x79cedc8662eeb2e4ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_network_info_return::create(); _return_value->_ret_0 = get_network_info(); return _return_value; } case 0xd3e336e279686563ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_offer_return::create(); _return_value->_ret_0 = get_offer(_args->address); return _return_value; } case 0x62e5e37dd72d3175ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_offers_return::create(); _return_value->_ret_0 = get_offers(_args->since, _args->state); return _return_value; } case 0xf83c55f59e407411ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_offers_by_return::create(); _return_value->_ret_0 = get_offers_by(_args->owners, _args->state); return _return_value; } case 0x6384b34900c2e465ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_params_return::create(); _return_value->_ret_0 = get_params(); return _return_value; } case 0x23efbfd355a3741full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_plot_nft_info_return::create(); _return_value->_ret_0 = get_plot_nft_info(_args->address); return _return_value; } case 0x14dfd6e2b1f3282eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_plot_nft_target_return::create(); _return_value->_ret_0 = get_plot_nft_target(_args->address, _args->farmer_addr); return _return_value; } case 0xfcd729efd0504fdeull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_recent_offers_return::create(); _return_value->_ret_0 = get_recent_offers(_args->limit, _args->state); return _return_value; } case 0xd89f845556eb17a0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_recent_offers_for_return::create(); _return_value->_ret_0 = get_recent_offers_for(_args->bid, _args->ask, _args->min_bid, _args->limit, _args->state); return _return_value; } case 0xc43a3083725aa480ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_equivalent_liquidity_return::create(); _return_value->_ret_0 = get_swap_equivalent_liquidity(_args->address, _args->user); return _return_value; } case 0x1dae57fb82265b93ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_fees_earned_return::create(); _return_value->_ret_0 = get_swap_fees_earned(_args->address, _args->user); return _return_value; } case 0xc16faaf15fcc9f36ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_history_return::create(); _return_value->_ret_0 = get_swap_history(_args->address, _args->limit); return _return_value; } case 0x14f546a807fae18cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_info_return::create(); _return_value->_ret_0 = get_swap_info(_args->address); return _return_value; } case 0x426cded100da751eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_liquidity_by_return::create(); _return_value->_ret_0 = get_swap_liquidity_by(_args->addresses); return _return_value; } case 0x1c3d2e0c3a431e9eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_trade_estimate_return::create(); _return_value->_ret_0 = get_swap_trade_estimate(_args->address, _args->i, _args->amount, _args->num_iter); return _return_value; } case 0xb92b8fb7df56ec0full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swap_user_info_return::create(); _return_value->_ret_0 = get_swap_user_info(_args->address, _args->user); return _return_value; } case 0x219bbb3e5dcd19eaull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_swaps_return::create(); _return_value->_ret_0 = get_swaps(_args->since, _args->token, _args->currency, _args->limit); return _return_value; } case 0xc4fb44ec3d1a8bb7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_synced_height_return::create(); _return_value->_ret_0 = get_synced_height(); return _return_value; } case 0x3c9ce92abd3b42c6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_synced_vdf_height_return::create(); _return_value->_ret_0 = get_synced_vdf_height(); return _return_value; } case 0x91e9019d224db4b0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_total_balance_return::create(); _return_value->_ret_0 = get_total_balance(_args->addresses, _args->currency); return _return_value; } case 0xf54c4ec46ee6053aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_total_balances_return::create(); _return_value->_ret_0 = get_total_balances(_args->addresses, _args->whitelist, _args->limit); return _return_value; } case 0x17d971db6900bd9dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_total_supply_return::create(); _return_value->_ret_0 = get_total_supply(_args->currency); return _return_value; } case 0x62736b035e3995cdull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_trade_history_return::create(); _return_value->_ret_0 = get_trade_history(_args->limit, _args->since); return _return_value; } case 0xd55cda633e3dd5b8ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_trade_history_for_return::create(); _return_value->_ret_0 = get_trade_history_for(_args->bid, _args->ask, _args->limit, _args->since); return _return_value; } case 0x9c76ca142292750full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_transaction_return::create(); _return_value->_ret_0 = get_transaction(_args->id, _args->pending); return _return_value; } case 0x715a5bb668426203ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_transactions_return::create(); _return_value->_ret_0 = get_transactions(_args->ids); return _return_value; } case 0xf6f917fad9361e3aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_height_return::create(); _return_value->_ret_0 = get_tx_height(_args->id); return _return_value; } case 0xe268e5bf2a7f22d6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_ids_return::create(); _return_value->_ret_0 = get_tx_ids(_args->limit); return _return_value; } case 0x904c686b59c101c3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_ids_at_return::create(); _return_value->_ret_0 = get_tx_ids_at(_args->height); return _return_value; } case 0x640af36b555e1606ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_ids_since_return::create(); _return_value->_ret_0 = get_tx_ids_since(_args->height); return _return_value; } case 0xb5409a3aaa19d1d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_info_return::create(); _return_value->_ret_0 = get_tx_info(_args->id); return _return_value; } case 0xba1c6e6eccfe9369ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_tx_info_for_return::create(); _return_value->_ret_0 = get_tx_info_for(_args->tx); return _return_value; } case 0x33db3aa655c4e5feull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_vdf_height_return::create(); _return_value->_ret_0 = get_vdf_height(); return _return_value; } case 0xf3449b43830283ddull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_get_vdf_peak_return::create(); _return_value->_ret_0 = get_vdf_peak(); return _return_value; } case 0xd74cd2b291cb9cd6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_return::create(); _return_value->_ret_0 = read_storage(_args->contract, _args->height); return _return_value; } case 0xe5826950ca0a442bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_array_return::create(); _return_value->_ret_0 = read_storage_array(_args->contract, _args->address, _args->height); return _return_value; } case 0xffbf8c4478bb5ab5ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_entry_addr_return::create(); _return_value->_ret_0 = read_storage_entry_addr(_args->contract, _args->name, _args->key, _args->height); return _return_value; } case 0xe5b52723a3714e9full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_entry_string_return::create(); _return_value->_ret_0 = read_storage_entry_string(_args->contract, _args->name, _args->key, _args->height); return _return_value; } case 0xb0ebcc688396e6dbull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_entry_var_return::create(); _return_value->_ret_0 = read_storage_entry_var(_args->contract, _args->address, _args->key, _args->height); return _return_value; } case 0xc9a10c9f7f2cef16ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_field_return::create(); _return_value->_ret_0 = read_storage_field(_args->contract, _args->name, _args->height); return _return_value; } case 0x1cc0cc12bc2c1b4eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_map_return::create(); _return_value->_ret_0 = read_storage_map(_args->contract, _args->address, _args->height); return _return_value; } case 0x5930cf36eeb662fbull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_object_return::create(); _return_value->_ret_0 = read_storage_object(_args->contract, _args->address, _args->height); return _return_value; } case 0x16d0361bcb359c2full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_read_storage_var_return::create(); _return_value->_ret_0 = read_storage_var(_args->contract, _args->address, _args->height); return _return_value; } case 0x8c1cc38a7a8a6c1dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_revert_sync_return::create(); revert_sync(_args->height); return _return_value; } case 0x6c5be8aeb25ef3c8ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_start_sync_return::create(); start_sync(_args->force); return _return_value; } case 0x95dbbd65f36b618ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_validate_return::create(); _return_value->_ret_0 = validate(_args->tx); return _return_value; } case 0xeb15396685387f88ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_verify_partial_return::create(); _return_value->_ret_0 = verify_partial(_args->partial, _args->pool_target); return _return_value; } case 0xf3ac786edcae50e1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Node_verify_plot_nft_target_return::create(); _return_value->_ret_0 = verify_plot_nft_target(_args->address, _args->pool_target); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } case 0xe0b6c38f619bad92ull: { auto _args = std::static_pointer_cast(_method); http_request_async(_args->request, _args->sub_path, _request_id); return nullptr; } case 0x97e79d08440406d5ull: { auto _args = std::static_pointer_cast(_method); http_request_chunk_async(_args->request, _args->sub_path, _args->offset, _args->max_bytes, _request_id); return nullptr; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void NodeBase::http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void NodeBase::http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_chunk_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[19]) { vnx::read_value(_buf + _field->offset, value.max_queue_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[20]) { vnx::read_value(_buf + _field->offset, value.update_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[21]) { vnx::read_value(_buf + _field->offset, value.validate_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[22]) { vnx::read_value(_buf + _field->offset, value.sync_loss_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[23]) { vnx::read_value(_buf + _field->offset, value.max_history, _field->code.data()); } if(const auto* const _field = type_code->field_map[24]) { vnx::read_value(_buf + _field->offset, value.max_tx_pool, _field->code.data()); } if(const auto* const _field = type_code->field_map[25]) { vnx::read_value(_buf + _field->offset, value.max_tx_queue, _field->code.data()); } if(const auto* const _field = type_code->field_map[26]) { vnx::read_value(_buf + _field->offset, value.max_sync_jobs, _field->code.data()); } if(const auto* const _field = type_code->field_map[27]) { vnx::read_value(_buf + _field->offset, value.max_sync_ahead, _field->code.data()); } if(const auto* const _field = type_code->field_map[28]) { vnx::read_value(_buf + _field->offset, value.num_sync_retries, _field->code.data()); } if(const auto* const _field = type_code->field_map[29]) { vnx::read_value(_buf + _field->offset, value.revert_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[30]) { vnx::read_value(_buf + _field->offset, value.num_threads, _field->code.data()); } if(const auto* const _field = type_code->field_map[31]) { vnx::read_value(_buf + _field->offset, value.num_db_threads, _field->code.data()); } if(const auto* const _field = type_code->field_map[32]) { vnx::read_value(_buf + _field->offset, value.num_api_threads, _field->code.data()); } if(const auto* const _field = type_code->field_map[33]) { vnx::read_value(_buf + _field->offset, value.commit_threshold, _field->code.data()); } if(const auto* const _field = type_code->field_map[34]) { vnx::read_value(_buf + _field->offset, value.max_future_sync, _field->code.data()); } if(const auto* const _field = type_code->field_map[35]) { vnx::read_value(_buf + _field->offset, value.max_vdf_verify_pending, _field->code.data()); } if(const auto* const _field = type_code->field_map[36]) { vnx::read_value(_buf + _field->offset, value.opencl_device, _field->code.data()); } if(const auto* const _field = type_code->field_map[38]) { vnx::read_value(_buf + _field->offset, value.do_sync, _field->code.data()); } if(const auto* const _field = type_code->field_map[39]) { vnx::read_value(_buf + _field->offset, value.show_warnings, _field->code.data()); } if(const auto* const _field = type_code->field_map[40]) { vnx::read_value(_buf + _field->offset, value.vdf_slave_mode, _field->code.data()); } if(const auto* const _field = type_code->field_map[41]) { vnx::read_value(_buf + _field->offset, value.run_tests, _field->code.data()); } if(const auto* const _field = type_code->field_map[42]) { vnx::read_value(_buf + _field->offset, value.exec_debug, _field->code.data()); } if(const auto* const _field = type_code->field_map[43]) { vnx::read_value(_buf + _field->offset, value.exec_profile, _field->code.data()); } if(const auto* const _field = type_code->field_map[44]) { vnx::read_value(_buf + _field->offset, value.exec_trace, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.input_vdfs, type_code, _field->code.data()); break; case 1: vnx::read(in, value.input_votes, type_code, _field->code.data()); break; case 2: vnx::read(in, value.input_proof, type_code, _field->code.data()); break; case 3: vnx::read(in, value.input_blocks, type_code, _field->code.data()); break; case 4: vnx::read(in, value.input_transactions, type_code, _field->code.data()); break; case 5: vnx::read(in, value.input_timelord_vdfs, type_code, _field->code.data()); break; case 6: vnx::read(in, value.input_harvester_proof, type_code, _field->code.data()); break; case 7: vnx::read(in, value.input_vdf_points, type_code, _field->code.data()); break; case 8: vnx::read(in, value.output_verified_vdfs, type_code, _field->code.data()); break; case 9: vnx::read(in, value.output_verified_votes, type_code, _field->code.data()); break; case 10: vnx::read(in, value.output_verified_proof, type_code, _field->code.data()); break; case 11: vnx::read(in, value.output_verified_blocks, type_code, _field->code.data()); break; case 12: vnx::read(in, value.output_verified_transactions, type_code, _field->code.data()); break; case 13: vnx::read(in, value.output_committed_blocks, type_code, _field->code.data()); break; case 14: vnx::read(in, value.output_transactions, type_code, _field->code.data()); break; case 15: vnx::read(in, value.output_interval_request, type_code, _field->code.data()); break; case 16: vnx::read(in, value.output_challenges, type_code, _field->code.data()); break; case 17: vnx::read(in, value.output_vdf_points, type_code, _field->code.data()); break; case 18: vnx::read(in, value.output_votes, type_code, _field->code.data()); break; case 37: vnx::read(in, value.opencl_device_name, type_code, _field->code.data()); break; case 45: vnx::read(in, value.storage_path, type_code, _field->code.data()); break; case 46: vnx::read(in, value.database_path, type_code, _field->code.data()); break; case 47: vnx::read(in, value.router_name, type_code, _field->code.data()); break; case 48: vnx::read(in, value.mmx_usd_swap_addr, type_code, _field->code.data()); break; case 49: vnx::read(in, value.metalsdev_api_key, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::NodeBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_NodeBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::NodeBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(79); vnx::write_value(_buf + 0, value.max_queue_ms); vnx::write_value(_buf + 4, value.update_interval_ms); vnx::write_value(_buf + 8, value.validate_interval_ms); vnx::write_value(_buf + 12, value.sync_loss_delay); vnx::write_value(_buf + 16, value.max_history); vnx::write_value(_buf + 20, value.max_tx_pool); vnx::write_value(_buf + 24, value.max_tx_queue); vnx::write_value(_buf + 28, value.max_sync_jobs); vnx::write_value(_buf + 32, value.max_sync_ahead); vnx::write_value(_buf + 36, value.num_sync_retries); vnx::write_value(_buf + 40, value.revert_height); vnx::write_value(_buf + 44, value.num_threads); vnx::write_value(_buf + 48, value.num_db_threads); vnx::write_value(_buf + 52, value.num_api_threads); vnx::write_value(_buf + 56, value.commit_threshold); vnx::write_value(_buf + 60, value.max_future_sync); vnx::write_value(_buf + 64, value.max_vdf_verify_pending); vnx::write_value(_buf + 68, value.opencl_device); vnx::write_value(_buf + 72, value.do_sync); vnx::write_value(_buf + 73, value.show_warnings); vnx::write_value(_buf + 74, value.vdf_slave_mode); vnx::write_value(_buf + 75, value.run_tests); vnx::write_value(_buf + 76, value.exec_debug); vnx::write_value(_buf + 77, value.exec_profile); vnx::write_value(_buf + 78, value.exec_trace); vnx::write(out, value.input_vdfs, type_code, type_code->fields[0].code.data()); vnx::write(out, value.input_votes, type_code, type_code->fields[1].code.data()); vnx::write(out, value.input_proof, type_code, type_code->fields[2].code.data()); vnx::write(out, value.input_blocks, type_code, type_code->fields[3].code.data()); vnx::write(out, value.input_transactions, type_code, type_code->fields[4].code.data()); vnx::write(out, value.input_timelord_vdfs, type_code, type_code->fields[5].code.data()); vnx::write(out, value.input_harvester_proof, type_code, type_code->fields[6].code.data()); vnx::write(out, value.input_vdf_points, type_code, type_code->fields[7].code.data()); vnx::write(out, value.output_verified_vdfs, type_code, type_code->fields[8].code.data()); vnx::write(out, value.output_verified_votes, type_code, type_code->fields[9].code.data()); vnx::write(out, value.output_verified_proof, type_code, type_code->fields[10].code.data()); vnx::write(out, value.output_verified_blocks, type_code, type_code->fields[11].code.data()); vnx::write(out, value.output_verified_transactions, type_code, type_code->fields[12].code.data()); vnx::write(out, value.output_committed_blocks, type_code, type_code->fields[13].code.data()); vnx::write(out, value.output_transactions, type_code, type_code->fields[14].code.data()); vnx::write(out, value.output_interval_request, type_code, type_code->fields[15].code.data()); vnx::write(out, value.output_challenges, type_code, type_code->fields[16].code.data()); vnx::write(out, value.output_vdf_points, type_code, type_code->fields[17].code.data()); vnx::write(out, value.output_votes, type_code, type_code->fields[18].code.data()); vnx::write(out, value.opencl_device_name, type_code, type_code->fields[37].code.data()); vnx::write(out, value.storage_path, type_code, type_code->fields[45].code.data()); vnx::write(out, value.database_path, type_code, type_code->fields[46].code.data()); vnx::write(out, value.router_name, type_code, type_code->fields[47].code.data()); vnx::write(out, value.mmx_usd_swap_addr, type_code, type_code->fields[48].code.data()); vnx::write(out, value.metalsdev_api_key, type_code, type_code->fields[49].code.data()); } void read(std::istream& in, ::mmx::NodeBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::NodeBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::NodeBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/NodeClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { NodeClient::NodeClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } NodeClient::NodeClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } std::shared_ptr NodeClient::get_params() { auto _method = ::mmx::Node_get_params::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_network_info() { auto _method = ::mmx::Node_get_network_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::hash_t NodeClient::get_genesis_hash() { auto _method = ::mmx::Node_get_genesis_hash::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::hash_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } uint32_t NodeClient::get_height() { auto _method = ::mmx::Node_get_height::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("NodeClient: invalid return value"); } } uint32_t NodeClient::get_vdf_height() { auto _method = ::mmx::Node_get_vdf_height::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional NodeClient::get_synced_height() { auto _method = ::mmx::Node_get_synced_height::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional NodeClient::get_synced_vdf_height() { auto _method = ::mmx::Node_get_synced_vdf_height::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::hash_t NodeClient::get_vdf_peak() { auto _method = ::mmx::Node_get_vdf_peak::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::hash_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_block(const ::mmx::hash_t& hash) { auto _method = ::mmx::Node_get_block::create(); _method->hash = hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_block_at(const uint32_t& height) { auto _method = ::mmx::Node_get_block_at::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_header(const ::mmx::hash_t& hash) { auto _method = ::mmx::Node_get_header::create(); _method->hash = hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_header_at(const uint32_t& height) { auto _method = ::mmx::Node_get_header_at::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional<::mmx::hash_t> NodeClient::get_block_hash(const uint32_t& height) { auto _method = ::mmx::Node_get_block_hash::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional> NodeClient::get_block_hash_ex(const uint32_t& height) { auto _method = ::mmx::Node_get_block_hash_ex::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional NodeClient::get_tx_height(const ::mmx::hash_t& id) { auto _method = ::mmx::Node_get_tx_height::create(); _method->id = id; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional<::mmx::tx_info_t> NodeClient::get_tx_info(const ::mmx::hash_t& id) { auto _method = ::mmx::Node_get_tx_info::create(); _method->id = id; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional<::mmx::tx_info_t> NodeClient::get_tx_info_for(std::shared_ptr tx) { auto _method = ::mmx::Node_get_tx_info_for::create(); _method->tx = tx; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::hash_t> NodeClient::get_tx_ids(const uint32_t& limit) { auto _method = ::mmx::Node_get_tx_ids::create(); _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::hash_t> NodeClient::get_tx_ids_at(const uint32_t& height) { auto _method = ::mmx::Node_get_tx_ids_at::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::hash_t> NodeClient::get_tx_ids_since(const uint32_t& height) { auto _method = ::mmx::Node_get_tx_ids_since::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::exec_result_t NodeClient::validate(std::shared_ptr tx) { auto _method = ::mmx::Node_validate::create(); _method->tx = tx; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::exec_result_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } void NodeClient::add_block(std::shared_ptr block) { auto _method = ::mmx::Node_add_block::create(); _method->block = block; vnx_request(_method, false); } void NodeClient::add_block_async(std::shared_ptr block) { auto _method = ::mmx::Node_add_block::create(); _method->block = block; vnx_request(_method, true); } void NodeClient::add_transaction(std::shared_ptr tx, const vnx::bool_t& pre_validate) { auto _method = ::mmx::Node_add_transaction::create(); _method->tx = tx; _method->pre_validate = pre_validate; vnx_request(_method, false); } void NodeClient::add_transaction_async(std::shared_ptr tx, const vnx::bool_t& pre_validate) { auto _method = ::mmx::Node_add_transaction::create(); _method->tx = tx; _method->pre_validate = pre_validate; vnx_request(_method, true); } std::shared_ptr NodeClient::get_contract(const ::mmx::addr_t& address) { auto _method = ::mmx::Node_get_contract::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_contract_for(const ::mmx::addr_t& address) { auto _method = ::mmx::Node_get_contract_for::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector> NodeClient::get_contracts(const std::vector<::mmx::addr_t>& addresses) { auto _method = ::mmx::Node_get_contracts::create(); _method->addresses = addresses; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::addr_t> NodeClient::get_contracts_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash) { auto _method = ::mmx::Node_get_contracts_by::create(); _method->addresses = addresses; _method->type_hash = type_hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::addr_t> NodeClient::get_contracts_owned_by(const std::vector<::mmx::addr_t>& addresses, const vnx::optional<::mmx::hash_t>& type_hash) { auto _method = ::mmx::Node_get_contracts_owned_by::create(); _method->addresses = addresses; _method->type_hash = type_hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::get_transaction(const ::mmx::hash_t& id, const vnx::bool_t& pending) { auto _method = ::mmx::Node_get_transaction::create(); _method->id = id; _method->pending = pending; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector> NodeClient::get_transactions(const std::vector<::mmx::hash_t>& ids) { auto _method = ::mmx::Node_get_transactions::create(); _method->ids = ids; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::tx_entry_t> NodeClient::get_history(const std::vector<::mmx::addr_t>& addresses, const ::mmx::query_filter_t& filter) { auto _method = ::mmx::Node_get_history::create(); _method->addresses = addresses; _method->filter = filter; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::tx_entry_t> NodeClient::get_history_memo(const std::vector<::mmx::addr_t>& addresses, const std::string& memo, const ::mmx::query_filter_t& filter) { auto _method = ::mmx::Node_get_history_memo::create(); _method->addresses = addresses; _method->memo = memo; _method->filter = filter; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::uint128 NodeClient::get_balance(const ::mmx::addr_t& address, const ::mmx::addr_t& currency) { auto _method = ::mmx::Node_get_balance::create(); _method->address = address; _method->currency = currency; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::uint128>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::uint128> NodeClient::get_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) { auto _method = ::mmx::Node_get_balances::create(); _method->address = address; _method->whitelist = whitelist; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::balance_t> NodeClient::get_contract_balances(const ::mmx::addr_t& address, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) { auto _method = ::mmx::Node_get_contract_balances::create(); _method->address = address; _method->whitelist = whitelist; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::uint128 NodeClient::get_total_balance(const std::vector<::mmx::addr_t>& addresses, const ::mmx::addr_t& currency) { auto _method = ::mmx::Node_get_total_balance::create(); _method->addresses = addresses; _method->currency = currency; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::uint128>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::uint128> NodeClient::get_total_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) { auto _method = ::mmx::Node_get_total_balances::create(); _method->addresses = addresses; _method->whitelist = whitelist; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map, ::mmx::uint128> NodeClient::get_all_balances(const std::vector<::mmx::addr_t>& addresses, const std::set<::mmx::addr_t>& whitelist, const int32_t& limit) { auto _method = ::mmx::Node_get_all_balances::create(); _method->addresses = addresses; _method->whitelist = whitelist; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to, ::mmx::uint128>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::exec_entry_t> NodeClient::get_exec_history(const ::mmx::addr_t& address, const int32_t& limit, const vnx::bool_t& recent) { auto _method = ::mmx::Node_get_exec_history::create(); _method->address = address; _method->limit = limit; _method->recent = recent; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map NodeClient::read_storage(const ::mmx::addr_t& contract, const uint32_t& height) { auto _method = ::mmx::Node_read_storage::create(); _method->contract = contract; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map NodeClient::dump_storage(const ::mmx::addr_t& contract, const uint32_t& height) { auto _method = ::mmx::Node_dump_storage::create(); _method->contract = contract; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::vm::varptr_t NodeClient::read_storage_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_var::create(); _method->contract = contract; _method->address = address; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::vm::varptr_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::vm::varptr_t NodeClient::read_storage_entry_var(const ::mmx::addr_t& contract, const uint64_t& address, const uint64_t& key, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_entry_var::create(); _method->contract = contract; _method->address = address; _method->key = key; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::vm::varptr_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::pair<::mmx::vm::varptr_t, uint64_t> NodeClient::read_storage_field(const ::mmx::addr_t& contract, const std::string& name, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_field::create(); _method->contract = contract; _method->name = name; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> NodeClient::read_storage_entry_addr(const ::mmx::addr_t& contract, const std::string& name, const ::mmx::addr_t& key, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_entry_addr::create(); _method->contract = contract; _method->name = name; _method->key = key; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::tuple<::mmx::vm::varptr_t, uint64_t, uint64_t> NodeClient::read_storage_entry_string(const ::mmx::addr_t& contract, const std::string& name, const std::string& key, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_entry_string::create(); _method->contract = contract; _method->name = name; _method->key = key; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::vm::varptr_t> NodeClient::read_storage_array(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_array::create(); _method->contract = contract; _method->address = address; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map<::mmx::vm::varptr_t, ::mmx::vm::varptr_t> NodeClient::read_storage_map(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_map::create(); _method->contract = contract; _method->address = address; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map NodeClient::read_storage_object(const ::mmx::addr_t& contract, const uint64_t& address, const uint32_t& height) { auto _method = ::mmx::Node_read_storage_object::create(); _method->contract = contract; _method->address = address; _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::vnx::Variant NodeClient::call_contract(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional<::mmx::addr_t>& user, const vnx::optional>& deposit) { auto _method = ::mmx::Node_call_contract::create(); _method->address = address; _method->method = method; _method->args = args; _method->user = user; _method->deposit = deposit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } vnx::optional<::mmx::plot_nft_info_t> NodeClient::get_plot_nft_info(const ::mmx::addr_t& address) { auto _method = ::mmx::Node_get_plot_nft_info::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::addr_t NodeClient::get_plot_nft_target(const ::mmx::addr_t& address, const vnx::optional<::mmx::addr_t>& farmer_addr) { auto _method = ::mmx::Node_get_plot_nft_target::create(); _method->address = address; _method->farmer_addr = farmer_addr; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::addr_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::offer_data_t NodeClient::get_offer(const ::mmx::addr_t& address) { auto _method = ::mmx::Node_get_offer::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::offer_data_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::offer_data_t> NodeClient::get_offers(const uint32_t& since, const vnx::bool_t& state) { auto _method = ::mmx::Node_get_offers::create(); _method->since = since; _method->state = state; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::offer_data_t> NodeClient::get_offers_by(const std::vector<::mmx::addr_t>& owners, const vnx::bool_t& state) { auto _method = ::mmx::Node_get_offers_by::create(); _method->owners = owners; _method->state = state; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::offer_data_t> NodeClient::fetch_offers(const std::vector<::mmx::addr_t>& addresses, const vnx::bool_t& state, const vnx::bool_t& closed) { auto _method = ::mmx::Node_fetch_offers::create(); _method->addresses = addresses; _method->state = state; _method->closed = closed; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::offer_data_t> NodeClient::get_recent_offers(const int32_t& limit, const vnx::bool_t& state) { auto _method = ::mmx::Node_get_recent_offers::create(); _method->limit = limit; _method->state = state; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::offer_data_t> NodeClient::get_recent_offers_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const ::mmx::uint128& min_bid, const int32_t& limit, const vnx::bool_t& state) { auto _method = ::mmx::Node_get_recent_offers_for::create(); _method->bid = bid; _method->ask = ask; _method->min_bid = min_bid; _method->limit = limit; _method->state = state; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::trade_entry_t> NodeClient::get_trade_history(const int32_t& limit, const uint32_t& since) { auto _method = ::mmx::Node_get_trade_history::create(); _method->limit = limit; _method->since = since; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::trade_entry_t> NodeClient::get_trade_history_for(const vnx::optional<::mmx::addr_t>& bid, const vnx::optional<::mmx::addr_t>& ask, const int32_t& limit, const uint32_t& since) { auto _method = ::mmx::Node_get_trade_history_for::create(); _method->bid = bid; _method->ask = ask; _method->limit = limit; _method->since = since; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::swap_info_t> NodeClient::get_swaps(const uint32_t& since, const vnx::optional<::mmx::addr_t>& token, const vnx::optional<::mmx::addr_t>& currency, const int32_t& limit) { auto _method = ::mmx::Node_get_swaps::create(); _method->since = since; _method->token = token; _method->currency = currency; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::swap_info_t NodeClient::get_swap_info(const ::mmx::addr_t& address) { auto _method = ::mmx::Node_get_swap_info::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::swap_info_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::swap_user_info_t NodeClient::get_swap_user_info(const ::mmx::addr_t& address, const ::mmx::addr_t& user) { auto _method = ::mmx::Node_get_swap_user_info::create(); _method->address = address; _method->user = user; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::swap_user_info_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector<::mmx::swap_entry_t> NodeClient::get_swap_history(const ::mmx::addr_t& address, const int32_t& limit) { auto _method = ::mmx::Node_get_swap_history::create(); _method->address = address; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::array<::mmx::uint128, 2> NodeClient::get_swap_trade_estimate(const ::mmx::addr_t& address, const uint32_t& i, const ::mmx::uint128& amount, const int32_t& num_iter) { auto _method = ::mmx::Node_get_swap_trade_estimate::create(); _method->address = address; _method->i = i; _method->amount = amount; _method->num_iter = num_iter; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::array<::mmx::uint128, 2> NodeClient::get_swap_fees_earned(const ::mmx::addr_t& address, const ::mmx::addr_t& user) { auto _method = ::mmx::Node_get_swap_fees_earned::create(); _method->address = address; _method->user = user; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::array<::mmx::uint128, 2> NodeClient::get_swap_equivalent_liquidity(const ::mmx::addr_t& address, const ::mmx::addr_t& user) { auto _method = ::mmx::Node_get_swap_equivalent_liquidity::create(); _method->address = address; _method->user = user; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::map<::mmx::addr_t, std::array, 2>> NodeClient::get_swap_liquidity_by(const std::vector<::mmx::addr_t>& addresses) { auto _method = ::mmx::Node_get_swap_liquidity_by::create(); _method->addresses = addresses; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to, 2>>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::uint128 NodeClient::get_total_supply(const ::mmx::addr_t& currency) { auto _method = ::mmx::Node_get_total_supply::create(); _method->currency = currency; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::uint128>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector> NodeClient::get_farmed_blocks(const std::vector<::mmx::pubkey_t>& farmer_keys, const vnx::bool_t& full_blocks, const uint32_t& since, const int32_t& limit) { auto _method = ::mmx::Node_get_farmed_blocks::create(); _method->farmer_keys = farmer_keys; _method->full_blocks = full_blocks; _method->since = since; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::mmx::farmed_block_summary_t NodeClient::get_farmed_block_summary(const std::vector<::mmx::pubkey_t>& farmer_keys, const uint32_t& since) { auto _method = ::mmx::Node_get_farmed_block_summary::create(); _method->farmer_keys = farmer_keys; _method->since = since; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::farmed_block_summary_t>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::vector> NodeClient::get_farmer_ranking(const int32_t& limit) { auto _method = ::mmx::Node_get_farmer_ranking::create(); _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::tuple<::mmx::pooling_error_e, std::string> NodeClient::verify_plot_nft_target(const ::mmx::addr_t& address, const ::mmx::addr_t& pool_target) { auto _method = ::mmx::Node_verify_plot_nft_target::create(); _method->address = address; _method->pool_target = pool_target; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::tuple<::mmx::pooling_error_e, std::string> NodeClient::verify_partial(std::shared_ptr partial, const vnx::optional<::mmx::addr_t>& pool_target) { auto _method = ::mmx::Node_verify_partial::create(); _method->partial = partial; _method->pool_target = pool_target; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } void NodeClient::start_sync(const vnx::bool_t& force) { auto _method = ::mmx::Node_start_sync::create(); _method->force = force; vnx_request(_method, false); } void NodeClient::start_sync_async(const vnx::bool_t& force) { auto _method = ::mmx::Node_start_sync::create(); _method->force = force; vnx_request(_method, true); } void NodeClient::revert_sync(const uint32_t& height) { auto _method = ::mmx::Node_revert_sync::create(); _method->height = height; vnx_request(_method, false); } void NodeClient::revert_sync_async(const uint32_t& height) { auto _method = ::mmx::Node_revert_sync::create(); _method->height = height; vnx_request(_method, true); } std::shared_ptr NodeClient::http_request(std::shared_ptr request, const std::string& sub_path) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::vnx::Object NodeClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } ::vnx::Variant NodeClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } void NodeClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void NodeClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void NodeClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void NodeClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode NodeClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } std::shared_ptr NodeClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("NodeClient: invalid return value"); } } void NodeClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void NodeClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void NodeClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void NodeClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t NodeClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("NodeClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/Node_add_block.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_add_block::VNX_TYPE_HASH(0x63abca4d23f93894ull); const vnx::Hash64 Node_add_block::VNX_CODE_HASH(0x99de46a219d8c44eull); vnx::Hash64 Node_add_block::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_add_block::get_type_name() const { return "mmx.Node.add_block"; } const vnx::TypeCode* Node_add_block::get_type_code() const { return mmx::vnx_native_type_code_Node_add_block; } std::shared_ptr Node_add_block::create() { return std::make_shared(); } std::shared_ptr Node_add_block::clone() const { return std::make_shared(*this); } void Node_add_block::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_add_block::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_add_block::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_add_block; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, block); _visitor.type_end(*_type_code); } void Node_add_block::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.add_block\""; _out << ", \"block\": "; vnx::write(_out, block); _out << "}"; } void Node_add_block::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_add_block::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.add_block"; _object["block"] = block; return _object; } void Node_add_block::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "block") { _entry.second.to(block); } } } vnx::Variant Node_add_block::get_field(const std::string& _name) const { if(_name == "block") { return vnx::Variant(block); } return vnx::Variant(); } void Node_add_block::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "block") { _value.to(block); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_add_block& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_add_block& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_add_block::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_add_block::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.add_block"; type_code->type_hash = vnx::Hash64(0x63abca4d23f93894ull); type_code->code_hash = vnx::Hash64(0x99de46a219d8c44eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_add_block); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Node_add_block_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "block"; field.code = {16}; } type_code->permission = "vnx.permission_e.PUBLISH"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.block, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_add_block& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_add_block; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_add_block>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.block, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_add_block& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_add_block& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_add_block& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_add_block_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_add_block_return::VNX_TYPE_HASH(0xb6d1115db03a6d6aull); const vnx::Hash64 Node_add_block_return::VNX_CODE_HASH(0x2eafd3f9c9f22a3bull); vnx::Hash64 Node_add_block_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_add_block_return::get_type_name() const { return "mmx.Node.add_block.return"; } const vnx::TypeCode* Node_add_block_return::get_type_code() const { return mmx::vnx_native_type_code_Node_add_block_return; } std::shared_ptr Node_add_block_return::create() { return std::make_shared(); } std::shared_ptr Node_add_block_return::clone() const { return std::make_shared(*this); } void Node_add_block_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_add_block_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_add_block_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_add_block_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_add_block_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.add_block.return\""; _out << "}"; } void Node_add_block_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_add_block_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.add_block.return"; return _object; } void Node_add_block_return::from_object(const vnx::Object& _object) { } vnx::Variant Node_add_block_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_add_block_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_add_block_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_add_block_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_add_block_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_add_block_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.add_block.return"; type_code->type_hash = vnx::Hash64(0xb6d1115db03a6d6aull); type_code->code_hash = vnx::Hash64(0x2eafd3f9c9f22a3bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_add_block_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_add_block_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_add_block_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_add_block_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_add_block_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_add_block_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_add_block_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_add_transaction.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_add_transaction::VNX_TYPE_HASH(0xd9782531c0e3f766ull); const vnx::Hash64 Node_add_transaction::VNX_CODE_HASH(0xe79464bfffb7995bull); vnx::Hash64 Node_add_transaction::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_add_transaction::get_type_name() const { return "mmx.Node.add_transaction"; } const vnx::TypeCode* Node_add_transaction::get_type_code() const { return mmx::vnx_native_type_code_Node_add_transaction; } std::shared_ptr Node_add_transaction::create() { return std::make_shared(); } std::shared_ptr Node_add_transaction::clone() const { return std::make_shared(*this); } void Node_add_transaction::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_add_transaction::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_add_transaction::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_add_transaction; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, tx); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, pre_validate); _visitor.type_end(*_type_code); } void Node_add_transaction::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.add_transaction\""; _out << ", \"tx\": "; vnx::write(_out, tx); _out << ", \"pre_validate\": "; vnx::write(_out, pre_validate); _out << "}"; } void Node_add_transaction::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_add_transaction::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.add_transaction"; _object["tx"] = tx; _object["pre_validate"] = pre_validate; return _object; } void Node_add_transaction::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "pre_validate") { _entry.second.to(pre_validate); } else if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Node_add_transaction::get_field(const std::string& _name) const { if(_name == "tx") { return vnx::Variant(tx); } if(_name == "pre_validate") { return vnx::Variant(pre_validate); } return vnx::Variant(); } void Node_add_transaction::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "tx") { _value.to(tx); } else if(_name == "pre_validate") { _value.to(pre_validate); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_add_transaction& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_add_transaction& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_add_transaction::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_add_transaction::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.add_transaction"; type_code->type_hash = vnx::Hash64(0xd9782531c0e3f766ull); type_code->code_hash = vnx::Hash64(0xe79464bfffb7995bull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_add_transaction); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Node_add_transaction_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "tx"; field.code = {16}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "pre_validate"; field.code = {31}; } type_code->permission = "vnx.permission_e.PUBLISH"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.pre_validate, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.tx, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_add_transaction& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_add_transaction; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_add_transaction>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.pre_validate); vnx::write(out, value.tx, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_add_transaction& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_add_transaction& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_add_transaction& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_add_transaction_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_add_transaction_return::VNX_TYPE_HASH(0x2ded8c10e1721ba8ull); const vnx::Hash64 Node_add_transaction_return::VNX_CODE_HASH(0x90f6d45cc2a14813ull); vnx::Hash64 Node_add_transaction_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_add_transaction_return::get_type_name() const { return "mmx.Node.add_transaction.return"; } const vnx::TypeCode* Node_add_transaction_return::get_type_code() const { return mmx::vnx_native_type_code_Node_add_transaction_return; } std::shared_ptr Node_add_transaction_return::create() { return std::make_shared(); } std::shared_ptr Node_add_transaction_return::clone() const { return std::make_shared(*this); } void Node_add_transaction_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_add_transaction_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_add_transaction_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_add_transaction_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_add_transaction_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.add_transaction.return\""; _out << "}"; } void Node_add_transaction_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_add_transaction_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.add_transaction.return"; return _object; } void Node_add_transaction_return::from_object(const vnx::Object& _object) { } vnx::Variant Node_add_transaction_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_add_transaction_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_add_transaction_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_add_transaction_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_add_transaction_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_add_transaction_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.add_transaction.return"; type_code->type_hash = vnx::Hash64(0x2ded8c10e1721ba8ull); type_code->code_hash = vnx::Hash64(0x90f6d45cc2a14813ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_add_transaction_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_add_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_add_transaction_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_add_transaction_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_add_transaction_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_add_transaction_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_add_transaction_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_call_contract.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_call_contract::VNX_TYPE_HASH(0x6a21b0dfe3e541e8ull); const vnx::Hash64 Node_call_contract::VNX_CODE_HASH(0x66777d15263b1ed3ull); vnx::Hash64 Node_call_contract::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_call_contract::get_type_name() const { return "mmx.Node.call_contract"; } const vnx::TypeCode* Node_call_contract::get_type_code() const { return mmx::vnx_native_type_code_Node_call_contract; } std::shared_ptr Node_call_contract::create() { return std::make_shared(); } std::shared_ptr Node_call_contract::clone() const { return std::make_shared(*this); } void Node_call_contract::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_call_contract::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_call_contract::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_call_contract; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, user); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, deposit); _visitor.type_end(*_type_code); } void Node_call_contract::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.call_contract\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"user\": "; vnx::write(_out, user); _out << ", \"deposit\": "; vnx::write(_out, deposit); _out << "}"; } void Node_call_contract::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_call_contract::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.call_contract"; _object["address"] = address; _object["method"] = method; _object["args"] = args; _object["user"] = user; _object["deposit"] = deposit; return _object; } void Node_call_contract::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "deposit") { _entry.second.to(deposit); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant Node_call_contract::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "user") { return vnx::Variant(user); } if(_name == "deposit") { return vnx::Variant(deposit); } return vnx::Variant(); } void Node_call_contract::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "user") { _value.to(user); } else if(_name == "deposit") { _value.to(deposit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_call_contract& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_call_contract& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_call_contract::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_call_contract::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.call_contract"; type_code->type_hash = vnx::Hash64(0x6a21b0dfe3e541e8ull); type_code->code_hash = vnx::Hash64(0x66777d15263b1ed3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_call_contract); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_call_contract_return::static_get_type_code(); type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "deposit"; field.code = {33, 23, 2, 4, 7, 11, 32, 1, 11, 16, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.method, type_code, _field->code.data()); break; case 2: vnx::read(in, value.args, type_code, _field->code.data()); break; case 3: vnx::read(in, value.user, type_code, _field->code.data()); break; case 4: vnx::read(in, value.deposit, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_call_contract& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_call_contract; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_call_contract>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.method, type_code, type_code->fields[1].code.data()); vnx::write(out, value.args, type_code, type_code->fields[2].code.data()); vnx::write(out, value.user, type_code, type_code->fields[3].code.data()); vnx::write(out, value.deposit, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::Node_call_contract& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_call_contract& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_call_contract& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_call_contract_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_call_contract_return::VNX_TYPE_HASH(0x8449f6656a89f7aeull); const vnx::Hash64 Node_call_contract_return::VNX_CODE_HASH(0x209e4899b64e81b0ull); vnx::Hash64 Node_call_contract_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_call_contract_return::get_type_name() const { return "mmx.Node.call_contract.return"; } const vnx::TypeCode* Node_call_contract_return::get_type_code() const { return mmx::vnx_native_type_code_Node_call_contract_return; } std::shared_ptr Node_call_contract_return::create() { return std::make_shared(); } std::shared_ptr Node_call_contract_return::clone() const { return std::make_shared(*this); } void Node_call_contract_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_call_contract_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_call_contract_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_call_contract_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_call_contract_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.call_contract.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_call_contract_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_call_contract_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.call_contract.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_call_contract_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_call_contract_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_call_contract_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_call_contract_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_call_contract_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_call_contract_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_call_contract_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.call_contract.return"; type_code->type_hash = vnx::Hash64(0x8449f6656a89f7aeull); type_code->code_hash = vnx::Hash64(0x209e4899b64e81b0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_call_contract_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {17}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_call_contract_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_call_contract_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_call_contract_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_call_contract_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_call_contract_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_call_contract_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_dump_storage.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_dump_storage::VNX_TYPE_HASH(0x8b66a712eea839bbull); const vnx::Hash64 Node_dump_storage::VNX_CODE_HASH(0x78f82c80cd112c97ull); vnx::Hash64 Node_dump_storage::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_dump_storage::get_type_name() const { return "mmx.Node.dump_storage"; } const vnx::TypeCode* Node_dump_storage::get_type_code() const { return mmx::vnx_native_type_code_Node_dump_storage; } std::shared_ptr Node_dump_storage::create() { return std::make_shared(); } std::shared_ptr Node_dump_storage::clone() const { return std::make_shared(*this); } void Node_dump_storage::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_dump_storage::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_dump_storage::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_dump_storage; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_dump_storage::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.dump_storage\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_dump_storage::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_dump_storage::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.dump_storage"; _object["contract"] = contract; _object["height"] = height; return _object; } void Node_dump_storage::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_dump_storage::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_dump_storage::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_dump_storage& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_dump_storage& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_dump_storage::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_dump_storage::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.dump_storage"; type_code->type_hash = vnx::Hash64(0x8b66a712eea839bbull); type_code->code_hash = vnx::Hash64(0x78f82c80cd112c97ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_dump_storage); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_dump_storage_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_dump_storage& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_dump_storage; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_dump_storage>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_dump_storage& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_dump_storage& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_dump_storage& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_dump_storage_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_dump_storage_return::VNX_TYPE_HASH(0xbc8c0b1ce37def41ull); const vnx::Hash64 Node_dump_storage_return::VNX_CODE_HASH(0xaba46c2d9c40f3baull); vnx::Hash64 Node_dump_storage_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_dump_storage_return::get_type_name() const { return "mmx.Node.dump_storage.return"; } const vnx::TypeCode* Node_dump_storage_return::get_type_code() const { return mmx::vnx_native_type_code_Node_dump_storage_return; } std::shared_ptr Node_dump_storage_return::create() { return std::make_shared(); } std::shared_ptr Node_dump_storage_return::clone() const { return std::make_shared(*this); } void Node_dump_storage_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_dump_storage_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_dump_storage_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_dump_storage_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_dump_storage_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.dump_storage.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_dump_storage_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_dump_storage_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.dump_storage.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_dump_storage_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_dump_storage_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_dump_storage_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_dump_storage_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_dump_storage_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_dump_storage_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_dump_storage_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.dump_storage.return"; type_code->type_hash = vnx::Hash64(0xbc8c0b1ce37def41ull); type_code->code_hash = vnx::Hash64(0xaba46c2d9c40f3baull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_dump_storage_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 3, 4, 12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_dump_storage_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_dump_storage_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_dump_storage_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_dump_storage_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_dump_storage_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_dump_storage_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_fetch_offers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_fetch_offers::VNX_TYPE_HASH(0xfca08ee41b997129ull); const vnx::Hash64 Node_fetch_offers::VNX_CODE_HASH(0xb399f3337f3d628cull); vnx::Hash64 Node_fetch_offers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_fetch_offers::get_type_name() const { return "mmx.Node.fetch_offers"; } const vnx::TypeCode* Node_fetch_offers::get_type_code() const { return mmx::vnx_native_type_code_Node_fetch_offers; } std::shared_ptr Node_fetch_offers::create() { return std::make_shared(); } std::shared_ptr Node_fetch_offers::clone() const { return std::make_shared(*this); } void Node_fetch_offers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_fetch_offers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_fetch_offers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_fetch_offers; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, state); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, closed); _visitor.type_end(*_type_code); } void Node_fetch_offers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.fetch_offers\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"state\": "; vnx::write(_out, state); _out << ", \"closed\": "; vnx::write(_out, closed); _out << "}"; } void Node_fetch_offers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_fetch_offers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.fetch_offers"; _object["addresses"] = addresses; _object["state"] = state; _object["closed"] = closed; return _object; } void Node_fetch_offers::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "closed") { _entry.second.to(closed); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Node_fetch_offers::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "state") { return vnx::Variant(state); } if(_name == "closed") { return vnx::Variant(closed); } return vnx::Variant(); } void Node_fetch_offers::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "state") { _value.to(state); } else if(_name == "closed") { _value.to(closed); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_fetch_offers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_fetch_offers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_fetch_offers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_fetch_offers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.fetch_offers"; type_code->type_hash = vnx::Hash64(0xfca08ee41b997129ull); type_code->code_hash = vnx::Hash64(0xb399f3337f3d628cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_fetch_offers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_fetch_offers_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "state"; field.code = {31}; } { auto& field = type_code->fields[2]; field.data_size = 1; field.name = "closed"; field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.closed, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_fetch_offers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_fetch_offers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_fetch_offers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(2); vnx::write_value(_buf + 0, value.state); vnx::write_value(_buf + 1, value.closed); vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_fetch_offers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_fetch_offers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_fetch_offers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_fetch_offers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_fetch_offers_return::VNX_TYPE_HASH(0x8c5cc826b759938bull); const vnx::Hash64 Node_fetch_offers_return::VNX_CODE_HASH(0xc9709dc276485c1cull); vnx::Hash64 Node_fetch_offers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_fetch_offers_return::get_type_name() const { return "mmx.Node.fetch_offers.return"; } const vnx::TypeCode* Node_fetch_offers_return::get_type_code() const { return mmx::vnx_native_type_code_Node_fetch_offers_return; } std::shared_ptr Node_fetch_offers_return::create() { return std::make_shared(); } std::shared_ptr Node_fetch_offers_return::clone() const { return std::make_shared(*this); } void Node_fetch_offers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_fetch_offers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_fetch_offers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_fetch_offers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_fetch_offers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.fetch_offers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_fetch_offers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_fetch_offers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.fetch_offers.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_fetch_offers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_fetch_offers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_fetch_offers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_fetch_offers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_fetch_offers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_fetch_offers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_fetch_offers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.fetch_offers.return"; type_code->type_hash = vnx::Hash64(0x8c5cc826b759938bull); type_code->code_hash = vnx::Hash64(0xc9709dc276485c1cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_fetch_offers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_fetch_offers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_fetch_offers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_fetch_offers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_fetch_offers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_fetch_offers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_fetch_offers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_all_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_all_balances::VNX_TYPE_HASH(0xe099ac5aea49433ull); const vnx::Hash64 Node_get_all_balances::VNX_CODE_HASH(0x4a545872440ce967ull); vnx::Hash64 Node_get_all_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_all_balances::get_type_name() const { return "mmx.Node.get_all_balances"; } const vnx::TypeCode* Node_get_all_balances::get_type_code() const { return mmx::vnx_native_type_code_Node_get_all_balances; } std::shared_ptr Node_get_all_balances::create() { return std::make_shared(); } std::shared_ptr Node_get_all_balances::clone() const { return std::make_shared(*this); } void Node_get_all_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_all_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_all_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_all_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, whitelist); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_all_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_all_balances\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"whitelist\": "; vnx::write(_out, whitelist); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_all_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_all_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_all_balances"; _object["addresses"] = addresses; _object["whitelist"] = whitelist; _object["limit"] = limit; return _object; } void Node_get_all_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "whitelist") { _entry.second.to(whitelist); } } } vnx::Variant Node_get_all_balances::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "whitelist") { return vnx::Variant(whitelist); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_all_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "whitelist") { _value.to(whitelist); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_all_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_all_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_all_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_all_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_all_balances"; type_code->type_hash = vnx::Hash64(0xe099ac5aea49433ull); type_code->code_hash = vnx::Hash64(0x4a545872440ce967ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_all_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_all_balances_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "whitelist"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.whitelist, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_all_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_all_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_all_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.whitelist, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_all_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_all_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_all_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_all_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_all_balances_return::VNX_TYPE_HASH(0x80800e710295b3c1ull); const vnx::Hash64 Node_get_all_balances_return::VNX_CODE_HASH(0x1458e4d3d10c2c64ull); vnx::Hash64 Node_get_all_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_all_balances_return::get_type_name() const { return "mmx.Node.get_all_balances.return"; } const vnx::TypeCode* Node_get_all_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_all_balances_return; } std::shared_ptr Node_get_all_balances_return::create() { return std::make_shared(); } std::shared_ptr Node_get_all_balances_return::clone() const { return std::make_shared(*this); } void Node_get_all_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_all_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_all_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_all_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_all_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_all_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_all_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_all_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_all_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_all_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_all_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_all_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_all_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_all_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_all_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_all_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_all_balances.return"; type_code->type_hash = vnx::Hash64(0x80800e710295b3c1ull); type_code->code_hash = vnx::Hash64(0x1458e4d3d10c2c64ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_all_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 12, 23, 2, 4, 7, 11, 32, 1, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_all_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_all_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_all_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_all_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_all_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_all_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_balance.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_balance::VNX_TYPE_HASH(0x2e00172d0470479ull); const vnx::Hash64 Node_get_balance::VNX_CODE_HASH(0x602c957f083c231eull); vnx::Hash64 Node_get_balance::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_balance::get_type_name() const { return "mmx.Node.get_balance"; } const vnx::TypeCode* Node_get_balance::get_type_code() const { return mmx::vnx_native_type_code_Node_get_balance; } std::shared_ptr Node_get_balance::create() { return std::make_shared(); } std::shared_ptr Node_get_balance::clone() const { return std::make_shared(*this); } void Node_get_balance::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_balance::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_balance::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_balance; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, currency); _visitor.type_end(*_type_code); } void Node_get_balance::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_balance\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"currency\": "; vnx::write(_out, currency); _out << "}"; } void Node_get_balance::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_balance::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_balance"; _object["address"] = address; _object["currency"] = currency; return _object; } void Node_get_balance::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "currency") { _entry.second.to(currency); } } } vnx::Variant Node_get_balance::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "currency") { return vnx::Variant(currency); } return vnx::Variant(); } void Node_get_balance::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "currency") { _value.to(currency); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_balance& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_balance& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_balance::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_balance::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_balance"; type_code->type_hash = vnx::Hash64(0x2e00172d0470479ull); type_code->code_hash = vnx::Hash64(0x602c957f083c231eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_balance); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_balance_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.currency, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_balance& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_balance; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_balance>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_balance& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_balance& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_balance& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_balance_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_balance_return::VNX_TYPE_HASH(0xe29d98f8f1ab3e21ull); const vnx::Hash64 Node_get_balance_return::VNX_CODE_HASH(0x9fbe383c7e960d4aull); vnx::Hash64 Node_get_balance_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_balance_return::get_type_name() const { return "mmx.Node.get_balance.return"; } const vnx::TypeCode* Node_get_balance_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_balance_return; } std::shared_ptr Node_get_balance_return::create() { return std::make_shared(); } std::shared_ptr Node_get_balance_return::clone() const { return std::make_shared(*this); } void Node_get_balance_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_balance_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_balance_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_balance_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_balance_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_balance.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_balance_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_balance_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_balance.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_balance_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_balance_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_balance_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_balance_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_balance_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_balance_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_balance_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_balance.return"; type_code->type_hash = vnx::Hash64(0xe29d98f8f1ab3e21ull); type_code->code_hash = vnx::Hash64(0x9fbe383c7e960d4aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_balance_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_balance_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_balance_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_balance_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_balance_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_balance_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_balances::VNX_TYPE_HASH(0x1c8af02c41e96460ull); const vnx::Hash64 Node_get_balances::VNX_CODE_HASH(0x59617d62fbeb0b88ull); vnx::Hash64 Node_get_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_balances::get_type_name() const { return "mmx.Node.get_balances"; } const vnx::TypeCode* Node_get_balances::get_type_code() const { return mmx::vnx_native_type_code_Node_get_balances; } std::shared_ptr Node_get_balances::create() { return std::make_shared(); } std::shared_ptr Node_get_balances::clone() const { return std::make_shared(*this); } void Node_get_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, whitelist); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_balances\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"whitelist\": "; vnx::write(_out, whitelist); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_balances"; _object["address"] = address; _object["whitelist"] = whitelist; _object["limit"] = limit; return _object; } void Node_get_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "whitelist") { _entry.second.to(whitelist); } } } vnx::Variant Node_get_balances::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "whitelist") { return vnx::Variant(whitelist); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "whitelist") { _value.to(whitelist); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_balances"; type_code->type_hash = vnx::Hash64(0x1c8af02c41e96460ull); type_code->code_hash = vnx::Hash64(0x59617d62fbeb0b88ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_balances_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "whitelist"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.whitelist, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.whitelist, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_balances_return::VNX_TYPE_HASH(0x1e00f02ae6304cf0ull); const vnx::Hash64 Node_get_balances_return::VNX_CODE_HASH(0xb7eab443c12e8da1ull); vnx::Hash64 Node_get_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_balances_return::get_type_name() const { return "mmx.Node.get_balances.return"; } const vnx::TypeCode* Node_get_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_balances_return; } std::shared_ptr Node_get_balances_return::create() { return std::make_shared(); } std::shared_ptr Node_get_balances_return::clone() const { return std::make_shared(*this); } void Node_get_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_balances.return"; type_code->type_hash = vnx::Hash64(0x1e00f02ae6304cf0ull); type_code->code_hash = vnx::Hash64(0xb7eab443c12e8da1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block::VNX_TYPE_HASH(0xeb3fabe56dec161aull); const vnx::Hash64 Node_get_block::VNX_CODE_HASH(0x98f014c6378b9296ull); vnx::Hash64 Node_get_block::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block::get_type_name() const { return "mmx.Node.get_block"; } const vnx::TypeCode* Node_get_block::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block; } std::shared_ptr Node_get_block::create() { return std::make_shared(); } std::shared_ptr Node_get_block::clone() const { return std::make_shared(*this); } void Node_get_block::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_end(*_type_code); } void Node_get_block::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block\""; _out << ", \"hash\": "; vnx::write(_out, hash); _out << "}"; } void Node_get_block::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block"; _object["hash"] = hash; return _object; } void Node_get_block::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "hash") { _entry.second.to(hash); } } } vnx::Variant Node_get_block::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } return vnx::Variant(); } void Node_get_block::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block"; type_code->type_hash = vnx::Hash64(0xeb3fabe56dec161aull); type_code->code_hash = vnx::Hash64(0x98f014c6378b9296ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_block); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_block_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_block& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_at.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_at::VNX_TYPE_HASH(0xc69c9f876a00e48full); const vnx::Hash64 Node_get_block_at::VNX_CODE_HASH(0x14763538443c364cull); vnx::Hash64 Node_get_block_at::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_at::get_type_name() const { return "mmx.Node.get_block_at"; } const vnx::TypeCode* Node_get_block_at::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_at; } std::shared_ptr Node_get_block_at::create() { return std::make_shared(); } std::shared_ptr Node_get_block_at::clone() const { return std::make_shared(*this); } void Node_get_block_at::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_at::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_at::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_at; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_block_at::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_at\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_block_at::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_at::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_at"; _object["height"] = height; return _object; } void Node_get_block_at::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_block_at::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_block_at::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_at& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_at& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_at::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_at::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_at"; type_code->type_hash = vnx::Hash64(0xc69c9f876a00e48full); type_code->code_hash = vnx::Hash64(0x14763538443c364cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_block_at); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_block_at_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_at& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_at; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_at>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_block_at& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_at& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_at& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_at_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_at_return::VNX_TYPE_HASH(0x6e3c22a7391c5491ull); const vnx::Hash64 Node_get_block_at_return::VNX_CODE_HASH(0x541af1ed8f1d70eeull); vnx::Hash64 Node_get_block_at_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_at_return::get_type_name() const { return "mmx.Node.get_block_at.return"; } const vnx::TypeCode* Node_get_block_at_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_at_return; } std::shared_ptr Node_get_block_at_return::create() { return std::make_shared(); } std::shared_ptr Node_get_block_at_return::clone() const { return std::make_shared(*this); } void Node_get_block_at_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_at_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_at_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_at_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_block_at_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_at.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_block_at_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_at_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_at.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_block_at_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_block_at_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_block_at_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_at_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_at_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_at_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_at_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_at.return"; type_code->type_hash = vnx::Hash64(0x6e3c22a7391c5491ull); type_code->code_hash = vnx::Hash64(0x541af1ed8f1d70eeull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_block_at_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_at_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_at_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_block_at_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_at_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_at_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_hash.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_hash::VNX_TYPE_HASH(0x43c5087066b73f38ull); const vnx::Hash64 Node_get_block_hash::VNX_CODE_HASH(0xecdc9ef8cf113e98ull); vnx::Hash64 Node_get_block_hash::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_hash::get_type_name() const { return "mmx.Node.get_block_hash"; } const vnx::TypeCode* Node_get_block_hash::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_hash; } std::shared_ptr Node_get_block_hash::create() { return std::make_shared(); } std::shared_ptr Node_get_block_hash::clone() const { return std::make_shared(*this); } void Node_get_block_hash::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_hash::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_hash::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_hash; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_block_hash::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_hash\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_block_hash::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_hash::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_hash"; _object["height"] = height; return _object; } void Node_get_block_hash::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_block_hash::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_block_hash::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_hash& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_hash::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_hash::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_hash"; type_code->type_hash = vnx::Hash64(0x43c5087066b73f38ull); type_code->code_hash = vnx::Hash64(0xecdc9ef8cf113e98ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_block_hash); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_block_hash_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_hash& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_hash; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_hash>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_block_hash& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_hash& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_hash_ex.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_hash_ex::VNX_TYPE_HASH(0x6024ae54abca18cbull); const vnx::Hash64 Node_get_block_hash_ex::VNX_CODE_HASH(0xbc6b607e8965d0a5ull); vnx::Hash64 Node_get_block_hash_ex::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_hash_ex::get_type_name() const { return "mmx.Node.get_block_hash_ex"; } const vnx::TypeCode* Node_get_block_hash_ex::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_hash_ex; } std::shared_ptr Node_get_block_hash_ex::create() { return std::make_shared(); } std::shared_ptr Node_get_block_hash_ex::clone() const { return std::make_shared(*this); } void Node_get_block_hash_ex::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_hash_ex::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_hash_ex::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_hash_ex; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_block_hash_ex::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_hash_ex\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_block_hash_ex::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_hash_ex::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_hash_ex"; _object["height"] = height; return _object; } void Node_get_block_hash_ex::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_block_hash_ex::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_block_hash_ex::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_ex& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_hash_ex& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_hash_ex::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_hash_ex::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_hash_ex"; type_code->type_hash = vnx::Hash64(0x6024ae54abca18cbull); type_code->code_hash = vnx::Hash64(0xbc6b607e8965d0a5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_block_hash_ex); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_block_hash_ex_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_hash_ex; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_hash_ex>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_block_hash_ex& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_hash_ex_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_hash_ex_return::VNX_TYPE_HASH(0x8d82a7b11dfd7a4ull); const vnx::Hash64 Node_get_block_hash_ex_return::VNX_CODE_HASH(0x7149243d306e1b87ull); vnx::Hash64 Node_get_block_hash_ex_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_hash_ex_return::get_type_name() const { return "mmx.Node.get_block_hash_ex.return"; } const vnx::TypeCode* Node_get_block_hash_ex_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_hash_ex_return; } std::shared_ptr Node_get_block_hash_ex_return::create() { return std::make_shared(); } std::shared_ptr Node_get_block_hash_ex_return::clone() const { return std::make_shared(*this); } void Node_get_block_hash_ex_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_hash_ex_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_hash_ex_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_hash_ex_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_block_hash_ex_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_hash_ex.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_block_hash_ex_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_hash_ex_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_hash_ex.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_block_hash_ex_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_block_hash_ex_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_block_hash_ex_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_ex_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_hash_ex_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_hash_ex_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_hash_ex_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_hash_ex.return"; type_code->type_hash = vnx::Hash64(0x8d82a7b11dfd7a4ull); type_code->code_hash = vnx::Hash64(0x7149243d306e1b87ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_block_hash_ex_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 23, 2, 4, 7, 11, 32, 1, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_ex_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_hash_ex_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_hash_ex_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_block_hash_ex_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_ex_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_ex_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_hash_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_hash_return::VNX_TYPE_HASH(0x47877c5597b978dfull); const vnx::Hash64 Node_get_block_hash_return::VNX_CODE_HASH(0xe1654fd1b770769eull); vnx::Hash64 Node_get_block_hash_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_hash_return::get_type_name() const { return "mmx.Node.get_block_hash.return"; } const vnx::TypeCode* Node_get_block_hash_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_hash_return; } std::shared_ptr Node_get_block_hash_return::create() { return std::make_shared(); } std::shared_ptr Node_get_block_hash_return::clone() const { return std::make_shared(*this); } void Node_get_block_hash_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_hash_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_hash_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_hash_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_block_hash_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block_hash.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_block_hash_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_hash_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block_hash.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_block_hash_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_block_hash_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_block_hash_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_hash_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_hash_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_hash_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_hash_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block_hash.return"; type_code->type_hash = vnx::Hash64(0x47877c5597b978dfull); type_code->code_hash = vnx::Hash64(0xe1654fd1b770769eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_block_hash_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_hash_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_hash_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_hash_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_block_hash_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_hash_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_hash_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_block_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_block_return::VNX_TYPE_HASH(0x6d9abdbf20c4b4d2ull); const vnx::Hash64 Node_get_block_return::VNX_CODE_HASH(0x3c4f375e2ec18519ull); vnx::Hash64 Node_get_block_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_block_return::get_type_name() const { return "mmx.Node.get_block.return"; } const vnx::TypeCode* Node_get_block_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_block_return; } std::shared_ptr Node_get_block_return::create() { return std::make_shared(); } std::shared_ptr Node_get_block_return::clone() const { return std::make_shared(*this); } void Node_get_block_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_block_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_block_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_block_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_block_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_block.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_block_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_block_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_block.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_block_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_block_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_block_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_block_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_block_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_block_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_block_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_block.return"; type_code->type_hash = vnx::Hash64(0x6d9abdbf20c4b4d2ull); type_code->code_hash = vnx::Hash64(0x3c4f375e2ec18519ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_block_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_block_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_block_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_block_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_block_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_block_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_block_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract::VNX_TYPE_HASH(0xa28704c65a67a293ull); const vnx::Hash64 Node_get_contract::VNX_CODE_HASH(0x90eece2458f6c3aaull); vnx::Hash64 Node_get_contract::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract::get_type_name() const { return "mmx.Node.get_contract"; } const vnx::TypeCode* Node_get_contract::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract; } std::shared_ptr Node_get_contract::create() { return std::make_shared(); } std::shared_ptr Node_get_contract::clone() const { return std::make_shared(*this); } void Node_get_contract::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Node_get_contract::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Node_get_contract::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract"; _object["address"] = address; return _object; } void Node_get_contract::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Node_get_contract::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Node_get_contract::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract"; type_code->type_hash = vnx::Hash64(0xa28704c65a67a293ull); type_code->code_hash = vnx::Hash64(0x90eece2458f6c3aaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contract); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contract_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract_balances::VNX_TYPE_HASH(0xeb1e66155927b13aull); const vnx::Hash64 Node_get_contract_balances::VNX_CODE_HASH(0x4b1dcdad815b80d4ull); vnx::Hash64 Node_get_contract_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract_balances::get_type_name() const { return "mmx.Node.get_contract_balances"; } const vnx::TypeCode* Node_get_contract_balances::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract_balances; } std::shared_ptr Node_get_contract_balances::create() { return std::make_shared(); } std::shared_ptr Node_get_contract_balances::clone() const { return std::make_shared(*this); } void Node_get_contract_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, whitelist); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_contract_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract_balances\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"whitelist\": "; vnx::write(_out, whitelist); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_contract_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract_balances"; _object["address"] = address; _object["whitelist"] = whitelist; _object["limit"] = limit; return _object; } void Node_get_contract_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "whitelist") { _entry.second.to(whitelist); } } } vnx::Variant Node_get_contract_balances::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "whitelist") { return vnx::Variant(whitelist); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_contract_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "whitelist") { _value.to(whitelist); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract_balances"; type_code->type_hash = vnx::Hash64(0xeb1e66155927b13aull); type_code->code_hash = vnx::Hash64(0x4b1dcdad815b80d4ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contract_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contract_balances_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "whitelist"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.whitelist, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.whitelist, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract_balances_return::VNX_TYPE_HASH(0x4974c6093398e264ull); const vnx::Hash64 Node_get_contract_balances_return::VNX_CODE_HASH(0x58929f206c4bc64eull); vnx::Hash64 Node_get_contract_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract_balances_return::get_type_name() const { return "mmx.Node.get_contract_balances.return"; } const vnx::TypeCode* Node_get_contract_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract_balances_return; } std::shared_ptr Node_get_contract_balances_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contract_balances_return::clone() const { return std::make_shared(*this); } void Node_get_contract_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contract_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contract_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contract_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contract_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contract_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract_balances.return"; type_code->type_hash = vnx::Hash64(0x4974c6093398e264ull); type_code->code_hash = vnx::Hash64(0x58929f206c4bc64eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contract_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::balance_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract_for.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract_for::VNX_TYPE_HASH(0x6a953dcea83b9832ull); const vnx::Hash64 Node_get_contract_for::VNX_CODE_HASH(0x13ce713d9592bfb0ull); vnx::Hash64 Node_get_contract_for::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract_for::get_type_name() const { return "mmx.Node.get_contract_for"; } const vnx::TypeCode* Node_get_contract_for::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract_for; } std::shared_ptr Node_get_contract_for::create() { return std::make_shared(); } std::shared_ptr Node_get_contract_for::clone() const { return std::make_shared(*this); } void Node_get_contract_for::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract_for::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract_for::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract_for; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Node_get_contract_for::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract_for\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Node_get_contract_for::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract_for::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract_for"; _object["address"] = address; return _object; } void Node_get_contract_for::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Node_get_contract_for::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Node_get_contract_for::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract_for& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract_for& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract_for::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract_for::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract_for"; type_code->type_hash = vnx::Hash64(0x6a953dcea83b9832ull); type_code->code_hash = vnx::Hash64(0x13ce713d9592bfb0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contract_for); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contract_for_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract_for& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract_for; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract_for>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract_for& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract_for& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_for& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract_for_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract_for_return::VNX_TYPE_HASH(0xde97319367a6d647ull); const vnx::Hash64 Node_get_contract_for_return::VNX_CODE_HASH(0x49bb2d66b673b330ull); vnx::Hash64 Node_get_contract_for_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract_for_return::get_type_name() const { return "mmx.Node.get_contract_for.return"; } const vnx::TypeCode* Node_get_contract_for_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract_for_return; } std::shared_ptr Node_get_contract_for_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contract_for_return::clone() const { return std::make_shared(*this); } void Node_get_contract_for_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract_for_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract_for_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract_for_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contract_for_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract_for.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contract_for_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract_for_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract_for.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contract_for_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contract_for_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contract_for_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract_for_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract_for_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract_for_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract_for_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract_for.return"; type_code->type_hash = vnx::Hash64(0xde97319367a6d647ull); type_code->code_hash = vnx::Hash64(0x49bb2d66b673b330ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contract_for_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract_for_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract_for_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract_for_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract_for_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract_for_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_for_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contract_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contract_return::VNX_TYPE_HASH(0x314d0901de362f8cull); const vnx::Hash64 Node_get_contract_return::VNX_CODE_HASH(0x7fe622a32db785feull); vnx::Hash64 Node_get_contract_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contract_return::get_type_name() const { return "mmx.Node.get_contract.return"; } const vnx::TypeCode* Node_get_contract_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contract_return; } std::shared_ptr Node_get_contract_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contract_return::clone() const { return std::make_shared(*this); } void Node_get_contract_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contract_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contract_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contract_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contract_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contract.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contract_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contract_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contract.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contract_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contract_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contract_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contract_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contract_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contract_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contract_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contract.return"; type_code->type_hash = vnx::Hash64(0x314d0901de362f8cull); type_code->code_hash = vnx::Hash64(0x7fe622a32db785feull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contract_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contract_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contract_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contract_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contract_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contract_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contract_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts::VNX_TYPE_HASH(0x49e218583c1f1c8aull); const vnx::Hash64 Node_get_contracts::VNX_CODE_HASH(0x2bb16bda13254959ull); vnx::Hash64 Node_get_contracts::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts::get_type_name() const { return "mmx.Node.get_contracts"; } const vnx::TypeCode* Node_get_contracts::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts; } std::shared_ptr Node_get_contracts::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts::clone() const { return std::make_shared(*this); } void Node_get_contracts::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_end(*_type_code); } void Node_get_contracts::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << "}"; } void Node_get_contracts::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts"; _object["addresses"] = addresses; return _object; } void Node_get_contracts::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } } } vnx::Variant Node_get_contracts::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } return vnx::Variant(); } void Node_get_contracts::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts"; type_code->type_hash = vnx::Hash64(0x49e218583c1f1c8aull); type_code->code_hash = vnx::Hash64(0x2bb16bda13254959ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contracts); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contracts_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts_by.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts_by::VNX_TYPE_HASH(0xe7c397362a63f57cull); const vnx::Hash64 Node_get_contracts_by::VNX_CODE_HASH(0xedce701da3cb498ull); vnx::Hash64 Node_get_contracts_by::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts_by::get_type_name() const { return "mmx.Node.get_contracts_by"; } const vnx::TypeCode* Node_get_contracts_by::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts_by; } std::shared_ptr Node_get_contracts_by::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts_by::clone() const { return std::make_shared(*this); } void Node_get_contracts_by::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts_by::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts_by::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts_by; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, type_hash); _visitor.type_end(*_type_code); } void Node_get_contracts_by::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts_by\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"type_hash\": "; vnx::write(_out, type_hash); _out << "}"; } void Node_get_contracts_by::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts_by::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts_by"; _object["addresses"] = addresses; _object["type_hash"] = type_hash; return _object; } void Node_get_contracts_by::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "type_hash") { _entry.second.to(type_hash); } } } vnx::Variant Node_get_contracts_by::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "type_hash") { return vnx::Variant(type_hash); } return vnx::Variant(); } void Node_get_contracts_by::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "type_hash") { _value.to(type_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_by& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts_by& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts_by::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts_by::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts_by"; type_code->type_hash = vnx::Hash64(0xe7c397362a63f57cull); type_code->code_hash = vnx::Hash64(0xedce701da3cb498ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contracts_by); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contracts_by_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "type_hash"; field.code = {33, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.type_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts_by& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts_by; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts_by>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.type_hash, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts_by& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts_by& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts_by_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts_by_return::VNX_TYPE_HASH(0x9ad1099f1adf2565ull); const vnx::Hash64 Node_get_contracts_by_return::VNX_CODE_HASH(0xe941428eb0174d80ull); vnx::Hash64 Node_get_contracts_by_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts_by_return::get_type_name() const { return "mmx.Node.get_contracts_by.return"; } const vnx::TypeCode* Node_get_contracts_by_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts_by_return; } std::shared_ptr Node_get_contracts_by_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts_by_return::clone() const { return std::make_shared(*this); } void Node_get_contracts_by_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts_by_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts_by_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts_by_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contracts_by_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts_by.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contracts_by_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts_by_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts_by.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contracts_by_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contracts_by_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contracts_by_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_by_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts_by_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts_by_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts_by_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts_by.return"; type_code->type_hash = vnx::Hash64(0x9ad1099f1adf2565ull); type_code->code_hash = vnx::Hash64(0xe941428eb0174d80ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contracts_by_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts_by_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts_by_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts_by_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts_by_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts_by_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_by_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts_owned_by.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts_owned_by::VNX_TYPE_HASH(0x63989a04fee2fba4ull); const vnx::Hash64 Node_get_contracts_owned_by::VNX_CODE_HASH(0xaa522ba8023d6d2dull); vnx::Hash64 Node_get_contracts_owned_by::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts_owned_by::get_type_name() const { return "mmx.Node.get_contracts_owned_by"; } const vnx::TypeCode* Node_get_contracts_owned_by::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts_owned_by; } std::shared_ptr Node_get_contracts_owned_by::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts_owned_by::clone() const { return std::make_shared(*this); } void Node_get_contracts_owned_by::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts_owned_by::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts_owned_by::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts_owned_by; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, type_hash); _visitor.type_end(*_type_code); } void Node_get_contracts_owned_by::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts_owned_by\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"type_hash\": "; vnx::write(_out, type_hash); _out << "}"; } void Node_get_contracts_owned_by::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts_owned_by::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts_owned_by"; _object["addresses"] = addresses; _object["type_hash"] = type_hash; return _object; } void Node_get_contracts_owned_by::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "type_hash") { _entry.second.to(type_hash); } } } vnx::Variant Node_get_contracts_owned_by::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "type_hash") { return vnx::Variant(type_hash); } return vnx::Variant(); } void Node_get_contracts_owned_by::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "type_hash") { _value.to(type_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_owned_by& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts_owned_by& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts_owned_by::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts_owned_by::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts_owned_by"; type_code->type_hash = vnx::Hash64(0x63989a04fee2fba4ull); type_code->code_hash = vnx::Hash64(0xaa522ba8023d6d2dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_contracts_owned_by); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_contracts_owned_by_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "type_hash"; field.code = {33, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.type_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts_owned_by; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts_owned_by>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.type_hash, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts_owned_by& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts_owned_by_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts_owned_by_return::VNX_TYPE_HASH(0x3b9dbec85ee482bfull); const vnx::Hash64 Node_get_contracts_owned_by_return::VNX_CODE_HASH(0x45e72fce6f12a876ull); vnx::Hash64 Node_get_contracts_owned_by_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts_owned_by_return::get_type_name() const { return "mmx.Node.get_contracts_owned_by.return"; } const vnx::TypeCode* Node_get_contracts_owned_by_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts_owned_by_return; } std::shared_ptr Node_get_contracts_owned_by_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts_owned_by_return::clone() const { return std::make_shared(*this); } void Node_get_contracts_owned_by_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts_owned_by_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts_owned_by_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts_owned_by_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contracts_owned_by_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts_owned_by.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contracts_owned_by_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts_owned_by_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts_owned_by.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contracts_owned_by_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contracts_owned_by_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contracts_owned_by_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_owned_by_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts_owned_by_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts_owned_by_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts_owned_by_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts_owned_by.return"; type_code->type_hash = vnx::Hash64(0x3b9dbec85ee482bfull); type_code->code_hash = vnx::Hash64(0x45e72fce6f12a876ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contracts_owned_by_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts_owned_by_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts_owned_by_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts_owned_by_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts_owned_by_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts_owned_by_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_owned_by_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_contracts_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_contracts_return::VNX_TYPE_HASH(0x13d73d6d69c8af0bull); const vnx::Hash64 Node_get_contracts_return::VNX_CODE_HASH(0x533d930be83fb901ull); vnx::Hash64 Node_get_contracts_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_contracts_return::get_type_name() const { return "mmx.Node.get_contracts.return"; } const vnx::TypeCode* Node_get_contracts_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_contracts_return; } std::shared_ptr Node_get_contracts_return::create() { return std::make_shared(); } std::shared_ptr Node_get_contracts_return::clone() const { return std::make_shared(*this); } void Node_get_contracts_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_contracts_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_contracts_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_contracts_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_contracts_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_contracts.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_contracts_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_contracts_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_contracts.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_contracts_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_contracts_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_contracts_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_contracts_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_contracts_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_contracts_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_contracts_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_contracts.return"; type_code->type_hash = vnx::Hash64(0x13d73d6d69c8af0bull); type_code->code_hash = vnx::Hash64(0x533d930be83fb901ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_contracts_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_contracts_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_contracts_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_contracts_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_contracts_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_contracts_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_exec_history.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_exec_history::VNX_TYPE_HASH(0xf17c2f67bedb9df6ull); const vnx::Hash64 Node_get_exec_history::VNX_CODE_HASH(0xa0daf9cb8db71849ull); vnx::Hash64 Node_get_exec_history::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_exec_history::get_type_name() const { return "mmx.Node.get_exec_history"; } const vnx::TypeCode* Node_get_exec_history::get_type_code() const { return mmx::vnx_native_type_code_Node_get_exec_history; } std::shared_ptr Node_get_exec_history::create() { return std::make_shared(); } std::shared_ptr Node_get_exec_history::clone() const { return std::make_shared(*this); } void Node_get_exec_history::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_exec_history::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_exec_history::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_exec_history; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, recent); _visitor.type_end(*_type_code); } void Node_get_exec_history::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_exec_history\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"recent\": "; vnx::write(_out, recent); _out << "}"; } void Node_get_exec_history::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_exec_history::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_exec_history"; _object["address"] = address; _object["limit"] = limit; _object["recent"] = recent; return _object; } void Node_get_exec_history::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "recent") { _entry.second.to(recent); } } } vnx::Variant Node_get_exec_history::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "limit") { return vnx::Variant(limit); } if(_name == "recent") { return vnx::Variant(recent); } return vnx::Variant(); } void Node_get_exec_history::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "limit") { _value.to(limit); } else if(_name == "recent") { _value.to(recent); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_exec_history& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_exec_history& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_exec_history::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_exec_history::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_exec_history"; type_code->type_hash = vnx::Hash64(0xf17c2f67bedb9df6ull); type_code->code_hash = vnx::Hash64(0xa0daf9cb8db71849ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_exec_history); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_exec_history_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[2]; field.data_size = 1; field.name = "recent"; field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.recent, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_exec_history& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_exec_history; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_exec_history>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.limit); vnx::write_value(_buf + 4, value.recent); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_exec_history& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_exec_history& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_exec_history& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_exec_history_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_exec_history_return::VNX_TYPE_HASH(0x17079d265ede8785ull); const vnx::Hash64 Node_get_exec_history_return::VNX_CODE_HASH(0xee63e8a91963ce51ull); vnx::Hash64 Node_get_exec_history_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_exec_history_return::get_type_name() const { return "mmx.Node.get_exec_history.return"; } const vnx::TypeCode* Node_get_exec_history_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_exec_history_return; } std::shared_ptr Node_get_exec_history_return::create() { return std::make_shared(); } std::shared_ptr Node_get_exec_history_return::clone() const { return std::make_shared(*this); } void Node_get_exec_history_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_exec_history_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_exec_history_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_exec_history_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_exec_history_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_exec_history.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_exec_history_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_exec_history_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_exec_history.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_exec_history_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_exec_history_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_exec_history_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_exec_history_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_exec_history_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_exec_history_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_exec_history_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_exec_history.return"; type_code->type_hash = vnx::Hash64(0x17079d265ede8785ull); type_code->code_hash = vnx::Hash64(0xee63e8a91963ce51ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_exec_history_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::exec_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_exec_history_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_exec_history_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_exec_history_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_exec_history_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_exec_history_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_exec_history_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmed_block_summary.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmed_block_summary::VNX_TYPE_HASH(0xa6cda1247bd4f537ull); const vnx::Hash64 Node_get_farmed_block_summary::VNX_CODE_HASH(0x260bc08d7455f24aull); vnx::Hash64 Node_get_farmed_block_summary::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmed_block_summary::get_type_name() const { return "mmx.Node.get_farmed_block_summary"; } const vnx::TypeCode* Node_get_farmed_block_summary::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmed_block_summary; } std::shared_ptr Node_get_farmed_block_summary::create() { return std::make_shared(); } std::shared_ptr Node_get_farmed_block_summary::clone() const { return std::make_shared(*this); } void Node_get_farmed_block_summary::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmed_block_summary::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmed_block_summary::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmed_block_summary; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, farmer_keys); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, since); _visitor.type_end(*_type_code); } void Node_get_farmed_block_summary::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmed_block_summary\""; _out << ", \"farmer_keys\": "; vnx::write(_out, farmer_keys); _out << ", \"since\": "; vnx::write(_out, since); _out << "}"; } void Node_get_farmed_block_summary::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmed_block_summary::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmed_block_summary"; _object["farmer_keys"] = farmer_keys; _object["since"] = since; return _object; } void Node_get_farmed_block_summary::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "farmer_keys") { _entry.second.to(farmer_keys); } else if(_entry.first == "since") { _entry.second.to(since); } } } vnx::Variant Node_get_farmed_block_summary::get_field(const std::string& _name) const { if(_name == "farmer_keys") { return vnx::Variant(farmer_keys); } if(_name == "since") { return vnx::Variant(since); } return vnx::Variant(); } void Node_get_farmed_block_summary::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "farmer_keys") { _value.to(farmer_keys); } else if(_name == "since") { _value.to(since); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_block_summary& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmed_block_summary& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmed_block_summary::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmed_block_summary::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmed_block_summary"; type_code->type_hash = vnx::Hash64(0xa6cda1247bd4f537ull); type_code->code_hash = vnx::Hash64(0x260bc08d7455f24aull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_farmed_block_summary); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_farmed_block_summary_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "farmer_keys"; field.code = {12, 11, 33, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "since"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.farmer_keys, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmed_block_summary; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmed_block_summary>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.since); vnx::write(out, value.farmer_keys, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_farmed_block_summary& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmed_block_summary_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmed_block_summary_return::VNX_TYPE_HASH(0xef3dcd5d4d2a58e3ull); const vnx::Hash64 Node_get_farmed_block_summary_return::VNX_CODE_HASH(0xbf8a9578cfe585faull); vnx::Hash64 Node_get_farmed_block_summary_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmed_block_summary_return::get_type_name() const { return "mmx.Node.get_farmed_block_summary.return"; } const vnx::TypeCode* Node_get_farmed_block_summary_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmed_block_summary_return; } std::shared_ptr Node_get_farmed_block_summary_return::create() { return std::make_shared(); } std::shared_ptr Node_get_farmed_block_summary_return::clone() const { return std::make_shared(*this); } void Node_get_farmed_block_summary_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmed_block_summary_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmed_block_summary_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmed_block_summary_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_farmed_block_summary_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmed_block_summary.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_farmed_block_summary_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmed_block_summary_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmed_block_summary.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_farmed_block_summary_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_farmed_block_summary_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_farmed_block_summary_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_block_summary_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmed_block_summary_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmed_block_summary_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmed_block_summary_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmed_block_summary.return"; type_code->type_hash = vnx::Hash64(0xef3dcd5d4d2a58e3ull); type_code->code_hash = vnx::Hash64(0xbf8a9578cfe585faull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_farmed_block_summary_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::farmed_block_summary_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmed_block_summary_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmed_block_summary_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmed_block_summary_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_farmed_block_summary_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmed_block_summary_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_block_summary_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmed_blocks.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmed_blocks::VNX_TYPE_HASH(0xfc412d06ff25542eull); const vnx::Hash64 Node_get_farmed_blocks::VNX_CODE_HASH(0x892cc978e87809c9ull); vnx::Hash64 Node_get_farmed_blocks::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmed_blocks::get_type_name() const { return "mmx.Node.get_farmed_blocks"; } const vnx::TypeCode* Node_get_farmed_blocks::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmed_blocks; } std::shared_ptr Node_get_farmed_blocks::create() { return std::make_shared(); } std::shared_ptr Node_get_farmed_blocks::clone() const { return std::make_shared(*this); } void Node_get_farmed_blocks::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmed_blocks::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmed_blocks::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmed_blocks; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, farmer_keys); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, full_blocks); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, since); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_farmed_blocks::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmed_blocks\""; _out << ", \"farmer_keys\": "; vnx::write(_out, farmer_keys); _out << ", \"full_blocks\": "; vnx::write(_out, full_blocks); _out << ", \"since\": "; vnx::write(_out, since); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_farmed_blocks::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmed_blocks::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmed_blocks"; _object["farmer_keys"] = farmer_keys; _object["full_blocks"] = full_blocks; _object["since"] = since; _object["limit"] = limit; return _object; } void Node_get_farmed_blocks::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "farmer_keys") { _entry.second.to(farmer_keys); } else if(_entry.first == "full_blocks") { _entry.second.to(full_blocks); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "since") { _entry.second.to(since); } } } vnx::Variant Node_get_farmed_blocks::get_field(const std::string& _name) const { if(_name == "farmer_keys") { return vnx::Variant(farmer_keys); } if(_name == "full_blocks") { return vnx::Variant(full_blocks); } if(_name == "since") { return vnx::Variant(since); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_farmed_blocks::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "farmer_keys") { _value.to(farmer_keys); } else if(_name == "full_blocks") { _value.to(full_blocks); } else if(_name == "since") { _value.to(since); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_blocks& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmed_blocks& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmed_blocks::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmed_blocks::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmed_blocks"; type_code->type_hash = vnx::Hash64(0xfc412d06ff25542eull); type_code->code_hash = vnx::Hash64(0x892cc978e87809c9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_farmed_blocks); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_farmed_blocks_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "farmer_keys"; field.code = {12, 11, 33, 1}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "full_blocks"; field.code = {31}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "since"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.full_blocks, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.farmer_keys, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmed_blocks; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmed_blocks>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(9); vnx::write_value(_buf + 0, value.full_blocks); vnx::write_value(_buf + 1, value.since); vnx::write_value(_buf + 5, value.limit); vnx::write(out, value.farmer_keys, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_farmed_blocks& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmed_blocks_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmed_blocks_return::VNX_TYPE_HASH(0xe8697ffd381616baull); const vnx::Hash64 Node_get_farmed_blocks_return::VNX_CODE_HASH(0xf9eb27cd51e0215full); vnx::Hash64 Node_get_farmed_blocks_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmed_blocks_return::get_type_name() const { return "mmx.Node.get_farmed_blocks.return"; } const vnx::TypeCode* Node_get_farmed_blocks_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmed_blocks_return; } std::shared_ptr Node_get_farmed_blocks_return::create() { return std::make_shared(); } std::shared_ptr Node_get_farmed_blocks_return::clone() const { return std::make_shared(*this); } void Node_get_farmed_blocks_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmed_blocks_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmed_blocks_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmed_blocks_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_farmed_blocks_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmed_blocks.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_farmed_blocks_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmed_blocks_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmed_blocks.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_farmed_blocks_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_farmed_blocks_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_farmed_blocks_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmed_blocks_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmed_blocks_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmed_blocks_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmed_blocks_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmed_blocks.return"; type_code->type_hash = vnx::Hash64(0xe8697ffd381616baull); type_code->code_hash = vnx::Hash64(0xf9eb27cd51e0215full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_farmed_blocks_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmed_blocks_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmed_blocks_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmed_blocks_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_farmed_blocks_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmed_blocks_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmed_blocks_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmer_ranking.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmer_ranking::VNX_TYPE_HASH(0x548d571d6384bd43ull); const vnx::Hash64 Node_get_farmer_ranking::VNX_CODE_HASH(0xaacf04386b3588f1ull); vnx::Hash64 Node_get_farmer_ranking::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmer_ranking::get_type_name() const { return "mmx.Node.get_farmer_ranking"; } const vnx::TypeCode* Node_get_farmer_ranking::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmer_ranking; } std::shared_ptr Node_get_farmer_ranking::create() { return std::make_shared(); } std::shared_ptr Node_get_farmer_ranking::clone() const { return std::make_shared(*this); } void Node_get_farmer_ranking::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmer_ranking::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmer_ranking::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmer_ranking; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_farmer_ranking::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmer_ranking\""; _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_farmer_ranking::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmer_ranking::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmer_ranking"; _object["limit"] = limit; return _object; } void Node_get_farmer_ranking::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "limit") { _entry.second.to(limit); } } } vnx::Variant Node_get_farmer_ranking::get_field(const std::string& _name) const { if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_farmer_ranking::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmer_ranking& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmer_ranking& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmer_ranking::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmer_ranking::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmer_ranking"; type_code->type_hash = vnx::Hash64(0x548d571d6384bd43ull); type_code->code_hash = vnx::Hash64(0xaacf04386b3588f1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_farmer_ranking); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_farmer_ranking_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(-1); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmer_ranking; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmer_ranking>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); } void read(std::istream& in, ::mmx::Node_get_farmer_ranking& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_farmer_ranking_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_farmer_ranking_return::VNX_TYPE_HASH(0xb74e7f1a70a60ecdull); const vnx::Hash64 Node_get_farmer_ranking_return::VNX_CODE_HASH(0xadc8868359295353ull); vnx::Hash64 Node_get_farmer_ranking_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_farmer_ranking_return::get_type_name() const { return "mmx.Node.get_farmer_ranking.return"; } const vnx::TypeCode* Node_get_farmer_ranking_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_farmer_ranking_return; } std::shared_ptr Node_get_farmer_ranking_return::create() { return std::make_shared(); } std::shared_ptr Node_get_farmer_ranking_return::clone() const { return std::make_shared(*this); } void Node_get_farmer_ranking_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_farmer_ranking_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_farmer_ranking_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_farmer_ranking_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_farmer_ranking_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_farmer_ranking.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_farmer_ranking_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_farmer_ranking_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_farmer_ranking.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_farmer_ranking_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_farmer_ranking_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_farmer_ranking_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_farmer_ranking_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_farmer_ranking_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_farmer_ranking_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_farmer_ranking_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_farmer_ranking.return"; type_code->type_hash = vnx::Hash64(0xb74e7f1a70a60ecdull); type_code->code_hash = vnx::Hash64(0xadc8868359295353ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_farmer_ranking_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 23, 2, 4, 7, 11, 33, 1, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_farmer_ranking_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_farmer_ranking_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_farmer_ranking_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_farmer_ranking_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_farmer_ranking_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_farmer_ranking_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_genesis_hash.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_genesis_hash::VNX_TYPE_HASH(0xbfab786cb64c5a3ull); const vnx::Hash64 Node_get_genesis_hash::VNX_CODE_HASH(0xb26bf026996c20efull); vnx::Hash64 Node_get_genesis_hash::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_genesis_hash::get_type_name() const { return "mmx.Node.get_genesis_hash"; } const vnx::TypeCode* Node_get_genesis_hash::get_type_code() const { return mmx::vnx_native_type_code_Node_get_genesis_hash; } std::shared_ptr Node_get_genesis_hash::create() { return std::make_shared(); } std::shared_ptr Node_get_genesis_hash::clone() const { return std::make_shared(*this); } void Node_get_genesis_hash::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_genesis_hash::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_genesis_hash::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_genesis_hash; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_genesis_hash::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_genesis_hash\""; _out << "}"; } void Node_get_genesis_hash::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_genesis_hash::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_genesis_hash"; return _object; } void Node_get_genesis_hash::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_genesis_hash::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_genesis_hash::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_genesis_hash& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_genesis_hash& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_genesis_hash::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_genesis_hash::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_genesis_hash"; type_code->type_hash = vnx::Hash64(0xbfab786cb64c5a3ull); type_code->code_hash = vnx::Hash64(0xb26bf026996c20efull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_genesis_hash); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_genesis_hash_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_genesis_hash; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_genesis_hash>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_genesis_hash& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_genesis_hash& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_genesis_hash_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_genesis_hash_return::VNX_TYPE_HASH(0x5c5ea53e3163fd5ull); const vnx::Hash64 Node_get_genesis_hash_return::VNX_CODE_HASH(0xcd04b5801dce80eull); vnx::Hash64 Node_get_genesis_hash_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_genesis_hash_return::get_type_name() const { return "mmx.Node.get_genesis_hash.return"; } const vnx::TypeCode* Node_get_genesis_hash_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_genesis_hash_return; } std::shared_ptr Node_get_genesis_hash_return::create() { return std::make_shared(); } std::shared_ptr Node_get_genesis_hash_return::clone() const { return std::make_shared(*this); } void Node_get_genesis_hash_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_genesis_hash_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_genesis_hash_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_genesis_hash_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_genesis_hash_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_genesis_hash.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_genesis_hash_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_genesis_hash_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_genesis_hash.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_genesis_hash_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_genesis_hash_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_genesis_hash_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_genesis_hash_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_genesis_hash_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_genesis_hash_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_genesis_hash_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_genesis_hash.return"; type_code->type_hash = vnx::Hash64(0x5c5ea53e3163fd5ull); type_code->code_hash = vnx::Hash64(0xcd04b5801dce80eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_genesis_hash_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_genesis_hash_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_genesis_hash_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_genesis_hash_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_genesis_hash_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_genesis_hash_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_genesis_hash_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_header.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_header::VNX_TYPE_HASH(0xf17a5d0c180db198ull); const vnx::Hash64 Node_get_header::VNX_CODE_HASH(0x9cda80dd1421da61ull); vnx::Hash64 Node_get_header::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_header::get_type_name() const { return "mmx.Node.get_header"; } const vnx::TypeCode* Node_get_header::get_type_code() const { return mmx::vnx_native_type_code_Node_get_header; } std::shared_ptr Node_get_header::create() { return std::make_shared(); } std::shared_ptr Node_get_header::clone() const { return std::make_shared(*this); } void Node_get_header::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_header::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_header::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_header; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_end(*_type_code); } void Node_get_header::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_header\""; _out << ", \"hash\": "; vnx::write(_out, hash); _out << "}"; } void Node_get_header::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_header::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_header"; _object["hash"] = hash; return _object; } void Node_get_header::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "hash") { _entry.second.to(hash); } } } vnx::Variant Node_get_header::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } return vnx::Variant(); } void Node_get_header::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_header& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_header& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_header::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_header::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_header"; type_code->type_hash = vnx::Hash64(0xf17a5d0c180db198ull); type_code->code_hash = vnx::Hash64(0x9cda80dd1421da61ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_header); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_header_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_header& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_header; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_header>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_header& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_header& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_header& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_header_at.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_header_at::VNX_TYPE_HASH(0x52658163d8767c79ull); const vnx::Hash64 Node_get_header_at::VNX_CODE_HASH(0x76550b37e2e1f741ull); vnx::Hash64 Node_get_header_at::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_header_at::get_type_name() const { return "mmx.Node.get_header_at"; } const vnx::TypeCode* Node_get_header_at::get_type_code() const { return mmx::vnx_native_type_code_Node_get_header_at; } std::shared_ptr Node_get_header_at::create() { return std::make_shared(); } std::shared_ptr Node_get_header_at::clone() const { return std::make_shared(*this); } void Node_get_header_at::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_header_at::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_header_at::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_header_at; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_header_at::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_header_at\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_header_at::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_header_at::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_header_at"; _object["height"] = height; return _object; } void Node_get_header_at::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_header_at::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_header_at::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_header_at& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_header_at& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_header_at::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_header_at::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_header_at"; type_code->type_hash = vnx::Hash64(0x52658163d8767c79ull); type_code->code_hash = vnx::Hash64(0x76550b37e2e1f741ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_header_at); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_header_at_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_header_at& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_header_at; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_header_at>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_header_at& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_header_at& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_header_at& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_header_at_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_header_at_return::VNX_TYPE_HASH(0x4efc6897885ee521ull); const vnx::Hash64 Node_get_header_at_return::VNX_CODE_HASH(0xd550ebdc3bceb8c3ull); vnx::Hash64 Node_get_header_at_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_header_at_return::get_type_name() const { return "mmx.Node.get_header_at.return"; } const vnx::TypeCode* Node_get_header_at_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_header_at_return; } std::shared_ptr Node_get_header_at_return::create() { return std::make_shared(); } std::shared_ptr Node_get_header_at_return::clone() const { return std::make_shared(*this); } void Node_get_header_at_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_header_at_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_header_at_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_header_at_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_header_at_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_header_at.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_header_at_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_header_at_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_header_at.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_header_at_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_header_at_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_header_at_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_header_at_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_header_at_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_header_at_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_header_at_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_header_at.return"; type_code->type_hash = vnx::Hash64(0x4efc6897885ee521ull); type_code->code_hash = vnx::Hash64(0xd550ebdc3bceb8c3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_header_at_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_header_at_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_header_at_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_header_at_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_header_at_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_header_at_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_header_at_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_header_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_header_return::VNX_TYPE_HASH(0xeffae31958103da7ull); const vnx::Hash64 Node_get_header_return::VNX_CODE_HASH(0x1de7b17f139f2757ull); vnx::Hash64 Node_get_header_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_header_return::get_type_name() const { return "mmx.Node.get_header.return"; } const vnx::TypeCode* Node_get_header_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_header_return; } std::shared_ptr Node_get_header_return::create() { return std::make_shared(); } std::shared_ptr Node_get_header_return::clone() const { return std::make_shared(*this); } void Node_get_header_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_header_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_header_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_header_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_header_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_header.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_header_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_header_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_header.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_header_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_header_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_header_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_header_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_header_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_header_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_header_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_header.return"; type_code->type_hash = vnx::Hash64(0xeffae31958103da7ull); type_code->code_hash = vnx::Hash64(0x1de7b17f139f2757ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_header_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_header_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_header_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_header_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_header_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_header_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_header_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_height.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_height::VNX_TYPE_HASH(0x55f0d4ef7a117716ull); const vnx::Hash64 Node_get_height::VNX_CODE_HASH(0x335c00dfad151370ull); vnx::Hash64 Node_get_height::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_height::get_type_name() const { return "mmx.Node.get_height"; } const vnx::TypeCode* Node_get_height::get_type_code() const { return mmx::vnx_native_type_code_Node_get_height; } std::shared_ptr Node_get_height::create() { return std::make_shared(); } std::shared_ptr Node_get_height::clone() const { return std::make_shared(*this); } void Node_get_height::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_height::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_height::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_height; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_height::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_height\""; _out << "}"; } void Node_get_height::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_height::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_height"; return _object; } void Node_get_height::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_height::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_height::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_height& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_height& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_height::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_height::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_height"; type_code->type_hash = vnx::Hash64(0x55f0d4ef7a117716ull); type_code->code_hash = vnx::Hash64(0x335c00dfad151370ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_height); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_height_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_height& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_height; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_height>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_height& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_height& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_height& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_height_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_height_return::VNX_TYPE_HASH(0x5fb0ff1e11add033ull); const vnx::Hash64 Node_get_height_return::VNX_CODE_HASH(0xbcdb9cb9df806e51ull); vnx::Hash64 Node_get_height_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_height_return::get_type_name() const { return "mmx.Node.get_height.return"; } const vnx::TypeCode* Node_get_height_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_height_return; } std::shared_ptr Node_get_height_return::create() { return std::make_shared(); } std::shared_ptr Node_get_height_return::clone() const { return std::make_shared(*this); } void Node_get_height_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_height_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_height_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_height_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_height_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_height.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_height_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_height_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_height.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_height_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_height_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_height_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_height_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_height_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_height_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_height_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_height.return"; type_code->type_hash = vnx::Hash64(0x5fb0ff1e11add033ull); type_code->code_hash = vnx::Hash64(0xbcdb9cb9df806e51ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_height_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "_ret_0"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_height_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_height_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_height_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Node_get_height_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_height_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_height_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_history.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_history::VNX_TYPE_HASH(0x8b3db05c6e91011dull); const vnx::Hash64 Node_get_history::VNX_CODE_HASH(0xc53b4b83f465b5aaull); vnx::Hash64 Node_get_history::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_history::get_type_name() const { return "mmx.Node.get_history"; } const vnx::TypeCode* Node_get_history::get_type_code() const { return mmx::vnx_native_type_code_Node_get_history; } std::shared_ptr Node_get_history::create() { return std::make_shared(); } std::shared_ptr Node_get_history::clone() const { return std::make_shared(*this); } void Node_get_history::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_history::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_history::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_history; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, filter); _visitor.type_end(*_type_code); } void Node_get_history::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_history\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"filter\": "; vnx::write(_out, filter); _out << "}"; } void Node_get_history::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_history::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_history"; _object["addresses"] = addresses; _object["filter"] = filter; return _object; } void Node_get_history::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "filter") { _entry.second.to(filter); } } } vnx::Variant Node_get_history::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "filter") { return vnx::Variant(filter); } return vnx::Variant(); } void Node_get_history::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "filter") { _value.to(filter); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_history& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_history& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_history::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_history::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_history"; type_code->type_hash = vnx::Hash64(0x8b3db05c6e91011dull); type_code->code_hash = vnx::Hash64(0xc53b4b83f465b5aaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_history); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::query_filter_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Node_get_history_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "filter"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.filter, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_history& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_history; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_history>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.filter, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_history& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_history& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_history& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_history_memo.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_history_memo::VNX_TYPE_HASH(0x693c0c791039287cull); const vnx::Hash64 Node_get_history_memo::VNX_CODE_HASH(0xdb209bb81b50135aull); vnx::Hash64 Node_get_history_memo::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_history_memo::get_type_name() const { return "mmx.Node.get_history_memo"; } const vnx::TypeCode* Node_get_history_memo::get_type_code() const { return mmx::vnx_native_type_code_Node_get_history_memo; } std::shared_ptr Node_get_history_memo::create() { return std::make_shared(); } std::shared_ptr Node_get_history_memo::clone() const { return std::make_shared(*this); } void Node_get_history_memo::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_history_memo::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_history_memo::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_history_memo; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, filter); _visitor.type_end(*_type_code); } void Node_get_history_memo::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_history_memo\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"filter\": "; vnx::write(_out, filter); _out << "}"; } void Node_get_history_memo::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_history_memo::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_history_memo"; _object["addresses"] = addresses; _object["memo"] = memo; _object["filter"] = filter; return _object; } void Node_get_history_memo::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "filter") { _entry.second.to(filter); } else if(_entry.first == "memo") { _entry.second.to(memo); } } } vnx::Variant Node_get_history_memo::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "filter") { return vnx::Variant(filter); } return vnx::Variant(); } void Node_get_history_memo::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "memo") { _value.to(memo); } else if(_name == "filter") { _value.to(filter); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_history_memo& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_history_memo& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_history_memo::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_history_memo::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_history_memo"; type_code->type_hash = vnx::Hash64(0x693c0c791039287cull); type_code->code_hash = vnx::Hash64(0xdb209bb81b50135aull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_history_memo); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::query_filter_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Node_get_history_memo_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "memo"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "filter"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.memo, type_code, _field->code.data()); break; case 2: vnx::read(in, value.filter, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_history_memo& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_history_memo; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_history_memo>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[1].code.data()); vnx::write(out, value.filter, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_get_history_memo& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_history_memo& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_history_memo& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_history_memo_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_history_memo_return::VNX_TYPE_HASH(0x3bba2b40c2e82885ull); const vnx::Hash64 Node_get_history_memo_return::VNX_CODE_HASH(0xab2058cf95194c83ull); vnx::Hash64 Node_get_history_memo_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_history_memo_return::get_type_name() const { return "mmx.Node.get_history_memo.return"; } const vnx::TypeCode* Node_get_history_memo_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_history_memo_return; } std::shared_ptr Node_get_history_memo_return::create() { return std::make_shared(); } std::shared_ptr Node_get_history_memo_return::clone() const { return std::make_shared(*this); } void Node_get_history_memo_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_history_memo_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_history_memo_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_history_memo_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_history_memo_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_history_memo.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_history_memo_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_history_memo_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_history_memo.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_history_memo_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_history_memo_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_history_memo_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_history_memo_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_history_memo_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_history_memo_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_history_memo_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_history_memo.return"; type_code->type_hash = vnx::Hash64(0x3bba2b40c2e82885ull); type_code->code_hash = vnx::Hash64(0xab2058cf95194c83ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_history_memo_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_history_memo_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_history_memo_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_history_memo_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_history_memo_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_history_memo_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_history_memo_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_history_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_history_return::VNX_TYPE_HASH(0xa925b7aa92603121ull); const vnx::Hash64 Node_get_history_return::VNX_CODE_HASH(0x3f37957f2aaa562aull); vnx::Hash64 Node_get_history_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_history_return::get_type_name() const { return "mmx.Node.get_history.return"; } const vnx::TypeCode* Node_get_history_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_history_return; } std::shared_ptr Node_get_history_return::create() { return std::make_shared(); } std::shared_ptr Node_get_history_return::clone() const { return std::make_shared(*this); } void Node_get_history_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_history_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_history_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_history_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_history_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_history.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_history_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_history_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_history.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_history_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_history_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_history_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_history_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_history_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_history_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_history_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_history.return"; type_code->type_hash = vnx::Hash64(0xa925b7aa92603121ull); type_code->code_hash = vnx::Hash64(0x3f37957f2aaa562aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_history_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_history_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_history_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_history_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_history_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_history_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_network_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_network_info::VNX_TYPE_HASH(0x79cedc8662eeb2e4ull); const vnx::Hash64 Node_get_network_info::VNX_CODE_HASH(0xd20c41513f58de86ull); vnx::Hash64 Node_get_network_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_network_info::get_type_name() const { return "mmx.Node.get_network_info"; } const vnx::TypeCode* Node_get_network_info::get_type_code() const { return mmx::vnx_native_type_code_Node_get_network_info; } std::shared_ptr Node_get_network_info::create() { return std::make_shared(); } std::shared_ptr Node_get_network_info::clone() const { return std::make_shared(*this); } void Node_get_network_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_network_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_network_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_network_info; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_network_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_network_info\""; _out << "}"; } void Node_get_network_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_network_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_network_info"; return _object; } void Node_get_network_info::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_network_info::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_network_info::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_network_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_network_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_network_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_network_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_network_info"; type_code->type_hash = vnx::Hash64(0x79cedc8662eeb2e4ull); type_code->code_hash = vnx::Hash64(0xd20c41513f58de86ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_network_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_network_info_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_network_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_network_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_network_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_network_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_network_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_network_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_network_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_network_info_return::VNX_TYPE_HASH(0x28541acc5945ae0eull); const vnx::Hash64 Node_get_network_info_return::VNX_CODE_HASH(0xd033cff0ce21f65eull); vnx::Hash64 Node_get_network_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_network_info_return::get_type_name() const { return "mmx.Node.get_network_info.return"; } const vnx::TypeCode* Node_get_network_info_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_network_info_return; } std::shared_ptr Node_get_network_info_return::create() { return std::make_shared(); } std::shared_ptr Node_get_network_info_return::clone() const { return std::make_shared(*this); } void Node_get_network_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_network_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_network_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_network_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_network_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_network_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_network_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_network_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_network_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_network_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_network_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_network_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_network_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_network_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_network_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_network_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_network_info.return"; type_code->type_hash = vnx::Hash64(0x28541acc5945ae0eull); type_code->code_hash = vnx::Hash64(0xd033cff0ce21f65eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_network_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_network_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_network_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_network_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_network_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_network_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_network_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offer.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offer::VNX_TYPE_HASH(0xd3e336e279686563ull); const vnx::Hash64 Node_get_offer::VNX_CODE_HASH(0x4eb1c869fea18518ull); vnx::Hash64 Node_get_offer::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offer::get_type_name() const { return "mmx.Node.get_offer"; } const vnx::TypeCode* Node_get_offer::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offer; } std::shared_ptr Node_get_offer::create() { return std::make_shared(); } std::shared_ptr Node_get_offer::clone() const { return std::make_shared(*this); } void Node_get_offer::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offer::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offer::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offer; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Node_get_offer::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offer\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Node_get_offer::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offer::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offer"; _object["address"] = address; return _object; } void Node_get_offer::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Node_get_offer::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Node_get_offer::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offer& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offer& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offer::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offer::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offer"; type_code->type_hash = vnx::Hash64(0xd3e336e279686563ull); type_code->code_hash = vnx::Hash64(0x4eb1c869fea18518ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_offer); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_offer_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offer& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offer; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offer>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_offer& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offer& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offer& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offer_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offer_return::VNX_TYPE_HASH(0xa92bb7b910e3424full); const vnx::Hash64 Node_get_offer_return::VNX_CODE_HASH(0xe5b919c7f3fef6edull); vnx::Hash64 Node_get_offer_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offer_return::get_type_name() const { return "mmx.Node.get_offer.return"; } const vnx::TypeCode* Node_get_offer_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offer_return; } std::shared_ptr Node_get_offer_return::create() { return std::make_shared(); } std::shared_ptr Node_get_offer_return::clone() const { return std::make_shared(*this); } void Node_get_offer_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offer_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offer_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offer_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_offer_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offer.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_offer_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offer_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offer.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_offer_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_offer_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_offer_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offer_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offer_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offer_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offer_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offer.return"; type_code->type_hash = vnx::Hash64(0xa92bb7b910e3424full); type_code->code_hash = vnx::Hash64(0xe5b919c7f3fef6edull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_offer_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offer_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offer_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offer_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_offer_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offer_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offer_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offers::VNX_TYPE_HASH(0x62e5e37dd72d3175ull); const vnx::Hash64 Node_get_offers::VNX_CODE_HASH(0x29db8eeca4efb7eeull); vnx::Hash64 Node_get_offers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offers::get_type_name() const { return "mmx.Node.get_offers"; } const vnx::TypeCode* Node_get_offers::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offers; } std::shared_ptr Node_get_offers::create() { return std::make_shared(); } std::shared_ptr Node_get_offers::clone() const { return std::make_shared(*this); } void Node_get_offers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offers; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, since); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, state); _visitor.type_end(*_type_code); } void Node_get_offers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offers\""; _out << ", \"since\": "; vnx::write(_out, since); _out << ", \"state\": "; vnx::write(_out, state); _out << "}"; } void Node_get_offers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offers"; _object["since"] = since; _object["state"] = state; return _object; } void Node_get_offers::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "since") { _entry.second.to(since); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Node_get_offers::get_field(const std::string& _name) const { if(_name == "since") { return vnx::Variant(since); } if(_name == "state") { return vnx::Variant(state); } return vnx::Variant(); } void Node_get_offers::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "since") { _value.to(since); } else if(_name == "state") { _value.to(state); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offers"; type_code->type_hash = vnx::Hash64(0x62e5e37dd72d3175ull); type_code->code_hash = vnx::Hash64(0x29db8eeca4efb7eeull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_offers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_offers_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "since"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "state"; field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.since); vnx::write_value(_buf + 4, value.state); } void read(std::istream& in, ::mmx::Node_get_offers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offers_by.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offers_by::VNX_TYPE_HASH(0xf83c55f59e407411ull); const vnx::Hash64 Node_get_offers_by::VNX_CODE_HASH(0xb1cf30bf9bcb8ea3ull); vnx::Hash64 Node_get_offers_by::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offers_by::get_type_name() const { return "mmx.Node.get_offers_by"; } const vnx::TypeCode* Node_get_offers_by::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offers_by; } std::shared_ptr Node_get_offers_by::create() { return std::make_shared(); } std::shared_ptr Node_get_offers_by::clone() const { return std::make_shared(*this); } void Node_get_offers_by::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offers_by::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offers_by::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offers_by; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, owners); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, state); _visitor.type_end(*_type_code); } void Node_get_offers_by::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offers_by\""; _out << ", \"owners\": "; vnx::write(_out, owners); _out << ", \"state\": "; vnx::write(_out, state); _out << "}"; } void Node_get_offers_by::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offers_by::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offers_by"; _object["owners"] = owners; _object["state"] = state; return _object; } void Node_get_offers_by::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "owners") { _entry.second.to(owners); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Node_get_offers_by::get_field(const std::string& _name) const { if(_name == "owners") { return vnx::Variant(owners); } if(_name == "state") { return vnx::Variant(state); } return vnx::Variant(); } void Node_get_offers_by::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "owners") { _value.to(owners); } else if(_name == "state") { _value.to(state); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offers_by& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offers_by& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offers_by::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offers_by::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offers_by"; type_code->type_hash = vnx::Hash64(0xf83c55f59e407411ull); type_code->code_hash = vnx::Hash64(0xb1cf30bf9bcb8ea3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_offers_by); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_offers_by_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "owners"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "state"; field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.owners, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offers_by& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offers_by; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offers_by>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.state); vnx::write(out, value.owners, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_offers_by& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offers_by& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_by& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offers_by_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offers_by_return::VNX_TYPE_HASH(0x59efe1350028d6f4ull); const vnx::Hash64 Node_get_offers_by_return::VNX_CODE_HASH(0x5134fde4dccc8851ull); vnx::Hash64 Node_get_offers_by_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offers_by_return::get_type_name() const { return "mmx.Node.get_offers_by.return"; } const vnx::TypeCode* Node_get_offers_by_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offers_by_return; } std::shared_ptr Node_get_offers_by_return::create() { return std::make_shared(); } std::shared_ptr Node_get_offers_by_return::clone() const { return std::make_shared(*this); } void Node_get_offers_by_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offers_by_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offers_by_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offers_by_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_offers_by_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offers_by.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_offers_by_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offers_by_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offers_by.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_offers_by_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_offers_by_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_offers_by_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offers_by_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offers_by_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offers_by_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offers_by_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offers_by.return"; type_code->type_hash = vnx::Hash64(0x59efe1350028d6f4ull); type_code->code_hash = vnx::Hash64(0x5134fde4dccc8851ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_offers_by_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offers_by_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offers_by_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offers_by_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_offers_by_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offers_by_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_by_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_offers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_offers_return::VNX_TYPE_HASH(0xf93f5d6546a50db1ull); const vnx::Hash64 Node_get_offers_return::VNX_CODE_HASH(0x3a29b226c4b60eafull); vnx::Hash64 Node_get_offers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_offers_return::get_type_name() const { return "mmx.Node.get_offers.return"; } const vnx::TypeCode* Node_get_offers_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_offers_return; } std::shared_ptr Node_get_offers_return::create() { return std::make_shared(); } std::shared_ptr Node_get_offers_return::clone() const { return std::make_shared(*this); } void Node_get_offers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_offers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_offers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_offers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_offers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_offers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_offers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_offers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_offers.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_offers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_offers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_offers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_offers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_offers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_offers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_offers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_offers.return"; type_code->type_hash = vnx::Hash64(0xf93f5d6546a50db1ull); type_code->code_hash = vnx::Hash64(0x3a29b226c4b60eafull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_offers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_offers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_offers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_offers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_offers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_offers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_params.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_params::VNX_TYPE_HASH(0x6384b34900c2e465ull); const vnx::Hash64 Node_get_params::VNX_CODE_HASH(0x3bb9d800cedce77cull); vnx::Hash64 Node_get_params::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_params::get_type_name() const { return "mmx.Node.get_params"; } const vnx::TypeCode* Node_get_params::get_type_code() const { return mmx::vnx_native_type_code_Node_get_params; } std::shared_ptr Node_get_params::create() { return std::make_shared(); } std::shared_ptr Node_get_params::clone() const { return std::make_shared(*this); } void Node_get_params::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_params::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_params::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_params; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_params::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_params\""; _out << "}"; } void Node_get_params::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_params::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_params"; return _object; } void Node_get_params::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_params::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_params::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_params& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_params& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_params::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_params::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_params"; type_code->type_hash = vnx::Hash64(0x6384b34900c2e465ull); type_code->code_hash = vnx::Hash64(0x3bb9d800cedce77cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_params); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_params_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_params& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_params; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_params>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_params& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_params& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_params& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_params_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_params_return::VNX_TYPE_HASH(0xd0a614f2ed037180ull); const vnx::Hash64 Node_get_params_return::VNX_CODE_HASH(0x854cb8ac309ae157ull); vnx::Hash64 Node_get_params_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_params_return::get_type_name() const { return "mmx.Node.get_params.return"; } const vnx::TypeCode* Node_get_params_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_params_return; } std::shared_ptr Node_get_params_return::create() { return std::make_shared(); } std::shared_ptr Node_get_params_return::clone() const { return std::make_shared(*this); } void Node_get_params_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_params_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_params_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_params_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_params_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_params.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_params_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_params_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_params.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_params_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_params_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_params_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_params_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_params_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_params_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_params_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_params.return"; type_code->type_hash = vnx::Hash64(0xd0a614f2ed037180ull); type_code->code_hash = vnx::Hash64(0x854cb8ac309ae157ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_params_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_params_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_params_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_params_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_params_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_params_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_params_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_plot_nft_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_plot_nft_info::VNX_TYPE_HASH(0x23efbfd355a3741full); const vnx::Hash64 Node_get_plot_nft_info::VNX_CODE_HASH(0xa3ac66201fe30af9ull); vnx::Hash64 Node_get_plot_nft_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_plot_nft_info::get_type_name() const { return "mmx.Node.get_plot_nft_info"; } const vnx::TypeCode* Node_get_plot_nft_info::get_type_code() const { return mmx::vnx_native_type_code_Node_get_plot_nft_info; } std::shared_ptr Node_get_plot_nft_info::create() { return std::make_shared(); } std::shared_ptr Node_get_plot_nft_info::clone() const { return std::make_shared(*this); } void Node_get_plot_nft_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_plot_nft_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_plot_nft_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_plot_nft_info; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Node_get_plot_nft_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_plot_nft_info\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Node_get_plot_nft_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_plot_nft_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_plot_nft_info"; _object["address"] = address; return _object; } void Node_get_plot_nft_info::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Node_get_plot_nft_info::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Node_get_plot_nft_info::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_plot_nft_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_plot_nft_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_plot_nft_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_plot_nft_info"; type_code->type_hash = vnx::Hash64(0x23efbfd355a3741full); type_code->code_hash = vnx::Hash64(0xa3ac66201fe30af9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_plot_nft_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_plot_nft_info_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_plot_nft_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_plot_nft_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_plot_nft_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_plot_nft_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_plot_nft_info_return::VNX_TYPE_HASH(0x4d3661c719d8496bull); const vnx::Hash64 Node_get_plot_nft_info_return::VNX_CODE_HASH(0x26113e260e20e7acull); vnx::Hash64 Node_get_plot_nft_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_plot_nft_info_return::get_type_name() const { return "mmx.Node.get_plot_nft_info.return"; } const vnx::TypeCode* Node_get_plot_nft_info_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_plot_nft_info_return; } std::shared_ptr Node_get_plot_nft_info_return::create() { return std::make_shared(); } std::shared_ptr Node_get_plot_nft_info_return::clone() const { return std::make_shared(*this); } void Node_get_plot_nft_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_plot_nft_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_plot_nft_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_plot_nft_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_plot_nft_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_plot_nft_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_plot_nft_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_plot_nft_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_plot_nft_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_plot_nft_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_plot_nft_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_plot_nft_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_plot_nft_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_plot_nft_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_plot_nft_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_plot_nft_info.return"; type_code->type_hash = vnx::Hash64(0x4d3661c719d8496bull); type_code->code_hash = vnx::Hash64(0x26113e260e20e7acull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_plot_nft_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::plot_nft_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_plot_nft_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_plot_nft_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_plot_nft_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_plot_nft_target.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_plot_nft_target::VNX_TYPE_HASH(0x14dfd6e2b1f3282eull); const vnx::Hash64 Node_get_plot_nft_target::VNX_CODE_HASH(0x5fdab24f83715353ull); vnx::Hash64 Node_get_plot_nft_target::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_plot_nft_target::get_type_name() const { return "mmx.Node.get_plot_nft_target"; } const vnx::TypeCode* Node_get_plot_nft_target::get_type_code() const { return mmx::vnx_native_type_code_Node_get_plot_nft_target; } std::shared_ptr Node_get_plot_nft_target::create() { return std::make_shared(); } std::shared_ptr Node_get_plot_nft_target::clone() const { return std::make_shared(*this); } void Node_get_plot_nft_target::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_plot_nft_target::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_plot_nft_target::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_plot_nft_target; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, farmer_addr); _visitor.type_end(*_type_code); } void Node_get_plot_nft_target::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_plot_nft_target\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"farmer_addr\": "; vnx::write(_out, farmer_addr); _out << "}"; } void Node_get_plot_nft_target::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_plot_nft_target::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_plot_nft_target"; _object["address"] = address; _object["farmer_addr"] = farmer_addr; return _object; } void Node_get_plot_nft_target::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "farmer_addr") { _entry.second.to(farmer_addr); } } } vnx::Variant Node_get_plot_nft_target::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "farmer_addr") { return vnx::Variant(farmer_addr); } return vnx::Variant(); } void Node_get_plot_nft_target::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "farmer_addr") { _value.to(farmer_addr); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_target& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_plot_nft_target& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_plot_nft_target::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_plot_nft_target::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_plot_nft_target"; type_code->type_hash = vnx::Hash64(0x14dfd6e2b1f3282eull); type_code->code_hash = vnx::Hash64(0x5fdab24f83715353ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_plot_nft_target); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_plot_nft_target_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "farmer_addr"; field.code = {33, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.farmer_addr, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_plot_nft_target; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_plot_nft_target>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.farmer_addr, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_plot_nft_target& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_plot_nft_target_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_plot_nft_target_return::VNX_TYPE_HASH(0x6d6444fd1b89732ull); const vnx::Hash64 Node_get_plot_nft_target_return::VNX_CODE_HASH(0xaa1f56659aa198ull); vnx::Hash64 Node_get_plot_nft_target_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_plot_nft_target_return::get_type_name() const { return "mmx.Node.get_plot_nft_target.return"; } const vnx::TypeCode* Node_get_plot_nft_target_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_plot_nft_target_return; } std::shared_ptr Node_get_plot_nft_target_return::create() { return std::make_shared(); } std::shared_ptr Node_get_plot_nft_target_return::clone() const { return std::make_shared(*this); } void Node_get_plot_nft_target_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_plot_nft_target_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_plot_nft_target_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_plot_nft_target_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_plot_nft_target_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_plot_nft_target.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_plot_nft_target_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_plot_nft_target_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_plot_nft_target.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_plot_nft_target_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_plot_nft_target_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_plot_nft_target_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_plot_nft_target_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_plot_nft_target_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_plot_nft_target_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_plot_nft_target_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_plot_nft_target.return"; type_code->type_hash = vnx::Hash64(0x6d6444fd1b89732ull); type_code->code_hash = vnx::Hash64(0xaa1f56659aa198ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_plot_nft_target_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_plot_nft_target_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_plot_nft_target_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_plot_nft_target_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_plot_nft_target_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_plot_nft_target_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_recent_offers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_recent_offers::VNX_TYPE_HASH(0xfcd729efd0504fdeull); const vnx::Hash64 Node_get_recent_offers::VNX_CODE_HASH(0x349317a0a5d82726ull); vnx::Hash64 Node_get_recent_offers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_recent_offers::get_type_name() const { return "mmx.Node.get_recent_offers"; } const vnx::TypeCode* Node_get_recent_offers::get_type_code() const { return mmx::vnx_native_type_code_Node_get_recent_offers; } std::shared_ptr Node_get_recent_offers::create() { return std::make_shared(); } std::shared_ptr Node_get_recent_offers::clone() const { return std::make_shared(*this); } void Node_get_recent_offers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_recent_offers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_recent_offers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_recent_offers; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, state); _visitor.type_end(*_type_code); } void Node_get_recent_offers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_recent_offers\""; _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"state\": "; vnx::write(_out, state); _out << "}"; } void Node_get_recent_offers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_recent_offers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_recent_offers"; _object["limit"] = limit; _object["state"] = state; return _object; } void Node_get_recent_offers::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Node_get_recent_offers::get_field(const std::string& _name) const { if(_name == "limit") { return vnx::Variant(limit); } if(_name == "state") { return vnx::Variant(state); } return vnx::Variant(); } void Node_get_recent_offers::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "limit") { _value.to(limit); } else if(_name == "state") { _value.to(state); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_recent_offers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_recent_offers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_recent_offers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_recent_offers"; type_code->type_hash = vnx::Hash64(0xfcd729efd0504fdeull); type_code->code_hash = vnx::Hash64(0x349317a0a5d82726ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_recent_offers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_recent_offers_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "state"; field.value = vnx::to_string(true); field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_recent_offers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_recent_offers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.limit); vnx::write_value(_buf + 4, value.state); } void read(std::istream& in, ::mmx::Node_get_recent_offers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_recent_offers_for.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_recent_offers_for::VNX_TYPE_HASH(0xd89f845556eb17a0ull); const vnx::Hash64 Node_get_recent_offers_for::VNX_CODE_HASH(0x257e50ef372250f1ull); vnx::Hash64 Node_get_recent_offers_for::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_recent_offers_for::get_type_name() const { return "mmx.Node.get_recent_offers_for"; } const vnx::TypeCode* Node_get_recent_offers_for::get_type_code() const { return mmx::vnx_native_type_code_Node_get_recent_offers_for; } std::shared_ptr Node_get_recent_offers_for::create() { return std::make_shared(); } std::shared_ptr Node_get_recent_offers_for::clone() const { return std::make_shared(*this); } void Node_get_recent_offers_for::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_recent_offers_for::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_recent_offers_for::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_recent_offers_for; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, bid); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, ask); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, min_bid); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, state); _visitor.type_end(*_type_code); } void Node_get_recent_offers_for::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_recent_offers_for\""; _out << ", \"bid\": "; vnx::write(_out, bid); _out << ", \"ask\": "; vnx::write(_out, ask); _out << ", \"min_bid\": "; vnx::write(_out, min_bid); _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"state\": "; vnx::write(_out, state); _out << "}"; } void Node_get_recent_offers_for::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_recent_offers_for::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_recent_offers_for"; _object["bid"] = bid; _object["ask"] = ask; _object["min_bid"] = min_bid; _object["limit"] = limit; _object["state"] = state; return _object; } void Node_get_recent_offers_for::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "ask") { _entry.second.to(ask); } else if(_entry.first == "bid") { _entry.second.to(bid); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "min_bid") { _entry.second.to(min_bid); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Node_get_recent_offers_for::get_field(const std::string& _name) const { if(_name == "bid") { return vnx::Variant(bid); } if(_name == "ask") { return vnx::Variant(ask); } if(_name == "min_bid") { return vnx::Variant(min_bid); } if(_name == "limit") { return vnx::Variant(limit); } if(_name == "state") { return vnx::Variant(state); } return vnx::Variant(); } void Node_get_recent_offers_for::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "bid") { _value.to(bid); } else if(_name == "ask") { _value.to(ask); } else if(_name == "min_bid") { _value.to(min_bid); } else if(_name == "limit") { _value.to(limit); } else if(_name == "state") { _value.to(state); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_for& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_recent_offers_for& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_recent_offers_for::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_recent_offers_for::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_recent_offers_for"; type_code->type_hash = vnx::Hash64(0xd89f845556eb17a0ull); type_code->code_hash = vnx::Hash64(0x257e50ef372250f1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_recent_offers_for); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_recent_offers_for_return::static_get_type_code(); type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "bid"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "ask"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "min_bid"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[4]; field.data_size = 1; field.name = "state"; field.value = vnx::to_string(true); field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.bid, type_code, _field->code.data()); break; case 1: vnx::read(in, value.ask, type_code, _field->code.data()); break; case 2: vnx::read(in, value.min_bid, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_recent_offers_for; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_recent_offers_for>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.limit); vnx::write_value(_buf + 4, value.state); vnx::write(out, value.bid, type_code, type_code->fields[0].code.data()); vnx::write(out, value.ask, type_code, type_code->fields[1].code.data()); vnx::write(out, value.min_bid, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_get_recent_offers_for& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_recent_offers_for_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_recent_offers_for_return::VNX_TYPE_HASH(0x8fbaa054b954ea7bull); const vnx::Hash64 Node_get_recent_offers_for_return::VNX_CODE_HASH(0x7fa3e9a6745ba583ull); vnx::Hash64 Node_get_recent_offers_for_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_recent_offers_for_return::get_type_name() const { return "mmx.Node.get_recent_offers_for.return"; } const vnx::TypeCode* Node_get_recent_offers_for_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_recent_offers_for_return; } std::shared_ptr Node_get_recent_offers_for_return::create() { return std::make_shared(); } std::shared_ptr Node_get_recent_offers_for_return::clone() const { return std::make_shared(*this); } void Node_get_recent_offers_for_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_recent_offers_for_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_recent_offers_for_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_recent_offers_for_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_recent_offers_for_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_recent_offers_for.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_recent_offers_for_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_recent_offers_for_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_recent_offers_for.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_recent_offers_for_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_recent_offers_for_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_recent_offers_for_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_for_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_recent_offers_for_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_recent_offers_for_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_recent_offers_for_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_recent_offers_for.return"; type_code->type_hash = vnx::Hash64(0x8fbaa054b954ea7bull); type_code->code_hash = vnx::Hash64(0x7fa3e9a6745ba583ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_recent_offers_for_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_for_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_recent_offers_for_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_recent_offers_for_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_recent_offers_for_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_for_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_for_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_recent_offers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_recent_offers_return::VNX_TYPE_HASH(0x15933813d284d584ull); const vnx::Hash64 Node_get_recent_offers_return::VNX_CODE_HASH(0xb758ab600a6d96d5ull); vnx::Hash64 Node_get_recent_offers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_recent_offers_return::get_type_name() const { return "mmx.Node.get_recent_offers.return"; } const vnx::TypeCode* Node_get_recent_offers_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_recent_offers_return; } std::shared_ptr Node_get_recent_offers_return::create() { return std::make_shared(); } std::shared_ptr Node_get_recent_offers_return::clone() const { return std::make_shared(*this); } void Node_get_recent_offers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_recent_offers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_recent_offers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_recent_offers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_recent_offers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_recent_offers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_recent_offers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_recent_offers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_recent_offers.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_recent_offers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_recent_offers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_recent_offers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_recent_offers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_recent_offers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_recent_offers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_recent_offers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_recent_offers.return"; type_code->type_hash = vnx::Hash64(0x15933813d284d584ull); type_code->code_hash = vnx::Hash64(0xb758ab600a6d96d5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_recent_offers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_recent_offers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_recent_offers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_recent_offers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_recent_offers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_recent_offers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_recent_offers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_equivalent_liquidity.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_equivalent_liquidity::VNX_TYPE_HASH(0xc43a3083725aa480ull); const vnx::Hash64 Node_get_swap_equivalent_liquidity::VNX_CODE_HASH(0x37a2dc4c2ca169eull); vnx::Hash64 Node_get_swap_equivalent_liquidity::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_equivalent_liquidity::get_type_name() const { return "mmx.Node.get_swap_equivalent_liquidity"; } const vnx::TypeCode* Node_get_swap_equivalent_liquidity::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity; } std::shared_ptr Node_get_swap_equivalent_liquidity::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_equivalent_liquidity::clone() const { return std::make_shared(*this); } void Node_get_swap_equivalent_liquidity::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_equivalent_liquidity::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_equivalent_liquidity::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, user); _visitor.type_end(*_type_code); } void Node_get_swap_equivalent_liquidity::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_equivalent_liquidity\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"user\": "; vnx::write(_out, user); _out << "}"; } void Node_get_swap_equivalent_liquidity::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_equivalent_liquidity::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_equivalent_liquidity"; _object["address"] = address; _object["user"] = user; return _object; } void Node_get_swap_equivalent_liquidity::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant Node_get_swap_equivalent_liquidity::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "user") { return vnx::Variant(user); } return vnx::Variant(); } void Node_get_swap_equivalent_liquidity::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "user") { _value.to(user); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_equivalent_liquidity& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_equivalent_liquidity& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_equivalent_liquidity::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_equivalent_liquidity::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_equivalent_liquidity"; type_code->type_hash = vnx::Hash64(0xc43a3083725aa480ull); type_code->code_hash = vnx::Hash64(0x37a2dc4c2ca169eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_equivalent_liquidity); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_equivalent_liquidity_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "user"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.user, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_equivalent_liquidity>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.user, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_equivalent_liquidity_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_equivalent_liquidity_return::VNX_TYPE_HASH(0x8222183b679ab5f4ull); const vnx::Hash64 Node_get_swap_equivalent_liquidity_return::VNX_CODE_HASH(0xa9a47d30b9554b73ull); vnx::Hash64 Node_get_swap_equivalent_liquidity_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_equivalent_liquidity_return::get_type_name() const { return "mmx.Node.get_swap_equivalent_liquidity.return"; } const vnx::TypeCode* Node_get_swap_equivalent_liquidity_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity_return; } std::shared_ptr Node_get_swap_equivalent_liquidity_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_equivalent_liquidity_return::clone() const { return std::make_shared(*this); } void Node_get_swap_equivalent_liquidity_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_equivalent_liquidity_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_equivalent_liquidity_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_equivalent_liquidity_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_equivalent_liquidity.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_equivalent_liquidity_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_equivalent_liquidity_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_equivalent_liquidity.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_equivalent_liquidity_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_equivalent_liquidity_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_equivalent_liquidity_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_equivalent_liquidity_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_equivalent_liquidity_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_equivalent_liquidity_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_equivalent_liquidity_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_equivalent_liquidity.return"; type_code->type_hash = vnx::Hash64(0x8222183b679ab5f4ull); type_code->code_hash = vnx::Hash64(0xa9a47d30b9554b73ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_equivalent_liquidity_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 2, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_equivalent_liquidity_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_equivalent_liquidity_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_equivalent_liquidity_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_equivalent_liquidity_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_fees_earned.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_fees_earned::VNX_TYPE_HASH(0x1dae57fb82265b93ull); const vnx::Hash64 Node_get_swap_fees_earned::VNX_CODE_HASH(0x90e2c4fd714377b5ull); vnx::Hash64 Node_get_swap_fees_earned::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_fees_earned::get_type_name() const { return "mmx.Node.get_swap_fees_earned"; } const vnx::TypeCode* Node_get_swap_fees_earned::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_fees_earned; } std::shared_ptr Node_get_swap_fees_earned::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_fees_earned::clone() const { return std::make_shared(*this); } void Node_get_swap_fees_earned::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_fees_earned::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_fees_earned::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_fees_earned; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, user); _visitor.type_end(*_type_code); } void Node_get_swap_fees_earned::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_fees_earned\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"user\": "; vnx::write(_out, user); _out << "}"; } void Node_get_swap_fees_earned::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_fees_earned::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_fees_earned"; _object["address"] = address; _object["user"] = user; return _object; } void Node_get_swap_fees_earned::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant Node_get_swap_fees_earned::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "user") { return vnx::Variant(user); } return vnx::Variant(); } void Node_get_swap_fees_earned::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "user") { _value.to(user); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_fees_earned& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_fees_earned& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_fees_earned::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_fees_earned::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_fees_earned"; type_code->type_hash = vnx::Hash64(0x1dae57fb82265b93ull); type_code->code_hash = vnx::Hash64(0x90e2c4fd714377b5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_fees_earned); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_fees_earned_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "user"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.user, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_fees_earned; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_fees_earned>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.user, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_fees_earned& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_fees_earned_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_fees_earned_return::VNX_TYPE_HASH(0x57002afc89a8db98ull); const vnx::Hash64 Node_get_swap_fees_earned_return::VNX_CODE_HASH(0x26e18797ed0fa73bull); vnx::Hash64 Node_get_swap_fees_earned_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_fees_earned_return::get_type_name() const { return "mmx.Node.get_swap_fees_earned.return"; } const vnx::TypeCode* Node_get_swap_fees_earned_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_fees_earned_return; } std::shared_ptr Node_get_swap_fees_earned_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_fees_earned_return::clone() const { return std::make_shared(*this); } void Node_get_swap_fees_earned_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_fees_earned_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_fees_earned_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_fees_earned_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_fees_earned_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_fees_earned.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_fees_earned_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_fees_earned_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_fees_earned.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_fees_earned_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_fees_earned_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_fees_earned_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_fees_earned_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_fees_earned_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_fees_earned_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_fees_earned_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_fees_earned.return"; type_code->type_hash = vnx::Hash64(0x57002afc89a8db98ull); type_code->code_hash = vnx::Hash64(0x26e18797ed0fa73bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_fees_earned_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 2, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_fees_earned_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_fees_earned_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_fees_earned_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_fees_earned_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_fees_earned_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_fees_earned_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_history.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_history::VNX_TYPE_HASH(0xc16faaf15fcc9f36ull); const vnx::Hash64 Node_get_swap_history::VNX_CODE_HASH(0xf6187067c518204bull); vnx::Hash64 Node_get_swap_history::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_history::get_type_name() const { return "mmx.Node.get_swap_history"; } const vnx::TypeCode* Node_get_swap_history::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_history; } std::shared_ptr Node_get_swap_history::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_history::clone() const { return std::make_shared(*this); } void Node_get_swap_history::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_history::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_history::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_history; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_swap_history::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_history\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_swap_history::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_history::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_history"; _object["address"] = address; _object["limit"] = limit; return _object; } void Node_get_swap_history::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "limit") { _entry.second.to(limit); } } } vnx::Variant Node_get_swap_history::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_swap_history::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_history& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_history& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_history::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_history::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_history"; type_code->type_hash = vnx::Hash64(0xc16faaf15fcc9f36ull); type_code->code_hash = vnx::Hash64(0xf6187067c518204bull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_history); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_history_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_history& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_history; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_history>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_history& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_history& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_history& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_history_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_history_return::VNX_TYPE_HASH(0xe5d18002a6793518ull); const vnx::Hash64 Node_get_swap_history_return::VNX_CODE_HASH(0x5992d6f04a91c899ull); vnx::Hash64 Node_get_swap_history_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_history_return::get_type_name() const { return "mmx.Node.get_swap_history.return"; } const vnx::TypeCode* Node_get_swap_history_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_history_return; } std::shared_ptr Node_get_swap_history_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_history_return::clone() const { return std::make_shared(*this); } void Node_get_swap_history_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_history_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_history_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_history_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_history_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_history.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_history_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_history_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_history.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_history_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_history_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_history_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_history_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_history_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_history_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_history_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_history.return"; type_code->type_hash = vnx::Hash64(0xe5d18002a6793518ull); type_code->code_hash = vnx::Hash64(0x5992d6f04a91c899ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_history_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::swap_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_history_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_history_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_history_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_history_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_history_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_history_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_info::VNX_TYPE_HASH(0x14f546a807fae18cull); const vnx::Hash64 Node_get_swap_info::VNX_CODE_HASH(0x209e3ab45f0cbb44ull); vnx::Hash64 Node_get_swap_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_info::get_type_name() const { return "mmx.Node.get_swap_info"; } const vnx::TypeCode* Node_get_swap_info::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_info; } std::shared_ptr Node_get_swap_info::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_info::clone() const { return std::make_shared(*this); } void Node_get_swap_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_info; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Node_get_swap_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_info\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Node_get_swap_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_info"; _object["address"] = address; return _object; } void Node_get_swap_info::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Node_get_swap_info::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Node_get_swap_info::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_info"; type_code->type_hash = vnx::Hash64(0x14f546a807fae18cull); type_code->code_hash = vnx::Hash64(0x209e3ab45f0cbb44ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_info_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_info_return::VNX_TYPE_HASH(0x302116742171428ull); const vnx::Hash64 Node_get_swap_info_return::VNX_CODE_HASH(0xae9c868fbe0e8b4aull); vnx::Hash64 Node_get_swap_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_info_return::get_type_name() const { return "mmx.Node.get_swap_info.return"; } const vnx::TypeCode* Node_get_swap_info_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_info_return; } std::shared_ptr Node_get_swap_info_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_info_return::clone() const { return std::make_shared(*this); } void Node_get_swap_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_info.return"; type_code->type_hash = vnx::Hash64(0x302116742171428ull); type_code->code_hash = vnx::Hash64(0xae9c868fbe0e8b4aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::swap_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_liquidity_by.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_liquidity_by::VNX_TYPE_HASH(0x426cded100da751eull); const vnx::Hash64 Node_get_swap_liquidity_by::VNX_CODE_HASH(0xcaafc5d8fba2d9b3ull); vnx::Hash64 Node_get_swap_liquidity_by::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_liquidity_by::get_type_name() const { return "mmx.Node.get_swap_liquidity_by"; } const vnx::TypeCode* Node_get_swap_liquidity_by::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_liquidity_by; } std::shared_ptr Node_get_swap_liquidity_by::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_liquidity_by::clone() const { return std::make_shared(*this); } void Node_get_swap_liquidity_by::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_liquidity_by::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_liquidity_by::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_liquidity_by; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_end(*_type_code); } void Node_get_swap_liquidity_by::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_liquidity_by\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << "}"; } void Node_get_swap_liquidity_by::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_liquidity_by::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_liquidity_by"; _object["addresses"] = addresses; return _object; } void Node_get_swap_liquidity_by::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } } } vnx::Variant Node_get_swap_liquidity_by::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } return vnx::Variant(); } void Node_get_swap_liquidity_by::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_liquidity_by& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_liquidity_by& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_liquidity_by::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_liquidity_by::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_liquidity_by"; type_code->type_hash = vnx::Hash64(0x426cded100da751eull); type_code->code_hash = vnx::Hash64(0xcaafc5d8fba2d9b3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_liquidity_by); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_liquidity_by_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_liquidity_by; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_liquidity_by>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_liquidity_by_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_liquidity_by_return::VNX_TYPE_HASH(0x8401973e1930a6c0ull); const vnx::Hash64 Node_get_swap_liquidity_by_return::VNX_CODE_HASH(0xb684484e073bc385ull); vnx::Hash64 Node_get_swap_liquidity_by_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_liquidity_by_return::get_type_name() const { return "mmx.Node.get_swap_liquidity_by.return"; } const vnx::TypeCode* Node_get_swap_liquidity_by_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_liquidity_by_return; } std::shared_ptr Node_get_swap_liquidity_by_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_liquidity_by_return::clone() const { return std::make_shared(*this); } void Node_get_swap_liquidity_by_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_liquidity_by_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_liquidity_by_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_liquidity_by_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_liquidity_by_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_liquidity_by.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_liquidity_by_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_liquidity_by_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_liquidity_by.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_liquidity_by_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_liquidity_by_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_liquidity_by_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_liquidity_by_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_liquidity_by_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_liquidity_by_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_liquidity_by_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_liquidity_by.return"; type_code->type_hash = vnx::Hash64(0x8401973e1930a6c0ull); type_code->code_hash = vnx::Hash64(0xb684484e073bc385ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_liquidity_by_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 11, 2, 23, 2, 4, 7, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_liquidity_by_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_liquidity_by_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_liquidity_by_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_liquidity_by_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_liquidity_by_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_liquidity_by_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_trade_estimate.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_trade_estimate::VNX_TYPE_HASH(0x1c3d2e0c3a431e9eull); const vnx::Hash64 Node_get_swap_trade_estimate::VNX_CODE_HASH(0x59ac243a11f8e99dull); vnx::Hash64 Node_get_swap_trade_estimate::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_trade_estimate::get_type_name() const { return "mmx.Node.get_swap_trade_estimate"; } const vnx::TypeCode* Node_get_swap_trade_estimate::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_trade_estimate; } std::shared_ptr Node_get_swap_trade_estimate::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_trade_estimate::clone() const { return std::make_shared(*this); } void Node_get_swap_trade_estimate::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_trade_estimate::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_trade_estimate::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_trade_estimate; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, i); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, num_iter); _visitor.type_end(*_type_code); } void Node_get_swap_trade_estimate::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_trade_estimate\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"i\": "; vnx::write(_out, i); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"num_iter\": "; vnx::write(_out, num_iter); _out << "}"; } void Node_get_swap_trade_estimate::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_trade_estimate::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_trade_estimate"; _object["address"] = address; _object["i"] = i; _object["amount"] = amount; _object["num_iter"] = num_iter; return _object; } void Node_get_swap_trade_estimate::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "i") { _entry.second.to(i); } else if(_entry.first == "num_iter") { _entry.second.to(num_iter); } } } vnx::Variant Node_get_swap_trade_estimate::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "i") { return vnx::Variant(i); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "num_iter") { return vnx::Variant(num_iter); } return vnx::Variant(); } void Node_get_swap_trade_estimate::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "i") { _value.to(i); } else if(_name == "amount") { _value.to(amount); } else if(_name == "num_iter") { _value.to(num_iter); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_trade_estimate& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_trade_estimate& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_trade_estimate::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_trade_estimate::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_trade_estimate"; type_code->type_hash = vnx::Hash64(0x1c3d2e0c3a431e9eull); type_code->code_hash = vnx::Hash64(0x59ac243a11f8e99dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_trade_estimate); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_trade_estimate_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "i"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "num_iter"; field.value = vnx::to_string(20); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.i, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.num_iter, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_trade_estimate; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_trade_estimate>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.i); vnx::write_value(_buf + 4, value.num_iter); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_trade_estimate_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_trade_estimate_return::VNX_TYPE_HASH(0xdad9da7cd6d250a8ull); const vnx::Hash64 Node_get_swap_trade_estimate_return::VNX_CODE_HASH(0x18e5c28b0e63af60ull); vnx::Hash64 Node_get_swap_trade_estimate_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_trade_estimate_return::get_type_name() const { return "mmx.Node.get_swap_trade_estimate.return"; } const vnx::TypeCode* Node_get_swap_trade_estimate_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_trade_estimate_return; } std::shared_ptr Node_get_swap_trade_estimate_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_trade_estimate_return::clone() const { return std::make_shared(*this); } void Node_get_swap_trade_estimate_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_trade_estimate_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_trade_estimate_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_trade_estimate_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_trade_estimate_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_trade_estimate.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_trade_estimate_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_trade_estimate_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_trade_estimate.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_trade_estimate_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_trade_estimate_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_trade_estimate_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_trade_estimate_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_trade_estimate_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_trade_estimate_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_trade_estimate_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_trade_estimate.return"; type_code->type_hash = vnx::Hash64(0xdad9da7cd6d250a8ull); type_code->code_hash = vnx::Hash64(0x18e5c28b0e63af60ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_trade_estimate_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 2, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_trade_estimate_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_trade_estimate_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_trade_estimate_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_trade_estimate_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_trade_estimate_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_trade_estimate_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_user_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_user_info::VNX_TYPE_HASH(0xb92b8fb7df56ec0full); const vnx::Hash64 Node_get_swap_user_info::VNX_CODE_HASH(0xf7e2a3665d4104cfull); vnx::Hash64 Node_get_swap_user_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_user_info::get_type_name() const { return "mmx.Node.get_swap_user_info"; } const vnx::TypeCode* Node_get_swap_user_info::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_user_info; } std::shared_ptr Node_get_swap_user_info::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_user_info::clone() const { return std::make_shared(*this); } void Node_get_swap_user_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_user_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_user_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_user_info; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, user); _visitor.type_end(*_type_code); } void Node_get_swap_user_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_user_info\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"user\": "; vnx::write(_out, user); _out << "}"; } void Node_get_swap_user_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_user_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_user_info"; _object["address"] = address; _object["user"] = user; return _object; } void Node_get_swap_user_info::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant Node_get_swap_user_info::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "user") { return vnx::Variant(user); } return vnx::Variant(); } void Node_get_swap_user_info::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "user") { _value.to(user); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_user_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_user_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_user_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_user_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_user_info"; type_code->type_hash = vnx::Hash64(0xb92b8fb7df56ec0full); type_code->code_hash = vnx::Hash64(0xf7e2a3665d4104cfull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swap_user_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swap_user_info_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "user"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.user, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_user_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_user_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.user, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_user_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_user_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swap_user_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swap_user_info_return::VNX_TYPE_HASH(0x50fb0bab9551a420ull); const vnx::Hash64 Node_get_swap_user_info_return::VNX_CODE_HASH(0xed728cdf39ccbb56ull); vnx::Hash64 Node_get_swap_user_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swap_user_info_return::get_type_name() const { return "mmx.Node.get_swap_user_info.return"; } const vnx::TypeCode* Node_get_swap_user_info_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swap_user_info_return; } std::shared_ptr Node_get_swap_user_info_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swap_user_info_return::clone() const { return std::make_shared(*this); } void Node_get_swap_user_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swap_user_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swap_user_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swap_user_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swap_user_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swap_user_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swap_user_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swap_user_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swap_user_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swap_user_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swap_user_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swap_user_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swap_user_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swap_user_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swap_user_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swap_user_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swap_user_info.return"; type_code->type_hash = vnx::Hash64(0x50fb0bab9551a420ull); type_code->code_hash = vnx::Hash64(0xed728cdf39ccbb56ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swap_user_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::swap_user_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swap_user_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swap_user_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swap_user_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swap_user_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swap_user_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swap_user_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swaps.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swaps::VNX_TYPE_HASH(0x219bbb3e5dcd19eaull); const vnx::Hash64 Node_get_swaps::VNX_CODE_HASH(0x7e2b02fa5105020full); vnx::Hash64 Node_get_swaps::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swaps::get_type_name() const { return "mmx.Node.get_swaps"; } const vnx::TypeCode* Node_get_swaps::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swaps; } std::shared_ptr Node_get_swaps::create() { return std::make_shared(); } std::shared_ptr Node_get_swaps::clone() const { return std::make_shared(*this); } void Node_get_swaps::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swaps::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swaps::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swaps; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, since); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, token); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_swaps::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swaps\""; _out << ", \"since\": "; vnx::write(_out, since); _out << ", \"token\": "; vnx::write(_out, token); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_swaps::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swaps::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swaps"; _object["since"] = since; _object["token"] = token; _object["currency"] = currency; _object["limit"] = limit; return _object; } void Node_get_swaps::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "since") { _entry.second.to(since); } else if(_entry.first == "token") { _entry.second.to(token); } } } vnx::Variant Node_get_swaps::get_field(const std::string& _name) const { if(_name == "since") { return vnx::Variant(since); } if(_name == "token") { return vnx::Variant(token); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_swaps::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "since") { _value.to(since); } else if(_name == "token") { _value.to(token); } else if(_name == "currency") { _value.to(currency); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swaps& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swaps& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swaps::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swaps::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swaps"; type_code->type_hash = vnx::Hash64(0x219bbb3e5dcd19eaull); type_code->code_hash = vnx::Hash64(0x7e2b02fa5105020full); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_swaps); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_swaps_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "since"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "token"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "currency"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.token, type_code, _field->code.data()); break; case 2: vnx::read(in, value.currency, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swaps& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swaps; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swaps>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.since); vnx::write_value(_buf + 4, value.limit); vnx::write(out, value.token, type_code, type_code->fields[1].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_get_swaps& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swaps& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swaps& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_swaps_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_swaps_return::VNX_TYPE_HASH(0x6c94172788fc0d28ull); const vnx::Hash64 Node_get_swaps_return::VNX_CODE_HASH(0x202bfdbb7557dd36ull); vnx::Hash64 Node_get_swaps_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_swaps_return::get_type_name() const { return "mmx.Node.get_swaps.return"; } const vnx::TypeCode* Node_get_swaps_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_swaps_return; } std::shared_ptr Node_get_swaps_return::create() { return std::make_shared(); } std::shared_ptr Node_get_swaps_return::clone() const { return std::make_shared(*this); } void Node_get_swaps_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_swaps_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_swaps_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_swaps_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_swaps_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_swaps.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_swaps_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_swaps_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_swaps.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_swaps_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_swaps_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_swaps_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_swaps_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_swaps_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_swaps_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_swaps_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_swaps.return"; type_code->type_hash = vnx::Hash64(0x6c94172788fc0d28ull); type_code->code_hash = vnx::Hash64(0x202bfdbb7557dd36ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_swaps_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::swap_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_swaps_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_swaps_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_swaps_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_swaps_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_swaps_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_swaps_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_synced_height.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_synced_height::VNX_TYPE_HASH(0xc4fb44ec3d1a8bb7ull); const vnx::Hash64 Node_get_synced_height::VNX_CODE_HASH(0x464cc259b6a2d63eull); vnx::Hash64 Node_get_synced_height::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_synced_height::get_type_name() const { return "mmx.Node.get_synced_height"; } const vnx::TypeCode* Node_get_synced_height::get_type_code() const { return mmx::vnx_native_type_code_Node_get_synced_height; } std::shared_ptr Node_get_synced_height::create() { return std::make_shared(); } std::shared_ptr Node_get_synced_height::clone() const { return std::make_shared(*this); } void Node_get_synced_height::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_synced_height::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_synced_height::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_synced_height; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_synced_height::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_synced_height\""; _out << "}"; } void Node_get_synced_height::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_synced_height::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_synced_height"; return _object; } void Node_get_synced_height::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_synced_height::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_synced_height::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_synced_height& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_synced_height& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_synced_height::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_synced_height::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_synced_height"; type_code->type_hash = vnx::Hash64(0xc4fb44ec3d1a8bb7ull); type_code->code_hash = vnx::Hash64(0x464cc259b6a2d63eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_synced_height); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_synced_height_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_synced_height& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_synced_height; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_synced_height>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_synced_height& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_synced_height& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_height& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_synced_height_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_synced_height_return::VNX_TYPE_HASH(0xd466ce92d1bbe9dbull); const vnx::Hash64 Node_get_synced_height_return::VNX_CODE_HASH(0x7d7b9560128347f5ull); vnx::Hash64 Node_get_synced_height_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_synced_height_return::get_type_name() const { return "mmx.Node.get_synced_height.return"; } const vnx::TypeCode* Node_get_synced_height_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_synced_height_return; } std::shared_ptr Node_get_synced_height_return::create() { return std::make_shared(); } std::shared_ptr Node_get_synced_height_return::clone() const { return std::make_shared(*this); } void Node_get_synced_height_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_synced_height_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_synced_height_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_synced_height_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_synced_height_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_synced_height.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_synced_height_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_synced_height_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_synced_height.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_synced_height_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_synced_height_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_synced_height_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_synced_height_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_synced_height_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_synced_height_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_synced_height_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_synced_height.return"; type_code->type_hash = vnx::Hash64(0xd466ce92d1bbe9dbull); type_code->code_hash = vnx::Hash64(0x7d7b9560128347f5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_synced_height_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_synced_height_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_synced_height_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_synced_height_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_synced_height_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_synced_height_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_height_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_synced_vdf_height.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_synced_vdf_height::VNX_TYPE_HASH(0x3c9ce92abd3b42c6ull); const vnx::Hash64 Node_get_synced_vdf_height::VNX_CODE_HASH(0x82b1484b9ecd3657ull); vnx::Hash64 Node_get_synced_vdf_height::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_synced_vdf_height::get_type_name() const { return "mmx.Node.get_synced_vdf_height"; } const vnx::TypeCode* Node_get_synced_vdf_height::get_type_code() const { return mmx::vnx_native_type_code_Node_get_synced_vdf_height; } std::shared_ptr Node_get_synced_vdf_height::create() { return std::make_shared(); } std::shared_ptr Node_get_synced_vdf_height::clone() const { return std::make_shared(*this); } void Node_get_synced_vdf_height::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_synced_vdf_height::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_synced_vdf_height::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_synced_vdf_height; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_synced_vdf_height::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_synced_vdf_height\""; _out << "}"; } void Node_get_synced_vdf_height::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_synced_vdf_height::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_synced_vdf_height"; return _object; } void Node_get_synced_vdf_height::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_synced_vdf_height::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_synced_vdf_height::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_synced_vdf_height& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_synced_vdf_height& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_synced_vdf_height::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_synced_vdf_height::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_synced_vdf_height"; type_code->type_hash = vnx::Hash64(0x3c9ce92abd3b42c6ull); type_code->code_hash = vnx::Hash64(0x82b1484b9ecd3657ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_synced_vdf_height); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_synced_vdf_height_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_synced_vdf_height; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_synced_vdf_height>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_synced_vdf_height& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_synced_vdf_height_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_synced_vdf_height_return::VNX_TYPE_HASH(0x1122764a35c86b4ull); const vnx::Hash64 Node_get_synced_vdf_height_return::VNX_CODE_HASH(0x474b1ca5fcfb3b7dull); vnx::Hash64 Node_get_synced_vdf_height_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_synced_vdf_height_return::get_type_name() const { return "mmx.Node.get_synced_vdf_height.return"; } const vnx::TypeCode* Node_get_synced_vdf_height_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_synced_vdf_height_return; } std::shared_ptr Node_get_synced_vdf_height_return::create() { return std::make_shared(); } std::shared_ptr Node_get_synced_vdf_height_return::clone() const { return std::make_shared(*this); } void Node_get_synced_vdf_height_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_synced_vdf_height_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_synced_vdf_height_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_synced_vdf_height_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_synced_vdf_height_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_synced_vdf_height.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_synced_vdf_height_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_synced_vdf_height_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_synced_vdf_height.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_synced_vdf_height_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_synced_vdf_height_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_synced_vdf_height_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_synced_vdf_height_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_synced_vdf_height_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_synced_vdf_height_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_synced_vdf_height_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_synced_vdf_height.return"; type_code->type_hash = vnx::Hash64(0x1122764a35c86b4ull); type_code->code_hash = vnx::Hash64(0x474b1ca5fcfb3b7dull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_synced_vdf_height_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_synced_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_synced_vdf_height_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_synced_vdf_height_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_synced_vdf_height_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_synced_vdf_height_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_synced_vdf_height_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_balance.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_balance::VNX_TYPE_HASH(0x91e9019d224db4b0ull); const vnx::Hash64 Node_get_total_balance::VNX_CODE_HASH(0x17c673627fde8469ull); vnx::Hash64 Node_get_total_balance::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_balance::get_type_name() const { return "mmx.Node.get_total_balance"; } const vnx::TypeCode* Node_get_total_balance::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_balance; } std::shared_ptr Node_get_total_balance::create() { return std::make_shared(); } std::shared_ptr Node_get_total_balance::clone() const { return std::make_shared(*this); } void Node_get_total_balance::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_balance::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_balance::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_balance; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, currency); _visitor.type_end(*_type_code); } void Node_get_total_balance::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_balance\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"currency\": "; vnx::write(_out, currency); _out << "}"; } void Node_get_total_balance::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_balance::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_balance"; _object["addresses"] = addresses; _object["currency"] = currency; return _object; } void Node_get_total_balance::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "currency") { _entry.second.to(currency); } } } vnx::Variant Node_get_total_balance::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "currency") { return vnx::Variant(currency); } return vnx::Variant(); } void Node_get_total_balance::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "currency") { _value.to(currency); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_balance& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_balance& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_balance::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_balance::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_balance"; type_code->type_hash = vnx::Hash64(0x91e9019d224db4b0ull); type_code->code_hash = vnx::Hash64(0x17c673627fde8469ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_total_balance); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_total_balance_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.currency, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_balance& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_balance; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_balance>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_balance& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_balance& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balance& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_balance_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_balance_return::VNX_TYPE_HASH(0x3336380a894f52a8ull); const vnx::Hash64 Node_get_total_balance_return::VNX_CODE_HASH(0x69d274a0a8cade7full); vnx::Hash64 Node_get_total_balance_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_balance_return::get_type_name() const { return "mmx.Node.get_total_balance.return"; } const vnx::TypeCode* Node_get_total_balance_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_balance_return; } std::shared_ptr Node_get_total_balance_return::create() { return std::make_shared(); } std::shared_ptr Node_get_total_balance_return::clone() const { return std::make_shared(*this); } void Node_get_total_balance_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_balance_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_balance_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_balance_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_total_balance_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_balance.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_total_balance_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_balance_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_balance.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_total_balance_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_total_balance_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_total_balance_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_balance_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_balance_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_balance_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_balance_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_balance.return"; type_code->type_hash = vnx::Hash64(0x3336380a894f52a8ull); type_code->code_hash = vnx::Hash64(0x69d274a0a8cade7full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_total_balance_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_balance_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_balance_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_balance_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_balance_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_balance_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balance_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_balances::VNX_TYPE_HASH(0xf54c4ec46ee6053aull); const vnx::Hash64 Node_get_total_balances::VNX_CODE_HASH(0xd2aad71eec31d2baull); vnx::Hash64 Node_get_total_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_balances::get_type_name() const { return "mmx.Node.get_total_balances"; } const vnx::TypeCode* Node_get_total_balances::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_balances; } std::shared_ptr Node_get_total_balances::create() { return std::make_shared(); } std::shared_ptr Node_get_total_balances::clone() const { return std::make_shared(*this); } void Node_get_total_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, whitelist); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_total_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_balances\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << ", \"whitelist\": "; vnx::write(_out, whitelist); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_total_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_balances"; _object["addresses"] = addresses; _object["whitelist"] = whitelist; _object["limit"] = limit; return _object; } void Node_get_total_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "whitelist") { _entry.second.to(whitelist); } } } vnx::Variant Node_get_total_balances::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } if(_name == "whitelist") { return vnx::Variant(whitelist); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_total_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } else if(_name == "whitelist") { _value.to(whitelist); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_balances"; type_code->type_hash = vnx::Hash64(0xf54c4ec46ee6053aull); type_code->code_hash = vnx::Hash64(0xd2aad71eec31d2baull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_total_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_total_balances_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "whitelist"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; case 1: vnx::read(in, value.whitelist, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); vnx::write(out, value.whitelist, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_balances_return::VNX_TYPE_HASH(0x9332c7a83f7644d7ull); const vnx::Hash64 Node_get_total_balances_return::VNX_CODE_HASH(0xf94eb47d52857af5ull); vnx::Hash64 Node_get_total_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_balances_return::get_type_name() const { return "mmx.Node.get_total_balances.return"; } const vnx::TypeCode* Node_get_total_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_balances_return; } std::shared_ptr Node_get_total_balances_return::create() { return std::make_shared(); } std::shared_ptr Node_get_total_balances_return::clone() const { return std::make_shared(*this); } void Node_get_total_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_total_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_total_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_total_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_total_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_total_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_balances.return"; type_code->type_hash = vnx::Hash64(0x9332c7a83f7644d7ull); type_code->code_hash = vnx::Hash64(0xf94eb47d52857af5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_total_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_supply.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_supply::VNX_TYPE_HASH(0x17d971db6900bd9dull); const vnx::Hash64 Node_get_total_supply::VNX_CODE_HASH(0x165f215d915fdca0ull); vnx::Hash64 Node_get_total_supply::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_supply::get_type_name() const { return "mmx.Node.get_total_supply"; } const vnx::TypeCode* Node_get_total_supply::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_supply; } std::shared_ptr Node_get_total_supply::create() { return std::make_shared(); } std::shared_ptr Node_get_total_supply::clone() const { return std::make_shared(*this); } void Node_get_total_supply::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_supply::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_supply::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_supply; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, currency); _visitor.type_end(*_type_code); } void Node_get_total_supply::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_supply\""; _out << ", \"currency\": "; vnx::write(_out, currency); _out << "}"; } void Node_get_total_supply::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_supply::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_supply"; _object["currency"] = currency; return _object; } void Node_get_total_supply::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "currency") { _entry.second.to(currency); } } } vnx::Variant Node_get_total_supply::get_field(const std::string& _name) const { if(_name == "currency") { return vnx::Variant(currency); } return vnx::Variant(); } void Node_get_total_supply::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "currency") { _value.to(currency); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_supply& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_supply& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_supply::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_supply::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_supply"; type_code->type_hash = vnx::Hash64(0x17d971db6900bd9dull); type_code->code_hash = vnx::Hash64(0x165f215d915fdca0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_total_supply); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_total_supply_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.currency, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_supply& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_supply; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_supply>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.currency, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_supply& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_supply& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_supply& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_total_supply_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_total_supply_return::VNX_TYPE_HASH(0xe69f15a0766eaf27ull); const vnx::Hash64 Node_get_total_supply_return::VNX_CODE_HASH(0x655bdc70148efe9bull); vnx::Hash64 Node_get_total_supply_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_total_supply_return::get_type_name() const { return "mmx.Node.get_total_supply.return"; } const vnx::TypeCode* Node_get_total_supply_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_total_supply_return; } std::shared_ptr Node_get_total_supply_return::create() { return std::make_shared(); } std::shared_ptr Node_get_total_supply_return::clone() const { return std::make_shared(*this); } void Node_get_total_supply_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_total_supply_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_total_supply_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_total_supply_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_total_supply_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_total_supply.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_total_supply_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_total_supply_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_total_supply.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_total_supply_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_total_supply_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_total_supply_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_total_supply_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_total_supply_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_total_supply_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_total_supply_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_total_supply.return"; type_code->type_hash = vnx::Hash64(0xe69f15a0766eaf27ull); type_code->code_hash = vnx::Hash64(0x655bdc70148efe9bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_total_supply_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_total_supply_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_total_supply_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_total_supply_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_total_supply_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_total_supply_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_total_supply_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_trade_history.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_trade_history::VNX_TYPE_HASH(0x62736b035e3995cdull); const vnx::Hash64 Node_get_trade_history::VNX_CODE_HASH(0xd38814ee5dd93feeull); vnx::Hash64 Node_get_trade_history::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_trade_history::get_type_name() const { return "mmx.Node.get_trade_history"; } const vnx::TypeCode* Node_get_trade_history::get_type_code() const { return mmx::vnx_native_type_code_Node_get_trade_history; } std::shared_ptr Node_get_trade_history::create() { return std::make_shared(); } std::shared_ptr Node_get_trade_history::clone() const { return std::make_shared(*this); } void Node_get_trade_history::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_trade_history::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_trade_history::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_trade_history; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, since); _visitor.type_end(*_type_code); } void Node_get_trade_history::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_trade_history\""; _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"since\": "; vnx::write(_out, since); _out << "}"; } void Node_get_trade_history::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_trade_history::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_trade_history"; _object["limit"] = limit; _object["since"] = since; return _object; } void Node_get_trade_history::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "since") { _entry.second.to(since); } } } vnx::Variant Node_get_trade_history::get_field(const std::string& _name) const { if(_name == "limit") { return vnx::Variant(limit); } if(_name == "since") { return vnx::Variant(since); } return vnx::Variant(); } void Node_get_trade_history::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "limit") { _value.to(limit); } else if(_name == "since") { _value.to(since); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_trade_history& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_trade_history::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_trade_history::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_trade_history"; type_code->type_hash = vnx::Hash64(0x62736b035e3995cdull); type_code->code_hash = vnx::Hash64(0xd38814ee5dd93feeull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_trade_history); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_trade_history_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "since"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_trade_history& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_trade_history; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_trade_history>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.limit); vnx::write_value(_buf + 4, value.since); } void read(std::istream& in, ::mmx::Node_get_trade_history& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_trade_history& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_trade_history_for.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_trade_history_for::VNX_TYPE_HASH(0xd55cda633e3dd5b8ull); const vnx::Hash64 Node_get_trade_history_for::VNX_CODE_HASH(0x2acc677d65d4b58full); vnx::Hash64 Node_get_trade_history_for::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_trade_history_for::get_type_name() const { return "mmx.Node.get_trade_history_for"; } const vnx::TypeCode* Node_get_trade_history_for::get_type_code() const { return mmx::vnx_native_type_code_Node_get_trade_history_for; } std::shared_ptr Node_get_trade_history_for::create() { return std::make_shared(); } std::shared_ptr Node_get_trade_history_for::clone() const { return std::make_shared(*this); } void Node_get_trade_history_for::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_trade_history_for::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_trade_history_for::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_trade_history_for; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, bid); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, ask); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, since); _visitor.type_end(*_type_code); } void Node_get_trade_history_for::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_trade_history_for\""; _out << ", \"bid\": "; vnx::write(_out, bid); _out << ", \"ask\": "; vnx::write(_out, ask); _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"since\": "; vnx::write(_out, since); _out << "}"; } void Node_get_trade_history_for::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_trade_history_for::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_trade_history_for"; _object["bid"] = bid; _object["ask"] = ask; _object["limit"] = limit; _object["since"] = since; return _object; } void Node_get_trade_history_for::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "ask") { _entry.second.to(ask); } else if(_entry.first == "bid") { _entry.second.to(bid); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "since") { _entry.second.to(since); } } } vnx::Variant Node_get_trade_history_for::get_field(const std::string& _name) const { if(_name == "bid") { return vnx::Variant(bid); } if(_name == "ask") { return vnx::Variant(ask); } if(_name == "limit") { return vnx::Variant(limit); } if(_name == "since") { return vnx::Variant(since); } return vnx::Variant(); } void Node_get_trade_history_for::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "bid") { _value.to(bid); } else if(_name == "ask") { _value.to(ask); } else if(_name == "limit") { _value.to(limit); } else if(_name == "since") { _value.to(since); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_for& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_trade_history_for& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_trade_history_for::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_trade_history_for::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_trade_history_for"; type_code->type_hash = vnx::Hash64(0xd55cda633e3dd5b8ull); type_code->code_hash = vnx::Hash64(0x2acc677d65d4b58full); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_trade_history_for); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_trade_history_for_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "bid"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "ask"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "since"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.bid, type_code, _field->code.data()); break; case 1: vnx::read(in, value.ask, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_trade_history_for; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_trade_history_for>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.limit); vnx::write_value(_buf + 4, value.since); vnx::write(out, value.bid, type_code, type_code->fields[0].code.data()); vnx::write(out, value.ask, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_get_trade_history_for& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_for& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_trade_history_for_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_trade_history_for_return::VNX_TYPE_HASH(0xd61154789cdb246bull); const vnx::Hash64 Node_get_trade_history_for_return::VNX_CODE_HASH(0x9b5ee5e05738a9b7ull); vnx::Hash64 Node_get_trade_history_for_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_trade_history_for_return::get_type_name() const { return "mmx.Node.get_trade_history_for.return"; } const vnx::TypeCode* Node_get_trade_history_for_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_trade_history_for_return; } std::shared_ptr Node_get_trade_history_for_return::create() { return std::make_shared(); } std::shared_ptr Node_get_trade_history_for_return::clone() const { return std::make_shared(*this); } void Node_get_trade_history_for_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_trade_history_for_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_trade_history_for_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_trade_history_for_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_trade_history_for_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_trade_history_for.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_trade_history_for_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_trade_history_for_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_trade_history_for.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_trade_history_for_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_trade_history_for_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_trade_history_for_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_for_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_trade_history_for_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_trade_history_for_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_trade_history_for_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_trade_history_for.return"; type_code->type_hash = vnx::Hash64(0xd61154789cdb246bull); type_code->code_hash = vnx::Hash64(0x9b5ee5e05738a9b7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_trade_history_for_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::trade_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_for_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_trade_history_for_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_trade_history_for_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_trade_history_for_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_for_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_for_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_trade_history_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_trade_history_return::VNX_TYPE_HASH(0x4d3692b594dd7f9eull); const vnx::Hash64 Node_get_trade_history_return::VNX_CODE_HASH(0x14c2bb44baa9254cull); vnx::Hash64 Node_get_trade_history_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_trade_history_return::get_type_name() const { return "mmx.Node.get_trade_history.return"; } const vnx::TypeCode* Node_get_trade_history_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_trade_history_return; } std::shared_ptr Node_get_trade_history_return::create() { return std::make_shared(); } std::shared_ptr Node_get_trade_history_return::clone() const { return std::make_shared(*this); } void Node_get_trade_history_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_trade_history_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_trade_history_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_trade_history_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_trade_history_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_trade_history.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_trade_history_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_trade_history_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_trade_history.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_trade_history_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_trade_history_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_trade_history_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_trade_history_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_trade_history_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_trade_history_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_trade_history_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_trade_history.return"; type_code->type_hash = vnx::Hash64(0x4d3692b594dd7f9eull); type_code->code_hash = vnx::Hash64(0x14c2bb44baa9254cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_trade_history_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::trade_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_trade_history_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_trade_history_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_trade_history_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_trade_history_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_trade_history_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_trade_history_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_transaction.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_transaction::VNX_TYPE_HASH(0x9c76ca142292750full); const vnx::Hash64 Node_get_transaction::VNX_CODE_HASH(0xf4e68de74cf1ce0dull); vnx::Hash64 Node_get_transaction::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_transaction::get_type_name() const { return "mmx.Node.get_transaction"; } const vnx::TypeCode* Node_get_transaction::get_type_code() const { return mmx::vnx_native_type_code_Node_get_transaction; } std::shared_ptr Node_get_transaction::create() { return std::make_shared(); } std::shared_ptr Node_get_transaction::clone() const { return std::make_shared(*this); } void Node_get_transaction::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_transaction::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_transaction::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_transaction; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, pending); _visitor.type_end(*_type_code); } void Node_get_transaction::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_transaction\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"pending\": "; vnx::write(_out, pending); _out << "}"; } void Node_get_transaction::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_transaction::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_transaction"; _object["id"] = id; _object["pending"] = pending; return _object; } void Node_get_transaction::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "pending") { _entry.second.to(pending); } } } vnx::Variant Node_get_transaction::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "pending") { return vnx::Variant(pending); } return vnx::Variant(); } void Node_get_transaction::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "pending") { _value.to(pending); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_transaction& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_transaction& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_transaction::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_transaction::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_transaction"; type_code->type_hash = vnx::Hash64(0x9c76ca142292750full); type_code->code_hash = vnx::Hash64(0xf4e68de74cf1ce0dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_transaction); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_transaction_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "pending"; field.code = {31}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.pending, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_transaction& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_transaction; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_transaction>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.pending); vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_transaction& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_transaction& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_transaction& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_transaction_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_transaction_return::VNX_TYPE_HASH(0x3848f078ff4024dull); const vnx::Hash64 Node_get_transaction_return::VNX_CODE_HASH(0x778b0b9b87e7ec84ull); vnx::Hash64 Node_get_transaction_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_transaction_return::get_type_name() const { return "mmx.Node.get_transaction.return"; } const vnx::TypeCode* Node_get_transaction_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_transaction_return; } std::shared_ptr Node_get_transaction_return::create() { return std::make_shared(); } std::shared_ptr Node_get_transaction_return::clone() const { return std::make_shared(*this); } void Node_get_transaction_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_transaction_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_transaction_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_transaction_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_transaction_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_transaction.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_transaction_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_transaction_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_transaction.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_transaction_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_transaction_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_transaction_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_transaction_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_transaction_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_transaction_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_transaction_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_transaction.return"; type_code->type_hash = vnx::Hash64(0x3848f078ff4024dull); type_code->code_hash = vnx::Hash64(0x778b0b9b87e7ec84ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_transaction_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_transaction_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_transaction_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_transaction_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_transaction_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_transaction_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_transaction_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_transactions.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_transactions::VNX_TYPE_HASH(0x715a5bb668426203ull); const vnx::Hash64 Node_get_transactions::VNX_CODE_HASH(0x883c3632c9e10142ull); vnx::Hash64 Node_get_transactions::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_transactions::get_type_name() const { return "mmx.Node.get_transactions"; } const vnx::TypeCode* Node_get_transactions::get_type_code() const { return mmx::vnx_native_type_code_Node_get_transactions; } std::shared_ptr Node_get_transactions::create() { return std::make_shared(); } std::shared_ptr Node_get_transactions::clone() const { return std::make_shared(*this); } void Node_get_transactions::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_transactions::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_transactions::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_transactions; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, ids); _visitor.type_end(*_type_code); } void Node_get_transactions::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_transactions\""; _out << ", \"ids\": "; vnx::write(_out, ids); _out << "}"; } void Node_get_transactions::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_transactions::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_transactions"; _object["ids"] = ids; return _object; } void Node_get_transactions::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "ids") { _entry.second.to(ids); } } } vnx::Variant Node_get_transactions::get_field(const std::string& _name) const { if(_name == "ids") { return vnx::Variant(ids); } return vnx::Variant(); } void Node_get_transactions::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "ids") { _value.to(ids); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_transactions& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_transactions& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_transactions::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_transactions::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_transactions"; type_code->type_hash = vnx::Hash64(0x715a5bb668426203ull); type_code->code_hash = vnx::Hash64(0x883c3632c9e10142ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_transactions); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_transactions_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "ids"; field.code = {12, 11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.ids, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_transactions& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_transactions; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_transactions>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.ids, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_transactions& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_transactions& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_transactions& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_transactions_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_transactions_return::VNX_TYPE_HASH(0xd11c40a507abaaaull); const vnx::Hash64 Node_get_transactions_return::VNX_CODE_HASH(0xb20a87fe9f5dd82full); vnx::Hash64 Node_get_transactions_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_transactions_return::get_type_name() const { return "mmx.Node.get_transactions.return"; } const vnx::TypeCode* Node_get_transactions_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_transactions_return; } std::shared_ptr Node_get_transactions_return::create() { return std::make_shared(); } std::shared_ptr Node_get_transactions_return::clone() const { return std::make_shared(*this); } void Node_get_transactions_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_transactions_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_transactions_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_transactions_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_transactions_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_transactions.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_transactions_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_transactions_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_transactions.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_transactions_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_transactions_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_transactions_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_transactions_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_transactions_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_transactions_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_transactions_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_transactions.return"; type_code->type_hash = vnx::Hash64(0xd11c40a507abaaaull); type_code->code_hash = vnx::Hash64(0xb20a87fe9f5dd82full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_transactions_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_transactions_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_transactions_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_transactions_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_transactions_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_transactions_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_transactions_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_height.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_height::VNX_TYPE_HASH(0xf6f917fad9361e3aull); const vnx::Hash64 Node_get_tx_height::VNX_CODE_HASH(0xd5a4a7ab514e26f4ull); vnx::Hash64 Node_get_tx_height::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_height::get_type_name() const { return "mmx.Node.get_tx_height"; } const vnx::TypeCode* Node_get_tx_height::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_height; } std::shared_ptr Node_get_tx_height::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_height::clone() const { return std::make_shared(*this); } void Node_get_tx_height::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_height::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_height::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_height; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_end(*_type_code); } void Node_get_tx_height::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_height\""; _out << ", \"id\": "; vnx::write(_out, id); _out << "}"; } void Node_get_tx_height::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_height::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_height"; _object["id"] = id; return _object; } void Node_get_tx_height::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } } } vnx::Variant Node_get_tx_height::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } return vnx::Variant(); } void Node_get_tx_height::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_height& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_height& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_height::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_height::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_height"; type_code->type_hash = vnx::Hash64(0xf6f917fad9361e3aull); type_code->code_hash = vnx::Hash64(0xd5a4a7ab514e26f4ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_height); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_height_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_height& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_height; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_height>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_height& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_height& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_height& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_height_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_height_return::VNX_TYPE_HASH(0xda69a0d06f4b5c3eull); const vnx::Hash64 Node_get_tx_height_return::VNX_CODE_HASH(0x611605734f60f271ull); vnx::Hash64 Node_get_tx_height_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_height_return::get_type_name() const { return "mmx.Node.get_tx_height.return"; } const vnx::TypeCode* Node_get_tx_height_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_height_return; } std::shared_ptr Node_get_tx_height_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_height_return::clone() const { return std::make_shared(*this); } void Node_get_tx_height_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_height_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_height_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_height_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_height_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_height.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_height_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_height_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_height.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_height_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_height_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_height_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_height_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_height_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_height_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_height_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_height.return"; type_code->type_hash = vnx::Hash64(0xda69a0d06f4b5c3eull); type_code->code_hash = vnx::Hash64(0x611605734f60f271ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_height_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_height_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_height_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_height_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_height_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_height_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_height_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids::VNX_TYPE_HASH(0xe268e5bf2a7f22d6ull); const vnx::Hash64 Node_get_tx_ids::VNX_CODE_HASH(0x52587393ccc5b088ull); vnx::Hash64 Node_get_tx_ids::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids::get_type_name() const { return "mmx.Node.get_tx_ids"; } const vnx::TypeCode* Node_get_tx_ids::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids; } std::shared_ptr Node_get_tx_ids::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids::clone() const { return std::make_shared(*this); } void Node_get_tx_ids::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Node_get_tx_ids::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids\""; _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Node_get_tx_ids::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids"; _object["limit"] = limit; return _object; } void Node_get_tx_ids::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "limit") { _entry.second.to(limit); } } } vnx::Variant Node_get_tx_ids::get_field(const std::string& _name) const { if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Node_get_tx_ids::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids"; type_code->type_hash = vnx::Hash64(0xe268e5bf2a7f22d6ull); type_code->code_hash = vnx::Hash64(0x52587393ccc5b088ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_ids_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "limit"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.limit); } void read(std::istream& in, ::mmx::Node_get_tx_ids& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids_at.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids_at::VNX_TYPE_HASH(0x904c686b59c101c3ull); const vnx::Hash64 Node_get_tx_ids_at::VNX_CODE_HASH(0xb30fab713035031cull); vnx::Hash64 Node_get_tx_ids_at::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids_at::get_type_name() const { return "mmx.Node.get_tx_ids_at"; } const vnx::TypeCode* Node_get_tx_ids_at::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids_at; } std::shared_ptr Node_get_tx_ids_at::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids_at::clone() const { return std::make_shared(*this); } void Node_get_tx_ids_at::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids_at::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids_at::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids_at; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_tx_ids_at::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids_at\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_tx_ids_at::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids_at::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids_at"; _object["height"] = height; return _object; } void Node_get_tx_ids_at::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_tx_ids_at::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_tx_ids_at::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_at& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids_at& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids_at::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids_at::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids_at"; type_code->type_hash = vnx::Hash64(0x904c686b59c101c3ull); type_code->code_hash = vnx::Hash64(0xb30fab713035031cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids_at); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_ids_at_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids_at; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids_at>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_tx_ids_at& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids_at_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids_at_return::VNX_TYPE_HASH(0x945565d9cbfadc31ull); const vnx::Hash64 Node_get_tx_ids_at_return::VNX_CODE_HASH(0x83f0f1b8eaec29f6ull); vnx::Hash64 Node_get_tx_ids_at_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids_at_return::get_type_name() const { return "mmx.Node.get_tx_ids_at.return"; } const vnx::TypeCode* Node_get_tx_ids_at_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids_at_return; } std::shared_ptr Node_get_tx_ids_at_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids_at_return::clone() const { return std::make_shared(*this); } void Node_get_tx_ids_at_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids_at_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids_at_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids_at_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_ids_at_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids_at.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_ids_at_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids_at_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids_at.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_ids_at_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_ids_at_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_ids_at_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_at_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids_at_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids_at_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids_at_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids_at.return"; type_code->type_hash = vnx::Hash64(0x945565d9cbfadc31ull); type_code->code_hash = vnx::Hash64(0x83f0f1b8eaec29f6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids_at_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_at_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids_at_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids_at_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_ids_at_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_at_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_at_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids_return::VNX_TYPE_HASH(0xba3ffcf776e64920ull); const vnx::Hash64 Node_get_tx_ids_return::VNX_CODE_HASH(0x7fb080108cc316f0ull); vnx::Hash64 Node_get_tx_ids_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids_return::get_type_name() const { return "mmx.Node.get_tx_ids.return"; } const vnx::TypeCode* Node_get_tx_ids_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids_return; } std::shared_ptr Node_get_tx_ids_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids_return::clone() const { return std::make_shared(*this); } void Node_get_tx_ids_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_ids_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_ids_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_ids_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_ids_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_ids_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids.return"; type_code->type_hash = vnx::Hash64(0xba3ffcf776e64920ull); type_code->code_hash = vnx::Hash64(0x7fb080108cc316f0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_ids_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids_since.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids_since::VNX_TYPE_HASH(0x640af36b555e1606ull); const vnx::Hash64 Node_get_tx_ids_since::VNX_CODE_HASH(0xe15b1c0e819add94ull); vnx::Hash64 Node_get_tx_ids_since::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids_since::get_type_name() const { return "mmx.Node.get_tx_ids_since"; } const vnx::TypeCode* Node_get_tx_ids_since::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids_since; } std::shared_ptr Node_get_tx_ids_since::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids_since::clone() const { return std::make_shared(*this); } void Node_get_tx_ids_since::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids_since::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids_since::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids_since; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_get_tx_ids_since::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids_since\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_get_tx_ids_since::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids_since::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids_since"; _object["height"] = height; return _object; } void Node_get_tx_ids_since::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_get_tx_ids_since::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_get_tx_ids_since::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_since& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids_since& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids_since::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids_since::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids_since"; type_code->type_hash = vnx::Hash64(0x640af36b555e1606ull); type_code->code_hash = vnx::Hash64(0xe15b1c0e819add94ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids_since); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_ids_since_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids_since; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids_since>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_get_tx_ids_since& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_ids_since_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_ids_since_return::VNX_TYPE_HASH(0xe5c1511a48d2d288ull); const vnx::Hash64 Node_get_tx_ids_since_return::VNX_CODE_HASH(0x58d83a738b72f1bull); vnx::Hash64 Node_get_tx_ids_since_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_ids_since_return::get_type_name() const { return "mmx.Node.get_tx_ids_since.return"; } const vnx::TypeCode* Node_get_tx_ids_since_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_ids_since_return; } std::shared_ptr Node_get_tx_ids_since_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_ids_since_return::clone() const { return std::make_shared(*this); } void Node_get_tx_ids_since_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_ids_since_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_ids_since_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_ids_since_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_ids_since_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_ids_since.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_ids_since_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_ids_since_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_ids_since.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_ids_since_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_ids_since_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_ids_since_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_ids_since_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_ids_since_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_ids_since_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_ids_since_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_ids_since.return"; type_code->type_hash = vnx::Hash64(0xe5c1511a48d2d288ull); type_code->code_hash = vnx::Hash64(0x58d83a738b72f1bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_ids_since_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_ids_since_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_ids_since_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_ids_since_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_ids_since_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_ids_since_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_ids_since_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_info::VNX_TYPE_HASH(0xb5409a3aaa19d1d2ull); const vnx::Hash64 Node_get_tx_info::VNX_CODE_HASH(0x6c7239b4a1b9afe6ull); vnx::Hash64 Node_get_tx_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_info::get_type_name() const { return "mmx.Node.get_tx_info"; } const vnx::TypeCode* Node_get_tx_info::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_info; } std::shared_ptr Node_get_tx_info::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_info::clone() const { return std::make_shared(*this); } void Node_get_tx_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_info; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_end(*_type_code); } void Node_get_tx_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_info\""; _out << ", \"id\": "; vnx::write(_out, id); _out << "}"; } void Node_get_tx_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_info"; _object["id"] = id; return _object; } void Node_get_tx_info::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } } } vnx::Variant Node_get_tx_info::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } return vnx::Variant(); } void Node_get_tx_info::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_info"; type_code->type_hash = vnx::Hash64(0xb5409a3aaa19d1d2ull); type_code->code_hash = vnx::Hash64(0x6c7239b4a1b9afe6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_info_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_info_for.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_info_for::VNX_TYPE_HASH(0xba1c6e6eccfe9369ull); const vnx::Hash64 Node_get_tx_info_for::VNX_CODE_HASH(0x9d742398e0eb6c68ull); vnx::Hash64 Node_get_tx_info_for::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_info_for::get_type_name() const { return "mmx.Node.get_tx_info_for"; } const vnx::TypeCode* Node_get_tx_info_for::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_info_for; } std::shared_ptr Node_get_tx_info_for::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_info_for::clone() const { return std::make_shared(*this); } void Node_get_tx_info_for::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_info_for::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_info_for::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_info_for; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, tx); _visitor.type_end(*_type_code); } void Node_get_tx_info_for::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_info_for\""; _out << ", \"tx\": "; vnx::write(_out, tx); _out << "}"; } void Node_get_tx_info_for::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_info_for::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_info_for"; _object["tx"] = tx; return _object; } void Node_get_tx_info_for::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Node_get_tx_info_for::get_field(const std::string& _name) const { if(_name == "tx") { return vnx::Variant(tx); } return vnx::Variant(); } void Node_get_tx_info_for::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "tx") { _value.to(tx); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_for& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_info_for& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_info_for::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_info_for::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_info_for"; type_code->type_hash = vnx::Hash64(0xba1c6e6eccfe9369ull); type_code->code_hash = vnx::Hash64(0x9d742398e0eb6c68ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_tx_info_for); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_tx_info_for_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "tx"; field.code = {16}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.tx, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_info_for; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_info_for>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.tx, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_info_for& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_for& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_info_for_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_info_for_return::VNX_TYPE_HASH(0xfd527dc84681a04ull); const vnx::Hash64 Node_get_tx_info_for_return::VNX_CODE_HASH(0x56e8525c5a462bd7ull); vnx::Hash64 Node_get_tx_info_for_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_info_for_return::get_type_name() const { return "mmx.Node.get_tx_info_for.return"; } const vnx::TypeCode* Node_get_tx_info_for_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_info_for_return; } std::shared_ptr Node_get_tx_info_for_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_info_for_return::clone() const { return std::make_shared(*this); } void Node_get_tx_info_for_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_info_for_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_info_for_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_info_for_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_info_for_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_info_for.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_info_for_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_info_for_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_info_for.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_info_for_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_info_for_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_info_for_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_for_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_info_for_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_info_for_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_info_for_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_info_for.return"; type_code->type_hash = vnx::Hash64(0xfd527dc84681a04ull); type_code->code_hash = vnx::Hash64(0x56e8525c5a462bd7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_info_for_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_for_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_info_for_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_info_for_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_info_for_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_for_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_for_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_tx_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_tx_info_return::VNX_TYPE_HASH(0x3668f41cc643227full); const vnx::Hash64 Node_get_tx_info_return::VNX_CODE_HASH(0x4b9ac7b37b187db2ull); vnx::Hash64 Node_get_tx_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_tx_info_return::get_type_name() const { return "mmx.Node.get_tx_info.return"; } const vnx::TypeCode* Node_get_tx_info_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_tx_info_return; } std::shared_ptr Node_get_tx_info_return::create() { return std::make_shared(); } std::shared_ptr Node_get_tx_info_return::clone() const { return std::make_shared(*this); } void Node_get_tx_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_tx_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_tx_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_tx_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_tx_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_tx_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_tx_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_tx_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_tx_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_tx_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_tx_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_tx_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_tx_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_tx_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_tx_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_tx_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_tx_info.return"; type_code->type_hash = vnx::Hash64(0x3668f41cc643227full); type_code->code_hash = vnx::Hash64(0x4b9ac7b37b187db2ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_tx_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {33, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_tx_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_tx_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_tx_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_tx_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_tx_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_tx_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_vdf_height.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_vdf_height::VNX_TYPE_HASH(0x33db3aa655c4e5feull); const vnx::Hash64 Node_get_vdf_height::VNX_CODE_HASH(0xd3eb3b4364498fb3ull); vnx::Hash64 Node_get_vdf_height::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_vdf_height::get_type_name() const { return "mmx.Node.get_vdf_height"; } const vnx::TypeCode* Node_get_vdf_height::get_type_code() const { return mmx::vnx_native_type_code_Node_get_vdf_height; } std::shared_ptr Node_get_vdf_height::create() { return std::make_shared(); } std::shared_ptr Node_get_vdf_height::clone() const { return std::make_shared(*this); } void Node_get_vdf_height::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_vdf_height::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_vdf_height::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_vdf_height; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_vdf_height::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_vdf_height\""; _out << "}"; } void Node_get_vdf_height::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_vdf_height::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_vdf_height"; return _object; } void Node_get_vdf_height::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_vdf_height::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_vdf_height::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_height& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_vdf_height& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_vdf_height::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_vdf_height::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_vdf_height"; type_code->type_hash = vnx::Hash64(0x33db3aa655c4e5feull); type_code->code_hash = vnx::Hash64(0xd3eb3b4364498fb3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_vdf_height); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_vdf_height_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_vdf_height& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_vdf_height; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_vdf_height>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_vdf_height& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_vdf_height& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_vdf_height_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_vdf_height_return::VNX_TYPE_HASH(0x5f83cae2903e53bfull); const vnx::Hash64 Node_get_vdf_height_return::VNX_CODE_HASH(0x2fd2eaec1d1f6b7ull); vnx::Hash64 Node_get_vdf_height_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_vdf_height_return::get_type_name() const { return "mmx.Node.get_vdf_height.return"; } const vnx::TypeCode* Node_get_vdf_height_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_vdf_height_return; } std::shared_ptr Node_get_vdf_height_return::create() { return std::make_shared(); } std::shared_ptr Node_get_vdf_height_return::clone() const { return std::make_shared(*this); } void Node_get_vdf_height_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_vdf_height_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_vdf_height_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_vdf_height_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_vdf_height_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_vdf_height.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_vdf_height_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_vdf_height_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_vdf_height.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_vdf_height_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_vdf_height_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_vdf_height_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_height_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_vdf_height_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_vdf_height_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_vdf_height_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_vdf_height.return"; type_code->type_hash = vnx::Hash64(0x5f83cae2903e53bfull); type_code->code_hash = vnx::Hash64(0x2fd2eaec1d1f6b7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_vdf_height_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "_ret_0"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_vdf_height_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_vdf_height_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_vdf_height_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Node_get_vdf_height_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_vdf_height_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_height_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_vdf_peak.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_vdf_peak::VNX_TYPE_HASH(0xf3449b43830283ddull); const vnx::Hash64 Node_get_vdf_peak::VNX_CODE_HASH(0x145dbb4bcecc205cull); vnx::Hash64 Node_get_vdf_peak::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_vdf_peak::get_type_name() const { return "mmx.Node.get_vdf_peak"; } const vnx::TypeCode* Node_get_vdf_peak::get_type_code() const { return mmx::vnx_native_type_code_Node_get_vdf_peak; } std::shared_ptr Node_get_vdf_peak::create() { return std::make_shared(); } std::shared_ptr Node_get_vdf_peak::clone() const { return std::make_shared(*this); } void Node_get_vdf_peak::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_vdf_peak::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_vdf_peak::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_vdf_peak; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_get_vdf_peak::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_vdf_peak\""; _out << "}"; } void Node_get_vdf_peak::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_vdf_peak::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_vdf_peak"; return _object; } void Node_get_vdf_peak::from_object(const vnx::Object& _object) { } vnx::Variant Node_get_vdf_peak::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_get_vdf_peak::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_peak& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_vdf_peak& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_vdf_peak::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_vdf_peak::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_vdf_peak"; type_code->type_hash = vnx::Hash64(0xf3449b43830283ddull); type_code->code_hash = vnx::Hash64(0x145dbb4bcecc205cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_get_vdf_peak); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_get_vdf_peak_return::static_get_type_code(); type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_vdf_peak; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_vdf_peak>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_get_vdf_peak& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_vdf_peak& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_get_vdf_peak_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_get_vdf_peak_return::VNX_TYPE_HASH(0x837f2b6433a274a1ull); const vnx::Hash64 Node_get_vdf_peak_return::VNX_CODE_HASH(0x9c5893f748786b13ull); vnx::Hash64 Node_get_vdf_peak_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_get_vdf_peak_return::get_type_name() const { return "mmx.Node.get_vdf_peak.return"; } const vnx::TypeCode* Node_get_vdf_peak_return::get_type_code() const { return mmx::vnx_native_type_code_Node_get_vdf_peak_return; } std::shared_ptr Node_get_vdf_peak_return::create() { return std::make_shared(); } std::shared_ptr Node_get_vdf_peak_return::clone() const { return std::make_shared(*this); } void Node_get_vdf_peak_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_get_vdf_peak_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_get_vdf_peak_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_get_vdf_peak_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_get_vdf_peak_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.get_vdf_peak.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_get_vdf_peak_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_get_vdf_peak_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.get_vdf_peak.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_get_vdf_peak_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_get_vdf_peak_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_get_vdf_peak_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_get_vdf_peak_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_get_vdf_peak_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_get_vdf_peak_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_get_vdf_peak_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.get_vdf_peak.return"; type_code->type_hash = vnx::Hash64(0x837f2b6433a274a1ull); type_code->code_hash = vnx::Hash64(0x9c5893f748786b13ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_get_vdf_peak_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_get_vdf_peak_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_get_vdf_peak_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_get_vdf_peak_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_get_vdf_peak_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_get_vdf_peak_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_get_vdf_peak_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage::VNX_TYPE_HASH(0xd74cd2b291cb9cd6ull); const vnx::Hash64 Node_read_storage::VNX_CODE_HASH(0xee7bddca64e3d007ull); vnx::Hash64 Node_read_storage::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage::get_type_name() const { return "mmx.Node.read_storage"; } const vnx::TypeCode* Node_read_storage::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage; } std::shared_ptr Node_read_storage::create() { return std::make_shared(); } std::shared_ptr Node_read_storage::clone() const { return std::make_shared(*this); } void Node_read_storage::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage"; _object["contract"] = contract; _object["height"] = height; return _object; } void Node_read_storage::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_read_storage::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage"; type_code->type_hash = vnx::Hash64(0xd74cd2b291cb9cd6ull); type_code->code_hash = vnx::Hash64(0xee7bddca64e3d007ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_array.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_array::VNX_TYPE_HASH(0xe5826950ca0a442bull); const vnx::Hash64 Node_read_storage_array::VNX_CODE_HASH(0xc625d1719b9ec16cull); vnx::Hash64 Node_read_storage_array::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_array::get_type_name() const { return "mmx.Node.read_storage_array"; } const vnx::TypeCode* Node_read_storage_array::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_array; } std::shared_ptr Node_read_storage_array::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_array::clone() const { return std::make_shared(*this); } void Node_read_storage_array::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_array::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_array::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_array; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_array::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_array\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_array::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_array::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_array"; _object["contract"] = contract; _object["address"] = address; _object["height"] = height; return _object; } void Node_read_storage_array::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_read_storage_array::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "address") { return vnx::Variant(address); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_array::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "address") { _value.to(address); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_array& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_array& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_array::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_array::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_array"; type_code->type_hash = vnx::Hash64(0xe5826950ca0a442bull); type_code->code_hash = vnx::Hash64(0xc625d1719b9ec16cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_array); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_array_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "address"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_array& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_array; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_array>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.address); vnx::write_value(_buf + 8, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_array& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_array& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_array& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_array_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_array_return::VNX_TYPE_HASH(0xba7fed069216454dull); const vnx::Hash64 Node_read_storage_array_return::VNX_CODE_HASH(0x7f7a40a888346341ull); vnx::Hash64 Node_read_storage_array_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_array_return::get_type_name() const { return "mmx.Node.read_storage_array.return"; } const vnx::TypeCode* Node_read_storage_array_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_array_return; } std::shared_ptr Node_read_storage_array_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_array_return::clone() const { return std::make_shared(*this); } void Node_read_storage_array_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_array_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_array_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_array_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_array_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_array.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_array_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_array_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_array.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_array_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_array_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_array_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_array_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_array_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_array_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_array_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_array.return"; type_code->type_hash = vnx::Hash64(0xba7fed069216454dull); type_code->code_hash = vnx::Hash64(0x7f7a40a888346341ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_array_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_array_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_array_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_array_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_array_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_array_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_array_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_addr.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_addr::VNX_TYPE_HASH(0xffbf8c4478bb5ab5ull); const vnx::Hash64 Node_read_storage_entry_addr::VNX_CODE_HASH(0x3d1c0b58a99f9dd6ull); vnx::Hash64 Node_read_storage_entry_addr::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_addr::get_type_name() const { return "mmx.Node.read_storage_entry_addr"; } const vnx::TypeCode* Node_read_storage_entry_addr::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_addr; } std::shared_ptr Node_read_storage_entry_addr::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_addr::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_addr::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_addr::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_addr::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_addr; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, key); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_entry_addr::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_addr\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"key\": "; vnx::write(_out, key); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_entry_addr::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_addr::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_addr"; _object["contract"] = contract; _object["name"] = name; _object["key"] = key; _object["height"] = height; return _object; } void Node_read_storage_entry_addr::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "key") { _entry.second.to(key); } else if(_entry.first == "name") { _entry.second.to(name); } } } vnx::Variant Node_read_storage_entry_addr::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "name") { return vnx::Variant(name); } if(_name == "key") { return vnx::Variant(key); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_entry_addr::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "name") { _value.to(name); } else if(_name == "key") { _value.to(key); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_addr& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_addr& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_addr::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_addr::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_addr"; type_code->type_hash = vnx::Hash64(0xffbf8c4478bb5ab5ull); type_code->code_hash = vnx::Hash64(0x3d1c0b58a99f9dd6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_addr); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_entry_addr_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "key"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.key, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_addr; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_addr>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.key, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_addr& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_addr_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_addr_return::VNX_TYPE_HASH(0xacd2f58f1ca8df54ull); const vnx::Hash64 Node_read_storage_entry_addr_return::VNX_CODE_HASH(0xa5dce7e1b437462aull); vnx::Hash64 Node_read_storage_entry_addr_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_addr_return::get_type_name() const { return "mmx.Node.read_storage_entry_addr.return"; } const vnx::TypeCode* Node_read_storage_entry_addr_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_addr_return; } std::shared_ptr Node_read_storage_entry_addr_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_addr_return::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_addr_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_addr_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_addr_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_addr_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_entry_addr_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_addr.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_entry_addr_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_addr_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_addr.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_entry_addr_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_entry_addr_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_entry_addr_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_addr_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_addr_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_addr_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_addr_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_addr.return"; type_code->type_hash = vnx::Hash64(0xacd2f58f1ca8df54ull); type_code->code_hash = vnx::Hash64(0xa5dce7e1b437462aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_addr_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 3, 5, 7, 8, 12, 1, 4, 4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_addr_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_addr_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_addr_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_addr_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_addr_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_addr_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_string.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_string::VNX_TYPE_HASH(0xe5b52723a3714e9full); const vnx::Hash64 Node_read_storage_entry_string::VNX_CODE_HASH(0xd8b7928d16ca7083ull); vnx::Hash64 Node_read_storage_entry_string::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_string::get_type_name() const { return "mmx.Node.read_storage_entry_string"; } const vnx::TypeCode* Node_read_storage_entry_string::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_string; } std::shared_ptr Node_read_storage_entry_string::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_string::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_string::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_string::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_string::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_string; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, key); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_entry_string::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_string\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"key\": "; vnx::write(_out, key); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_entry_string::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_string::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_string"; _object["contract"] = contract; _object["name"] = name; _object["key"] = key; _object["height"] = height; return _object; } void Node_read_storage_entry_string::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "key") { _entry.second.to(key); } else if(_entry.first == "name") { _entry.second.to(name); } } } vnx::Variant Node_read_storage_entry_string::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "name") { return vnx::Variant(name); } if(_name == "key") { return vnx::Variant(key); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_entry_string::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "name") { _value.to(name); } else if(_name == "key") { _value.to(key); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_string& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_string& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_string::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_string::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_string"; type_code->type_hash = vnx::Hash64(0xe5b52723a3714e9full); type_code->code_hash = vnx::Hash64(0xd8b7928d16ca7083ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_string); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_entry_string_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "key"; field.code = {32}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.key, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_string; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_string>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.key, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_string& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_string_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_string_return::VNX_TYPE_HASH(0x56c6103ea03d7ceaull); const vnx::Hash64 Node_read_storage_entry_string_return::VNX_CODE_HASH(0xee66e73f9ce588b5ull); vnx::Hash64 Node_read_storage_entry_string_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_string_return::get_type_name() const { return "mmx.Node.read_storage_entry_string.return"; } const vnx::TypeCode* Node_read_storage_entry_string_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_string_return; } std::shared_ptr Node_read_storage_entry_string_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_string_return::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_string_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_string_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_string_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_string_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_entry_string_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_string.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_entry_string_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_string_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_string.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_entry_string_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_entry_string_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_entry_string_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_string_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_string_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_string_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_string_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_string.return"; type_code->type_hash = vnx::Hash64(0x56c6103ea03d7ceaull); type_code->code_hash = vnx::Hash64(0xee66e73f9ce588b5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_string_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 3, 5, 7, 8, 12, 1, 4, 4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_string_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_string_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_string_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_string_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_string_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_string_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_var.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_var::VNX_TYPE_HASH(0xb0ebcc688396e6dbull); const vnx::Hash64 Node_read_storage_entry_var::VNX_CODE_HASH(0xff0492dfcc10bf8bull); vnx::Hash64 Node_read_storage_entry_var::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_var::get_type_name() const { return "mmx.Node.read_storage_entry_var"; } const vnx::TypeCode* Node_read_storage_entry_var::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_var; } std::shared_ptr Node_read_storage_entry_var::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_var::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_var::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_var::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_var::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_var; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, key); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_entry_var::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_var\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"key\": "; vnx::write(_out, key); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_entry_var::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_var::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_var"; _object["contract"] = contract; _object["address"] = address; _object["key"] = key; _object["height"] = height; return _object; } void Node_read_storage_entry_var::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "key") { _entry.second.to(key); } } } vnx::Variant Node_read_storage_entry_var::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "address") { return vnx::Variant(address); } if(_name == "key") { return vnx::Variant(key); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_entry_var::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "address") { _value.to(address); } else if(_name == "key") { _value.to(key); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_var& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_var& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_var::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_var::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_var"; type_code->type_hash = vnx::Hash64(0xb0ebcc688396e6dbull); type_code->code_hash = vnx::Hash64(0xff0492dfcc10bf8bull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_var); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_entry_var_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "address"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "key"; field.code = {4}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.key, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_var; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_var>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(20); vnx::write_value(_buf + 0, value.address); vnx::write_value(_buf + 8, value.key); vnx::write_value(_buf + 16, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_var& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_entry_var_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_entry_var_return::VNX_TYPE_HASH(0x773a90b50f714a11ull); const vnx::Hash64 Node_read_storage_entry_var_return::VNX_CODE_HASH(0xdaf6db48074b7f8eull); vnx::Hash64 Node_read_storage_entry_var_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_entry_var_return::get_type_name() const { return "mmx.Node.read_storage_entry_var.return"; } const vnx::TypeCode* Node_read_storage_entry_var_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_entry_var_return; } std::shared_ptr Node_read_storage_entry_var_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_entry_var_return::clone() const { return std::make_shared(*this); } void Node_read_storage_entry_var_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_entry_var_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_entry_var_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_entry_var_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_entry_var_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_entry_var.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_entry_var_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_entry_var_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_entry_var.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_entry_var_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_entry_var_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_entry_var_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_entry_var_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_entry_var_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_entry_var_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_entry_var_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_entry_var.return"; type_code->type_hash = vnx::Hash64(0x773a90b50f714a11ull); type_code->code_hash = vnx::Hash64(0xdaf6db48074b7f8eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_entry_var_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_entry_var_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_entry_var_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_entry_var_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_entry_var_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_entry_var_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_entry_var_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_field.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_field::VNX_TYPE_HASH(0xc9a10c9f7f2cef16ull); const vnx::Hash64 Node_read_storage_field::VNX_CODE_HASH(0x12be0da5568852a7ull); vnx::Hash64 Node_read_storage_field::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_field::get_type_name() const { return "mmx.Node.read_storage_field"; } const vnx::TypeCode* Node_read_storage_field::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_field; } std::shared_ptr Node_read_storage_field::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_field::clone() const { return std::make_shared(*this); } void Node_read_storage_field::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_field::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_field::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_field; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_field::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_field\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_field::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_field::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_field"; _object["contract"] = contract; _object["name"] = name; _object["height"] = height; return _object; } void Node_read_storage_field::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "name") { _entry.second.to(name); } } } vnx::Variant Node_read_storage_field::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "name") { return vnx::Variant(name); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_field::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "name") { _value.to(name); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_field& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_field& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_field::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_field::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_field"; type_code->type_hash = vnx::Hash64(0xc9a10c9f7f2cef16ull); type_code->code_hash = vnx::Hash64(0x12be0da5568852a7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_field); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_field_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_field& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_field; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_field>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_field& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_field& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_field& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_field_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_field_return::VNX_TYPE_HASH(0xf817bcace12b9ef3ull); const vnx::Hash64 Node_read_storage_field_return::VNX_CODE_HASH(0xa2b5f90f585accefull); vnx::Hash64 Node_read_storage_field_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_field_return::get_type_name() const { return "mmx.Node.read_storage_field.return"; } const vnx::TypeCode* Node_read_storage_field_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_field_return; } std::shared_ptr Node_read_storage_field_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_field_return::clone() const { return std::make_shared(*this); } void Node_read_storage_field_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_field_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_field_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_field_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_field_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_field.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_field_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_field_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_field.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_field_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_field_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_field_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_field_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_field_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_field_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_field_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_field.return"; type_code->type_hash = vnx::Hash64(0xf817bcace12b9ef3ull); type_code->code_hash = vnx::Hash64(0xa2b5f90f585accefull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_field_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 2, 4, 6, 12, 1, 4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_field_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_field_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_field_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_field_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_field_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_field_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_map.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_map::VNX_TYPE_HASH(0x1cc0cc12bc2c1b4eull); const vnx::Hash64 Node_read_storage_map::VNX_CODE_HASH(0xbca4481ae8eb52d7ull); vnx::Hash64 Node_read_storage_map::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_map::get_type_name() const { return "mmx.Node.read_storage_map"; } const vnx::TypeCode* Node_read_storage_map::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_map; } std::shared_ptr Node_read_storage_map::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_map::clone() const { return std::make_shared(*this); } void Node_read_storage_map::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_map::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_map::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_map; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_map::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_map\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_map::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_map::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_map"; _object["contract"] = contract; _object["address"] = address; _object["height"] = height; return _object; } void Node_read_storage_map::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_read_storage_map::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "address") { return vnx::Variant(address); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_map::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "address") { _value.to(address); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_map& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_map& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_map::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_map::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_map"; type_code->type_hash = vnx::Hash64(0x1cc0cc12bc2c1b4eull); type_code->code_hash = vnx::Hash64(0xbca4481ae8eb52d7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_map); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_map_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "address"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_map& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_map; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_map>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.address); vnx::write_value(_buf + 8, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_map& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_map& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_map& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_map_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_map_return::VNX_TYPE_HASH(0x1d56300164b3e79ull); const vnx::Hash64 Node_read_storage_map_return::VNX_CODE_HASH(0x29897104566e1692ull); vnx::Hash64 Node_read_storage_map_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_map_return::get_type_name() const { return "mmx.Node.read_storage_map.return"; } const vnx::TypeCode* Node_read_storage_map_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_map_return; } std::shared_ptr Node_read_storage_map_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_map_return::clone() const { return std::make_shared(*this); } void Node_read_storage_map_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_map_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_map_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_map_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_map_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_map.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_map_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_map_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_map.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_map_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_map_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_map_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_map_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_map_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_map_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_map_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_map.return"; type_code->type_hash = vnx::Hash64(0x1d56300164b3e79ull); type_code->code_hash = vnx::Hash64(0x29897104566e1692ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_map_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 4, 12, 1, 12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_map_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_map_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_map_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_map_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_map_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_map_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_object.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_object::VNX_TYPE_HASH(0x5930cf36eeb662fbull); const vnx::Hash64 Node_read_storage_object::VNX_CODE_HASH(0x5ef65e944c0346c4ull); vnx::Hash64 Node_read_storage_object::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_object::get_type_name() const { return "mmx.Node.read_storage_object"; } const vnx::TypeCode* Node_read_storage_object::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_object; } std::shared_ptr Node_read_storage_object::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_object::clone() const { return std::make_shared(*this); } void Node_read_storage_object::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_object::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_object::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_object; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_object::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_object\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_object::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_object::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_object"; _object["contract"] = contract; _object["address"] = address; _object["height"] = height; return _object; } void Node_read_storage_object::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_read_storage_object::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "address") { return vnx::Variant(address); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_object::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "address") { _value.to(address); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_object& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_object& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_object::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_object::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_object"; type_code->type_hash = vnx::Hash64(0x5930cf36eeb662fbull); type_code->code_hash = vnx::Hash64(0x5ef65e944c0346c4ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_object); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_object_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "address"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_object& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_object; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_object>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.address); vnx::write_value(_buf + 8, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_object& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_object& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_object& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_object_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_object_return::VNX_TYPE_HASH(0x48c9a69123ef41afull); const vnx::Hash64 Node_read_storage_object_return::VNX_CODE_HASH(0xfd09fed56174472bull); vnx::Hash64 Node_read_storage_object_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_object_return::get_type_name() const { return "mmx.Node.read_storage_object.return"; } const vnx::TypeCode* Node_read_storage_object_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_object_return; } std::shared_ptr Node_read_storage_object_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_object_return::clone() const { return std::make_shared(*this); } void Node_read_storage_object_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_object_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_object_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_object_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_object_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_object.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_object_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_object_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_object.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_object_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_object_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_object_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_object_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_object_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_object_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_object_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_object.return"; type_code->type_hash = vnx::Hash64(0x48c9a69123ef41afull); type_code->code_hash = vnx::Hash64(0xfd09fed56174472bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_object_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 3, 32, 12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_object_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_object_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_object_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_object_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_object_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_object_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_return::VNX_TYPE_HASH(0xab73866ba23ed19aull); const vnx::Hash64 Node_read_storage_return::VNX_CODE_HASH(0x4fa7c7a994334440ull); vnx::Hash64 Node_read_storage_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_return::get_type_name() const { return "mmx.Node.read_storage.return"; } const vnx::TypeCode* Node_read_storage_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_return; } std::shared_ptr Node_read_storage_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_return::clone() const { return std::make_shared(*this); } void Node_read_storage_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage.return"; type_code->type_hash = vnx::Hash64(0xab73866ba23ed19aull); type_code->code_hash = vnx::Hash64(0x4fa7c7a994334440ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 3, 32, 12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_var.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_var::VNX_TYPE_HASH(0x16d0361bcb359c2full); const vnx::Hash64 Node_read_storage_var::VNX_CODE_HASH(0xc1eb698909ec56e7ull); vnx::Hash64 Node_read_storage_var::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_var::get_type_name() const { return "mmx.Node.read_storage_var"; } const vnx::TypeCode* Node_read_storage_var::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_var; } std::shared_ptr Node_read_storage_var::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_var::clone() const { return std::make_shared(*this); } void Node_read_storage_var::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_var::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_var::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_var; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_read_storage_var::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_var\""; _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_read_storage_var::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_var::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_var"; _object["contract"] = contract; _object["address"] = address; _object["height"] = height; return _object; } void Node_read_storage_var::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_read_storage_var::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "address") { return vnx::Variant(address); } if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_read_storage_var::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "address") { _value.to(address); } else if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_var& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_var& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_var::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_var::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_var"; type_code->type_hash = vnx::Hash64(0x16d0361bcb359c2full); type_code->code_hash = vnx::Hash64(0xc1eb698909ec56e7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_read_storage_var); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_read_storage_var_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "address"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "height"; field.value = vnx::to_string(-1); field.code = {3}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_var& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_var; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_var>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.address); vnx::write_value(_buf + 8, value.height); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_var& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_var& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_var& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_read_storage_var_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_read_storage_var_return::VNX_TYPE_HASH(0xaaa6685b20943467ull); const vnx::Hash64 Node_read_storage_var_return::VNX_CODE_HASH(0x18923231c38952a6ull); vnx::Hash64 Node_read_storage_var_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_read_storage_var_return::get_type_name() const { return "mmx.Node.read_storage_var.return"; } const vnx::TypeCode* Node_read_storage_var_return::get_type_code() const { return mmx::vnx_native_type_code_Node_read_storage_var_return; } std::shared_ptr Node_read_storage_var_return::create() { return std::make_shared(); } std::shared_ptr Node_read_storage_var_return::clone() const { return std::make_shared(*this); } void Node_read_storage_var_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_read_storage_var_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_read_storage_var_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_read_storage_var_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_read_storage_var_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.read_storage_var.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_read_storage_var_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_read_storage_var_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.read_storage_var.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_read_storage_var_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_read_storage_var_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_read_storage_var_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_read_storage_var_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_read_storage_var_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_read_storage_var_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_read_storage_var_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.read_storage_var.return"; type_code->type_hash = vnx::Hash64(0xaaa6685b20943467ull); type_code->code_hash = vnx::Hash64(0x18923231c38952a6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_read_storage_var_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_read_storage_var_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_read_storage_var_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_read_storage_var_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_read_storage_var_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_read_storage_var_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_read_storage_var_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_revert_sync.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_revert_sync::VNX_TYPE_HASH(0x8c1cc38a7a8a6c1dull); const vnx::Hash64 Node_revert_sync::VNX_CODE_HASH(0x98a352c8989e46fbull); vnx::Hash64 Node_revert_sync::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_revert_sync::get_type_name() const { return "mmx.Node.revert_sync"; } const vnx::TypeCode* Node_revert_sync::get_type_code() const { return mmx::vnx_native_type_code_Node_revert_sync; } std::shared_ptr Node_revert_sync::create() { return std::make_shared(); } std::shared_ptr Node_revert_sync::clone() const { return std::make_shared(*this); } void Node_revert_sync::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_revert_sync::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_revert_sync::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_revert_sync; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Node_revert_sync::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.revert_sync\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Node_revert_sync::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_revert_sync::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.revert_sync"; _object["height"] = height; return _object; } void Node_revert_sync::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Node_revert_sync::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Node_revert_sync::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_revert_sync& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_revert_sync& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_revert_sync::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_revert_sync::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.revert_sync"; type_code->type_hash = vnx::Hash64(0x8c1cc38a7a8a6c1dull); type_code->code_hash = vnx::Hash64(0x98a352c8989e46fbull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_revert_sync); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Node_revert_sync_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_revert_sync& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_revert_sync; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_revert_sync>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Node_revert_sync& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_revert_sync& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_revert_sync& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_revert_sync_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_revert_sync_return::VNX_TYPE_HASH(0x3962a4b86b203e0aull); const vnx::Hash64 Node_revert_sync_return::VNX_CODE_HASH(0xe647bf22bec5a2ddull); vnx::Hash64 Node_revert_sync_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_revert_sync_return::get_type_name() const { return "mmx.Node.revert_sync.return"; } const vnx::TypeCode* Node_revert_sync_return::get_type_code() const { return mmx::vnx_native_type_code_Node_revert_sync_return; } std::shared_ptr Node_revert_sync_return::create() { return std::make_shared(); } std::shared_ptr Node_revert_sync_return::clone() const { return std::make_shared(*this); } void Node_revert_sync_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_revert_sync_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_revert_sync_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_revert_sync_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_revert_sync_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.revert_sync.return\""; _out << "}"; } void Node_revert_sync_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_revert_sync_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.revert_sync.return"; return _object; } void Node_revert_sync_return::from_object(const vnx::Object& _object) { } vnx::Variant Node_revert_sync_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_revert_sync_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_revert_sync_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_revert_sync_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_revert_sync_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_revert_sync_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.revert_sync.return"; type_code->type_hash = vnx::Hash64(0x3962a4b86b203e0aull); type_code->code_hash = vnx::Hash64(0xe647bf22bec5a2ddull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_revert_sync_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_revert_sync_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_revert_sync_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_revert_sync_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_revert_sync_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_revert_sync_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_revert_sync_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_start_sync.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_start_sync::VNX_TYPE_HASH(0x6c5be8aeb25ef3c8ull); const vnx::Hash64 Node_start_sync::VNX_CODE_HASH(0x4dd801a35570131cull); vnx::Hash64 Node_start_sync::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_start_sync::get_type_name() const { return "mmx.Node.start_sync"; } const vnx::TypeCode* Node_start_sync::get_type_code() const { return mmx::vnx_native_type_code_Node_start_sync; } std::shared_ptr Node_start_sync::create() { return std::make_shared(); } std::shared_ptr Node_start_sync::clone() const { return std::make_shared(*this); } void Node_start_sync::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_start_sync::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_start_sync::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_start_sync; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, force); _visitor.type_end(*_type_code); } void Node_start_sync::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.start_sync\""; _out << ", \"force\": "; vnx::write(_out, force); _out << "}"; } void Node_start_sync::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_start_sync::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.start_sync"; _object["force"] = force; return _object; } void Node_start_sync::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "force") { _entry.second.to(force); } } } vnx::Variant Node_start_sync::get_field(const std::string& _name) const { if(_name == "force") { return vnx::Variant(force); } return vnx::Variant(); } void Node_start_sync::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "force") { _value.to(force); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_start_sync& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_start_sync& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_start_sync::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_start_sync::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.start_sync"; type_code->type_hash = vnx::Hash64(0x6c5be8aeb25ef3c8ull); type_code->code_hash = vnx::Hash64(0x4dd801a35570131cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_start_sync); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Node_start_sync_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 1; field.name = "force"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.force, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_start_sync& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_start_sync; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_start_sync>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.force); } void read(std::istream& in, ::mmx::Node_start_sync& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_start_sync& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_start_sync& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_start_sync_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Node_start_sync_return::VNX_TYPE_HASH(0xe75b8e6a62d7e744ull); const vnx::Hash64 Node_start_sync_return::VNX_CODE_HASH(0x990ff8389f58e786ull); vnx::Hash64 Node_start_sync_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_start_sync_return::get_type_name() const { return "mmx.Node.start_sync.return"; } const vnx::TypeCode* Node_start_sync_return::get_type_code() const { return mmx::vnx_native_type_code_Node_start_sync_return; } std::shared_ptr Node_start_sync_return::create() { return std::make_shared(); } std::shared_ptr Node_start_sync_return::clone() const { return std::make_shared(*this); } void Node_start_sync_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_start_sync_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_start_sync_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_start_sync_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Node_start_sync_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.start_sync.return\""; _out << "}"; } void Node_start_sync_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_start_sync_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.start_sync.return"; return _object; } void Node_start_sync_return::from_object(const vnx::Object& _object) { } vnx::Variant Node_start_sync_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Node_start_sync_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Node_start_sync_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_start_sync_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_start_sync_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_start_sync_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.start_sync.return"; type_code->type_hash = vnx::Hash64(0xe75b8e6a62d7e744ull); type_code->code_hash = vnx::Hash64(0x990ff8389f58e786ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_start_sync_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_start_sync_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_start_sync_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_start_sync_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Node_start_sync_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_start_sync_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_start_sync_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_validate.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_validate::VNX_TYPE_HASH(0x95dbbd65f36b618ull); const vnx::Hash64 Node_validate::VNX_CODE_HASH(0xcbfd5553a1d05472ull); vnx::Hash64 Node_validate::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_validate::get_type_name() const { return "mmx.Node.validate"; } const vnx::TypeCode* Node_validate::get_type_code() const { return mmx::vnx_native_type_code_Node_validate; } std::shared_ptr Node_validate::create() { return std::make_shared(); } std::shared_ptr Node_validate::clone() const { return std::make_shared(*this); } void Node_validate::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_validate::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_validate::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_validate; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, tx); _visitor.type_end(*_type_code); } void Node_validate::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.validate\""; _out << ", \"tx\": "; vnx::write(_out, tx); _out << "}"; } void Node_validate::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_validate::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.validate"; _object["tx"] = tx; return _object; } void Node_validate::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Node_validate::get_field(const std::string& _name) const { if(_name == "tx") { return vnx::Variant(tx); } return vnx::Variant(); } void Node_validate::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "tx") { _value.to(tx); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_validate& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_validate& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_validate::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_validate::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.validate"; type_code->type_hash = vnx::Hash64(0x95dbbd65f36b618ull); type_code->code_hash = vnx::Hash64(0xcbfd5553a1d05472ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_validate); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_validate_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "tx"; field.code = {16}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.tx, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_validate& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_validate; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_validate>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.tx, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_validate& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_validate& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_validate& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_validate_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_validate_return::VNX_TYPE_HASH(0xe3c465d0fc0c4a4cull); const vnx::Hash64 Node_validate_return::VNX_CODE_HASH(0x7cf4e0ff5a08461ull); vnx::Hash64 Node_validate_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_validate_return::get_type_name() const { return "mmx.Node.validate.return"; } const vnx::TypeCode* Node_validate_return::get_type_code() const { return mmx::vnx_native_type_code_Node_validate_return; } std::shared_ptr Node_validate_return::create() { return std::make_shared(); } std::shared_ptr Node_validate_return::clone() const { return std::make_shared(*this); } void Node_validate_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_validate_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_validate_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_validate_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_validate_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.validate.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_validate_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_validate_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.validate.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_validate_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_validate_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_validate_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_validate_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_validate_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_validate_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_validate_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.validate.return"; type_code->type_hash = vnx::Hash64(0xe3c465d0fc0c4a4cull); type_code->code_hash = vnx::Hash64(0x7cf4e0ff5a08461ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_validate_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::exec_result_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_validate_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_validate_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_validate_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_validate_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_validate_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_validate_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_verify_partial.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_verify_partial::VNX_TYPE_HASH(0xeb15396685387f88ull); const vnx::Hash64 Node_verify_partial::VNX_CODE_HASH(0xd1cc40cb65850bf9ull); vnx::Hash64 Node_verify_partial::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_verify_partial::get_type_name() const { return "mmx.Node.verify_partial"; } const vnx::TypeCode* Node_verify_partial::get_type_code() const { return mmx::vnx_native_type_code_Node_verify_partial; } std::shared_ptr Node_verify_partial::create() { return std::make_shared(); } std::shared_ptr Node_verify_partial::clone() const { return std::make_shared(*this); } void Node_verify_partial::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_verify_partial::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_verify_partial::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_verify_partial; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, partial); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, pool_target); _visitor.type_end(*_type_code); } void Node_verify_partial::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.verify_partial\""; _out << ", \"partial\": "; vnx::write(_out, partial); _out << ", \"pool_target\": "; vnx::write(_out, pool_target); _out << "}"; } void Node_verify_partial::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_verify_partial::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.verify_partial"; _object["partial"] = partial; _object["pool_target"] = pool_target; return _object; } void Node_verify_partial::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "partial") { _entry.second.to(partial); } else if(_entry.first == "pool_target") { _entry.second.to(pool_target); } } } vnx::Variant Node_verify_partial::get_field(const std::string& _name) const { if(_name == "partial") { return vnx::Variant(partial); } if(_name == "pool_target") { return vnx::Variant(pool_target); } return vnx::Variant(); } void Node_verify_partial::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "partial") { _value.to(partial); } else if(_name == "pool_target") { _value.to(pool_target); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_verify_partial& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_verify_partial& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_verify_partial::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_verify_partial::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.verify_partial"; type_code->type_hash = vnx::Hash64(0xeb15396685387f88ull); type_code->code_hash = vnx::Hash64(0xd1cc40cb65850bf9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_verify_partial); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_verify_partial_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "partial"; field.code = {16}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "pool_target"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.partial, type_code, _field->code.data()); break; case 1: vnx::read(in, value.pool_target, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_verify_partial& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_verify_partial; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_verify_partial>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.partial, type_code, type_code->fields[0].code.data()); vnx::write(out, value.pool_target, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_verify_partial& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_verify_partial& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_verify_partial& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_verify_partial_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_verify_partial_return::VNX_TYPE_HASH(0xb64fb769c6ffcf36ull); const vnx::Hash64 Node_verify_partial_return::VNX_CODE_HASH(0x55984c727f1c2234ull); vnx::Hash64 Node_verify_partial_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_verify_partial_return::get_type_name() const { return "mmx.Node.verify_partial.return"; } const vnx::TypeCode* Node_verify_partial_return::get_type_code() const { return mmx::vnx_native_type_code_Node_verify_partial_return; } std::shared_ptr Node_verify_partial_return::create() { return std::make_shared(); } std::shared_ptr Node_verify_partial_return::clone() const { return std::make_shared(*this); } void Node_verify_partial_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_verify_partial_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_verify_partial_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_verify_partial_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_verify_partial_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.verify_partial.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_verify_partial_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_verify_partial_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.verify_partial.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_verify_partial_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_verify_partial_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_verify_partial_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_verify_partial_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_verify_partial_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_verify_partial_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_verify_partial_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.verify_partial.return"; type_code->type_hash = vnx::Hash64(0xb64fb769c6ffcf36ull); type_code->code_hash = vnx::Hash64(0x55984c727f1c2234ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_verify_partial_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::pooling_error_e::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 2, 4, 6, 19, 0, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_verify_partial_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_verify_partial_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_verify_partial_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_verify_partial_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_verify_partial_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_verify_partial_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_verify_plot_nft_target.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_verify_plot_nft_target::VNX_TYPE_HASH(0xf3ac786edcae50e1ull); const vnx::Hash64 Node_verify_plot_nft_target::VNX_CODE_HASH(0xf5349444ccd84317ull); vnx::Hash64 Node_verify_plot_nft_target::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_verify_plot_nft_target::get_type_name() const { return "mmx.Node.verify_plot_nft_target"; } const vnx::TypeCode* Node_verify_plot_nft_target::get_type_code() const { return mmx::vnx_native_type_code_Node_verify_plot_nft_target; } std::shared_ptr Node_verify_plot_nft_target::create() { return std::make_shared(); } std::shared_ptr Node_verify_plot_nft_target::clone() const { return std::make_shared(*this); } void Node_verify_plot_nft_target::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_verify_plot_nft_target::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_verify_plot_nft_target::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_verify_plot_nft_target; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, pool_target); _visitor.type_end(*_type_code); } void Node_verify_plot_nft_target::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.verify_plot_nft_target\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"pool_target\": "; vnx::write(_out, pool_target); _out << "}"; } void Node_verify_plot_nft_target::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_verify_plot_nft_target::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.verify_plot_nft_target"; _object["address"] = address; _object["pool_target"] = pool_target; return _object; } void Node_verify_plot_nft_target::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "pool_target") { _entry.second.to(pool_target); } } } vnx::Variant Node_verify_plot_nft_target::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "pool_target") { return vnx::Variant(pool_target); } return vnx::Variant(); } void Node_verify_plot_nft_target::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "pool_target") { _value.to(pool_target); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_verify_plot_nft_target& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_verify_plot_nft_target& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_verify_plot_nft_target::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_verify_plot_nft_target::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.verify_plot_nft_target"; type_code->type_hash = vnx::Hash64(0xf3ac786edcae50e1ull); type_code->code_hash = vnx::Hash64(0xf5349444ccd84317ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Node_verify_plot_nft_target); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Node_verify_plot_nft_target_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "pool_target"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.PUBLIC"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.pool_target, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_verify_plot_nft_target; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_verify_plot_nft_target>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.pool_target, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Node_verify_plot_nft_target& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Node_verify_plot_nft_target_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Node_verify_plot_nft_target_return::VNX_TYPE_HASH(0x82f0f6ed43a0c4bull); const vnx::Hash64 Node_verify_plot_nft_target_return::VNX_CODE_HASH(0x1a5ec07d47b9aeaaull); vnx::Hash64 Node_verify_plot_nft_target_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Node_verify_plot_nft_target_return::get_type_name() const { return "mmx.Node.verify_plot_nft_target.return"; } const vnx::TypeCode* Node_verify_plot_nft_target_return::get_type_code() const { return mmx::vnx_native_type_code_Node_verify_plot_nft_target_return; } std::shared_ptr Node_verify_plot_nft_target_return::create() { return std::make_shared(); } std::shared_ptr Node_verify_plot_nft_target_return::clone() const { return std::make_shared(*this); } void Node_verify_plot_nft_target_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Node_verify_plot_nft_target_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Node_verify_plot_nft_target_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Node_verify_plot_nft_target_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Node_verify_plot_nft_target_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Node.verify_plot_nft_target.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Node_verify_plot_nft_target_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Node_verify_plot_nft_target_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Node.verify_plot_nft_target.return"; _object["_ret_0"] = _ret_0; return _object; } void Node_verify_plot_nft_target_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Node_verify_plot_nft_target_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Node_verify_plot_nft_target_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Node_verify_plot_nft_target_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Node_verify_plot_nft_target_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Node_verify_plot_nft_target_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Node_verify_plot_nft_target_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Node.verify_plot_nft_target.return"; type_code->type_hash = vnx::Hash64(0x82f0f6ed43a0c4bull); type_code->code_hash = vnx::Hash64(0x1a5ec07d47b9aeaaull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Node_verify_plot_nft_target_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::pooling_error_e::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 2, 4, 6, 19, 0, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Node_verify_plot_nft_target_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Node_verify_plot_nft_target_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Node_verify_plot_nft_target_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Node_verify_plot_nft_target_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Node_verify_plot_nft_target_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Node_verify_plot_nft_target_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Operation.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const uint16_t Operation::NO_SOLUTION; const vnx::Hash64 Operation::VNX_TYPE_HASH(0xfd69dd82e906e619ull); const vnx::Hash64 Operation::VNX_CODE_HASH(0xeb820061b22c3c4bull); vnx::Hash64 Operation::get_type_hash() const { return VNX_TYPE_HASH; } std::string Operation::get_type_name() const { return "mmx.Operation"; } const vnx::TypeCode* Operation::get_type_code() const { return mmx::vnx_native_type_code_Operation; } std::shared_ptr Operation::create() { return std::make_shared(); } std::shared_ptr Operation::clone() const { return std::make_shared(*this); } void Operation::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Operation::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Operation::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Operation; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, solution); _visitor.type_end(*_type_code); } void Operation::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Operation\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"solution\": "; vnx::write(_out, solution); _out << "}"; } void Operation::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Operation::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Operation"; _object["version"] = version; _object["address"] = address; _object["solution"] = solution; return _object; } void Operation::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "solution") { _entry.second.to(solution); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Operation::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "address") { return vnx::Variant(address); } if(_name == "solution") { return vnx::Variant(solution); } return vnx::Variant(); } void Operation::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "address") { _value.to(address); } else if(_name == "solution") { _value.to(solution); } } /// \private std::ostream& operator<<(std::ostream& _out, const Operation& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Operation& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Operation::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Operation::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Operation"; type_code->type_hash = vnx::Hash64(0xfd69dd82e906e619ull); type_code->code_hash = vnx::Hash64(0xeb820061b22c3c4bull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Operation); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 2; field.name = "solution"; field.value = vnx::to_string(-1); field.code = {2}; } type_code->build(); return type_code; } std::shared_ptr Operation::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.solution, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Operation& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Operation; out.write_type_code(type_code); vnx::write_class_header<::mmx::Operation>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(6); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.solution); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Operation& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Operation& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Operation& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Partial.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Partial::VNX_TYPE_HASH(0x2c849b13a7efd71aull); const vnx::Hash64 Partial::VNX_CODE_HASH(0xca1340c22c20b48full); vnx::Hash64 Partial::get_type_hash() const { return VNX_TYPE_HASH; } std::string Partial::get_type_name() const { return "mmx.Partial"; } const vnx::TypeCode* Partial::get_type_code() const { return mmx::vnx_native_type_code_Partial; } std::shared_ptr Partial::create() { return std::make_shared(); } std::shared_ptr Partial::clone() const { return std::make_shared(*this); } void Partial::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Partial::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Partial::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Partial; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, account); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, pool_url); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, harvester); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, lookup_time_ms); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, proof); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, farmer_sig); _visitor.type_end(*_type_code); } void Partial::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Partial\""; _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"account\": "; vnx::write(_out, account); _out << ", \"pool_url\": "; vnx::write(_out, pool_url); _out << ", \"harvester\": "; vnx::write(_out, harvester); _out << ", \"lookup_time_ms\": "; vnx::write(_out, lookup_time_ms); _out << ", \"proof\": "; vnx::write(_out, proof); _out << ", \"farmer_sig\": "; vnx::write(_out, farmer_sig); _out << "}"; } void Partial::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Partial::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Partial"; _object["vdf_height"] = vdf_height; _object["hash"] = hash; _object["contract"] = contract; _object["account"] = account; _object["pool_url"] = pool_url; _object["harvester"] = harvester; _object["lookup_time_ms"] = lookup_time_ms; _object["proof"] = proof; _object["farmer_sig"] = farmer_sig; return _object; } void Partial::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "account") { _entry.second.to(account); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "farmer_sig") { _entry.second.to(farmer_sig); } else if(_entry.first == "harvester") { _entry.second.to(harvester); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "lookup_time_ms") { _entry.second.to(lookup_time_ms); } else if(_entry.first == "pool_url") { _entry.second.to(pool_url); } else if(_entry.first == "proof") { _entry.second.to(proof); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant Partial::get_field(const std::string& _name) const { if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "hash") { return vnx::Variant(hash); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "account") { return vnx::Variant(account); } if(_name == "pool_url") { return vnx::Variant(pool_url); } if(_name == "harvester") { return vnx::Variant(harvester); } if(_name == "lookup_time_ms") { return vnx::Variant(lookup_time_ms); } if(_name == "proof") { return vnx::Variant(proof); } if(_name == "farmer_sig") { return vnx::Variant(farmer_sig); } return vnx::Variant(); } void Partial::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "hash") { _value.to(hash); } else if(_name == "contract") { _value.to(contract); } else if(_name == "account") { _value.to(account); } else if(_name == "pool_url") { _value.to(pool_url); } else if(_name == "harvester") { _value.to(harvester); } else if(_name == "lookup_time_ms") { _value.to(lookup_time_ms); } else if(_name == "proof") { _value.to(proof); } else if(_name == "farmer_sig") { _value.to(farmer_sig); } } /// \private std::ostream& operator<<(std::ostream& _out, const Partial& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Partial& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Partial::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Partial::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Partial"; type_code->type_hash = vnx::Hash64(0x2c849b13a7efd71aull); type_code->code_hash = vnx::Hash64(0xca1340c22c20b48full); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Partial); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "account"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "pool_url"; field.code = {32}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "harvester"; field.code = {32}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "lookup_time_ms"; field.code = {3}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "proof"; field.code = {16}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "farmer_sig"; field.code = {33, 11, 64, 1}; } type_code->build(); return type_code; } std::shared_ptr Partial::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.lookup_time_ms, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 2: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 3: vnx::read(in, value.account, type_code, _field->code.data()); break; case 4: vnx::read(in, value.pool_url, type_code, _field->code.data()); break; case 5: vnx::read(in, value.harvester, type_code, _field->code.data()); break; case 7: vnx::read(in, value.proof, type_code, _field->code.data()); break; case 8: vnx::read(in, value.farmer_sig, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Partial& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Partial; out.write_type_code(type_code); vnx::write_class_header<::mmx::Partial>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.lookup_time_ms); vnx::write(out, value.hash, type_code, type_code->fields[1].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[2].code.data()); vnx::write(out, value.account, type_code, type_code->fields[3].code.data()); vnx::write(out, value.pool_url, type_code, type_code->fields[4].code.data()); vnx::write(out, value.harvester, type_code, type_code->fields[5].code.data()); vnx::write(out, value.proof, type_code, type_code->fields[7].code.data()); vnx::write(out, value.farmer_sig, type_code, type_code->fields[8].code.data()); } void read(std::istream& in, ::mmx::Partial& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Partial& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Partial& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/PeerInfo.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 PeerInfo::VNX_TYPE_HASH(0xf7a37f624c94a121ull); const vnx::Hash64 PeerInfo::VNX_CODE_HASH(0xb1eed7c9e87a2725ull); vnx::Hash64 PeerInfo::get_type_hash() const { return VNX_TYPE_HASH; } std::string PeerInfo::get_type_name() const { return "mmx.PeerInfo"; } const vnx::TypeCode* PeerInfo::get_type_code() const { return mmx::vnx_native_type_code_PeerInfo; } std::shared_ptr PeerInfo::create() { return std::make_shared(); } std::shared_ptr PeerInfo::clone() const { return std::make_shared(*this); } void PeerInfo::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void PeerInfo::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void PeerInfo::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_PeerInfo; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, peers); _visitor.type_end(*_type_code); } void PeerInfo::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.PeerInfo\""; _out << ", \"peers\": "; vnx::write(_out, peers); _out << "}"; } void PeerInfo::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object PeerInfo::to_object() const { vnx::Object _object; _object["__type"] = "mmx.PeerInfo"; _object["peers"] = peers; return _object; } void PeerInfo::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "peers") { _entry.second.to(peers); } } } vnx::Variant PeerInfo::get_field(const std::string& _name) const { if(_name == "peers") { return vnx::Variant(peers); } return vnx::Variant(); } void PeerInfo::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "peers") { _value.to(peers); } } /// \private std::ostream& operator<<(std::ostream& _out, const PeerInfo& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, PeerInfo& _value) { _value.read(_in); return _in; } const vnx::TypeCode* PeerInfo::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr PeerInfo::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.PeerInfo"; type_code->type_hash = vnx::Hash64(0xf7a37f624c94a121ull); type_code->code_hash = vnx::Hash64(0xb1eed7c9e87a2725ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::PeerInfo); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::peer_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "peers"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } std::shared_ptr PeerInfo::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.peers, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::PeerInfo& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_PeerInfo; out.write_type_code(type_code); vnx::write_class_header<::mmx::PeerInfo>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.peers, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::PeerInfo& value) { value.read(in); } void write(std::ostream& out, const ::mmx::PeerInfo& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::PeerInfo& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/PlotHeader.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 PlotHeader::VNX_TYPE_HASH(0x299c5790983c47b6ull); const vnx::Hash64 PlotHeader::VNX_CODE_HASH(0x7b8ddf3d002be0f0ull); vnx::Hash64 PlotHeader::get_type_hash() const { return VNX_TYPE_HASH; } std::string PlotHeader::get_type_name() const { return "mmx.PlotHeader"; } const vnx::TypeCode* PlotHeader::get_type_code() const { return mmx::vnx_native_type_code_PlotHeader; } std::shared_ptr PlotHeader::create() { return std::make_shared(); } std::shared_ptr PlotHeader::clone() const { return std::make_shared(*this); } void PlotHeader::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void PlotHeader::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void PlotHeader::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_PlotHeader; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, ksize); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, xbits); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, has_meta); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, seed); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, plot_id); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, farmer_key); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, plot_size); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, park_size_x); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, park_size_y); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, park_size_pd); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, park_size_meta); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, park_bytes_x); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, park_bytes_y); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, park_bytes_pd); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, park_bytes_meta); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, entry_bits_x); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, num_entries_y); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, table_offset_x); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, table_offset_y); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, table_offset_meta); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, table_offset_pd); _visitor.type_end(*_type_code); } void PlotHeader::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.PlotHeader\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"ksize\": "; vnx::write(_out, ksize); _out << ", \"xbits\": "; vnx::write(_out, xbits); _out << ", \"has_meta\": "; vnx::write(_out, has_meta); _out << ", \"seed\": "; vnx::write(_out, seed); _out << ", \"plot_id\": "; vnx::write(_out, plot_id); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"plot_size\": "; vnx::write(_out, plot_size); _out << ", \"park_size_x\": "; vnx::write(_out, park_size_x); _out << ", \"park_size_y\": "; vnx::write(_out, park_size_y); _out << ", \"park_size_pd\": "; vnx::write(_out, park_size_pd); _out << ", \"park_size_meta\": "; vnx::write(_out, park_size_meta); _out << ", \"park_bytes_x\": "; vnx::write(_out, park_bytes_x); _out << ", \"park_bytes_y\": "; vnx::write(_out, park_bytes_y); _out << ", \"park_bytes_pd\": "; vnx::write(_out, park_bytes_pd); _out << ", \"park_bytes_meta\": "; vnx::write(_out, park_bytes_meta); _out << ", \"entry_bits_x\": "; vnx::write(_out, entry_bits_x); _out << ", \"num_entries_y\": "; vnx::write(_out, num_entries_y); _out << ", \"table_offset_x\": "; vnx::write(_out, table_offset_x); _out << ", \"table_offset_y\": "; vnx::write(_out, table_offset_y); _out << ", \"table_offset_meta\": "; vnx::write(_out, table_offset_meta); _out << ", \"table_offset_pd\": "; vnx::write(_out, table_offset_pd); _out << "}"; } void PlotHeader::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object PlotHeader::to_object() const { vnx::Object _object; _object["__type"] = "mmx.PlotHeader"; _object["version"] = version; _object["ksize"] = ksize; _object["xbits"] = xbits; _object["has_meta"] = has_meta; _object["seed"] = seed; _object["plot_id"] = plot_id; _object["farmer_key"] = farmer_key; _object["contract"] = contract; _object["plot_size"] = plot_size; _object["park_size_x"] = park_size_x; _object["park_size_y"] = park_size_y; _object["park_size_pd"] = park_size_pd; _object["park_size_meta"] = park_size_meta; _object["park_bytes_x"] = park_bytes_x; _object["park_bytes_y"] = park_bytes_y; _object["park_bytes_pd"] = park_bytes_pd; _object["park_bytes_meta"] = park_bytes_meta; _object["entry_bits_x"] = entry_bits_x; _object["num_entries_y"] = num_entries_y; _object["table_offset_x"] = table_offset_x; _object["table_offset_y"] = table_offset_y; _object["table_offset_meta"] = table_offset_meta; _object["table_offset_pd"] = table_offset_pd; return _object; } void PlotHeader::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "entry_bits_x") { _entry.second.to(entry_bits_x); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "has_meta") { _entry.second.to(has_meta); } else if(_entry.first == "ksize") { _entry.second.to(ksize); } else if(_entry.first == "num_entries_y") { _entry.second.to(num_entries_y); } else if(_entry.first == "park_bytes_meta") { _entry.second.to(park_bytes_meta); } else if(_entry.first == "park_bytes_pd") { _entry.second.to(park_bytes_pd); } else if(_entry.first == "park_bytes_x") { _entry.second.to(park_bytes_x); } else if(_entry.first == "park_bytes_y") { _entry.second.to(park_bytes_y); } else if(_entry.first == "park_size_meta") { _entry.second.to(park_size_meta); } else if(_entry.first == "park_size_pd") { _entry.second.to(park_size_pd); } else if(_entry.first == "park_size_x") { _entry.second.to(park_size_x); } else if(_entry.first == "park_size_y") { _entry.second.to(park_size_y); } else if(_entry.first == "plot_id") { _entry.second.to(plot_id); } else if(_entry.first == "plot_size") { _entry.second.to(plot_size); } else if(_entry.first == "seed") { _entry.second.to(seed); } else if(_entry.first == "table_offset_meta") { _entry.second.to(table_offset_meta); } else if(_entry.first == "table_offset_pd") { _entry.second.to(table_offset_pd); } else if(_entry.first == "table_offset_x") { _entry.second.to(table_offset_x); } else if(_entry.first == "table_offset_y") { _entry.second.to(table_offset_y); } else if(_entry.first == "version") { _entry.second.to(version); } else if(_entry.first == "xbits") { _entry.second.to(xbits); } } } vnx::Variant PlotHeader::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "ksize") { return vnx::Variant(ksize); } if(_name == "xbits") { return vnx::Variant(xbits); } if(_name == "has_meta") { return vnx::Variant(has_meta); } if(_name == "seed") { return vnx::Variant(seed); } if(_name == "plot_id") { return vnx::Variant(plot_id); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "plot_size") { return vnx::Variant(plot_size); } if(_name == "park_size_x") { return vnx::Variant(park_size_x); } if(_name == "park_size_y") { return vnx::Variant(park_size_y); } if(_name == "park_size_pd") { return vnx::Variant(park_size_pd); } if(_name == "park_size_meta") { return vnx::Variant(park_size_meta); } if(_name == "park_bytes_x") { return vnx::Variant(park_bytes_x); } if(_name == "park_bytes_y") { return vnx::Variant(park_bytes_y); } if(_name == "park_bytes_pd") { return vnx::Variant(park_bytes_pd); } if(_name == "park_bytes_meta") { return vnx::Variant(park_bytes_meta); } if(_name == "entry_bits_x") { return vnx::Variant(entry_bits_x); } if(_name == "num_entries_y") { return vnx::Variant(num_entries_y); } if(_name == "table_offset_x") { return vnx::Variant(table_offset_x); } if(_name == "table_offset_y") { return vnx::Variant(table_offset_y); } if(_name == "table_offset_meta") { return vnx::Variant(table_offset_meta); } if(_name == "table_offset_pd") { return vnx::Variant(table_offset_pd); } return vnx::Variant(); } void PlotHeader::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "ksize") { _value.to(ksize); } else if(_name == "xbits") { _value.to(xbits); } else if(_name == "has_meta") { _value.to(has_meta); } else if(_name == "seed") { _value.to(seed); } else if(_name == "plot_id") { _value.to(plot_id); } else if(_name == "farmer_key") { _value.to(farmer_key); } else if(_name == "contract") { _value.to(contract); } else if(_name == "plot_size") { _value.to(plot_size); } else if(_name == "park_size_x") { _value.to(park_size_x); } else if(_name == "park_size_y") { _value.to(park_size_y); } else if(_name == "park_size_pd") { _value.to(park_size_pd); } else if(_name == "park_size_meta") { _value.to(park_size_meta); } else if(_name == "park_bytes_x") { _value.to(park_bytes_x); } else if(_name == "park_bytes_y") { _value.to(park_bytes_y); } else if(_name == "park_bytes_pd") { _value.to(park_bytes_pd); } else if(_name == "park_bytes_meta") { _value.to(park_bytes_meta); } else if(_name == "entry_bits_x") { _value.to(entry_bits_x); } else if(_name == "num_entries_y") { _value.to(num_entries_y); } else if(_name == "table_offset_x") { _value.to(table_offset_x); } else if(_name == "table_offset_y") { _value.to(table_offset_y); } else if(_name == "table_offset_meta") { _value.to(table_offset_meta); } else if(_name == "table_offset_pd") { _value.to(table_offset_pd); } } /// \private std::ostream& operator<<(std::ostream& _out, const PlotHeader& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, PlotHeader& _value) { _value.read(_in); return _in; } const vnx::TypeCode* PlotHeader::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr PlotHeader::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.PlotHeader"; type_code->type_hash = vnx::Hash64(0x299c5790983c47b6ull); type_code->code_hash = vnx::Hash64(0x7b8ddf3d002be0f0ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::PlotHeader); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(23); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {7}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "ksize"; field.code = {7}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "xbits"; field.code = {7}; } { auto& field = type_code->fields[3]; field.data_size = 1; field.name = "has_meta"; field.code = {31}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "seed"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "plot_id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "contract"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "plot_size"; field.code = {4}; } { auto& field = type_code->fields[9]; field.data_size = 4; field.name = "park_size_x"; field.code = {7}; } { auto& field = type_code->fields[10]; field.data_size = 4; field.name = "park_size_y"; field.code = {7}; } { auto& field = type_code->fields[11]; field.data_size = 4; field.name = "park_size_pd"; field.code = {7}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "park_size_meta"; field.code = {7}; } { auto& field = type_code->fields[13]; field.data_size = 4; field.name = "park_bytes_x"; field.code = {7}; } { auto& field = type_code->fields[14]; field.data_size = 4; field.name = "park_bytes_y"; field.code = {7}; } { auto& field = type_code->fields[15]; field.data_size = 4; field.name = "park_bytes_pd"; field.code = {7}; } { auto& field = type_code->fields[16]; field.data_size = 4; field.name = "park_bytes_meta"; field.code = {7}; } { auto& field = type_code->fields[17]; field.data_size = 4; field.name = "entry_bits_x"; field.code = {7}; } { auto& field = type_code->fields[18]; field.data_size = 8; field.name = "num_entries_y"; field.code = {4}; } { auto& field = type_code->fields[19]; field.data_size = 8; field.name = "table_offset_x"; field.value = vnx::to_string(-1); field.code = {4}; } { auto& field = type_code->fields[20]; field.data_size = 8; field.name = "table_offset_y"; field.value = vnx::to_string(-1); field.code = {4}; } { auto& field = type_code->fields[21]; field.data_size = 8; field.name = "table_offset_meta"; field.value = vnx::to_string(-1); field.code = {4}; } { auto& field = type_code->fields[22]; field.is_extended = true; field.name = "table_offset_pd"; field.code = {12, 4}; } type_code->build(); return type_code; } std::shared_ptr PlotHeader::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.ksize, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.xbits, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.has_meta, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.plot_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.park_size_x, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.park_size_y, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.park_size_pd, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.park_size_meta, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.park_bytes_x, _field->code.data()); } if(const auto* const _field = type_code->field_map[14]) { vnx::read_value(_buf + _field->offset, value.park_bytes_y, _field->code.data()); } if(const auto* const _field = type_code->field_map[15]) { vnx::read_value(_buf + _field->offset, value.park_bytes_pd, _field->code.data()); } if(const auto* const _field = type_code->field_map[16]) { vnx::read_value(_buf + _field->offset, value.park_bytes_meta, _field->code.data()); } if(const auto* const _field = type_code->field_map[17]) { vnx::read_value(_buf + _field->offset, value.entry_bits_x, _field->code.data()); } if(const auto* const _field = type_code->field_map[18]) { vnx::read_value(_buf + _field->offset, value.num_entries_y, _field->code.data()); } if(const auto* const _field = type_code->field_map[19]) { vnx::read_value(_buf + _field->offset, value.table_offset_x, _field->code.data()); } if(const auto* const _field = type_code->field_map[20]) { vnx::read_value(_buf + _field->offset, value.table_offset_y, _field->code.data()); } if(const auto* const _field = type_code->field_map[21]) { vnx::read_value(_buf + _field->offset, value.table_offset_meta, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 4: vnx::read(in, value.seed, type_code, _field->code.data()); break; case 5: vnx::read(in, value.plot_id, type_code, _field->code.data()); break; case 6: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; case 7: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 22: vnx::read(in, value.table_offset_pd, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::PlotHeader& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_PlotHeader; out.write_type_code(type_code); vnx::write_class_header<::mmx::PlotHeader>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(89); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.ksize); vnx::write_value(_buf + 8, value.xbits); vnx::write_value(_buf + 12, value.has_meta); vnx::write_value(_buf + 13, value.plot_size); vnx::write_value(_buf + 21, value.park_size_x); vnx::write_value(_buf + 25, value.park_size_y); vnx::write_value(_buf + 29, value.park_size_pd); vnx::write_value(_buf + 33, value.park_size_meta); vnx::write_value(_buf + 37, value.park_bytes_x); vnx::write_value(_buf + 41, value.park_bytes_y); vnx::write_value(_buf + 45, value.park_bytes_pd); vnx::write_value(_buf + 49, value.park_bytes_meta); vnx::write_value(_buf + 53, value.entry_bits_x); vnx::write_value(_buf + 57, value.num_entries_y); vnx::write_value(_buf + 65, value.table_offset_x); vnx::write_value(_buf + 73, value.table_offset_y); vnx::write_value(_buf + 81, value.table_offset_meta); vnx::write(out, value.seed, type_code, type_code->fields[4].code.data()); vnx::write(out, value.plot_id, type_code, type_code->fields[5].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[6].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[7].code.data()); vnx::write(out, value.table_offset_pd, type_code, type_code->fields[22].code.data()); } void read(std::istream& in, ::mmx::PlotHeader& value) { value.read(in); } void write(std::ostream& out, const ::mmx::PlotHeader& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::PlotHeader& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofOfSpace.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofOfSpace::VNX_TYPE_HASH(0x9269760ad5fd0058ull); const vnx::Hash64 ProofOfSpace::VNX_CODE_HASH(0x912ddf3fa6db3763ull); vnx::Hash64 ProofOfSpace::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofOfSpace::get_type_name() const { return "mmx.ProofOfSpace"; } const vnx::TypeCode* ProofOfSpace::get_type_code() const { return mmx::vnx_native_type_code_ProofOfSpace; } std::shared_ptr ProofOfSpace::create() { return std::make_shared(); } std::shared_ptr ProofOfSpace::clone() const { return std::make_shared(*this); } void ProofOfSpace::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofOfSpace::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofOfSpace::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofOfSpace; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, score); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, plot_id); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, difficulty); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, farmer_key); _visitor.type_end(*_type_code); } void ProofOfSpace::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofOfSpace\""; _out << ", \"score\": "; vnx::write(_out, score); _out << ", \"plot_id\": "; vnx::write(_out, plot_id); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"difficulty\": "; vnx::write(_out, difficulty); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << "}"; } void ProofOfSpace::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofOfSpace::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofOfSpace"; _object["score"] = score; _object["plot_id"] = plot_id; _object["challenge"] = challenge; _object["difficulty"] = difficulty; _object["farmer_key"] = farmer_key; return _object; } void ProofOfSpace::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "difficulty") { _entry.second.to(difficulty); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "plot_id") { _entry.second.to(plot_id); } else if(_entry.first == "score") { _entry.second.to(score); } } } vnx::Variant ProofOfSpace::get_field(const std::string& _name) const { if(_name == "score") { return vnx::Variant(score); } if(_name == "plot_id") { return vnx::Variant(plot_id); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "difficulty") { return vnx::Variant(difficulty); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } return vnx::Variant(); } void ProofOfSpace::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "score") { _value.to(score); } else if(_name == "plot_id") { _value.to(plot_id); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "difficulty") { _value.to(difficulty); } else if(_name == "farmer_key") { _value.to(farmer_key); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofOfSpace& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofOfSpace& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofOfSpace::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofOfSpace::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofOfSpace"; type_code->type_hash = vnx::Hash64(0x9269760ad5fd0058ull); type_code->code_hash = vnx::Hash64(0x912ddf3fa6db3763ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ProofOfSpace); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 2; field.name = "score"; field.code = {2}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "plot_id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "difficulty"; field.code = {4}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } type_code->build(); return type_code; } std::shared_ptr ProofOfSpace::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.score, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.difficulty, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.plot_id, type_code, _field->code.data()); break; case 2: vnx::read(in, value.challenge, type_code, _field->code.data()); break; case 4: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofOfSpace& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofOfSpace; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofOfSpace>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(10); vnx::write_value(_buf + 0, value.score); vnx::write_value(_buf + 2, value.difficulty); vnx::write(out, value.plot_id, type_code, type_code->fields[1].code.data()); vnx::write(out, value.challenge, type_code, type_code->fields[2].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::ProofOfSpace& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofOfSpace& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofOfSpace& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofOfSpaceNFT.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofOfSpaceNFT::VNX_TYPE_HASH(0x22a4d97166711bd9ull); const vnx::Hash64 ProofOfSpaceNFT::VNX_CODE_HASH(0x66efabbcbb12ab5dull); vnx::Hash64 ProofOfSpaceNFT::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofOfSpaceNFT::get_type_name() const { return "mmx.ProofOfSpaceNFT"; } const vnx::TypeCode* ProofOfSpaceNFT::get_type_code() const { return mmx::vnx_native_type_code_ProofOfSpaceNFT; } std::shared_ptr ProofOfSpaceNFT::create() { return std::make_shared(); } std::shared_ptr ProofOfSpaceNFT::clone() const { return std::make_shared(*this); } void ProofOfSpaceNFT::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofOfSpaceNFT::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofOfSpaceNFT::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofOfSpaceNFT; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, score); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, plot_id); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, difficulty); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, farmer_key); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, ksize); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, seed); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, proof_xs); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, contract); _visitor.type_end(*_type_code); } void ProofOfSpaceNFT::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofOfSpaceNFT\""; _out << ", \"score\": "; vnx::write(_out, score); _out << ", \"plot_id\": "; vnx::write(_out, plot_id); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"difficulty\": "; vnx::write(_out, difficulty); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << ", \"ksize\": "; vnx::write(_out, ksize); _out << ", \"seed\": "; vnx::write(_out, seed); _out << ", \"proof_xs\": "; vnx::write(_out, proof_xs); _out << ", \"contract\": "; vnx::write(_out, contract); _out << "}"; } void ProofOfSpaceNFT::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofOfSpaceNFT::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofOfSpaceNFT"; _object["score"] = score; _object["plot_id"] = plot_id; _object["challenge"] = challenge; _object["difficulty"] = difficulty; _object["farmer_key"] = farmer_key; _object["ksize"] = ksize; _object["seed"] = seed; _object["proof_xs"] = proof_xs; _object["contract"] = contract; return _object; } void ProofOfSpaceNFT::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "difficulty") { _entry.second.to(difficulty); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "ksize") { _entry.second.to(ksize); } else if(_entry.first == "plot_id") { _entry.second.to(plot_id); } else if(_entry.first == "proof_xs") { _entry.second.to(proof_xs); } else if(_entry.first == "score") { _entry.second.to(score); } else if(_entry.first == "seed") { _entry.second.to(seed); } } } vnx::Variant ProofOfSpaceNFT::get_field(const std::string& _name) const { if(_name == "score") { return vnx::Variant(score); } if(_name == "plot_id") { return vnx::Variant(plot_id); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "difficulty") { return vnx::Variant(difficulty); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } if(_name == "ksize") { return vnx::Variant(ksize); } if(_name == "seed") { return vnx::Variant(seed); } if(_name == "proof_xs") { return vnx::Variant(proof_xs); } if(_name == "contract") { return vnx::Variant(contract); } return vnx::Variant(); } void ProofOfSpaceNFT::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "score") { _value.to(score); } else if(_name == "plot_id") { _value.to(plot_id); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "difficulty") { _value.to(difficulty); } else if(_name == "farmer_key") { _value.to(farmer_key); } else if(_name == "ksize") { _value.to(ksize); } else if(_name == "seed") { _value.to(seed); } else if(_name == "proof_xs") { _value.to(proof_xs); } else if(_name == "contract") { _value.to(contract); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofOfSpaceNFT& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofOfSpaceNFT& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofOfSpaceNFT::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofOfSpaceNFT::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofOfSpaceNFT"; type_code->type_hash = vnx::Hash64(0x22a4d97166711bd9ull); type_code->code_hash = vnx::Hash64(0x66efabbcbb12ab5dull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ProofOfSpaceNFT); type_code->parents.resize(1); type_code->parents[0] = ::mmx::ProofOfSpace::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 2; field.name = "score"; field.code = {2}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "plot_id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "difficulty"; field.code = {4}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "ksize"; field.code = {1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "seed"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "proof_xs"; field.code = {12, 3}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr ProofOfSpaceNFT::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.score, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.difficulty, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.ksize, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.plot_id, type_code, _field->code.data()); break; case 2: vnx::read(in, value.challenge, type_code, _field->code.data()); break; case 4: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; case 6: vnx::read(in, value.seed, type_code, _field->code.data()); break; case 7: vnx::read(in, value.proof_xs, type_code, _field->code.data()); break; case 8: vnx::read(in, value.contract, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofOfSpaceNFT& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofOfSpaceNFT; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofOfSpaceNFT>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(11); vnx::write_value(_buf + 0, value.score); vnx::write_value(_buf + 2, value.difficulty); vnx::write_value(_buf + 10, value.ksize); vnx::write(out, value.plot_id, type_code, type_code->fields[1].code.data()); vnx::write(out, value.challenge, type_code, type_code->fields[2].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[4].code.data()); vnx::write(out, value.seed, type_code, type_code->fields[6].code.data()); vnx::write(out, value.proof_xs, type_code, type_code->fields[7].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[8].code.data()); } void read(std::istream& in, ::mmx::ProofOfSpaceNFT& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofOfSpaceNFT& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofOfSpaceNFT& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofOfSpaceOG.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofOfSpaceOG::VNX_TYPE_HASH(0x6def5518efc37b4ull); const vnx::Hash64 ProofOfSpaceOG::VNX_CODE_HASH(0x2b9bf9e319831974ull); vnx::Hash64 ProofOfSpaceOG::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofOfSpaceOG::get_type_name() const { return "mmx.ProofOfSpaceOG"; } const vnx::TypeCode* ProofOfSpaceOG::get_type_code() const { return mmx::vnx_native_type_code_ProofOfSpaceOG; } std::shared_ptr ProofOfSpaceOG::create() { return std::make_shared(); } std::shared_ptr ProofOfSpaceOG::clone() const { return std::make_shared(*this); } void ProofOfSpaceOG::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofOfSpaceOG::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofOfSpaceOG::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofOfSpaceOG; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, score); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, plot_id); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, challenge); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, difficulty); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, farmer_key); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, ksize); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, seed); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, proof_xs); _visitor.type_end(*_type_code); } void ProofOfSpaceOG::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofOfSpaceOG\""; _out << ", \"score\": "; vnx::write(_out, score); _out << ", \"plot_id\": "; vnx::write(_out, plot_id); _out << ", \"challenge\": "; vnx::write(_out, challenge); _out << ", \"difficulty\": "; vnx::write(_out, difficulty); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << ", \"ksize\": "; vnx::write(_out, ksize); _out << ", \"seed\": "; vnx::write(_out, seed); _out << ", \"proof_xs\": "; vnx::write(_out, proof_xs); _out << "}"; } void ProofOfSpaceOG::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofOfSpaceOG::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofOfSpaceOG"; _object["score"] = score; _object["plot_id"] = plot_id; _object["challenge"] = challenge; _object["difficulty"] = difficulty; _object["farmer_key"] = farmer_key; _object["ksize"] = ksize; _object["seed"] = seed; _object["proof_xs"] = proof_xs; return _object; } void ProofOfSpaceOG::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "challenge") { _entry.second.to(challenge); } else if(_entry.first == "difficulty") { _entry.second.to(difficulty); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "ksize") { _entry.second.to(ksize); } else if(_entry.first == "plot_id") { _entry.second.to(plot_id); } else if(_entry.first == "proof_xs") { _entry.second.to(proof_xs); } else if(_entry.first == "score") { _entry.second.to(score); } else if(_entry.first == "seed") { _entry.second.to(seed); } } } vnx::Variant ProofOfSpaceOG::get_field(const std::string& _name) const { if(_name == "score") { return vnx::Variant(score); } if(_name == "plot_id") { return vnx::Variant(plot_id); } if(_name == "challenge") { return vnx::Variant(challenge); } if(_name == "difficulty") { return vnx::Variant(difficulty); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } if(_name == "ksize") { return vnx::Variant(ksize); } if(_name == "seed") { return vnx::Variant(seed); } if(_name == "proof_xs") { return vnx::Variant(proof_xs); } return vnx::Variant(); } void ProofOfSpaceOG::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "score") { _value.to(score); } else if(_name == "plot_id") { _value.to(plot_id); } else if(_name == "challenge") { _value.to(challenge); } else if(_name == "difficulty") { _value.to(difficulty); } else if(_name == "farmer_key") { _value.to(farmer_key); } else if(_name == "ksize") { _value.to(ksize); } else if(_name == "seed") { _value.to(seed); } else if(_name == "proof_xs") { _value.to(proof_xs); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofOfSpaceOG& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofOfSpaceOG& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofOfSpaceOG::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofOfSpaceOG::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofOfSpaceOG"; type_code->type_hash = vnx::Hash64(0x6def5518efc37b4ull); type_code->code_hash = vnx::Hash64(0x2b9bf9e319831974ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ProofOfSpaceOG); type_code->parents.resize(1); type_code->parents[0] = ::mmx::ProofOfSpace::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.data_size = 2; field.name = "score"; field.code = {2}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "plot_id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "challenge"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "difficulty"; field.code = {4}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "ksize"; field.code = {1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "seed"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "proof_xs"; field.code = {12, 3}; } type_code->build(); return type_code; } std::shared_ptr ProofOfSpaceOG::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.score, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.difficulty, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.ksize, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.plot_id, type_code, _field->code.data()); break; case 2: vnx::read(in, value.challenge, type_code, _field->code.data()); break; case 4: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; case 6: vnx::read(in, value.seed, type_code, _field->code.data()); break; case 7: vnx::read(in, value.proof_xs, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofOfSpaceOG& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofOfSpaceOG; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofOfSpaceOG>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(11); vnx::write_value(_buf + 0, value.score); vnx::write_value(_buf + 2, value.difficulty); vnx::write_value(_buf + 10, value.ksize); vnx::write(out, value.plot_id, type_code, type_code->fields[1].code.data()); vnx::write(out, value.challenge, type_code, type_code->fields[2].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[4].code.data()); vnx::write(out, value.seed, type_code, type_code->fields[6].code.data()); vnx::write(out, value.proof_xs, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::ProofOfSpaceOG& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofOfSpaceOG& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofOfSpaceOG& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofOfTime.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofOfTime::VNX_TYPE_HASH(0xa84a63942b8e5c6aull); const vnx::Hash64 ProofOfTime::VNX_CODE_HASH(0x969604802b05b4cdull); vnx::Hash64 ProofOfTime::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofOfTime::get_type_name() const { return "mmx.ProofOfTime"; } const vnx::TypeCode* ProofOfTime::get_type_code() const { return mmx::vnx_native_type_code_ProofOfTime; } std::shared_ptr ProofOfTime::create() { return std::make_shared(); } std::shared_ptr ProofOfTime::clone() const { return std::make_shared(*this); } void ProofOfTime::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofOfTime::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofOfTime::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofOfTime; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, start); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, num_iters); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, segment_size); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, input); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, prev); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, reward_addr); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, segments); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, timelord_key); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, timelord_sig); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, content_hash); _visitor.type_end(*_type_code); } void ProofOfTime::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofOfTime\""; _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"start\": "; vnx::write(_out, start); _out << ", \"num_iters\": "; vnx::write(_out, num_iters); _out << ", \"segment_size\": "; vnx::write(_out, segment_size); _out << ", \"input\": "; vnx::write(_out, input); _out << ", \"prev\": "; vnx::write(_out, prev); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << ", \"segments\": "; vnx::write(_out, segments); _out << ", \"timelord_key\": "; vnx::write(_out, timelord_key); _out << ", \"timelord_sig\": "; vnx::write(_out, timelord_sig); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << "}"; } void ProofOfTime::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofOfTime::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofOfTime"; _object["version"] = version; _object["hash"] = hash; _object["vdf_height"] = vdf_height; _object["start"] = start; _object["num_iters"] = num_iters; _object["segment_size"] = segment_size; _object["input"] = input; _object["prev"] = prev; _object["reward_addr"] = reward_addr; _object["segments"] = segments; _object["timelord_key"] = timelord_key; _object["timelord_sig"] = timelord_sig; _object["content_hash"] = content_hash; return _object; } void ProofOfTime::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "input") { _entry.second.to(input); } else if(_entry.first == "num_iters") { _entry.second.to(num_iters); } else if(_entry.first == "prev") { _entry.second.to(prev); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "segment_size") { _entry.second.to(segment_size); } else if(_entry.first == "segments") { _entry.second.to(segments); } else if(_entry.first == "start") { _entry.second.to(start); } else if(_entry.first == "timelord_key") { _entry.second.to(timelord_key); } else if(_entry.first == "timelord_sig") { _entry.second.to(timelord_sig); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant ProofOfTime::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } if(_name == "hash") { return vnx::Variant(hash); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "start") { return vnx::Variant(start); } if(_name == "num_iters") { return vnx::Variant(num_iters); } if(_name == "segment_size") { return vnx::Variant(segment_size); } if(_name == "input") { return vnx::Variant(input); } if(_name == "prev") { return vnx::Variant(prev); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } if(_name == "segments") { return vnx::Variant(segments); } if(_name == "timelord_key") { return vnx::Variant(timelord_key); } if(_name == "timelord_sig") { return vnx::Variant(timelord_sig); } if(_name == "content_hash") { return vnx::Variant(content_hash); } return vnx::Variant(); } void ProofOfTime::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } else if(_name == "hash") { _value.to(hash); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "start") { _value.to(start); } else if(_name == "num_iters") { _value.to(num_iters); } else if(_name == "segment_size") { _value.to(segment_size); } else if(_name == "input") { _value.to(input); } else if(_name == "prev") { _value.to(prev); } else if(_name == "reward_addr") { _value.to(reward_addr); } else if(_name == "segments") { _value.to(segments); } else if(_name == "timelord_key") { _value.to(timelord_key); } else if(_name == "timelord_sig") { _value.to(timelord_sig); } else if(_name == "content_hash") { _value.to(content_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofOfTime& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofOfTime& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofOfTime::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofOfTime::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofOfTime"; type_code->type_hash = vnx::Hash64(0xa84a63942b8e5c6aull); type_code->code_hash = vnx::Hash64(0x969604802b05b4cdull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ProofOfTime); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(13); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "start"; field.code = {4}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "num_iters"; field.code = {4}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "segment_size"; field.code = {3}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "input"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "prev"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "reward_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "segments"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "timelord_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "timelord_sig"; field.code = {11, 64, 1}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr ProofOfTime::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.start, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.num_iters, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.segment_size, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 6: vnx::read(in, value.input, type_code, _field->code.data()); break; case 7: vnx::read(in, value.prev, type_code, _field->code.data()); break; case 8: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; case 9: vnx::read(in, value.segments, type_code, _field->code.data()); break; case 10: vnx::read(in, value.timelord_key, type_code, _field->code.data()); break; case 11: vnx::read(in, value.timelord_sig, type_code, _field->code.data()); break; case 12: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofOfTime& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofOfTime; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofOfTime>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(28); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.vdf_height); vnx::write_value(_buf + 8, value.start); vnx::write_value(_buf + 16, value.num_iters); vnx::write_value(_buf + 24, value.segment_size); vnx::write(out, value.hash, type_code, type_code->fields[1].code.data()); vnx::write(out, value.input, type_code, type_code->fields[6].code.data()); vnx::write(out, value.prev, type_code, type_code->fields[7].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[8].code.data()); vnx::write(out, value.segments, type_code, type_code->fields[9].code.data()); vnx::write(out, value.timelord_key, type_code, type_code->fields[10].code.data()); vnx::write(out, value.timelord_sig, type_code, type_code->fields[11].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[12].code.data()); } void read(std::istream& in, ::mmx::ProofOfTime& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofOfTime& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofOfTime& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofResponse.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofResponse::VNX_TYPE_HASH(0x816e898b36befae0ull); const vnx::Hash64 ProofResponse::VNX_CODE_HASH(0xa92d883d47260f22ull); vnx::Hash64 ProofResponse::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofResponse::get_type_name() const { return "mmx.ProofResponse"; } const vnx::TypeCode* ProofResponse::get_type_code() const { return mmx::vnx_native_type_code_ProofResponse; } std::shared_ptr ProofResponse::create() { return std::make_shared(); } std::shared_ptr ProofResponse::clone() const { return std::make_shared(*this); } void ProofResponse::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofResponse::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofResponse::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofResponse; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, proof); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, farmer_sig); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, content_hash); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, farmer_addr); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, harvester); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, lookup_time_ms); _visitor.type_end(*_type_code); } void ProofResponse::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofResponse\""; _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"proof\": "; vnx::write(_out, proof); _out << ", \"farmer_sig\": "; vnx::write(_out, farmer_sig); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << ", \"farmer_addr\": "; vnx::write(_out, farmer_addr); _out << ", \"harvester\": "; vnx::write(_out, harvester); _out << ", \"lookup_time_ms\": "; vnx::write(_out, lookup_time_ms); _out << "}"; } void ProofResponse::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofResponse::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofResponse"; _object["hash"] = hash; _object["vdf_height"] = vdf_height; _object["proof"] = proof; _object["farmer_sig"] = farmer_sig; _object["content_hash"] = content_hash; _object["farmer_addr"] = farmer_addr; _object["harvester"] = harvester; _object["lookup_time_ms"] = lookup_time_ms; return _object; } void ProofResponse::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "farmer_addr") { _entry.second.to(farmer_addr); } else if(_entry.first == "farmer_sig") { _entry.second.to(farmer_sig); } else if(_entry.first == "harvester") { _entry.second.to(harvester); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "lookup_time_ms") { _entry.second.to(lookup_time_ms); } else if(_entry.first == "proof") { _entry.second.to(proof); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant ProofResponse::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "proof") { return vnx::Variant(proof); } if(_name == "farmer_sig") { return vnx::Variant(farmer_sig); } if(_name == "content_hash") { return vnx::Variant(content_hash); } if(_name == "farmer_addr") { return vnx::Variant(farmer_addr); } if(_name == "harvester") { return vnx::Variant(harvester); } if(_name == "lookup_time_ms") { return vnx::Variant(lookup_time_ms); } return vnx::Variant(); } void ProofResponse::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } else if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "proof") { _value.to(proof); } else if(_name == "farmer_sig") { _value.to(farmer_sig); } else if(_name == "content_hash") { _value.to(content_hash); } else if(_name == "farmer_addr") { _value.to(farmer_addr); } else if(_name == "harvester") { _value.to(harvester); } else if(_name == "lookup_time_ms") { _value.to(lookup_time_ms); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofResponse& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofResponse& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofResponse::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofResponse::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofResponse"; type_code->type_hash = vnx::Hash64(0x816e898b36befae0ull); type_code->code_hash = vnx::Hash64(0xa92d883d47260f22ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ProofResponse); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "proof"; field.code = {16}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "farmer_sig"; field.code = {11, 64, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "farmer_addr"; field.code = {4}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "harvester"; field.code = {32}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "lookup_time_ms"; field.code = {8}; } type_code->build(); return type_code; } std::shared_ptr ProofResponse::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.lookup_time_ms, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 2: vnx::read(in, value.proof, type_code, _field->code.data()); break; case 3: vnx::read(in, value.farmer_sig, type_code, _field->code.data()); break; case 4: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; case 5: vnx::read(in, value.farmer_addr, type_code, _field->code.data()); break; case 6: vnx::read(in, value.harvester, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofResponse& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofResponse; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofResponse>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.lookup_time_ms); vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); vnx::write(out, value.proof, type_code, type_code->fields[2].code.data()); vnx::write(out, value.farmer_sig, type_code, type_code->fields[3].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[4].code.data()); vnx::write(out, value.farmer_addr, type_code, type_code->fields[5].code.data()); vnx::write(out, value.harvester, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::ProofResponse& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofResponse& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofResponse& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofServerAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { ProofServerAsyncClient::ProofServerAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } ProofServerAsyncClient::ProofServerAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t ProofServerAsyncClient::compute(const std::vector& X_values, const ::mmx::hash_t& id, const int32_t& ksize, const int32_t& xbits, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::ProofServer_compute::create(); _method->X_values = X_values; _method->id = id; _method->ksize = ksize; _method->xbits = xbits; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_compute[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t ProofServerAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t ProofServerAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_compute.find(_request_id); if(_iter != vnx_queue_compute.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_compute.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t ProofServerAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("ProofServerAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_compute.find(_request_id); if(_iter == vnx_queue_compute.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_compute.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } case 1: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 4: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 5: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 8: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 9: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("ProofServerAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("ProofServerAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("ProofServerAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/ProofServerBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofServerBase::VNX_TYPE_HASH(0xa531590f144986a6ull); const vnx::Hash64 ProofServerBase::VNX_CODE_HASH(0xa1d320beaac9efc5ull); ProofServerBase::ProofServerBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".num_threads", num_threads); } vnx::Hash64 ProofServerBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofServerBase::get_type_name() const { return "mmx.ProofServer"; } const vnx::TypeCode* ProofServerBase::get_type_code() const { return mmx::vnx_native_type_code_ProofServerBase; } void ProofServerBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofServerBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, num_threads); _visitor.type_end(*_type_code); } void ProofServerBase::write(std::ostream& _out) const { _out << "{"; _out << "\"num_threads\": "; vnx::write(_out, num_threads); _out << "}"; } void ProofServerBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofServerBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofServer"; _object["num_threads"] = num_threads; return _object; } void ProofServerBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "num_threads") { _entry.second.to(num_threads); } } } vnx::Variant ProofServerBase::get_field(const std::string& _name) const { if(_name == "num_threads") { return vnx::Variant(num_threads); } return vnx::Variant(); } void ProofServerBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "num_threads") { _value.to(num_threads); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofServerBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofServerBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofServerBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofServerBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofServer"; type_code->type_hash = vnx::Hash64(0xa531590f144986a6ull); type_code->code_hash = vnx::Hash64(0xa1d320beaac9efc5ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::ProofServerBase); type_code->methods.resize(10); type_code->methods[0] = ::mmx::ProofServer_compute::static_get_type_code(); type_code->methods[1] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[2] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[3] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[4] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[5] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[6] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[7] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[8] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[9] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "num_threads"; field.value = vnx::to_string(32); field.code = {3}; } type_code->build(); return type_code; } void ProofServerBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr ProofServerBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x1565fa29d1604750ull: { auto _args = std::static_pointer_cast(_method); compute_async(_args->X_values, _args->id, _args->ksize, _args->xbits, _request_id); return nullptr; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void ProofServerBase::compute_async_return(const vnx::request_id_t& _request_id, const std::vector<::mmx::table_entry_t>& _ret_0) const { auto _return_value = ::mmx::ProofServer_compute_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.num_threads, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofServerBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofServerBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofServerBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.num_threads); } void read(std::istream& in, ::mmx::ProofServerBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofServerBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofServerBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofServerClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { ProofServerClient::ProofServerClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } ProofServerClient::ProofServerClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } std::vector<::mmx::table_entry_t> ProofServerClient::compute(const std::vector& X_values, const ::mmx::hash_t& id, const int32_t& ksize, const int32_t& xbits) { auto _method = ::mmx::ProofServer_compute::create(); _method->X_values = X_values; _method->id = id; _method->ksize = ksize; _method->xbits = xbits; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } ::vnx::Object ProofServerClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } ::vnx::Variant ProofServerClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } void ProofServerClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void ProofServerClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void ProofServerClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void ProofServerClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode ProofServerClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } std::shared_ptr ProofServerClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } void ProofServerClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void ProofServerClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void ProofServerClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void ProofServerClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t ProofServerClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("ProofServerClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/ProofServer_compute.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofServer_compute::VNX_TYPE_HASH(0x1565fa29d1604750ull); const vnx::Hash64 ProofServer_compute::VNX_CODE_HASH(0x6b0c2ecdc3bfbf8full); vnx::Hash64 ProofServer_compute::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofServer_compute::get_type_name() const { return "mmx.ProofServer.compute"; } const vnx::TypeCode* ProofServer_compute::get_type_code() const { return mmx::vnx_native_type_code_ProofServer_compute; } std::shared_ptr ProofServer_compute::create() { return std::make_shared(); } std::shared_ptr ProofServer_compute::clone() const { return std::make_shared(*this); } void ProofServer_compute::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofServer_compute::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofServer_compute::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofServer_compute; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, X_values); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, ksize); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, xbits); _visitor.type_end(*_type_code); } void ProofServer_compute::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofServer.compute\""; _out << ", \"X_values\": "; vnx::write(_out, X_values); _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"ksize\": "; vnx::write(_out, ksize); _out << ", \"xbits\": "; vnx::write(_out, xbits); _out << "}"; } void ProofServer_compute::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofServer_compute::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofServer.compute"; _object["X_values"] = X_values; _object["id"] = id; _object["ksize"] = ksize; _object["xbits"] = xbits; return _object; } void ProofServer_compute::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "X_values") { _entry.second.to(X_values); } else if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "ksize") { _entry.second.to(ksize); } else if(_entry.first == "xbits") { _entry.second.to(xbits); } } } vnx::Variant ProofServer_compute::get_field(const std::string& _name) const { if(_name == "X_values") { return vnx::Variant(X_values); } if(_name == "id") { return vnx::Variant(id); } if(_name == "ksize") { return vnx::Variant(ksize); } if(_name == "xbits") { return vnx::Variant(xbits); } return vnx::Variant(); } void ProofServer_compute::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "X_values") { _value.to(X_values); } else if(_name == "id") { _value.to(id); } else if(_name == "ksize") { _value.to(ksize); } else if(_name == "xbits") { _value.to(xbits); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofServer_compute& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofServer_compute& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofServer_compute::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofServer_compute::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofServer.compute"; type_code->type_hash = vnx::Hash64(0x1565fa29d1604750ull); type_code->code_hash = vnx::Hash64(0x6b0c2ecdc3bfbf8full); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::ProofServer_compute); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->is_async = true; type_code->return_type = ::mmx::ProofServer_compute_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "X_values"; field.code = {12, 3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "ksize"; field.code = {7}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "xbits"; field.code = {7}; } type_code->permission = "mmx.permission_e.REMOTE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.ksize, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.xbits, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.X_values, type_code, _field->code.data()); break; case 1: vnx::read(in, value.id, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofServer_compute& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofServer_compute; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofServer_compute>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.ksize); vnx::write_value(_buf + 4, value.xbits); vnx::write(out, value.X_values, type_code, type_code->fields[0].code.data()); vnx::write(out, value.id, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::ProofServer_compute& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofServer_compute& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofServer_compute& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ProofServer_compute_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 ProofServer_compute_return::VNX_TYPE_HASH(0x5b42e049360ce028ull); const vnx::Hash64 ProofServer_compute_return::VNX_CODE_HASH(0x14cf73a9abf3b403ull); vnx::Hash64 ProofServer_compute_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string ProofServer_compute_return::get_type_name() const { return "mmx.ProofServer.compute.return"; } const vnx::TypeCode* ProofServer_compute_return::get_type_code() const { return mmx::vnx_native_type_code_ProofServer_compute_return; } std::shared_ptr ProofServer_compute_return::create() { return std::make_shared(); } std::shared_ptr ProofServer_compute_return::clone() const { return std::make_shared(*this); } void ProofServer_compute_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ProofServer_compute_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ProofServer_compute_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ProofServer_compute_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void ProofServer_compute_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ProofServer.compute.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void ProofServer_compute_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ProofServer_compute_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ProofServer.compute.return"; _object["_ret_0"] = _ret_0; return _object; } void ProofServer_compute_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant ProofServer_compute_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void ProofServer_compute_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const ProofServer_compute_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ProofServer_compute_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ProofServer_compute_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ProofServer_compute_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ProofServer.compute.return"; type_code->type_hash = vnx::Hash64(0x5b42e049360ce028ull); type_code->code_hash = vnx::Hash64(0x14cf73a9abf3b403ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::ProofServer_compute_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::table_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ProofServer_compute_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ProofServer_compute_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::ProofServer_compute_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::ProofServer_compute_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ProofServer_compute_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ProofServer_compute_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ReceiveNote.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 ReceiveNote::VNX_TYPE_HASH(0x30439468cf29fa4bull); const vnx::Hash64 ReceiveNote::VNX_CODE_HASH(0x4ae70215dd9d27cfull); vnx::Hash64 ReceiveNote::get_type_hash() const { return VNX_TYPE_HASH; } std::string ReceiveNote::get_type_name() const { return "mmx.ReceiveNote"; } const vnx::TypeCode* ReceiveNote::get_type_code() const { return mmx::vnx_native_type_code_ReceiveNote; } std::shared_ptr ReceiveNote::create() { return std::make_shared(); } std::shared_ptr ReceiveNote::clone() const { return std::make_shared(*this); } void ReceiveNote::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ReceiveNote::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ReceiveNote::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ReceiveNote; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, time); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, hash); _visitor.type_end(*_type_code); } void ReceiveNote::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ReceiveNote\""; _out << ", \"time\": "; vnx::write(_out, time); _out << ", \"hash\": "; vnx::write(_out, hash); _out << "}"; } void ReceiveNote::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ReceiveNote::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ReceiveNote"; _object["time"] = time; _object["hash"] = hash; return _object; } void ReceiveNote::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "time") { _entry.second.to(time); } } } vnx::Variant ReceiveNote::get_field(const std::string& _name) const { if(_name == "time") { return vnx::Variant(time); } if(_name == "hash") { return vnx::Variant(hash); } return vnx::Variant(); } void ReceiveNote::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "time") { _value.to(time); } else if(_name == "hash") { _value.to(hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const ReceiveNote& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ReceiveNote& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ReceiveNote::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ReceiveNote::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ReceiveNote"; type_code->type_hash = vnx::Hash64(0x30439468cf29fa4bull); type_code->code_hash = vnx::Hash64(0x4ae70215dd9d27cfull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ReceiveNote); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "time"; field.code = {8}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr ReceiveNote::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.time, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ReceiveNote& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ReceiveNote; out.write_type_code(type_code); vnx::write_class_header<::mmx::ReceiveNote>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.time); vnx::write(out, value.hash, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::ReceiveNote& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ReceiveNote& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ReceiveNote& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Request.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Request::VNX_TYPE_HASH(0x110ce6958669f66bull); const vnx::Hash64 Request::VNX_CODE_HASH(0xded028a5ef7d79e5ull); vnx::Hash64 Request::get_type_hash() const { return VNX_TYPE_HASH; } std::string Request::get_type_name() const { return "mmx.Request"; } const vnx::TypeCode* Request::get_type_code() const { return mmx::vnx_native_type_code_Request; } std::shared_ptr Request::create() { return std::make_shared(); } std::shared_ptr Request::clone() const { return std::make_shared(*this); } void Request::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Request::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Request::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Request; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, method); _visitor.type_end(*_type_code); } void Request::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Request\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"method\": "; vnx::write(_out, method); _out << "}"; } void Request::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Request::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Request"; _object["id"] = id; _object["method"] = method; return _object; } void Request::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "method") { _entry.second.to(method); } } } vnx::Variant Request::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "method") { return vnx::Variant(method); } return vnx::Variant(); } void Request::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "method") { _value.to(method); } } /// \private std::ostream& operator<<(std::ostream& _out, const Request& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Request& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Request::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Request::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Request"; type_code->type_hash = vnx::Hash64(0x110ce6958669f66bull); type_code->code_hash = vnx::Hash64(0xded028a5ef7d79e5ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Request); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "id"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "method"; field.code = {16}; } type_code->build(); return type_code; } std::shared_ptr Request::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.id, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.method, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Request& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Request; out.write_type_code(type_code); vnx::write_class_header<::mmx::Request>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.id); vnx::write(out, value.method, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Request& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Request& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Request& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Return::VNX_TYPE_HASH(0xb479dce669278664ull); const vnx::Hash64 Return::VNX_CODE_HASH(0xfa5ff041fedec1dcull); vnx::Hash64 Return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Return::get_type_name() const { return "mmx.Return"; } const vnx::TypeCode* Return::get_type_code() const { return mmx::vnx_native_type_code_Return; } std::shared_ptr Return::create() { return std::make_shared(); } std::shared_ptr Return::clone() const { return std::make_shared(*this); } void Return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, result); _visitor.type_end(*_type_code); } void Return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Return\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"result\": "; vnx::write(_out, result); _out << "}"; } void Return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Return"; _object["id"] = id; _object["result"] = result; return _object; } void Return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "result") { _entry.second.to(result); } } } vnx::Variant Return::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "result") { return vnx::Variant(result); } return vnx::Variant(); } void Return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "result") { _value.to(result); } } /// \private std::ostream& operator<<(std::ostream& _out, const Return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Return"; type_code->type_hash = vnx::Hash64(0xb479dce669278664ull); type_code->code_hash = vnx::Hash64(0xfa5ff041fedec1dcull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "id"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "result"; field.code = {16}; } type_code->build(); return type_code; } std::shared_ptr Return::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.id, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.result, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.id); vnx::write(out, value.result, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/RouterAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { RouterAsyncClient::RouterAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } RouterAsyncClient::RouterAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t RouterAsyncClient::discover(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_discover::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_discover[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_id(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_id::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_get_id[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_info(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_get_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::sign_msg(const ::mmx::hash_t& msg, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_sign_msg::create(); _method->msg = msg; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_sign_msg[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_peers(const uint32_t& max_count, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_peers::create(); _method->max_count = max_count; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_get_peers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_known_peers(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_known_peers::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_get_known_peers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_connected_peers(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_connected_peers::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_get_connected_peers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_peer_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_peer_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_get_peer_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::kick_peer(const std::string& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_kick_peer::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_kick_peer[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::get_blocks_at(const uint32_t& height, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_get_blocks_at::create(); _method->height = height; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_get_blocks_at[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::fetch_block(const ::mmx::hash_t& hash, const vnx::optional& address, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_fetch_block::create(); _method->hash = hash; _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_fetch_block[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::fetch_block_at(const uint32_t& height, const std::string& address, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Router_fetch_block_at::create(); _method->height = height; _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_fetch_block_at[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::http_request(std::shared_ptr request, const std::string& sub_path, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 12; vnx_queue_http_request[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 13; vnx_queue_http_request_chunk[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 14; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 15; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 16; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 17; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 18; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 19; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 20; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 21; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t RouterAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 22; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t RouterAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_discover.find(_request_id); if(_iter != vnx_queue_discover.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_discover.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_get_id.find(_request_id); if(_iter != vnx_queue_get_id.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_id.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_get_info.find(_request_id); if(_iter != vnx_queue_get_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_sign_msg.find(_request_id); if(_iter != vnx_queue_sign_msg.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_sign_msg.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_get_peers.find(_request_id); if(_iter != vnx_queue_get_peers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_peers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_get_known_peers.find(_request_id); if(_iter != vnx_queue_get_known_peers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_known_peers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_get_connected_peers.find(_request_id); if(_iter != vnx_queue_get_connected_peers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_connected_peers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_get_peer_info.find(_request_id); if(_iter != vnx_queue_get_peer_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_peer_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_kick_peer.find(_request_id); if(_iter != vnx_queue_kick_peer.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_kick_peer.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_get_blocks_at.find(_request_id); if(_iter != vnx_queue_get_blocks_at.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_blocks_at.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_fetch_block.find(_request_id); if(_iter != vnx_queue_fetch_block.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_fetch_block.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_fetch_block_at.find(_request_id); if(_iter != vnx_queue_fetch_block_at.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_fetch_block_at.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 12: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter != vnx_queue_http_request.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 13: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter != vnx_queue_http_request_chunk.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 14: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 15: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 16: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 17: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 18: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 19: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 20: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 21: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 22: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t RouterAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("RouterAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_discover.find(_request_id); if(_iter == vnx_queue_discover.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_discover.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 1: { const auto _iter = vnx_queue_get_id.find(_request_id); if(_iter == vnx_queue_get_id.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_id.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::hash_t>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_get_info.find(_request_id); if(_iter == vnx_queue_get_info.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::node_info_t>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_sign_msg.find(_request_id); if(_iter == vnx_queue_sign_msg.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_sign_msg.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_get_peers.find(_request_id); if(_iter == vnx_queue_get_peers.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_peers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_get_known_peers.find(_request_id); if(_iter == vnx_queue_get_known_peers.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_known_peers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_get_connected_peers.find(_request_id); if(_iter == vnx_queue_get_connected_peers.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_connected_peers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_get_peer_info.find(_request_id); if(_iter == vnx_queue_get_peer_info.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_peer_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_kick_peer.find(_request_id); if(_iter == vnx_queue_kick_peer.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_kick_peer.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 9: { const auto _iter = vnx_queue_get_blocks_at.find(_request_id); if(_iter == vnx_queue_get_blocks_at.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_blocks_at.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 10: { const auto _iter = vnx_queue_fetch_block.find(_request_id); if(_iter == vnx_queue_fetch_block.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_fetch_block.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 11: { const auto _iter = vnx_queue_fetch_block_at.find(_request_id); if(_iter == vnx_queue_fetch_block_at.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_fetch_block_at.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 12: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter == vnx_queue_http_request.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 13: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter == vnx_queue_http_request_chunk.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 14: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 15: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 16: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 17: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 18: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 19: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } case 20: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 21: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 22: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("RouterAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("RouterAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("RouterAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/RouterBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 RouterBase::VNX_TYPE_HASH(0x952c4ef2956f31c4ull); const vnx::Hash64 RouterBase::VNX_CODE_HASH(0x3e3476f20c4870c1ull); RouterBase::RouterBase(const std::string& _vnx_name) : MsgServer::MsgServer(_vnx_name) { vnx::read_config(vnx_name + ".input_verified_vdfs", input_verified_vdfs); vnx::read_config(vnx_name + ".input_verified_votes", input_verified_votes); vnx::read_config(vnx_name + ".input_verified_proof", input_verified_proof); vnx::read_config(vnx_name + ".input_verified_blocks", input_verified_blocks); vnx::read_config(vnx_name + ".input_verified_transactions", input_verified_transactions); vnx::read_config(vnx_name + ".input_transactions", input_transactions); vnx::read_config(vnx_name + ".input_vdf_points", input_vdf_points); vnx::read_config(vnx_name + ".input_vdfs", input_vdfs); vnx::read_config(vnx_name + ".output_vdfs", output_vdfs); vnx::read_config(vnx_name + ".output_votes", output_votes); vnx::read_config(vnx_name + ".output_proof", output_proof); vnx::read_config(vnx_name + ".output_blocks", output_blocks); vnx::read_config(vnx_name + ".output_transactions", output_transactions); vnx::read_config(vnx_name + ".output_vdf_points", output_vdf_points); vnx::read_config(vnx_name + ".max_queue_ms", max_queue_ms); vnx::read_config(vnx_name + ".send_interval_ms", send_interval_ms); vnx::read_config(vnx_name + ".query_interval_ms", query_interval_ms); vnx::read_config(vnx_name + ".update_interval_ms", update_interval_ms); vnx::read_config(vnx_name + ".connect_interval_ms", connect_interval_ms); vnx::read_config(vnx_name + ".fetch_timeout_ms", fetch_timeout_ms); vnx::read_config(vnx_name + ".relay_target_ms", relay_target_ms); vnx::read_config(vnx_name + ".sync_loss_delay", sync_loss_delay); vnx::read_config(vnx_name + ".discover_interval", discover_interval); vnx::read_config(vnx_name + ".disconnect_interval", disconnect_interval); vnx::read_config(vnx_name + ".peer_retry_interval", peer_retry_interval); vnx::read_config(vnx_name + ".num_peers_out", num_peers_out); vnx::read_config(vnx_name + ".min_sync_peers", min_sync_peers); vnx::read_config(vnx_name + ".max_peer_set", max_peer_set); vnx::read_config(vnx_name + ".max_sent_cache", max_sent_cache); vnx::read_config(vnx_name + ".max_hash_cache", max_hash_cache); vnx::read_config(vnx_name + ".max_vdf_segments", max_vdf_segments); vnx::read_config(vnx_name + ".node_version", node_version); vnx::read_config(vnx_name + ".mode", mode); vnx::read_config(vnx_name + ".do_relay", do_relay); vnx::read_config(vnx_name + ".open_port", open_port); vnx::read_config(vnx_name + ".max_tx_upload", max_tx_upload); vnx::read_config(vnx_name + ".max_pending_cost", max_pending_cost); vnx::read_config(vnx_name + ".priority_queue_size", priority_queue_size); vnx::read_config(vnx_name + ".seed_peers", seed_peers); vnx::read_config(vnx_name + ".fixed_peers", fixed_peers); vnx::read_config(vnx_name + ".block_peers", block_peers); vnx::read_config(vnx_name + ".master_nodes", master_nodes); vnx::read_config(vnx_name + ".storage_path", storage_path); vnx::read_config(vnx_name + ".node_server", node_server); } vnx::Hash64 RouterBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string RouterBase::get_type_name() const { return "mmx.Router"; } const vnx::TypeCode* RouterBase::get_type_code() const { return mmx::vnx_native_type_code_RouterBase; } void RouterBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_RouterBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, port); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, host); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, max_connections); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, listen_queue_size); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, stats_interval_ms); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, connection_timeout_ms); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, send_buffer_size); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, receive_buffer_size); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, tcp_no_delay); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, tcp_keepalive); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, show_warnings); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, compress_level); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, max_msg_size); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, max_write_queue); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, input_verified_vdfs); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, input_verified_votes); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, input_verified_proof); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, input_verified_blocks); _visitor.type_field(_type_code->fields[18], 18); vnx::accept(_visitor, input_verified_transactions); _visitor.type_field(_type_code->fields[19], 19); vnx::accept(_visitor, input_transactions); _visitor.type_field(_type_code->fields[20], 20); vnx::accept(_visitor, input_vdf_points); _visitor.type_field(_type_code->fields[21], 21); vnx::accept(_visitor, input_vdfs); _visitor.type_field(_type_code->fields[22], 22); vnx::accept(_visitor, output_vdfs); _visitor.type_field(_type_code->fields[23], 23); vnx::accept(_visitor, output_votes); _visitor.type_field(_type_code->fields[24], 24); vnx::accept(_visitor, output_proof); _visitor.type_field(_type_code->fields[25], 25); vnx::accept(_visitor, output_blocks); _visitor.type_field(_type_code->fields[26], 26); vnx::accept(_visitor, output_transactions); _visitor.type_field(_type_code->fields[27], 27); vnx::accept(_visitor, output_vdf_points); _visitor.type_field(_type_code->fields[28], 28); vnx::accept(_visitor, max_queue_ms); _visitor.type_field(_type_code->fields[29], 29); vnx::accept(_visitor, send_interval_ms); _visitor.type_field(_type_code->fields[30], 30); vnx::accept(_visitor, query_interval_ms); _visitor.type_field(_type_code->fields[31], 31); vnx::accept(_visitor, update_interval_ms); _visitor.type_field(_type_code->fields[32], 32); vnx::accept(_visitor, connect_interval_ms); _visitor.type_field(_type_code->fields[33], 33); vnx::accept(_visitor, fetch_timeout_ms); _visitor.type_field(_type_code->fields[34], 34); vnx::accept(_visitor, relay_target_ms); _visitor.type_field(_type_code->fields[35], 35); vnx::accept(_visitor, sync_loss_delay); _visitor.type_field(_type_code->fields[36], 36); vnx::accept(_visitor, discover_interval); _visitor.type_field(_type_code->fields[37], 37); vnx::accept(_visitor, disconnect_interval); _visitor.type_field(_type_code->fields[38], 38); vnx::accept(_visitor, peer_retry_interval); _visitor.type_field(_type_code->fields[39], 39); vnx::accept(_visitor, num_peers_out); _visitor.type_field(_type_code->fields[40], 40); vnx::accept(_visitor, min_sync_peers); _visitor.type_field(_type_code->fields[41], 41); vnx::accept(_visitor, max_peer_set); _visitor.type_field(_type_code->fields[42], 42); vnx::accept(_visitor, max_sent_cache); _visitor.type_field(_type_code->fields[43], 43); vnx::accept(_visitor, max_hash_cache); _visitor.type_field(_type_code->fields[44], 44); vnx::accept(_visitor, max_vdf_segments); _visitor.type_field(_type_code->fields[45], 45); vnx::accept(_visitor, node_version); _visitor.type_field(_type_code->fields[46], 46); vnx::accept(_visitor, mode); _visitor.type_field(_type_code->fields[47], 47); vnx::accept(_visitor, do_relay); _visitor.type_field(_type_code->fields[48], 48); vnx::accept(_visitor, open_port); _visitor.type_field(_type_code->fields[49], 49); vnx::accept(_visitor, max_tx_upload); _visitor.type_field(_type_code->fields[50], 50); vnx::accept(_visitor, max_pending_cost); _visitor.type_field(_type_code->fields[51], 51); vnx::accept(_visitor, priority_queue_size); _visitor.type_field(_type_code->fields[52], 52); vnx::accept(_visitor, seed_peers); _visitor.type_field(_type_code->fields[53], 53); vnx::accept(_visitor, fixed_peers); _visitor.type_field(_type_code->fields[54], 54); vnx::accept(_visitor, block_peers); _visitor.type_field(_type_code->fields[55], 55); vnx::accept(_visitor, master_nodes); _visitor.type_field(_type_code->fields[56], 56); vnx::accept(_visitor, storage_path); _visitor.type_field(_type_code->fields[57], 57); vnx::accept(_visitor, node_server); _visitor.type_end(*_type_code); } void RouterBase::write(std::ostream& _out) const { _out << "{"; _out << "\"port\": "; vnx::write(_out, port); _out << ", \"host\": "; vnx::write(_out, host); _out << ", \"max_connections\": "; vnx::write(_out, max_connections); _out << ", \"listen_queue_size\": "; vnx::write(_out, listen_queue_size); _out << ", \"stats_interval_ms\": "; vnx::write(_out, stats_interval_ms); _out << ", \"connection_timeout_ms\": "; vnx::write(_out, connection_timeout_ms); _out << ", \"send_buffer_size\": "; vnx::write(_out, send_buffer_size); _out << ", \"receive_buffer_size\": "; vnx::write(_out, receive_buffer_size); _out << ", \"tcp_no_delay\": "; vnx::write(_out, tcp_no_delay); _out << ", \"tcp_keepalive\": "; vnx::write(_out, tcp_keepalive); _out << ", \"show_warnings\": "; vnx::write(_out, show_warnings); _out << ", \"compress_level\": "; vnx::write(_out, compress_level); _out << ", \"max_msg_size\": "; vnx::write(_out, max_msg_size); _out << ", \"max_write_queue\": "; vnx::write(_out, max_write_queue); _out << ", \"input_verified_vdfs\": "; vnx::write(_out, input_verified_vdfs); _out << ", \"input_verified_votes\": "; vnx::write(_out, input_verified_votes); _out << ", \"input_verified_proof\": "; vnx::write(_out, input_verified_proof); _out << ", \"input_verified_blocks\": "; vnx::write(_out, input_verified_blocks); _out << ", \"input_verified_transactions\": "; vnx::write(_out, input_verified_transactions); _out << ", \"input_transactions\": "; vnx::write(_out, input_transactions); _out << ", \"input_vdf_points\": "; vnx::write(_out, input_vdf_points); _out << ", \"input_vdfs\": "; vnx::write(_out, input_vdfs); _out << ", \"output_vdfs\": "; vnx::write(_out, output_vdfs); _out << ", \"output_votes\": "; vnx::write(_out, output_votes); _out << ", \"output_proof\": "; vnx::write(_out, output_proof); _out << ", \"output_blocks\": "; vnx::write(_out, output_blocks); _out << ", \"output_transactions\": "; vnx::write(_out, output_transactions); _out << ", \"output_vdf_points\": "; vnx::write(_out, output_vdf_points); _out << ", \"max_queue_ms\": "; vnx::write(_out, max_queue_ms); _out << ", \"send_interval_ms\": "; vnx::write(_out, send_interval_ms); _out << ", \"query_interval_ms\": "; vnx::write(_out, query_interval_ms); _out << ", \"update_interval_ms\": "; vnx::write(_out, update_interval_ms); _out << ", \"connect_interval_ms\": "; vnx::write(_out, connect_interval_ms); _out << ", \"fetch_timeout_ms\": "; vnx::write(_out, fetch_timeout_ms); _out << ", \"relay_target_ms\": "; vnx::write(_out, relay_target_ms); _out << ", \"sync_loss_delay\": "; vnx::write(_out, sync_loss_delay); _out << ", \"discover_interval\": "; vnx::write(_out, discover_interval); _out << ", \"disconnect_interval\": "; vnx::write(_out, disconnect_interval); _out << ", \"peer_retry_interval\": "; vnx::write(_out, peer_retry_interval); _out << ", \"num_peers_out\": "; vnx::write(_out, num_peers_out); _out << ", \"min_sync_peers\": "; vnx::write(_out, min_sync_peers); _out << ", \"max_peer_set\": "; vnx::write(_out, max_peer_set); _out << ", \"max_sent_cache\": "; vnx::write(_out, max_sent_cache); _out << ", \"max_hash_cache\": "; vnx::write(_out, max_hash_cache); _out << ", \"max_vdf_segments\": "; vnx::write(_out, max_vdf_segments); _out << ", \"node_version\": "; vnx::write(_out, node_version); _out << ", \"mode\": "; vnx::write(_out, mode); _out << ", \"do_relay\": "; vnx::write(_out, do_relay); _out << ", \"open_port\": "; vnx::write(_out, open_port); _out << ", \"max_tx_upload\": "; vnx::write(_out, max_tx_upload); _out << ", \"max_pending_cost\": "; vnx::write(_out, max_pending_cost); _out << ", \"priority_queue_size\": "; vnx::write(_out, priority_queue_size); _out << ", \"seed_peers\": "; vnx::write(_out, seed_peers); _out << ", \"fixed_peers\": "; vnx::write(_out, fixed_peers); _out << ", \"block_peers\": "; vnx::write(_out, block_peers); _out << ", \"master_nodes\": "; vnx::write(_out, master_nodes); _out << ", \"storage_path\": "; vnx::write(_out, storage_path); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << "}"; } void RouterBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object RouterBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router"; _object["port"] = port; _object["host"] = host; _object["max_connections"] = max_connections; _object["listen_queue_size"] = listen_queue_size; _object["stats_interval_ms"] = stats_interval_ms; _object["connection_timeout_ms"] = connection_timeout_ms; _object["send_buffer_size"] = send_buffer_size; _object["receive_buffer_size"] = receive_buffer_size; _object["tcp_no_delay"] = tcp_no_delay; _object["tcp_keepalive"] = tcp_keepalive; _object["show_warnings"] = show_warnings; _object["compress_level"] = compress_level; _object["max_msg_size"] = max_msg_size; _object["max_write_queue"] = max_write_queue; _object["input_verified_vdfs"] = input_verified_vdfs; _object["input_verified_votes"] = input_verified_votes; _object["input_verified_proof"] = input_verified_proof; _object["input_verified_blocks"] = input_verified_blocks; _object["input_verified_transactions"] = input_verified_transactions; _object["input_transactions"] = input_transactions; _object["input_vdf_points"] = input_vdf_points; _object["input_vdfs"] = input_vdfs; _object["output_vdfs"] = output_vdfs; _object["output_votes"] = output_votes; _object["output_proof"] = output_proof; _object["output_blocks"] = output_blocks; _object["output_transactions"] = output_transactions; _object["output_vdf_points"] = output_vdf_points; _object["max_queue_ms"] = max_queue_ms; _object["send_interval_ms"] = send_interval_ms; _object["query_interval_ms"] = query_interval_ms; _object["update_interval_ms"] = update_interval_ms; _object["connect_interval_ms"] = connect_interval_ms; _object["fetch_timeout_ms"] = fetch_timeout_ms; _object["relay_target_ms"] = relay_target_ms; _object["sync_loss_delay"] = sync_loss_delay; _object["discover_interval"] = discover_interval; _object["disconnect_interval"] = disconnect_interval; _object["peer_retry_interval"] = peer_retry_interval; _object["num_peers_out"] = num_peers_out; _object["min_sync_peers"] = min_sync_peers; _object["max_peer_set"] = max_peer_set; _object["max_sent_cache"] = max_sent_cache; _object["max_hash_cache"] = max_hash_cache; _object["max_vdf_segments"] = max_vdf_segments; _object["node_version"] = node_version; _object["mode"] = mode; _object["do_relay"] = do_relay; _object["open_port"] = open_port; _object["max_tx_upload"] = max_tx_upload; _object["max_pending_cost"] = max_pending_cost; _object["priority_queue_size"] = priority_queue_size; _object["seed_peers"] = seed_peers; _object["fixed_peers"] = fixed_peers; _object["block_peers"] = block_peers; _object["master_nodes"] = master_nodes; _object["storage_path"] = storage_path; _object["node_server"] = node_server; return _object; } void RouterBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "block_peers") { _entry.second.to(block_peers); } else if(_entry.first == "compress_level") { _entry.second.to(compress_level); } else if(_entry.first == "connect_interval_ms") { _entry.second.to(connect_interval_ms); } else if(_entry.first == "connection_timeout_ms") { _entry.second.to(connection_timeout_ms); } else if(_entry.first == "disconnect_interval") { _entry.second.to(disconnect_interval); } else if(_entry.first == "discover_interval") { _entry.second.to(discover_interval); } else if(_entry.first == "do_relay") { _entry.second.to(do_relay); } else if(_entry.first == "fetch_timeout_ms") { _entry.second.to(fetch_timeout_ms); } else if(_entry.first == "fixed_peers") { _entry.second.to(fixed_peers); } else if(_entry.first == "host") { _entry.second.to(host); } else if(_entry.first == "input_transactions") { _entry.second.to(input_transactions); } else if(_entry.first == "input_vdf_points") { _entry.second.to(input_vdf_points); } else if(_entry.first == "input_vdfs") { _entry.second.to(input_vdfs); } else if(_entry.first == "input_verified_blocks") { _entry.second.to(input_verified_blocks); } else if(_entry.first == "input_verified_proof") { _entry.second.to(input_verified_proof); } else if(_entry.first == "input_verified_transactions") { _entry.second.to(input_verified_transactions); } else if(_entry.first == "input_verified_vdfs") { _entry.second.to(input_verified_vdfs); } else if(_entry.first == "input_verified_votes") { _entry.second.to(input_verified_votes); } else if(_entry.first == "listen_queue_size") { _entry.second.to(listen_queue_size); } else if(_entry.first == "master_nodes") { _entry.second.to(master_nodes); } else if(_entry.first == "max_connections") { _entry.second.to(max_connections); } else if(_entry.first == "max_hash_cache") { _entry.second.to(max_hash_cache); } else if(_entry.first == "max_msg_size") { _entry.second.to(max_msg_size); } else if(_entry.first == "max_peer_set") { _entry.second.to(max_peer_set); } else if(_entry.first == "max_pending_cost") { _entry.second.to(max_pending_cost); } else if(_entry.first == "max_queue_ms") { _entry.second.to(max_queue_ms); } else if(_entry.first == "max_sent_cache") { _entry.second.to(max_sent_cache); } else if(_entry.first == "max_tx_upload") { _entry.second.to(max_tx_upload); } else if(_entry.first == "max_vdf_segments") { _entry.second.to(max_vdf_segments); } else if(_entry.first == "max_write_queue") { _entry.second.to(max_write_queue); } else if(_entry.first == "min_sync_peers") { _entry.second.to(min_sync_peers); } else if(_entry.first == "mode") { _entry.second.to(mode); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "node_version") { _entry.second.to(node_version); } else if(_entry.first == "num_peers_out") { _entry.second.to(num_peers_out); } else if(_entry.first == "open_port") { _entry.second.to(open_port); } else if(_entry.first == "output_blocks") { _entry.second.to(output_blocks); } else if(_entry.first == "output_proof") { _entry.second.to(output_proof); } else if(_entry.first == "output_transactions") { _entry.second.to(output_transactions); } else if(_entry.first == "output_vdf_points") { _entry.second.to(output_vdf_points); } else if(_entry.first == "output_vdfs") { _entry.second.to(output_vdfs); } else if(_entry.first == "output_votes") { _entry.second.to(output_votes); } else if(_entry.first == "peer_retry_interval") { _entry.second.to(peer_retry_interval); } else if(_entry.first == "port") { _entry.second.to(port); } else if(_entry.first == "priority_queue_size") { _entry.second.to(priority_queue_size); } else if(_entry.first == "query_interval_ms") { _entry.second.to(query_interval_ms); } else if(_entry.first == "receive_buffer_size") { _entry.second.to(receive_buffer_size); } else if(_entry.first == "relay_target_ms") { _entry.second.to(relay_target_ms); } else if(_entry.first == "seed_peers") { _entry.second.to(seed_peers); } else if(_entry.first == "send_buffer_size") { _entry.second.to(send_buffer_size); } else if(_entry.first == "send_interval_ms") { _entry.second.to(send_interval_ms); } else if(_entry.first == "show_warnings") { _entry.second.to(show_warnings); } else if(_entry.first == "stats_interval_ms") { _entry.second.to(stats_interval_ms); } else if(_entry.first == "storage_path") { _entry.second.to(storage_path); } else if(_entry.first == "sync_loss_delay") { _entry.second.to(sync_loss_delay); } else if(_entry.first == "tcp_keepalive") { _entry.second.to(tcp_keepalive); } else if(_entry.first == "tcp_no_delay") { _entry.second.to(tcp_no_delay); } else if(_entry.first == "update_interval_ms") { _entry.second.to(update_interval_ms); } } } vnx::Variant RouterBase::get_field(const std::string& _name) const { if(_name == "port") { return vnx::Variant(port); } if(_name == "host") { return vnx::Variant(host); } if(_name == "max_connections") { return vnx::Variant(max_connections); } if(_name == "listen_queue_size") { return vnx::Variant(listen_queue_size); } if(_name == "stats_interval_ms") { return vnx::Variant(stats_interval_ms); } if(_name == "connection_timeout_ms") { return vnx::Variant(connection_timeout_ms); } if(_name == "send_buffer_size") { return vnx::Variant(send_buffer_size); } if(_name == "receive_buffer_size") { return vnx::Variant(receive_buffer_size); } if(_name == "tcp_no_delay") { return vnx::Variant(tcp_no_delay); } if(_name == "tcp_keepalive") { return vnx::Variant(tcp_keepalive); } if(_name == "show_warnings") { return vnx::Variant(show_warnings); } if(_name == "compress_level") { return vnx::Variant(compress_level); } if(_name == "max_msg_size") { return vnx::Variant(max_msg_size); } if(_name == "max_write_queue") { return vnx::Variant(max_write_queue); } if(_name == "input_verified_vdfs") { return vnx::Variant(input_verified_vdfs); } if(_name == "input_verified_votes") { return vnx::Variant(input_verified_votes); } if(_name == "input_verified_proof") { return vnx::Variant(input_verified_proof); } if(_name == "input_verified_blocks") { return vnx::Variant(input_verified_blocks); } if(_name == "input_verified_transactions") { return vnx::Variant(input_verified_transactions); } if(_name == "input_transactions") { return vnx::Variant(input_transactions); } if(_name == "input_vdf_points") { return vnx::Variant(input_vdf_points); } if(_name == "input_vdfs") { return vnx::Variant(input_vdfs); } if(_name == "output_vdfs") { return vnx::Variant(output_vdfs); } if(_name == "output_votes") { return vnx::Variant(output_votes); } if(_name == "output_proof") { return vnx::Variant(output_proof); } if(_name == "output_blocks") { return vnx::Variant(output_blocks); } if(_name == "output_transactions") { return vnx::Variant(output_transactions); } if(_name == "output_vdf_points") { return vnx::Variant(output_vdf_points); } if(_name == "max_queue_ms") { return vnx::Variant(max_queue_ms); } if(_name == "send_interval_ms") { return vnx::Variant(send_interval_ms); } if(_name == "query_interval_ms") { return vnx::Variant(query_interval_ms); } if(_name == "update_interval_ms") { return vnx::Variant(update_interval_ms); } if(_name == "connect_interval_ms") { return vnx::Variant(connect_interval_ms); } if(_name == "fetch_timeout_ms") { return vnx::Variant(fetch_timeout_ms); } if(_name == "relay_target_ms") { return vnx::Variant(relay_target_ms); } if(_name == "sync_loss_delay") { return vnx::Variant(sync_loss_delay); } if(_name == "discover_interval") { return vnx::Variant(discover_interval); } if(_name == "disconnect_interval") { return vnx::Variant(disconnect_interval); } if(_name == "peer_retry_interval") { return vnx::Variant(peer_retry_interval); } if(_name == "num_peers_out") { return vnx::Variant(num_peers_out); } if(_name == "min_sync_peers") { return vnx::Variant(min_sync_peers); } if(_name == "max_peer_set") { return vnx::Variant(max_peer_set); } if(_name == "max_sent_cache") { return vnx::Variant(max_sent_cache); } if(_name == "max_hash_cache") { return vnx::Variant(max_hash_cache); } if(_name == "max_vdf_segments") { return vnx::Variant(max_vdf_segments); } if(_name == "node_version") { return vnx::Variant(node_version); } if(_name == "mode") { return vnx::Variant(mode); } if(_name == "do_relay") { return vnx::Variant(do_relay); } if(_name == "open_port") { return vnx::Variant(open_port); } if(_name == "max_tx_upload") { return vnx::Variant(max_tx_upload); } if(_name == "max_pending_cost") { return vnx::Variant(max_pending_cost); } if(_name == "priority_queue_size") { return vnx::Variant(priority_queue_size); } if(_name == "seed_peers") { return vnx::Variant(seed_peers); } if(_name == "fixed_peers") { return vnx::Variant(fixed_peers); } if(_name == "block_peers") { return vnx::Variant(block_peers); } if(_name == "master_nodes") { return vnx::Variant(master_nodes); } if(_name == "storage_path") { return vnx::Variant(storage_path); } if(_name == "node_server") { return vnx::Variant(node_server); } return vnx::Variant(); } void RouterBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "port") { _value.to(port); } else if(_name == "host") { _value.to(host); } else if(_name == "max_connections") { _value.to(max_connections); } else if(_name == "listen_queue_size") { _value.to(listen_queue_size); } else if(_name == "stats_interval_ms") { _value.to(stats_interval_ms); } else if(_name == "connection_timeout_ms") { _value.to(connection_timeout_ms); } else if(_name == "send_buffer_size") { _value.to(send_buffer_size); } else if(_name == "receive_buffer_size") { _value.to(receive_buffer_size); } else if(_name == "tcp_no_delay") { _value.to(tcp_no_delay); } else if(_name == "tcp_keepalive") { _value.to(tcp_keepalive); } else if(_name == "show_warnings") { _value.to(show_warnings); } else if(_name == "compress_level") { _value.to(compress_level); } else if(_name == "max_msg_size") { _value.to(max_msg_size); } else if(_name == "max_write_queue") { _value.to(max_write_queue); } else if(_name == "input_verified_vdfs") { _value.to(input_verified_vdfs); } else if(_name == "input_verified_votes") { _value.to(input_verified_votes); } else if(_name == "input_verified_proof") { _value.to(input_verified_proof); } else if(_name == "input_verified_blocks") { _value.to(input_verified_blocks); } else if(_name == "input_verified_transactions") { _value.to(input_verified_transactions); } else if(_name == "input_transactions") { _value.to(input_transactions); } else if(_name == "input_vdf_points") { _value.to(input_vdf_points); } else if(_name == "input_vdfs") { _value.to(input_vdfs); } else if(_name == "output_vdfs") { _value.to(output_vdfs); } else if(_name == "output_votes") { _value.to(output_votes); } else if(_name == "output_proof") { _value.to(output_proof); } else if(_name == "output_blocks") { _value.to(output_blocks); } else if(_name == "output_transactions") { _value.to(output_transactions); } else if(_name == "output_vdf_points") { _value.to(output_vdf_points); } else if(_name == "max_queue_ms") { _value.to(max_queue_ms); } else if(_name == "send_interval_ms") { _value.to(send_interval_ms); } else if(_name == "query_interval_ms") { _value.to(query_interval_ms); } else if(_name == "update_interval_ms") { _value.to(update_interval_ms); } else if(_name == "connect_interval_ms") { _value.to(connect_interval_ms); } else if(_name == "fetch_timeout_ms") { _value.to(fetch_timeout_ms); } else if(_name == "relay_target_ms") { _value.to(relay_target_ms); } else if(_name == "sync_loss_delay") { _value.to(sync_loss_delay); } else if(_name == "discover_interval") { _value.to(discover_interval); } else if(_name == "disconnect_interval") { _value.to(disconnect_interval); } else if(_name == "peer_retry_interval") { _value.to(peer_retry_interval); } else if(_name == "num_peers_out") { _value.to(num_peers_out); } else if(_name == "min_sync_peers") { _value.to(min_sync_peers); } else if(_name == "max_peer_set") { _value.to(max_peer_set); } else if(_name == "max_sent_cache") { _value.to(max_sent_cache); } else if(_name == "max_hash_cache") { _value.to(max_hash_cache); } else if(_name == "max_vdf_segments") { _value.to(max_vdf_segments); } else if(_name == "node_version") { _value.to(node_version); } else if(_name == "mode") { _value.to(mode); } else if(_name == "do_relay") { _value.to(do_relay); } else if(_name == "open_port") { _value.to(open_port); } else if(_name == "max_tx_upload") { _value.to(max_tx_upload); } else if(_name == "max_pending_cost") { _value.to(max_pending_cost); } else if(_name == "priority_queue_size") { _value.to(priority_queue_size); } else if(_name == "seed_peers") { _value.to(seed_peers); } else if(_name == "fixed_peers") { _value.to(fixed_peers); } else if(_name == "block_peers") { _value.to(block_peers); } else if(_name == "master_nodes") { _value.to(master_nodes); } else if(_name == "storage_path") { _value.to(storage_path); } else if(_name == "node_server") { _value.to(node_server); } } /// \private std::ostream& operator<<(std::ostream& _out, const RouterBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, RouterBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* RouterBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr RouterBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router"; type_code->type_hash = vnx::Hash64(0x952c4ef2956f31c4ull); type_code->code_hash = vnx::Hash64(0x3e3476f20c4870c1ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::RouterBase); type_code->parents.resize(2); type_code->parents[0] = ::vnx::addons::MsgServerBase::static_get_type_code(); type_code->parents[1] = ::vnx::addons::TcpServerBase::static_get_type_code(); type_code->depends.resize(1); type_code->depends[0] = ::mmx::node_type_e::static_get_type_code(); type_code->methods.resize(23); type_code->methods[0] = ::mmx::Router_discover::static_get_type_code(); type_code->methods[1] = ::mmx::Router_fetch_block::static_get_type_code(); type_code->methods[2] = ::mmx::Router_fetch_block_at::static_get_type_code(); type_code->methods[3] = ::mmx::Router_get_blocks_at::static_get_type_code(); type_code->methods[4] = ::mmx::Router_get_connected_peers::static_get_type_code(); type_code->methods[5] = ::mmx::Router_get_id::static_get_type_code(); type_code->methods[6] = ::mmx::Router_get_info::static_get_type_code(); type_code->methods[7] = ::mmx::Router_get_known_peers::static_get_type_code(); type_code->methods[8] = ::mmx::Router_get_peer_info::static_get_type_code(); type_code->methods[9] = ::mmx::Router_get_peers::static_get_type_code(); type_code->methods[10] = ::mmx::Router_kick_peer::static_get_type_code(); type_code->methods[11] = ::mmx::Router_sign_msg::static_get_type_code(); type_code->methods[12] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[13] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[14] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[15] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[16] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[17] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[18] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[19] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[20] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->methods[21] = ::vnx::addons::HttpComponent_http_request::static_get_type_code(); type_code->methods[22] = ::vnx::addons::HttpComponent_http_request_chunk::static_get_type_code(); type_code->fields.resize(58); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "port"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "host"; field.value = vnx::to_string("localhost"); field.code = {32}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "max_connections"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "listen_queue_size"; field.value = vnx::to_string(100); field.code = {7}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "stats_interval_ms"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "connection_timeout_ms"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "send_buffer_size"; field.code = {7}; } { auto& field = type_code->fields[7]; field.data_size = 4; field.name = "receive_buffer_size"; field.code = {7}; } { auto& field = type_code->fields[8]; field.data_size = 1; field.name = "tcp_no_delay"; field.value = vnx::to_string(false); field.code = {31}; } { auto& field = type_code->fields[9]; field.data_size = 1; field.name = "tcp_keepalive"; field.value = vnx::to_string(true); field.code = {31}; } { auto& field = type_code->fields[10]; field.data_size = 1; field.name = "show_warnings"; field.value = vnx::to_string(false); field.code = {31}; } { auto& field = type_code->fields[11]; field.data_size = 4; field.name = "compress_level"; field.value = vnx::to_string(0); field.code = {7}; } { auto& field = type_code->fields[12]; field.data_size = 4; field.name = "max_msg_size"; field.value = vnx::to_string(67108864); field.code = {3}; } { auto& field = type_code->fields[13]; field.data_size = 8; field.name = "max_write_queue"; field.value = vnx::to_string(-1); field.code = {4}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "input_verified_vdfs"; field.value = vnx::to_string("node.verified_vdfs"); field.code = {12, 5}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "input_verified_votes"; field.value = vnx::to_string("node.verified_votes"); field.code = {12, 5}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "input_verified_proof"; field.value = vnx::to_string("node.verified_proof"); field.code = {12, 5}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "input_verified_blocks"; field.value = vnx::to_string("node.verified_blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[18]; field.is_extended = true; field.name = "input_verified_transactions"; field.value = vnx::to_string("node.verified_transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[19]; field.is_extended = true; field.name = "input_transactions"; field.value = vnx::to_string("node.transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[20]; field.is_extended = true; field.name = "input_vdf_points"; field.value = vnx::to_string("node.vdf_points"); field.code = {12, 5}; } { auto& field = type_code->fields[21]; field.is_extended = true; field.name = "input_vdfs"; field.value = vnx::to_string("timelord.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[22]; field.is_extended = true; field.name = "output_vdfs"; field.value = vnx::to_string("network.vdfs"); field.code = {12, 5}; } { auto& field = type_code->fields[23]; field.is_extended = true; field.name = "output_votes"; field.value = vnx::to_string("network.votes"); field.code = {12, 5}; } { auto& field = type_code->fields[24]; field.is_extended = true; field.name = "output_proof"; field.value = vnx::to_string("network.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[25]; field.is_extended = true; field.name = "output_blocks"; field.value = vnx::to_string("network.blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[26]; field.is_extended = true; field.name = "output_transactions"; field.value = vnx::to_string("network.transactions"); field.code = {12, 5}; } { auto& field = type_code->fields[27]; field.is_extended = true; field.name = "output_vdf_points"; field.value = vnx::to_string("network.vdf_points"); field.code = {12, 5}; } { auto& field = type_code->fields[28]; field.data_size = 4; field.name = "max_queue_ms"; field.value = vnx::to_string(1000); field.code = {7}; } { auto& field = type_code->fields[29]; field.data_size = 4; field.name = "send_interval_ms"; field.value = vnx::to_string(20); field.code = {7}; } { auto& field = type_code->fields[30]; field.data_size = 4; field.name = "query_interval_ms"; field.value = vnx::to_string(10000); field.code = {7}; } { auto& field = type_code->fields[31]; field.data_size = 4; field.name = "update_interval_ms"; field.value = vnx::to_string(1000); field.code = {7}; } { auto& field = type_code->fields[32]; field.data_size = 4; field.name = "connect_interval_ms"; field.value = vnx::to_string(10000); field.code = {7}; } { auto& field = type_code->fields[33]; field.data_size = 4; field.name = "fetch_timeout_ms"; field.value = vnx::to_string(10000); field.code = {7}; } { auto& field = type_code->fields[34]; field.data_size = 4; field.name = "relay_target_ms"; field.value = vnx::to_string(5000); field.code = {7}; } { auto& field = type_code->fields[35]; field.data_size = 4; field.name = "sync_loss_delay"; field.value = vnx::to_string(60); field.code = {3}; } { auto& field = type_code->fields[36]; field.data_size = 4; field.name = "discover_interval"; field.value = vnx::to_string(60); field.code = {3}; } { auto& field = type_code->fields[37]; field.data_size = 4; field.name = "disconnect_interval"; field.value = vnx::to_string(0); field.code = {3}; } { auto& field = type_code->fields[38]; field.data_size = 4; field.name = "peer_retry_interval"; field.value = vnx::to_string(360); field.code = {3}; } { auto& field = type_code->fields[39]; field.data_size = 4; field.name = "num_peers_out"; field.value = vnx::to_string(8); field.code = {3}; } { auto& field = type_code->fields[40]; field.data_size = 4; field.name = "min_sync_peers"; field.value = vnx::to_string(2); field.code = {3}; } { auto& field = type_code->fields[41]; field.data_size = 4; field.name = "max_peer_set"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[42]; field.data_size = 4; field.name = "max_sent_cache"; field.value = vnx::to_string(20000); field.code = {3}; } { auto& field = type_code->fields[43]; field.data_size = 4; field.name = "max_hash_cache"; field.value = vnx::to_string(100000); field.code = {3}; } { auto& field = type_code->fields[44]; field.data_size = 4; field.name = "max_vdf_segments"; field.value = vnx::to_string(65536); field.code = {3}; } { auto& field = type_code->fields[45]; field.data_size = 4; field.name = "node_version"; field.value = vnx::to_string(103); field.code = {3}; } { auto& field = type_code->fields[46]; field.is_extended = true; field.name = "mode"; field.value = vnx::to_string("FULL_NODE"); field.code = {19, 0}; } { auto& field = type_code->fields[47]; field.data_size = 1; field.name = "do_relay"; field.value = vnx::to_string(true); field.code = {31}; } { auto& field = type_code->fields[48]; field.data_size = 1; field.name = "open_port"; field.value = vnx::to_string(false); field.code = {31}; } { auto& field = type_code->fields[49]; field.data_size = 8; field.name = "max_tx_upload"; field.value = vnx::to_string(2); field.code = {10}; } { auto& field = type_code->fields[50]; field.data_size = 8; field.name = "max_pending_cost"; field.value = vnx::to_string(0.2); field.code = {10}; } { auto& field = type_code->fields[51]; field.data_size = 4; field.name = "priority_queue_size"; field.value = vnx::to_string(262144); field.code = {3}; } { auto& field = type_code->fields[52]; field.is_extended = true; field.name = "seed_peers"; field.code = {12, 32}; } { auto& field = type_code->fields[53]; field.is_extended = true; field.name = "fixed_peers"; field.code = {12, 32}; } { auto& field = type_code->fields[54]; field.is_extended = true; field.name = "block_peers"; field.code = {12, 32}; } { auto& field = type_code->fields[55]; field.is_extended = true; field.name = "master_nodes"; field.code = {12, 32}; } { auto& field = type_code->fields[56]; field.is_extended = true; field.name = "storage_path"; field.code = {32}; } { auto& field = type_code->fields[57]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } type_code->build(); return type_code; } void RouterBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0x94965d816d328467ull: handle(std::static_pointer_cast(_value)); return; case 0xa84a63942b8e5c6aull: handle(std::static_pointer_cast(_value)); return; case 0x816e898b36befae0ull: handle(std::static_pointer_cast(_value)); return; case 0xce0462acdceaa5bcull: handle(std::static_pointer_cast(_value)); return; case 0x1671551501b6c956ull: handle(std::static_pointer_cast(_value)); return; case 0xc056a2ff24cdee25ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr RouterBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0xeda51767d96e246cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_discover_return::create(); discover(); return _return_value; } case 0x7c2f762681e7cc51ull: { auto _args = std::static_pointer_cast(_method); fetch_block_async(_args->hash, _args->address, _request_id); return nullptr; } case 0xa4deba522ed6f8adull: { auto _args = std::static_pointer_cast(_method); fetch_block_at_async(_args->height, _args->address, _request_id); return nullptr; } case 0x1eb0c0d7eae3c33aull: { auto _args = std::static_pointer_cast(_method); get_blocks_at_async(_args->height, _request_id); return nullptr; } case 0x8682feb65fbb77feull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_connected_peers_return::create(); _return_value->_ret_0 = get_connected_peers(); return _return_value; } case 0xb9f7168b5ae94cd9ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_id_return::create(); _return_value->_ret_0 = get_id(); return _return_value; } case 0x364ea887c149a265ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_info_return::create(); _return_value->_ret_0 = get_info(); return _return_value; } case 0xaa408b6bf4e8168dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_known_peers_return::create(); _return_value->_ret_0 = get_known_peers(); return _return_value; } case 0x520a467ef9324cb3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_peer_info_return::create(); _return_value->_ret_0 = get_peer_info(); return _return_value; } case 0x66d68bd91b462049ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_get_peers_return::create(); _return_value->_ret_0 = get_peers(_args->max_count); return _return_value; } case 0x359a21379021beedull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_kick_peer_return::create(); kick_peer(_args->address); return _return_value; } case 0x88ede2fbb99ab63eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Router_sign_msg_return::create(); _return_value->_ret_0 = sign_msg(_args->msg); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } case 0xe0b6c38f619bad92ull: { auto _args = std::static_pointer_cast(_method); http_request_async(_args->request, _args->sub_path, _request_id); return nullptr; } case 0x97e79d08440406d5ull: { auto _args = std::static_pointer_cast(_method); http_request_chunk_async(_args->request, _args->sub_path, _args->offset, _args->max_bytes, _request_id); return nullptr; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void RouterBase::get_blocks_at_async_return(const vnx::request_id_t& _request_id, const std::vector>& _ret_0) const { auto _return_value = ::mmx::Router_get_blocks_at_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void RouterBase::fetch_block_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::mmx::Router_fetch_block_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void RouterBase::fetch_block_at_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::mmx::Router_fetch_block_at_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void RouterBase::http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void RouterBase::http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_chunk_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.port, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.max_connections, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.listen_queue_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.stats_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.connection_timeout_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.send_buffer_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.receive_buffer_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.tcp_no_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.tcp_keepalive, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.show_warnings, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.compress_level, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.max_msg_size, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.max_write_queue, _field->code.data()); } if(const auto* const _field = type_code->field_map[28]) { vnx::read_value(_buf + _field->offset, value.max_queue_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[29]) { vnx::read_value(_buf + _field->offset, value.send_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[30]) { vnx::read_value(_buf + _field->offset, value.query_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[31]) { vnx::read_value(_buf + _field->offset, value.update_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[32]) { vnx::read_value(_buf + _field->offset, value.connect_interval_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[33]) { vnx::read_value(_buf + _field->offset, value.fetch_timeout_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[34]) { vnx::read_value(_buf + _field->offset, value.relay_target_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[35]) { vnx::read_value(_buf + _field->offset, value.sync_loss_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[36]) { vnx::read_value(_buf + _field->offset, value.discover_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[37]) { vnx::read_value(_buf + _field->offset, value.disconnect_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[38]) { vnx::read_value(_buf + _field->offset, value.peer_retry_interval, _field->code.data()); } if(const auto* const _field = type_code->field_map[39]) { vnx::read_value(_buf + _field->offset, value.num_peers_out, _field->code.data()); } if(const auto* const _field = type_code->field_map[40]) { vnx::read_value(_buf + _field->offset, value.min_sync_peers, _field->code.data()); } if(const auto* const _field = type_code->field_map[41]) { vnx::read_value(_buf + _field->offset, value.max_peer_set, _field->code.data()); } if(const auto* const _field = type_code->field_map[42]) { vnx::read_value(_buf + _field->offset, value.max_sent_cache, _field->code.data()); } if(const auto* const _field = type_code->field_map[43]) { vnx::read_value(_buf + _field->offset, value.max_hash_cache, _field->code.data()); } if(const auto* const _field = type_code->field_map[44]) { vnx::read_value(_buf + _field->offset, value.max_vdf_segments, _field->code.data()); } if(const auto* const _field = type_code->field_map[45]) { vnx::read_value(_buf + _field->offset, value.node_version, _field->code.data()); } if(const auto* const _field = type_code->field_map[47]) { vnx::read_value(_buf + _field->offset, value.do_relay, _field->code.data()); } if(const auto* const _field = type_code->field_map[48]) { vnx::read_value(_buf + _field->offset, value.open_port, _field->code.data()); } if(const auto* const _field = type_code->field_map[49]) { vnx::read_value(_buf + _field->offset, value.max_tx_upload, _field->code.data()); } if(const auto* const _field = type_code->field_map[50]) { vnx::read_value(_buf + _field->offset, value.max_pending_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[51]) { vnx::read_value(_buf + _field->offset, value.priority_queue_size, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.host, type_code, _field->code.data()); break; case 14: vnx::read(in, value.input_verified_vdfs, type_code, _field->code.data()); break; case 15: vnx::read(in, value.input_verified_votes, type_code, _field->code.data()); break; case 16: vnx::read(in, value.input_verified_proof, type_code, _field->code.data()); break; case 17: vnx::read(in, value.input_verified_blocks, type_code, _field->code.data()); break; case 18: vnx::read(in, value.input_verified_transactions, type_code, _field->code.data()); break; case 19: vnx::read(in, value.input_transactions, type_code, _field->code.data()); break; case 20: vnx::read(in, value.input_vdf_points, type_code, _field->code.data()); break; case 21: vnx::read(in, value.input_vdfs, type_code, _field->code.data()); break; case 22: vnx::read(in, value.output_vdfs, type_code, _field->code.data()); break; case 23: vnx::read(in, value.output_votes, type_code, _field->code.data()); break; case 24: vnx::read(in, value.output_proof, type_code, _field->code.data()); break; case 25: vnx::read(in, value.output_blocks, type_code, _field->code.data()); break; case 26: vnx::read(in, value.output_transactions, type_code, _field->code.data()); break; case 27: vnx::read(in, value.output_vdf_points, type_code, _field->code.data()); break; case 46: vnx::read(in, value.mode, type_code, _field->code.data()); break; case 52: vnx::read(in, value.seed_peers, type_code, _field->code.data()); break; case 53: vnx::read(in, value.fixed_peers, type_code, _field->code.data()); break; case 54: vnx::read(in, value.block_peers, type_code, _field->code.data()); break; case 55: vnx::read(in, value.master_nodes, type_code, _field->code.data()); break; case 56: vnx::read(in, value.storage_path, type_code, _field->code.data()); break; case 57: vnx::read(in, value.node_server, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::RouterBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_RouterBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::RouterBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(141); vnx::write_value(_buf + 0, value.port); vnx::write_value(_buf + 4, value.max_connections); vnx::write_value(_buf + 8, value.listen_queue_size); vnx::write_value(_buf + 12, value.stats_interval_ms); vnx::write_value(_buf + 16, value.connection_timeout_ms); vnx::write_value(_buf + 20, value.send_buffer_size); vnx::write_value(_buf + 24, value.receive_buffer_size); vnx::write_value(_buf + 28, value.tcp_no_delay); vnx::write_value(_buf + 29, value.tcp_keepalive); vnx::write_value(_buf + 30, value.show_warnings); vnx::write_value(_buf + 31, value.compress_level); vnx::write_value(_buf + 35, value.max_msg_size); vnx::write_value(_buf + 39, value.max_write_queue); vnx::write_value(_buf + 47, value.max_queue_ms); vnx::write_value(_buf + 51, value.send_interval_ms); vnx::write_value(_buf + 55, value.query_interval_ms); vnx::write_value(_buf + 59, value.update_interval_ms); vnx::write_value(_buf + 63, value.connect_interval_ms); vnx::write_value(_buf + 67, value.fetch_timeout_ms); vnx::write_value(_buf + 71, value.relay_target_ms); vnx::write_value(_buf + 75, value.sync_loss_delay); vnx::write_value(_buf + 79, value.discover_interval); vnx::write_value(_buf + 83, value.disconnect_interval); vnx::write_value(_buf + 87, value.peer_retry_interval); vnx::write_value(_buf + 91, value.num_peers_out); vnx::write_value(_buf + 95, value.min_sync_peers); vnx::write_value(_buf + 99, value.max_peer_set); vnx::write_value(_buf + 103, value.max_sent_cache); vnx::write_value(_buf + 107, value.max_hash_cache); vnx::write_value(_buf + 111, value.max_vdf_segments); vnx::write_value(_buf + 115, value.node_version); vnx::write_value(_buf + 119, value.do_relay); vnx::write_value(_buf + 120, value.open_port); vnx::write_value(_buf + 121, value.max_tx_upload); vnx::write_value(_buf + 129, value.max_pending_cost); vnx::write_value(_buf + 137, value.priority_queue_size); vnx::write(out, value.host, type_code, type_code->fields[1].code.data()); vnx::write(out, value.input_verified_vdfs, type_code, type_code->fields[14].code.data()); vnx::write(out, value.input_verified_votes, type_code, type_code->fields[15].code.data()); vnx::write(out, value.input_verified_proof, type_code, type_code->fields[16].code.data()); vnx::write(out, value.input_verified_blocks, type_code, type_code->fields[17].code.data()); vnx::write(out, value.input_verified_transactions, type_code, type_code->fields[18].code.data()); vnx::write(out, value.input_transactions, type_code, type_code->fields[19].code.data()); vnx::write(out, value.input_vdf_points, type_code, type_code->fields[20].code.data()); vnx::write(out, value.input_vdfs, type_code, type_code->fields[21].code.data()); vnx::write(out, value.output_vdfs, type_code, type_code->fields[22].code.data()); vnx::write(out, value.output_votes, type_code, type_code->fields[23].code.data()); vnx::write(out, value.output_proof, type_code, type_code->fields[24].code.data()); vnx::write(out, value.output_blocks, type_code, type_code->fields[25].code.data()); vnx::write(out, value.output_transactions, type_code, type_code->fields[26].code.data()); vnx::write(out, value.output_vdf_points, type_code, type_code->fields[27].code.data()); vnx::write(out, value.mode, type_code, type_code->fields[46].code.data()); vnx::write(out, value.seed_peers, type_code, type_code->fields[52].code.data()); vnx::write(out, value.fixed_peers, type_code, type_code->fields[53].code.data()); vnx::write(out, value.block_peers, type_code, type_code->fields[54].code.data()); vnx::write(out, value.master_nodes, type_code, type_code->fields[55].code.data()); vnx::write(out, value.storage_path, type_code, type_code->fields[56].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[57].code.data()); } void read(std::istream& in, ::mmx::RouterBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::RouterBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::RouterBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/RouterClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { RouterClient::RouterClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } RouterClient::RouterClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } void RouterClient::discover() { auto _method = ::mmx::Router_discover::create(); vnx_request(_method, false); } void RouterClient::discover_async() { auto _method = ::mmx::Router_discover::create(); vnx_request(_method, true); } ::mmx::hash_t RouterClient::get_id() { auto _method = ::mmx::Router_get_id::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::hash_t>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } ::mmx::node_info_t RouterClient::get_info() { auto _method = ::mmx::Router_get_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::node_info_t>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::pair<::mmx::pubkey_t, ::mmx::signature_t> RouterClient::sign_msg(const ::mmx::hash_t& msg) { auto _method = ::mmx::Router_sign_msg::create(); _method->msg = msg; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::vector RouterClient::get_peers(const uint32_t& max_count) { auto _method = ::mmx::Router_get_peers::create(); _method->max_count = max_count; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::vector RouterClient::get_known_peers() { auto _method = ::mmx::Router_get_known_peers::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::vector RouterClient::get_connected_peers() { auto _method = ::mmx::Router_get_connected_peers::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::get_peer_info() { auto _method = ::mmx::Router_get_peer_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } void RouterClient::kick_peer(const std::string& address) { auto _method = ::mmx::Router_kick_peer::create(); _method->address = address; vnx_request(_method, false); } void RouterClient::kick_peer_async(const std::string& address) { auto _method = ::mmx::Router_kick_peer::create(); _method->address = address; vnx_request(_method, true); } std::vector> RouterClient::get_blocks_at(const uint32_t& height) { auto _method = ::mmx::Router_get_blocks_at::create(); _method->height = height; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::fetch_block(const ::mmx::hash_t& hash, const vnx::optional& address) { auto _method = ::mmx::Router_fetch_block::create(); _method->hash = hash; _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::fetch_block_at(const uint32_t& height, const std::string& address) { auto _method = ::mmx::Router_fetch_block_at::create(); _method->height = height; _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::http_request(std::shared_ptr request, const std::string& sub_path) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } ::vnx::Object RouterClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } ::vnx::Variant RouterClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } void RouterClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void RouterClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void RouterClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void RouterClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode RouterClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } std::shared_ptr RouterClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("RouterClient: invalid return value"); } } void RouterClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void RouterClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void RouterClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void RouterClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t RouterClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("RouterClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/Router_discover.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_discover::VNX_TYPE_HASH(0xeda51767d96e246cull); const vnx::Hash64 Router_discover::VNX_CODE_HASH(0x3d96f8d693a2fa38ull); vnx::Hash64 Router_discover::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_discover::get_type_name() const { return "mmx.Router.discover"; } const vnx::TypeCode* Router_discover::get_type_code() const { return mmx::vnx_native_type_code_Router_discover; } std::shared_ptr Router_discover::create() { return std::make_shared(); } std::shared_ptr Router_discover::clone() const { return std::make_shared(*this); } void Router_discover::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_discover::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_discover::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_discover; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_discover::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.discover\""; _out << "}"; } void Router_discover::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_discover::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.discover"; return _object; } void Router_discover::from_object(const vnx::Object& _object) { } vnx::Variant Router_discover::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_discover::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_discover& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_discover& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_discover::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_discover::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.discover"; type_code->type_hash = vnx::Hash64(0xeda51767d96e246cull); type_code->code_hash = vnx::Hash64(0x3d96f8d693a2fa38ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_discover); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Router_discover_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_discover& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_discover; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_discover>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_discover& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_discover& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_discover& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_discover_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Router_discover_return::VNX_TYPE_HASH(0xb4e47e012f264f94ull); const vnx::Hash64 Router_discover_return::VNX_CODE_HASH(0xbeb58a41b8d53d38ull); vnx::Hash64 Router_discover_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_discover_return::get_type_name() const { return "mmx.Router.discover.return"; } const vnx::TypeCode* Router_discover_return::get_type_code() const { return mmx::vnx_native_type_code_Router_discover_return; } std::shared_ptr Router_discover_return::create() { return std::make_shared(); } std::shared_ptr Router_discover_return::clone() const { return std::make_shared(*this); } void Router_discover_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_discover_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_discover_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_discover_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_discover_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.discover.return\""; _out << "}"; } void Router_discover_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_discover_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.discover.return"; return _object; } void Router_discover_return::from_object(const vnx::Object& _object) { } vnx::Variant Router_discover_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_discover_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_discover_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_discover_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_discover_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_discover_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.discover.return"; type_code->type_hash = vnx::Hash64(0xb4e47e012f264f94ull); type_code->code_hash = vnx::Hash64(0xbeb58a41b8d53d38ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_discover_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_discover_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_discover_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_discover_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_discover_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_discover_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_discover_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_fetch_block.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_fetch_block::VNX_TYPE_HASH(0x7c2f762681e7cc51ull); const vnx::Hash64 Router_fetch_block::VNX_CODE_HASH(0x61cd31e11aef92dfull); vnx::Hash64 Router_fetch_block::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_fetch_block::get_type_name() const { return "mmx.Router.fetch_block"; } const vnx::TypeCode* Router_fetch_block::get_type_code() const { return mmx::vnx_native_type_code_Router_fetch_block; } std::shared_ptr Router_fetch_block::create() { return std::make_shared(); } std::shared_ptr Router_fetch_block::clone() const { return std::make_shared(*this); } void Router_fetch_block::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_fetch_block::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_fetch_block::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_fetch_block; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Router_fetch_block::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.fetch_block\""; _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Router_fetch_block::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_fetch_block::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.fetch_block"; _object["hash"] = hash; _object["address"] = address; return _object; } void Router_fetch_block::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "hash") { _entry.second.to(hash); } } } vnx::Variant Router_fetch_block::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Router_fetch_block::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } else if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_fetch_block& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_fetch_block& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_fetch_block::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_fetch_block::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.fetch_block"; type_code->type_hash = vnx::Hash64(0x7c2f762681e7cc51ull); type_code->code_hash = vnx::Hash64(0x61cd31e11aef92dfull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_fetch_block); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->is_async = true; type_code->return_type = ::mmx::Router_fetch_block_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_fetch_block& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_fetch_block; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_fetch_block>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Router_fetch_block& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_fetch_block& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_fetch_block_at.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_fetch_block_at::VNX_TYPE_HASH(0xa4deba522ed6f8adull); const vnx::Hash64 Router_fetch_block_at::VNX_CODE_HASH(0x611fcd29266eedc5ull); vnx::Hash64 Router_fetch_block_at::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_fetch_block_at::get_type_name() const { return "mmx.Router.fetch_block_at"; } const vnx::TypeCode* Router_fetch_block_at::get_type_code() const { return mmx::vnx_native_type_code_Router_fetch_block_at; } std::shared_ptr Router_fetch_block_at::create() { return std::make_shared(); } std::shared_ptr Router_fetch_block_at::clone() const { return std::make_shared(*this); } void Router_fetch_block_at::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_fetch_block_at::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_fetch_block_at::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_fetch_block_at; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Router_fetch_block_at::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.fetch_block_at\""; _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Router_fetch_block_at::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_fetch_block_at::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.fetch_block_at"; _object["height"] = height; _object["address"] = address; return _object; } void Router_fetch_block_at::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Router_fetch_block_at::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Router_fetch_block_at::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_at& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_fetch_block_at& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_fetch_block_at::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_fetch_block_at::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.fetch_block_at"; type_code->type_hash = vnx::Hash64(0xa4deba522ed6f8adull); type_code->code_hash = vnx::Hash64(0x611fcd29266eedc5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_fetch_block_at); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->is_async = true; type_code->return_type = ::mmx::Router_fetch_block_at_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_fetch_block_at& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_fetch_block_at; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_fetch_block_at>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Router_fetch_block_at& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_fetch_block_at& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_fetch_block_at_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_fetch_block_at_return::VNX_TYPE_HASH(0xff711a762d6f885ull); const vnx::Hash64 Router_fetch_block_at_return::VNX_CODE_HASH(0xe000edfc8af5ce89ull); vnx::Hash64 Router_fetch_block_at_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_fetch_block_at_return::get_type_name() const { return "mmx.Router.fetch_block_at.return"; } const vnx::TypeCode* Router_fetch_block_at_return::get_type_code() const { return mmx::vnx_native_type_code_Router_fetch_block_at_return; } std::shared_ptr Router_fetch_block_at_return::create() { return std::make_shared(); } std::shared_ptr Router_fetch_block_at_return::clone() const { return std::make_shared(*this); } void Router_fetch_block_at_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_fetch_block_at_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_fetch_block_at_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_fetch_block_at_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_fetch_block_at_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.fetch_block_at.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_fetch_block_at_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_fetch_block_at_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.fetch_block_at.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_fetch_block_at_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_fetch_block_at_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_fetch_block_at_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_at_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_fetch_block_at_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_fetch_block_at_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_fetch_block_at_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.fetch_block_at.return"; type_code->type_hash = vnx::Hash64(0xff711a762d6f885ull); type_code->code_hash = vnx::Hash64(0xe000edfc8af5ce89ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_fetch_block_at_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_fetch_block_at_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_fetch_block_at_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_fetch_block_at_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_fetch_block_at_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_fetch_block_at_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_at_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_fetch_block_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_fetch_block_return::VNX_TYPE_HASH(0xcbe76155006bbb44ull); const vnx::Hash64 Router_fetch_block_return::VNX_CODE_HASH(0x6a18dd40a937ba81ull); vnx::Hash64 Router_fetch_block_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_fetch_block_return::get_type_name() const { return "mmx.Router.fetch_block.return"; } const vnx::TypeCode* Router_fetch_block_return::get_type_code() const { return mmx::vnx_native_type_code_Router_fetch_block_return; } std::shared_ptr Router_fetch_block_return::create() { return std::make_shared(); } std::shared_ptr Router_fetch_block_return::clone() const { return std::make_shared(*this); } void Router_fetch_block_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_fetch_block_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_fetch_block_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_fetch_block_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_fetch_block_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.fetch_block.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_fetch_block_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_fetch_block_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.fetch_block.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_fetch_block_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_fetch_block_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_fetch_block_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_fetch_block_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_fetch_block_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_fetch_block_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_fetch_block_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.fetch_block.return"; type_code->type_hash = vnx::Hash64(0xcbe76155006bbb44ull); type_code->code_hash = vnx::Hash64(0x6a18dd40a937ba81ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_fetch_block_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_fetch_block_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_fetch_block_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_fetch_block_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_fetch_block_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_fetch_block_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_fetch_block_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_blocks_at.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_blocks_at::VNX_TYPE_HASH(0x1eb0c0d7eae3c33aull); const vnx::Hash64 Router_get_blocks_at::VNX_CODE_HASH(0x258cf68611e58fe8ull); vnx::Hash64 Router_get_blocks_at::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_blocks_at::get_type_name() const { return "mmx.Router.get_blocks_at"; } const vnx::TypeCode* Router_get_blocks_at::get_type_code() const { return mmx::vnx_native_type_code_Router_get_blocks_at; } std::shared_ptr Router_get_blocks_at::create() { return std::make_shared(); } std::shared_ptr Router_get_blocks_at::clone() const { return std::make_shared(*this); } void Router_get_blocks_at::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_blocks_at::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_blocks_at::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_blocks_at; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_end(*_type_code); } void Router_get_blocks_at::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_blocks_at\""; _out << ", \"height\": "; vnx::write(_out, height); _out << "}"; } void Router_get_blocks_at::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_blocks_at::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_blocks_at"; _object["height"] = height; return _object; } void Router_get_blocks_at::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } } } vnx::Variant Router_get_blocks_at::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } return vnx::Variant(); } void Router_get_blocks_at::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_blocks_at& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_blocks_at& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_blocks_at::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_blocks_at::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_blocks_at"; type_code->type_hash = vnx::Hash64(0x1eb0c0d7eae3c33aull); type_code->code_hash = vnx::Hash64(0x258cf68611e58fe8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_blocks_at); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->is_async = true; type_code->return_type = ::mmx::Router_get_blocks_at_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_blocks_at& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_blocks_at; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_blocks_at>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.height); } void read(std::istream& in, ::mmx::Router_get_blocks_at& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_blocks_at& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_blocks_at_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_blocks_at_return::VNX_TYPE_HASH(0x70f0e9e7aa72b810ull); const vnx::Hash64 Router_get_blocks_at_return::VNX_CODE_HASH(0xf2cd401ba9e551e3ull); vnx::Hash64 Router_get_blocks_at_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_blocks_at_return::get_type_name() const { return "mmx.Router.get_blocks_at.return"; } const vnx::TypeCode* Router_get_blocks_at_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_blocks_at_return; } std::shared_ptr Router_get_blocks_at_return::create() { return std::make_shared(); } std::shared_ptr Router_get_blocks_at_return::clone() const { return std::make_shared(*this); } void Router_get_blocks_at_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_blocks_at_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_blocks_at_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_blocks_at_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_blocks_at_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_blocks_at.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_blocks_at_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_blocks_at_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_blocks_at.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_blocks_at_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_blocks_at_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_blocks_at_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_blocks_at_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_blocks_at_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_blocks_at_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_blocks_at_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_blocks_at.return"; type_code->type_hash = vnx::Hash64(0x70f0e9e7aa72b810ull); type_code->code_hash = vnx::Hash64(0xf2cd401ba9e551e3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_blocks_at_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_blocks_at_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_blocks_at_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_blocks_at_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_blocks_at_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_blocks_at_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_blocks_at_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_connected_peers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_connected_peers::VNX_TYPE_HASH(0x8682feb65fbb77feull); const vnx::Hash64 Router_get_connected_peers::VNX_CODE_HASH(0xc4d46e93242548d5ull); vnx::Hash64 Router_get_connected_peers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_connected_peers::get_type_name() const { return "mmx.Router.get_connected_peers"; } const vnx::TypeCode* Router_get_connected_peers::get_type_code() const { return mmx::vnx_native_type_code_Router_get_connected_peers; } std::shared_ptr Router_get_connected_peers::create() { return std::make_shared(); } std::shared_ptr Router_get_connected_peers::clone() const { return std::make_shared(*this); } void Router_get_connected_peers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_connected_peers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_connected_peers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_connected_peers; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_get_connected_peers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_connected_peers\""; _out << "}"; } void Router_get_connected_peers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_connected_peers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_connected_peers"; return _object; } void Router_get_connected_peers::from_object(const vnx::Object& _object) { } vnx::Variant Router_get_connected_peers::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_get_connected_peers::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_connected_peers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_connected_peers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_connected_peers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_connected_peers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_connected_peers"; type_code->type_hash = vnx::Hash64(0x8682feb65fbb77feull); type_code->code_hash = vnx::Hash64(0xc4d46e93242548d5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_connected_peers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_connected_peers_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_connected_peers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_connected_peers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_connected_peers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_get_connected_peers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_connected_peers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_connected_peers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_connected_peers_return::VNX_TYPE_HASH(0x5c96b95e03d32e32ull); const vnx::Hash64 Router_get_connected_peers_return::VNX_CODE_HASH(0xae7af13523d31da8ull); vnx::Hash64 Router_get_connected_peers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_connected_peers_return::get_type_name() const { return "mmx.Router.get_connected_peers.return"; } const vnx::TypeCode* Router_get_connected_peers_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_connected_peers_return; } std::shared_ptr Router_get_connected_peers_return::create() { return std::make_shared(); } std::shared_ptr Router_get_connected_peers_return::clone() const { return std::make_shared(*this); } void Router_get_connected_peers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_connected_peers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_connected_peers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_connected_peers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_connected_peers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_connected_peers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_connected_peers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_connected_peers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_connected_peers.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_connected_peers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_connected_peers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_connected_peers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_connected_peers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_connected_peers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_connected_peers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_connected_peers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_connected_peers.return"; type_code->type_hash = vnx::Hash64(0x5c96b95e03d32e32ull); type_code->code_hash = vnx::Hash64(0xae7af13523d31da8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_connected_peers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_connected_peers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_connected_peers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_connected_peers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_connected_peers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_connected_peers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_connected_peers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_id.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_id::VNX_TYPE_HASH(0xb9f7168b5ae94cd9ull); const vnx::Hash64 Router_get_id::VNX_CODE_HASH(0xbb27b1ab7ee8c69dull); vnx::Hash64 Router_get_id::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_id::get_type_name() const { return "mmx.Router.get_id"; } const vnx::TypeCode* Router_get_id::get_type_code() const { return mmx::vnx_native_type_code_Router_get_id; } std::shared_ptr Router_get_id::create() { return std::make_shared(); } std::shared_ptr Router_get_id::clone() const { return std::make_shared(*this); } void Router_get_id::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_id::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_id::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_id; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_get_id::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_id\""; _out << "}"; } void Router_get_id::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_id::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_id"; return _object; } void Router_get_id::from_object(const vnx::Object& _object) { } vnx::Variant Router_get_id::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_get_id::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_id& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_id& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_id::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_id::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_id"; type_code->type_hash = vnx::Hash64(0xb9f7168b5ae94cd9ull); type_code->code_hash = vnx::Hash64(0xbb27b1ab7ee8c69dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_id); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_id_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_id& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_id; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_id>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_get_id& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_id& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_id& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_id_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_id_return::VNX_TYPE_HASH(0x3924146b7a803806ull); const vnx::Hash64 Router_get_id_return::VNX_CODE_HASH(0xf39def51a6cf1026ull); vnx::Hash64 Router_get_id_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_id_return::get_type_name() const { return "mmx.Router.get_id.return"; } const vnx::TypeCode* Router_get_id_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_id_return; } std::shared_ptr Router_get_id_return::create() { return std::make_shared(); } std::shared_ptr Router_get_id_return::clone() const { return std::make_shared(*this); } void Router_get_id_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_id_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_id_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_id_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_id_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_id.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_id_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_id_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_id.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_id_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_id_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_id_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_id_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_id_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_id_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_id_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_id.return"; type_code->type_hash = vnx::Hash64(0x3924146b7a803806ull); type_code->code_hash = vnx::Hash64(0xf39def51a6cf1026ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_id_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_id_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_id_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_id_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_id_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_id_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_id_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_info::VNX_TYPE_HASH(0x364ea887c149a265ull); const vnx::Hash64 Router_get_info::VNX_CODE_HASH(0x84c4e0df1324599full); vnx::Hash64 Router_get_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_info::get_type_name() const { return "mmx.Router.get_info"; } const vnx::TypeCode* Router_get_info::get_type_code() const { return mmx::vnx_native_type_code_Router_get_info; } std::shared_ptr Router_get_info::create() { return std::make_shared(); } std::shared_ptr Router_get_info::clone() const { return std::make_shared(*this); } void Router_get_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_info; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_get_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_info\""; _out << "}"; } void Router_get_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_info"; return _object; } void Router_get_info::from_object(const vnx::Object& _object) { } vnx::Variant Router_get_info::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_get_info::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_info"; type_code->type_hash = vnx::Hash64(0x364ea887c149a265ull); type_code->code_hash = vnx::Hash64(0x84c4e0df1324599full); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_info_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_get_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_info_return::VNX_TYPE_HASH(0x15170c71ca9209a9ull); const vnx::Hash64 Router_get_info_return::VNX_CODE_HASH(0xd5570290d072503full); vnx::Hash64 Router_get_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_info_return::get_type_name() const { return "mmx.Router.get_info.return"; } const vnx::TypeCode* Router_get_info_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_info_return; } std::shared_ptr Router_get_info_return::create() { return std::make_shared(); } std::shared_ptr Router_get_info_return::clone() const { return std::make_shared(*this); } void Router_get_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_info.return"; type_code->type_hash = vnx::Hash64(0x15170c71ca9209a9ull); type_code->code_hash = vnx::Hash64(0xd5570290d072503full); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::node_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_known_peers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_known_peers::VNX_TYPE_HASH(0xaa408b6bf4e8168dull); const vnx::Hash64 Router_get_known_peers::VNX_CODE_HASH(0xe5a3f89e7601f8c9ull); vnx::Hash64 Router_get_known_peers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_known_peers::get_type_name() const { return "mmx.Router.get_known_peers"; } const vnx::TypeCode* Router_get_known_peers::get_type_code() const { return mmx::vnx_native_type_code_Router_get_known_peers; } std::shared_ptr Router_get_known_peers::create() { return std::make_shared(); } std::shared_ptr Router_get_known_peers::clone() const { return std::make_shared(*this); } void Router_get_known_peers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_known_peers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_known_peers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_known_peers; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_get_known_peers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_known_peers\""; _out << "}"; } void Router_get_known_peers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_known_peers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_known_peers"; return _object; } void Router_get_known_peers::from_object(const vnx::Object& _object) { } vnx::Variant Router_get_known_peers::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_get_known_peers::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_known_peers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_known_peers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_known_peers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_known_peers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_known_peers"; type_code->type_hash = vnx::Hash64(0xaa408b6bf4e8168dull); type_code->code_hash = vnx::Hash64(0xe5a3f89e7601f8c9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_known_peers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_known_peers_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_known_peers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_known_peers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_known_peers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_get_known_peers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_known_peers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_known_peers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_known_peers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_known_peers_return::VNX_TYPE_HASH(0xc08cde4fbf7f2abcull); const vnx::Hash64 Router_get_known_peers_return::VNX_CODE_HASH(0x6ee4ed4813644374ull); vnx::Hash64 Router_get_known_peers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_known_peers_return::get_type_name() const { return "mmx.Router.get_known_peers.return"; } const vnx::TypeCode* Router_get_known_peers_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_known_peers_return; } std::shared_ptr Router_get_known_peers_return::create() { return std::make_shared(); } std::shared_ptr Router_get_known_peers_return::clone() const { return std::make_shared(*this); } void Router_get_known_peers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_known_peers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_known_peers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_known_peers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_known_peers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_known_peers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_known_peers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_known_peers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_known_peers.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_known_peers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_known_peers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_known_peers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_known_peers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_known_peers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_known_peers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_known_peers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_known_peers.return"; type_code->type_hash = vnx::Hash64(0xc08cde4fbf7f2abcull); type_code->code_hash = vnx::Hash64(0x6ee4ed4813644374ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_known_peers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_known_peers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_known_peers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_known_peers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_known_peers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_known_peers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_known_peers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_peer_info.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_peer_info::VNX_TYPE_HASH(0x520a467ef9324cb3ull); const vnx::Hash64 Router_get_peer_info::VNX_CODE_HASH(0x5fb7af7adff5636eull); vnx::Hash64 Router_get_peer_info::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_peer_info::get_type_name() const { return "mmx.Router.get_peer_info"; } const vnx::TypeCode* Router_get_peer_info::get_type_code() const { return mmx::vnx_native_type_code_Router_get_peer_info; } std::shared_ptr Router_get_peer_info::create() { return std::make_shared(); } std::shared_ptr Router_get_peer_info::clone() const { return std::make_shared(*this); } void Router_get_peer_info::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_peer_info::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_peer_info::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_peer_info; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_get_peer_info::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_peer_info\""; _out << "}"; } void Router_get_peer_info::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_peer_info::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_peer_info"; return _object; } void Router_get_peer_info::from_object(const vnx::Object& _object) { } vnx::Variant Router_get_peer_info::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_get_peer_info::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_peer_info& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_peer_info& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_peer_info::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_peer_info::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_peer_info"; type_code->type_hash = vnx::Hash64(0x520a467ef9324cb3ull); type_code->code_hash = vnx::Hash64(0x5fb7af7adff5636eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_peer_info); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_peer_info_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_peer_info& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_peer_info; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_peer_info>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_get_peer_info& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_peer_info& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_peer_info& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_peer_info_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_peer_info_return::VNX_TYPE_HASH(0xffff4ae0244281b5ull); const vnx::Hash64 Router_get_peer_info_return::VNX_CODE_HASH(0x78a6bf8b8201108bull); vnx::Hash64 Router_get_peer_info_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_peer_info_return::get_type_name() const { return "mmx.Router.get_peer_info.return"; } const vnx::TypeCode* Router_get_peer_info_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_peer_info_return; } std::shared_ptr Router_get_peer_info_return::create() { return std::make_shared(); } std::shared_ptr Router_get_peer_info_return::clone() const { return std::make_shared(*this); } void Router_get_peer_info_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_peer_info_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_peer_info_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_peer_info_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_peer_info_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_peer_info.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_peer_info_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_peer_info_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_peer_info.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_peer_info_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_peer_info_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_peer_info_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_peer_info_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_peer_info_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_peer_info_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_peer_info_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_peer_info.return"; type_code->type_hash = vnx::Hash64(0xffff4ae0244281b5ull); type_code->code_hash = vnx::Hash64(0x78a6bf8b8201108bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_peer_info_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_peer_info_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_peer_info_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_peer_info_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_peer_info_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_peer_info_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_peer_info_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_peers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_peers::VNX_TYPE_HASH(0x66d68bd91b462049ull); const vnx::Hash64 Router_get_peers::VNX_CODE_HASH(0xa49d54aad6f88ed8ull); vnx::Hash64 Router_get_peers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_peers::get_type_name() const { return "mmx.Router.get_peers"; } const vnx::TypeCode* Router_get_peers::get_type_code() const { return mmx::vnx_native_type_code_Router_get_peers; } std::shared_ptr Router_get_peers::create() { return std::make_shared(); } std::shared_ptr Router_get_peers::clone() const { return std::make_shared(*this); } void Router_get_peers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_peers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_peers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_peers; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, max_count); _visitor.type_end(*_type_code); } void Router_get_peers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_peers\""; _out << ", \"max_count\": "; vnx::write(_out, max_count); _out << "}"; } void Router_get_peers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_peers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_peers"; _object["max_count"] = max_count; return _object; } void Router_get_peers::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "max_count") { _entry.second.to(max_count); } } } vnx::Variant Router_get_peers::get_field(const std::string& _name) const { if(_name == "max_count") { return vnx::Variant(max_count); } return vnx::Variant(); } void Router_get_peers::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "max_count") { _value.to(max_count); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_peers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_peers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_peers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_peers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_peers"; type_code->type_hash = vnx::Hash64(0x66d68bd91b462049ull); type_code->code_hash = vnx::Hash64(0xa49d54aad6f88ed8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_get_peers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_get_peers_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "max_count"; field.value = vnx::to_string(10); field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.max_count, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_peers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_peers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_peers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.max_count); } void read(std::istream& in, ::mmx::Router_get_peers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_peers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_peers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_get_peers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Router_get_peers_return::VNX_TYPE_HASH(0x595714f80f272d86ull); const vnx::Hash64 Router_get_peers_return::VNX_CODE_HASH(0x1ddb67085e58bab8ull); vnx::Hash64 Router_get_peers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_get_peers_return::get_type_name() const { return "mmx.Router.get_peers.return"; } const vnx::TypeCode* Router_get_peers_return::get_type_code() const { return mmx::vnx_native_type_code_Router_get_peers_return; } std::shared_ptr Router_get_peers_return::create() { return std::make_shared(); } std::shared_ptr Router_get_peers_return::clone() const { return std::make_shared(*this); } void Router_get_peers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_get_peers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_get_peers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_get_peers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_get_peers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.get_peers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_get_peers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_get_peers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.get_peers.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_get_peers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_get_peers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_get_peers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_get_peers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_get_peers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_get_peers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_get_peers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.get_peers.return"; type_code->type_hash = vnx::Hash64(0x595714f80f272d86ull); type_code->code_hash = vnx::Hash64(0x1ddb67085e58bab8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_get_peers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_get_peers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_get_peers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_get_peers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_get_peers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_get_peers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_get_peers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_kick_peer.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_kick_peer::VNX_TYPE_HASH(0x359a21379021beedull); const vnx::Hash64 Router_kick_peer::VNX_CODE_HASH(0x10c42f572627bd33ull); vnx::Hash64 Router_kick_peer::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_kick_peer::get_type_name() const { return "mmx.Router.kick_peer"; } const vnx::TypeCode* Router_kick_peer::get_type_code() const { return mmx::vnx_native_type_code_Router_kick_peer; } std::shared_ptr Router_kick_peer::create() { return std::make_shared(); } std::shared_ptr Router_kick_peer::clone() const { return std::make_shared(*this); } void Router_kick_peer::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_kick_peer::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_kick_peer::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_kick_peer; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Router_kick_peer::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.kick_peer\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Router_kick_peer::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_kick_peer::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.kick_peer"; _object["address"] = address; return _object; } void Router_kick_peer::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Router_kick_peer::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Router_kick_peer::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_kick_peer& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_kick_peer& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_kick_peer::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_kick_peer::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.kick_peer"; type_code->type_hash = vnx::Hash64(0x359a21379021beedull); type_code->code_hash = vnx::Hash64(0x10c42f572627bd33ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_kick_peer); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Router_kick_peer_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_kick_peer& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_kick_peer; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_kick_peer>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_kick_peer& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_kick_peer& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_kick_peer& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_kick_peer_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Router_kick_peer_return::VNX_TYPE_HASH(0xd7189e110cc3a50full); const vnx::Hash64 Router_kick_peer_return::VNX_CODE_HASH(0x3414f125382967daull); vnx::Hash64 Router_kick_peer_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_kick_peer_return::get_type_name() const { return "mmx.Router.kick_peer.return"; } const vnx::TypeCode* Router_kick_peer_return::get_type_code() const { return mmx::vnx_native_type_code_Router_kick_peer_return; } std::shared_ptr Router_kick_peer_return::create() { return std::make_shared(); } std::shared_ptr Router_kick_peer_return::clone() const { return std::make_shared(*this); } void Router_kick_peer_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_kick_peer_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_kick_peer_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_kick_peer_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Router_kick_peer_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.kick_peer.return\""; _out << "}"; } void Router_kick_peer_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_kick_peer_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.kick_peer.return"; return _object; } void Router_kick_peer_return::from_object(const vnx::Object& _object) { } vnx::Variant Router_kick_peer_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Router_kick_peer_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Router_kick_peer_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_kick_peer_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_kick_peer_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_kick_peer_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.kick_peer.return"; type_code->type_hash = vnx::Hash64(0xd7189e110cc3a50full); type_code->code_hash = vnx::Hash64(0x3414f125382967daull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_kick_peer_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_kick_peer_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_kick_peer_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_kick_peer_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Router_kick_peer_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_kick_peer_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_kick_peer_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_sign_msg.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_sign_msg::VNX_TYPE_HASH(0x88ede2fbb99ab63eull); const vnx::Hash64 Router_sign_msg::VNX_CODE_HASH(0x994b29aed2a3d558ull); vnx::Hash64 Router_sign_msg::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_sign_msg::get_type_name() const { return "mmx.Router.sign_msg"; } const vnx::TypeCode* Router_sign_msg::get_type_code() const { return mmx::vnx_native_type_code_Router_sign_msg; } std::shared_ptr Router_sign_msg::create() { return std::make_shared(); } std::shared_ptr Router_sign_msg::clone() const { return std::make_shared(*this); } void Router_sign_msg::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_sign_msg::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_sign_msg::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_sign_msg; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, msg); _visitor.type_end(*_type_code); } void Router_sign_msg::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.sign_msg\""; _out << ", \"msg\": "; vnx::write(_out, msg); _out << "}"; } void Router_sign_msg::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_sign_msg::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.sign_msg"; _object["msg"] = msg; return _object; } void Router_sign_msg::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "msg") { _entry.second.to(msg); } } } vnx::Variant Router_sign_msg::get_field(const std::string& _name) const { if(_name == "msg") { return vnx::Variant(msg); } return vnx::Variant(); } void Router_sign_msg::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "msg") { _value.to(msg); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_sign_msg& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_sign_msg& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_sign_msg::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_sign_msg::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.sign_msg"; type_code->type_hash = vnx::Hash64(0x88ede2fbb99ab63eull); type_code->code_hash = vnx::Hash64(0x994b29aed2a3d558ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Router_sign_msg); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Router_sign_msg_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "msg"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.msg, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_sign_msg; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_sign_msg>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.msg, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_sign_msg& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_sign_msg& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_sign_msg& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Router_sign_msg_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Router_sign_msg_return::VNX_TYPE_HASH(0x67c8c37a7b5fc991ull); const vnx::Hash64 Router_sign_msg_return::VNX_CODE_HASH(0x5d66b369eec09800ull); vnx::Hash64 Router_sign_msg_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Router_sign_msg_return::get_type_name() const { return "mmx.Router.sign_msg.return"; } const vnx::TypeCode* Router_sign_msg_return::get_type_code() const { return mmx::vnx_native_type_code_Router_sign_msg_return; } std::shared_ptr Router_sign_msg_return::create() { return std::make_shared(); } std::shared_ptr Router_sign_msg_return::clone() const { return std::make_shared(*this); } void Router_sign_msg_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Router_sign_msg_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Router_sign_msg_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Router_sign_msg_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Router_sign_msg_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Router.sign_msg.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Router_sign_msg_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Router_sign_msg_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Router.sign_msg.return"; _object["_ret_0"] = _ret_0; return _object; } void Router_sign_msg_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Router_sign_msg_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Router_sign_msg_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Router_sign_msg_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Router_sign_msg_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Router_sign_msg_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Router_sign_msg_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Router.sign_msg.return"; type_code->type_hash = vnx::Hash64(0x67c8c37a7b5fc991ull); type_code->code_hash = vnx::Hash64(0x5d66b369eec09800ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Router_sign_msg_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 2, 4, 7, 11, 33, 1, 11, 64, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Router_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Router_sign_msg_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Router_sign_msg_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Router_sign_msg_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Router_sign_msg_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Router_sign_msg_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Solution.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Solution::VNX_TYPE_HASH(0x9f693babd1a91ccdull); const vnx::Hash64 Solution::VNX_CODE_HASH(0x94524a146af7f5e7ull); vnx::Hash64 Solution::get_type_hash() const { return VNX_TYPE_HASH; } std::string Solution::get_type_name() const { return "mmx.Solution"; } const vnx::TypeCode* Solution::get_type_code() const { return mmx::vnx_native_type_code_Solution; } std::shared_ptr Solution::create() { return std::make_shared(); } std::shared_ptr Solution::clone() const { return std::make_shared(*this); } void Solution::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Solution::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Solution::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Solution; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, version); _visitor.type_end(*_type_code); } void Solution::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Solution\""; _out << ", \"version\": "; vnx::write(_out, version); _out << "}"; } void Solution::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Solution::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Solution"; _object["version"] = version; return _object; } void Solution::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Solution::get_field(const std::string& _name) const { if(_name == "version") { return vnx::Variant(version); } return vnx::Variant(); } void Solution::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "version") { _value.to(version); } } /// \private std::ostream& operator<<(std::ostream& _out, const Solution& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Solution& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Solution::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Solution::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Solution"; type_code->type_hash = vnx::Hash64(0x9f693babd1a91ccdull); type_code->code_hash = vnx::Hash64(0x94524a146af7f5e7ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Solution); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "version"; field.code = {3}; } type_code->build(); return type_code; } std::shared_ptr Solution::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Solution& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Solution; out.write_type_code(type_code); vnx::write_class_header<::mmx::Solution>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); } void read(std::istream& in, ::mmx::Solution& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Solution& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Solution& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/TimeLordAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { TimeLordAsyncClient::TimeLordAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } TimeLordAsyncClient::TimeLordAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t TimeLordAsyncClient::stop_vdf(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::TimeLord_stop_vdf::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_stop_vdf[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t TimeLordAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t TimeLordAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_stop_vdf.find(_request_id); if(_iter != vnx_queue_stop_vdf.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_stop_vdf.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t TimeLordAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("TimeLordAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_stop_vdf.find(_request_id); if(_iter == vnx_queue_stop_vdf.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_stop_vdf.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 1: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("TimeLordAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("TimeLordAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 4: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 5: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("TimeLordAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("TimeLordAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 8: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 9: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("TimeLordAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("TimeLordAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("TimeLordAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/TimeLordBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 TimeLordBase::VNX_TYPE_HASH(0x311081636f6570efull); const vnx::Hash64 TimeLordBase::VNX_CODE_HASH(0xeaba05bc99f7eb7full); TimeLordBase::TimeLordBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".input_request", input_request); vnx::read_config(vnx_name + ".output_proofs", output_proofs); vnx::read_config(vnx_name + ".max_history", max_history); vnx::read_config(vnx_name + ".node_server", node_server); vnx::read_config(vnx_name + ".wallet_server", wallet_server); vnx::read_config(vnx_name + ".storage_path", storage_path); vnx::read_config(vnx_name + ".reward_addr", reward_addr); } vnx::Hash64 TimeLordBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string TimeLordBase::get_type_name() const { return "mmx.TimeLord"; } const vnx::TypeCode* TimeLordBase::get_type_code() const { return mmx::vnx_native_type_code_TimeLordBase; } void TimeLordBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_TimeLordBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, input_request); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, output_proofs); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, max_history); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, node_server); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, wallet_server); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, storage_path); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, reward_addr); _visitor.type_end(*_type_code); } void TimeLordBase::write(std::ostream& _out) const { _out << "{"; _out << "\"input_request\": "; vnx::write(_out, input_request); _out << ", \"output_proofs\": "; vnx::write(_out, output_proofs); _out << ", \"max_history\": "; vnx::write(_out, max_history); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << ", \"wallet_server\": "; vnx::write(_out, wallet_server); _out << ", \"storage_path\": "; vnx::write(_out, storage_path); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << "}"; } void TimeLordBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object TimeLordBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.TimeLord"; _object["input_request"] = input_request; _object["output_proofs"] = output_proofs; _object["max_history"] = max_history; _object["node_server"] = node_server; _object["wallet_server"] = wallet_server; _object["storage_path"] = storage_path; _object["reward_addr"] = reward_addr; return _object; } void TimeLordBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "input_request") { _entry.second.to(input_request); } else if(_entry.first == "max_history") { _entry.second.to(max_history); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "output_proofs") { _entry.second.to(output_proofs); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "storage_path") { _entry.second.to(storage_path); } else if(_entry.first == "wallet_server") { _entry.second.to(wallet_server); } } } vnx::Variant TimeLordBase::get_field(const std::string& _name) const { if(_name == "input_request") { return vnx::Variant(input_request); } if(_name == "output_proofs") { return vnx::Variant(output_proofs); } if(_name == "max_history") { return vnx::Variant(max_history); } if(_name == "node_server") { return vnx::Variant(node_server); } if(_name == "wallet_server") { return vnx::Variant(wallet_server); } if(_name == "storage_path") { return vnx::Variant(storage_path); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } return vnx::Variant(); } void TimeLordBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "input_request") { _value.to(input_request); } else if(_name == "output_proofs") { _value.to(output_proofs); } else if(_name == "max_history") { _value.to(max_history); } else if(_name == "node_server") { _value.to(node_server); } else if(_name == "wallet_server") { _value.to(wallet_server); } else if(_name == "storage_path") { _value.to(storage_path); } else if(_name == "reward_addr") { _value.to(reward_addr); } } /// \private std::ostream& operator<<(std::ostream& _out, const TimeLordBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, TimeLordBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* TimeLordBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr TimeLordBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.TimeLord"; type_code->type_hash = vnx::Hash64(0x311081636f6570efull); type_code->code_hash = vnx::Hash64(0xeaba05bc99f7eb7full); type_code->is_native = true; type_code->native_size = sizeof(::mmx::TimeLordBase); type_code->methods.resize(10); type_code->methods[0] = ::mmx::TimeLord_stop_vdf::static_get_type_code(); type_code->methods[1] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[2] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[3] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[4] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[5] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[6] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[7] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[8] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[9] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "input_request"; field.value = vnx::to_string("timelord.requests"); field.code = {12, 5}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "output_proofs"; field.value = vnx::to_string("timelord.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "max_history"; field.value = vnx::to_string(1000000); field.code = {3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "wallet_server"; field.value = vnx::to_string("Wallet"); field.code = {32}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "storage_path"; field.code = {32}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "reward_addr"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } void TimeLordBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0xa4e39be061f13d71ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr TimeLordBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0xf7f78eb9f371e6e7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::TimeLord_stop_vdf_return::create(); stop_vdf(); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.max_history, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.input_request, type_code, _field->code.data()); break; case 1: vnx::read(in, value.output_proofs, type_code, _field->code.data()); break; case 3: vnx::read(in, value.node_server, type_code, _field->code.data()); break; case 4: vnx::read(in, value.wallet_server, type_code, _field->code.data()); break; case 5: vnx::read(in, value.storage_path, type_code, _field->code.data()); break; case 6: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::TimeLordBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_TimeLordBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::TimeLordBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.max_history); vnx::write(out, value.input_request, type_code, type_code->fields[0].code.data()); vnx::write(out, value.output_proofs, type_code, type_code->fields[1].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[3].code.data()); vnx::write(out, value.wallet_server, type_code, type_code->fields[4].code.data()); vnx::write(out, value.storage_path, type_code, type_code->fields[5].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::TimeLordBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::TimeLordBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::TimeLordBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/TimeLordClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { TimeLordClient::TimeLordClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } TimeLordClient::TimeLordClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } void TimeLordClient::stop_vdf() { auto _method = ::mmx::TimeLord_stop_vdf::create(); vnx_request(_method, false); } void TimeLordClient::stop_vdf_async() { auto _method = ::mmx::TimeLord_stop_vdf::create(); vnx_request(_method, true); } ::vnx::Object TimeLordClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("TimeLordClient: invalid return value"); } } ::vnx::Variant TimeLordClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("TimeLordClient: invalid return value"); } } void TimeLordClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void TimeLordClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void TimeLordClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void TimeLordClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode TimeLordClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("TimeLordClient: invalid return value"); } } std::shared_ptr TimeLordClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("TimeLordClient: invalid return value"); } } void TimeLordClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void TimeLordClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void TimeLordClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void TimeLordClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t TimeLordClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("TimeLordClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/TimeLord_stop_vdf.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 TimeLord_stop_vdf::VNX_TYPE_HASH(0xf7f78eb9f371e6e7ull); const vnx::Hash64 TimeLord_stop_vdf::VNX_CODE_HASH(0xead4b68d447b80c7ull); vnx::Hash64 TimeLord_stop_vdf::get_type_hash() const { return VNX_TYPE_HASH; } std::string TimeLord_stop_vdf::get_type_name() const { return "mmx.TimeLord.stop_vdf"; } const vnx::TypeCode* TimeLord_stop_vdf::get_type_code() const { return mmx::vnx_native_type_code_TimeLord_stop_vdf; } std::shared_ptr TimeLord_stop_vdf::create() { return std::make_shared(); } std::shared_ptr TimeLord_stop_vdf::clone() const { return std::make_shared(*this); } void TimeLord_stop_vdf::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void TimeLord_stop_vdf::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void TimeLord_stop_vdf::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_TimeLord_stop_vdf; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void TimeLord_stop_vdf::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.TimeLord.stop_vdf\""; _out << "}"; } void TimeLord_stop_vdf::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object TimeLord_stop_vdf::to_object() const { vnx::Object _object; _object["__type"] = "mmx.TimeLord.stop_vdf"; return _object; } void TimeLord_stop_vdf::from_object(const vnx::Object& _object) { } vnx::Variant TimeLord_stop_vdf::get_field(const std::string& _name) const { return vnx::Variant(); } void TimeLord_stop_vdf::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const TimeLord_stop_vdf& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, TimeLord_stop_vdf& _value) { _value.read(_in); return _in; } const vnx::TypeCode* TimeLord_stop_vdf::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr TimeLord_stop_vdf::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.TimeLord.stop_vdf"; type_code->type_hash = vnx::Hash64(0xf7f78eb9f371e6e7ull); type_code->code_hash = vnx::Hash64(0xead4b68d447b80c7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::TimeLord_stop_vdf); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::TimeLord_stop_vdf_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_TimeLord_stop_vdf; out.write_type_code(type_code); vnx::write_class_header<::mmx::TimeLord_stop_vdf>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::TimeLord_stop_vdf& value) { value.read(in); } void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/TimeLord_stop_vdf_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 TimeLord_stop_vdf_return::VNX_TYPE_HASH(0x53e37fb500ea3a9full); const vnx::Hash64 TimeLord_stop_vdf_return::VNX_CODE_HASH(0xeff4d46be753f782ull); vnx::Hash64 TimeLord_stop_vdf_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string TimeLord_stop_vdf_return::get_type_name() const { return "mmx.TimeLord.stop_vdf.return"; } const vnx::TypeCode* TimeLord_stop_vdf_return::get_type_code() const { return mmx::vnx_native_type_code_TimeLord_stop_vdf_return; } std::shared_ptr TimeLord_stop_vdf_return::create() { return std::make_shared(); } std::shared_ptr TimeLord_stop_vdf_return::clone() const { return std::make_shared(*this); } void TimeLord_stop_vdf_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void TimeLord_stop_vdf_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void TimeLord_stop_vdf_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_TimeLord_stop_vdf_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void TimeLord_stop_vdf_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.TimeLord.stop_vdf.return\""; _out << "}"; } void TimeLord_stop_vdf_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object TimeLord_stop_vdf_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.TimeLord.stop_vdf.return"; return _object; } void TimeLord_stop_vdf_return::from_object(const vnx::Object& _object) { } vnx::Variant TimeLord_stop_vdf_return::get_field(const std::string& _name) const { return vnx::Variant(); } void TimeLord_stop_vdf_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const TimeLord_stop_vdf_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, TimeLord_stop_vdf_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* TimeLord_stop_vdf_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr TimeLord_stop_vdf_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.TimeLord.stop_vdf.return"; type_code->type_hash = vnx::Hash64(0x53e37fb500ea3a9full); type_code->code_hash = vnx::Hash64(0xeff4d46be753f782ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::TimeLord_stop_vdf_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::TimeLord_stop_vdf_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_TimeLord_stop_vdf_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::TimeLord_stop_vdf_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::TimeLord_stop_vdf_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::TimeLord_stop_vdf_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::TimeLord_stop_vdf_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Transaction.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const uint32_t Transaction::MAX_SOLUTIONS; const vnx::Hash64 Transaction::VNX_TYPE_HASH(0xce0462acdceaa5bcull); const vnx::Hash64 Transaction::VNX_CODE_HASH(0x6b823c733d9eab23ull); vnx::Hash64 Transaction::get_type_hash() const { return VNX_TYPE_HASH; } std::string Transaction::get_type_name() const { return "mmx.Transaction"; } const vnx::TypeCode* Transaction::get_type_code() const { return mmx::vnx_native_type_code_Transaction; } std::shared_ptr Transaction::create() { return std::make_shared(); } std::shared_ptr Transaction::clone() const { return std::make_shared(*this); } void Transaction::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Transaction::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Transaction::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Transaction; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, expires); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, fee_ratio); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, static_cost); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, max_fee_amount); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, note); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, nonce); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, network); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, sender); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, inputs); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, outputs); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, execute); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, solutions); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, deploy); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, exec_result); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, content_hash); _visitor.type_end(*_type_code); } void Transaction::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Transaction\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"expires\": "; vnx::write(_out, expires); _out << ", \"fee_ratio\": "; vnx::write(_out, fee_ratio); _out << ", \"static_cost\": "; vnx::write(_out, static_cost); _out << ", \"max_fee_amount\": "; vnx::write(_out, max_fee_amount); _out << ", \"note\": "; vnx::write(_out, note); _out << ", \"nonce\": "; vnx::write(_out, nonce); _out << ", \"network\": "; vnx::write(_out, network); _out << ", \"sender\": "; vnx::write(_out, sender); _out << ", \"inputs\": "; vnx::write(_out, inputs); _out << ", \"outputs\": "; vnx::write(_out, outputs); _out << ", \"execute\": "; vnx::write(_out, execute); _out << ", \"solutions\": "; vnx::write(_out, solutions); _out << ", \"deploy\": "; vnx::write(_out, deploy); _out << ", \"exec_result\": "; vnx::write(_out, exec_result); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << "}"; } void Transaction::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Transaction::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Transaction"; _object["id"] = id; _object["version"] = version; _object["expires"] = expires; _object["fee_ratio"] = fee_ratio; _object["static_cost"] = static_cost; _object["max_fee_amount"] = max_fee_amount; _object["note"] = note; _object["nonce"] = nonce; _object["network"] = network; _object["sender"] = sender; _object["inputs"] = inputs; _object["outputs"] = outputs; _object["execute"] = execute; _object["solutions"] = solutions; _object["deploy"] = deploy; _object["exec_result"] = exec_result; _object["content_hash"] = content_hash; return _object; } void Transaction::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "deploy") { _entry.second.to(deploy); } else if(_entry.first == "exec_result") { _entry.second.to(exec_result); } else if(_entry.first == "execute") { _entry.second.to(execute); } else if(_entry.first == "expires") { _entry.second.to(expires); } else if(_entry.first == "fee_ratio") { _entry.second.to(fee_ratio); } else if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "inputs") { _entry.second.to(inputs); } else if(_entry.first == "max_fee_amount") { _entry.second.to(max_fee_amount); } else if(_entry.first == "network") { _entry.second.to(network); } else if(_entry.first == "nonce") { _entry.second.to(nonce); } else if(_entry.first == "note") { _entry.second.to(note); } else if(_entry.first == "outputs") { _entry.second.to(outputs); } else if(_entry.first == "sender") { _entry.second.to(sender); } else if(_entry.first == "solutions") { _entry.second.to(solutions); } else if(_entry.first == "static_cost") { _entry.second.to(static_cost); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant Transaction::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "version") { return vnx::Variant(version); } if(_name == "expires") { return vnx::Variant(expires); } if(_name == "fee_ratio") { return vnx::Variant(fee_ratio); } if(_name == "static_cost") { return vnx::Variant(static_cost); } if(_name == "max_fee_amount") { return vnx::Variant(max_fee_amount); } if(_name == "note") { return vnx::Variant(note); } if(_name == "nonce") { return vnx::Variant(nonce); } if(_name == "network") { return vnx::Variant(network); } if(_name == "sender") { return vnx::Variant(sender); } if(_name == "inputs") { return vnx::Variant(inputs); } if(_name == "outputs") { return vnx::Variant(outputs); } if(_name == "execute") { return vnx::Variant(execute); } if(_name == "solutions") { return vnx::Variant(solutions); } if(_name == "deploy") { return vnx::Variant(deploy); } if(_name == "exec_result") { return vnx::Variant(exec_result); } if(_name == "content_hash") { return vnx::Variant(content_hash); } return vnx::Variant(); } void Transaction::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "version") { _value.to(version); } else if(_name == "expires") { _value.to(expires); } else if(_name == "fee_ratio") { _value.to(fee_ratio); } else if(_name == "static_cost") { _value.to(static_cost); } else if(_name == "max_fee_amount") { _value.to(max_fee_amount); } else if(_name == "note") { _value.to(note); } else if(_name == "nonce") { _value.to(nonce); } else if(_name == "network") { _value.to(network); } else if(_name == "sender") { _value.to(sender); } else if(_name == "inputs") { _value.to(inputs); } else if(_name == "outputs") { _value.to(outputs); } else if(_name == "execute") { _value.to(execute); } else if(_name == "solutions") { _value.to(solutions); } else if(_name == "deploy") { _value.to(deploy); } else if(_name == "exec_result") { _value.to(exec_result); } else if(_name == "content_hash") { _value.to(content_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Transaction& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Transaction& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Transaction::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Transaction::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Transaction"; type_code->type_hash = vnx::Hash64(0xce0462acdceaa5bcull); type_code->code_hash = vnx::Hash64(0x6b823c733d9eab23ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::Transaction); type_code->parents.resize(1); type_code->parents[0] = ::mmx::TransactionBase::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(4); type_code->depends[0] = ::mmx::tx_note_e::static_get_type_code(); type_code->depends[1] = ::mmx::txin_t::static_get_type_code(); type_code->depends[2] = ::mmx::txout_t::static_get_type_code(); type_code->depends[3] = ::mmx::exec_result_t::static_get_type_code(); type_code->fields.resize(17); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "expires"; field.value = vnx::to_string(-1); field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "fee_ratio"; field.value = vnx::to_string(1024); field.code = {3}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "static_cost"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "max_fee_amount"; field.code = {3}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "note"; field.code = {19, 0}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "nonce"; field.code = {4}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "network"; field.code = {32}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "sender"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "inputs"; field.code = {12, 19, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "outputs"; field.code = {12, 19, 2}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "execute"; field.code = {12, 16}; } { auto& field = type_code->fields[13]; field.is_extended = true; field.name = "solutions"; field.code = {12, 16}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "deploy"; field.code = {16}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "exec_result"; field.code = {33, 19, 3}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr Transaction::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.expires, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.fee_ratio, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.static_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.max_fee_amount, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.nonce, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; case 6: vnx::read(in, value.note, type_code, _field->code.data()); break; case 8: vnx::read(in, value.network, type_code, _field->code.data()); break; case 9: vnx::read(in, value.sender, type_code, _field->code.data()); break; case 10: vnx::read(in, value.inputs, type_code, _field->code.data()); break; case 11: vnx::read(in, value.outputs, type_code, _field->code.data()); break; case 12: vnx::read(in, value.execute, type_code, _field->code.data()); break; case 13: vnx::read(in, value.solutions, type_code, _field->code.data()); break; case 14: vnx::read(in, value.deploy, type_code, _field->code.data()); break; case 15: vnx::read(in, value.exec_result, type_code, _field->code.data()); break; case 16: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Transaction& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Transaction; out.write_type_code(type_code); vnx::write_class_header<::mmx::Transaction>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(28); vnx::write_value(_buf + 0, value.version); vnx::write_value(_buf + 4, value.expires); vnx::write_value(_buf + 8, value.fee_ratio); vnx::write_value(_buf + 12, value.static_cost); vnx::write_value(_buf + 16, value.max_fee_amount); vnx::write_value(_buf + 20, value.nonce); vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); vnx::write(out, value.note, type_code, type_code->fields[6].code.data()); vnx::write(out, value.network, type_code, type_code->fields[8].code.data()); vnx::write(out, value.sender, type_code, type_code->fields[9].code.data()); vnx::write(out, value.inputs, type_code, type_code->fields[10].code.data()); vnx::write(out, value.outputs, type_code, type_code->fields[11].code.data()); vnx::write(out, value.execute, type_code, type_code->fields[12].code.data()); vnx::write(out, value.solutions, type_code, type_code->fields[13].code.data()); vnx::write(out, value.deploy, type_code, type_code->fields[14].code.data()); vnx::write(out, value.exec_result, type_code, type_code->fields[15].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[16].code.data()); } void read(std::istream& in, ::mmx::Transaction& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Transaction& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Transaction& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/TransactionBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 TransactionBase::VNX_TYPE_HASH(0x6697ffbf3611887dull); const vnx::Hash64 TransactionBase::VNX_CODE_HASH(0x2693a4e1bdd90f6eull); vnx::Hash64 TransactionBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string TransactionBase::get_type_name() const { return "mmx.TransactionBase"; } const vnx::TypeCode* TransactionBase::get_type_code() const { return mmx::vnx_native_type_code_TransactionBase; } std::shared_ptr TransactionBase::create() { return std::make_shared(); } std::shared_ptr TransactionBase::clone() const { return std::make_shared(*this); } void TransactionBase::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void TransactionBase::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void TransactionBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_TransactionBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_end(*_type_code); } void TransactionBase::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.TransactionBase\""; _out << ", \"id\": "; vnx::write(_out, id); _out << "}"; } void TransactionBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object TransactionBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.TransactionBase"; _object["id"] = id; return _object; } void TransactionBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } } } vnx::Variant TransactionBase::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } return vnx::Variant(); } void TransactionBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } } /// \private std::ostream& operator<<(std::ostream& _out, const TransactionBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, TransactionBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* TransactionBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr TransactionBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.TransactionBase"; type_code->type_hash = vnx::Hash64(0x6697ffbf3611887dull); type_code->code_hash = vnx::Hash64(0x2693a4e1bdd90f6eull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::TransactionBase); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr TransactionBase::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::TransactionBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_TransactionBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::TransactionBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::TransactionBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::TransactionBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::TransactionBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/VDF_Point.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 VDF_Point::VNX_TYPE_HASH(0x1671551501b6c956ull); const vnx::Hash64 VDF_Point::VNX_CODE_HASH(0x5031dd26ac22d68eull); vnx::Hash64 VDF_Point::get_type_hash() const { return VNX_TYPE_HASH; } std::string VDF_Point::get_type_name() const { return "mmx.VDF_Point"; } const vnx::TypeCode* VDF_Point::get_type_code() const { return mmx::vnx_native_type_code_VDF_Point; } std::shared_ptr VDF_Point::create() { return std::make_shared(); } std::shared_ptr VDF_Point::clone() const { return std::make_shared(*this); } void VDF_Point::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void VDF_Point::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void VDF_Point::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_VDF_Point; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, vdf_height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, start); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, num_iters); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, input); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, output); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, prev); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, reward_addr); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, content_hash); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, recv_time); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, proof); _visitor.type_end(*_type_code); } void VDF_Point::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.VDF_Point\""; _out << ", \"vdf_height\": "; vnx::write(_out, vdf_height); _out << ", \"start\": "; vnx::write(_out, start); _out << ", \"num_iters\": "; vnx::write(_out, num_iters); _out << ", \"input\": "; vnx::write(_out, input); _out << ", \"output\": "; vnx::write(_out, output); _out << ", \"prev\": "; vnx::write(_out, prev); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << ", \"recv_time\": "; vnx::write(_out, recv_time); _out << ", \"proof\": "; vnx::write(_out, proof); _out << "}"; } void VDF_Point::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object VDF_Point::to_object() const { vnx::Object _object; _object["__type"] = "mmx.VDF_Point"; _object["vdf_height"] = vdf_height; _object["start"] = start; _object["num_iters"] = num_iters; _object["input"] = input; _object["output"] = output; _object["prev"] = prev; _object["reward_addr"] = reward_addr; _object["content_hash"] = content_hash; _object["recv_time"] = recv_time; _object["proof"] = proof; return _object; } void VDF_Point::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "input") { _entry.second.to(input); } else if(_entry.first == "num_iters") { _entry.second.to(num_iters); } else if(_entry.first == "output") { _entry.second.to(output); } else if(_entry.first == "prev") { _entry.second.to(prev); } else if(_entry.first == "proof") { _entry.second.to(proof); } else if(_entry.first == "recv_time") { _entry.second.to(recv_time); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } else if(_entry.first == "start") { _entry.second.to(start); } else if(_entry.first == "vdf_height") { _entry.second.to(vdf_height); } } } vnx::Variant VDF_Point::get_field(const std::string& _name) const { if(_name == "vdf_height") { return vnx::Variant(vdf_height); } if(_name == "start") { return vnx::Variant(start); } if(_name == "num_iters") { return vnx::Variant(num_iters); } if(_name == "input") { return vnx::Variant(input); } if(_name == "output") { return vnx::Variant(output); } if(_name == "prev") { return vnx::Variant(prev); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } if(_name == "content_hash") { return vnx::Variant(content_hash); } if(_name == "recv_time") { return vnx::Variant(recv_time); } if(_name == "proof") { return vnx::Variant(proof); } return vnx::Variant(); } void VDF_Point::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "vdf_height") { _value.to(vdf_height); } else if(_name == "start") { _value.to(start); } else if(_name == "num_iters") { _value.to(num_iters); } else if(_name == "input") { _value.to(input); } else if(_name == "output") { _value.to(output); } else if(_name == "prev") { _value.to(prev); } else if(_name == "reward_addr") { _value.to(reward_addr); } else if(_name == "content_hash") { _value.to(content_hash); } else if(_name == "recv_time") { _value.to(recv_time); } else if(_name == "proof") { _value.to(proof); } } /// \private std::ostream& operator<<(std::ostream& _out, const VDF_Point& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, VDF_Point& _value) { _value.read(_in); return _in; } const vnx::TypeCode* VDF_Point::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr VDF_Point::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.VDF_Point"; type_code->type_hash = vnx::Hash64(0x1671551501b6c956ull); type_code->code_hash = vnx::Hash64(0x5031dd26ac22d68eull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::VDF_Point); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(10); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "vdf_height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "start"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "num_iters"; field.code = {4}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "input"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "output"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "prev"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "reward_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "recv_time"; field.code = {8}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "proof"; field.code = {16}; } type_code->build(); return type_code; } std::shared_ptr VDF_Point::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.vdf_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.start, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.num_iters, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.recv_time, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.input, type_code, _field->code.data()); break; case 4: vnx::read(in, value.output, type_code, _field->code.data()); break; case 5: vnx::read(in, value.prev, type_code, _field->code.data()); break; case 6: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; case 7: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; case 9: vnx::read(in, value.proof, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::VDF_Point& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_VDF_Point; out.write_type_code(type_code); vnx::write_class_header<::mmx::VDF_Point>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(28); vnx::write_value(_buf + 0, value.vdf_height); vnx::write_value(_buf + 4, value.start); vnx::write_value(_buf + 12, value.num_iters); vnx::write_value(_buf + 20, value.recv_time); vnx::write(out, value.input, type_code, type_code->fields[3].code.data()); vnx::write(out, value.output, type_code, type_code->fields[4].code.data()); vnx::write(out, value.prev, type_code, type_code->fields[5].code.data()); vnx::write(out, value.reward_addr, type_code, type_code->fields[6].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[7].code.data()); vnx::write(out, value.proof, type_code, type_code->fields[9].code.data()); } void read(std::istream& in, ::mmx::VDF_Point& value) { value.read(in); } void write(std::ostream& out, const ::mmx::VDF_Point& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::VDF_Point& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/ValidatorVote.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 ValidatorVote::VNX_TYPE_HASH(0xc056a2ff24cdee25ull); const vnx::Hash64 ValidatorVote::VNX_CODE_HASH(0xa8f4941cde83ae41ull); vnx::Hash64 ValidatorVote::get_type_hash() const { return VNX_TYPE_HASH; } std::string ValidatorVote::get_type_name() const { return "mmx.ValidatorVote"; } const vnx::TypeCode* ValidatorVote::get_type_code() const { return mmx::vnx_native_type_code_ValidatorVote; } std::shared_ptr ValidatorVote::create() { return std::make_shared(); } std::shared_ptr ValidatorVote::clone() const { return std::make_shared(*this); } void ValidatorVote::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ValidatorVote::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ValidatorVote::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ValidatorVote; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, farmer_key); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, farmer_sig); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, content_hash); _visitor.type_end(*_type_code); } void ValidatorVote::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.ValidatorVote\""; _out << ", \"hash\": "; vnx::write(_out, hash); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << ", \"farmer_sig\": "; vnx::write(_out, farmer_sig); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << "}"; } void ValidatorVote::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ValidatorVote::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ValidatorVote"; _object["hash"] = hash; _object["farmer_key"] = farmer_key; _object["farmer_sig"] = farmer_sig; _object["content_hash"] = content_hash; return _object; } void ValidatorVote::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "farmer_sig") { _entry.second.to(farmer_sig); } else if(_entry.first == "hash") { _entry.second.to(hash); } } } vnx::Variant ValidatorVote::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } if(_name == "farmer_sig") { return vnx::Variant(farmer_sig); } if(_name == "content_hash") { return vnx::Variant(content_hash); } return vnx::Variant(); } void ValidatorVote::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } else if(_name == "farmer_key") { _value.to(farmer_key); } else if(_name == "farmer_sig") { _value.to(farmer_sig); } else if(_name == "content_hash") { _value.to(content_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const ValidatorVote& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ValidatorVote& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ValidatorVote::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ValidatorVote::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ValidatorVote"; type_code->type_hash = vnx::Hash64(0xc056a2ff24cdee25ull); type_code->code_hash = vnx::Hash64(0xa8f4941cde83ae41ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::ValidatorVote); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "farmer_sig"; field.code = {11, 64, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr ValidatorVote::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 1: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; case 2: vnx::read(in, value.farmer_sig, type_code, _field->code.data()); break; case 3: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ValidatorVote& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ValidatorVote; out.write_type_code(type_code); vnx::write_class_header<::mmx::ValidatorVote>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[1].code.data()); vnx::write(out, value.farmer_sig, type_code, type_code->fields[2].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::ValidatorVote& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ValidatorVote& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ValidatorVote& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/WalletAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { WalletAsyncClient::WalletAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } WalletAsyncClient::WalletAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t WalletAsyncClient::send(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_send::create(); _method->index = index; _method->amount = amount; _method->dst_addr = dst_addr; _method->currency = currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_send[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::send_many(const uint32_t& index, const std::vector>& amounts, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_send_many::create(); _method->index = index; _method->amounts = amounts; _method->currency = currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_send_many[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::send_from(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& src_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_send_from::create(); _method->index = index; _method->amount = amount; _method->dst_addr = dst_addr; _method->src_addr = src_addr; _method->currency = currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_send_from[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::deploy(const uint32_t& index, std::shared_ptr contract, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_deploy::create(); _method->index = index; _method->contract = contract; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_deploy[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::execute(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional& user, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_execute::create(); _method->index = index; _method->address = address; _method->method = method; _method->args = args; _method->user = user; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_execute[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::deposit(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_deposit::create(); _method->index = index; _method->address = address; _method->method = method; _method->args = args; _method->amount = amount; _method->currency = currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_deposit[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::make_offer(const uint32_t& index, const uint32_t& owner, const ::mmx::uint128& bid_amount, const ::mmx::addr_t& bid_currency, const ::mmx::uint128& ask_amount, const ::mmx::addr_t& ask_currency, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_make_offer::create(); _method->index = index; _method->owner = owner; _method->bid_amount = bid_amount; _method->bid_currency = bid_currency; _method->ask_amount = ask_amount; _method->ask_currency = ask_currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_make_offer[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::offer_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_offer_trade::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->dst_addr = dst_addr; _method->price = price; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_offer_trade[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::offer_withdraw(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_offer_withdraw::create(); _method->index = index; _method->address = address; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_offer_withdraw[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::accept_offer(const uint32_t& index, const ::mmx::addr_t& address, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_accept_offer::create(); _method->index = index; _method->address = address; _method->dst_addr = dst_addr; _method->price = price; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_accept_offer[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::cancel_offer(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_cancel_offer::create(); _method->index = index; _method->address = address; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_cancel_offer[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::swap_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const vnx::optional<::mmx::uint128>& min_trade, const int32_t& num_iter, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_swap_trade::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->currency = currency; _method->min_trade = min_trade; _method->num_iter = num_iter; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_swap_trade[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::swap_add_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const uint32_t& pool_idx, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_swap_add_liquid::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->pool_idx = pool_idx; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 12; vnx_queue_swap_add_liquid[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::swap_rem_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_swap_rem_liquid::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 13; vnx_queue_swap_rem_liquid[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::plotnft_exec(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_plotnft_exec::create(); _method->address = address; _method->method = method; _method->args = args; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 14; vnx_queue_plotnft_exec[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::plotnft_create(const uint32_t& index, const std::string& name, const vnx::optional& owner, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_plotnft_create::create(); _method->index = index; _method->name = name; _method->owner = owner; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 15; vnx_queue_plotnft_create[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::complete(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_complete::create(); _method->index = index; _method->tx = tx; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 16; vnx_queue_complete[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::sign_off(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_sign_off::create(); _method->index = index; _method->tx = tx; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 17; vnx_queue_sign_off[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::sign_msg(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::hash_t& msg, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_sign_msg::create(); _method->index = index; _method->address = address; _method->msg = msg; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 18; vnx_queue_sign_msg[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::send_off(const uint32_t& index, std::shared_ptr tx, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_send_off::create(); _method->index = index; _method->tx = tx; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 19; vnx_queue_send_off[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::mark_spent(const uint32_t& index, const std::map, ::mmx::uint128>& amounts, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_mark_spent::create(); _method->index = index; _method->amounts = amounts; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 20; vnx_queue_mark_spent[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::reserve(const uint32_t& index, const std::map, ::mmx::uint128>& amounts, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_reserve::create(); _method->index = index; _method->amounts = amounts; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 21; vnx_queue_reserve[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::release(const uint32_t& index, const std::map, ::mmx::uint128>& amounts, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_release::create(); _method->index = index; _method->amounts = amounts; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 22; vnx_queue_release[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::release_all(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_release_all::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 23; vnx_queue_release_all[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::reset_cache(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_reset_cache::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 24; vnx_queue_reset_cache[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::update_cache(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_update_cache::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 25; vnx_queue_update_cache[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_history(const uint32_t& index, const ::mmx::query_filter_t& filter, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_history::create(); _method->index = index; _method->filter = filter; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 26; vnx_queue_get_history[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_tx_log(const uint32_t& index, const int32_t& limit, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_tx_log::create(); _method->index = index; _method->limit = limit; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 27; vnx_queue_get_tx_log[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::gather_inputs_for(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_gather_inputs_for::create(); _method->index = index; _method->amount = amount; _method->currency = currency; _method->options = options; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 28; vnx_queue_gather_inputs_for[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_balance(const uint32_t& index, const ::mmx::addr_t& currency, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_balance::create(); _method->index = index; _method->currency = currency; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 29; vnx_queue_get_balance[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_balances(const uint32_t& index, const vnx::bool_t& with_zero, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_balances::create(); _method->index = index; _method->with_zero = with_zero; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 30; vnx_queue_get_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_total_balances(const std::vector<::mmx::addr_t>& addresses, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_total_balances::create(); _method->addresses = addresses; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 31; vnx_queue_get_total_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_contract_balances(const ::mmx::addr_t& address, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_contract_balances::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 32; vnx_queue_get_contract_balances[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_contracts(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_contracts::create(); _method->index = index; _method->type_name = type_name; _method->type_hash = type_hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 33; vnx_queue_get_contracts[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_contracts_owned(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash, const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_contracts_owned::create(); _method->index = index; _method->type_name = type_name; _method->type_hash = type_hash; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 34; vnx_queue_get_contracts_owned[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_offers(const uint32_t& index, const vnx::bool_t& state, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_offers::create(); _method->index = index; _method->state = state; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 35; vnx_queue_get_offers[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_swap_liquidity(const uint32_t& index, const std::function, 2>>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_swap_liquidity::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 36; vnx_queue_get_swap_liquidity[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_address(const uint32_t& index, const uint32_t& offset, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_address::create(); _method->index = index; _method->offset = offset; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 37; vnx_queue_get_address[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_all_addresses(const int32_t& index, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_all_addresses::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 38; vnx_queue_get_all_addresses[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::find_wallet_by_addr(const ::mmx::addr_t& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_find_wallet_by_addr::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 39; vnx_queue_find_wallet_by_addr[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_account(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_account::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 40; vnx_queue_get_account[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_all_accounts(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_all_accounts::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 41; vnx_queue_get_all_accounts[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::is_locked(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_is_locked::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 42; vnx_queue_is_locked[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::lock(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_lock::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 43; vnx_queue_lock[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::unlock(const uint32_t& index, const std::string& passphrase, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_unlock::create(); _method->index = index; _method->passphrase = passphrase; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 44; vnx_queue_unlock[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::add_account(const uint32_t& index, const ::mmx::account_t& config, const vnx::optional& passphrase, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_add_account::create(); _method->index = index; _method->config = config; _method->passphrase = passphrase; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 45; vnx_queue_add_account[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::create_account(const ::mmx::account_t& config, const vnx::optional& passphrase, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_create_account::create(); _method->config = config; _method->passphrase = passphrase; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 46; vnx_queue_create_account[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::create_wallet(const ::mmx::account_t& config, const vnx::optional& words, const vnx::optional& passphrase, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_create_wallet::create(); _method->config = config; _method->words = words; _method->passphrase = passphrase; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 47; vnx_queue_create_wallet[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::import_wallet(const ::mmx::account_t& config, std::shared_ptr key_file, const vnx::optional& passphrase, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_import_wallet::create(); _method->config = config; _method->key_file = key_file; _method->passphrase = passphrase; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 48; vnx_queue_import_wallet[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::remove_account(const uint32_t& index, const uint32_t& account, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_remove_account::create(); _method->index = index; _method->account = account; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 49; vnx_queue_remove_account[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::set_address_count(const uint32_t& index, const uint32_t& count, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_set_address_count::create(); _method->index = index; _method->count = count; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 50; vnx_queue_set_address_count[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_mnemonic_wordlist(const std::string& lang, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_mnemonic_wordlist::create(); _method->lang = lang; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 51; vnx_queue_get_mnemonic_wordlist[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_token_list(const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_token_list::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 52; vnx_queue_get_token_list[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::add_token(const ::mmx::addr_t& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_add_token::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 53; vnx_queue_add_token[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::rem_token(const ::mmx::addr_t& address, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_rem_token::create(); _method->address = address; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 54; vnx_queue_rem_token[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::export_wallet(const uint32_t& index, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_export_wallet::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 55; vnx_queue_export_wallet[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_master_seed(const uint32_t& index, const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_master_seed::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 56; vnx_queue_get_master_seed[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_mnemonic_seed(const uint32_t& index, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_mnemonic_seed::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 57; vnx_queue_get_mnemonic_seed[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_farmer_keys(const uint32_t& index, const std::function&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_farmer_keys::create(); _method->index = index; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 58; vnx_queue_get_farmer_keys[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::get_all_farmer_keys(const std::function>&)>& _callback, const std::function& _error_callback) { auto _method = ::mmx::Wallet_get_all_farmer_keys::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 59; vnx_queue_get_all_farmer_keys[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::http_request(std::shared_ptr request, const std::string& sub_path, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 60; vnx_queue_http_request[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 61; vnx_queue_http_request_chunk[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 62; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 63; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 64; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 65; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 66; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 67; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 68; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 69; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WalletAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 70; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t WalletAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_send.find(_request_id); if(_iter != vnx_queue_send.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_send.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_send_many.find(_request_id); if(_iter != vnx_queue_send_many.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_send_many.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_send_from.find(_request_id); if(_iter != vnx_queue_send_from.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_send_from.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_deploy.find(_request_id); if(_iter != vnx_queue_deploy.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_deploy.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_execute.find(_request_id); if(_iter != vnx_queue_execute.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_execute.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_deposit.find(_request_id); if(_iter != vnx_queue_deposit.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_deposit.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_make_offer.find(_request_id); if(_iter != vnx_queue_make_offer.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_make_offer.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_offer_trade.find(_request_id); if(_iter != vnx_queue_offer_trade.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_offer_trade.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_offer_withdraw.find(_request_id); if(_iter != vnx_queue_offer_withdraw.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_offer_withdraw.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_accept_offer.find(_request_id); if(_iter != vnx_queue_accept_offer.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_accept_offer.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_cancel_offer.find(_request_id); if(_iter != vnx_queue_cancel_offer.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_cancel_offer.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_swap_trade.find(_request_id); if(_iter != vnx_queue_swap_trade.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_swap_trade.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 12: { const auto _iter = vnx_queue_swap_add_liquid.find(_request_id); if(_iter != vnx_queue_swap_add_liquid.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_swap_add_liquid.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 13: { const auto _iter = vnx_queue_swap_rem_liquid.find(_request_id); if(_iter != vnx_queue_swap_rem_liquid.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_swap_rem_liquid.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 14: { const auto _iter = vnx_queue_plotnft_exec.find(_request_id); if(_iter != vnx_queue_plotnft_exec.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_plotnft_exec.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 15: { const auto _iter = vnx_queue_plotnft_create.find(_request_id); if(_iter != vnx_queue_plotnft_create.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_plotnft_create.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 16: { const auto _iter = vnx_queue_complete.find(_request_id); if(_iter != vnx_queue_complete.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_complete.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 17: { const auto _iter = vnx_queue_sign_off.find(_request_id); if(_iter != vnx_queue_sign_off.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_sign_off.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 18: { const auto _iter = vnx_queue_sign_msg.find(_request_id); if(_iter != vnx_queue_sign_msg.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_sign_msg.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 19: { const auto _iter = vnx_queue_send_off.find(_request_id); if(_iter != vnx_queue_send_off.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_send_off.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 20: { const auto _iter = vnx_queue_mark_spent.find(_request_id); if(_iter != vnx_queue_mark_spent.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_mark_spent.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 21: { const auto _iter = vnx_queue_reserve.find(_request_id); if(_iter != vnx_queue_reserve.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_reserve.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 22: { const auto _iter = vnx_queue_release.find(_request_id); if(_iter != vnx_queue_release.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_release.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 23: { const auto _iter = vnx_queue_release_all.find(_request_id); if(_iter != vnx_queue_release_all.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_release_all.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 24: { const auto _iter = vnx_queue_reset_cache.find(_request_id); if(_iter != vnx_queue_reset_cache.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_reset_cache.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 25: { const auto _iter = vnx_queue_update_cache.find(_request_id); if(_iter != vnx_queue_update_cache.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_update_cache.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 26: { const auto _iter = vnx_queue_get_history.find(_request_id); if(_iter != vnx_queue_get_history.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_history.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 27: { const auto _iter = vnx_queue_get_tx_log.find(_request_id); if(_iter != vnx_queue_get_tx_log.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_tx_log.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 28: { const auto _iter = vnx_queue_gather_inputs_for.find(_request_id); if(_iter != vnx_queue_gather_inputs_for.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_gather_inputs_for.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 29: { const auto _iter = vnx_queue_get_balance.find(_request_id); if(_iter != vnx_queue_get_balance.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_balance.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 30: { const auto _iter = vnx_queue_get_balances.find(_request_id); if(_iter != vnx_queue_get_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 31: { const auto _iter = vnx_queue_get_total_balances.find(_request_id); if(_iter != vnx_queue_get_total_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_total_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 32: { const auto _iter = vnx_queue_get_contract_balances.find(_request_id); if(_iter != vnx_queue_get_contract_balances.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contract_balances.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 33: { const auto _iter = vnx_queue_get_contracts.find(_request_id); if(_iter != vnx_queue_get_contracts.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contracts.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 34: { const auto _iter = vnx_queue_get_contracts_owned.find(_request_id); if(_iter != vnx_queue_get_contracts_owned.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_contracts_owned.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 35: { const auto _iter = vnx_queue_get_offers.find(_request_id); if(_iter != vnx_queue_get_offers.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_offers.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 36: { const auto _iter = vnx_queue_get_swap_liquidity.find(_request_id); if(_iter != vnx_queue_get_swap_liquidity.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_swap_liquidity.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 37: { const auto _iter = vnx_queue_get_address.find(_request_id); if(_iter != vnx_queue_get_address.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_address.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 38: { const auto _iter = vnx_queue_get_all_addresses.find(_request_id); if(_iter != vnx_queue_get_all_addresses.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_all_addresses.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 39: { const auto _iter = vnx_queue_find_wallet_by_addr.find(_request_id); if(_iter != vnx_queue_find_wallet_by_addr.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_find_wallet_by_addr.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 40: { const auto _iter = vnx_queue_get_account.find(_request_id); if(_iter != vnx_queue_get_account.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 41: { const auto _iter = vnx_queue_get_all_accounts.find(_request_id); if(_iter != vnx_queue_get_all_accounts.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_all_accounts.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 42: { const auto _iter = vnx_queue_is_locked.find(_request_id); if(_iter != vnx_queue_is_locked.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_is_locked.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 43: { const auto _iter = vnx_queue_lock.find(_request_id); if(_iter != vnx_queue_lock.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_lock.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 44: { const auto _iter = vnx_queue_unlock.find(_request_id); if(_iter != vnx_queue_unlock.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_unlock.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 45: { const auto _iter = vnx_queue_add_account.find(_request_id); if(_iter != vnx_queue_add_account.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_add_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 46: { const auto _iter = vnx_queue_create_account.find(_request_id); if(_iter != vnx_queue_create_account.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_create_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 47: { const auto _iter = vnx_queue_create_wallet.find(_request_id); if(_iter != vnx_queue_create_wallet.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_create_wallet.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 48: { const auto _iter = vnx_queue_import_wallet.find(_request_id); if(_iter != vnx_queue_import_wallet.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_import_wallet.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 49: { const auto _iter = vnx_queue_remove_account.find(_request_id); if(_iter != vnx_queue_remove_account.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_remove_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 50: { const auto _iter = vnx_queue_set_address_count.find(_request_id); if(_iter != vnx_queue_set_address_count.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_set_address_count.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 51: { const auto _iter = vnx_queue_get_mnemonic_wordlist.find(_request_id); if(_iter != vnx_queue_get_mnemonic_wordlist.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_mnemonic_wordlist.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 52: { const auto _iter = vnx_queue_get_token_list.find(_request_id); if(_iter != vnx_queue_get_token_list.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_token_list.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 53: { const auto _iter = vnx_queue_add_token.find(_request_id); if(_iter != vnx_queue_add_token.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_add_token.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 54: { const auto _iter = vnx_queue_rem_token.find(_request_id); if(_iter != vnx_queue_rem_token.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_rem_token.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 55: { const auto _iter = vnx_queue_export_wallet.find(_request_id); if(_iter != vnx_queue_export_wallet.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_export_wallet.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 56: { const auto _iter = vnx_queue_get_master_seed.find(_request_id); if(_iter != vnx_queue_get_master_seed.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_master_seed.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 57: { const auto _iter = vnx_queue_get_mnemonic_seed.find(_request_id); if(_iter != vnx_queue_get_mnemonic_seed.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_mnemonic_seed.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 58: { const auto _iter = vnx_queue_get_farmer_keys.find(_request_id); if(_iter != vnx_queue_get_farmer_keys.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 59: { const auto _iter = vnx_queue_get_all_farmer_keys.find(_request_id); if(_iter != vnx_queue_get_all_farmer_keys.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_get_all_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 60: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter != vnx_queue_http_request.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 61: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter != vnx_queue_http_request_chunk.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 62: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 63: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 64: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 65: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 66: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 67: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 68: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 69: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 70: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t WalletAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("WalletAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_send.find(_request_id); if(_iter == vnx_queue_send.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_send.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 1: { const auto _iter = vnx_queue_send_many.find(_request_id); if(_iter == vnx_queue_send_many.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_send_many.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_send_from.find(_request_id); if(_iter == vnx_queue_send_from.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_send_from.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_deploy.find(_request_id); if(_iter == vnx_queue_deploy.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_deploy.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_execute.find(_request_id); if(_iter == vnx_queue_execute.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_execute.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_deposit.find(_request_id); if(_iter == vnx_queue_deposit.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_deposit.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 6: { const auto _iter = vnx_queue_make_offer.find(_request_id); if(_iter == vnx_queue_make_offer.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_make_offer.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 7: { const auto _iter = vnx_queue_offer_trade.find(_request_id); if(_iter == vnx_queue_offer_trade.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_offer_trade.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_offer_withdraw.find(_request_id); if(_iter == vnx_queue_offer_withdraw.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_offer_withdraw.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 9: { const auto _iter = vnx_queue_accept_offer.find(_request_id); if(_iter == vnx_queue_accept_offer.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_accept_offer.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 10: { const auto _iter = vnx_queue_cancel_offer.find(_request_id); if(_iter == vnx_queue_cancel_offer.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_cancel_offer.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 11: { const auto _iter = vnx_queue_swap_trade.find(_request_id); if(_iter == vnx_queue_swap_trade.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_swap_trade.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 12: { const auto _iter = vnx_queue_swap_add_liquid.find(_request_id); if(_iter == vnx_queue_swap_add_liquid.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_swap_add_liquid.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 13: { const auto _iter = vnx_queue_swap_rem_liquid.find(_request_id); if(_iter == vnx_queue_swap_rem_liquid.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_swap_rem_liquid.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 14: { const auto _iter = vnx_queue_plotnft_exec.find(_request_id); if(_iter == vnx_queue_plotnft_exec.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_plotnft_exec.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 15: { const auto _iter = vnx_queue_plotnft_create.find(_request_id); if(_iter == vnx_queue_plotnft_create.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_plotnft_create.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 16: { const auto _iter = vnx_queue_complete.find(_request_id); if(_iter == vnx_queue_complete.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_complete.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 17: { const auto _iter = vnx_queue_sign_off.find(_request_id); if(_iter == vnx_queue_sign_off.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_sign_off.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 18: { const auto _iter = vnx_queue_sign_msg.find(_request_id); if(_iter == vnx_queue_sign_msg.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_sign_msg.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 19: { const auto _iter = vnx_queue_send_off.find(_request_id); if(_iter == vnx_queue_send_off.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_send_off.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 20: { const auto _iter = vnx_queue_mark_spent.find(_request_id); if(_iter == vnx_queue_mark_spent.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_mark_spent.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 21: { const auto _iter = vnx_queue_reserve.find(_request_id); if(_iter == vnx_queue_reserve.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_reserve.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 22: { const auto _iter = vnx_queue_release.find(_request_id); if(_iter == vnx_queue_release.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_release.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 23: { const auto _iter = vnx_queue_release_all.find(_request_id); if(_iter == vnx_queue_release_all.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_release_all.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 24: { const auto _iter = vnx_queue_reset_cache.find(_request_id); if(_iter == vnx_queue_reset_cache.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_reset_cache.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 25: { const auto _iter = vnx_queue_update_cache.find(_request_id); if(_iter == vnx_queue_update_cache.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_update_cache.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 26: { const auto _iter = vnx_queue_get_history.find(_request_id); if(_iter == vnx_queue_get_history.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_history.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 27: { const auto _iter = vnx_queue_get_tx_log.find(_request_id); if(_iter == vnx_queue_get_tx_log.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_tx_log.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 28: { const auto _iter = vnx_queue_gather_inputs_for.find(_request_id); if(_iter == vnx_queue_gather_inputs_for.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_gather_inputs_for.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 29: { const auto _iter = vnx_queue_get_balance.find(_request_id); if(_iter == vnx_queue_get_balance.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_balance.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::balance_t>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 30: { const auto _iter = vnx_queue_get_balances.find(_request_id); if(_iter == vnx_queue_get_balances.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 31: { const auto _iter = vnx_queue_get_total_balances.find(_request_id); if(_iter == vnx_queue_get_total_balances.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_total_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 32: { const auto _iter = vnx_queue_get_contract_balances.find(_request_id); if(_iter == vnx_queue_get_contract_balances.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contract_balances.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 33: { const auto _iter = vnx_queue_get_contracts.find(_request_id); if(_iter == vnx_queue_get_contracts.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contracts.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 34: { const auto _iter = vnx_queue_get_contracts_owned.find(_request_id); if(_iter == vnx_queue_get_contracts_owned.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_contracts_owned.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 35: { const auto _iter = vnx_queue_get_offers.find(_request_id); if(_iter == vnx_queue_get_offers.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_offers.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 36: { const auto _iter = vnx_queue_get_swap_liquidity.find(_request_id); if(_iter == vnx_queue_get_swap_liquidity.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_swap_liquidity.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to, 2>>>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 37: { const auto _iter = vnx_queue_get_address.find(_request_id); if(_iter == vnx_queue_get_address.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_address.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::addr_t>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 38: { const auto _iter = vnx_queue_get_all_addresses.find(_request_id); if(_iter == vnx_queue_get_all_addresses.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_all_addresses.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 39: { const auto _iter = vnx_queue_find_wallet_by_addr.find(_request_id); if(_iter == vnx_queue_find_wallet_by_addr.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_find_wallet_by_addr.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 40: { const auto _iter = vnx_queue_get_account.find(_request_id); if(_iter == vnx_queue_get_account.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_account.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::account_info_t>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 41: { const auto _iter = vnx_queue_get_all_accounts.find(_request_id); if(_iter == vnx_queue_get_all_accounts.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_all_accounts.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 42: { const auto _iter = vnx_queue_is_locked.find(_request_id); if(_iter == vnx_queue_is_locked.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_is_locked.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 43: { const auto _iter = vnx_queue_lock.find(_request_id); if(_iter == vnx_queue_lock.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_lock.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 44: { const auto _iter = vnx_queue_unlock.find(_request_id); if(_iter == vnx_queue_unlock.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_unlock.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 45: { const auto _iter = vnx_queue_add_account.find(_request_id); if(_iter == vnx_queue_add_account.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_add_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 46: { const auto _iter = vnx_queue_create_account.find(_request_id); if(_iter == vnx_queue_create_account.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_create_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 47: { const auto _iter = vnx_queue_create_wallet.find(_request_id); if(_iter == vnx_queue_create_wallet.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_create_wallet.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 48: { const auto _iter = vnx_queue_import_wallet.find(_request_id); if(_iter == vnx_queue_import_wallet.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_import_wallet.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 49: { const auto _iter = vnx_queue_remove_account.find(_request_id); if(_iter == vnx_queue_remove_account.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_remove_account.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 50: { const auto _iter = vnx_queue_set_address_count.find(_request_id); if(_iter == vnx_queue_set_address_count.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_set_address_count.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 51: { const auto _iter = vnx_queue_get_mnemonic_wordlist.find(_request_id); if(_iter == vnx_queue_get_mnemonic_wordlist.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_mnemonic_wordlist.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 52: { const auto _iter = vnx_queue_get_token_list.find(_request_id); if(_iter == vnx_queue_get_token_list.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_token_list.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 53: { const auto _iter = vnx_queue_add_token.find(_request_id); if(_iter == vnx_queue_add_token.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_add_token.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 54: { const auto _iter = vnx_queue_rem_token.find(_request_id); if(_iter == vnx_queue_rem_token.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_rem_token.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 55: { const auto _iter = vnx_queue_export_wallet.find(_request_id); if(_iter == vnx_queue_export_wallet.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_export_wallet.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 56: { const auto _iter = vnx_queue_get_master_seed.find(_request_id); if(_iter == vnx_queue_get_master_seed.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_master_seed.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::mmx::hash_t>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 57: { const auto _iter = vnx_queue_get_mnemonic_seed.find(_request_id); if(_iter == vnx_queue_get_mnemonic_seed.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_mnemonic_seed.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 58: { const auto _iter = vnx_queue_get_farmer_keys.find(_request_id); if(_iter == vnx_queue_get_farmer_keys.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 59: { const auto _iter = vnx_queue_get_all_farmer_keys.find(_request_id); if(_iter == vnx_queue_get_all_farmer_keys.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_get_all_farmer_keys.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 60: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter == vnx_queue_http_request.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 61: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter == vnx_queue_http_request_chunk.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 62: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 63: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 64: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 65: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 66: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 67: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } case 68: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 69: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 70: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("WalletAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("WalletAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("WalletAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/WalletBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 WalletBase::VNX_TYPE_HASH(0x62207fd96d3aead7ull); const vnx::Hash64 WalletBase::VNX_CODE_HASH(0xb77c4f1e4e419a4ull); WalletBase::WalletBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".key_files", key_files); vnx::read_config(vnx_name + ".accounts", accounts); vnx::read_config(vnx_name + ".config_path", config_path); vnx::read_config(vnx_name + ".storage_path", storage_path); vnx::read_config(vnx_name + ".database_path", database_path); vnx::read_config(vnx_name + ".node_server", node_server); vnx::read_config(vnx_name + ".max_key_files", max_key_files); vnx::read_config(vnx_name + ".num_addresses", num_addresses); vnx::read_config(vnx_name + ".max_addresses", max_addresses); vnx::read_config(vnx_name + ".default_expire", default_expire); vnx::read_config(vnx_name + ".lock_timeout_sec", lock_timeout_sec); vnx::read_config(vnx_name + ".cache_timeout_ms", cache_timeout_ms); vnx::read_config(vnx_name + ".token_whitelist", token_whitelist); } vnx::Hash64 WalletBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string WalletBase::get_type_name() const { return "mmx.Wallet"; } const vnx::TypeCode* WalletBase::get_type_code() const { return mmx::vnx_native_type_code_WalletBase; } void WalletBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_WalletBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, key_files); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, accounts); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, config_path); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, storage_path); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, database_path); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, node_server); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, max_key_files); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, num_addresses); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, max_addresses); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, default_expire); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, lock_timeout_sec); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, cache_timeout_ms); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, token_whitelist); _visitor.type_end(*_type_code); } void WalletBase::write(std::ostream& _out) const { _out << "{"; _out << "\"key_files\": "; vnx::write(_out, key_files); _out << ", \"accounts\": "; vnx::write(_out, accounts); _out << ", \"config_path\": "; vnx::write(_out, config_path); _out << ", \"storage_path\": "; vnx::write(_out, storage_path); _out << ", \"database_path\": "; vnx::write(_out, database_path); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << ", \"max_key_files\": "; vnx::write(_out, max_key_files); _out << ", \"num_addresses\": "; vnx::write(_out, num_addresses); _out << ", \"max_addresses\": "; vnx::write(_out, max_addresses); _out << ", \"default_expire\": "; vnx::write(_out, default_expire); _out << ", \"lock_timeout_sec\": "; vnx::write(_out, lock_timeout_sec); _out << ", \"cache_timeout_ms\": "; vnx::write(_out, cache_timeout_ms); _out << ", \"token_whitelist\": "; vnx::write(_out, token_whitelist); _out << "}"; } void WalletBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WalletBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet"; _object["key_files"] = key_files; _object["accounts"] = accounts; _object["config_path"] = config_path; _object["storage_path"] = storage_path; _object["database_path"] = database_path; _object["node_server"] = node_server; _object["max_key_files"] = max_key_files; _object["num_addresses"] = num_addresses; _object["max_addresses"] = max_addresses; _object["default_expire"] = default_expire; _object["lock_timeout_sec"] = lock_timeout_sec; _object["cache_timeout_ms"] = cache_timeout_ms; _object["token_whitelist"] = token_whitelist; return _object; } void WalletBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "accounts") { _entry.second.to(accounts); } else if(_entry.first == "cache_timeout_ms") { _entry.second.to(cache_timeout_ms); } else if(_entry.first == "config_path") { _entry.second.to(config_path); } else if(_entry.first == "database_path") { _entry.second.to(database_path); } else if(_entry.first == "default_expire") { _entry.second.to(default_expire); } else if(_entry.first == "key_files") { _entry.second.to(key_files); } else if(_entry.first == "lock_timeout_sec") { _entry.second.to(lock_timeout_sec); } else if(_entry.first == "max_addresses") { _entry.second.to(max_addresses); } else if(_entry.first == "max_key_files") { _entry.second.to(max_key_files); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "num_addresses") { _entry.second.to(num_addresses); } else if(_entry.first == "storage_path") { _entry.second.to(storage_path); } else if(_entry.first == "token_whitelist") { _entry.second.to(token_whitelist); } } } vnx::Variant WalletBase::get_field(const std::string& _name) const { if(_name == "key_files") { return vnx::Variant(key_files); } if(_name == "accounts") { return vnx::Variant(accounts); } if(_name == "config_path") { return vnx::Variant(config_path); } if(_name == "storage_path") { return vnx::Variant(storage_path); } if(_name == "database_path") { return vnx::Variant(database_path); } if(_name == "node_server") { return vnx::Variant(node_server); } if(_name == "max_key_files") { return vnx::Variant(max_key_files); } if(_name == "num_addresses") { return vnx::Variant(num_addresses); } if(_name == "max_addresses") { return vnx::Variant(max_addresses); } if(_name == "default_expire") { return vnx::Variant(default_expire); } if(_name == "lock_timeout_sec") { return vnx::Variant(lock_timeout_sec); } if(_name == "cache_timeout_ms") { return vnx::Variant(cache_timeout_ms); } if(_name == "token_whitelist") { return vnx::Variant(token_whitelist); } return vnx::Variant(); } void WalletBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "key_files") { _value.to(key_files); } else if(_name == "accounts") { _value.to(accounts); } else if(_name == "config_path") { _value.to(config_path); } else if(_name == "storage_path") { _value.to(storage_path); } else if(_name == "database_path") { _value.to(database_path); } else if(_name == "node_server") { _value.to(node_server); } else if(_name == "max_key_files") { _value.to(max_key_files); } else if(_name == "num_addresses") { _value.to(num_addresses); } else if(_name == "max_addresses") { _value.to(max_addresses); } else if(_name == "default_expire") { _value.to(default_expire); } else if(_name == "lock_timeout_sec") { _value.to(lock_timeout_sec); } else if(_name == "cache_timeout_ms") { _value.to(cache_timeout_ms); } else if(_name == "token_whitelist") { _value.to(token_whitelist); } } /// \private std::ostream& operator<<(std::ostream& _out, const WalletBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WalletBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WalletBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WalletBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet"; type_code->type_hash = vnx::Hash64(0x62207fd96d3aead7ull); type_code->code_hash = vnx::Hash64(0xb77c4f1e4e419a4ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::WalletBase); type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_t::static_get_type_code(); type_code->methods.resize(71); type_code->methods[0] = ::mmx::Wallet_accept_offer::static_get_type_code(); type_code->methods[1] = ::mmx::Wallet_add_account::static_get_type_code(); type_code->methods[2] = ::mmx::Wallet_add_token::static_get_type_code(); type_code->methods[3] = ::mmx::Wallet_cancel_offer::static_get_type_code(); type_code->methods[4] = ::mmx::Wallet_complete::static_get_type_code(); type_code->methods[5] = ::mmx::Wallet_create_account::static_get_type_code(); type_code->methods[6] = ::mmx::Wallet_create_wallet::static_get_type_code(); type_code->methods[7] = ::mmx::Wallet_deploy::static_get_type_code(); type_code->methods[8] = ::mmx::Wallet_deposit::static_get_type_code(); type_code->methods[9] = ::mmx::Wallet_execute::static_get_type_code(); type_code->methods[10] = ::mmx::Wallet_export_wallet::static_get_type_code(); type_code->methods[11] = ::mmx::Wallet_find_wallet_by_addr::static_get_type_code(); type_code->methods[12] = ::mmx::Wallet_gather_inputs_for::static_get_type_code(); type_code->methods[13] = ::mmx::Wallet_get_account::static_get_type_code(); type_code->methods[14] = ::mmx::Wallet_get_address::static_get_type_code(); type_code->methods[15] = ::mmx::Wallet_get_all_accounts::static_get_type_code(); type_code->methods[16] = ::mmx::Wallet_get_all_addresses::static_get_type_code(); type_code->methods[17] = ::mmx::Wallet_get_all_farmer_keys::static_get_type_code(); type_code->methods[18] = ::mmx::Wallet_get_balance::static_get_type_code(); type_code->methods[19] = ::mmx::Wallet_get_balances::static_get_type_code(); type_code->methods[20] = ::mmx::Wallet_get_contract_balances::static_get_type_code(); type_code->methods[21] = ::mmx::Wallet_get_contracts::static_get_type_code(); type_code->methods[22] = ::mmx::Wallet_get_contracts_owned::static_get_type_code(); type_code->methods[23] = ::mmx::Wallet_get_farmer_keys::static_get_type_code(); type_code->methods[24] = ::mmx::Wallet_get_history::static_get_type_code(); type_code->methods[25] = ::mmx::Wallet_get_master_seed::static_get_type_code(); type_code->methods[26] = ::mmx::Wallet_get_mnemonic_seed::static_get_type_code(); type_code->methods[27] = ::mmx::Wallet_get_mnemonic_wordlist::static_get_type_code(); type_code->methods[28] = ::mmx::Wallet_get_offers::static_get_type_code(); type_code->methods[29] = ::mmx::Wallet_get_swap_liquidity::static_get_type_code(); type_code->methods[30] = ::mmx::Wallet_get_token_list::static_get_type_code(); type_code->methods[31] = ::mmx::Wallet_get_total_balances::static_get_type_code(); type_code->methods[32] = ::mmx::Wallet_get_tx_log::static_get_type_code(); type_code->methods[33] = ::mmx::Wallet_import_wallet::static_get_type_code(); type_code->methods[34] = ::mmx::Wallet_is_locked::static_get_type_code(); type_code->methods[35] = ::mmx::Wallet_lock::static_get_type_code(); type_code->methods[36] = ::mmx::Wallet_make_offer::static_get_type_code(); type_code->methods[37] = ::mmx::Wallet_mark_spent::static_get_type_code(); type_code->methods[38] = ::mmx::Wallet_offer_trade::static_get_type_code(); type_code->methods[39] = ::mmx::Wallet_offer_withdraw::static_get_type_code(); type_code->methods[40] = ::mmx::Wallet_plotnft_create::static_get_type_code(); type_code->methods[41] = ::mmx::Wallet_plotnft_exec::static_get_type_code(); type_code->methods[42] = ::mmx::Wallet_release::static_get_type_code(); type_code->methods[43] = ::mmx::Wallet_release_all::static_get_type_code(); type_code->methods[44] = ::mmx::Wallet_rem_token::static_get_type_code(); type_code->methods[45] = ::mmx::Wallet_remove_account::static_get_type_code(); type_code->methods[46] = ::mmx::Wallet_reserve::static_get_type_code(); type_code->methods[47] = ::mmx::Wallet_reset_cache::static_get_type_code(); type_code->methods[48] = ::mmx::Wallet_send::static_get_type_code(); type_code->methods[49] = ::mmx::Wallet_send_from::static_get_type_code(); type_code->methods[50] = ::mmx::Wallet_send_many::static_get_type_code(); type_code->methods[51] = ::mmx::Wallet_send_off::static_get_type_code(); type_code->methods[52] = ::mmx::Wallet_set_address_count::static_get_type_code(); type_code->methods[53] = ::mmx::Wallet_sign_msg::static_get_type_code(); type_code->methods[54] = ::mmx::Wallet_sign_off::static_get_type_code(); type_code->methods[55] = ::mmx::Wallet_swap_add_liquid::static_get_type_code(); type_code->methods[56] = ::mmx::Wallet_swap_rem_liquid::static_get_type_code(); type_code->methods[57] = ::mmx::Wallet_swap_trade::static_get_type_code(); type_code->methods[58] = ::mmx::Wallet_unlock::static_get_type_code(); type_code->methods[59] = ::mmx::Wallet_update_cache::static_get_type_code(); type_code->methods[60] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[61] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[62] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[63] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[64] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[65] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[66] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[67] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[68] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->methods[69] = ::vnx::addons::HttpComponent_http_request::static_get_type_code(); type_code->methods[70] = ::vnx::addons::HttpComponent_http_request_chunk::static_get_type_code(); type_code->fields.resize(13); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "key_files"; field.code = {12, 32}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "accounts"; field.code = {12, 19, 0}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "config_path"; field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "storage_path"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "database_path"; field.value = vnx::to_string("wallet/"); field.code = {32}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "max_key_files"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[7]; field.data_size = 4; field.name = "num_addresses"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[8]; field.data_size = 4; field.name = "max_addresses"; field.value = vnx::to_string(10000); field.code = {3}; } { auto& field = type_code->fields[9]; field.data_size = 4; field.name = "default_expire"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[10]; field.data_size = 4; field.name = "lock_timeout_sec"; field.value = vnx::to_string(600); field.code = {7}; } { auto& field = type_code->fields[11]; field.data_size = 4; field.name = "cache_timeout_ms"; field.value = vnx::to_string(1000); field.code = {7}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "token_whitelist"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } void WalletBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr WalletBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x3299e81eb354b78full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_accept_offer_return::create(); _return_value->_ret_0 = accept_offer(_args->index, _args->address, _args->dst_addr, _args->price, _args->options); return _return_value; } case 0x92d2d3518d9c33aeull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_add_account_return::create(); add_account(_args->index, _args->config, _args->passphrase); return _return_value; } case 0x15fcc67eabc550b6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_add_token_return::create(); add_token(_args->address); return _return_value; } case 0x200cca704ba873c6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_cancel_offer_return::create(); _return_value->_ret_0 = cancel_offer(_args->index, _args->address, _args->options); return _return_value; } case 0x20da222e7c7de702ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_complete_return::create(); _return_value->_ret_0 = complete(_args->index, _args->tx, _args->options); return _return_value; } case 0x11cd618b00e9e56cull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_create_account_return::create(); create_account(_args->config, _args->passphrase); return _return_value; } case 0xdcc08a3a1b171a19ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_create_wallet_return::create(); create_wallet(_args->config, _args->words, _args->passphrase); return _return_value; } case 0xcd71b07853d17497ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_deploy_return::create(); _return_value->_ret_0 = deploy(_args->index, _args->contract, _args->options); return _return_value; } case 0x4bf71b9049e1c689ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_deposit_return::create(); _return_value->_ret_0 = deposit(_args->index, _args->address, _args->method, _args->args, _args->amount, _args->currency, _args->options); return _return_value; } case 0x51a1276a27db7b4ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_execute_return::create(); _return_value->_ret_0 = execute(_args->index, _args->address, _args->method, _args->args, _args->user, _args->options); return _return_value; } case 0xd52b494df565ce7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_export_wallet_return::create(); _return_value->_ret_0 = export_wallet(_args->index); return _return_value; } case 0x320237e79adcef6bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_find_wallet_by_addr_return::create(); _return_value->_ret_0 = find_wallet_by_addr(_args->address); return _return_value; } case 0x31d9b9888b8c2de3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_gather_inputs_for_return::create(); _return_value->_ret_0 = gather_inputs_for(_args->index, _args->amount, _args->currency, _args->options); return _return_value; } case 0xf9669d0d42aec09eull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_account_return::create(); _return_value->_ret_0 = get_account(_args->index); return _return_value; } case 0xccad8dfe1543aa77ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_address_return::create(); _return_value->_ret_0 = get_address(_args->index, _args->offset); return _return_value; } case 0xdf8bfad64085cb83ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_all_accounts_return::create(); _return_value->_ret_0 = get_all_accounts(); return _return_value; } case 0xf5e2b4554613fd97ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_all_addresses_return::create(); _return_value->_ret_0 = get_all_addresses(_args->index); return _return_value; } case 0xc6a03b3f813d071dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_all_farmer_keys_return::create(); _return_value->_ret_0 = get_all_farmer_keys(); return _return_value; } case 0x1bc2c2dd67ab2829ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_balance_return::create(); _return_value->_ret_0 = get_balance(_args->index, _args->currency); return _return_value; } case 0x5be581d54ae69a4ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_balances_return::create(); _return_value->_ret_0 = get_balances(_args->index, _args->with_zero); return _return_value; } case 0x4d6b36c0c2804d26ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_contract_balances_return::create(); _return_value->_ret_0 = get_contract_balances(_args->address); return _return_value; } case 0x9ff1932bcec18d57ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_contracts_return::create(); _return_value->_ret_0 = get_contracts(_args->index, _args->type_name, _args->type_hash); return _return_value; } case 0x7834485ec000f577ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_contracts_owned_return::create(); _return_value->_ret_0 = get_contracts_owned(_args->index, _args->type_name, _args->type_hash); return _return_value; } case 0x44709e11ff3ff3eeull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_farmer_keys_return::create(); _return_value->_ret_0 = get_farmer_keys(_args->index); return _return_value; } case 0x921f73f3d97d2d4dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_history_return::create(); _return_value->_ret_0 = get_history(_args->index, _args->filter); return _return_value; } case 0x8fddd77ece4d295bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_master_seed_return::create(); _return_value->_ret_0 = get_master_seed(_args->index); return _return_value; } case 0xacf58d3b1a8ce4c0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_mnemonic_seed_return::create(); _return_value->_ret_0 = get_mnemonic_seed(_args->index); return _return_value; } case 0xb833298e3ff28a44ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_mnemonic_wordlist_return::create(); _return_value->_ret_0 = get_mnemonic_wordlist(_args->lang); return _return_value; } case 0x6dacbe70cbe08925ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_offers_return::create(); _return_value->_ret_0 = get_offers(_args->index, _args->state); return _return_value; } case 0x3a8f17d496f625bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_swap_liquidity_return::create(); _return_value->_ret_0 = get_swap_liquidity(_args->index); return _return_value; } case 0x322b4f4af3737efcull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_token_list_return::create(); _return_value->_ret_0 = get_token_list(); return _return_value; } case 0xedd130caba2e2f04ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_total_balances_return::create(); _return_value->_ret_0 = get_total_balances(_args->addresses); return _return_value; } case 0xc5570936be29c0ebull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_get_tx_log_return::create(); _return_value->_ret_0 = get_tx_log(_args->index, _args->limit); return _return_value; } case 0x63a1d5b2fe482dd1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_import_wallet_return::create(); import_wallet(_args->config, _args->key_file, _args->passphrase); return _return_value; } case 0x6087e83febcc233ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_is_locked_return::create(); _return_value->_ret_0 = is_locked(_args->index); return _return_value; } case 0x9072deb8ab538b2bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_lock_return::create(); lock(_args->index); return _return_value; } case 0x8b0cf597e8265a73ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_make_offer_return::create(); _return_value->_ret_0 = make_offer(_args->index, _args->owner, _args->bid_amount, _args->bid_currency, _args->ask_amount, _args->ask_currency, _args->options); return _return_value; } case 0x107fed23348b3333ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_mark_spent_return::create(); mark_spent(_args->index, _args->amounts); return _return_value; } case 0x557a94a5a4887bf2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_offer_trade_return::create(); _return_value->_ret_0 = offer_trade(_args->index, _args->address, _args->amount, _args->dst_addr, _args->price, _args->options); return _return_value; } case 0x790a334fbf5dd1e6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_offer_withdraw_return::create(); _return_value->_ret_0 = offer_withdraw(_args->index, _args->address, _args->options); return _return_value; } case 0x6b0c985ca2c555c9ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_plotnft_create_return::create(); _return_value->_ret_0 = plotnft_create(_args->index, _args->name, _args->owner, _args->options); return _return_value; } case 0xca9e9d0dfde795d1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_plotnft_exec_return::create(); _return_value->_ret_0 = plotnft_exec(_args->address, _args->method, _args->args, _args->options); return _return_value; } case 0x2cd72a3370e05db3ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_release_return::create(); release(_args->index, _args->amounts); return _return_value; } case 0x4bd57b9deca4be51ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_release_all_return::create(); release_all(); return _return_value; } case 0xc913cdd1600a2609ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_rem_token_return::create(); rem_token(_args->address); return _return_value; } case 0xdf7d8816958bcb8bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_remove_account_return::create(); remove_account(_args->index, _args->account); return _return_value; } case 0xd14c466e8e7ebd76ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_reserve_return::create(); reserve(_args->index, _args->amounts); return _return_value; } case 0x922c4f0299ea0bf4ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_reset_cache_return::create(); reset_cache(_args->index); return _return_value; } case 0x3842658ae3c2d5ebull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_send_return::create(); _return_value->_ret_0 = send(_args->index, _args->amount, _args->dst_addr, _args->currency, _args->options); return _return_value; } case 0x40c3c88665341592ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_send_from_return::create(); _return_value->_ret_0 = send_from(_args->index, _args->amount, _args->dst_addr, _args->src_addr, _args->currency, _args->options); return _return_value; } case 0x4f35769a1b4c6786ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_send_many_return::create(); _return_value->_ret_0 = send_many(_args->index, _args->amounts, _args->currency, _args->options); return _return_value; } case 0x8b7bfc0751d27adbull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_send_off_return::create(); send_off(_args->index, _args->tx); return _return_value; } case 0x9638ddc0c1d52b15ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_set_address_count_return::create(); set_address_count(_args->index, _args->count); return _return_value; } case 0x5bc54cc8b0112d3aull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_sign_msg_return::create(); _return_value->_ret_0 = sign_msg(_args->index, _args->address, _args->msg); return _return_value; } case 0x232c89cf3ed4d5b1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_sign_off_return::create(); _return_value->_ret_0 = sign_off(_args->index, _args->tx, _args->options); return _return_value; } case 0xe053d1ae718e2f64ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_swap_add_liquid_return::create(); _return_value->_ret_0 = swap_add_liquid(_args->index, _args->address, _args->amount, _args->pool_idx, _args->options); return _return_value; } case 0x6494b41c51e158eaull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_swap_rem_liquid_return::create(); _return_value->_ret_0 = swap_rem_liquid(_args->index, _args->address, _args->amount, _args->options); return _return_value; } case 0x4b5a42cbf6657910ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_swap_trade_return::create(); _return_value->_ret_0 = swap_trade(_args->index, _args->address, _args->amount, _args->currency, _args->min_trade, _args->num_iter, _args->options); return _return_value; } case 0x800deedf12a4df74ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_unlock_return::create(); unlock(_args->index, _args->passphrase); return _return_value; } case 0xf98cf07accda73b8ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::Wallet_update_cache_return::create(); update_cache(_args->index); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } case 0xe0b6c38f619bad92ull: { auto _args = std::static_pointer_cast(_method); http_request_async(_args->request, _args->sub_path, _request_id); return nullptr; } case 0x97e79d08440406d5ull: { auto _args = std::static_pointer_cast(_method); http_request_chunk_async(_args->request, _args->sub_path, _args->offset, _args->max_bytes, _request_id); return nullptr; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void WalletBase::http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void WalletBase::http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_chunk_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.max_key_files, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.num_addresses, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.max_addresses, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.default_expire, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.lock_timeout_sec, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.cache_timeout_ms, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.key_files, type_code, _field->code.data()); break; case 1: vnx::read(in, value.accounts, type_code, _field->code.data()); break; case 2: vnx::read(in, value.config_path, type_code, _field->code.data()); break; case 3: vnx::read(in, value.storage_path, type_code, _field->code.data()); break; case 4: vnx::read(in, value.database_path, type_code, _field->code.data()); break; case 5: vnx::read(in, value.node_server, type_code, _field->code.data()); break; case 12: vnx::read(in, value.token_whitelist, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::WalletBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_WalletBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::WalletBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(24); vnx::write_value(_buf + 0, value.max_key_files); vnx::write_value(_buf + 4, value.num_addresses); vnx::write_value(_buf + 8, value.max_addresses); vnx::write_value(_buf + 12, value.default_expire); vnx::write_value(_buf + 16, value.lock_timeout_sec); vnx::write_value(_buf + 20, value.cache_timeout_ms); vnx::write(out, value.key_files, type_code, type_code->fields[0].code.data()); vnx::write(out, value.accounts, type_code, type_code->fields[1].code.data()); vnx::write(out, value.config_path, type_code, type_code->fields[2].code.data()); vnx::write(out, value.storage_path, type_code, type_code->fields[3].code.data()); vnx::write(out, value.database_path, type_code, type_code->fields[4].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[5].code.data()); vnx::write(out, value.token_whitelist, type_code, type_code->fields[12].code.data()); } void read(std::istream& in, ::mmx::WalletBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::WalletBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::WalletBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/WalletClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { WalletClient::WalletClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } WalletClient::WalletClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } std::shared_ptr WalletClient::send(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_send::create(); _method->index = index; _method->amount = amount; _method->dst_addr = dst_addr; _method->currency = currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::send_many(const uint32_t& index, const std::vector>& amounts, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_send_many::create(); _method->index = index; _method->amounts = amounts; _method->currency = currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::send_from(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& dst_addr, const ::mmx::addr_t& src_addr, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_send_from::create(); _method->index = index; _method->amount = amount; _method->dst_addr = dst_addr; _method->src_addr = src_addr; _method->currency = currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::deploy(const uint32_t& index, std::shared_ptr contract, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_deploy::create(); _method->index = index; _method->contract = contract; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::execute(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const vnx::optional& user, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_execute::create(); _method->index = index; _method->address = address; _method->method = method; _method->args = args; _method->user = user; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::deposit(const uint32_t& index, const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_deposit::create(); _method->index = index; _method->address = address; _method->method = method; _method->args = args; _method->amount = amount; _method->currency = currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::make_offer(const uint32_t& index, const uint32_t& owner, const ::mmx::uint128& bid_amount, const ::mmx::addr_t& bid_currency, const ::mmx::uint128& ask_amount, const ::mmx::addr_t& ask_currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_make_offer::create(); _method->index = index; _method->owner = owner; _method->bid_amount = bid_amount; _method->bid_currency = bid_currency; _method->ask_amount = ask_amount; _method->ask_currency = ask_currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::offer_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_offer_trade::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->dst_addr = dst_addr; _method->price = price; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::offer_withdraw(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_offer_withdraw::create(); _method->index = index; _method->address = address; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::accept_offer(const uint32_t& index, const ::mmx::addr_t& address, const uint32_t& dst_addr, const ::mmx::uint128& price, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_accept_offer::create(); _method->index = index; _method->address = address; _method->dst_addr = dst_addr; _method->price = price; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::cancel_offer(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_cancel_offer::create(); _method->index = index; _method->address = address; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::swap_trade(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const vnx::optional<::mmx::uint128>& min_trade, const int32_t& num_iter, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_swap_trade::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->currency = currency; _method->min_trade = min_trade; _method->num_iter = num_iter; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::swap_add_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const uint32_t& pool_idx, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_swap_add_liquid::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->pool_idx = pool_idx; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::swap_rem_liquid(const uint32_t& index, const ::mmx::addr_t& address, const std::array<::mmx::uint128, 2>& amount, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_swap_rem_liquid::create(); _method->index = index; _method->address = address; _method->amount = amount; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::plotnft_exec(const ::mmx::addr_t& address, const std::string& method, const std::vector<::vnx::Variant>& args, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_plotnft_exec::create(); _method->address = address; _method->method = method; _method->args = args; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::plotnft_create(const uint32_t& index, const std::string& name, const vnx::optional& owner, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_plotnft_create::create(); _method->index = index; _method->name = name; _method->owner = owner; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::complete(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_complete::create(); _method->index = index; _method->tx = tx; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::sign_off(const uint32_t& index, std::shared_ptr tx, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_sign_off::create(); _method->index = index; _method->tx = tx; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::sign_msg(const uint32_t& index, const ::mmx::addr_t& address, const ::mmx::hash_t& msg) { auto _method = ::mmx::Wallet_sign_msg::create(); _method->index = index; _method->address = address; _method->msg = msg; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } void WalletClient::send_off(const uint32_t& index, std::shared_ptr tx) { auto _method = ::mmx::Wallet_send_off::create(); _method->index = index; _method->tx = tx; vnx_request(_method, false); } void WalletClient::send_off_async(const uint32_t& index, std::shared_ptr tx) { auto _method = ::mmx::Wallet_send_off::create(); _method->index = index; _method->tx = tx; vnx_request(_method, true); } void WalletClient::mark_spent(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_mark_spent::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, false); } void WalletClient::mark_spent_async(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_mark_spent::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, true); } void WalletClient::reserve(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_reserve::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, false); } void WalletClient::reserve_async(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_reserve::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, true); } void WalletClient::release(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_release::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, false); } void WalletClient::release_async(const uint32_t& index, const std::map, ::mmx::uint128>& amounts) { auto _method = ::mmx::Wallet_release::create(); _method->index = index; _method->amounts = amounts; vnx_request(_method, true); } void WalletClient::release_all() { auto _method = ::mmx::Wallet_release_all::create(); vnx_request(_method, false); } void WalletClient::release_all_async() { auto _method = ::mmx::Wallet_release_all::create(); vnx_request(_method, true); } void WalletClient::reset_cache(const uint32_t& index) { auto _method = ::mmx::Wallet_reset_cache::create(); _method->index = index; vnx_request(_method, false); } void WalletClient::reset_cache_async(const uint32_t& index) { auto _method = ::mmx::Wallet_reset_cache::create(); _method->index = index; vnx_request(_method, true); } void WalletClient::update_cache(const uint32_t& index) { auto _method = ::mmx::Wallet_update_cache::create(); _method->index = index; vnx_request(_method, false); } void WalletClient::update_cache_async(const uint32_t& index) { auto _method = ::mmx::Wallet_update_cache::create(); _method->index = index; vnx_request(_method, true); } std::vector<::mmx::tx_entry_t> WalletClient::get_history(const uint32_t& index, const ::mmx::query_filter_t& filter) { auto _method = ::mmx::Wallet_get_history::create(); _method->index = index; _method->filter = filter; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector<::mmx::tx_log_entry_t> WalletClient::get_tx_log(const uint32_t& index, const int32_t& limit) { auto _method = ::mmx::Wallet_get_tx_log::create(); _method->index = index; _method->limit = limit; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector<::mmx::txin_t> WalletClient::gather_inputs_for(const uint32_t& index, const ::mmx::uint128& amount, const ::mmx::addr_t& currency, const ::mmx::spend_options_t& options) { auto _method = ::mmx::Wallet_gather_inputs_for::create(); _method->index = index; _method->amount = amount; _method->currency = currency; _method->options = options; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::mmx::balance_t WalletClient::get_balance(const uint32_t& index, const ::mmx::addr_t& currency) { auto _method = ::mmx::Wallet_get_balance::create(); _method->index = index; _method->currency = currency; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::balance_t>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::balance_t> WalletClient::get_balances(const uint32_t& index, const vnx::bool_t& with_zero) { auto _method = ::mmx::Wallet_get_balances::create(); _method->index = index; _method->with_zero = with_zero; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::balance_t> WalletClient::get_total_balances(const std::vector<::mmx::addr_t>& addresses) { auto _method = ::mmx::Wallet_get_total_balances::create(); _method->addresses = addresses; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, ::mmx::balance_t> WalletClient::get_contract_balances(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_get_contract_balances::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, std::shared_ptr> WalletClient::get_contracts(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash) { auto _method = ::mmx::Wallet_get_contracts::create(); _method->index = index; _method->type_name = type_name; _method->type_hash = type_hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, std::shared_ptr> WalletClient::get_contracts_owned(const uint32_t& index, const vnx::optional& type_name, const vnx::optional<::mmx::hash_t>& type_hash) { auto _method = ::mmx::Wallet_get_contracts_owned::create(); _method->index = index; _method->type_name = type_name; _method->type_hash = type_hash; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector<::mmx::offer_data_t> WalletClient::get_offers(const uint32_t& index, const vnx::bool_t& state) { auto _method = ::mmx::Wallet_get_offers::create(); _method->index = index; _method->state = state; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::map<::mmx::addr_t, std::array, 2>> WalletClient::get_swap_liquidity(const uint32_t& index) { auto _method = ::mmx::Wallet_get_swap_liquidity::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to, 2>>>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::mmx::addr_t WalletClient::get_address(const uint32_t& index, const uint32_t& offset) { auto _method = ::mmx::Wallet_get_address::create(); _method->index = index; _method->offset = offset; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::addr_t>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector<::mmx::addr_t> WalletClient::get_all_addresses(const int32_t& index) { auto _method = ::mmx::Wallet_get_all_addresses::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } int32_t WalletClient::find_wallet_by_addr(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_find_wallet_by_addr::create(); _method->address = address; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::mmx::account_info_t WalletClient::get_account(const uint32_t& index) { auto _method = ::mmx::Wallet_get_account::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::account_info_t>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector<::mmx::account_info_t> WalletClient::get_all_accounts() { auto _method = ::mmx::Wallet_get_all_accounts::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } vnx::bool_t WalletClient::is_locked(const uint32_t& index) { auto _method = ::mmx::Wallet_is_locked::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("WalletClient: invalid return value"); } } void WalletClient::lock(const uint32_t& index) { auto _method = ::mmx::Wallet_lock::create(); _method->index = index; vnx_request(_method, false); } void WalletClient::lock_async(const uint32_t& index) { auto _method = ::mmx::Wallet_lock::create(); _method->index = index; vnx_request(_method, true); } void WalletClient::unlock(const uint32_t& index, const std::string& passphrase) { auto _method = ::mmx::Wallet_unlock::create(); _method->index = index; _method->passphrase = passphrase; vnx_request(_method, false); } void WalletClient::unlock_async(const uint32_t& index, const std::string& passphrase) { auto _method = ::mmx::Wallet_unlock::create(); _method->index = index; _method->passphrase = passphrase; vnx_request(_method, true); } void WalletClient::add_account(const uint32_t& index, const ::mmx::account_t& config, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_add_account::create(); _method->index = index; _method->config = config; _method->passphrase = passphrase; vnx_request(_method, false); } void WalletClient::add_account_async(const uint32_t& index, const ::mmx::account_t& config, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_add_account::create(); _method->index = index; _method->config = config; _method->passphrase = passphrase; vnx_request(_method, true); } void WalletClient::create_account(const ::mmx::account_t& config, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_create_account::create(); _method->config = config; _method->passphrase = passphrase; vnx_request(_method, false); } void WalletClient::create_account_async(const ::mmx::account_t& config, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_create_account::create(); _method->config = config; _method->passphrase = passphrase; vnx_request(_method, true); } void WalletClient::create_wallet(const ::mmx::account_t& config, const vnx::optional& words, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_create_wallet::create(); _method->config = config; _method->words = words; _method->passphrase = passphrase; vnx_request(_method, false); } void WalletClient::create_wallet_async(const ::mmx::account_t& config, const vnx::optional& words, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_create_wallet::create(); _method->config = config; _method->words = words; _method->passphrase = passphrase; vnx_request(_method, true); } void WalletClient::import_wallet(const ::mmx::account_t& config, std::shared_ptr key_file, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_import_wallet::create(); _method->config = config; _method->key_file = key_file; _method->passphrase = passphrase; vnx_request(_method, false); } void WalletClient::import_wallet_async(const ::mmx::account_t& config, std::shared_ptr key_file, const vnx::optional& passphrase) { auto _method = ::mmx::Wallet_import_wallet::create(); _method->config = config; _method->key_file = key_file; _method->passphrase = passphrase; vnx_request(_method, true); } void WalletClient::remove_account(const uint32_t& index, const uint32_t& account) { auto _method = ::mmx::Wallet_remove_account::create(); _method->index = index; _method->account = account; vnx_request(_method, false); } void WalletClient::remove_account_async(const uint32_t& index, const uint32_t& account) { auto _method = ::mmx::Wallet_remove_account::create(); _method->index = index; _method->account = account; vnx_request(_method, true); } void WalletClient::set_address_count(const uint32_t& index, const uint32_t& count) { auto _method = ::mmx::Wallet_set_address_count::create(); _method->index = index; _method->count = count; vnx_request(_method, false); } void WalletClient::set_address_count_async(const uint32_t& index, const uint32_t& count) { auto _method = ::mmx::Wallet_set_address_count::create(); _method->index = index; _method->count = count; vnx_request(_method, true); } std::vector WalletClient::get_mnemonic_wordlist(const std::string& lang) { auto _method = ::mmx::Wallet_get_mnemonic_wordlist::create(); _method->lang = lang; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::set<::mmx::addr_t> WalletClient::get_token_list() { auto _method = ::mmx::Wallet_get_token_list::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } void WalletClient::add_token(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_add_token::create(); _method->address = address; vnx_request(_method, false); } void WalletClient::add_token_async(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_add_token::create(); _method->address = address; vnx_request(_method, true); } void WalletClient::rem_token(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_rem_token::create(); _method->address = address; vnx_request(_method, false); } void WalletClient::rem_token_async(const ::mmx::addr_t& address) { auto _method = ::mmx::Wallet_rem_token::create(); _method->address = address; vnx_request(_method, true); } std::shared_ptr WalletClient::export_wallet(const uint32_t& index) { auto _method = ::mmx::Wallet_export_wallet::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::mmx::hash_t WalletClient::get_master_seed(const uint32_t& index) { auto _method = ::mmx::Wallet_get_master_seed::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::mmx::hash_t>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector WalletClient::get_mnemonic_seed(const uint32_t& index) { auto _method = ::mmx::Wallet_get_mnemonic_seed::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::pair<::mmx::skey_t, ::mmx::pubkey_t> WalletClient::get_farmer_keys(const uint32_t& index) { auto _method = ::mmx::Wallet_get_farmer_keys::create(); _method->index = index; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::vector> WalletClient::get_all_farmer_keys() { auto _method = ::mmx::Wallet_get_all_farmer_keys::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::http_request(std::shared_ptr request, const std::string& sub_path) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::vnx::Object WalletClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } ::vnx::Variant WalletClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } void WalletClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void WalletClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void WalletClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void WalletClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode WalletClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } std::shared_ptr WalletClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WalletClient: invalid return value"); } } void WalletClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void WalletClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void WalletClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void WalletClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t WalletClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("WalletClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/WalletFile.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 WalletFile::VNX_TYPE_HASH(0xefcdc0f20fc4360eull); const vnx::Hash64 WalletFile::VNX_CODE_HASH(0x82ac26e33ee406a0ull); vnx::Hash64 WalletFile::get_type_hash() const { return VNX_TYPE_HASH; } std::string WalletFile::get_type_name() const { return "mmx.WalletFile"; } const vnx::TypeCode* WalletFile::get_type_code() const { return mmx::vnx_native_type_code_WalletFile; } std::shared_ptr WalletFile::create() { return std::make_shared(); } std::shared_ptr WalletFile::clone() const { return std::make_shared(*this); } void WalletFile::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void WalletFile::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void WalletFile::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_WalletFile; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_end(*_type_code); } void WalletFile::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.WalletFile\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << "}"; } void WalletFile::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WalletFile::to_object() const { vnx::Object _object; _object["__type"] = "mmx.WalletFile"; _object["addresses"] = addresses; return _object; } void WalletFile::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } } } vnx::Variant WalletFile::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } return vnx::Variant(); } void WalletFile::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } } /// \private std::ostream& operator<<(std::ostream& _out, const WalletFile& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WalletFile& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WalletFile::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WalletFile::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.WalletFile"; type_code->type_hash = vnx::Hash64(0xefcdc0f20fc4360eull); type_code->code_hash = vnx::Hash64(0x82ac26e33ee406a0ull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::WalletFile); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } std::shared_ptr WalletFile::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::WalletFile& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_WalletFile; out.write_type_code(type_code); vnx::write_class_header<::mmx::WalletFile>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::WalletFile& value) { value.read(in); } void write(std::ostream& out, const ::mmx::WalletFile& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::WalletFile& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_accept_offer.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_accept_offer::VNX_TYPE_HASH(0x3299e81eb354b78full); const vnx::Hash64 Wallet_accept_offer::VNX_CODE_HASH(0xaf382e8c8d65c4a9ull); vnx::Hash64 Wallet_accept_offer::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_accept_offer::get_type_name() const { return "mmx.Wallet.accept_offer"; } const vnx::TypeCode* Wallet_accept_offer::get_type_code() const { return mmx::vnx_native_type_code_Wallet_accept_offer; } std::shared_ptr Wallet_accept_offer::create() { return std::make_shared(); } std::shared_ptr Wallet_accept_offer::clone() const { return std::make_shared(*this); } void Wallet_accept_offer::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_accept_offer::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_accept_offer::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_accept_offer; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, dst_addr); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, price); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_accept_offer::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.accept_offer\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"dst_addr\": "; vnx::write(_out, dst_addr); _out << ", \"price\": "; vnx::write(_out, price); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_accept_offer::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_accept_offer::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.accept_offer"; _object["index"] = index; _object["address"] = address; _object["dst_addr"] = dst_addr; _object["price"] = price; _object["options"] = options; return _object; } void Wallet_accept_offer::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "dst_addr") { _entry.second.to(dst_addr); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "price") { _entry.second.to(price); } } } vnx::Variant Wallet_accept_offer::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "dst_addr") { return vnx::Variant(dst_addr); } if(_name == "price") { return vnx::Variant(price); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_accept_offer::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "dst_addr") { _value.to(dst_addr); } else if(_name == "price") { _value.to(price); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_accept_offer& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_accept_offer& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_accept_offer::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_accept_offer::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.accept_offer"; type_code->type_hash = vnx::Hash64(0x3299e81eb354b78full); type_code->code_hash = vnx::Hash64(0xaf382e8c8d65c4a9ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_accept_offer); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_accept_offer_return::static_get_type_code(); type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "dst_addr"; field.code = {3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "price"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.dst_addr, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 3: vnx::read(in, value.price, type_code, _field->code.data()); break; case 4: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_accept_offer& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_accept_offer; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_accept_offer>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.dst_addr); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.price, type_code, type_code->fields[3].code.data()); vnx::write(out, value.options, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::Wallet_accept_offer& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_accept_offer& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_accept_offer_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_accept_offer_return::VNX_TYPE_HASH(0xb44ec1a26ab66acdull); const vnx::Hash64 Wallet_accept_offer_return::VNX_CODE_HASH(0x14dc42f2564e97bull); vnx::Hash64 Wallet_accept_offer_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_accept_offer_return::get_type_name() const { return "mmx.Wallet.accept_offer.return"; } const vnx::TypeCode* Wallet_accept_offer_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_accept_offer_return; } std::shared_ptr Wallet_accept_offer_return::create() { return std::make_shared(); } std::shared_ptr Wallet_accept_offer_return::clone() const { return std::make_shared(*this); } void Wallet_accept_offer_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_accept_offer_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_accept_offer_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_accept_offer_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_accept_offer_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.accept_offer.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_accept_offer_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_accept_offer_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.accept_offer.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_accept_offer_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_accept_offer_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_accept_offer_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_accept_offer_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_accept_offer_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_accept_offer_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_accept_offer_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.accept_offer.return"; type_code->type_hash = vnx::Hash64(0xb44ec1a26ab66acdull); type_code->code_hash = vnx::Hash64(0x14dc42f2564e97bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_accept_offer_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_accept_offer_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_accept_offer_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_accept_offer_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_accept_offer_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_accept_offer_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_accept_offer_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_add_account.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_add_account::VNX_TYPE_HASH(0x92d2d3518d9c33aeull); const vnx::Hash64 Wallet_add_account::VNX_CODE_HASH(0xac3163168025d3e3ull); vnx::Hash64 Wallet_add_account::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_add_account::get_type_name() const { return "mmx.Wallet.add_account"; } const vnx::TypeCode* Wallet_add_account::get_type_code() const { return mmx::vnx_native_type_code_Wallet_add_account; } std::shared_ptr Wallet_add_account::create() { return std::make_shared(); } std::shared_ptr Wallet_add_account::clone() const { return std::make_shared(*this); } void Wallet_add_account::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_add_account::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_add_account::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_add_account; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, config); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, passphrase); _visitor.type_end(*_type_code); } void Wallet_add_account::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.add_account\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"config\": "; vnx::write(_out, config); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << "}"; } void Wallet_add_account::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_add_account::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.add_account"; _object["index"] = index; _object["config"] = config; _object["passphrase"] = passphrase; return _object; } void Wallet_add_account::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "config") { _entry.second.to(config); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } } } vnx::Variant Wallet_add_account::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "config") { return vnx::Variant(config); } if(_name == "passphrase") { return vnx::Variant(passphrase); } return vnx::Variant(); } void Wallet_add_account::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "config") { _value.to(config); } else if(_name == "passphrase") { _value.to(passphrase); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_add_account& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_add_account& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_add_account::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_add_account::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.add_account"; type_code->type_hash = vnx::Hash64(0x92d2d3518d9c33aeull); type_code->code_hash = vnx::Hash64(0xac3163168025d3e3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_add_account); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_t::static_get_type_code(); type_code->return_type = ::mmx::Wallet_add_account_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "config"; field.code = {19, 0}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "passphrase"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.config, type_code, _field->code.data()); break; case 2: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_add_account& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_add_account; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_add_account>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.config, type_code, type_code->fields[1].code.data()); vnx::write(out, value.passphrase, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_add_account& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_add_account& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_add_account& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_add_account_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_add_account_return::VNX_TYPE_HASH(0xda0b2d71dd9e8336ull); const vnx::Hash64 Wallet_add_account_return::VNX_CODE_HASH(0x4a65f998a0ed8d87ull); vnx::Hash64 Wallet_add_account_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_add_account_return::get_type_name() const { return "mmx.Wallet.add_account.return"; } const vnx::TypeCode* Wallet_add_account_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_add_account_return; } std::shared_ptr Wallet_add_account_return::create() { return std::make_shared(); } std::shared_ptr Wallet_add_account_return::clone() const { return std::make_shared(*this); } void Wallet_add_account_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_add_account_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_add_account_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_add_account_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_add_account_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.add_account.return\""; _out << "}"; } void Wallet_add_account_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_add_account_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.add_account.return"; return _object; } void Wallet_add_account_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_add_account_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_add_account_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_add_account_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_add_account_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_add_account_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_add_account_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.add_account.return"; type_code->type_hash = vnx::Hash64(0xda0b2d71dd9e8336ull); type_code->code_hash = vnx::Hash64(0x4a65f998a0ed8d87ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_add_account_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_add_account_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_add_account_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_add_account_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_add_account_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_add_account_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_add_account_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_add_token.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_add_token::VNX_TYPE_HASH(0x15fcc67eabc550b6ull); const vnx::Hash64 Wallet_add_token::VNX_CODE_HASH(0xaa825d8ce40dfe46ull); vnx::Hash64 Wallet_add_token::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_add_token::get_type_name() const { return "mmx.Wallet.add_token"; } const vnx::TypeCode* Wallet_add_token::get_type_code() const { return mmx::vnx_native_type_code_Wallet_add_token; } std::shared_ptr Wallet_add_token::create() { return std::make_shared(); } std::shared_ptr Wallet_add_token::clone() const { return std::make_shared(*this); } void Wallet_add_token::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_add_token::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_add_token::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_add_token; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Wallet_add_token::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.add_token\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Wallet_add_token::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_add_token::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.add_token"; _object["address"] = address; return _object; } void Wallet_add_token::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Wallet_add_token::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Wallet_add_token::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_add_token& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_add_token& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_add_token::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_add_token::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.add_token"; type_code->type_hash = vnx::Hash64(0x15fcc67eabc550b6ull); type_code->code_hash = vnx::Hash64(0xaa825d8ce40dfe46ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_add_token); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_add_token_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_add_token& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_add_token; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_add_token>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_add_token& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_add_token& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_add_token& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_add_token_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_add_token_return::VNX_TYPE_HASH(0xb0b00a9f88ea83b5ull); const vnx::Hash64 Wallet_add_token_return::VNX_CODE_HASH(0x4fa352b9f7e66ddcull); vnx::Hash64 Wallet_add_token_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_add_token_return::get_type_name() const { return "mmx.Wallet.add_token.return"; } const vnx::TypeCode* Wallet_add_token_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_add_token_return; } std::shared_ptr Wallet_add_token_return::create() { return std::make_shared(); } std::shared_ptr Wallet_add_token_return::clone() const { return std::make_shared(*this); } void Wallet_add_token_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_add_token_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_add_token_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_add_token_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_add_token_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.add_token.return\""; _out << "}"; } void Wallet_add_token_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_add_token_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.add_token.return"; return _object; } void Wallet_add_token_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_add_token_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_add_token_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_add_token_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_add_token_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_add_token_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_add_token_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.add_token.return"; type_code->type_hash = vnx::Hash64(0xb0b00a9f88ea83b5ull); type_code->code_hash = vnx::Hash64(0x4fa352b9f7e66ddcull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_add_token_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_add_token_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_add_token_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_add_token_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_add_token_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_add_token_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_add_token_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_cancel_offer.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_cancel_offer::VNX_TYPE_HASH(0x200cca704ba873c6ull); const vnx::Hash64 Wallet_cancel_offer::VNX_CODE_HASH(0x9d6109c6fe7f4b4aull); vnx::Hash64 Wallet_cancel_offer::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_cancel_offer::get_type_name() const { return "mmx.Wallet.cancel_offer"; } const vnx::TypeCode* Wallet_cancel_offer::get_type_code() const { return mmx::vnx_native_type_code_Wallet_cancel_offer; } std::shared_ptr Wallet_cancel_offer::create() { return std::make_shared(); } std::shared_ptr Wallet_cancel_offer::clone() const { return std::make_shared(*this); } void Wallet_cancel_offer::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_cancel_offer::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_cancel_offer::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_cancel_offer; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_cancel_offer::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.cancel_offer\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_cancel_offer::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_cancel_offer::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.cancel_offer"; _object["index"] = index; _object["address"] = address; _object["options"] = options; return _object; } void Wallet_cancel_offer::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_cancel_offer::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_cancel_offer::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_cancel_offer& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_cancel_offer& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_cancel_offer::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_cancel_offer::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.cancel_offer"; type_code->type_hash = vnx::Hash64(0x200cca704ba873c6ull); type_code->code_hash = vnx::Hash64(0x9d6109c6fe7f4b4aull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_cancel_offer); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_cancel_offer_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_cancel_offer; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_cancel_offer>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.options, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_cancel_offer& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_cancel_offer& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_cancel_offer_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_cancel_offer_return::VNX_TYPE_HASH(0x86f3531ebf8c56a2ull); const vnx::Hash64 Wallet_cancel_offer_return::VNX_CODE_HASH(0x9a5e615f3ead005aull); vnx::Hash64 Wallet_cancel_offer_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_cancel_offer_return::get_type_name() const { return "mmx.Wallet.cancel_offer.return"; } const vnx::TypeCode* Wallet_cancel_offer_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_cancel_offer_return; } std::shared_ptr Wallet_cancel_offer_return::create() { return std::make_shared(); } std::shared_ptr Wallet_cancel_offer_return::clone() const { return std::make_shared(*this); } void Wallet_cancel_offer_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_cancel_offer_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_cancel_offer_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_cancel_offer_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_cancel_offer_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.cancel_offer.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_cancel_offer_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_cancel_offer_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.cancel_offer.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_cancel_offer_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_cancel_offer_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_cancel_offer_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_cancel_offer_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_cancel_offer_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_cancel_offer_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_cancel_offer_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.cancel_offer.return"; type_code->type_hash = vnx::Hash64(0x86f3531ebf8c56a2ull); type_code->code_hash = vnx::Hash64(0x9a5e615f3ead005aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_cancel_offer_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_cancel_offer_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_cancel_offer_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_cancel_offer_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_cancel_offer_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_cancel_offer_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_cancel_offer_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_complete.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_complete::VNX_TYPE_HASH(0x20da222e7c7de702ull); const vnx::Hash64 Wallet_complete::VNX_CODE_HASH(0xeecf9ff3b992073ull); vnx::Hash64 Wallet_complete::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_complete::get_type_name() const { return "mmx.Wallet.complete"; } const vnx::TypeCode* Wallet_complete::get_type_code() const { return mmx::vnx_native_type_code_Wallet_complete; } std::shared_ptr Wallet_complete::create() { return std::make_shared(); } std::shared_ptr Wallet_complete::clone() const { return std::make_shared(*this); } void Wallet_complete::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_complete::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_complete::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_complete; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, tx); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_complete::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.complete\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"tx\": "; vnx::write(_out, tx); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_complete::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_complete::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.complete"; _object["index"] = index; _object["tx"] = tx; _object["options"] = options; return _object; } void Wallet_complete::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Wallet_complete::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "tx") { return vnx::Variant(tx); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_complete::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "tx") { _value.to(tx); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_complete& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_complete& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_complete::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_complete::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.complete"; type_code->type_hash = vnx::Hash64(0x20da222e7c7de702ull); type_code->code_hash = vnx::Hash64(0xeecf9ff3b992073ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_complete); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_complete_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "tx"; field.code = {16}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.tx, type_code, _field->code.data()); break; case 2: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_complete& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_complete; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_complete>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.tx, type_code, type_code->fields[1].code.data()); vnx::write(out, value.options, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_complete& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_complete& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_complete& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_complete_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_complete_return::VNX_TYPE_HASH(0x490ab9293f9dbfd0ull); const vnx::Hash64 Wallet_complete_return::VNX_CODE_HASH(0x6d1cc1eb61f5cab4ull); vnx::Hash64 Wallet_complete_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_complete_return::get_type_name() const { return "mmx.Wallet.complete.return"; } const vnx::TypeCode* Wallet_complete_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_complete_return; } std::shared_ptr Wallet_complete_return::create() { return std::make_shared(); } std::shared_ptr Wallet_complete_return::clone() const { return std::make_shared(*this); } void Wallet_complete_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_complete_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_complete_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_complete_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_complete_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.complete.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_complete_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_complete_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.complete.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_complete_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_complete_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_complete_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_complete_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_complete_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_complete_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_complete_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.complete.return"; type_code->type_hash = vnx::Hash64(0x490ab9293f9dbfd0ull); type_code->code_hash = vnx::Hash64(0x6d1cc1eb61f5cab4ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_complete_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_complete_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_complete_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_complete_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_complete_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_complete_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_complete_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_create_account.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_create_account::VNX_TYPE_HASH(0x11cd618b00e9e56cull); const vnx::Hash64 Wallet_create_account::VNX_CODE_HASH(0x108c4cc5921b9e14ull); vnx::Hash64 Wallet_create_account::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_create_account::get_type_name() const { return "mmx.Wallet.create_account"; } const vnx::TypeCode* Wallet_create_account::get_type_code() const { return mmx::vnx_native_type_code_Wallet_create_account; } std::shared_ptr Wallet_create_account::create() { return std::make_shared(); } std::shared_ptr Wallet_create_account::clone() const { return std::make_shared(*this); } void Wallet_create_account::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_create_account::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_create_account::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_create_account; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, config); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, passphrase); _visitor.type_end(*_type_code); } void Wallet_create_account::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.create_account\""; _out << ", \"config\": "; vnx::write(_out, config); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << "}"; } void Wallet_create_account::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_create_account::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.create_account"; _object["config"] = config; _object["passphrase"] = passphrase; return _object; } void Wallet_create_account::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "config") { _entry.second.to(config); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } } } vnx::Variant Wallet_create_account::get_field(const std::string& _name) const { if(_name == "config") { return vnx::Variant(config); } if(_name == "passphrase") { return vnx::Variant(passphrase); } return vnx::Variant(); } void Wallet_create_account::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "config") { _value.to(config); } else if(_name == "passphrase") { _value.to(passphrase); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_create_account& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_create_account& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_create_account::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_create_account::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.create_account"; type_code->type_hash = vnx::Hash64(0x11cd618b00e9e56cull); type_code->code_hash = vnx::Hash64(0x108c4cc5921b9e14ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_create_account); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_t::static_get_type_code(); type_code->return_type = ::mmx::Wallet_create_account_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "config"; field.code = {19, 0}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "passphrase"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.config, type_code, _field->code.data()); break; case 1: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_create_account& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_create_account; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_create_account>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.config, type_code, type_code->fields[0].code.data()); vnx::write(out, value.passphrase, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_create_account& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_create_account& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_create_account& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_create_account_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_create_account_return::VNX_TYPE_HASH(0x3a0ff64dc755a8d8ull); const vnx::Hash64 Wallet_create_account_return::VNX_CODE_HASH(0x9ae25282966aa3a2ull); vnx::Hash64 Wallet_create_account_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_create_account_return::get_type_name() const { return "mmx.Wallet.create_account.return"; } const vnx::TypeCode* Wallet_create_account_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_create_account_return; } std::shared_ptr Wallet_create_account_return::create() { return std::make_shared(); } std::shared_ptr Wallet_create_account_return::clone() const { return std::make_shared(*this); } void Wallet_create_account_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_create_account_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_create_account_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_create_account_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_create_account_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.create_account.return\""; _out << "}"; } void Wallet_create_account_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_create_account_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.create_account.return"; return _object; } void Wallet_create_account_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_create_account_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_create_account_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_create_account_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_create_account_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_create_account_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_create_account_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.create_account.return"; type_code->type_hash = vnx::Hash64(0x3a0ff64dc755a8d8ull); type_code->code_hash = vnx::Hash64(0x9ae25282966aa3a2ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_create_account_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_create_account_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_create_account_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_create_account_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_create_account_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_create_account_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_create_account_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_create_wallet.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_create_wallet::VNX_TYPE_HASH(0xdcc08a3a1b171a19ull); const vnx::Hash64 Wallet_create_wallet::VNX_CODE_HASH(0x264c33f1be540d30ull); vnx::Hash64 Wallet_create_wallet::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_create_wallet::get_type_name() const { return "mmx.Wallet.create_wallet"; } const vnx::TypeCode* Wallet_create_wallet::get_type_code() const { return mmx::vnx_native_type_code_Wallet_create_wallet; } std::shared_ptr Wallet_create_wallet::create() { return std::make_shared(); } std::shared_ptr Wallet_create_wallet::clone() const { return std::make_shared(*this); } void Wallet_create_wallet::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_create_wallet::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_create_wallet::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_create_wallet; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, config); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, words); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, passphrase); _visitor.type_end(*_type_code); } void Wallet_create_wallet::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.create_wallet\""; _out << ", \"config\": "; vnx::write(_out, config); _out << ", \"words\": "; vnx::write(_out, words); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << "}"; } void Wallet_create_wallet::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_create_wallet::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.create_wallet"; _object["config"] = config; _object["words"] = words; _object["passphrase"] = passphrase; return _object; } void Wallet_create_wallet::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "config") { _entry.second.to(config); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } else if(_entry.first == "words") { _entry.second.to(words); } } } vnx::Variant Wallet_create_wallet::get_field(const std::string& _name) const { if(_name == "config") { return vnx::Variant(config); } if(_name == "words") { return vnx::Variant(words); } if(_name == "passphrase") { return vnx::Variant(passphrase); } return vnx::Variant(); } void Wallet_create_wallet::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "config") { _value.to(config); } else if(_name == "words") { _value.to(words); } else if(_name == "passphrase") { _value.to(passphrase); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_create_wallet& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_create_wallet& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_create_wallet::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_create_wallet::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.create_wallet"; type_code->type_hash = vnx::Hash64(0xdcc08a3a1b171a19ull); type_code->code_hash = vnx::Hash64(0x264c33f1be540d30ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_create_wallet); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_t::static_get_type_code(); type_code->return_type = ::mmx::Wallet_create_wallet_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "config"; field.code = {19, 0}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "words"; field.code = {33, 32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "passphrase"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.config, type_code, _field->code.data()); break; case 1: vnx::read(in, value.words, type_code, _field->code.data()); break; case 2: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_create_wallet& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_create_wallet; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_create_wallet>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.config, type_code, type_code->fields[0].code.data()); vnx::write(out, value.words, type_code, type_code->fields[1].code.data()); vnx::write(out, value.passphrase, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_create_wallet& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_create_wallet& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_create_wallet_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_create_wallet_return::VNX_TYPE_HASH(0xb417dca300f1949bull); const vnx::Hash64 Wallet_create_wallet_return::VNX_CODE_HASH(0xfd8b5870e6a38549ull); vnx::Hash64 Wallet_create_wallet_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_create_wallet_return::get_type_name() const { return "mmx.Wallet.create_wallet.return"; } const vnx::TypeCode* Wallet_create_wallet_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_create_wallet_return; } std::shared_ptr Wallet_create_wallet_return::create() { return std::make_shared(); } std::shared_ptr Wallet_create_wallet_return::clone() const { return std::make_shared(*this); } void Wallet_create_wallet_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_create_wallet_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_create_wallet_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_create_wallet_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_create_wallet_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.create_wallet.return\""; _out << "}"; } void Wallet_create_wallet_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_create_wallet_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.create_wallet.return"; return _object; } void Wallet_create_wallet_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_create_wallet_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_create_wallet_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_create_wallet_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_create_wallet_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_create_wallet_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_create_wallet_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.create_wallet.return"; type_code->type_hash = vnx::Hash64(0xb417dca300f1949bull); type_code->code_hash = vnx::Hash64(0xfd8b5870e6a38549ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_create_wallet_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_create_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_create_wallet_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_create_wallet_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_create_wallet_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_create_wallet_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_create_wallet_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_deploy.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_deploy::VNX_TYPE_HASH(0xcd71b07853d17497ull); const vnx::Hash64 Wallet_deploy::VNX_CODE_HASH(0x1be27370027fbb2bull); vnx::Hash64 Wallet_deploy::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_deploy::get_type_name() const { return "mmx.Wallet.deploy"; } const vnx::TypeCode* Wallet_deploy::get_type_code() const { return mmx::vnx_native_type_code_Wallet_deploy; } std::shared_ptr Wallet_deploy::create() { return std::make_shared(); } std::shared_ptr Wallet_deploy::clone() const { return std::make_shared(*this); } void Wallet_deploy::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_deploy::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_deploy::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_deploy; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_deploy::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.deploy\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_deploy::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_deploy::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.deploy"; _object["index"] = index; _object["contract"] = contract; _object["options"] = options; return _object; } void Wallet_deploy::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_deploy::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_deploy::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "contract") { _value.to(contract); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_deploy& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_deploy& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_deploy::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_deploy::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.deploy"; type_code->type_hash = vnx::Hash64(0xcd71b07853d17497ull); type_code->code_hash = vnx::Hash64(0x1be27370027fbb2bull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_deploy); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_deploy_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {16}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_deploy& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_deploy; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_deploy>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.options, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_deploy& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_deploy& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_deploy& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_deploy_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_deploy_return::VNX_TYPE_HASH(0x7de4805b16e313f6ull); const vnx::Hash64 Wallet_deploy_return::VNX_CODE_HASH(0xc60c546662ece15cull); vnx::Hash64 Wallet_deploy_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_deploy_return::get_type_name() const { return "mmx.Wallet.deploy.return"; } const vnx::TypeCode* Wallet_deploy_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_deploy_return; } std::shared_ptr Wallet_deploy_return::create() { return std::make_shared(); } std::shared_ptr Wallet_deploy_return::clone() const { return std::make_shared(*this); } void Wallet_deploy_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_deploy_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_deploy_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_deploy_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_deploy_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.deploy.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_deploy_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_deploy_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.deploy.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_deploy_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_deploy_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_deploy_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_deploy_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_deploy_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_deploy_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_deploy_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.deploy.return"; type_code->type_hash = vnx::Hash64(0x7de4805b16e313f6ull); type_code->code_hash = vnx::Hash64(0xc60c546662ece15cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_deploy_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_deploy_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_deploy_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_deploy_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_deploy_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_deploy_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_deploy_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_deposit.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_deposit::VNX_TYPE_HASH(0x4bf71b9049e1c689ull); const vnx::Hash64 Wallet_deposit::VNX_CODE_HASH(0xaefaa8c725446070ull); vnx::Hash64 Wallet_deposit::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_deposit::get_type_name() const { return "mmx.Wallet.deposit"; } const vnx::TypeCode* Wallet_deposit::get_type_code() const { return mmx::vnx_native_type_code_Wallet_deposit; } std::shared_ptr Wallet_deposit::create() { return std::make_shared(); } std::shared_ptr Wallet_deposit::clone() const { return std::make_shared(*this); } void Wallet_deposit::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_deposit::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_deposit::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_deposit; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_deposit::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.deposit\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_deposit::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_deposit::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.deposit"; _object["index"] = index; _object["address"] = address; _object["method"] = method; _object["args"] = args; _object["amount"] = amount; _object["currency"] = currency; _object["options"] = options; return _object; } void Wallet_deposit::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_deposit::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_deposit::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "amount") { _value.to(amount); } else if(_name == "currency") { _value.to(currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_deposit& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_deposit& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_deposit::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_deposit::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.deposit"; type_code->type_hash = vnx::Hash64(0x4bf71b9049e1c689ull); type_code->code_hash = vnx::Hash64(0xaefaa8c725446070ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_deposit); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_deposit_return::static_get_type_code(); type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.method, type_code, _field->code.data()); break; case 3: vnx::read(in, value.args, type_code, _field->code.data()); break; case 4: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 5: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 6: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_deposit& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_deposit; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_deposit>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.method, type_code, type_code->fields[2].code.data()); vnx::write(out, value.args, type_code, type_code->fields[3].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[4].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[5].code.data()); vnx::write(out, value.options, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::Wallet_deposit& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_deposit& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_deposit& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_deposit_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_deposit_return::VNX_TYPE_HASH(0xf21ba8f2309d78aeull); const vnx::Hash64 Wallet_deposit_return::VNX_CODE_HASH(0xe82ab591462c56e8ull); vnx::Hash64 Wallet_deposit_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_deposit_return::get_type_name() const { return "mmx.Wallet.deposit.return"; } const vnx::TypeCode* Wallet_deposit_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_deposit_return; } std::shared_ptr Wallet_deposit_return::create() { return std::make_shared(); } std::shared_ptr Wallet_deposit_return::clone() const { return std::make_shared(*this); } void Wallet_deposit_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_deposit_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_deposit_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_deposit_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_deposit_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.deposit.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_deposit_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_deposit_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.deposit.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_deposit_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_deposit_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_deposit_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_deposit_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_deposit_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_deposit_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_deposit_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.deposit.return"; type_code->type_hash = vnx::Hash64(0xf21ba8f2309d78aeull); type_code->code_hash = vnx::Hash64(0xe82ab591462c56e8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_deposit_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_deposit_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_deposit_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_deposit_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_deposit_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_deposit_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_deposit_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_execute.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_execute::VNX_TYPE_HASH(0x51a1276a27db7b4ull); const vnx::Hash64 Wallet_execute::VNX_CODE_HASH(0xc1b7e135bce1a74cull); vnx::Hash64 Wallet_execute::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_execute::get_type_name() const { return "mmx.Wallet.execute"; } const vnx::TypeCode* Wallet_execute::get_type_code() const { return mmx::vnx_native_type_code_Wallet_execute; } std::shared_ptr Wallet_execute::create() { return std::make_shared(); } std::shared_ptr Wallet_execute::clone() const { return std::make_shared(*this); } void Wallet_execute::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_execute::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_execute::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_execute; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, user); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_execute::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.execute\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"user\": "; vnx::write(_out, user); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_execute::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_execute::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.execute"; _object["index"] = index; _object["address"] = address; _object["method"] = method; _object["args"] = args; _object["user"] = user; _object["options"] = options; return _object; } void Wallet_execute::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant Wallet_execute::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "user") { return vnx::Variant(user); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_execute::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "user") { _value.to(user); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_execute& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_execute& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_execute::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_execute::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.execute"; type_code->type_hash = vnx::Hash64(0x51a1276a27db7b4ull); type_code->code_hash = vnx::Hash64(0xc1b7e135bce1a74cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_execute); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_execute_return::static_get_type_code(); type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "user"; field.code = {33, 3}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.method, type_code, _field->code.data()); break; case 3: vnx::read(in, value.args, type_code, _field->code.data()); break; case 4: vnx::read(in, value.user, type_code, _field->code.data()); break; case 5: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_execute& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_execute; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_execute>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.method, type_code, type_code->fields[2].code.data()); vnx::write(out, value.args, type_code, type_code->fields[3].code.data()); vnx::write(out, value.user, type_code, type_code->fields[4].code.data()); vnx::write(out, value.options, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::Wallet_execute& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_execute& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_execute& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_execute_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_execute_return::VNX_TYPE_HASH(0x9a51f18a1c26c764ull); const vnx::Hash64 Wallet_execute_return::VNX_CODE_HASH(0xd8c90a60b537d423ull); vnx::Hash64 Wallet_execute_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_execute_return::get_type_name() const { return "mmx.Wallet.execute.return"; } const vnx::TypeCode* Wallet_execute_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_execute_return; } std::shared_ptr Wallet_execute_return::create() { return std::make_shared(); } std::shared_ptr Wallet_execute_return::clone() const { return std::make_shared(*this); } void Wallet_execute_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_execute_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_execute_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_execute_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_execute_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.execute.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_execute_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_execute_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.execute.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_execute_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_execute_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_execute_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_execute_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_execute_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_execute_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_execute_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.execute.return"; type_code->type_hash = vnx::Hash64(0x9a51f18a1c26c764ull); type_code->code_hash = vnx::Hash64(0xd8c90a60b537d423ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_execute_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_execute_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_execute_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_execute_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_execute_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_execute_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_execute_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_export_wallet.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_export_wallet::VNX_TYPE_HASH(0xd52b494df565ce7ull); const vnx::Hash64 Wallet_export_wallet::VNX_CODE_HASH(0xc0b375e8fc8b3baaull); vnx::Hash64 Wallet_export_wallet::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_export_wallet::get_type_name() const { return "mmx.Wallet.export_wallet"; } const vnx::TypeCode* Wallet_export_wallet::get_type_code() const { return mmx::vnx_native_type_code_Wallet_export_wallet; } std::shared_ptr Wallet_export_wallet::create() { return std::make_shared(); } std::shared_ptr Wallet_export_wallet::clone() const { return std::make_shared(*this); } void Wallet_export_wallet::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_export_wallet::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_export_wallet::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_export_wallet; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_export_wallet::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.export_wallet\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_export_wallet::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_export_wallet::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.export_wallet"; _object["index"] = index; return _object; } void Wallet_export_wallet::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_export_wallet::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_export_wallet::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_export_wallet& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_export_wallet& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_export_wallet::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_export_wallet::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.export_wallet"; type_code->type_hash = vnx::Hash64(0xd52b494df565ce7ull); type_code->code_hash = vnx::Hash64(0xc0b375e8fc8b3baaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_export_wallet); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_export_wallet_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_export_wallet& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_export_wallet; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_export_wallet>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_export_wallet& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_export_wallet& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_export_wallet_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_export_wallet_return::VNX_TYPE_HASH(0x1c82818ba92b03f4ull); const vnx::Hash64 Wallet_export_wallet_return::VNX_CODE_HASH(0x142d10722ca18e49ull); vnx::Hash64 Wallet_export_wallet_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_export_wallet_return::get_type_name() const { return "mmx.Wallet.export_wallet.return"; } const vnx::TypeCode* Wallet_export_wallet_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_export_wallet_return; } std::shared_ptr Wallet_export_wallet_return::create() { return std::make_shared(); } std::shared_ptr Wallet_export_wallet_return::clone() const { return std::make_shared(*this); } void Wallet_export_wallet_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_export_wallet_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_export_wallet_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_export_wallet_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_export_wallet_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.export_wallet.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_export_wallet_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_export_wallet_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.export_wallet.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_export_wallet_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_export_wallet_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_export_wallet_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_export_wallet_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_export_wallet_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_export_wallet_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_export_wallet_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.export_wallet.return"; type_code->type_hash = vnx::Hash64(0x1c82818ba92b03f4ull); type_code->code_hash = vnx::Hash64(0x142d10722ca18e49ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_export_wallet_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_export_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_export_wallet_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_export_wallet_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_export_wallet_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_export_wallet_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_export_wallet_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_find_wallet_by_addr.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_find_wallet_by_addr::VNX_TYPE_HASH(0x320237e79adcef6bull); const vnx::Hash64 Wallet_find_wallet_by_addr::VNX_CODE_HASH(0x46ac506f00ac8beaull); vnx::Hash64 Wallet_find_wallet_by_addr::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_find_wallet_by_addr::get_type_name() const { return "mmx.Wallet.find_wallet_by_addr"; } const vnx::TypeCode* Wallet_find_wallet_by_addr::get_type_code() const { return mmx::vnx_native_type_code_Wallet_find_wallet_by_addr; } std::shared_ptr Wallet_find_wallet_by_addr::create() { return std::make_shared(); } std::shared_ptr Wallet_find_wallet_by_addr::clone() const { return std::make_shared(*this); } void Wallet_find_wallet_by_addr::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_find_wallet_by_addr::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_find_wallet_by_addr::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_find_wallet_by_addr; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Wallet_find_wallet_by_addr::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.find_wallet_by_addr\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Wallet_find_wallet_by_addr::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_find_wallet_by_addr::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.find_wallet_by_addr"; _object["address"] = address; return _object; } void Wallet_find_wallet_by_addr::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Wallet_find_wallet_by_addr::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Wallet_find_wallet_by_addr::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_find_wallet_by_addr& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_find_wallet_by_addr& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_find_wallet_by_addr::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_find_wallet_by_addr::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.find_wallet_by_addr"; type_code->type_hash = vnx::Hash64(0x320237e79adcef6bull); type_code->code_hash = vnx::Hash64(0x46ac506f00ac8beaull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_find_wallet_by_addr); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_find_wallet_by_addr_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_find_wallet_by_addr; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_find_wallet_by_addr>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_find_wallet_by_addr_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_find_wallet_by_addr_return::VNX_TYPE_HASH(0xdae07576f8844f6aull); const vnx::Hash64 Wallet_find_wallet_by_addr_return::VNX_CODE_HASH(0x79efe2f1d0b77bc2ull); vnx::Hash64 Wallet_find_wallet_by_addr_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_find_wallet_by_addr_return::get_type_name() const { return "mmx.Wallet.find_wallet_by_addr.return"; } const vnx::TypeCode* Wallet_find_wallet_by_addr_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_find_wallet_by_addr_return; } std::shared_ptr Wallet_find_wallet_by_addr_return::create() { return std::make_shared(); } std::shared_ptr Wallet_find_wallet_by_addr_return::clone() const { return std::make_shared(*this); } void Wallet_find_wallet_by_addr_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_find_wallet_by_addr_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_find_wallet_by_addr_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_find_wallet_by_addr_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_find_wallet_by_addr_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.find_wallet_by_addr.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_find_wallet_by_addr_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_find_wallet_by_addr_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.find_wallet_by_addr.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_find_wallet_by_addr_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_find_wallet_by_addr_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_find_wallet_by_addr_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_find_wallet_by_addr_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_find_wallet_by_addr_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_find_wallet_by_addr_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_find_wallet_by_addr_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.find_wallet_by_addr.return"; type_code->type_hash = vnx::Hash64(0xdae07576f8844f6aull); type_code->code_hash = vnx::Hash64(0x79efe2f1d0b77bc2ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_find_wallet_by_addr_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "_ret_0"; field.code = {7}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_find_wallet_by_addr_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_find_wallet_by_addr_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_find_wallet_by_addr_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Wallet_find_wallet_by_addr_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_find_wallet_by_addr_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_find_wallet_by_addr_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_gather_inputs_for.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_gather_inputs_for::VNX_TYPE_HASH(0x31d9b9888b8c2de3ull); const vnx::Hash64 Wallet_gather_inputs_for::VNX_CODE_HASH(0x6db80cec63fa392aull); vnx::Hash64 Wallet_gather_inputs_for::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_gather_inputs_for::get_type_name() const { return "mmx.Wallet.gather_inputs_for"; } const vnx::TypeCode* Wallet_gather_inputs_for::get_type_code() const { return mmx::vnx_native_type_code_Wallet_gather_inputs_for; } std::shared_ptr Wallet_gather_inputs_for::create() { return std::make_shared(); } std::shared_ptr Wallet_gather_inputs_for::clone() const { return std::make_shared(*this); } void Wallet_gather_inputs_for::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_gather_inputs_for::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_gather_inputs_for::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_gather_inputs_for; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_gather_inputs_for::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.gather_inputs_for\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_gather_inputs_for::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_gather_inputs_for::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.gather_inputs_for"; _object["index"] = index; _object["amount"] = amount; _object["currency"] = currency; _object["options"] = options; return _object; } void Wallet_gather_inputs_for::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_gather_inputs_for::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_gather_inputs_for::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amount") { _value.to(amount); } else if(_name == "currency") { _value.to(currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_gather_inputs_for& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_gather_inputs_for& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_gather_inputs_for::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_gather_inputs_for::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.gather_inputs_for"; type_code->type_hash = vnx::Hash64(0x31d9b9888b8c2de3ull); type_code->code_hash = vnx::Hash64(0x6db80cec63fa392aull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_gather_inputs_for); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_gather_inputs_for_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 2: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 3: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_gather_inputs_for; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_gather_inputs_for>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amount, type_code, type_code->fields[1].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::Wallet_gather_inputs_for& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_gather_inputs_for_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_gather_inputs_for_return::VNX_TYPE_HASH(0xb099ed949b98dc77ull); const vnx::Hash64 Wallet_gather_inputs_for_return::VNX_CODE_HASH(0x4cc0d97d743ebac6ull); vnx::Hash64 Wallet_gather_inputs_for_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_gather_inputs_for_return::get_type_name() const { return "mmx.Wallet.gather_inputs_for.return"; } const vnx::TypeCode* Wallet_gather_inputs_for_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_gather_inputs_for_return; } std::shared_ptr Wallet_gather_inputs_for_return::create() { return std::make_shared(); } std::shared_ptr Wallet_gather_inputs_for_return::clone() const { return std::make_shared(*this); } void Wallet_gather_inputs_for_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_gather_inputs_for_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_gather_inputs_for_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_gather_inputs_for_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_gather_inputs_for_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.gather_inputs_for.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_gather_inputs_for_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_gather_inputs_for_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.gather_inputs_for.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_gather_inputs_for_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_gather_inputs_for_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_gather_inputs_for_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_gather_inputs_for_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_gather_inputs_for_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_gather_inputs_for_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_gather_inputs_for_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.gather_inputs_for.return"; type_code->type_hash = vnx::Hash64(0xb099ed949b98dc77ull); type_code->code_hash = vnx::Hash64(0x4cc0d97d743ebac6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_gather_inputs_for_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::txin_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_gather_inputs_for_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_gather_inputs_for_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_gather_inputs_for_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_gather_inputs_for_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_gather_inputs_for_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_gather_inputs_for_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_account.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_account::VNX_TYPE_HASH(0xf9669d0d42aec09eull); const vnx::Hash64 Wallet_get_account::VNX_CODE_HASH(0x7da3abcca0d0ba17ull); vnx::Hash64 Wallet_get_account::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_account::get_type_name() const { return "mmx.Wallet.get_account"; } const vnx::TypeCode* Wallet_get_account::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_account; } std::shared_ptr Wallet_get_account::create() { return std::make_shared(); } std::shared_ptr Wallet_get_account::clone() const { return std::make_shared(*this); } void Wallet_get_account::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_account::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_account::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_account; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_account::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_account\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_account::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_account::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_account"; _object["index"] = index; return _object; } void Wallet_get_account::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_account::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_account::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_account& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_account& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_account::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_account::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_account"; type_code->type_hash = vnx::Hash64(0xf9669d0d42aec09eull); type_code->code_hash = vnx::Hash64(0x7da3abcca0d0ba17ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_account); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_account_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_account& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_account; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_account>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_account& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_account& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_account& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_account_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_account_return::VNX_TYPE_HASH(0xaed020aa500eed2bull); const vnx::Hash64 Wallet_get_account_return::VNX_CODE_HASH(0xbe35658acbfd3afeull); vnx::Hash64 Wallet_get_account_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_account_return::get_type_name() const { return "mmx.Wallet.get_account.return"; } const vnx::TypeCode* Wallet_get_account_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_account_return; } std::shared_ptr Wallet_get_account_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_account_return::clone() const { return std::make_shared(*this); } void Wallet_get_account_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_account_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_account_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_account_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_account_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_account.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_account_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_account_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_account.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_account_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_account_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_account_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_account_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_account_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_account_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_account_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_account.return"; type_code->type_hash = vnx::Hash64(0xaed020aa500eed2bull); type_code->code_hash = vnx::Hash64(0xbe35658acbfd3afeull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_account_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_account_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_account_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_account_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_account_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_account_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_account_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_address.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_address::VNX_TYPE_HASH(0xccad8dfe1543aa77ull); const vnx::Hash64 Wallet_get_address::VNX_CODE_HASH(0x82d9df386952e8a8ull); vnx::Hash64 Wallet_get_address::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_address::get_type_name() const { return "mmx.Wallet.get_address"; } const vnx::TypeCode* Wallet_get_address::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_address; } std::shared_ptr Wallet_get_address::create() { return std::make_shared(); } std::shared_ptr Wallet_get_address::clone() const { return std::make_shared(*this); } void Wallet_get_address::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_address::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_address::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_address; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, offset); _visitor.type_end(*_type_code); } void Wallet_get_address::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_address\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"offset\": "; vnx::write(_out, offset); _out << "}"; } void Wallet_get_address::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_address::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_address"; _object["index"] = index; _object["offset"] = offset; return _object; } void Wallet_get_address::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "offset") { _entry.second.to(offset); } } } vnx::Variant Wallet_get_address::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "offset") { return vnx::Variant(offset); } return vnx::Variant(); } void Wallet_get_address::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "offset") { _value.to(offset); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_address& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_address& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_address::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_address::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_address"; type_code->type_hash = vnx::Hash64(0xccad8dfe1543aa77ull); type_code->code_hash = vnx::Hash64(0x82d9df386952e8a8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_address); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_address_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "offset"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.offset, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_address& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_address; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_address>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.offset); } void read(std::istream& in, ::mmx::Wallet_get_address& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_address& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_address& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_address_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_address_return::VNX_TYPE_HASH(0x4c76a08d8d85c4e4ull); const vnx::Hash64 Wallet_get_address_return::VNX_CODE_HASH(0xfd6ffc6bcfd8bc0cull); vnx::Hash64 Wallet_get_address_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_address_return::get_type_name() const { return "mmx.Wallet.get_address.return"; } const vnx::TypeCode* Wallet_get_address_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_address_return; } std::shared_ptr Wallet_get_address_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_address_return::clone() const { return std::make_shared(*this); } void Wallet_get_address_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_address_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_address_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_address_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_address_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_address.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_address_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_address_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_address.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_address_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_address_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_address_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_address_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_address_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_address_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_address_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_address.return"; type_code->type_hash = vnx::Hash64(0x4c76a08d8d85c4e4ull); type_code->code_hash = vnx::Hash64(0xfd6ffc6bcfd8bc0cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_address_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_address_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_address_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_address_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_address_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_address_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_address_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_accounts.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_accounts::VNX_TYPE_HASH(0xdf8bfad64085cb83ull); const vnx::Hash64 Wallet_get_all_accounts::VNX_CODE_HASH(0x5f12990adbec3d71ull); vnx::Hash64 Wallet_get_all_accounts::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_accounts::get_type_name() const { return "mmx.Wallet.get_all_accounts"; } const vnx::TypeCode* Wallet_get_all_accounts::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_accounts; } std::shared_ptr Wallet_get_all_accounts::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_accounts::clone() const { return std::make_shared(*this); } void Wallet_get_all_accounts::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_accounts::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_accounts::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_accounts; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_get_all_accounts::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_accounts\""; _out << "}"; } void Wallet_get_all_accounts::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_accounts::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_accounts"; return _object; } void Wallet_get_all_accounts::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_get_all_accounts::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_get_all_accounts::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_accounts& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_accounts& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_accounts::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_accounts::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_accounts"; type_code->type_hash = vnx::Hash64(0xdf8bfad64085cb83ull); type_code->code_hash = vnx::Hash64(0x5f12990adbec3d71ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_accounts); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_all_accounts_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_accounts; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_accounts>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_get_all_accounts& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_accounts_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_accounts_return::VNX_TYPE_HASH(0x2bb48cc4299c5782ull); const vnx::Hash64 Wallet_get_all_accounts_return::VNX_CODE_HASH(0xc75b9ab56069f16dull); vnx::Hash64 Wallet_get_all_accounts_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_accounts_return::get_type_name() const { return "mmx.Wallet.get_all_accounts.return"; } const vnx::TypeCode* Wallet_get_all_accounts_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_accounts_return; } std::shared_ptr Wallet_get_all_accounts_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_accounts_return::clone() const { return std::make_shared(*this); } void Wallet_get_all_accounts_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_accounts_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_accounts_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_accounts_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_all_accounts_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_accounts.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_all_accounts_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_accounts_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_accounts.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_all_accounts_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_all_accounts_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_all_accounts_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_accounts_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_accounts_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_accounts_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_accounts_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_accounts.return"; type_code->type_hash = vnx::Hash64(0x2bb48cc4299c5782ull); type_code->code_hash = vnx::Hash64(0xc75b9ab56069f16dull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_accounts_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_info_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_accounts_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_accounts_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_accounts_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_all_accounts_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_accounts_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_accounts_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_addresses.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_addresses::VNX_TYPE_HASH(0xf5e2b4554613fd97ull); const vnx::Hash64 Wallet_get_all_addresses::VNX_CODE_HASH(0x9c42c4048d370e6eull); vnx::Hash64 Wallet_get_all_addresses::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_addresses::get_type_name() const { return "mmx.Wallet.get_all_addresses"; } const vnx::TypeCode* Wallet_get_all_addresses::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_addresses; } std::shared_ptr Wallet_get_all_addresses::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_addresses::clone() const { return std::make_shared(*this); } void Wallet_get_all_addresses::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_addresses::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_addresses::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_addresses; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_all_addresses::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_addresses\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_all_addresses::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_addresses::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_addresses"; _object["index"] = index; return _object; } void Wallet_get_all_addresses::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_all_addresses::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_all_addresses::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_addresses& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_addresses& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_addresses::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_addresses::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_addresses"; type_code->type_hash = vnx::Hash64(0xf5e2b4554613fd97ull); type_code->code_hash = vnx::Hash64(0x9c42c4048d370e6eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_addresses); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_all_addresses_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {7}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_addresses; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_addresses>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_all_addresses& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_addresses_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_addresses_return::VNX_TYPE_HASH(0x2f16846155284194ull); const vnx::Hash64 Wallet_get_all_addresses_return::VNX_CODE_HASH(0x577287a7d2ffb203ull); vnx::Hash64 Wallet_get_all_addresses_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_addresses_return::get_type_name() const { return "mmx.Wallet.get_all_addresses.return"; } const vnx::TypeCode* Wallet_get_all_addresses_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_addresses_return; } std::shared_ptr Wallet_get_all_addresses_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_addresses_return::clone() const { return std::make_shared(*this); } void Wallet_get_all_addresses_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_addresses_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_addresses_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_addresses_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_all_addresses_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_addresses.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_all_addresses_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_addresses_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_addresses.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_all_addresses_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_all_addresses_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_all_addresses_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_addresses_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_addresses_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_addresses_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_addresses_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_addresses.return"; type_code->type_hash = vnx::Hash64(0x2f16846155284194ull); type_code->code_hash = vnx::Hash64(0x577287a7d2ffb203ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_addresses_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_addresses_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_addresses_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_addresses_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_all_addresses_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_addresses_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_addresses_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_farmer_keys.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_farmer_keys::VNX_TYPE_HASH(0xc6a03b3f813d071dull); const vnx::Hash64 Wallet_get_all_farmer_keys::VNX_CODE_HASH(0xac0ac802c63290ffull); vnx::Hash64 Wallet_get_all_farmer_keys::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_farmer_keys::get_type_name() const { return "mmx.Wallet.get_all_farmer_keys"; } const vnx::TypeCode* Wallet_get_all_farmer_keys::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_farmer_keys; } std::shared_ptr Wallet_get_all_farmer_keys::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_farmer_keys::clone() const { return std::make_shared(*this); } void Wallet_get_all_farmer_keys::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_farmer_keys::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_farmer_keys::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_farmer_keys; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_get_all_farmer_keys::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_farmer_keys\""; _out << "}"; } void Wallet_get_all_farmer_keys::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_farmer_keys::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_farmer_keys"; return _object; } void Wallet_get_all_farmer_keys::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_get_all_farmer_keys::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_get_all_farmer_keys::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_farmer_keys& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_farmer_keys& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_farmer_keys::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_farmer_keys::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_farmer_keys"; type_code->type_hash = vnx::Hash64(0xc6a03b3f813d071dull); type_code->code_hash = vnx::Hash64(0xac0ac802c63290ffull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_farmer_keys); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_all_farmer_keys_return::static_get_type_code(); type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_farmer_keys; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_farmer_keys>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_all_farmer_keys_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_all_farmer_keys_return::VNX_TYPE_HASH(0xa2de9b0aaffc515aull); const vnx::Hash64 Wallet_get_all_farmer_keys_return::VNX_CODE_HASH(0x71e6e83049d5d9fbull); vnx::Hash64 Wallet_get_all_farmer_keys_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_all_farmer_keys_return::get_type_name() const { return "mmx.Wallet.get_all_farmer_keys.return"; } const vnx::TypeCode* Wallet_get_all_farmer_keys_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_all_farmer_keys_return; } std::shared_ptr Wallet_get_all_farmer_keys_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_all_farmer_keys_return::clone() const { return std::make_shared(*this); } void Wallet_get_all_farmer_keys_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_all_farmer_keys_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_all_farmer_keys_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_all_farmer_keys_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_all_farmer_keys_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_all_farmer_keys.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_all_farmer_keys_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_all_farmer_keys_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_all_farmer_keys.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_all_farmer_keys_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_all_farmer_keys_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_all_farmer_keys_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_all_farmer_keys_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_all_farmer_keys_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_all_farmer_keys_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_all_farmer_keys_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_all_farmer_keys.return"; type_code->type_hash = vnx::Hash64(0xa2de9b0aaffc515aull); type_code->code_hash = vnx::Hash64(0x71e6e83049d5d9fbull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_all_farmer_keys_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 23, 2, 4, 7, 11, 32, 1, 11, 33, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_all_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_all_farmer_keys_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_all_farmer_keys_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_all_farmer_keys_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_all_farmer_keys_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_all_farmer_keys_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_balance.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_balance::VNX_TYPE_HASH(0x1bc2c2dd67ab2829ull); const vnx::Hash64 Wallet_get_balance::VNX_CODE_HASH(0xdd703f18c114c63cull); vnx::Hash64 Wallet_get_balance::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_balance::get_type_name() const { return "mmx.Wallet.get_balance"; } const vnx::TypeCode* Wallet_get_balance::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_balance; } std::shared_ptr Wallet_get_balance::create() { return std::make_shared(); } std::shared_ptr Wallet_get_balance::clone() const { return std::make_shared(*this); } void Wallet_get_balance::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_balance::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_balance::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_balance; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, currency); _visitor.type_end(*_type_code); } void Wallet_get_balance::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_balance\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"currency\": "; vnx::write(_out, currency); _out << "}"; } void Wallet_get_balance::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_balance::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_balance"; _object["index"] = index; _object["currency"] = currency; return _object; } void Wallet_get_balance::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_balance::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "currency") { return vnx::Variant(currency); } return vnx::Variant(); } void Wallet_get_balance::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "currency") { _value.to(currency); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_balance& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_balance& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_balance::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_balance::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_balance"; type_code->type_hash = vnx::Hash64(0x1bc2c2dd67ab2829ull); type_code->code_hash = vnx::Hash64(0xdd703f18c114c63cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_balance); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_balance_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.currency, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_balance& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_balance; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_balance>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.currency, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_balance& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_balance& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balance& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_balance_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_balance_return::VNX_TYPE_HASH(0xfa00e6f62563141full); const vnx::Hash64 Wallet_get_balance_return::VNX_CODE_HASH(0x35c0be18c6ec6d7cull); vnx::Hash64 Wallet_get_balance_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_balance_return::get_type_name() const { return "mmx.Wallet.get_balance.return"; } const vnx::TypeCode* Wallet_get_balance_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_balance_return; } std::shared_ptr Wallet_get_balance_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_balance_return::clone() const { return std::make_shared(*this); } void Wallet_get_balance_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_balance_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_balance_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_balance_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_balance_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_balance.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_balance_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_balance_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_balance.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_balance_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_balance_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_balance_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_balance_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_balance_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_balance_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_balance_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_balance.return"; type_code->type_hash = vnx::Hash64(0xfa00e6f62563141full); type_code->code_hash = vnx::Hash64(0x35c0be18c6ec6d7cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_balance_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::balance_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_balance_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_balance_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_balance_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_balance_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_balance_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balance_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_balances::VNX_TYPE_HASH(0x5be581d54ae69a4ull); const vnx::Hash64 Wallet_get_balances::VNX_CODE_HASH(0xd74125cc5725f322ull); vnx::Hash64 Wallet_get_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_balances::get_type_name() const { return "mmx.Wallet.get_balances"; } const vnx::TypeCode* Wallet_get_balances::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_balances; } std::shared_ptr Wallet_get_balances::create() { return std::make_shared(); } std::shared_ptr Wallet_get_balances::clone() const { return std::make_shared(*this); } void Wallet_get_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, with_zero); _visitor.type_end(*_type_code); } void Wallet_get_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_balances\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"with_zero\": "; vnx::write(_out, with_zero); _out << "}"; } void Wallet_get_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_balances"; _object["index"] = index; _object["with_zero"] = with_zero; return _object; } void Wallet_get_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "with_zero") { _entry.second.to(with_zero); } } } vnx::Variant Wallet_get_balances::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "with_zero") { return vnx::Variant(with_zero); } return vnx::Variant(); } void Wallet_get_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "with_zero") { _value.to(with_zero); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_balances"; type_code->type_hash = vnx::Hash64(0x5be581d54ae69a4ull); type_code->code_hash = vnx::Hash64(0xd74125cc5725f322ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_balances_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "with_zero"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.with_zero, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.with_zero); } void read(std::istream& in, ::mmx::Wallet_get_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_balances_return::VNX_TYPE_HASH(0xe041fcc6b3606c0full); const vnx::Hash64 Wallet_get_balances_return::VNX_CODE_HASH(0x655ff1017926bca8ull); vnx::Hash64 Wallet_get_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_balances_return::get_type_name() const { return "mmx.Wallet.get_balances.return"; } const vnx::TypeCode* Wallet_get_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_balances_return; } std::shared_ptr Wallet_get_balances_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_balances_return::clone() const { return std::make_shared(*this); } void Wallet_get_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_balances.return"; type_code->type_hash = vnx::Hash64(0xe041fcc6b3606c0full); type_code->code_hash = vnx::Hash64(0x655ff1017926bca8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::balance_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contract_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contract_balances::VNX_TYPE_HASH(0x4d6b36c0c2804d26ull); const vnx::Hash64 Wallet_get_contract_balances::VNX_CODE_HASH(0x115df438f8f9ea19ull); vnx::Hash64 Wallet_get_contract_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contract_balances::get_type_name() const { return "mmx.Wallet.get_contract_balances"; } const vnx::TypeCode* Wallet_get_contract_balances::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contract_balances; } std::shared_ptr Wallet_get_contract_balances::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contract_balances::clone() const { return std::make_shared(*this); } void Wallet_get_contract_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contract_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contract_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contract_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Wallet_get_contract_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contract_balances\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Wallet_get_contract_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contract_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contract_balances"; _object["address"] = address; return _object; } void Wallet_get_contract_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Wallet_get_contract_balances::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Wallet_get_contract_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contract_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contract_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contract_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contract_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contract_balances"; type_code->type_hash = vnx::Hash64(0x4d6b36c0c2804d26ull); type_code->code_hash = vnx::Hash64(0x115df438f8f9ea19ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_contract_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_contract_balances_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contract_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contract_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contract_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contract_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contract_balances_return::VNX_TYPE_HASH(0x7800bce5a77b8bdcull); const vnx::Hash64 Wallet_get_contract_balances_return::VNX_CODE_HASH(0xb919c0732b6a806cull); vnx::Hash64 Wallet_get_contract_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contract_balances_return::get_type_name() const { return "mmx.Wallet.get_contract_balances.return"; } const vnx::TypeCode* Wallet_get_contract_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contract_balances_return; } std::shared_ptr Wallet_get_contract_balances_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contract_balances_return::clone() const { return std::make_shared(*this); } void Wallet_get_contract_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contract_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contract_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contract_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_contract_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contract_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_contract_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contract_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contract_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_contract_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_contract_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_contract_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contract_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contract_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contract_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contract_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contract_balances.return"; type_code->type_hash = vnx::Hash64(0x7800bce5a77b8bdcull); type_code->code_hash = vnx::Hash64(0xb919c0732b6a806cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_contract_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::balance_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contract_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contract_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contract_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contract_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contract_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contract_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contracts.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contracts::VNX_TYPE_HASH(0x9ff1932bcec18d57ull); const vnx::Hash64 Wallet_get_contracts::VNX_CODE_HASH(0xef77d58ab9b1a237ull); vnx::Hash64 Wallet_get_contracts::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contracts::get_type_name() const { return "mmx.Wallet.get_contracts"; } const vnx::TypeCode* Wallet_get_contracts::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contracts; } std::shared_ptr Wallet_get_contracts::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contracts::clone() const { return std::make_shared(*this); } void Wallet_get_contracts::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contracts::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contracts::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contracts; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, type_name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, type_hash); _visitor.type_end(*_type_code); } void Wallet_get_contracts::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contracts\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"type_name\": "; vnx::write(_out, type_name); _out << ", \"type_hash\": "; vnx::write(_out, type_hash); _out << "}"; } void Wallet_get_contracts::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contracts::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contracts"; _object["index"] = index; _object["type_name"] = type_name; _object["type_hash"] = type_hash; return _object; } void Wallet_get_contracts::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "type_hash") { _entry.second.to(type_hash); } else if(_entry.first == "type_name") { _entry.second.to(type_name); } } } vnx::Variant Wallet_get_contracts::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "type_name") { return vnx::Variant(type_name); } if(_name == "type_hash") { return vnx::Variant(type_hash); } return vnx::Variant(); } void Wallet_get_contracts::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "type_name") { _value.to(type_name); } else if(_name == "type_hash") { _value.to(type_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contracts& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contracts::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contracts::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contracts"; type_code->type_hash = vnx::Hash64(0x9ff1932bcec18d57ull); type_code->code_hash = vnx::Hash64(0xef77d58ab9b1a237ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_contracts); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_contracts_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "type_name"; field.code = {33, 32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "type_hash"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.type_name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.type_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contracts; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contracts>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.type_name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.type_hash, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contracts& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contracts_owned.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contracts_owned::VNX_TYPE_HASH(0x7834485ec000f577ull); const vnx::Hash64 Wallet_get_contracts_owned::VNX_CODE_HASH(0xd7ad65f9054dc61ull); vnx::Hash64 Wallet_get_contracts_owned::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contracts_owned::get_type_name() const { return "mmx.Wallet.get_contracts_owned"; } const vnx::TypeCode* Wallet_get_contracts_owned::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contracts_owned; } std::shared_ptr Wallet_get_contracts_owned::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contracts_owned::clone() const { return std::make_shared(*this); } void Wallet_get_contracts_owned::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contracts_owned::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contracts_owned::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contracts_owned; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, type_name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, type_hash); _visitor.type_end(*_type_code); } void Wallet_get_contracts_owned::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contracts_owned\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"type_name\": "; vnx::write(_out, type_name); _out << ", \"type_hash\": "; vnx::write(_out, type_hash); _out << "}"; } void Wallet_get_contracts_owned::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contracts_owned::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contracts_owned"; _object["index"] = index; _object["type_name"] = type_name; _object["type_hash"] = type_hash; return _object; } void Wallet_get_contracts_owned::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "type_hash") { _entry.second.to(type_hash); } else if(_entry.first == "type_name") { _entry.second.to(type_name); } } } vnx::Variant Wallet_get_contracts_owned::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "type_name") { return vnx::Variant(type_name); } if(_name == "type_hash") { return vnx::Variant(type_hash); } return vnx::Variant(); } void Wallet_get_contracts_owned::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "type_name") { _value.to(type_name); } else if(_name == "type_hash") { _value.to(type_hash); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_owned& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contracts_owned& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contracts_owned::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contracts_owned::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contracts_owned"; type_code->type_hash = vnx::Hash64(0x7834485ec000f577ull); type_code->code_hash = vnx::Hash64(0xd7ad65f9054dc61ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_contracts_owned); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_contracts_owned_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "type_name"; field.code = {33, 32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "type_hash"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.type_name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.type_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contracts_owned; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contracts_owned>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.type_name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.type_hash, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contracts_owned& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contracts_owned_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contracts_owned_return::VNX_TYPE_HASH(0x40aec1bc5f5f5c90ull); const vnx::Hash64 Wallet_get_contracts_owned_return::VNX_CODE_HASH(0x8e8c7c052975d50bull); vnx::Hash64 Wallet_get_contracts_owned_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contracts_owned_return::get_type_name() const { return "mmx.Wallet.get_contracts_owned.return"; } const vnx::TypeCode* Wallet_get_contracts_owned_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contracts_owned_return; } std::shared_ptr Wallet_get_contracts_owned_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contracts_owned_return::clone() const { return std::make_shared(*this); } void Wallet_get_contracts_owned_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contracts_owned_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contracts_owned_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contracts_owned_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_contracts_owned_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contracts_owned.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_contracts_owned_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contracts_owned_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contracts_owned.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_contracts_owned_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_contracts_owned_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_contracts_owned_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_owned_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contracts_owned_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contracts_owned_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contracts_owned_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contracts_owned.return"; type_code->type_hash = vnx::Hash64(0x40aec1bc5f5f5c90ull); type_code->code_hash = vnx::Hash64(0x8e8c7c052975d50bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_contracts_owned_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_owned_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contracts_owned_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contracts_owned_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contracts_owned_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_owned_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_owned_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_contracts_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_contracts_return::VNX_TYPE_HASH(0xf384dd12e1fac072ull); const vnx::Hash64 Wallet_get_contracts_return::VNX_CODE_HASH(0xea598bd54594a832ull); vnx::Hash64 Wallet_get_contracts_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_contracts_return::get_type_name() const { return "mmx.Wallet.get_contracts.return"; } const vnx::TypeCode* Wallet_get_contracts_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_contracts_return; } std::shared_ptr Wallet_get_contracts_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_contracts_return::clone() const { return std::make_shared(*this); } void Wallet_get_contracts_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_contracts_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_contracts_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_contracts_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_contracts_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_contracts.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_contracts_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_contracts_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_contracts.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_contracts_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_contracts_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_contracts_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_contracts_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_contracts_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_contracts_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_contracts_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_contracts.return"; type_code->type_hash = vnx::Hash64(0xf384dd12e1fac072ull); type_code->code_hash = vnx::Hash64(0xea598bd54594a832ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_contracts_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_contracts_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_contracts_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_contracts_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_contracts_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_contracts_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_contracts_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_farmer_keys.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_farmer_keys::VNX_TYPE_HASH(0x44709e11ff3ff3eeull); const vnx::Hash64 Wallet_get_farmer_keys::VNX_CODE_HASH(0xd98cf205e4acc7c7ull); vnx::Hash64 Wallet_get_farmer_keys::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_farmer_keys::get_type_name() const { return "mmx.Wallet.get_farmer_keys"; } const vnx::TypeCode* Wallet_get_farmer_keys::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_farmer_keys; } std::shared_ptr Wallet_get_farmer_keys::create() { return std::make_shared(); } std::shared_ptr Wallet_get_farmer_keys::clone() const { return std::make_shared(*this); } void Wallet_get_farmer_keys::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_farmer_keys::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_farmer_keys::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_farmer_keys; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_farmer_keys::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_farmer_keys\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_farmer_keys::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_farmer_keys::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_farmer_keys"; _object["index"] = index; return _object; } void Wallet_get_farmer_keys::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_farmer_keys::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_farmer_keys::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_farmer_keys& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_farmer_keys& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_farmer_keys::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_farmer_keys::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_farmer_keys"; type_code->type_hash = vnx::Hash64(0x44709e11ff3ff3eeull); type_code->code_hash = vnx::Hash64(0xd98cf205e4acc7c7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_farmer_keys); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_farmer_keys_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_farmer_keys; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_farmer_keys>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_farmer_keys& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_farmer_keys_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_farmer_keys_return::VNX_TYPE_HASH(0x25479f868269fbb0ull); const vnx::Hash64 Wallet_get_farmer_keys_return::VNX_CODE_HASH(0x32127c3a3afe8b14ull); vnx::Hash64 Wallet_get_farmer_keys_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_farmer_keys_return::get_type_name() const { return "mmx.Wallet.get_farmer_keys.return"; } const vnx::TypeCode* Wallet_get_farmer_keys_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_farmer_keys_return; } std::shared_ptr Wallet_get_farmer_keys_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_farmer_keys_return::clone() const { return std::make_shared(*this); } void Wallet_get_farmer_keys_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_farmer_keys_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_farmer_keys_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_farmer_keys_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_farmer_keys_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_farmer_keys.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_farmer_keys_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_farmer_keys_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_farmer_keys.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_farmer_keys_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_farmer_keys_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_farmer_keys_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_farmer_keys_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_farmer_keys_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_farmer_keys_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_farmer_keys_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_farmer_keys.return"; type_code->type_hash = vnx::Hash64(0x25479f868269fbb0ull); type_code->code_hash = vnx::Hash64(0x32127c3a3afe8b14ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_farmer_keys_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {23, 2, 4, 7, 11, 32, 1, 11, 33, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_farmer_keys_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_farmer_keys_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_farmer_keys_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_farmer_keys_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_farmer_keys_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_farmer_keys_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_history.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_history::VNX_TYPE_HASH(0x921f73f3d97d2d4dull); const vnx::Hash64 Wallet_get_history::VNX_CODE_HASH(0x412907c7d90400abull); vnx::Hash64 Wallet_get_history::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_history::get_type_name() const { return "mmx.Wallet.get_history"; } const vnx::TypeCode* Wallet_get_history::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_history; } std::shared_ptr Wallet_get_history::create() { return std::make_shared(); } std::shared_ptr Wallet_get_history::clone() const { return std::make_shared(*this); } void Wallet_get_history::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_history::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_history::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_history; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, filter); _visitor.type_end(*_type_code); } void Wallet_get_history::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_history\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"filter\": "; vnx::write(_out, filter); _out << "}"; } void Wallet_get_history::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_history::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_history"; _object["index"] = index; _object["filter"] = filter; return _object; } void Wallet_get_history::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "filter") { _entry.second.to(filter); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_history::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "filter") { return vnx::Variant(filter); } return vnx::Variant(); } void Wallet_get_history::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "filter") { _value.to(filter); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_history& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_history& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_history::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_history::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_history"; type_code->type_hash = vnx::Hash64(0x921f73f3d97d2d4dull); type_code->code_hash = vnx::Hash64(0x412907c7d90400abull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_history); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::query_filter_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_history_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "filter"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.filter, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_history& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_history; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_history>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.filter, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_history& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_history& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_history& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_history_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_history_return::VNX_TYPE_HASH(0xb1b8c9a446a81b1full); const vnx::Hash64 Wallet_get_history_return::VNX_CODE_HASH(0xa49f9ab0fb74b994ull); vnx::Hash64 Wallet_get_history_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_history_return::get_type_name() const { return "mmx.Wallet.get_history.return"; } const vnx::TypeCode* Wallet_get_history_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_history_return; } std::shared_ptr Wallet_get_history_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_history_return::clone() const { return std::make_shared(*this); } void Wallet_get_history_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_history_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_history_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_history_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_history_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_history.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_history_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_history_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_history.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_history_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_history_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_history_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_history_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_history_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_history_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_history_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_history.return"; type_code->type_hash = vnx::Hash64(0xb1b8c9a446a81b1full); type_code->code_hash = vnx::Hash64(0xa49f9ab0fb74b994ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_history_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_history_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_history_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_history_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_history_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_history_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_history_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_master_seed.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_master_seed::VNX_TYPE_HASH(0x8fddd77ece4d295bull); const vnx::Hash64 Wallet_get_master_seed::VNX_CODE_HASH(0xcaa60f4096f3a701ull); vnx::Hash64 Wallet_get_master_seed::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_master_seed::get_type_name() const { return "mmx.Wallet.get_master_seed"; } const vnx::TypeCode* Wallet_get_master_seed::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_master_seed; } std::shared_ptr Wallet_get_master_seed::create() { return std::make_shared(); } std::shared_ptr Wallet_get_master_seed::clone() const { return std::make_shared(*this); } void Wallet_get_master_seed::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_master_seed::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_master_seed::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_master_seed; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_master_seed::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_master_seed\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_master_seed::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_master_seed::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_master_seed"; _object["index"] = index; return _object; } void Wallet_get_master_seed::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_master_seed::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_master_seed::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_master_seed& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_master_seed& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_master_seed::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_master_seed::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_master_seed"; type_code->type_hash = vnx::Hash64(0x8fddd77ece4d295bull); type_code->code_hash = vnx::Hash64(0xcaa60f4096f3a701ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_master_seed); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_master_seed_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_master_seed; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_master_seed>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_master_seed& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_master_seed& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_master_seed_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_master_seed_return::VNX_TYPE_HASH(0x8b0f38e742e132f0ull); const vnx::Hash64 Wallet_get_master_seed_return::VNX_CODE_HASH(0xe7ebd95587740e0dull); vnx::Hash64 Wallet_get_master_seed_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_master_seed_return::get_type_name() const { return "mmx.Wallet.get_master_seed.return"; } const vnx::TypeCode* Wallet_get_master_seed_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_master_seed_return; } std::shared_ptr Wallet_get_master_seed_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_master_seed_return::clone() const { return std::make_shared(*this); } void Wallet_get_master_seed_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_master_seed_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_master_seed_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_master_seed_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_master_seed_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_master_seed.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_master_seed_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_master_seed_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_master_seed.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_master_seed_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_master_seed_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_master_seed_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_master_seed_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_master_seed_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_master_seed_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_master_seed_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_master_seed.return"; type_code->type_hash = vnx::Hash64(0x8b0f38e742e132f0ull); type_code->code_hash = vnx::Hash64(0xe7ebd95587740e0dull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_master_seed_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_master_seed_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_master_seed_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_master_seed_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_master_seed_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_master_seed_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_master_seed_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_mnemonic_seed.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_mnemonic_seed::VNX_TYPE_HASH(0xacf58d3b1a8ce4c0ull); const vnx::Hash64 Wallet_get_mnemonic_seed::VNX_CODE_HASH(0xd6ce10dce10c352dull); vnx::Hash64 Wallet_get_mnemonic_seed::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_mnemonic_seed::get_type_name() const { return "mmx.Wallet.get_mnemonic_seed"; } const vnx::TypeCode* Wallet_get_mnemonic_seed::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_mnemonic_seed; } std::shared_ptr Wallet_get_mnemonic_seed::create() { return std::make_shared(); } std::shared_ptr Wallet_get_mnemonic_seed::clone() const { return std::make_shared(*this); } void Wallet_get_mnemonic_seed::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_mnemonic_seed::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_mnemonic_seed::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_seed; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_mnemonic_seed::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_mnemonic_seed\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_mnemonic_seed::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_mnemonic_seed::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_mnemonic_seed"; _object["index"] = index; return _object; } void Wallet_get_mnemonic_seed::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_mnemonic_seed::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_mnemonic_seed::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_seed& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_seed& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_mnemonic_seed::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_mnemonic_seed::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_mnemonic_seed"; type_code->type_hash = vnx::Hash64(0xacf58d3b1a8ce4c0ull); type_code->code_hash = vnx::Hash64(0xd6ce10dce10c352dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_mnemonic_seed); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_mnemonic_seed_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_seed; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_mnemonic_seed>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_mnemonic_seed_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_mnemonic_seed_return::VNX_TYPE_HASH(0xd02dd0736911ac8bull); const vnx::Hash64 Wallet_get_mnemonic_seed_return::VNX_CODE_HASH(0xbceaa79d0bd7829cull); vnx::Hash64 Wallet_get_mnemonic_seed_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_mnemonic_seed_return::get_type_name() const { return "mmx.Wallet.get_mnemonic_seed.return"; } const vnx::TypeCode* Wallet_get_mnemonic_seed_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_mnemonic_seed_return; } std::shared_ptr Wallet_get_mnemonic_seed_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_mnemonic_seed_return::clone() const { return std::make_shared(*this); } void Wallet_get_mnemonic_seed_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_mnemonic_seed_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_mnemonic_seed_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_seed_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_mnemonic_seed_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_mnemonic_seed.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_mnemonic_seed_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_mnemonic_seed_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_mnemonic_seed.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_mnemonic_seed_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_mnemonic_seed_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_mnemonic_seed_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_seed_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_seed_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_mnemonic_seed_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_mnemonic_seed_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_mnemonic_seed.return"; type_code->type_hash = vnx::Hash64(0xd02dd0736911ac8bull); type_code->code_hash = vnx::Hash64(0xbceaa79d0bd7829cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_mnemonic_seed_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_seed_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_seed_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_mnemonic_seed_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_seed_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_seed_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_seed_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_mnemonic_wordlist.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_mnemonic_wordlist::VNX_TYPE_HASH(0xb833298e3ff28a44ull); const vnx::Hash64 Wallet_get_mnemonic_wordlist::VNX_CODE_HASH(0xa3ac8b82b8e3ed61ull); vnx::Hash64 Wallet_get_mnemonic_wordlist::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_mnemonic_wordlist::get_type_name() const { return "mmx.Wallet.get_mnemonic_wordlist"; } const vnx::TypeCode* Wallet_get_mnemonic_wordlist::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist; } std::shared_ptr Wallet_get_mnemonic_wordlist::create() { return std::make_shared(); } std::shared_ptr Wallet_get_mnemonic_wordlist::clone() const { return std::make_shared(*this); } void Wallet_get_mnemonic_wordlist::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_mnemonic_wordlist::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_mnemonic_wordlist::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, lang); _visitor.type_end(*_type_code); } void Wallet_get_mnemonic_wordlist::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_mnemonic_wordlist\""; _out << ", \"lang\": "; vnx::write(_out, lang); _out << "}"; } void Wallet_get_mnemonic_wordlist::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_mnemonic_wordlist::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_mnemonic_wordlist"; _object["lang"] = lang; return _object; } void Wallet_get_mnemonic_wordlist::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "lang") { _entry.second.to(lang); } } } vnx::Variant Wallet_get_mnemonic_wordlist::get_field(const std::string& _name) const { if(_name == "lang") { return vnx::Variant(lang); } return vnx::Variant(); } void Wallet_get_mnemonic_wordlist::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "lang") { _value.to(lang); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_wordlist& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_wordlist& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_mnemonic_wordlist::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_mnemonic_wordlist::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_mnemonic_wordlist"; type_code->type_hash = vnx::Hash64(0xb833298e3ff28a44ull); type_code->code_hash = vnx::Hash64(0xa3ac8b82b8e3ed61ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_mnemonic_wordlist); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_mnemonic_wordlist_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "lang"; field.value = vnx::to_string("en"); field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.lang, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_mnemonic_wordlist>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.lang, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_mnemonic_wordlist_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_mnemonic_wordlist_return::VNX_TYPE_HASH(0x8ce49a9b57ee5789ull); const vnx::Hash64 Wallet_get_mnemonic_wordlist_return::VNX_CODE_HASH(0x9c9727a6461a284bull); vnx::Hash64 Wallet_get_mnemonic_wordlist_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_mnemonic_wordlist_return::get_type_name() const { return "mmx.Wallet.get_mnemonic_wordlist.return"; } const vnx::TypeCode* Wallet_get_mnemonic_wordlist_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist_return; } std::shared_ptr Wallet_get_mnemonic_wordlist_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_mnemonic_wordlist_return::clone() const { return std::make_shared(*this); } void Wallet_get_mnemonic_wordlist_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_mnemonic_wordlist_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_mnemonic_wordlist_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_mnemonic_wordlist_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_mnemonic_wordlist.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_mnemonic_wordlist_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_mnemonic_wordlist_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_mnemonic_wordlist.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_mnemonic_wordlist_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_mnemonic_wordlist_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_mnemonic_wordlist_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_mnemonic_wordlist_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_mnemonic_wordlist_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_mnemonic_wordlist_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_mnemonic_wordlist_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_mnemonic_wordlist.return"; type_code->type_hash = vnx::Hash64(0x8ce49a9b57ee5789ull); type_code->code_hash = vnx::Hash64(0x9c9727a6461a284bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_mnemonic_wordlist_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_mnemonic_wordlist_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_mnemonic_wordlist_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_mnemonic_wordlist_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_mnemonic_wordlist_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_offers.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_offers::VNX_TYPE_HASH(0x6dacbe70cbe08925ull); const vnx::Hash64 Wallet_get_offers::VNX_CODE_HASH(0x31668698ad05661full); vnx::Hash64 Wallet_get_offers::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_offers::get_type_name() const { return "mmx.Wallet.get_offers"; } const vnx::TypeCode* Wallet_get_offers::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_offers; } std::shared_ptr Wallet_get_offers::create() { return std::make_shared(); } std::shared_ptr Wallet_get_offers::clone() const { return std::make_shared(*this); } void Wallet_get_offers::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_offers::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_offers::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_offers; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, state); _visitor.type_end(*_type_code); } void Wallet_get_offers::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_offers\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"state\": "; vnx::write(_out, state); _out << "}"; } void Wallet_get_offers::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_offers::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_offers"; _object["index"] = index; _object["state"] = state; return _object; } void Wallet_get_offers::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "state") { _entry.second.to(state); } } } vnx::Variant Wallet_get_offers::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "state") { return vnx::Variant(state); } return vnx::Variant(); } void Wallet_get_offers::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "state") { _value.to(state); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_offers& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_offers& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_offers::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_offers::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_offers"; type_code->type_hash = vnx::Hash64(0x6dacbe70cbe08925ull); type_code->code_hash = vnx::Hash64(0x31668698ad05661full); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_offers); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_offers_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "state"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.state, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_offers& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_offers; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_offers>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(5); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.state); } void read(std::istream& in, ::mmx::Wallet_get_offers& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_offers& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_offers& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_offers_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_offers_return::VNX_TYPE_HASH(0xdb130e20d160c564ull); const vnx::Hash64 Wallet_get_offers_return::VNX_CODE_HASH(0xef448a6cf238da54ull); vnx::Hash64 Wallet_get_offers_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_offers_return::get_type_name() const { return "mmx.Wallet.get_offers.return"; } const vnx::TypeCode* Wallet_get_offers_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_offers_return; } std::shared_ptr Wallet_get_offers_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_offers_return::clone() const { return std::make_shared(*this); } void Wallet_get_offers_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_offers_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_offers_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_offers_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_offers_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_offers.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_offers_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_offers_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_offers.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_offers_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_offers_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_offers_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_offers_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_offers_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_offers_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_offers_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_offers.return"; type_code->type_hash = vnx::Hash64(0xdb130e20d160c564ull); type_code->code_hash = vnx::Hash64(0xef448a6cf238da54ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_offers_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::offer_data_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_offers_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_offers_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_offers_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_offers_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_offers_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_offers_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_swap_liquidity.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_swap_liquidity::VNX_TYPE_HASH(0x3a8f17d496f625bull); const vnx::Hash64 Wallet_get_swap_liquidity::VNX_CODE_HASH(0xf66fefb4714e1f81ull); vnx::Hash64 Wallet_get_swap_liquidity::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_swap_liquidity::get_type_name() const { return "mmx.Wallet.get_swap_liquidity"; } const vnx::TypeCode* Wallet_get_swap_liquidity::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_swap_liquidity; } std::shared_ptr Wallet_get_swap_liquidity::create() { return std::make_shared(); } std::shared_ptr Wallet_get_swap_liquidity::clone() const { return std::make_shared(*this); } void Wallet_get_swap_liquidity::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_swap_liquidity::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_swap_liquidity::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_swap_liquidity; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_get_swap_liquidity::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_swap_liquidity\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_get_swap_liquidity::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_swap_liquidity::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_swap_liquidity"; _object["index"] = index; return _object; } void Wallet_get_swap_liquidity::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_get_swap_liquidity::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_get_swap_liquidity::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_swap_liquidity& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_swap_liquidity& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_swap_liquidity::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_swap_liquidity::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_swap_liquidity"; type_code->type_hash = vnx::Hash64(0x3a8f17d496f625bull); type_code->code_hash = vnx::Hash64(0xf66fefb4714e1f81ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_swap_liquidity); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_swap_liquidity_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_swap_liquidity; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_swap_liquidity>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_swap_liquidity_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_swap_liquidity_return::VNX_TYPE_HASH(0x6846e8caa82b1463ull); const vnx::Hash64 Wallet_get_swap_liquidity_return::VNX_CODE_HASH(0x80c61153f74d0aa2ull); vnx::Hash64 Wallet_get_swap_liquidity_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_swap_liquidity_return::get_type_name() const { return "mmx.Wallet.get_swap_liquidity.return"; } const vnx::TypeCode* Wallet_get_swap_liquidity_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_swap_liquidity_return; } std::shared_ptr Wallet_get_swap_liquidity_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_swap_liquidity_return::clone() const { return std::make_shared(*this); } void Wallet_get_swap_liquidity_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_swap_liquidity_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_swap_liquidity_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_swap_liquidity_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_swap_liquidity_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_swap_liquidity.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_swap_liquidity_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_swap_liquidity_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_swap_liquidity.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_swap_liquidity_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_swap_liquidity_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_swap_liquidity_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_swap_liquidity_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_swap_liquidity_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_swap_liquidity_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_swap_liquidity_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_swap_liquidity.return"; type_code->type_hash = vnx::Hash64(0x6846e8caa82b1463ull); type_code->code_hash = vnx::Hash64(0x80c61153f74d0aa2ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_swap_liquidity_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 11, 2, 23, 2, 4, 7, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_swap_liquidity_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_swap_liquidity_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_swap_liquidity_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_swap_liquidity_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_swap_liquidity_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_swap_liquidity_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_token_list.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_token_list::VNX_TYPE_HASH(0x322b4f4af3737efcull); const vnx::Hash64 Wallet_get_token_list::VNX_CODE_HASH(0x58fd5e084df1b2d5ull); vnx::Hash64 Wallet_get_token_list::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_token_list::get_type_name() const { return "mmx.Wallet.get_token_list"; } const vnx::TypeCode* Wallet_get_token_list::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_token_list; } std::shared_ptr Wallet_get_token_list::create() { return std::make_shared(); } std::shared_ptr Wallet_get_token_list::clone() const { return std::make_shared(*this); } void Wallet_get_token_list::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_token_list::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_token_list::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_token_list; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_get_token_list::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_token_list\""; _out << "}"; } void Wallet_get_token_list::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_token_list::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_token_list"; return _object; } void Wallet_get_token_list::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_get_token_list::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_get_token_list::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_token_list& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_token_list& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_token_list::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_token_list::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_token_list"; type_code->type_hash = vnx::Hash64(0x322b4f4af3737efcull); type_code->code_hash = vnx::Hash64(0x58fd5e084df1b2d5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_token_list); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_token_list_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_token_list& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_token_list; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_token_list>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_get_token_list& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_token_list& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_token_list_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_token_list_return::VNX_TYPE_HASH(0xe36d7210ddf3d216ull); const vnx::Hash64 Wallet_get_token_list_return::VNX_CODE_HASH(0x98c95688535be6a1ull); vnx::Hash64 Wallet_get_token_list_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_token_list_return::get_type_name() const { return "mmx.Wallet.get_token_list.return"; } const vnx::TypeCode* Wallet_get_token_list_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_token_list_return; } std::shared_ptr Wallet_get_token_list_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_token_list_return::clone() const { return std::make_shared(*this); } void Wallet_get_token_list_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_token_list_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_token_list_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_token_list_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_token_list_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_token_list.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_token_list_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_token_list_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_token_list.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_token_list_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_token_list_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_token_list_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_token_list_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_token_list_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_token_list_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_token_list_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_token_list.return"; type_code->type_hash = vnx::Hash64(0xe36d7210ddf3d216ull); type_code->code_hash = vnx::Hash64(0x98c95688535be6a1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_token_list_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_token_list_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_token_list_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_token_list_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_token_list_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_token_list_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_token_list_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_total_balances.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_total_balances::VNX_TYPE_HASH(0xedd130caba2e2f04ull); const vnx::Hash64 Wallet_get_total_balances::VNX_CODE_HASH(0x8384140fbbd50fe3ull); vnx::Hash64 Wallet_get_total_balances::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_total_balances::get_type_name() const { return "mmx.Wallet.get_total_balances"; } const vnx::TypeCode* Wallet_get_total_balances::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_total_balances; } std::shared_ptr Wallet_get_total_balances::create() { return std::make_shared(); } std::shared_ptr Wallet_get_total_balances::clone() const { return std::make_shared(*this); } void Wallet_get_total_balances::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_total_balances::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_total_balances::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_total_balances; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, addresses); _visitor.type_end(*_type_code); } void Wallet_get_total_balances::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_total_balances\""; _out << ", \"addresses\": "; vnx::write(_out, addresses); _out << "}"; } void Wallet_get_total_balances::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_total_balances::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_total_balances"; _object["addresses"] = addresses; return _object; } void Wallet_get_total_balances::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "addresses") { _entry.second.to(addresses); } } } vnx::Variant Wallet_get_total_balances::get_field(const std::string& _name) const { if(_name == "addresses") { return vnx::Variant(addresses); } return vnx::Variant(); } void Wallet_get_total_balances::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "addresses") { _value.to(addresses); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_total_balances& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_total_balances& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_total_balances::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_total_balances::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_total_balances"; type_code->type_hash = vnx::Hash64(0xedd130caba2e2f04ull); type_code->code_hash = vnx::Hash64(0x8384140fbbd50fe3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_total_balances); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_total_balances_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "addresses"; field.code = {12, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.addresses, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_total_balances; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_total_balances>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.addresses, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_total_balances& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_total_balances& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_total_balances_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_total_balances_return::VNX_TYPE_HASH(0x46f0368d7c4e45ddull); const vnx::Hash64 Wallet_get_total_balances_return::VNX_CODE_HASH(0xb6f538b27dce56d1ull); vnx::Hash64 Wallet_get_total_balances_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_total_balances_return::get_type_name() const { return "mmx.Wallet.get_total_balances.return"; } const vnx::TypeCode* Wallet_get_total_balances_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_total_balances_return; } std::shared_ptr Wallet_get_total_balances_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_total_balances_return::clone() const { return std::make_shared(*this); } void Wallet_get_total_balances_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_total_balances_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_total_balances_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_total_balances_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_total_balances_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_total_balances.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_total_balances_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_total_balances_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_total_balances.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_total_balances_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_total_balances_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_total_balances_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_total_balances_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_total_balances_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_total_balances_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_total_balances_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_total_balances.return"; type_code->type_hash = vnx::Hash64(0x46f0368d7c4e45ddull); type_code->code_hash = vnx::Hash64(0xb6f538b27dce56d1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_total_balances_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::balance_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {13, 5, 11, 32, 1, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_total_balances_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_total_balances_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_total_balances_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_total_balances_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_total_balances_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_total_balances_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_tx_log.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_tx_log::VNX_TYPE_HASH(0xc5570936be29c0ebull); const vnx::Hash64 Wallet_get_tx_log::VNX_CODE_HASH(0xb1e755e53564438cull); vnx::Hash64 Wallet_get_tx_log::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_tx_log::get_type_name() const { return "mmx.Wallet.get_tx_log"; } const vnx::TypeCode* Wallet_get_tx_log::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_tx_log; } std::shared_ptr Wallet_get_tx_log::create() { return std::make_shared(); } std::shared_ptr Wallet_get_tx_log::clone() const { return std::make_shared(*this); } void Wallet_get_tx_log::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_tx_log::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_tx_log::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_tx_log; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, limit); _visitor.type_end(*_type_code); } void Wallet_get_tx_log::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_tx_log\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"limit\": "; vnx::write(_out, limit); _out << "}"; } void Wallet_get_tx_log::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_tx_log::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_tx_log"; _object["index"] = index; _object["limit"] = limit; return _object; } void Wallet_get_tx_log::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "limit") { _entry.second.to(limit); } } } vnx::Variant Wallet_get_tx_log::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "limit") { return vnx::Variant(limit); } return vnx::Variant(); } void Wallet_get_tx_log::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "limit") { _value.to(limit); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_tx_log& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_tx_log& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_tx_log::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_tx_log::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_tx_log"; type_code->type_hash = vnx::Hash64(0xc5570936be29c0ebull); type_code->code_hash = vnx::Hash64(0xb1e755e53564438cull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_get_tx_log); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_get_tx_log_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(100); field.code = {7}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_tx_log; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_tx_log>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.limit); } void read(std::istream& in, ::mmx::Wallet_get_tx_log& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_tx_log& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_get_tx_log_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_get_tx_log_return::VNX_TYPE_HASH(0x5c6d4b8fc9820ec1ull); const vnx::Hash64 Wallet_get_tx_log_return::VNX_CODE_HASH(0x473ec2b2f67e072eull); vnx::Hash64 Wallet_get_tx_log_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_get_tx_log_return::get_type_name() const { return "mmx.Wallet.get_tx_log.return"; } const vnx::TypeCode* Wallet_get_tx_log_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_get_tx_log_return; } std::shared_ptr Wallet_get_tx_log_return::create() { return std::make_shared(); } std::shared_ptr Wallet_get_tx_log_return::clone() const { return std::make_shared(*this); } void Wallet_get_tx_log_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_get_tx_log_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_get_tx_log_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_get_tx_log_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_get_tx_log_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.get_tx_log.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_get_tx_log_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_get_tx_log_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.get_tx_log.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_get_tx_log_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_get_tx_log_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_get_tx_log_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_get_tx_log_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_get_tx_log_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_get_tx_log_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_get_tx_log_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.get_tx_log.return"; type_code->type_hash = vnx::Hash64(0x5c6d4b8fc9820ec1ull); type_code->code_hash = vnx::Hash64(0x473ec2b2f67e072eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_get_tx_log_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_log_entry_t::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_get_tx_log_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_get_tx_log_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_get_tx_log_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_get_tx_log_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_get_tx_log_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_get_tx_log_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_import_wallet.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_import_wallet::VNX_TYPE_HASH(0x63a1d5b2fe482dd1ull); const vnx::Hash64 Wallet_import_wallet::VNX_CODE_HASH(0xd93a521903365209ull); vnx::Hash64 Wallet_import_wallet::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_import_wallet::get_type_name() const { return "mmx.Wallet.import_wallet"; } const vnx::TypeCode* Wallet_import_wallet::get_type_code() const { return mmx::vnx_native_type_code_Wallet_import_wallet; } std::shared_ptr Wallet_import_wallet::create() { return std::make_shared(); } std::shared_ptr Wallet_import_wallet::clone() const { return std::make_shared(*this); } void Wallet_import_wallet::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_import_wallet::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_import_wallet::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_import_wallet; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, config); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, key_file); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, passphrase); _visitor.type_end(*_type_code); } void Wallet_import_wallet::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.import_wallet\""; _out << ", \"config\": "; vnx::write(_out, config); _out << ", \"key_file\": "; vnx::write(_out, key_file); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << "}"; } void Wallet_import_wallet::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_import_wallet::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.import_wallet"; _object["config"] = config; _object["key_file"] = key_file; _object["passphrase"] = passphrase; return _object; } void Wallet_import_wallet::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "config") { _entry.second.to(config); } else if(_entry.first == "key_file") { _entry.second.to(key_file); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } } } vnx::Variant Wallet_import_wallet::get_field(const std::string& _name) const { if(_name == "config") { return vnx::Variant(config); } if(_name == "key_file") { return vnx::Variant(key_file); } if(_name == "passphrase") { return vnx::Variant(passphrase); } return vnx::Variant(); } void Wallet_import_wallet::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "config") { _value.to(config); } else if(_name == "key_file") { _value.to(key_file); } else if(_name == "passphrase") { _value.to(passphrase); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_import_wallet& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_import_wallet& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_import_wallet::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_import_wallet::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.import_wallet"; type_code->type_hash = vnx::Hash64(0x63a1d5b2fe482dd1ull); type_code->code_hash = vnx::Hash64(0xd93a521903365209ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_import_wallet); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::account_t::static_get_type_code(); type_code->return_type = ::mmx::Wallet_import_wallet_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "config"; field.code = {19, 0}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "key_file"; field.code = {16}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "passphrase"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.config, type_code, _field->code.data()); break; case 1: vnx::read(in, value.key_file, type_code, _field->code.data()); break; case 2: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_import_wallet& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_import_wallet; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_import_wallet>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.config, type_code, type_code->fields[0].code.data()); vnx::write(out, value.key_file, type_code, type_code->fields[1].code.data()); vnx::write(out, value.passphrase, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_import_wallet& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_import_wallet& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_import_wallet_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_import_wallet_return::VNX_TYPE_HASH(0xc6edac537d44ecd1ull); const vnx::Hash64 Wallet_import_wallet_return::VNX_CODE_HASH(0xe5b420ce28b802b6ull); vnx::Hash64 Wallet_import_wallet_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_import_wallet_return::get_type_name() const { return "mmx.Wallet.import_wallet.return"; } const vnx::TypeCode* Wallet_import_wallet_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_import_wallet_return; } std::shared_ptr Wallet_import_wallet_return::create() { return std::make_shared(); } std::shared_ptr Wallet_import_wallet_return::clone() const { return std::make_shared(*this); } void Wallet_import_wallet_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_import_wallet_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_import_wallet_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_import_wallet_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_import_wallet_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.import_wallet.return\""; _out << "}"; } void Wallet_import_wallet_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_import_wallet_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.import_wallet.return"; return _object; } void Wallet_import_wallet_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_import_wallet_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_import_wallet_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_import_wallet_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_import_wallet_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_import_wallet_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_import_wallet_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.import_wallet.return"; type_code->type_hash = vnx::Hash64(0xc6edac537d44ecd1ull); type_code->code_hash = vnx::Hash64(0xe5b420ce28b802b6ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_import_wallet_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_import_wallet_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_import_wallet_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_import_wallet_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_import_wallet_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_import_wallet_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_import_wallet_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_is_locked.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_is_locked::VNX_TYPE_HASH(0x6087e83febcc233ull); const vnx::Hash64 Wallet_is_locked::VNX_CODE_HASH(0x99e989de7c61f372ull); vnx::Hash64 Wallet_is_locked::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_is_locked::get_type_name() const { return "mmx.Wallet.is_locked"; } const vnx::TypeCode* Wallet_is_locked::get_type_code() const { return mmx::vnx_native_type_code_Wallet_is_locked; } std::shared_ptr Wallet_is_locked::create() { return std::make_shared(); } std::shared_ptr Wallet_is_locked::clone() const { return std::make_shared(*this); } void Wallet_is_locked::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_is_locked::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_is_locked::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_is_locked; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_is_locked::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.is_locked\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_is_locked::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_is_locked::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.is_locked"; _object["index"] = index; return _object; } void Wallet_is_locked::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_is_locked::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_is_locked::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_is_locked& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_is_locked& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_is_locked::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_is_locked::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.is_locked"; type_code->type_hash = vnx::Hash64(0x6087e83febcc233ull); type_code->code_hash = vnx::Hash64(0x99e989de7c61f372ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_is_locked); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_is_locked_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_is_locked& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_is_locked; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_is_locked>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_is_locked& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_is_locked& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_is_locked& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_is_locked_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_is_locked_return::VNX_TYPE_HASH(0x1ea1b30193de8d7bull); const vnx::Hash64 Wallet_is_locked_return::VNX_CODE_HASH(0xa654b2afcc700bbdull); vnx::Hash64 Wallet_is_locked_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_is_locked_return::get_type_name() const { return "mmx.Wallet.is_locked.return"; } const vnx::TypeCode* Wallet_is_locked_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_is_locked_return; } std::shared_ptr Wallet_is_locked_return::create() { return std::make_shared(); } std::shared_ptr Wallet_is_locked_return::clone() const { return std::make_shared(*this); } void Wallet_is_locked_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_is_locked_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_is_locked_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_is_locked_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_is_locked_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.is_locked.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_is_locked_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_is_locked_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.is_locked.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_is_locked_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_is_locked_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_is_locked_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_is_locked_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_is_locked_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_is_locked_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_is_locked_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.is_locked.return"; type_code->type_hash = vnx::Hash64(0x1ea1b30193de8d7bull); type_code->code_hash = vnx::Hash64(0xa654b2afcc700bbdull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_is_locked_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 1; field.name = "_ret_0"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value._ret_0, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_is_locked_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_is_locked_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_is_locked_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value._ret_0); } void read(std::istream& in, ::mmx::Wallet_is_locked_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_is_locked_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_is_locked_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_lock.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_lock::VNX_TYPE_HASH(0x9072deb8ab538b2bull); const vnx::Hash64 Wallet_lock::VNX_CODE_HASH(0x5ef9cd488ac99859ull); vnx::Hash64 Wallet_lock::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_lock::get_type_name() const { return "mmx.Wallet.lock"; } const vnx::TypeCode* Wallet_lock::get_type_code() const { return mmx::vnx_native_type_code_Wallet_lock; } std::shared_ptr Wallet_lock::create() { return std::make_shared(); } std::shared_ptr Wallet_lock::clone() const { return std::make_shared(*this); } void Wallet_lock::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_lock::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_lock::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_lock; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_lock::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.lock\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_lock::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_lock::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.lock"; _object["index"] = index; return _object; } void Wallet_lock::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_lock::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_lock::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_lock& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_lock& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_lock::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_lock::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.lock"; type_code->type_hash = vnx::Hash64(0x9072deb8ab538b2bull); type_code->code_hash = vnx::Hash64(0x5ef9cd488ac99859ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_lock); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_lock_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_lock& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_lock; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_lock>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_lock& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_lock& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_lock& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_lock_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_lock_return::VNX_TYPE_HASH(0x74cb9d670ae675f3ull); const vnx::Hash64 Wallet_lock_return::VNX_CODE_HASH(0x1534155daaa5320cull); vnx::Hash64 Wallet_lock_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_lock_return::get_type_name() const { return "mmx.Wallet.lock.return"; } const vnx::TypeCode* Wallet_lock_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_lock_return; } std::shared_ptr Wallet_lock_return::create() { return std::make_shared(); } std::shared_ptr Wallet_lock_return::clone() const { return std::make_shared(*this); } void Wallet_lock_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_lock_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_lock_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_lock_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_lock_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.lock.return\""; _out << "}"; } void Wallet_lock_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_lock_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.lock.return"; return _object; } void Wallet_lock_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_lock_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_lock_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_lock_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_lock_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_lock_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_lock_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.lock.return"; type_code->type_hash = vnx::Hash64(0x74cb9d670ae675f3ull); type_code->code_hash = vnx::Hash64(0x1534155daaa5320cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_lock_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_lock_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_lock_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_lock_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_lock_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_lock_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_lock_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_make_offer.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_make_offer::VNX_TYPE_HASH(0x8b0cf597e8265a73ull); const vnx::Hash64 Wallet_make_offer::VNX_CODE_HASH(0xe13d393a070dc28eull); vnx::Hash64 Wallet_make_offer::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_make_offer::get_type_name() const { return "mmx.Wallet.make_offer"; } const vnx::TypeCode* Wallet_make_offer::get_type_code() const { return mmx::vnx_native_type_code_Wallet_make_offer; } std::shared_ptr Wallet_make_offer::create() { return std::make_shared(); } std::shared_ptr Wallet_make_offer::clone() const { return std::make_shared(*this); } void Wallet_make_offer::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_make_offer::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_make_offer::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_make_offer; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, owner); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, bid_amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, bid_currency); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, ask_amount); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, ask_currency); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_make_offer::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.make_offer\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"owner\": "; vnx::write(_out, owner); _out << ", \"bid_amount\": "; vnx::write(_out, bid_amount); _out << ", \"bid_currency\": "; vnx::write(_out, bid_currency); _out << ", \"ask_amount\": "; vnx::write(_out, ask_amount); _out << ", \"ask_currency\": "; vnx::write(_out, ask_currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_make_offer::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_make_offer::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.make_offer"; _object["index"] = index; _object["owner"] = owner; _object["bid_amount"] = bid_amount; _object["bid_currency"] = bid_currency; _object["ask_amount"] = ask_amount; _object["ask_currency"] = ask_currency; _object["options"] = options; return _object; } void Wallet_make_offer::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "ask_amount") { _entry.second.to(ask_amount); } else if(_entry.first == "ask_currency") { _entry.second.to(ask_currency); } else if(_entry.first == "bid_amount") { _entry.second.to(bid_amount); } else if(_entry.first == "bid_currency") { _entry.second.to(bid_currency); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "owner") { _entry.second.to(owner); } } } vnx::Variant Wallet_make_offer::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "owner") { return vnx::Variant(owner); } if(_name == "bid_amount") { return vnx::Variant(bid_amount); } if(_name == "bid_currency") { return vnx::Variant(bid_currency); } if(_name == "ask_amount") { return vnx::Variant(ask_amount); } if(_name == "ask_currency") { return vnx::Variant(ask_currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_make_offer::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "owner") { _value.to(owner); } else if(_name == "bid_amount") { _value.to(bid_amount); } else if(_name == "bid_currency") { _value.to(bid_currency); } else if(_name == "ask_amount") { _value.to(ask_amount); } else if(_name == "ask_currency") { _value.to(ask_currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_make_offer& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_make_offer& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_make_offer::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_make_offer::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.make_offer"; type_code->type_hash = vnx::Hash64(0x8b0cf597e8265a73ull); type_code->code_hash = vnx::Hash64(0xe13d393a070dc28eull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_make_offer); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_make_offer_return::static_get_type_code(); type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "owner"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "bid_amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "bid_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "ask_amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "ask_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.owner, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.bid_amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.bid_currency, type_code, _field->code.data()); break; case 4: vnx::read(in, value.ask_amount, type_code, _field->code.data()); break; case 5: vnx::read(in, value.ask_currency, type_code, _field->code.data()); break; case 6: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_make_offer& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_make_offer; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_make_offer>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.owner); vnx::write(out, value.bid_amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.bid_currency, type_code, type_code->fields[3].code.data()); vnx::write(out, value.ask_amount, type_code, type_code->fields[4].code.data()); vnx::write(out, value.ask_currency, type_code, type_code->fields[5].code.data()); vnx::write(out, value.options, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::Wallet_make_offer& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_make_offer& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_make_offer& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_make_offer_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_make_offer_return::VNX_TYPE_HASH(0xf8ecff218266aadaull); const vnx::Hash64 Wallet_make_offer_return::VNX_CODE_HASH(0x4fb2aaa69af5e557ull); vnx::Hash64 Wallet_make_offer_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_make_offer_return::get_type_name() const { return "mmx.Wallet.make_offer.return"; } const vnx::TypeCode* Wallet_make_offer_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_make_offer_return; } std::shared_ptr Wallet_make_offer_return::create() { return std::make_shared(); } std::shared_ptr Wallet_make_offer_return::clone() const { return std::make_shared(*this); } void Wallet_make_offer_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_make_offer_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_make_offer_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_make_offer_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_make_offer_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.make_offer.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_make_offer_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_make_offer_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.make_offer.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_make_offer_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_make_offer_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_make_offer_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_make_offer_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_make_offer_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_make_offer_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_make_offer_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.make_offer.return"; type_code->type_hash = vnx::Hash64(0xf8ecff218266aadaull); type_code->code_hash = vnx::Hash64(0x4fb2aaa69af5e557ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_make_offer_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_make_offer_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_make_offer_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_make_offer_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_make_offer_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_make_offer_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_make_offer_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_mark_spent.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_mark_spent::VNX_TYPE_HASH(0x107fed23348b3333ull); const vnx::Hash64 Wallet_mark_spent::VNX_CODE_HASH(0x7a427fe0dff40777ull); vnx::Hash64 Wallet_mark_spent::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_mark_spent::get_type_name() const { return "mmx.Wallet.mark_spent"; } const vnx::TypeCode* Wallet_mark_spent::get_type_code() const { return mmx::vnx_native_type_code_Wallet_mark_spent; } std::shared_ptr Wallet_mark_spent::create() { return std::make_shared(); } std::shared_ptr Wallet_mark_spent::clone() const { return std::make_shared(*this); } void Wallet_mark_spent::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_mark_spent::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_mark_spent::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_mark_spent; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amounts); _visitor.type_end(*_type_code); } void Wallet_mark_spent::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.mark_spent\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amounts\": "; vnx::write(_out, amounts); _out << "}"; } void Wallet_mark_spent::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_mark_spent::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.mark_spent"; _object["index"] = index; _object["amounts"] = amounts; return _object; } void Wallet_mark_spent::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amounts") { _entry.second.to(amounts); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_mark_spent::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amounts") { return vnx::Variant(amounts); } return vnx::Variant(); } void Wallet_mark_spent::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amounts") { _value.to(amounts); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_mark_spent& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_mark_spent& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_mark_spent::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_mark_spent::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.mark_spent"; type_code->type_hash = vnx::Hash64(0x107fed23348b3333ull); type_code->code_hash = vnx::Hash64(0x7a427fe0dff40777ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_mark_spent); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_mark_spent_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amounts"; field.code = {13, 12, 23, 2, 4, 7, 11, 32, 1, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amounts, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_mark_spent& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_mark_spent; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_mark_spent>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amounts, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_mark_spent& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_mark_spent& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_mark_spent_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_mark_spent_return::VNX_TYPE_HASH(0xf28950d2b8f874dfull); const vnx::Hash64 Wallet_mark_spent_return::VNX_CODE_HASH(0xae19515a62eec3ddull); vnx::Hash64 Wallet_mark_spent_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_mark_spent_return::get_type_name() const { return "mmx.Wallet.mark_spent.return"; } const vnx::TypeCode* Wallet_mark_spent_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_mark_spent_return; } std::shared_ptr Wallet_mark_spent_return::create() { return std::make_shared(); } std::shared_ptr Wallet_mark_spent_return::clone() const { return std::make_shared(*this); } void Wallet_mark_spent_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_mark_spent_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_mark_spent_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_mark_spent_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_mark_spent_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.mark_spent.return\""; _out << "}"; } void Wallet_mark_spent_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_mark_spent_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.mark_spent.return"; return _object; } void Wallet_mark_spent_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_mark_spent_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_mark_spent_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_mark_spent_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_mark_spent_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_mark_spent_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_mark_spent_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.mark_spent.return"; type_code->type_hash = vnx::Hash64(0xf28950d2b8f874dfull); type_code->code_hash = vnx::Hash64(0xae19515a62eec3ddull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_mark_spent_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_mark_spent_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_mark_spent_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_mark_spent_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_mark_spent_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_mark_spent_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_mark_spent_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_offer_trade.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_offer_trade::VNX_TYPE_HASH(0x557a94a5a4887bf2ull); const vnx::Hash64 Wallet_offer_trade::VNX_CODE_HASH(0x6ac0af69904bcd76ull); vnx::Hash64 Wallet_offer_trade::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_offer_trade::get_type_name() const { return "mmx.Wallet.offer_trade"; } const vnx::TypeCode* Wallet_offer_trade::get_type_code() const { return mmx::vnx_native_type_code_Wallet_offer_trade; } std::shared_ptr Wallet_offer_trade::create() { return std::make_shared(); } std::shared_ptr Wallet_offer_trade::clone() const { return std::make_shared(*this); } void Wallet_offer_trade::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_offer_trade::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_offer_trade::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_offer_trade; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, dst_addr); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, price); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_offer_trade::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.offer_trade\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"dst_addr\": "; vnx::write(_out, dst_addr); _out << ", \"price\": "; vnx::write(_out, price); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_offer_trade::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_offer_trade::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.offer_trade"; _object["index"] = index; _object["address"] = address; _object["amount"] = amount; _object["dst_addr"] = dst_addr; _object["price"] = price; _object["options"] = options; return _object; } void Wallet_offer_trade::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "dst_addr") { _entry.second.to(dst_addr); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "price") { _entry.second.to(price); } } } vnx::Variant Wallet_offer_trade::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "dst_addr") { return vnx::Variant(dst_addr); } if(_name == "price") { return vnx::Variant(price); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_offer_trade::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "amount") { _value.to(amount); } else if(_name == "dst_addr") { _value.to(dst_addr); } else if(_name == "price") { _value.to(price); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_offer_trade& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_offer_trade& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_offer_trade::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_offer_trade::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.offer_trade"; type_code->type_hash = vnx::Hash64(0x557a94a5a4887bf2ull); type_code->code_hash = vnx::Hash64(0x6ac0af69904bcd76ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_offer_trade); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_offer_trade_return::static_get_type_code(); type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "dst_addr"; field.code = {3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "price"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.dst_addr, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 4: vnx::read(in, value.price, type_code, _field->code.data()); break; case 5: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_offer_trade& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_offer_trade; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_offer_trade>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.dst_addr); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.price, type_code, type_code->fields[4].code.data()); vnx::write(out, value.options, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::Wallet_offer_trade& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_offer_trade& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_offer_trade_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_offer_trade_return::VNX_TYPE_HASH(0xb43f9bef89670cebull); const vnx::Hash64 Wallet_offer_trade_return::VNX_CODE_HASH(0x2abc8aa8f3e7c390ull); vnx::Hash64 Wallet_offer_trade_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_offer_trade_return::get_type_name() const { return "mmx.Wallet.offer_trade.return"; } const vnx::TypeCode* Wallet_offer_trade_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_offer_trade_return; } std::shared_ptr Wallet_offer_trade_return::create() { return std::make_shared(); } std::shared_ptr Wallet_offer_trade_return::clone() const { return std::make_shared(*this); } void Wallet_offer_trade_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_offer_trade_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_offer_trade_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_offer_trade_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_offer_trade_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.offer_trade.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_offer_trade_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_offer_trade_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.offer_trade.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_offer_trade_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_offer_trade_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_offer_trade_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_offer_trade_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_offer_trade_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_offer_trade_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_offer_trade_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.offer_trade.return"; type_code->type_hash = vnx::Hash64(0xb43f9bef89670cebull); type_code->code_hash = vnx::Hash64(0x2abc8aa8f3e7c390ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_offer_trade_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_offer_trade_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_offer_trade_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_offer_trade_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_offer_trade_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_offer_trade_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_trade_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_offer_withdraw.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_offer_withdraw::VNX_TYPE_HASH(0x790a334fbf5dd1e6ull); const vnx::Hash64 Wallet_offer_withdraw::VNX_CODE_HASH(0x4ab2d90a638d2787ull); vnx::Hash64 Wallet_offer_withdraw::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_offer_withdraw::get_type_name() const { return "mmx.Wallet.offer_withdraw"; } const vnx::TypeCode* Wallet_offer_withdraw::get_type_code() const { return mmx::vnx_native_type_code_Wallet_offer_withdraw; } std::shared_ptr Wallet_offer_withdraw::create() { return std::make_shared(); } std::shared_ptr Wallet_offer_withdraw::clone() const { return std::make_shared(*this); } void Wallet_offer_withdraw::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_offer_withdraw::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_offer_withdraw::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_offer_withdraw; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_offer_withdraw::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.offer_withdraw\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_offer_withdraw::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_offer_withdraw::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.offer_withdraw"; _object["index"] = index; _object["address"] = address; _object["options"] = options; return _object; } void Wallet_offer_withdraw::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_offer_withdraw::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_offer_withdraw::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_offer_withdraw& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_offer_withdraw& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_offer_withdraw::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_offer_withdraw::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.offer_withdraw"; type_code->type_hash = vnx::Hash64(0x790a334fbf5dd1e6ull); type_code->code_hash = vnx::Hash64(0x4ab2d90a638d2787ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_offer_withdraw); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_offer_withdraw_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_offer_withdraw; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_offer_withdraw>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.options, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_offer_withdraw& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_offer_withdraw_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_offer_withdraw_return::VNX_TYPE_HASH(0xea9f43cd17c41965ull); const vnx::Hash64 Wallet_offer_withdraw_return::VNX_CODE_HASH(0xece913c433426433ull); vnx::Hash64 Wallet_offer_withdraw_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_offer_withdraw_return::get_type_name() const { return "mmx.Wallet.offer_withdraw.return"; } const vnx::TypeCode* Wallet_offer_withdraw_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_offer_withdraw_return; } std::shared_ptr Wallet_offer_withdraw_return::create() { return std::make_shared(); } std::shared_ptr Wallet_offer_withdraw_return::clone() const { return std::make_shared(*this); } void Wallet_offer_withdraw_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_offer_withdraw_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_offer_withdraw_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_offer_withdraw_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_offer_withdraw_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.offer_withdraw.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_offer_withdraw_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_offer_withdraw_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.offer_withdraw.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_offer_withdraw_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_offer_withdraw_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_offer_withdraw_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_offer_withdraw_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_offer_withdraw_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_offer_withdraw_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_offer_withdraw_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.offer_withdraw.return"; type_code->type_hash = vnx::Hash64(0xea9f43cd17c41965ull); type_code->code_hash = vnx::Hash64(0xece913c433426433ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_offer_withdraw_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_offer_withdraw_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_offer_withdraw_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_offer_withdraw_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_offer_withdraw_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_offer_withdraw_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_offer_withdraw_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_plotnft_create.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_plotnft_create::VNX_TYPE_HASH(0x6b0c985ca2c555c9ull); const vnx::Hash64 Wallet_plotnft_create::VNX_CODE_HASH(0xdf7a5af8c6702eb0ull); vnx::Hash64 Wallet_plotnft_create::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_plotnft_create::get_type_name() const { return "mmx.Wallet.plotnft_create"; } const vnx::TypeCode* Wallet_plotnft_create::get_type_code() const { return mmx::vnx_native_type_code_Wallet_plotnft_create; } std::shared_ptr Wallet_plotnft_create::create() { return std::make_shared(); } std::shared_ptr Wallet_plotnft_create::clone() const { return std::make_shared(*this); } void Wallet_plotnft_create::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_plotnft_create::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_plotnft_create::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_plotnft_create; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, owner); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_plotnft_create::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.plotnft_create\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"owner\": "; vnx::write(_out, owner); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_plotnft_create::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_plotnft_create::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.plotnft_create"; _object["index"] = index; _object["name"] = name; _object["owner"] = owner; _object["options"] = options; return _object; } void Wallet_plotnft_create::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "owner") { _entry.second.to(owner); } } } vnx::Variant Wallet_plotnft_create::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "name") { return vnx::Variant(name); } if(_name == "owner") { return vnx::Variant(owner); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_plotnft_create::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "name") { _value.to(name); } else if(_name == "owner") { _value.to(owner); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_create& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_plotnft_create& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_plotnft_create::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_plotnft_create::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.plotnft_create"; type_code->type_hash = vnx::Hash64(0x6b0c985ca2c555c9ull); type_code->code_hash = vnx::Hash64(0xdf7a5af8c6702eb0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_plotnft_create); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_plotnft_create_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "owner"; field.code = {33, 3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.owner, type_code, _field->code.data()); break; case 3: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_plotnft_create; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_plotnft_create>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.owner, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::Wallet_plotnft_create& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_create& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_plotnft_create_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_plotnft_create_return::VNX_TYPE_HASH(0x349cedc7d1d4dcfull); const vnx::Hash64 Wallet_plotnft_create_return::VNX_CODE_HASH(0xb1aa822e75d3ed91ull); vnx::Hash64 Wallet_plotnft_create_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_plotnft_create_return::get_type_name() const { return "mmx.Wallet.plotnft_create.return"; } const vnx::TypeCode* Wallet_plotnft_create_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_plotnft_create_return; } std::shared_ptr Wallet_plotnft_create_return::create() { return std::make_shared(); } std::shared_ptr Wallet_plotnft_create_return::clone() const { return std::make_shared(*this); } void Wallet_plotnft_create_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_plotnft_create_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_plotnft_create_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_plotnft_create_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_plotnft_create_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.plotnft_create.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_plotnft_create_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_plotnft_create_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.plotnft_create.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_plotnft_create_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_plotnft_create_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_plotnft_create_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_create_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_plotnft_create_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_plotnft_create_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_plotnft_create_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.plotnft_create.return"; type_code->type_hash = vnx::Hash64(0x349cedc7d1d4dcfull); type_code->code_hash = vnx::Hash64(0xb1aa822e75d3ed91ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_plotnft_create_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_create_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_plotnft_create_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_plotnft_create_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_plotnft_create_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_create_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_create_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_plotnft_exec.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_plotnft_exec::VNX_TYPE_HASH(0xca9e9d0dfde795d1ull); const vnx::Hash64 Wallet_plotnft_exec::VNX_CODE_HASH(0x4c5f4c17a6934bacull); vnx::Hash64 Wallet_plotnft_exec::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_plotnft_exec::get_type_name() const { return "mmx.Wallet.plotnft_exec"; } const vnx::TypeCode* Wallet_plotnft_exec::get_type_code() const { return mmx::vnx_native_type_code_Wallet_plotnft_exec; } std::shared_ptr Wallet_plotnft_exec::create() { return std::make_shared(); } std::shared_ptr Wallet_plotnft_exec::clone() const { return std::make_shared(*this); } void Wallet_plotnft_exec::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_plotnft_exec::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_plotnft_exec::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_plotnft_exec; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_plotnft_exec::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.plotnft_exec\""; _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_plotnft_exec::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_plotnft_exec::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.plotnft_exec"; _object["address"] = address; _object["method"] = method; _object["args"] = args; _object["options"] = options; return _object; } void Wallet_plotnft_exec::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_plotnft_exec::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_plotnft_exec::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_exec& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_plotnft_exec& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_plotnft_exec::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_plotnft_exec::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.plotnft_exec"; type_code->type_hash = vnx::Hash64(0xca9e9d0dfde795d1ull); type_code->code_hash = vnx::Hash64(0x4c5f4c17a6934bacull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_plotnft_exec); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_plotnft_exec_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.method, type_code, _field->code.data()); break; case 2: vnx::read(in, value.args, type_code, _field->code.data()); break; case 3: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_plotnft_exec; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_plotnft_exec>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.method, type_code, type_code->fields[1].code.data()); vnx::write(out, value.args, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::Wallet_plotnft_exec& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_plotnft_exec_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_plotnft_exec_return::VNX_TYPE_HASH(0x8330b38d9cb47b24ull); const vnx::Hash64 Wallet_plotnft_exec_return::VNX_CODE_HASH(0x83799190fafddf37ull); vnx::Hash64 Wallet_plotnft_exec_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_plotnft_exec_return::get_type_name() const { return "mmx.Wallet.plotnft_exec.return"; } const vnx::TypeCode* Wallet_plotnft_exec_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_plotnft_exec_return; } std::shared_ptr Wallet_plotnft_exec_return::create() { return std::make_shared(); } std::shared_ptr Wallet_plotnft_exec_return::clone() const { return std::make_shared(*this); } void Wallet_plotnft_exec_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_plotnft_exec_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_plotnft_exec_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_plotnft_exec_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_plotnft_exec_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.plotnft_exec.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_plotnft_exec_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_plotnft_exec_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.plotnft_exec.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_plotnft_exec_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_plotnft_exec_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_plotnft_exec_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_plotnft_exec_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_plotnft_exec_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_plotnft_exec_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_plotnft_exec_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.plotnft_exec.return"; type_code->type_hash = vnx::Hash64(0x8330b38d9cb47b24ull); type_code->code_hash = vnx::Hash64(0x83799190fafddf37ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_plotnft_exec_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_plotnft_exec_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_plotnft_exec_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_plotnft_exec_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_plotnft_exec_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_plotnft_exec_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_plotnft_exec_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_release.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_release::VNX_TYPE_HASH(0x2cd72a3370e05db3ull); const vnx::Hash64 Wallet_release::VNX_CODE_HASH(0x78dfeec1fd2ea88dull); vnx::Hash64 Wallet_release::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_release::get_type_name() const { return "mmx.Wallet.release"; } const vnx::TypeCode* Wallet_release::get_type_code() const { return mmx::vnx_native_type_code_Wallet_release; } std::shared_ptr Wallet_release::create() { return std::make_shared(); } std::shared_ptr Wallet_release::clone() const { return std::make_shared(*this); } void Wallet_release::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_release::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_release::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_release; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amounts); _visitor.type_end(*_type_code); } void Wallet_release::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.release\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amounts\": "; vnx::write(_out, amounts); _out << "}"; } void Wallet_release::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_release::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.release"; _object["index"] = index; _object["amounts"] = amounts; return _object; } void Wallet_release::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amounts") { _entry.second.to(amounts); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_release::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amounts") { return vnx::Variant(amounts); } return vnx::Variant(); } void Wallet_release::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amounts") { _value.to(amounts); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_release& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_release& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_release::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_release::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.release"; type_code->type_hash = vnx::Hash64(0x2cd72a3370e05db3ull); type_code->code_hash = vnx::Hash64(0x78dfeec1fd2ea88dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_release); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_release_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amounts"; field.code = {13, 12, 23, 2, 4, 7, 11, 32, 1, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amounts, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_release& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_release; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_release>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amounts, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_release& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_release& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_release& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_release_all.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_release_all::VNX_TYPE_HASH(0x4bd57b9deca4be51ull); const vnx::Hash64 Wallet_release_all::VNX_CODE_HASH(0x20519ec9a9adaaadull); vnx::Hash64 Wallet_release_all::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_release_all::get_type_name() const { return "mmx.Wallet.release_all"; } const vnx::TypeCode* Wallet_release_all::get_type_code() const { return mmx::vnx_native_type_code_Wallet_release_all; } std::shared_ptr Wallet_release_all::create() { return std::make_shared(); } std::shared_ptr Wallet_release_all::clone() const { return std::make_shared(*this); } void Wallet_release_all::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_release_all::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_release_all::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_release_all; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_release_all::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.release_all\""; _out << "}"; } void Wallet_release_all::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_release_all::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.release_all"; return _object; } void Wallet_release_all::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_release_all::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_release_all::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_release_all& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_release_all& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_release_all::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_release_all::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.release_all"; type_code->type_hash = vnx::Hash64(0x4bd57b9deca4be51ull); type_code->code_hash = vnx::Hash64(0x20519ec9a9adaaadull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_release_all); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_release_all_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_release_all& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_release_all; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_release_all>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_release_all& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_release_all& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_release_all& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_release_all_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_release_all_return::VNX_TYPE_HASH(0xf7029fb06b3b3fa5ull); const vnx::Hash64 Wallet_release_all_return::VNX_CODE_HASH(0x5939c981f3f672feull); vnx::Hash64 Wallet_release_all_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_release_all_return::get_type_name() const { return "mmx.Wallet.release_all.return"; } const vnx::TypeCode* Wallet_release_all_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_release_all_return; } std::shared_ptr Wallet_release_all_return::create() { return std::make_shared(); } std::shared_ptr Wallet_release_all_return::clone() const { return std::make_shared(*this); } void Wallet_release_all_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_release_all_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_release_all_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_release_all_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_release_all_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.release_all.return\""; _out << "}"; } void Wallet_release_all_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_release_all_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.release_all.return"; return _object; } void Wallet_release_all_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_release_all_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_release_all_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_release_all_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_release_all_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_release_all_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_release_all_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.release_all.return"; type_code->type_hash = vnx::Hash64(0xf7029fb06b3b3fa5ull); type_code->code_hash = vnx::Hash64(0x5939c981f3f672feull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_release_all_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_release_all_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_release_all_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_release_all_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_release_all_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_release_all_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_release_all_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_release_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_release_return::VNX_TYPE_HASH(0xd302995a8c4dcf83ull); const vnx::Hash64 Wallet_release_return::VNX_CODE_HASH(0x669bdca0c327d3b0ull); vnx::Hash64 Wallet_release_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_release_return::get_type_name() const { return "mmx.Wallet.release.return"; } const vnx::TypeCode* Wallet_release_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_release_return; } std::shared_ptr Wallet_release_return::create() { return std::make_shared(); } std::shared_ptr Wallet_release_return::clone() const { return std::make_shared(*this); } void Wallet_release_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_release_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_release_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_release_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_release_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.release.return\""; _out << "}"; } void Wallet_release_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_release_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.release.return"; return _object; } void Wallet_release_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_release_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_release_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_release_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_release_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_release_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_release_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.release.return"; type_code->type_hash = vnx::Hash64(0xd302995a8c4dcf83ull); type_code->code_hash = vnx::Hash64(0x669bdca0c327d3b0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_release_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_release_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_release_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_release_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_release_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_release_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_release_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_rem_token.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_rem_token::VNX_TYPE_HASH(0xc913cdd1600a2609ull); const vnx::Hash64 Wallet_rem_token::VNX_CODE_HASH(0x5b6ec771b12c57ffull); vnx::Hash64 Wallet_rem_token::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_rem_token::get_type_name() const { return "mmx.Wallet.rem_token"; } const vnx::TypeCode* Wallet_rem_token::get_type_code() const { return mmx::vnx_native_type_code_Wallet_rem_token; } std::shared_ptr Wallet_rem_token::create() { return std::make_shared(); } std::shared_ptr Wallet_rem_token::clone() const { return std::make_shared(*this); } void Wallet_rem_token::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_rem_token::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_rem_token::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_rem_token; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_end(*_type_code); } void Wallet_rem_token::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.rem_token\""; _out << ", \"address\": "; vnx::write(_out, address); _out << "}"; } void Wallet_rem_token::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_rem_token::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.rem_token"; _object["address"] = address; return _object; } void Wallet_rem_token::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } } } vnx::Variant Wallet_rem_token::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } return vnx::Variant(); } void Wallet_rem_token::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_rem_token& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_rem_token& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_rem_token::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_rem_token::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.rem_token"; type_code->type_hash = vnx::Hash64(0xc913cdd1600a2609ull); type_code->code_hash = vnx::Hash64(0x5b6ec771b12c57ffull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_rem_token); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_rem_token_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_rem_token& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_rem_token; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_rem_token>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_rem_token& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_rem_token& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_rem_token& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_rem_token_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_rem_token_return::VNX_TYPE_HASH(0xb59ee8fb44d30755ull); const vnx::Hash64 Wallet_rem_token_return::VNX_CODE_HASH(0x49dc1abd74cbc8c0ull); vnx::Hash64 Wallet_rem_token_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_rem_token_return::get_type_name() const { return "mmx.Wallet.rem_token.return"; } const vnx::TypeCode* Wallet_rem_token_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_rem_token_return; } std::shared_ptr Wallet_rem_token_return::create() { return std::make_shared(); } std::shared_ptr Wallet_rem_token_return::clone() const { return std::make_shared(*this); } void Wallet_rem_token_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_rem_token_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_rem_token_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_rem_token_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_rem_token_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.rem_token.return\""; _out << "}"; } void Wallet_rem_token_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_rem_token_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.rem_token.return"; return _object; } void Wallet_rem_token_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_rem_token_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_rem_token_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_rem_token_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_rem_token_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_rem_token_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_rem_token_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.rem_token.return"; type_code->type_hash = vnx::Hash64(0xb59ee8fb44d30755ull); type_code->code_hash = vnx::Hash64(0x49dc1abd74cbc8c0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_rem_token_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_rem_token_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_rem_token_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_rem_token_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_rem_token_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_rem_token_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_rem_token_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_remove_account.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_remove_account::VNX_TYPE_HASH(0xdf7d8816958bcb8bull); const vnx::Hash64 Wallet_remove_account::VNX_CODE_HASH(0xc8ecb3dca6beacbbull); vnx::Hash64 Wallet_remove_account::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_remove_account::get_type_name() const { return "mmx.Wallet.remove_account"; } const vnx::TypeCode* Wallet_remove_account::get_type_code() const { return mmx::vnx_native_type_code_Wallet_remove_account; } std::shared_ptr Wallet_remove_account::create() { return std::make_shared(); } std::shared_ptr Wallet_remove_account::clone() const { return std::make_shared(*this); } void Wallet_remove_account::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_remove_account::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_remove_account::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_remove_account; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, account); _visitor.type_end(*_type_code); } void Wallet_remove_account::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.remove_account\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"account\": "; vnx::write(_out, account); _out << "}"; } void Wallet_remove_account::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_remove_account::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.remove_account"; _object["index"] = index; _object["account"] = account; return _object; } void Wallet_remove_account::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "account") { _entry.second.to(account); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_remove_account::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "account") { return vnx::Variant(account); } return vnx::Variant(); } void Wallet_remove_account::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "account") { _value.to(account); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_remove_account& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_remove_account& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_remove_account::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_remove_account::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.remove_account"; type_code->type_hash = vnx::Hash64(0xdf7d8816958bcb8bull); type_code->code_hash = vnx::Hash64(0xc8ecb3dca6beacbbull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_remove_account); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_remove_account_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "account"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.account, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_remove_account& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_remove_account; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_remove_account>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.account); } void read(std::istream& in, ::mmx::Wallet_remove_account& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_remove_account& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_remove_account& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_remove_account_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_remove_account_return::VNX_TYPE_HASH(0x8e0d71e4003dca80ull); const vnx::Hash64 Wallet_remove_account_return::VNX_CODE_HASH(0xb7c111331c578f45ull); vnx::Hash64 Wallet_remove_account_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_remove_account_return::get_type_name() const { return "mmx.Wallet.remove_account.return"; } const vnx::TypeCode* Wallet_remove_account_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_remove_account_return; } std::shared_ptr Wallet_remove_account_return::create() { return std::make_shared(); } std::shared_ptr Wallet_remove_account_return::clone() const { return std::make_shared(*this); } void Wallet_remove_account_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_remove_account_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_remove_account_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_remove_account_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_remove_account_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.remove_account.return\""; _out << "}"; } void Wallet_remove_account_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_remove_account_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.remove_account.return"; return _object; } void Wallet_remove_account_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_remove_account_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_remove_account_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_remove_account_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_remove_account_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_remove_account_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_remove_account_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.remove_account.return"; type_code->type_hash = vnx::Hash64(0x8e0d71e4003dca80ull); type_code->code_hash = vnx::Hash64(0xb7c111331c578f45ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_remove_account_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_remove_account_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_remove_account_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_remove_account_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_remove_account_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_remove_account_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_remove_account_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_reserve.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_reserve::VNX_TYPE_HASH(0xd14c466e8e7ebd76ull); const vnx::Hash64 Wallet_reserve::VNX_CODE_HASH(0xe78e0ba524664c8dull); vnx::Hash64 Wallet_reserve::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_reserve::get_type_name() const { return "mmx.Wallet.reserve"; } const vnx::TypeCode* Wallet_reserve::get_type_code() const { return mmx::vnx_native_type_code_Wallet_reserve; } std::shared_ptr Wallet_reserve::create() { return std::make_shared(); } std::shared_ptr Wallet_reserve::clone() const { return std::make_shared(*this); } void Wallet_reserve::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_reserve::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_reserve::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_reserve; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amounts); _visitor.type_end(*_type_code); } void Wallet_reserve::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.reserve\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amounts\": "; vnx::write(_out, amounts); _out << "}"; } void Wallet_reserve::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_reserve::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.reserve"; _object["index"] = index; _object["amounts"] = amounts; return _object; } void Wallet_reserve::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amounts") { _entry.second.to(amounts); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_reserve::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amounts") { return vnx::Variant(amounts); } return vnx::Variant(); } void Wallet_reserve::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amounts") { _value.to(amounts); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_reserve& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_reserve& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_reserve::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_reserve::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.reserve"; type_code->type_hash = vnx::Hash64(0xd14c466e8e7ebd76ull); type_code->code_hash = vnx::Hash64(0xe78e0ba524664c8dull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_reserve); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_reserve_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amounts"; field.code = {13, 12, 23, 2, 4, 7, 11, 32, 1, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amounts, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_reserve& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_reserve; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_reserve>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amounts, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_reserve& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_reserve& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_reserve& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_reserve_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_reserve_return::VNX_TYPE_HASH(0x79de0793f575d4d6ull); const vnx::Hash64 Wallet_reserve_return::VNX_CODE_HASH(0x11033794570e822eull); vnx::Hash64 Wallet_reserve_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_reserve_return::get_type_name() const { return "mmx.Wallet.reserve.return"; } const vnx::TypeCode* Wallet_reserve_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_reserve_return; } std::shared_ptr Wallet_reserve_return::create() { return std::make_shared(); } std::shared_ptr Wallet_reserve_return::clone() const { return std::make_shared(*this); } void Wallet_reserve_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_reserve_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_reserve_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_reserve_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_reserve_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.reserve.return\""; _out << "}"; } void Wallet_reserve_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_reserve_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.reserve.return"; return _object; } void Wallet_reserve_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_reserve_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_reserve_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_reserve_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_reserve_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_reserve_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_reserve_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.reserve.return"; type_code->type_hash = vnx::Hash64(0x79de0793f575d4d6ull); type_code->code_hash = vnx::Hash64(0x11033794570e822eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_reserve_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_reserve_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_reserve_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_reserve_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_reserve_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_reserve_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_reserve_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_reset_cache.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_reset_cache::VNX_TYPE_HASH(0x922c4f0299ea0bf4ull); const vnx::Hash64 Wallet_reset_cache::VNX_CODE_HASH(0x7b796bce552fdda3ull); vnx::Hash64 Wallet_reset_cache::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_reset_cache::get_type_name() const { return "mmx.Wallet.reset_cache"; } const vnx::TypeCode* Wallet_reset_cache::get_type_code() const { return mmx::vnx_native_type_code_Wallet_reset_cache; } std::shared_ptr Wallet_reset_cache::create() { return std::make_shared(); } std::shared_ptr Wallet_reset_cache::clone() const { return std::make_shared(*this); } void Wallet_reset_cache::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_reset_cache::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_reset_cache::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_reset_cache; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_reset_cache::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.reset_cache\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_reset_cache::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_reset_cache::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.reset_cache"; _object["index"] = index; return _object; } void Wallet_reset_cache::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_reset_cache::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_reset_cache::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_reset_cache& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_reset_cache& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_reset_cache::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_reset_cache::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.reset_cache"; type_code->type_hash = vnx::Hash64(0x922c4f0299ea0bf4ull); type_code->code_hash = vnx::Hash64(0x7b796bce552fdda3ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_reset_cache); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_reset_cache_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_reset_cache& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_reset_cache; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_reset_cache>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_reset_cache& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_reset_cache& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_reset_cache_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_reset_cache_return::VNX_TYPE_HASH(0x59e9fbfbf5d8218bull); const vnx::Hash64 Wallet_reset_cache_return::VNX_CODE_HASH(0xc2a10c6cd4a0275bull); vnx::Hash64 Wallet_reset_cache_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_reset_cache_return::get_type_name() const { return "mmx.Wallet.reset_cache.return"; } const vnx::TypeCode* Wallet_reset_cache_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_reset_cache_return; } std::shared_ptr Wallet_reset_cache_return::create() { return std::make_shared(); } std::shared_ptr Wallet_reset_cache_return::clone() const { return std::make_shared(*this); } void Wallet_reset_cache_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_reset_cache_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_reset_cache_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_reset_cache_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_reset_cache_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.reset_cache.return\""; _out << "}"; } void Wallet_reset_cache_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_reset_cache_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.reset_cache.return"; return _object; } void Wallet_reset_cache_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_reset_cache_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_reset_cache_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_reset_cache_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_reset_cache_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_reset_cache_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_reset_cache_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.reset_cache.return"; type_code->type_hash = vnx::Hash64(0x59e9fbfbf5d8218bull); type_code->code_hash = vnx::Hash64(0xc2a10c6cd4a0275bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_reset_cache_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_reset_cache_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_reset_cache_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_reset_cache_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_reset_cache_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_reset_cache_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_reset_cache_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send::VNX_TYPE_HASH(0x3842658ae3c2d5ebull); const vnx::Hash64 Wallet_send::VNX_CODE_HASH(0xa715ebf32e6fcdc5ull); vnx::Hash64 Wallet_send::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send::get_type_name() const { return "mmx.Wallet.send"; } const vnx::TypeCode* Wallet_send::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send; } std::shared_ptr Wallet_send::create() { return std::make_shared(); } std::shared_ptr Wallet_send::clone() const { return std::make_shared(*this); } void Wallet_send::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, dst_addr); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_send::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"dst_addr\": "; vnx::write(_out, dst_addr); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_send::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send"; _object["index"] = index; _object["amount"] = amount; _object["dst_addr"] = dst_addr; _object["currency"] = currency; _object["options"] = options; return _object; } void Wallet_send::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "dst_addr") { _entry.second.to(dst_addr); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_send::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "dst_addr") { return vnx::Variant(dst_addr); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_send::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amount") { _value.to(amount); } else if(_name == "dst_addr") { _value.to(dst_addr); } else if(_name == "currency") { _value.to(currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send"; type_code->type_hash = vnx::Hash64(0x3842658ae3c2d5ebull); type_code->code_hash = vnx::Hash64(0xa715ebf32e6fcdc5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_send); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_send_return::static_get_type_code(); type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "dst_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 2: vnx::read(in, value.dst_addr, type_code, _field->code.data()); break; case 3: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 4: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amount, type_code, type_code->fields[1].code.data()); vnx::write(out, value.dst_addr, type_code, type_code->fields[2].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[3].code.data()); vnx::write(out, value.options, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::Wallet_send& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_from.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_from::VNX_TYPE_HASH(0x40c3c88665341592ull); const vnx::Hash64 Wallet_send_from::VNX_CODE_HASH(0x3418bf96bb760e29ull); vnx::Hash64 Wallet_send_from::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_from::get_type_name() const { return "mmx.Wallet.send_from"; } const vnx::TypeCode* Wallet_send_from::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_from; } std::shared_ptr Wallet_send_from::create() { return std::make_shared(); } std::shared_ptr Wallet_send_from::clone() const { return std::make_shared(*this); } void Wallet_send_from::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_from::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_from::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_from; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, dst_addr); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, src_addr); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_send_from::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_from\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"dst_addr\": "; vnx::write(_out, dst_addr); _out << ", \"src_addr\": "; vnx::write(_out, src_addr); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_send_from::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_from::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_from"; _object["index"] = index; _object["amount"] = amount; _object["dst_addr"] = dst_addr; _object["src_addr"] = src_addr; _object["currency"] = currency; _object["options"] = options; return _object; } void Wallet_send_from::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "dst_addr") { _entry.second.to(dst_addr); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "src_addr") { _entry.second.to(src_addr); } } } vnx::Variant Wallet_send_from::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "dst_addr") { return vnx::Variant(dst_addr); } if(_name == "src_addr") { return vnx::Variant(src_addr); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_send_from::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amount") { _value.to(amount); } else if(_name == "dst_addr") { _value.to(dst_addr); } else if(_name == "src_addr") { _value.to(src_addr); } else if(_name == "currency") { _value.to(currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_from& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_from& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_from::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_from::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_from"; type_code->type_hash = vnx::Hash64(0x40c3c88665341592ull); type_code->code_hash = vnx::Hash64(0x3418bf96bb760e29ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_send_from); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_send_from_return::static_get_type_code(); type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "dst_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "src_addr"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 2: vnx::read(in, value.dst_addr, type_code, _field->code.data()); break; case 3: vnx::read(in, value.src_addr, type_code, _field->code.data()); break; case 4: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 5: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_from& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_from; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_from>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amount, type_code, type_code->fields[1].code.data()); vnx::write(out, value.dst_addr, type_code, type_code->fields[2].code.data()); vnx::write(out, value.src_addr, type_code, type_code->fields[3].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[4].code.data()); vnx::write(out, value.options, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_from& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_from& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_from& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_from_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_from_return::VNX_TYPE_HASH(0xf578239f07abf05dull); const vnx::Hash64 Wallet_send_from_return::VNX_CODE_HASH(0xb081864be80ec4ebull); vnx::Hash64 Wallet_send_from_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_from_return::get_type_name() const { return "mmx.Wallet.send_from.return"; } const vnx::TypeCode* Wallet_send_from_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_from_return; } std::shared_ptr Wallet_send_from_return::create() { return std::make_shared(); } std::shared_ptr Wallet_send_from_return::clone() const { return std::make_shared(*this); } void Wallet_send_from_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_from_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_from_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_from_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_send_from_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_from.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_send_from_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_from_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_from.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_send_from_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_send_from_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_send_from_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_from_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_from_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_from_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_from_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_from.return"; type_code->type_hash = vnx::Hash64(0xf578239f07abf05dull); type_code->code_hash = vnx::Hash64(0xb081864be80ec4ebull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_send_from_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_from_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_from_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_from_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_from_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_from_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_from_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_many.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_many::VNX_TYPE_HASH(0x4f35769a1b4c6786ull); const vnx::Hash64 Wallet_send_many::VNX_CODE_HASH(0x612a38bfa60f37b0ull); vnx::Hash64 Wallet_send_many::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_many::get_type_name() const { return "mmx.Wallet.send_many"; } const vnx::TypeCode* Wallet_send_many::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_many; } std::shared_ptr Wallet_send_many::create() { return std::make_shared(); } std::shared_ptr Wallet_send_many::clone() const { return std::make_shared(*this); } void Wallet_send_many::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_many::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_many::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_many; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, amounts); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_send_many::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_many\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amounts\": "; vnx::write(_out, amounts); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_send_many::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_many::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_many"; _object["index"] = index; _object["amounts"] = amounts; _object["currency"] = currency; _object["options"] = options; return _object; } void Wallet_send_many::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amounts") { _entry.second.to(amounts); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_send_many::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "amounts") { return vnx::Variant(amounts); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_send_many::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "amounts") { _value.to(amounts); } else if(_name == "currency") { _value.to(currency); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_many& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_many& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_many::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_many::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_many"; type_code->type_hash = vnx::Hash64(0x4f35769a1b4c6786ull); type_code->code_hash = vnx::Hash64(0x612a38bfa60f37b0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_send_many); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_send_many_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "amounts"; field.code = {12, 23, 2, 4, 7, 11, 32, 1, 11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.amounts, type_code, _field->code.data()); break; case 2: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 3: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_many& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_many; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_many>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.amounts, type_code, type_code->fields[1].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_many& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_many& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_many& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_many_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_many_return::VNX_TYPE_HASH(0x828bddc86fbaf1e1ull); const vnx::Hash64 Wallet_send_many_return::VNX_CODE_HASH(0x43ae66f2254e6860ull); vnx::Hash64 Wallet_send_many_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_many_return::get_type_name() const { return "mmx.Wallet.send_many.return"; } const vnx::TypeCode* Wallet_send_many_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_many_return; } std::shared_ptr Wallet_send_many_return::create() { return std::make_shared(); } std::shared_ptr Wallet_send_many_return::clone() const { return std::make_shared(*this); } void Wallet_send_many_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_many_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_many_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_many_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_send_many_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_many.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_send_many_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_many_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_many.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_send_many_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_send_many_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_send_many_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_many_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_many_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_many_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_many_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_many.return"; type_code->type_hash = vnx::Hash64(0x828bddc86fbaf1e1ull); type_code->code_hash = vnx::Hash64(0x43ae66f2254e6860ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_send_many_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_many_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_many_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_many_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_many_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_many_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_many_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_off.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_off::VNX_TYPE_HASH(0x8b7bfc0751d27adbull); const vnx::Hash64 Wallet_send_off::VNX_CODE_HASH(0x58536e1288a0faf0ull); vnx::Hash64 Wallet_send_off::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_off::get_type_name() const { return "mmx.Wallet.send_off"; } const vnx::TypeCode* Wallet_send_off::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_off; } std::shared_ptr Wallet_send_off::create() { return std::make_shared(); } std::shared_ptr Wallet_send_off::clone() const { return std::make_shared(*this); } void Wallet_send_off::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_off::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_off::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_off; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, tx); _visitor.type_end(*_type_code); } void Wallet_send_off::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_off\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"tx\": "; vnx::write(_out, tx); _out << "}"; } void Wallet_send_off::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_off::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_off"; _object["index"] = index; _object["tx"] = tx; return _object; } void Wallet_send_off::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Wallet_send_off::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "tx") { return vnx::Variant(tx); } return vnx::Variant(); } void Wallet_send_off::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "tx") { _value.to(tx); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_off& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_off& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_off::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_off::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_off"; type_code->type_hash = vnx::Hash64(0x8b7bfc0751d27adbull); type_code->code_hash = vnx::Hash64(0x58536e1288a0faf0ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_send_off); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_send_off_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "tx"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.tx, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_off& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_off; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_off>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.tx, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_off& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_off& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_off& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_off_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_off_return::VNX_TYPE_HASH(0x9b9017e8636e8571ull); const vnx::Hash64 Wallet_send_off_return::VNX_CODE_HASH(0x8869e47098b079baull); vnx::Hash64 Wallet_send_off_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_off_return::get_type_name() const { return "mmx.Wallet.send_off.return"; } const vnx::TypeCode* Wallet_send_off_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_off_return; } std::shared_ptr Wallet_send_off_return::create() { return std::make_shared(); } std::shared_ptr Wallet_send_off_return::clone() const { return std::make_shared(*this); } void Wallet_send_off_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_off_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_off_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_off_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_send_off_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send_off.return\""; _out << "}"; } void Wallet_send_off_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_off_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send_off.return"; return _object; } void Wallet_send_off_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_send_off_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_send_off_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_off_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_off_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_off_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_off_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send_off.return"; type_code->type_hash = vnx::Hash64(0x9b9017e8636e8571ull); type_code->code_hash = vnx::Hash64(0x8869e47098b079baull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_send_off_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_off_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_off_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_off_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_send_off_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_off_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_off_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_send_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_send_return::VNX_TYPE_HASH(0x5df7b911342a1e6full); const vnx::Hash64 Wallet_send_return::VNX_CODE_HASH(0x4f9f700d2eeb3ab7ull); vnx::Hash64 Wallet_send_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_send_return::get_type_name() const { return "mmx.Wallet.send.return"; } const vnx::TypeCode* Wallet_send_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_send_return; } std::shared_ptr Wallet_send_return::create() { return std::make_shared(); } std::shared_ptr Wallet_send_return::clone() const { return std::make_shared(*this); } void Wallet_send_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_send_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_send_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_send_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_send_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.send.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_send_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_send_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.send.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_send_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_send_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_send_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_send_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_send_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_send_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_send_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.send.return"; type_code->type_hash = vnx::Hash64(0x5df7b911342a1e6full); type_code->code_hash = vnx::Hash64(0x4f9f700d2eeb3ab7ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_send_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_send_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_send_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_send_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_send_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_send_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_send_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_set_address_count.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_set_address_count::VNX_TYPE_HASH(0x9638ddc0c1d52b15ull); const vnx::Hash64 Wallet_set_address_count::VNX_CODE_HASH(0x7621e48cd485e3b8ull); vnx::Hash64 Wallet_set_address_count::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_set_address_count::get_type_name() const { return "mmx.Wallet.set_address_count"; } const vnx::TypeCode* Wallet_set_address_count::get_type_code() const { return mmx::vnx_native_type_code_Wallet_set_address_count; } std::shared_ptr Wallet_set_address_count::create() { return std::make_shared(); } std::shared_ptr Wallet_set_address_count::clone() const { return std::make_shared(*this); } void Wallet_set_address_count::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_set_address_count::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_set_address_count::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_set_address_count; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, count); _visitor.type_end(*_type_code); } void Wallet_set_address_count::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.set_address_count\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"count\": "; vnx::write(_out, count); _out << "}"; } void Wallet_set_address_count::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_set_address_count::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.set_address_count"; _object["index"] = index; _object["count"] = count; return _object; } void Wallet_set_address_count::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "count") { _entry.second.to(count); } else if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_set_address_count::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "count") { return vnx::Variant(count); } return vnx::Variant(); } void Wallet_set_address_count::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "count") { _value.to(count); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_set_address_count& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_set_address_count& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_set_address_count::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_set_address_count::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.set_address_count"; type_code->type_hash = vnx::Hash64(0x9638ddc0c1d52b15ull); type_code->code_hash = vnx::Hash64(0x7621e48cd485e3b8ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_set_address_count); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_set_address_count_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "count"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.count, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_set_address_count& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_set_address_count; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_set_address_count>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.count); } void read(std::istream& in, ::mmx::Wallet_set_address_count& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_set_address_count& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_set_address_count_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_set_address_count_return::VNX_TYPE_HASH(0x5948620640c50bf8ull); const vnx::Hash64 Wallet_set_address_count_return::VNX_CODE_HASH(0x8739cbb3951d8598ull); vnx::Hash64 Wallet_set_address_count_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_set_address_count_return::get_type_name() const { return "mmx.Wallet.set_address_count.return"; } const vnx::TypeCode* Wallet_set_address_count_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_set_address_count_return; } std::shared_ptr Wallet_set_address_count_return::create() { return std::make_shared(); } std::shared_ptr Wallet_set_address_count_return::clone() const { return std::make_shared(*this); } void Wallet_set_address_count_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_set_address_count_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_set_address_count_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_set_address_count_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_set_address_count_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.set_address_count.return\""; _out << "}"; } void Wallet_set_address_count_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_set_address_count_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.set_address_count.return"; return _object; } void Wallet_set_address_count_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_set_address_count_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_set_address_count_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_set_address_count_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_set_address_count_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_set_address_count_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_set_address_count_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.set_address_count.return"; type_code->type_hash = vnx::Hash64(0x5948620640c50bf8ull); type_code->code_hash = vnx::Hash64(0x8739cbb3951d8598ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_set_address_count_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_set_address_count_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_set_address_count_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_set_address_count_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_set_address_count_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_set_address_count_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_set_address_count_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_sign_msg.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_sign_msg::VNX_TYPE_HASH(0x5bc54cc8b0112d3aull); const vnx::Hash64 Wallet_sign_msg::VNX_CODE_HASH(0x79808d31510faa02ull); vnx::Hash64 Wallet_sign_msg::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_sign_msg::get_type_name() const { return "mmx.Wallet.sign_msg"; } const vnx::TypeCode* Wallet_sign_msg::get_type_code() const { return mmx::vnx_native_type_code_Wallet_sign_msg; } std::shared_ptr Wallet_sign_msg::create() { return std::make_shared(); } std::shared_ptr Wallet_sign_msg::clone() const { return std::make_shared(*this); } void Wallet_sign_msg::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_sign_msg::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_sign_msg::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_sign_msg; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, msg); _visitor.type_end(*_type_code); } void Wallet_sign_msg::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.sign_msg\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"msg\": "; vnx::write(_out, msg); _out << "}"; } void Wallet_sign_msg::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_sign_msg::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.sign_msg"; _object["index"] = index; _object["address"] = address; _object["msg"] = msg; return _object; } void Wallet_sign_msg::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "msg") { _entry.second.to(msg); } } } vnx::Variant Wallet_sign_msg::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "msg") { return vnx::Variant(msg); } return vnx::Variant(); } void Wallet_sign_msg::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "msg") { _value.to(msg); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_sign_msg& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_sign_msg& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_sign_msg::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_sign_msg::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.sign_msg"; type_code->type_hash = vnx::Hash64(0x5bc54cc8b0112d3aull); type_code->code_hash = vnx::Hash64(0x79808d31510faa02ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_sign_msg); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_sign_msg_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "msg"; field.code = {11, 32, 1}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.msg, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_sign_msg& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_sign_msg; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_sign_msg>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.msg, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_sign_msg& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_sign_msg& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_sign_msg_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_sign_msg_return::VNX_TYPE_HASH(0x5cf2f6b20fa33f51ull); const vnx::Hash64 Wallet_sign_msg_return::VNX_CODE_HASH(0x78e30f052fa4a1f5ull); vnx::Hash64 Wallet_sign_msg_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_sign_msg_return::get_type_name() const { return "mmx.Wallet.sign_msg.return"; } const vnx::TypeCode* Wallet_sign_msg_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_sign_msg_return; } std::shared_ptr Wallet_sign_msg_return::create() { return std::make_shared(); } std::shared_ptr Wallet_sign_msg_return::clone() const { return std::make_shared(*this); } void Wallet_sign_msg_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_sign_msg_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_sign_msg_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_sign_msg_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_sign_msg_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.sign_msg.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_sign_msg_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_sign_msg_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.sign_msg.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_sign_msg_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_sign_msg_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_sign_msg_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_sign_msg_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_sign_msg_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_sign_msg_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_sign_msg_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.sign_msg.return"; type_code->type_hash = vnx::Hash64(0x5cf2f6b20fa33f51ull); type_code->code_hash = vnx::Hash64(0x78e30f052fa4a1f5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_sign_msg_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_sign_msg_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_sign_msg_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_sign_msg_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_sign_msg_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_sign_msg_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_msg_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_sign_off.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_sign_off::VNX_TYPE_HASH(0x232c89cf3ed4d5b1ull); const vnx::Hash64 Wallet_sign_off::VNX_CODE_HASH(0xb867c4561cf82cb5ull); vnx::Hash64 Wallet_sign_off::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_sign_off::get_type_name() const { return "mmx.Wallet.sign_off"; } const vnx::TypeCode* Wallet_sign_off::get_type_code() const { return mmx::vnx_native_type_code_Wallet_sign_off; } std::shared_ptr Wallet_sign_off::create() { return std::make_shared(); } std::shared_ptr Wallet_sign_off::clone() const { return std::make_shared(*this); } void Wallet_sign_off::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_sign_off::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_sign_off::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_sign_off; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, tx); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_sign_off::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.sign_off\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"tx\": "; vnx::write(_out, tx); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_sign_off::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_sign_off::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.sign_off"; _object["index"] = index; _object["tx"] = tx; _object["options"] = options; return _object; } void Wallet_sign_off::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant Wallet_sign_off::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "tx") { return vnx::Variant(tx); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_sign_off::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "tx") { _value.to(tx); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_sign_off& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_sign_off& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_sign_off::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_sign_off::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.sign_off"; type_code->type_hash = vnx::Hash64(0x232c89cf3ed4d5b1ull); type_code->code_hash = vnx::Hash64(0xb867c4561cf82cb5ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_sign_off); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_sign_off_return::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "tx"; field.code = {16}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.tx, type_code, _field->code.data()); break; case 2: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_sign_off& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_sign_off; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_sign_off>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.tx, type_code, type_code->fields[1].code.data()); vnx::write(out, value.options, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::Wallet_sign_off& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_sign_off& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_off& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_sign_off_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_sign_off_return::VNX_TYPE_HASH(0x4b2ee7febe4ec00aull); const vnx::Hash64 Wallet_sign_off_return::VNX_CODE_HASH(0x90e8330947672349ull); vnx::Hash64 Wallet_sign_off_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_sign_off_return::get_type_name() const { return "mmx.Wallet.sign_off.return"; } const vnx::TypeCode* Wallet_sign_off_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_sign_off_return; } std::shared_ptr Wallet_sign_off_return::create() { return std::make_shared(); } std::shared_ptr Wallet_sign_off_return::clone() const { return std::make_shared(*this); } void Wallet_sign_off_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_sign_off_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_sign_off_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_sign_off_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_sign_off_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.sign_off.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_sign_off_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_sign_off_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.sign_off.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_sign_off_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_sign_off_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_sign_off_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_sign_off_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_sign_off_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_sign_off_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_sign_off_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.sign_off.return"; type_code->type_hash = vnx::Hash64(0x4b2ee7febe4ec00aull); type_code->code_hash = vnx::Hash64(0x90e8330947672349ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_sign_off_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_sign_off_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_sign_off_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_sign_off_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_sign_off_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_sign_off_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_sign_off_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_add_liquid.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_add_liquid::VNX_TYPE_HASH(0xe053d1ae718e2f64ull); const vnx::Hash64 Wallet_swap_add_liquid::VNX_CODE_HASH(0xd639284ecbb947beull); vnx::Hash64 Wallet_swap_add_liquid::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_add_liquid::get_type_name() const { return "mmx.Wallet.swap_add_liquid"; } const vnx::TypeCode* Wallet_swap_add_liquid::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_add_liquid; } std::shared_ptr Wallet_swap_add_liquid::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_add_liquid::clone() const { return std::make_shared(*this); } void Wallet_swap_add_liquid::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_add_liquid::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_add_liquid::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_add_liquid; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, pool_idx); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_swap_add_liquid::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_add_liquid\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"pool_idx\": "; vnx::write(_out, pool_idx); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_swap_add_liquid::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_add_liquid::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_add_liquid"; _object["index"] = index; _object["address"] = address; _object["amount"] = amount; _object["pool_idx"] = pool_idx; _object["options"] = options; return _object; } void Wallet_swap_add_liquid::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } else if(_entry.first == "pool_idx") { _entry.second.to(pool_idx); } } } vnx::Variant Wallet_swap_add_liquid::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "pool_idx") { return vnx::Variant(pool_idx); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_swap_add_liquid::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "amount") { _value.to(amount); } else if(_name == "pool_idx") { _value.to(pool_idx); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_add_liquid& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_add_liquid& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_add_liquid::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_add_liquid::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_add_liquid"; type_code->type_hash = vnx::Hash64(0xe053d1ae718e2f64ull); type_code->code_hash = vnx::Hash64(0xd639284ecbb947beull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_swap_add_liquid); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_swap_add_liquid_return::static_get_type_code(); type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "pool_idx"; field.code = {3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.pool_idx, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 4: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_add_liquid; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_add_liquid>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.pool_idx); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_add_liquid& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_add_liquid_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_add_liquid_return::VNX_TYPE_HASH(0xc2812565c73ec527ull); const vnx::Hash64 Wallet_swap_add_liquid_return::VNX_CODE_HASH(0x2cab467bd0a1971bull); vnx::Hash64 Wallet_swap_add_liquid_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_add_liquid_return::get_type_name() const { return "mmx.Wallet.swap_add_liquid.return"; } const vnx::TypeCode* Wallet_swap_add_liquid_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_add_liquid_return; } std::shared_ptr Wallet_swap_add_liquid_return::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_add_liquid_return::clone() const { return std::make_shared(*this); } void Wallet_swap_add_liquid_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_add_liquid_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_add_liquid_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_add_liquid_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_swap_add_liquid_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_add_liquid.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_swap_add_liquid_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_add_liquid_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_add_liquid.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_swap_add_liquid_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_swap_add_liquid_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_swap_add_liquid_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_add_liquid_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_add_liquid_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_add_liquid_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_add_liquid_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_add_liquid.return"; type_code->type_hash = vnx::Hash64(0xc2812565c73ec527ull); type_code->code_hash = vnx::Hash64(0x2cab467bd0a1971bull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_swap_add_liquid_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_add_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_add_liquid_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_add_liquid_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_add_liquid_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_add_liquid_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_add_liquid_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_rem_liquid.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_rem_liquid::VNX_TYPE_HASH(0x6494b41c51e158eaull); const vnx::Hash64 Wallet_swap_rem_liquid::VNX_CODE_HASH(0xdd2e39fa2c122341ull); vnx::Hash64 Wallet_swap_rem_liquid::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_rem_liquid::get_type_name() const { return "mmx.Wallet.swap_rem_liquid"; } const vnx::TypeCode* Wallet_swap_rem_liquid::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_rem_liquid; } std::shared_ptr Wallet_swap_rem_liquid::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_rem_liquid::clone() const { return std::make_shared(*this); } void Wallet_swap_rem_liquid::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_rem_liquid::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_rem_liquid::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_rem_liquid; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_swap_rem_liquid::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_rem_liquid\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_swap_rem_liquid::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_rem_liquid::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_rem_liquid"; _object["index"] = index; _object["address"] = address; _object["amount"] = amount; _object["options"] = options; return _object; } void Wallet_swap_rem_liquid::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_swap_rem_liquid::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_swap_rem_liquid::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "amount") { _value.to(amount); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_rem_liquid& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_rem_liquid& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_rem_liquid::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_rem_liquid::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_rem_liquid"; type_code->type_hash = vnx::Hash64(0x6494b41c51e158eaull); type_code->code_hash = vnx::Hash64(0xdd2e39fa2c122341ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_swap_rem_liquid); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_swap_rem_liquid_return::static_get_type_code(); type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_rem_liquid; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_rem_liquid>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.options, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_rem_liquid_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_rem_liquid_return::VNX_TYPE_HASH(0x946935a83dd0b8d2ull); const vnx::Hash64 Wallet_swap_rem_liquid_return::VNX_CODE_HASH(0xe0d1cb69e7e7b56eull); vnx::Hash64 Wallet_swap_rem_liquid_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_rem_liquid_return::get_type_name() const { return "mmx.Wallet.swap_rem_liquid.return"; } const vnx::TypeCode* Wallet_swap_rem_liquid_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_rem_liquid_return; } std::shared_ptr Wallet_swap_rem_liquid_return::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_rem_liquid_return::clone() const { return std::make_shared(*this); } void Wallet_swap_rem_liquid_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_rem_liquid_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_rem_liquid_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_rem_liquid_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_swap_rem_liquid_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_rem_liquid.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_swap_rem_liquid_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_rem_liquid_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_rem_liquid.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_swap_rem_liquid_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_swap_rem_liquid_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_swap_rem_liquid_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_rem_liquid_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_rem_liquid_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_rem_liquid_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_rem_liquid_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_rem_liquid.return"; type_code->type_hash = vnx::Hash64(0x946935a83dd0b8d2ull); type_code->code_hash = vnx::Hash64(0xe0d1cb69e7e7b56eull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_swap_rem_liquid_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_rem_liquid_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_rem_liquid_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_rem_liquid_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_rem_liquid_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_rem_liquid_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_rem_liquid_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_trade.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_trade::VNX_TYPE_HASH(0x4b5a42cbf6657910ull); const vnx::Hash64 Wallet_swap_trade::VNX_CODE_HASH(0xae88cd4b5e90ea93ull); vnx::Hash64 Wallet_swap_trade::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_trade::get_type_name() const { return "mmx.Wallet.swap_trade"; } const vnx::TypeCode* Wallet_swap_trade::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_trade; } std::shared_ptr Wallet_swap_trade::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_trade::clone() const { return std::make_shared(*this); } void Wallet_swap_trade::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_trade::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_trade::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_trade; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, min_trade); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, num_iter); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, options); _visitor.type_end(*_type_code); } void Wallet_swap_trade::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_trade\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"min_trade\": "; vnx::write(_out, min_trade); _out << ", \"num_iter\": "; vnx::write(_out, num_iter); _out << ", \"options\": "; vnx::write(_out, options); _out << "}"; } void Wallet_swap_trade::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_trade::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_trade"; _object["index"] = index; _object["address"] = address; _object["amount"] = amount; _object["currency"] = currency; _object["min_trade"] = min_trade; _object["num_iter"] = num_iter; _object["options"] = options; return _object; } void Wallet_swap_trade::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "min_trade") { _entry.second.to(min_trade); } else if(_entry.first == "num_iter") { _entry.second.to(num_iter); } else if(_entry.first == "options") { _entry.second.to(options); } } } vnx::Variant Wallet_swap_trade::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "address") { return vnx::Variant(address); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "min_trade") { return vnx::Variant(min_trade); } if(_name == "num_iter") { return vnx::Variant(num_iter); } if(_name == "options") { return vnx::Variant(options); } return vnx::Variant(); } void Wallet_swap_trade::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "address") { _value.to(address); } else if(_name == "amount") { _value.to(amount); } else if(_name == "currency") { _value.to(currency); } else if(_name == "min_trade") { _value.to(min_trade); } else if(_name == "num_iter") { _value.to(num_iter); } else if(_name == "options") { _value.to(options); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_trade& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_trade& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_trade::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_trade::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_trade"; type_code->type_hash = vnx::Hash64(0x4b5a42cbf6657910ull); type_code->code_hash = vnx::Hash64(0xae88cd4b5e90ea93ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_swap_trade); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::spend_options_t::static_get_type_code(); type_code->is_const = true; type_code->return_type = ::mmx::Wallet_swap_trade_return::static_get_type_code(); type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "min_trade"; field.code = {33, 11, 16, 1}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "num_iter"; field.value = vnx::to_string(20); field.code = {7}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "options"; field.code = {19, 0}; } type_code->permission = "mmx.permission_e.SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.num_iter, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 4: vnx::read(in, value.min_trade, type_code, _field->code.data()); break; case 6: vnx::read(in, value.options, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_trade& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_trade; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_trade>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.num_iter); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.currency, type_code, type_code->fields[3].code.data()); vnx::write(out, value.min_trade, type_code, type_code->fields[4].code.data()); vnx::write(out, value.options, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_trade& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_trade& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_swap_trade_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_swap_trade_return::VNX_TYPE_HASH(0x8fe4c13b007c63f4ull); const vnx::Hash64 Wallet_swap_trade_return::VNX_CODE_HASH(0xe4ed446e42a698cbull); vnx::Hash64 Wallet_swap_trade_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_swap_trade_return::get_type_name() const { return "mmx.Wallet.swap_trade.return"; } const vnx::TypeCode* Wallet_swap_trade_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_swap_trade_return; } std::shared_ptr Wallet_swap_trade_return::create() { return std::make_shared(); } std::shared_ptr Wallet_swap_trade_return::clone() const { return std::make_shared(*this); } void Wallet_swap_trade_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_swap_trade_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_swap_trade_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_swap_trade_return; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, _ret_0); _visitor.type_end(*_type_code); } void Wallet_swap_trade_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.swap_trade.return\""; _out << ", \"_ret_0\": "; vnx::write(_out, _ret_0); _out << "}"; } void Wallet_swap_trade_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_swap_trade_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.swap_trade.return"; _object["_ret_0"] = _ret_0; return _object; } void Wallet_swap_trade_return::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "_ret_0") { _entry.second.to(_ret_0); } } } vnx::Variant Wallet_swap_trade_return::get_field(const std::string& _name) const { if(_name == "_ret_0") { return vnx::Variant(_ret_0); } return vnx::Variant(); } void Wallet_swap_trade_return::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "_ret_0") { _value.to(_ret_0); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_swap_trade_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_swap_trade_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_swap_trade_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_swap_trade_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.swap_trade.return"; type_code->type_hash = vnx::Hash64(0x8fe4c13b007c63f4ull); type_code->code_hash = vnx::Hash64(0xe4ed446e42a698cbull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_swap_trade_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "_ret_0"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value._ret_0, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_swap_trade_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_swap_trade_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_swap_trade_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value._ret_0, type_code, type_code->fields[0].code.data()); } void read(std::istream& in, ::mmx::Wallet_swap_trade_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_swap_trade_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_swap_trade_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_unlock.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_unlock::VNX_TYPE_HASH(0x800deedf12a4df74ull); const vnx::Hash64 Wallet_unlock::VNX_CODE_HASH(0x3fc9ada9c9fa68a1ull); vnx::Hash64 Wallet_unlock::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_unlock::get_type_name() const { return "mmx.Wallet.unlock"; } const vnx::TypeCode* Wallet_unlock::get_type_code() const { return mmx::vnx_native_type_code_Wallet_unlock; } std::shared_ptr Wallet_unlock::create() { return std::make_shared(); } std::shared_ptr Wallet_unlock::clone() const { return std::make_shared(*this); } void Wallet_unlock::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_unlock::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_unlock::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_unlock; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, passphrase); _visitor.type_end(*_type_code); } void Wallet_unlock::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.unlock\""; _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << "}"; } void Wallet_unlock::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_unlock::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.unlock"; _object["index"] = index; _object["passphrase"] = passphrase; return _object; } void Wallet_unlock::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } } } vnx::Variant Wallet_unlock::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "passphrase") { return vnx::Variant(passphrase); } return vnx::Variant(); } void Wallet_unlock::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "passphrase") { _value.to(passphrase); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_unlock& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_unlock& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_unlock::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_unlock::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.unlock"; type_code->type_hash = vnx::Hash64(0x800deedf12a4df74ull); type_code->code_hash = vnx::Hash64(0x3fc9ada9c9fa68a1ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_unlock); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::Wallet_unlock_return::static_get_type_code(); type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "passphrase"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_unlock& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_unlock; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_unlock>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); vnx::write(out, value.passphrase, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::Wallet_unlock& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_unlock& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_unlock& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_unlock_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_unlock_return::VNX_TYPE_HASH(0xe8e5c839343f6bbcull); const vnx::Hash64 Wallet_unlock_return::VNX_CODE_HASH(0x4ad5b8f97fab331cull); vnx::Hash64 Wallet_unlock_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_unlock_return::get_type_name() const { return "mmx.Wallet.unlock.return"; } const vnx::TypeCode* Wallet_unlock_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_unlock_return; } std::shared_ptr Wallet_unlock_return::create() { return std::make_shared(); } std::shared_ptr Wallet_unlock_return::clone() const { return std::make_shared(*this); } void Wallet_unlock_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_unlock_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_unlock_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_unlock_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_unlock_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.unlock.return\""; _out << "}"; } void Wallet_unlock_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_unlock_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.unlock.return"; return _object; } void Wallet_unlock_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_unlock_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_unlock_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_unlock_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_unlock_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_unlock_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_unlock_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.unlock.return"; type_code->type_hash = vnx::Hash64(0xe8e5c839343f6bbcull); type_code->code_hash = vnx::Hash64(0x4ad5b8f97fab331cull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_unlock_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_unlock_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_unlock_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_unlock_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_unlock_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_unlock_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_unlock_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_update_cache.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_update_cache::VNX_TYPE_HASH(0xf98cf07accda73b8ull); const vnx::Hash64 Wallet_update_cache::VNX_CODE_HASH(0x786ac26b257a9241ull); vnx::Hash64 Wallet_update_cache::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_update_cache::get_type_name() const { return "mmx.Wallet.update_cache"; } const vnx::TypeCode* Wallet_update_cache::get_type_code() const { return mmx::vnx_native_type_code_Wallet_update_cache; } std::shared_ptr Wallet_update_cache::create() { return std::make_shared(); } std::shared_ptr Wallet_update_cache::clone() const { return std::make_shared(*this); } void Wallet_update_cache::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_update_cache::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_update_cache::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_update_cache; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_end(*_type_code); } void Wallet_update_cache::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.update_cache\""; _out << ", \"index\": "; vnx::write(_out, index); _out << "}"; } void Wallet_update_cache::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_update_cache::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.update_cache"; _object["index"] = index; return _object; } void Wallet_update_cache::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "index") { _entry.second.to(index); } } } vnx::Variant Wallet_update_cache::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } return vnx::Variant(); } void Wallet_update_cache::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_update_cache& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_update_cache& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_update_cache::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_update_cache::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.update_cache"; type_code->type_hash = vnx::Hash64(0xf98cf07accda73b8ull); type_code->code_hash = vnx::Hash64(0x786ac26b257a9241ull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::Wallet_update_cache); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->is_const = true; type_code->return_type = ::mmx::Wallet_update_cache_return::static_get_type_code(); type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_update_cache& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_update_cache; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_update_cache>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.index); } void read(std::istream& in, ::mmx::Wallet_update_cache& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_update_cache& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_update_cache& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/Wallet_update_cache_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 Wallet_update_cache_return::VNX_TYPE_HASH(0x7e1b25fb37caf248ull); const vnx::Hash64 Wallet_update_cache_return::VNX_CODE_HASH(0xf4b9f74bdff3f851ull); vnx::Hash64 Wallet_update_cache_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string Wallet_update_cache_return::get_type_name() const { return "mmx.Wallet.update_cache.return"; } const vnx::TypeCode* Wallet_update_cache_return::get_type_code() const { return mmx::vnx_native_type_code_Wallet_update_cache_return; } std::shared_ptr Wallet_update_cache_return::create() { return std::make_shared(); } std::shared_ptr Wallet_update_cache_return::clone() const { return std::make_shared(*this); } void Wallet_update_cache_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void Wallet_update_cache_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void Wallet_update_cache_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_Wallet_update_cache_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void Wallet_update_cache_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.Wallet.update_cache.return\""; _out << "}"; } void Wallet_update_cache_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object Wallet_update_cache_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.Wallet.update_cache.return"; return _object; } void Wallet_update_cache_return::from_object(const vnx::Object& _object) { } vnx::Variant Wallet_update_cache_return::get_field(const std::string& _name) const { return vnx::Variant(); } void Wallet_update_cache_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const Wallet_update_cache_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, Wallet_update_cache_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* Wallet_update_cache_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr Wallet_update_cache_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.Wallet.update_cache.return"; type_code->type_hash = vnx::Hash64(0x7e1b25fb37caf248ull); type_code->code_hash = vnx::Hash64(0xf4b9f74bdff3f851ull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::Wallet_update_cache_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::Wallet_update_cache_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_Wallet_update_cache_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::Wallet_update_cache_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::Wallet_update_cache_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::Wallet_update_cache_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::Wallet_update_cache_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/WebAPIAsyncClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { WebAPIAsyncClient::WebAPIAsyncClient(const std::string& service_name) : AsyncClient::AsyncClient(vnx::Hash64(service_name)) { } WebAPIAsyncClient::WebAPIAsyncClient(vnx::Hash64 service_addr) : AsyncClient::AsyncClient(service_addr) { } uint64_t WebAPIAsyncClient::shutdown(const std::function& _callback, const std::function& _error_callback) { auto _method = ::mmx::WebAPI_shutdown::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 0; vnx_queue_shutdown[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::http_request(std::shared_ptr request, const std::string& sub_path, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 1; vnx_queue_http_request[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 2; vnx_queue_http_request_chunk[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_get_config_object(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 3; vnx_queue_vnx_get_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_get_config(const std::string& name, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 4; vnx_queue_vnx_get_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_set_config_object(const ::vnx::Object& config, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 5; vnx_queue_vnx_set_config_object[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value, const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 6; vnx_queue_vnx_set_config[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_get_type_code(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 7; vnx_queue_vnx_get_type_code[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_get_module_info(const std::function)>& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 8; vnx_queue_vnx_get_module_info[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_restart(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 9; vnx_queue_vnx_restart[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_stop(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 10; vnx_queue_vnx_stop[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } uint64_t WebAPIAsyncClient::vnx_self_test(const std::function& _callback, const std::function& _error_callback) { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); const auto _request_id = ++vnx_next_id; { std::lock_guard _lock(vnx_mutex); vnx_pending[_request_id] = 11; vnx_queue_vnx_self_test[_request_id] = std::make_pair(_callback, _error_callback); } vnx_request(_method, _request_id); return _request_id; } int32_t WebAPIAsyncClient::vnx_purge_request(uint64_t _request_id, const vnx::exception& _ex) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { return -1; } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_shutdown.find(_request_id); if(_iter != vnx_queue_shutdown.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_shutdown.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 1: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter != vnx_queue_http_request.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 2: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter != vnx_queue_http_request_chunk.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 3: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter != vnx_queue_vnx_get_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 4: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter != vnx_queue_vnx_get_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 5: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter != vnx_queue_vnx_set_config_object.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 6: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter != vnx_queue_vnx_set_config.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 7: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter != vnx_queue_vnx_get_type_code.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter != vnx_queue_vnx_get_module_info.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 9: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter != vnx_queue_vnx_restart.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 10: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter != vnx_queue_vnx_stop.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } case 11: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter != vnx_queue_vnx_self_test.end()) { const auto _callback = std::move(_iter->second.second); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { _callback(_ex); } } break; } } return _index; } int32_t WebAPIAsyncClient::vnx_callback_switch(uint64_t _request_id, std::shared_ptr _value) { std::unique_lock _lock(vnx_mutex); const auto _iter = vnx_pending.find(_request_id); if(_iter == vnx_pending.end()) { throw std::runtime_error("WebAPIAsyncClient: received unknown return"); } const auto _index = _iter->second; vnx_pending.erase(_iter); switch(_index) { case 0: { const auto _iter = vnx_queue_shutdown.find(_request_id); if(_iter == vnx_queue_shutdown.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_shutdown.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 1: { const auto _iter = vnx_queue_http_request.find(_request_id); if(_iter == vnx_queue_http_request.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 2: { const auto _iter = vnx_queue_http_request_chunk.find(_request_id); if(_iter == vnx_queue_http_request_chunk.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_http_request_chunk.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 3: { const auto _iter = vnx_queue_vnx_get_config_object.find(_request_id); if(_iter == vnx_queue_vnx_get_config_object.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config_object.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Object>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 4: { const auto _iter = vnx_queue_vnx_get_config.find(_request_id); if(_iter == vnx_queue_vnx_get_config.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_config.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::Variant>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 5: { const auto _iter = vnx_queue_vnx_set_config_object.find(_request_id); if(_iter == vnx_queue_vnx_set_config_object.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config_object.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 6: { const auto _iter = vnx_queue_vnx_set_config.find(_request_id); if(_iter == vnx_queue_vnx_set_config.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_set_config.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 7: { const auto _iter = vnx_queue_vnx_get_type_code.find(_request_id); if(_iter == vnx_queue_vnx_get_type_code.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_type_code.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to<::vnx::TypeCode>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 8: { const auto _iter = vnx_queue_vnx_get_module_info.find(_request_id); if(_iter == vnx_queue_vnx_get_module_info.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_get_module_info.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to>()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } case 9: { const auto _iter = vnx_queue_vnx_restart.find(_request_id); if(_iter == vnx_queue_vnx_restart.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_restart.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 10: { const auto _iter = vnx_queue_vnx_stop.find(_request_id); if(_iter == vnx_queue_vnx_stop.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_stop.erase(_iter); _lock.unlock(); if(_callback) { _callback(); } break; } case 11: { const auto _iter = vnx_queue_vnx_self_test.find(_request_id); if(_iter == vnx_queue_vnx_self_test.end()) { throw std::runtime_error("WebAPIAsyncClient: callback not found"); } const auto _callback = std::move(_iter->second.first); vnx_queue_vnx_self_test.erase(_iter); _lock.unlock(); if(_callback) { if(auto _result = std::dynamic_pointer_cast(_value)) { _callback(_result->_ret_0); } else if(_value && !_value->is_void()) { _callback(_value->get_field_by_index(0).to()); } else { throw std::logic_error("WebAPIAsyncClient: invalid return value"); } } break; } default: if(_index >= 0) { throw std::logic_error("WebAPIAsyncClient: invalid callback index"); } } return _index; } } // namespace mmx ================================================ FILE: generated/src/WebAPIBase.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 WebAPIBase::VNX_TYPE_HASH(0xfe90ce601fcc0cc6ull); const vnx::Hash64 WebAPIBase::VNX_CODE_HASH(0xed61ac1e8ca7f4c6ull); WebAPIBase::WebAPIBase(const std::string& _vnx_name) : Module::Module(_vnx_name) { vnx::read_config(vnx_name + ".input_blocks", input_blocks); vnx::read_config(vnx_name + ".input_proofs", input_proofs); vnx::read_config(vnx_name + ".node_server", node_server); vnx::read_config(vnx_name + ".wallet_server", wallet_server); vnx::read_config(vnx_name + ".farmer_server", farmer_server); vnx::read_config(vnx_name + ".exchange_server", exchange_server); vnx::read_config(vnx_name + ".config_path", config_path); vnx::read_config(vnx_name + ".max_recursion", max_recursion); vnx::read_config(vnx_name + ".max_log_history", max_log_history); vnx::read_config(vnx_name + ".sync_delay", sync_delay); vnx::read_config(vnx_name + ".cache_max_age", cache_max_age); } vnx::Hash64 WebAPIBase::get_type_hash() const { return VNX_TYPE_HASH; } std::string WebAPIBase::get_type_name() const { return "mmx.WebAPI"; } const vnx::TypeCode* WebAPIBase::get_type_code() const { return mmx::vnx_native_type_code_WebAPIBase; } void WebAPIBase::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_WebAPIBase; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, input_blocks); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, input_proofs); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, node_server); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, wallet_server); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, farmer_server); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, exchange_server); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, config_path); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, max_recursion); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, max_log_history); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, sync_delay); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, cache_max_age); _visitor.type_end(*_type_code); } void WebAPIBase::write(std::ostream& _out) const { _out << "{"; _out << "\"input_blocks\": "; vnx::write(_out, input_blocks); _out << ", \"input_proofs\": "; vnx::write(_out, input_proofs); _out << ", \"node_server\": "; vnx::write(_out, node_server); _out << ", \"wallet_server\": "; vnx::write(_out, wallet_server); _out << ", \"farmer_server\": "; vnx::write(_out, farmer_server); _out << ", \"exchange_server\": "; vnx::write(_out, exchange_server); _out << ", \"config_path\": "; vnx::write(_out, config_path); _out << ", \"max_recursion\": "; vnx::write(_out, max_recursion); _out << ", \"max_log_history\": "; vnx::write(_out, max_log_history); _out << ", \"sync_delay\": "; vnx::write(_out, sync_delay); _out << ", \"cache_max_age\": "; vnx::write(_out, cache_max_age); _out << "}"; } void WebAPIBase::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WebAPIBase::to_object() const { vnx::Object _object; _object["__type"] = "mmx.WebAPI"; _object["input_blocks"] = input_blocks; _object["input_proofs"] = input_proofs; _object["node_server"] = node_server; _object["wallet_server"] = wallet_server; _object["farmer_server"] = farmer_server; _object["exchange_server"] = exchange_server; _object["config_path"] = config_path; _object["max_recursion"] = max_recursion; _object["max_log_history"] = max_log_history; _object["sync_delay"] = sync_delay; _object["cache_max_age"] = cache_max_age; return _object; } void WebAPIBase::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "cache_max_age") { _entry.second.to(cache_max_age); } else if(_entry.first == "config_path") { _entry.second.to(config_path); } else if(_entry.first == "exchange_server") { _entry.second.to(exchange_server); } else if(_entry.first == "farmer_server") { _entry.second.to(farmer_server); } else if(_entry.first == "input_blocks") { _entry.second.to(input_blocks); } else if(_entry.first == "input_proofs") { _entry.second.to(input_proofs); } else if(_entry.first == "max_log_history") { _entry.second.to(max_log_history); } else if(_entry.first == "max_recursion") { _entry.second.to(max_recursion); } else if(_entry.first == "node_server") { _entry.second.to(node_server); } else if(_entry.first == "sync_delay") { _entry.second.to(sync_delay); } else if(_entry.first == "wallet_server") { _entry.second.to(wallet_server); } } } vnx::Variant WebAPIBase::get_field(const std::string& _name) const { if(_name == "input_blocks") { return vnx::Variant(input_blocks); } if(_name == "input_proofs") { return vnx::Variant(input_proofs); } if(_name == "node_server") { return vnx::Variant(node_server); } if(_name == "wallet_server") { return vnx::Variant(wallet_server); } if(_name == "farmer_server") { return vnx::Variant(farmer_server); } if(_name == "exchange_server") { return vnx::Variant(exchange_server); } if(_name == "config_path") { return vnx::Variant(config_path); } if(_name == "max_recursion") { return vnx::Variant(max_recursion); } if(_name == "max_log_history") { return vnx::Variant(max_log_history); } if(_name == "sync_delay") { return vnx::Variant(sync_delay); } if(_name == "cache_max_age") { return vnx::Variant(cache_max_age); } return vnx::Variant(); } void WebAPIBase::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "input_blocks") { _value.to(input_blocks); } else if(_name == "input_proofs") { _value.to(input_proofs); } else if(_name == "node_server") { _value.to(node_server); } else if(_name == "wallet_server") { _value.to(wallet_server); } else if(_name == "farmer_server") { _value.to(farmer_server); } else if(_name == "exchange_server") { _value.to(exchange_server); } else if(_name == "config_path") { _value.to(config_path); } else if(_name == "max_recursion") { _value.to(max_recursion); } else if(_name == "max_log_history") { _value.to(max_log_history); } else if(_name == "sync_delay") { _value.to(sync_delay); } else if(_name == "cache_max_age") { _value.to(cache_max_age); } } /// \private std::ostream& operator<<(std::ostream& _out, const WebAPIBase& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WebAPIBase& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WebAPIBase::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WebAPIBase::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.WebAPI"; type_code->type_hash = vnx::Hash64(0xfe90ce601fcc0cc6ull); type_code->code_hash = vnx::Hash64(0xed61ac1e8ca7f4c6ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::WebAPIBase); type_code->methods.resize(12); type_code->methods[0] = ::mmx::WebAPI_shutdown::static_get_type_code(); type_code->methods[1] = ::vnx::ModuleInterface_vnx_get_config::static_get_type_code(); type_code->methods[2] = ::vnx::ModuleInterface_vnx_get_config_object::static_get_type_code(); type_code->methods[3] = ::vnx::ModuleInterface_vnx_get_module_info::static_get_type_code(); type_code->methods[4] = ::vnx::ModuleInterface_vnx_get_type_code::static_get_type_code(); type_code->methods[5] = ::vnx::ModuleInterface_vnx_restart::static_get_type_code(); type_code->methods[6] = ::vnx::ModuleInterface_vnx_self_test::static_get_type_code(); type_code->methods[7] = ::vnx::ModuleInterface_vnx_set_config::static_get_type_code(); type_code->methods[8] = ::vnx::ModuleInterface_vnx_set_config_object::static_get_type_code(); type_code->methods[9] = ::vnx::ModuleInterface_vnx_stop::static_get_type_code(); type_code->methods[10] = ::vnx::addons::HttpComponent_http_request::static_get_type_code(); type_code->methods[11] = ::vnx::addons::HttpComponent_http_request_chunk::static_get_type_code(); type_code->fields.resize(11); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "input_blocks"; field.value = vnx::to_string("node.verified_blocks"); field.code = {12, 5}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "input_proofs"; field.value = vnx::to_string("harvester.proof"); field.code = {12, 5}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "node_server"; field.value = vnx::to_string("Node"); field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "wallet_server"; field.value = vnx::to_string("Wallet"); field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "farmer_server"; field.value = vnx::to_string("Farmer"); field.code = {32}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "exchange_server"; field.value = vnx::to_string("ExchClient"); field.code = {32}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "config_path"; field.code = {32}; } { auto& field = type_code->fields[7]; field.data_size = 4; field.name = "max_recursion"; field.value = vnx::to_string(100); field.code = {3}; } { auto& field = type_code->fields[8]; field.data_size = 4; field.name = "max_log_history"; field.value = vnx::to_string(10000); field.code = {3}; } { auto& field = type_code->fields[9]; field.data_size = 4; field.name = "sync_delay"; field.value = vnx::to_string(18); field.code = {3}; } { auto& field = type_code->fields[10]; field.data_size = 4; field.name = "cache_max_age"; field.value = vnx::to_string(0); field.code = {3}; } type_code->build(); return type_code; } void WebAPIBase::vnx_handle_switch(std::shared_ptr _value) { const auto* _type_code = _value->get_type_code(); while(_type_code) { switch(_type_code->type_hash) { case 0x94965d816d328467ull: handle(std::static_pointer_cast(_value)); return; case 0x816e898b36befae0ull: handle(std::static_pointer_cast(_value)); return; case 0x2a13f6d072f9b852ull: handle(std::static_pointer_cast(_value)); return; default: _type_code = _type_code->super; } } handle(std::static_pointer_cast(_value)); } std::shared_ptr WebAPIBase::vnx_call_switch(std::shared_ptr _method, const vnx::request_id_t& _request_id) { switch(_method->get_type_hash()) { case 0x75dd6111dc25b9d6ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::mmx::WebAPI_shutdown_return::create(); shutdown(); return _return_value; } case 0xbbc7f1a01044d294ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_return::create(); _return_value->_ret_0 = vnx_get_config(_args->name); return _return_value; } case 0x17f58f68bf83abc0ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_config_object_return::create(); _return_value->_ret_0 = vnx_get_config_object(); return _return_value; } case 0xf6d82bdf66d034a1ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_module_info_return::create(); _return_value->_ret_0 = vnx_get_module_info(); return _return_value; } case 0x305ec4d628960e5dull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_get_type_code_return::create(); _return_value->_ret_0 = vnx_get_type_code(); return _return_value; } case 0x9e95dc280cecca1bull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_restart_return::create(); vnx_restart(); return _return_value; } case 0x6ce3775b41a42697ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_self_test_return::create(); _return_value->_ret_0 = vnx_self_test(); return _return_value; } case 0x362aac91373958b7ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_return::create(); vnx_set_config(_args->name, _args->value); return _return_value; } case 0xca30f814f17f322full: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_set_config_object_return::create(); vnx_set_config_object(_args->config); return _return_value; } case 0x7ab49ce3d1bfc0d2ull: { auto _args = std::static_pointer_cast(_method); auto _return_value = ::vnx::ModuleInterface_vnx_stop_return::create(); vnx_stop(); return _return_value; } case 0xe0b6c38f619bad92ull: { auto _args = std::static_pointer_cast(_method); http_request_async(_args->request, _args->sub_path, _request_id); return nullptr; } case 0x97e79d08440406d5ull: { auto _args = std::static_pointer_cast(_method); http_request_chunk_async(_args->request, _args->sub_path, _args->offset, _args->max_bytes, _request_id); return nullptr; } } auto _ex = vnx::NoSuchMethod::create(); _ex->method = _method->get_type_name(); return _ex; } void WebAPIBase::http_request_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } void WebAPIBase::http_request_chunk_async_return(const vnx::request_id_t& _request_id, const std::shared_ptr& _ret_0) const { auto _return_value = ::vnx::addons::HttpComponent_http_request_chunk_return::create(); _return_value->_ret_0 = _ret_0; vnx_async_return(_request_id, _return_value); } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.max_recursion, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.max_log_history, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.sync_delay, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.cache_max_age, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.input_blocks, type_code, _field->code.data()); break; case 1: vnx::read(in, value.input_proofs, type_code, _field->code.data()); break; case 2: vnx::read(in, value.node_server, type_code, _field->code.data()); break; case 3: vnx::read(in, value.wallet_server, type_code, _field->code.data()); break; case 4: vnx::read(in, value.farmer_server, type_code, _field->code.data()); break; case 5: vnx::read(in, value.exchange_server, type_code, _field->code.data()); break; case 6: vnx::read(in, value.config_path, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::WebAPIBase& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_WebAPIBase; out.write_type_code(type_code); vnx::write_class_header<::mmx::WebAPIBase>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(16); vnx::write_value(_buf + 0, value.max_recursion); vnx::write_value(_buf + 4, value.max_log_history); vnx::write_value(_buf + 8, value.sync_delay); vnx::write_value(_buf + 12, value.cache_max_age); vnx::write(out, value.input_blocks, type_code, type_code->fields[0].code.data()); vnx::write(out, value.input_proofs, type_code, type_code->fields[1].code.data()); vnx::write(out, value.node_server, type_code, type_code->fields[2].code.data()); vnx::write(out, value.wallet_server, type_code, type_code->fields[3].code.data()); vnx::write(out, value.farmer_server, type_code, type_code->fields[4].code.data()); vnx::write(out, value.exchange_server, type_code, type_code->fields[5].code.data()); vnx::write(out, value.config_path, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::WebAPIBase& value) { value.read(in); } void write(std::ostream& out, const ::mmx::WebAPIBase& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::WebAPIBase& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/WebAPIClient.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { WebAPIClient::WebAPIClient(const std::string& service_name) : Client::Client(vnx::Hash64(service_name)) { } WebAPIClient::WebAPIClient(vnx::Hash64 service_addr) : Client::Client(service_addr) { } void WebAPIClient::shutdown() { auto _method = ::mmx::WebAPI_shutdown::create(); vnx_request(_method, false); } void WebAPIClient::shutdown_async() { auto _method = ::mmx::WebAPI_shutdown::create(); vnx_request(_method, true); } std::shared_ptr WebAPIClient::http_request(std::shared_ptr request, const std::string& sub_path) { auto _method = ::vnx::addons::HttpComponent_http_request::create(); _method->request = request; _method->sub_path = sub_path; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } std::shared_ptr WebAPIClient::http_request_chunk(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes) { auto _method = ::vnx::addons::HttpComponent_http_request_chunk::create(); _method->request = request; _method->sub_path = sub_path; _method->offset = offset; _method->max_bytes = max_bytes; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } ::vnx::Object WebAPIClient::vnx_get_config_object() { auto _method = ::vnx::ModuleInterface_vnx_get_config_object::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Object>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } ::vnx::Variant WebAPIClient::vnx_get_config(const std::string& name) { auto _method = ::vnx::ModuleInterface_vnx_get_config::create(); _method->name = name; auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::Variant>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } void WebAPIClient::vnx_set_config_object(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, false); } void WebAPIClient::vnx_set_config_object_async(const ::vnx::Object& config) { auto _method = ::vnx::ModuleInterface_vnx_set_config_object::create(); _method->config = config; vnx_request(_method, true); } void WebAPIClient::vnx_set_config(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, false); } void WebAPIClient::vnx_set_config_async(const std::string& name, const ::vnx::Variant& value) { auto _method = ::vnx::ModuleInterface_vnx_set_config::create(); _method->name = name; _method->value = value; vnx_request(_method, true); } ::vnx::TypeCode WebAPIClient::vnx_get_type_code() { auto _method = ::vnx::ModuleInterface_vnx_get_type_code::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to<::vnx::TypeCode>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } std::shared_ptr WebAPIClient::vnx_get_module_info() { auto _method = ::vnx::ModuleInterface_vnx_get_module_info::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to>(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } void WebAPIClient::vnx_restart() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, false); } void WebAPIClient::vnx_restart_async() { auto _method = ::vnx::ModuleInterface_vnx_restart::create(); vnx_request(_method, true); } void WebAPIClient::vnx_stop() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, false); } void WebAPIClient::vnx_stop_async() { auto _method = ::vnx::ModuleInterface_vnx_stop::create(); vnx_request(_method, true); } vnx::bool_t WebAPIClient::vnx_self_test() { auto _method = ::vnx::ModuleInterface_vnx_self_test::create(); auto _return_value = vnx_request(_method, false); if(auto _result = std::dynamic_pointer_cast(_return_value)) { return _result->_ret_0; } else if(_return_value && !_return_value->is_void()) { return _return_value->get_field_by_index(0).to(); } else { throw std::logic_error("WebAPIClient: invalid return value"); } } } // namespace mmx ================================================ FILE: generated/src/WebAPI_shutdown.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 WebAPI_shutdown::VNX_TYPE_HASH(0x75dd6111dc25b9d6ull); const vnx::Hash64 WebAPI_shutdown::VNX_CODE_HASH(0xf792dcbc39336dbull); vnx::Hash64 WebAPI_shutdown::get_type_hash() const { return VNX_TYPE_HASH; } std::string WebAPI_shutdown::get_type_name() const { return "mmx.WebAPI.shutdown"; } const vnx::TypeCode* WebAPI_shutdown::get_type_code() const { return mmx::vnx_native_type_code_WebAPI_shutdown; } std::shared_ptr WebAPI_shutdown::create() { return std::make_shared(); } std::shared_ptr WebAPI_shutdown::clone() const { return std::make_shared(*this); } void WebAPI_shutdown::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void WebAPI_shutdown::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void WebAPI_shutdown::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_WebAPI_shutdown; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void WebAPI_shutdown::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.WebAPI.shutdown\""; _out << "}"; } void WebAPI_shutdown::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WebAPI_shutdown::to_object() const { vnx::Object _object; _object["__type"] = "mmx.WebAPI.shutdown"; return _object; } void WebAPI_shutdown::from_object(const vnx::Object& _object) { } vnx::Variant WebAPI_shutdown::get_field(const std::string& _name) const { return vnx::Variant(); } void WebAPI_shutdown::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const WebAPI_shutdown& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WebAPI_shutdown& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WebAPI_shutdown::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WebAPI_shutdown::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.WebAPI.shutdown"; type_code->type_hash = vnx::Hash64(0x75dd6111dc25b9d6ull); type_code->code_hash = vnx::Hash64(0xf792dcbc39336dbull); type_code->is_native = true; type_code->is_class = true; type_code->is_method = true; type_code->native_size = sizeof(::mmx::WebAPI_shutdown); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->return_type = ::mmx::WebAPI_shutdown_return::static_get_type_code(); type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::WebAPI_shutdown& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_WebAPI_shutdown; out.write_type_code(type_code); vnx::write_class_header<::mmx::WebAPI_shutdown>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::WebAPI_shutdown& value) { value.read(in); } void write(std::ostream& out, const ::mmx::WebAPI_shutdown& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/WebAPI_shutdown_return.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 WebAPI_shutdown_return::VNX_TYPE_HASH(0x248624ff297c34ull); const vnx::Hash64 WebAPI_shutdown_return::VNX_CODE_HASH(0xc5fc79884d0b1c8aull); vnx::Hash64 WebAPI_shutdown_return::get_type_hash() const { return VNX_TYPE_HASH; } std::string WebAPI_shutdown_return::get_type_name() const { return "mmx.WebAPI.shutdown.return"; } const vnx::TypeCode* WebAPI_shutdown_return::get_type_code() const { return mmx::vnx_native_type_code_WebAPI_shutdown_return; } std::shared_ptr WebAPI_shutdown_return::create() { return std::make_shared(); } std::shared_ptr WebAPI_shutdown_return::clone() const { return std::make_shared(*this); } void WebAPI_shutdown_return::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void WebAPI_shutdown_return::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void WebAPI_shutdown_return::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_WebAPI_shutdown_return; _visitor.type_begin(*_type_code); _visitor.type_end(*_type_code); } void WebAPI_shutdown_return::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.WebAPI.shutdown.return\""; _out << "}"; } void WebAPI_shutdown_return::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object WebAPI_shutdown_return::to_object() const { vnx::Object _object; _object["__type"] = "mmx.WebAPI.shutdown.return"; return _object; } void WebAPI_shutdown_return::from_object(const vnx::Object& _object) { } vnx::Variant WebAPI_shutdown_return::get_field(const std::string& _name) const { return vnx::Variant(); } void WebAPI_shutdown_return::set_field(const std::string& _name, const vnx::Variant& _value) { } /// \private std::ostream& operator<<(std::ostream& _out, const WebAPI_shutdown_return& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, WebAPI_shutdown_return& _value) { _value.read(_in); return _in; } const vnx::TypeCode* WebAPI_shutdown_return::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr WebAPI_shutdown_return::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.WebAPI.shutdown.return"; type_code->type_hash = vnx::Hash64(0x248624ff297c34ull); type_code->code_hash = vnx::Hash64(0xc5fc79884d0b1c8aull); type_code->is_native = true; type_code->is_class = true; type_code->is_return = true; type_code->native_size = sizeof(::mmx::WebAPI_shutdown_return); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::WebAPI_shutdown_return& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_WebAPI_shutdown_return; out.write_type_code(type_code); vnx::write_class_header<::mmx::WebAPI_shutdown_return>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } } void read(std::istream& in, ::mmx::WebAPI_shutdown_return& value) { value.read(in); } void write(std::ostream& out, const ::mmx::WebAPI_shutdown_return& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::WebAPI_shutdown_return& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/account_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 account_info_t::VNX_TYPE_HASH(0x5858a2f32468feaeull); const vnx::Hash64 account_info_t::VNX_CODE_HASH(0x1e6f0e2fdf725334ull); vnx::Hash64 account_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string account_info_t::get_type_name() const { return "mmx.account_info_t"; } const vnx::TypeCode* account_info_t::get_type_code() const { return mmx::vnx_native_type_code_account_info_t; } std::shared_ptr account_info_t::create() { return std::make_shared(); } std::shared_ptr account_info_t::clone() const { return std::make_shared(*this); } void account_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void account_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void account_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_account_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, num_addresses); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, key_file); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, finger_print); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, with_passphrase); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, is_hidden); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, account); _visitor.type_end(*_type_code); } void account_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"index\": "; vnx::write(_out, index); _out << ", \"num_addresses\": "; vnx::write(_out, num_addresses); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"key_file\": "; vnx::write(_out, key_file); _out << ", \"finger_print\": "; vnx::write(_out, finger_print); _out << ", \"with_passphrase\": "; vnx::write(_out, with_passphrase); _out << ", \"is_hidden\": "; vnx::write(_out, is_hidden); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"account\": "; vnx::write(_out, account); _out << "}"; } void account_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object account_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.account_info_t"; _object["index"] = index; _object["num_addresses"] = num_addresses; _object["name"] = name; _object["key_file"] = key_file; _object["finger_print"] = finger_print; _object["with_passphrase"] = with_passphrase; _object["is_hidden"] = is_hidden; _object["address"] = address; _object["account"] = account; return _object; } void account_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "account") { _entry.second.to(account); } else if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "finger_print") { _entry.second.to(finger_print); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "is_hidden") { _entry.second.to(is_hidden); } else if(_entry.first == "key_file") { _entry.second.to(key_file); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "num_addresses") { _entry.second.to(num_addresses); } else if(_entry.first == "with_passphrase") { _entry.second.to(with_passphrase); } } } vnx::Variant account_info_t::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "num_addresses") { return vnx::Variant(num_addresses); } if(_name == "name") { return vnx::Variant(name); } if(_name == "key_file") { return vnx::Variant(key_file); } if(_name == "finger_print") { return vnx::Variant(finger_print); } if(_name == "with_passphrase") { return vnx::Variant(with_passphrase); } if(_name == "is_hidden") { return vnx::Variant(is_hidden); } if(_name == "address") { return vnx::Variant(address); } if(_name == "account") { return vnx::Variant(account); } return vnx::Variant(); } void account_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "num_addresses") { _value.to(num_addresses); } else if(_name == "name") { _value.to(name); } else if(_name == "key_file") { _value.to(key_file); } else if(_name == "finger_print") { _value.to(finger_print); } else if(_name == "with_passphrase") { _value.to(with_passphrase); } else if(_name == "is_hidden") { _value.to(is_hidden); } else if(_name == "address") { _value.to(address); } else if(_name == "account") { _value.to(account); } } /// \private std::ostream& operator<<(std::ostream& _out, const account_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, account_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* account_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr account_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.account_info_t"; type_code->type_hash = vnx::Hash64(0x5858a2f32468feaeull); type_code->code_hash = vnx::Hash64(0x1e6f0e2fdf725334ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::account_info_t); type_code->parents.resize(1); type_code->parents[0] = ::mmx::account_t::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "num_addresses"; field.value = vnx::to_string(1); field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "key_file"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "finger_print"; field.code = {32}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "with_passphrase"; field.code = {31}; } { auto& field = type_code->fields[6]; field.data_size = 1; field.name = "is_hidden"; field.code = {31}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "address"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[8]; field.data_size = 4; field.name = "account"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.num_addresses, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.with_passphrase, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.is_hidden, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.account, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.name, type_code, _field->code.data()); break; case 3: vnx::read(in, value.key_file, type_code, _field->code.data()); break; case 4: vnx::read(in, value.finger_print, type_code, _field->code.data()); break; case 7: vnx::read(in, value.address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::account_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_account_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::account_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(14); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.num_addresses); vnx::write_value(_buf + 8, value.with_passphrase); vnx::write_value(_buf + 9, value.is_hidden); vnx::write_value(_buf + 10, value.account); vnx::write(out, value.name, type_code, type_code->fields[2].code.data()); vnx::write(out, value.key_file, type_code, type_code->fields[3].code.data()); vnx::write(out, value.finger_print, type_code, type_code->fields[4].code.data()); vnx::write(out, value.address, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::account_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::account_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::account_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::account_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::account_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/account_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 account_t::VNX_TYPE_HASH(0xc0c163f453729a7ull); const vnx::Hash64 account_t::VNX_CODE_HASH(0xee2c18587edeb7a4ull); vnx::Hash64 account_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string account_t::get_type_name() const { return "mmx.account_t"; } const vnx::TypeCode* account_t::get_type_code() const { return mmx::vnx_native_type_code_account_t; } std::shared_ptr account_t::create() { return std::make_shared(); } std::shared_ptr account_t::clone() const { return std::make_shared(*this); } void account_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void account_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void account_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_account_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, num_addresses); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, key_file); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, finger_print); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, with_passphrase); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, is_hidden); _visitor.type_end(*_type_code); } void account_t::write(std::ostream& _out) const { _out << "{"; _out << "\"index\": "; vnx::write(_out, index); _out << ", \"num_addresses\": "; vnx::write(_out, num_addresses); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"key_file\": "; vnx::write(_out, key_file); _out << ", \"finger_print\": "; vnx::write(_out, finger_print); _out << ", \"with_passphrase\": "; vnx::write(_out, with_passphrase); _out << ", \"is_hidden\": "; vnx::write(_out, is_hidden); _out << "}"; } void account_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object account_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.account_t"; _object["index"] = index; _object["num_addresses"] = num_addresses; _object["name"] = name; _object["key_file"] = key_file; _object["finger_print"] = finger_print; _object["with_passphrase"] = with_passphrase; _object["is_hidden"] = is_hidden; return _object; } void account_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "finger_print") { _entry.second.to(finger_print); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "is_hidden") { _entry.second.to(is_hidden); } else if(_entry.first == "key_file") { _entry.second.to(key_file); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "num_addresses") { _entry.second.to(num_addresses); } else if(_entry.first == "with_passphrase") { _entry.second.to(with_passphrase); } } } vnx::Variant account_t::get_field(const std::string& _name) const { if(_name == "index") { return vnx::Variant(index); } if(_name == "num_addresses") { return vnx::Variant(num_addresses); } if(_name == "name") { return vnx::Variant(name); } if(_name == "key_file") { return vnx::Variant(key_file); } if(_name == "finger_print") { return vnx::Variant(finger_print); } if(_name == "with_passphrase") { return vnx::Variant(with_passphrase); } if(_name == "is_hidden") { return vnx::Variant(is_hidden); } return vnx::Variant(); } void account_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "index") { _value.to(index); } else if(_name == "num_addresses") { _value.to(num_addresses); } else if(_name == "name") { _value.to(name); } else if(_name == "key_file") { _value.to(key_file); } else if(_name == "finger_print") { _value.to(finger_print); } else if(_name == "with_passphrase") { _value.to(with_passphrase); } else if(_name == "is_hidden") { _value.to(is_hidden); } } /// \private std::ostream& operator<<(std::ostream& _out, const account_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, account_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* account_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr account_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.account_t"; type_code->type_hash = vnx::Hash64(0xc0c163f453729a7ull); type_code->code_hash = vnx::Hash64(0xee2c18587edeb7a4ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::account_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "index"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "num_addresses"; field.value = vnx::to_string(1); field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "key_file"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "finger_print"; field.code = {32}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "with_passphrase"; field.code = {31}; } { auto& field = type_code->fields[6]; field.data_size = 1; field.name = "is_hidden"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.num_addresses, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.with_passphrase, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.is_hidden, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.name, type_code, _field->code.data()); break; case 3: vnx::read(in, value.key_file, type_code, _field->code.data()); break; case 4: vnx::read(in, value.finger_print, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::account_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_account_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::account_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(10); vnx::write_value(_buf + 0, value.index); vnx::write_value(_buf + 4, value.num_addresses); vnx::write_value(_buf + 8, value.with_passphrase); vnx::write_value(_buf + 9, value.is_hidden); vnx::write(out, value.name, type_code, type_code->fields[2].code.data()); vnx::write(out, value.key_file, type_code, type_code->fields[3].code.data()); vnx::write(out, value.finger_print, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::account_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::account_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::account_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::account_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::account_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/balance_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 balance_t::VNX_TYPE_HASH(0x613173c7e5ce65b4ull); const vnx::Hash64 balance_t::VNX_CODE_HASH(0x9b34210a248d52bcull); vnx::Hash64 balance_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string balance_t::get_type_name() const { return "mmx.balance_t"; } const vnx::TypeCode* balance_t::get_type_code() const { return mmx::vnx_native_type_code_balance_t; } std::shared_ptr balance_t::create() { return std::make_shared(); } std::shared_ptr balance_t::clone() const { return std::make_shared(*this); } void balance_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void balance_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void balance_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_balance_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, spendable); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, reserved); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, locked); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, total); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, is_validated); _visitor.type_end(*_type_code); } void balance_t::write(std::ostream& _out) const { _out << "{"; _out << "\"spendable\": "; vnx::write(_out, spendable); _out << ", \"reserved\": "; vnx::write(_out, reserved); _out << ", \"locked\": "; vnx::write(_out, locked); _out << ", \"total\": "; vnx::write(_out, total); _out << ", \"is_validated\": "; vnx::write(_out, is_validated); _out << "}"; } void balance_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object balance_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.balance_t"; _object["spendable"] = spendable; _object["reserved"] = reserved; _object["locked"] = locked; _object["total"] = total; _object["is_validated"] = is_validated; return _object; } void balance_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "is_validated") { _entry.second.to(is_validated); } else if(_entry.first == "locked") { _entry.second.to(locked); } else if(_entry.first == "reserved") { _entry.second.to(reserved); } else if(_entry.first == "spendable") { _entry.second.to(spendable); } else if(_entry.first == "total") { _entry.second.to(total); } } } vnx::Variant balance_t::get_field(const std::string& _name) const { if(_name == "spendable") { return vnx::Variant(spendable); } if(_name == "reserved") { return vnx::Variant(reserved); } if(_name == "locked") { return vnx::Variant(locked); } if(_name == "total") { return vnx::Variant(total); } if(_name == "is_validated") { return vnx::Variant(is_validated); } return vnx::Variant(); } void balance_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "spendable") { _value.to(spendable); } else if(_name == "reserved") { _value.to(reserved); } else if(_name == "locked") { _value.to(locked); } else if(_name == "total") { _value.to(total); } else if(_name == "is_validated") { _value.to(is_validated); } } /// \private std::ostream& operator<<(std::ostream& _out, const balance_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, balance_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* balance_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr balance_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.balance_t"; type_code->type_hash = vnx::Hash64(0x613173c7e5ce65b4ull); type_code->code_hash = vnx::Hash64(0x9b34210a248d52bcull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::balance_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "spendable"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "reserved"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "locked"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "total"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[4]; field.data_size = 1; field.name = "is_validated"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.is_validated, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.spendable, type_code, _field->code.data()); break; case 1: vnx::read(in, value.reserved, type_code, _field->code.data()); break; case 2: vnx::read(in, value.locked, type_code, _field->code.data()); break; case 3: vnx::read(in, value.total, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::balance_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_balance_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::balance_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.is_validated); vnx::write(out, value.spendable, type_code, type_code->fields[0].code.data()); vnx::write(out, value.reserved, type_code, type_code->fields[1].code.data()); vnx::write(out, value.locked, type_code, type_code->fields[2].code.data()); vnx::write(out, value.total, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::balance_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::balance_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::balance_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::balance_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::balance_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/block_index_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 block_index_t::VNX_TYPE_HASH(0xd00c722670bca900ull); const vnx::Hash64 block_index_t::VNX_CODE_HASH(0x457ce85ac9b66218ull); vnx::Hash64 block_index_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string block_index_t::get_type_name() const { return "mmx.block_index_t"; } const vnx::TypeCode* block_index_t::get_type_code() const { return mmx::vnx_native_type_code_block_index_t; } std::shared_ptr block_index_t::create() { return std::make_shared(); } std::shared_ptr block_index_t::clone() const { return std::make_shared(*this); } void block_index_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void block_index_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void block_index_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_block_index_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, hash); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, content_hash); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, static_cost); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, total_cost); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, file_offset); _visitor.type_end(*_type_code); } void block_index_t::write(std::ostream& _out) const { _out << "{"; _out << "\"hash\": "; vnx::write(_out, hash); _out << ", \"content_hash\": "; vnx::write(_out, content_hash); _out << ", \"static_cost\": "; vnx::write(_out, static_cost); _out << ", \"total_cost\": "; vnx::write(_out, total_cost); _out << ", \"file_offset\": "; vnx::write(_out, file_offset); _out << "}"; } void block_index_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object block_index_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.block_index_t"; _object["hash"] = hash; _object["content_hash"] = content_hash; _object["static_cost"] = static_cost; _object["total_cost"] = total_cost; _object["file_offset"] = file_offset; return _object; } void block_index_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "content_hash") { _entry.second.to(content_hash); } else if(_entry.first == "file_offset") { _entry.second.to(file_offset); } else if(_entry.first == "hash") { _entry.second.to(hash); } else if(_entry.first == "static_cost") { _entry.second.to(static_cost); } else if(_entry.first == "total_cost") { _entry.second.to(total_cost); } } } vnx::Variant block_index_t::get_field(const std::string& _name) const { if(_name == "hash") { return vnx::Variant(hash); } if(_name == "content_hash") { return vnx::Variant(content_hash); } if(_name == "static_cost") { return vnx::Variant(static_cost); } if(_name == "total_cost") { return vnx::Variant(total_cost); } if(_name == "file_offset") { return vnx::Variant(file_offset); } return vnx::Variant(); } void block_index_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "hash") { _value.to(hash); } else if(_name == "content_hash") { _value.to(content_hash); } else if(_name == "static_cost") { _value.to(static_cost); } else if(_name == "total_cost") { _value.to(total_cost); } else if(_name == "file_offset") { _value.to(file_offset); } } /// \private std::ostream& operator<<(std::ostream& _out, const block_index_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, block_index_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* block_index_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr block_index_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.block_index_t"; type_code->type_hash = vnx::Hash64(0xd00c722670bca900ull); type_code->code_hash = vnx::Hash64(0x457ce85ac9b66218ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::block_index_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "content_hash"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "static_cost"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "total_cost"; field.code = {3}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "file_offset"; field.code = {8}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.static_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.total_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.file_offset, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.hash, type_code, _field->code.data()); break; case 1: vnx::read(in, value.content_hash, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::block_index_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_block_index_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::block_index_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(16); vnx::write_value(_buf + 0, value.static_cost); vnx::write_value(_buf + 4, value.total_cost); vnx::write_value(_buf + 8, value.file_offset); vnx::write(out, value.hash, type_code, type_code->fields[0].code.data()); vnx::write(out, value.content_hash, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::block_index_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::block_index_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::block_index_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::block_index_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::block_index_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/compile_flags_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 compile_flags_t::VNX_TYPE_HASH(0x2d1279b3d438d884ull); const vnx::Hash64 compile_flags_t::VNX_CODE_HASH(0x81e1d734f9efb196ull); vnx::Hash64 compile_flags_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string compile_flags_t::get_type_name() const { return "mmx.compile_flags_t"; } const vnx::TypeCode* compile_flags_t::get_type_code() const { return mmx::vnx_native_type_code_compile_flags_t; } std::shared_ptr compile_flags_t::create() { return std::make_shared(); } std::shared_ptr compile_flags_t::clone() const { return std::make_shared(*this); } void compile_flags_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void compile_flags_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void compile_flags_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_compile_flags_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, verbose); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, opt_level); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, catch_overflow); _visitor.type_end(*_type_code); } void compile_flags_t::write(std::ostream& _out) const { _out << "{"; _out << "\"verbose\": "; vnx::write(_out, verbose); _out << ", \"opt_level\": "; vnx::write(_out, opt_level); _out << ", \"catch_overflow\": "; vnx::write(_out, catch_overflow); _out << "}"; } void compile_flags_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object compile_flags_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.compile_flags_t"; _object["verbose"] = verbose; _object["opt_level"] = opt_level; _object["catch_overflow"] = catch_overflow; return _object; } void compile_flags_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "catch_overflow") { _entry.second.to(catch_overflow); } else if(_entry.first == "opt_level") { _entry.second.to(opt_level); } else if(_entry.first == "verbose") { _entry.second.to(verbose); } } } vnx::Variant compile_flags_t::get_field(const std::string& _name) const { if(_name == "verbose") { return vnx::Variant(verbose); } if(_name == "opt_level") { return vnx::Variant(opt_level); } if(_name == "catch_overflow") { return vnx::Variant(catch_overflow); } return vnx::Variant(); } void compile_flags_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "verbose") { _value.to(verbose); } else if(_name == "opt_level") { _value.to(opt_level); } else if(_name == "catch_overflow") { _value.to(catch_overflow); } } /// \private std::ostream& operator<<(std::ostream& _out, const compile_flags_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, compile_flags_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* compile_flags_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr compile_flags_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.compile_flags_t"; type_code->type_hash = vnx::Hash64(0x2d1279b3d438d884ull); type_code->code_hash = vnx::Hash64(0x81e1d734f9efb196ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::compile_flags_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "verbose"; field.value = vnx::to_string(0); field.code = {7}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "opt_level"; field.value = vnx::to_string(3); field.code = {7}; } { auto& field = type_code->fields[2]; field.data_size = 1; field.name = "catch_overflow"; field.value = vnx::to_string(true); field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.verbose, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.opt_level, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.catch_overflow, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::compile_flags_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_compile_flags_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::compile_flags_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(9); vnx::write_value(_buf + 0, value.verbose); vnx::write_value(_buf + 4, value.opt_level); vnx::write_value(_buf + 8, value.catch_overflow); } void read(std::istream& in, ::mmx::compile_flags_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::compile_flags_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::compile_flags_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::compile_flags_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::compile_flags_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/error_code_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 error_code_e::VNX_TYPE_HASH(0xc3330407879f46ull); const vnx::Hash64 error_code_e::VNX_CODE_HASH(0x88993cb1a7d930bfull); vnx::Hash64 error_code_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string error_code_e::get_type_name() const { return "mmx.error_code_e"; } const vnx::TypeCode* error_code_e::get_type_code() const { return mmx::vnx_native_type_code_error_code_e; } std::shared_ptr error_code_e::create() { return std::make_shared(); } std::shared_ptr error_code_e::clone() const { return std::make_shared(*this); } void error_code_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void error_code_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t error_code_e::is_valid() const { switch(value) { case INSUFFICIENT_FUNDS: return true; case INSUFFICIENT_FUNDS_TXFEE: return true; case INVALID_CONTRACT: return true; case INVALID_OPERATION: return true; case TXFEE_OVERRUN: return true; case TX_EXPIRED: return true; } return false; } std::string error_code_e::to_string() const { switch(value) { case INSUFFICIENT_FUNDS: return "\"INSUFFICIENT_FUNDS\""; case INSUFFICIENT_FUNDS_TXFEE: return "\"INSUFFICIENT_FUNDS_TXFEE\""; case INVALID_CONTRACT: return "\"INVALID_CONTRACT\""; case INVALID_OPERATION: return "\"INVALID_OPERATION\""; case TXFEE_OVERRUN: return "\"TXFEE_OVERRUN\""; case TX_EXPIRED: return "\"TX_EXPIRED\""; } return std::to_string(value); } std::string error_code_e::to_string_value() const { switch(value) { case INSUFFICIENT_FUNDS: return "INSUFFICIENT_FUNDS"; case INSUFFICIENT_FUNDS_TXFEE: return "INSUFFICIENT_FUNDS_TXFEE"; case INVALID_CONTRACT: return "INVALID_CONTRACT"; case INVALID_OPERATION: return "INVALID_OPERATION"; case TXFEE_OVERRUN: return "TXFEE_OVERRUN"; case TX_EXPIRED: return "TX_EXPIRED"; } return std::to_string(value); } std::string error_code_e::to_string_value_full() const { switch(value) { case INSUFFICIENT_FUNDS: return "mmx.error_code_e.INSUFFICIENT_FUNDS"; case INSUFFICIENT_FUNDS_TXFEE: return "mmx.error_code_e.INSUFFICIENT_FUNDS_TXFEE"; case INVALID_CONTRACT: return "mmx.error_code_e.INVALID_CONTRACT"; case INVALID_OPERATION: return "mmx.error_code_e.INVALID_OPERATION"; case TXFEE_OVERRUN: return "mmx.error_code_e.TXFEE_OVERRUN"; case TX_EXPIRED: return "mmx.error_code_e.TX_EXPIRED"; } return std::to_string(value); } void error_code_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void error_code_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "INSUFFICIENT_FUNDS") value = INSUFFICIENT_FUNDS; else if(_name == "INSUFFICIENT_FUNDS_TXFEE") value = INSUFFICIENT_FUNDS_TXFEE; else if(_name == "INVALID_CONTRACT") value = INVALID_CONTRACT; else if(_name == "INVALID_OPERATION") value = INVALID_OPERATION; else if(_name == "TXFEE_OVERRUN") value = TXFEE_OVERRUN; else if(_name == "TX_EXPIRED") value = TX_EXPIRED; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void error_code_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case INSUFFICIENT_FUNDS: _name = "INSUFFICIENT_FUNDS"; break; case INSUFFICIENT_FUNDS_TXFEE: _name = "INSUFFICIENT_FUNDS_TXFEE"; break; case INVALID_CONTRACT: _name = "INVALID_CONTRACT"; break; case INVALID_OPERATION: _name = "INVALID_OPERATION"; break; case TXFEE_OVERRUN: _name = "TXFEE_OVERRUN"; break; case TX_EXPIRED: _name = "TX_EXPIRED"; break; } _visitor.enum_value(value, _name); } void error_code_e::write(std::ostream& _out) const { switch(value) { case INSUFFICIENT_FUNDS: _out << "\"INSUFFICIENT_FUNDS\""; break; case INSUFFICIENT_FUNDS_TXFEE: _out << "\"INSUFFICIENT_FUNDS_TXFEE\""; break; case INVALID_CONTRACT: _out << "\"INVALID_CONTRACT\""; break; case INVALID_OPERATION: _out << "\"INVALID_OPERATION\""; break; case TXFEE_OVERRUN: _out << "\"TXFEE_OVERRUN\""; break; case TX_EXPIRED: _out << "\"TX_EXPIRED\""; break; default: _out << value; } } void error_code_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object error_code_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.error_code_e"; _object["value"] = value; return _object; } void error_code_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant error_code_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void error_code_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const error_code_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, error_code_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* error_code_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr error_code_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.error_code_e"; type_code->type_hash = vnx::Hash64(0xc3330407879f46ull); type_code->code_hash = vnx::Hash64(0x88993cb1a7d930bfull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::error_code_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[1975784893] = "INSUFFICIENT_FUNDS"; type_code->enum_map[1882923049] = "INSUFFICIENT_FUNDS_TXFEE"; type_code->enum_map[914919857] = "INVALID_CONTRACT"; type_code->enum_map[2667583392] = "INVALID_OPERATION"; type_code->enum_map[3169221647] = "TXFEE_OVERRUN"; type_code->enum_map[327454547] = "TX_EXPIRED"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::error_code_e::enum_t(tmp.to()); } else { value = ::mmx::error_code_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::error_code_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_error_code_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::error_code_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::error_code_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::error_code_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::error_code_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::error_code_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::error_code_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::error_code_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::error_code_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::error_code_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::error_code_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::error_code_e::enum_t& _value) { return ::mmx::error_code_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::error_code_e::enum_t& _value) { return ::mmx::error_code_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::error_code_e::enum_t& _value) { return ::mmx::error_code_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::error_code_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::error_code_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/exec_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 exec_entry_t::VNX_TYPE_HASH(0xd30282844b1862a4ull); const vnx::Hash64 exec_entry_t::VNX_CODE_HASH(0x34e910d80c01901full); vnx::Hash64 exec_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string exec_entry_t::get_type_name() const { return "mmx.exec_entry_t"; } const vnx::TypeCode* exec_entry_t::get_type_code() const { return mmx::vnx_native_type_code_exec_entry_t; } std::shared_ptr exec_entry_t::create() { return std::make_shared(); } std::shared_ptr exec_entry_t::clone() const { return std::make_shared(*this); } void exec_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void exec_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void exec_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_exec_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, method); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, args); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, user); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, deposit); _visitor.type_end(*_type_code); } void exec_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"method\": "; vnx::write(_out, method); _out << ", \"args\": "; vnx::write(_out, args); _out << ", \"user\": "; vnx::write(_out, user); _out << ", \"deposit\": "; vnx::write(_out, deposit); _out << "}"; } void exec_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object exec_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.exec_entry_t"; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["txid"] = txid; _object["method"] = method; _object["args"] = args; _object["user"] = user; _object["deposit"] = deposit; return _object; } void exec_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "args") { _entry.second.to(args); } else if(_entry.first == "deposit") { _entry.second.to(deposit); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "method") { _entry.second.to(method); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant exec_entry_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "method") { return vnx::Variant(method); } if(_name == "args") { return vnx::Variant(args); } if(_name == "user") { return vnx::Variant(user); } if(_name == "deposit") { return vnx::Variant(deposit); } return vnx::Variant(); } void exec_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "txid") { _value.to(txid); } else if(_name == "method") { _value.to(method); } else if(_name == "args") { _value.to(args); } else if(_name == "user") { _value.to(user); } else if(_name == "deposit") { _value.to(deposit); } } /// \private std::ostream& operator<<(std::ostream& _out, const exec_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, exec_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* exec_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr exec_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.exec_entry_t"; type_code->type_hash = vnx::Hash64(0xd30282844b1862a4ull); type_code->code_hash = vnx::Hash64(0x34e910d80c01901full); type_code->is_native = true; type_code->native_size = sizeof(::mmx::exec_entry_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "method"; field.code = {32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "args"; field.code = {12, 17}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "deposit"; field.code = {33, 23, 2, 4, 7, 11, 32, 1, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 3: vnx::read(in, value.method, type_code, _field->code.data()); break; case 4: vnx::read(in, value.args, type_code, _field->code.data()); break; case 5: vnx::read(in, value.user, type_code, _field->code.data()); break; case 6: vnx::read(in, value.deposit, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::exec_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_exec_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::exec_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.time_stamp); vnx::write(out, value.txid, type_code, type_code->fields[2].code.data()); vnx::write(out, value.method, type_code, type_code->fields[3].code.data()); vnx::write(out, value.args, type_code, type_code->fields[4].code.data()); vnx::write(out, value.user, type_code, type_code->fields[5].code.data()); vnx::write(out, value.deposit, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::exec_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::exec_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::exec_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::exec_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::exec_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/exec_error_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const uint32_t exec_error_t::MAX_MESSAGE_LENGTH; const vnx::Hash64 exec_error_t::VNX_TYPE_HASH(0x5cd84f2d984d4bfull); const vnx::Hash64 exec_error_t::VNX_CODE_HASH(0xe63ddc3bb4a33205ull); vnx::Hash64 exec_error_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string exec_error_t::get_type_name() const { return "mmx.exec_error_t"; } const vnx::TypeCode* exec_error_t::get_type_code() const { return mmx::vnx_native_type_code_exec_error_t; } std::shared_ptr exec_error_t::create() { return std::make_shared(); } std::shared_ptr exec_error_t::clone() const { return std::make_shared(*this); } void exec_error_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void exec_error_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void exec_error_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_exec_error_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, code); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, operation); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, line); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, message); _visitor.type_end(*_type_code); } void exec_error_t::write(std::ostream& _out) const { _out << "{"; _out << "\"code\": "; vnx::write(_out, code); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"operation\": "; vnx::write(_out, operation); _out << ", \"line\": "; vnx::write(_out, line); _out << ", \"message\": "; vnx::write(_out, message); _out << "}"; } void exec_error_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object exec_error_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.exec_error_t"; _object["code"] = code; _object["address"] = address; _object["operation"] = operation; _object["line"] = line; _object["message"] = message; return _object; } void exec_error_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "code") { _entry.second.to(code); } else if(_entry.first == "line") { _entry.second.to(line); } else if(_entry.first == "message") { _entry.second.to(message); } else if(_entry.first == "operation") { _entry.second.to(operation); } } } vnx::Variant exec_error_t::get_field(const std::string& _name) const { if(_name == "code") { return vnx::Variant(code); } if(_name == "address") { return vnx::Variant(address); } if(_name == "operation") { return vnx::Variant(operation); } if(_name == "line") { return vnx::Variant(line); } if(_name == "message") { return vnx::Variant(message); } return vnx::Variant(); } void exec_error_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "code") { _value.to(code); } else if(_name == "address") { _value.to(address); } else if(_name == "operation") { _value.to(operation); } else if(_name == "line") { _value.to(line); } else if(_name == "message") { _value.to(message); } } /// \private std::ostream& operator<<(std::ostream& _out, const exec_error_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, exec_error_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* exec_error_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr exec_error_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.exec_error_t"; type_code->type_hash = vnx::Hash64(0x5cd84f2d984d4bfull); type_code->code_hash = vnx::Hash64(0xe63ddc3bb4a33205ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::exec_error_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "code"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "address"; field.value = vnx::to_string(-1); field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "operation"; field.value = vnx::to_string(-1); field.code = {3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "line"; field.code = {33, 3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "message"; field.code = {32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.code, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.address, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.operation, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.line, type_code, _field->code.data()); break; case 4: vnx::read(in, value.message, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::exec_error_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_exec_error_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::exec_error_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.code); vnx::write_value(_buf + 4, value.address); vnx::write_value(_buf + 8, value.operation); vnx::write(out, value.line, type_code, type_code->fields[3].code.data()); vnx::write(out, value.message, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::exec_error_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::exec_error_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::exec_error_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::exec_error_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::exec_error_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/exec_result_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 exec_result_t::VNX_TYPE_HASH(0x18fe02e2374b039eull); const vnx::Hash64 exec_result_t::VNX_CODE_HASH(0xa116d6139487cc21ull); vnx::Hash64 exec_result_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string exec_result_t::get_type_name() const { return "mmx.exec_result_t"; } const vnx::TypeCode* exec_result_t::get_type_code() const { return mmx::vnx_native_type_code_exec_result_t; } std::shared_ptr exec_result_t::create() { return std::make_shared(); } std::shared_ptr exec_result_t::clone() const { return std::make_shared(*this); } void exec_result_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void exec_result_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void exec_result_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_exec_result_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, did_fail); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, total_cost); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, total_fee); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, inputs); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, outputs); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, error); _visitor.type_end(*_type_code); } void exec_result_t::write(std::ostream& _out) const { _out << "{"; _out << "\"did_fail\": "; vnx::write(_out, did_fail); _out << ", \"total_cost\": "; vnx::write(_out, total_cost); _out << ", \"total_fee\": "; vnx::write(_out, total_fee); _out << ", \"inputs\": "; vnx::write(_out, inputs); _out << ", \"outputs\": "; vnx::write(_out, outputs); _out << ", \"error\": "; vnx::write(_out, error); _out << "}"; } void exec_result_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object exec_result_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.exec_result_t"; _object["did_fail"] = did_fail; _object["total_cost"] = total_cost; _object["total_fee"] = total_fee; _object["inputs"] = inputs; _object["outputs"] = outputs; _object["error"] = error; return _object; } void exec_result_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "did_fail") { _entry.second.to(did_fail); } else if(_entry.first == "error") { _entry.second.to(error); } else if(_entry.first == "inputs") { _entry.second.to(inputs); } else if(_entry.first == "outputs") { _entry.second.to(outputs); } else if(_entry.first == "total_cost") { _entry.second.to(total_cost); } else if(_entry.first == "total_fee") { _entry.second.to(total_fee); } } } vnx::Variant exec_result_t::get_field(const std::string& _name) const { if(_name == "did_fail") { return vnx::Variant(did_fail); } if(_name == "total_cost") { return vnx::Variant(total_cost); } if(_name == "total_fee") { return vnx::Variant(total_fee); } if(_name == "inputs") { return vnx::Variant(inputs); } if(_name == "outputs") { return vnx::Variant(outputs); } if(_name == "error") { return vnx::Variant(error); } return vnx::Variant(); } void exec_result_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "did_fail") { _value.to(did_fail); } else if(_name == "total_cost") { _value.to(total_cost); } else if(_name == "total_fee") { _value.to(total_fee); } else if(_name == "inputs") { _value.to(inputs); } else if(_name == "outputs") { _value.to(outputs); } else if(_name == "error") { _value.to(error); } } /// \private std::ostream& operator<<(std::ostream& _out, const exec_result_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, exec_result_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* exec_result_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr exec_result_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.exec_result_t"; type_code->type_hash = vnx::Hash64(0x18fe02e2374b039eull); type_code->code_hash = vnx::Hash64(0xa116d6139487cc21ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::exec_result_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(3); type_code->depends[0] = ::mmx::txin_t::static_get_type_code(); type_code->depends[1] = ::mmx::txout_t::static_get_type_code(); type_code->depends[2] = ::mmx::exec_error_t::static_get_type_code(); type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.data_size = 1; field.name = "did_fail"; field.code = {31}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "total_cost"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "total_fee"; field.code = {3}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "inputs"; field.code = {12, 19, 0}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "outputs"; field.code = {12, 19, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "error"; field.code = {33, 19, 2}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.did_fail, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.total_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.total_fee, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.inputs, type_code, _field->code.data()); break; case 4: vnx::read(in, value.outputs, type_code, _field->code.data()); break; case 5: vnx::read(in, value.error, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::exec_result_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_exec_result_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::exec_result_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(9); vnx::write_value(_buf + 0, value.did_fail); vnx::write_value(_buf + 1, value.total_cost); vnx::write_value(_buf + 5, value.total_fee); vnx::write(out, value.inputs, type_code, type_code->fields[3].code.data()); vnx::write(out, value.outputs, type_code, type_code->fields[4].code.data()); vnx::write(out, value.error, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::exec_result_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::exec_result_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::exec_result_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::exec_result_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::exec_result_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/farmed_block_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 farmed_block_info_t::VNX_TYPE_HASH(0x2e10154a52617b19ull); const vnx::Hash64 farmed_block_info_t::VNX_CODE_HASH(0xf131225aa531d24dull); vnx::Hash64 farmed_block_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string farmed_block_info_t::get_type_name() const { return "mmx.farmed_block_info_t"; } const vnx::TypeCode* farmed_block_info_t::get_type_code() const { return mmx::vnx_native_type_code_farmed_block_info_t; } std::shared_ptr farmed_block_info_t::create() { return std::make_shared(); } std::shared_ptr farmed_block_info_t::clone() const { return std::make_shared(*this); } void farmed_block_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void farmed_block_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void farmed_block_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_farmed_block_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, reward); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, reward_addr); _visitor.type_end(*_type_code); } void farmed_block_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"reward\": "; vnx::write(_out, reward); _out << ", \"reward_addr\": "; vnx::write(_out, reward_addr); _out << "}"; } void farmed_block_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object farmed_block_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.farmed_block_info_t"; _object["height"] = height; _object["reward"] = reward; _object["reward_addr"] = reward_addr; return _object; } void farmed_block_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "reward") { _entry.second.to(reward); } else if(_entry.first == "reward_addr") { _entry.second.to(reward_addr); } } } vnx::Variant farmed_block_info_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "reward") { return vnx::Variant(reward); } if(_name == "reward_addr") { return vnx::Variant(reward_addr); } return vnx::Variant(); } void farmed_block_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "reward") { _value.to(reward); } else if(_name == "reward_addr") { _value.to(reward_addr); } } /// \private std::ostream& operator<<(std::ostream& _out, const farmed_block_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, farmed_block_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* farmed_block_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr farmed_block_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.farmed_block_info_t"; type_code->type_hash = vnx::Hash64(0x2e10154a52617b19ull); type_code->code_hash = vnx::Hash64(0xf131225aa531d24dull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::farmed_block_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "reward"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "reward_addr"; field.code = {11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.reward, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.reward_addr, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::farmed_block_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_farmed_block_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::farmed_block_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.reward); vnx::write(out, value.reward_addr, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::farmed_block_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::farmed_block_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::farmed_block_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::farmed_block_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::farmed_block_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/farmed_block_summary_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 farmed_block_summary_t::VNX_TYPE_HASH(0x9fe2bac01782721dull); const vnx::Hash64 farmed_block_summary_t::VNX_CODE_HASH(0x8349f56d71a75ef6ull); vnx::Hash64 farmed_block_summary_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string farmed_block_summary_t::get_type_name() const { return "mmx.farmed_block_summary_t"; } const vnx::TypeCode* farmed_block_summary_t::get_type_code() const { return mmx::vnx_native_type_code_farmed_block_summary_t; } std::shared_ptr farmed_block_summary_t::create() { return std::make_shared(); } std::shared_ptr farmed_block_summary_t::clone() const { return std::make_shared(*this); } void farmed_block_summary_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void farmed_block_summary_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void farmed_block_summary_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_farmed_block_summary_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, num_blocks); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, last_height); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, total_rewards); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, reward_map); _visitor.type_end(*_type_code); } void farmed_block_summary_t::write(std::ostream& _out) const { _out << "{"; _out << "\"num_blocks\": "; vnx::write(_out, num_blocks); _out << ", \"last_height\": "; vnx::write(_out, last_height); _out << ", \"total_rewards\": "; vnx::write(_out, total_rewards); _out << ", \"reward_map\": "; vnx::write(_out, reward_map); _out << "}"; } void farmed_block_summary_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object farmed_block_summary_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.farmed_block_summary_t"; _object["num_blocks"] = num_blocks; _object["last_height"] = last_height; _object["total_rewards"] = total_rewards; _object["reward_map"] = reward_map; return _object; } void farmed_block_summary_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "last_height") { _entry.second.to(last_height); } else if(_entry.first == "num_blocks") { _entry.second.to(num_blocks); } else if(_entry.first == "reward_map") { _entry.second.to(reward_map); } else if(_entry.first == "total_rewards") { _entry.second.to(total_rewards); } } } vnx::Variant farmed_block_summary_t::get_field(const std::string& _name) const { if(_name == "num_blocks") { return vnx::Variant(num_blocks); } if(_name == "last_height") { return vnx::Variant(last_height); } if(_name == "total_rewards") { return vnx::Variant(total_rewards); } if(_name == "reward_map") { return vnx::Variant(reward_map); } return vnx::Variant(); } void farmed_block_summary_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "num_blocks") { _value.to(num_blocks); } else if(_name == "last_height") { _value.to(last_height); } else if(_name == "total_rewards") { _value.to(total_rewards); } else if(_name == "reward_map") { _value.to(reward_map); } } /// \private std::ostream& operator<<(std::ostream& _out, const farmed_block_summary_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, farmed_block_summary_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* farmed_block_summary_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr farmed_block_summary_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.farmed_block_summary_t"; type_code->type_hash = vnx::Hash64(0x9fe2bac01782721dull); type_code->code_hash = vnx::Hash64(0x8349f56d71a75ef6ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::farmed_block_summary_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "num_blocks"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "last_height"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "total_rewards"; field.code = {4}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "reward_map"; field.code = {13, 5, 11, 32, 1, 4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.num_blocks, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.last_height, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.total_rewards, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.reward_map, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::farmed_block_summary_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_farmed_block_summary_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::farmed_block_summary_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(16); vnx::write_value(_buf + 0, value.num_blocks); vnx::write_value(_buf + 4, value.last_height); vnx::write_value(_buf + 8, value.total_rewards); vnx::write(out, value.reward_map, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::farmed_block_summary_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::farmed_block_summary_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::farmed_block_summary_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::farmed_block_summary_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::farmed_block_summary_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/node_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 node_info_t::VNX_TYPE_HASH(0xda45b5e3a527588eull); const vnx::Hash64 node_info_t::VNX_CODE_HASH(0xa5e1afc5dbd3ecf5ull); vnx::Hash64 node_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string node_info_t::get_type_name() const { return "mmx.node_info_t"; } const vnx::TypeCode* node_info_t::get_type_code() const { return mmx::vnx_native_type_code_node_info_t; } std::shared_ptr node_info_t::create() { return std::make_shared(); } std::shared_ptr node_info_t::clone() const { return std::make_shared(*this); } void node_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void node_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void node_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_node_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, type); _visitor.type_end(*_type_code); } void node_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"id\": "; vnx::write(_out, id); _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"type\": "; vnx::write(_out, type); _out << "}"; } void node_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object node_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.node_info_t"; _object["id"] = id; _object["version"] = version; _object["type"] = type; return _object; } void node_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "type") { _entry.second.to(type); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant node_info_t::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "version") { return vnx::Variant(version); } if(_name == "type") { return vnx::Variant(type); } return vnx::Variant(); } void node_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "version") { _value.to(version); } else if(_name == "type") { _value.to(type); } } /// \private std::ostream& operator<<(std::ostream& _out, const node_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, node_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* node_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr node_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.node_info_t"; type_code->type_hash = vnx::Hash64(0xda45b5e3a527588eull); type_code->code_hash = vnx::Hash64(0xa5e1afc5dbd3ecf5ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::node_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::node_type_e::static_get_type_code(); type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "type"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; case 2: vnx::read(in, value.type, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::node_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_node_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::node_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.version); vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); vnx::write(out, value.type, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::node_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::node_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::node_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::node_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::node_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/node_type_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 node_type_e::VNX_TYPE_HASH(0xa5de458f1ce5539aull); const vnx::Hash64 node_type_e::VNX_CODE_HASH(0xbf2f8dd8ae8b1079ull); vnx::Hash64 node_type_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string node_type_e::get_type_name() const { return "mmx.node_type_e"; } const vnx::TypeCode* node_type_e::get_type_code() const { return mmx::vnx_native_type_code_node_type_e; } std::shared_ptr node_type_e::create() { return std::make_shared(); } std::shared_ptr node_type_e::clone() const { return std::make_shared(*this); } void node_type_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void node_type_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t node_type_e::is_valid() const { switch(value) { case API_CLIENT: return true; case FULL_NODE: return true; case LIGHT_NODE: return true; } return false; } std::string node_type_e::to_string() const { switch(value) { case API_CLIENT: return "\"API_CLIENT\""; case FULL_NODE: return "\"FULL_NODE\""; case LIGHT_NODE: return "\"LIGHT_NODE\""; } return std::to_string(value); } std::string node_type_e::to_string_value() const { switch(value) { case API_CLIENT: return "API_CLIENT"; case FULL_NODE: return "FULL_NODE"; case LIGHT_NODE: return "LIGHT_NODE"; } return std::to_string(value); } std::string node_type_e::to_string_value_full() const { switch(value) { case API_CLIENT: return "mmx.node_type_e.API_CLIENT"; case FULL_NODE: return "mmx.node_type_e.FULL_NODE"; case LIGHT_NODE: return "mmx.node_type_e.LIGHT_NODE"; } return std::to_string(value); } void node_type_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void node_type_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "API_CLIENT") value = API_CLIENT; else if(_name == "FULL_NODE") value = FULL_NODE; else if(_name == "LIGHT_NODE") value = LIGHT_NODE; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void node_type_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case API_CLIENT: _name = "API_CLIENT"; break; case FULL_NODE: _name = "FULL_NODE"; break; case LIGHT_NODE: _name = "LIGHT_NODE"; break; } _visitor.enum_value(value, _name); } void node_type_e::write(std::ostream& _out) const { switch(value) { case API_CLIENT: _out << "\"API_CLIENT\""; break; case FULL_NODE: _out << "\"FULL_NODE\""; break; case LIGHT_NODE: _out << "\"LIGHT_NODE\""; break; default: _out << value; } } void node_type_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object node_type_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.node_type_e"; _object["value"] = value; return _object; } void node_type_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant node_type_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void node_type_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const node_type_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, node_type_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* node_type_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr node_type_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.node_type_e"; type_code->type_hash = vnx::Hash64(0xa5de458f1ce5539aull); type_code->code_hash = vnx::Hash64(0xbf2f8dd8ae8b1079ull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::node_type_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[1802393446] = "API_CLIENT"; type_code->enum_map[2903686019] = "FULL_NODE"; type_code->enum_map[3477499945] = "LIGHT_NODE"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::node_type_e::enum_t(tmp.to()); } else { value = ::mmx::node_type_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::node_type_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_node_type_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::node_type_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::node_type_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::node_type_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::node_type_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::node_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::node_type_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::node_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::node_type_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::node_type_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::node_type_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::node_type_e::enum_t& _value) { return ::mmx::node_type_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::node_type_e::enum_t& _value) { return ::mmx::node_type_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::node_type_e::enum_t& _value) { return ::mmx::node_type_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::node_type_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::node_type_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/offer_data_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 offer_data_t::VNX_TYPE_HASH(0xc97a08a709a5f1efull); const vnx::Hash64 offer_data_t::VNX_CODE_HASH(0x2d42a286fdb37006ull); vnx::Hash64 offer_data_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string offer_data_t::get_type_name() const { return "mmx.offer_data_t"; } const vnx::TypeCode* offer_data_t::get_type_code() const { return mmx::vnx_native_type_code_offer_data_t; } std::shared_ptr offer_data_t::create() { return std::make_shared(); } std::shared_ptr offer_data_t::clone() const { return std::make_shared(*this); } void offer_data_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void offer_data_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void offer_data_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_offer_data_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, last_update); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, owner); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, partner); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, bid_currency); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, ask_currency); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, bid_balance); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, ask_balance); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, ask_amount); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, inv_price); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, price); _visitor.type_end(*_type_code); } void offer_data_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"last_update\": "; vnx::write(_out, last_update); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"owner\": "; vnx::write(_out, owner); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"partner\": "; vnx::write(_out, partner); _out << ", \"bid_currency\": "; vnx::write(_out, bid_currency); _out << ", \"ask_currency\": "; vnx::write(_out, ask_currency); _out << ", \"bid_balance\": "; vnx::write(_out, bid_balance); _out << ", \"ask_balance\": "; vnx::write(_out, ask_balance); _out << ", \"ask_amount\": "; vnx::write(_out, ask_amount); _out << ", \"inv_price\": "; vnx::write(_out, inv_price); _out << ", \"price\": "; vnx::write(_out, price); _out << "}"; } void offer_data_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object offer_data_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.offer_data_t"; _object["height"] = height; _object["last_update"] = last_update; _object["time_stamp"] = time_stamp; _object["owner"] = owner; _object["address"] = address; _object["partner"] = partner; _object["bid_currency"] = bid_currency; _object["ask_currency"] = ask_currency; _object["bid_balance"] = bid_balance; _object["ask_balance"] = ask_balance; _object["ask_amount"] = ask_amount; _object["inv_price"] = inv_price; _object["price"] = price; return _object; } void offer_data_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "ask_amount") { _entry.second.to(ask_amount); } else if(_entry.first == "ask_balance") { _entry.second.to(ask_balance); } else if(_entry.first == "ask_currency") { _entry.second.to(ask_currency); } else if(_entry.first == "bid_balance") { _entry.second.to(bid_balance); } else if(_entry.first == "bid_currency") { _entry.second.to(bid_currency); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "inv_price") { _entry.second.to(inv_price); } else if(_entry.first == "last_update") { _entry.second.to(last_update); } else if(_entry.first == "owner") { _entry.second.to(owner); } else if(_entry.first == "partner") { _entry.second.to(partner); } else if(_entry.first == "price") { _entry.second.to(price); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } } } vnx::Variant offer_data_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "last_update") { return vnx::Variant(last_update); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "owner") { return vnx::Variant(owner); } if(_name == "address") { return vnx::Variant(address); } if(_name == "partner") { return vnx::Variant(partner); } if(_name == "bid_currency") { return vnx::Variant(bid_currency); } if(_name == "ask_currency") { return vnx::Variant(ask_currency); } if(_name == "bid_balance") { return vnx::Variant(bid_balance); } if(_name == "ask_balance") { return vnx::Variant(ask_balance); } if(_name == "ask_amount") { return vnx::Variant(ask_amount); } if(_name == "inv_price") { return vnx::Variant(inv_price); } if(_name == "price") { return vnx::Variant(price); } return vnx::Variant(); } void offer_data_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "last_update") { _value.to(last_update); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "owner") { _value.to(owner); } else if(_name == "address") { _value.to(address); } else if(_name == "partner") { _value.to(partner); } else if(_name == "bid_currency") { _value.to(bid_currency); } else if(_name == "ask_currency") { _value.to(ask_currency); } else if(_name == "bid_balance") { _value.to(bid_balance); } else if(_name == "ask_balance") { _value.to(ask_balance); } else if(_name == "ask_amount") { _value.to(ask_amount); } else if(_name == "inv_price") { _value.to(inv_price); } else if(_name == "price") { _value.to(price); } } /// \private std::ostream& operator<<(std::ostream& _out, const offer_data_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, offer_data_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* offer_data_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr offer_data_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.offer_data_t"; type_code->type_hash = vnx::Hash64(0xc97a08a709a5f1efull); type_code->code_hash = vnx::Hash64(0x2d42a286fdb37006ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::offer_data_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(13); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "last_update"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "owner"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "partner"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "bid_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "ask_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "bid_balance"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "ask_balance"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "ask_amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "inv_price"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[12]; field.data_size = 8; field.name = "price"; field.code = {10}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.last_update, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.price, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 3: vnx::read(in, value.owner, type_code, _field->code.data()); break; case 4: vnx::read(in, value.address, type_code, _field->code.data()); break; case 5: vnx::read(in, value.partner, type_code, _field->code.data()); break; case 6: vnx::read(in, value.bid_currency, type_code, _field->code.data()); break; case 7: vnx::read(in, value.ask_currency, type_code, _field->code.data()); break; case 8: vnx::read(in, value.bid_balance, type_code, _field->code.data()); break; case 9: vnx::read(in, value.ask_balance, type_code, _field->code.data()); break; case 10: vnx::read(in, value.ask_amount, type_code, _field->code.data()); break; case 11: vnx::read(in, value.inv_price, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::offer_data_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_offer_data_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::offer_data_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(24); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.last_update); vnx::write_value(_buf + 8, value.time_stamp); vnx::write_value(_buf + 16, value.price); vnx::write(out, value.owner, type_code, type_code->fields[3].code.data()); vnx::write(out, value.address, type_code, type_code->fields[4].code.data()); vnx::write(out, value.partner, type_code, type_code->fields[5].code.data()); vnx::write(out, value.bid_currency, type_code, type_code->fields[6].code.data()); vnx::write(out, value.ask_currency, type_code, type_code->fields[7].code.data()); vnx::write(out, value.bid_balance, type_code, type_code->fields[8].code.data()); vnx::write(out, value.ask_balance, type_code, type_code->fields[9].code.data()); vnx::write(out, value.ask_amount, type_code, type_code->fields[10].code.data()); vnx::write(out, value.inv_price, type_code, type_code->fields[11].code.data()); } void read(std::istream& in, ::mmx::offer_data_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::offer_data_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::offer_data_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::offer_data_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::offer_data_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/package.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace vnx { const TypeCode* type<::mmx::Block>::get_type_code() { return mmx::vnx_native_type_code_Block; } void type<::mmx::Block>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Block()); } void type<::mmx::Block>::create_dynamic_code(std::vector& code, const ::mmx::Block& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::BlockHeader>::get_type_code() { return mmx::vnx_native_type_code_BlockHeader; } void type<::mmx::BlockHeader>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::BlockHeader()); } void type<::mmx::BlockHeader>::create_dynamic_code(std::vector& code, const ::mmx::BlockHeader& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ChainParams>::get_type_code() { return mmx::vnx_native_type_code_ChainParams; } void type<::mmx::ChainParams>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ChainParams()); } void type<::mmx::ChainParams>::create_dynamic_code(std::vector& code, const ::mmx::ChainParams& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Challenge>::get_type_code() { return mmx::vnx_native_type_code_Challenge; } void type<::mmx::Challenge>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Challenge()); } void type<::mmx::Challenge>::create_dynamic_code(std::vector& code, const ::mmx::Challenge& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Contract>::get_type_code() { return mmx::vnx_native_type_code_Contract; } void type<::mmx::Contract>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Contract()); } void type<::mmx::Contract>::create_dynamic_code(std::vector& code, const ::mmx::Contract& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::FarmInfo>::get_type_code() { return mmx::vnx_native_type_code_FarmInfo; } void type<::mmx::FarmInfo>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::FarmInfo()); } void type<::mmx::FarmInfo>::create_dynamic_code(std::vector& code, const ::mmx::FarmInfo& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_farm_info>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_farm_info; } void type<::mmx::Farmer_get_farm_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_farm_info()); } void type<::mmx::Farmer_get_farm_info>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farm_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_farm_info_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_farm_info_return; } void type<::mmx::Farmer_get_farm_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_farm_info_return()); } void type<::mmx::Farmer_get_farm_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farm_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_farmer_keys>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_farmer_keys; } void type<::mmx::Farmer_get_farmer_keys>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_farmer_keys()); } void type<::mmx::Farmer_get_farmer_keys>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farmer_keys& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_farmer_keys_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_farmer_keys_return; } void type<::mmx::Farmer_get_farmer_keys_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_farmer_keys_return()); } void type<::mmx::Farmer_get_farmer_keys_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_farmer_keys_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_mac_addr>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_mac_addr; } void type<::mmx::Farmer_get_mac_addr>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_mac_addr()); } void type<::mmx::Farmer_get_mac_addr>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_mac_addr& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_mac_addr_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_mac_addr_return; } void type<::mmx::Farmer_get_mac_addr_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_mac_addr_return()); } void type<::mmx::Farmer_get_mac_addr_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_mac_addr_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_partial_diff>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_partial_diff; } void type<::mmx::Farmer_get_partial_diff>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_partial_diff()); } void type<::mmx::Farmer_get_partial_diff>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diff& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_partial_diff_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_partial_diff_return; } void type<::mmx::Farmer_get_partial_diff_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_partial_diff_return()); } void type<::mmx::Farmer_get_partial_diff_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diff_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_partial_diffs>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_partial_diffs; } void type<::mmx::Farmer_get_partial_diffs>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_partial_diffs()); } void type<::mmx::Farmer_get_partial_diffs>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diffs& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_get_partial_diffs_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_get_partial_diffs_return; } void type<::mmx::Farmer_get_partial_diffs_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_get_partial_diffs_return()); } void type<::mmx::Farmer_get_partial_diffs_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_get_partial_diffs_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_sign_block>::get_type_code() { return mmx::vnx_native_type_code_Farmer_sign_block; } void type<::mmx::Farmer_sign_block>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_sign_block()); } void type<::mmx::Farmer_sign_block>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_block& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_sign_block_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_sign_block_return; } void type<::mmx::Farmer_sign_block_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_sign_block_return()); } void type<::mmx::Farmer_sign_block_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_block_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_sign_vote>::get_type_code() { return mmx::vnx_native_type_code_Farmer_sign_vote; } void type<::mmx::Farmer_sign_vote>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_sign_vote()); } void type<::mmx::Farmer_sign_vote>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_vote& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Farmer_sign_vote_return>::get_type_code() { return mmx::vnx_native_type_code_Farmer_sign_vote_return; } void type<::mmx::Farmer_sign_vote_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Farmer_sign_vote_return()); } void type<::mmx::Farmer_sign_vote_return>::create_dynamic_code(std::vector& code, const ::mmx::Farmer_sign_vote_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_add_plot_dir>::get_type_code() { return mmx::vnx_native_type_code_Harvester_add_plot_dir; } void type<::mmx::Harvester_add_plot_dir>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_add_plot_dir()); } void type<::mmx::Harvester_add_plot_dir>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_add_plot_dir& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_add_plot_dir_return>::get_type_code() { return mmx::vnx_native_type_code_Harvester_add_plot_dir_return; } void type<::mmx::Harvester_add_plot_dir_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_add_plot_dir_return()); } void type<::mmx::Harvester_add_plot_dir_return>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_add_plot_dir_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_get_farm_info>::get_type_code() { return mmx::vnx_native_type_code_Harvester_get_farm_info; } void type<::mmx::Harvester_get_farm_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_get_farm_info()); } void type<::mmx::Harvester_get_farm_info>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_farm_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_get_farm_info_return>::get_type_code() { return mmx::vnx_native_type_code_Harvester_get_farm_info_return; } void type<::mmx::Harvester_get_farm_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_get_farm_info_return()); } void type<::mmx::Harvester_get_farm_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_farm_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_get_total_bytes>::get_type_code() { return mmx::vnx_native_type_code_Harvester_get_total_bytes; } void type<::mmx::Harvester_get_total_bytes>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_get_total_bytes()); } void type<::mmx::Harvester_get_total_bytes>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_total_bytes& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_get_total_bytes_return>::get_type_code() { return mmx::vnx_native_type_code_Harvester_get_total_bytes_return; } void type<::mmx::Harvester_get_total_bytes_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_get_total_bytes_return()); } void type<::mmx::Harvester_get_total_bytes_return>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_get_total_bytes_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_reload>::get_type_code() { return mmx::vnx_native_type_code_Harvester_reload; } void type<::mmx::Harvester_reload>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_reload()); } void type<::mmx::Harvester_reload>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_reload& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_reload_return>::get_type_code() { return mmx::vnx_native_type_code_Harvester_reload_return; } void type<::mmx::Harvester_reload_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_reload_return()); } void type<::mmx::Harvester_reload_return>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_reload_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_rem_plot_dir>::get_type_code() { return mmx::vnx_native_type_code_Harvester_rem_plot_dir; } void type<::mmx::Harvester_rem_plot_dir>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_rem_plot_dir()); } void type<::mmx::Harvester_rem_plot_dir>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_rem_plot_dir& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Harvester_rem_plot_dir_return>::get_type_code() { return mmx::vnx_native_type_code_Harvester_rem_plot_dir_return; } void type<::mmx::Harvester_rem_plot_dir_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Harvester_rem_plot_dir_return()); } void type<::mmx::Harvester_rem_plot_dir_return>::create_dynamic_code(std::vector& code, const ::mmx::Harvester_rem_plot_dir_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::IntervalRequest>::get_type_code() { return mmx::vnx_native_type_code_IntervalRequest; } void type<::mmx::IntervalRequest>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::IntervalRequest()); } void type<::mmx::IntervalRequest>::create_dynamic_code(std::vector& code, const ::mmx::IntervalRequest& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::KeyFile>::get_type_code() { return mmx::vnx_native_type_code_KeyFile; } void type<::mmx::KeyFile>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::KeyFile()); } void type<::mmx::KeyFile>::create_dynamic_code(std::vector& code, const ::mmx::KeyFile& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::LookupInfo>::get_type_code() { return mmx::vnx_native_type_code_LookupInfo; } void type<::mmx::LookupInfo>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::LookupInfo()); } void type<::mmx::LookupInfo>::create_dynamic_code(std::vector& code, const ::mmx::LookupInfo& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::NetworkInfo>::get_type_code() { return mmx::vnx_native_type_code_NetworkInfo; } void type<::mmx::NetworkInfo>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::NetworkInfo()); } void type<::mmx::NetworkInfo>::create_dynamic_code(std::vector& code, const ::mmx::NetworkInfo& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_add_block>::get_type_code() { return mmx::vnx_native_type_code_Node_add_block; } void type<::mmx::Node_add_block>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_add_block()); } void type<::mmx::Node_add_block>::create_dynamic_code(std::vector& code, const ::mmx::Node_add_block& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_add_block_return>::get_type_code() { return mmx::vnx_native_type_code_Node_add_block_return; } void type<::mmx::Node_add_block_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_add_block_return()); } void type<::mmx::Node_add_block_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_add_block_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_add_transaction>::get_type_code() { return mmx::vnx_native_type_code_Node_add_transaction; } void type<::mmx::Node_add_transaction>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_add_transaction()); } void type<::mmx::Node_add_transaction>::create_dynamic_code(std::vector& code, const ::mmx::Node_add_transaction& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_add_transaction_return>::get_type_code() { return mmx::vnx_native_type_code_Node_add_transaction_return; } void type<::mmx::Node_add_transaction_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_add_transaction_return()); } void type<::mmx::Node_add_transaction_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_add_transaction_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_call_contract>::get_type_code() { return mmx::vnx_native_type_code_Node_call_contract; } void type<::mmx::Node_call_contract>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_call_contract()); } void type<::mmx::Node_call_contract>::create_dynamic_code(std::vector& code, const ::mmx::Node_call_contract& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_call_contract_return>::get_type_code() { return mmx::vnx_native_type_code_Node_call_contract_return; } void type<::mmx::Node_call_contract_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_call_contract_return()); } void type<::mmx::Node_call_contract_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_call_contract_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_dump_storage>::get_type_code() { return mmx::vnx_native_type_code_Node_dump_storage; } void type<::mmx::Node_dump_storage>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_dump_storage()); } void type<::mmx::Node_dump_storage>::create_dynamic_code(std::vector& code, const ::mmx::Node_dump_storage& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_dump_storage_return>::get_type_code() { return mmx::vnx_native_type_code_Node_dump_storage_return; } void type<::mmx::Node_dump_storage_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_dump_storage_return()); } void type<::mmx::Node_dump_storage_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_dump_storage_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_fetch_offers>::get_type_code() { return mmx::vnx_native_type_code_Node_fetch_offers; } void type<::mmx::Node_fetch_offers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_fetch_offers()); } void type<::mmx::Node_fetch_offers>::create_dynamic_code(std::vector& code, const ::mmx::Node_fetch_offers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_fetch_offers_return>::get_type_code() { return mmx::vnx_native_type_code_Node_fetch_offers_return; } void type<::mmx::Node_fetch_offers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_fetch_offers_return()); } void type<::mmx::Node_fetch_offers_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_fetch_offers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_all_balances>::get_type_code() { return mmx::vnx_native_type_code_Node_get_all_balances; } void type<::mmx::Node_get_all_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_all_balances()); } void type<::mmx::Node_get_all_balances>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_all_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_all_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_all_balances_return; } void type<::mmx::Node_get_all_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_all_balances_return()); } void type<::mmx::Node_get_all_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_all_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_balance>::get_type_code() { return mmx::vnx_native_type_code_Node_get_balance; } void type<::mmx::Node_get_balance>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_balance()); } void type<::mmx::Node_get_balance>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_balance& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_balance_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_balance_return; } void type<::mmx::Node_get_balance_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_balance_return()); } void type<::mmx::Node_get_balance_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_balance_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_balances>::get_type_code() { return mmx::vnx_native_type_code_Node_get_balances; } void type<::mmx::Node_get_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_balances()); } void type<::mmx::Node_get_balances>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_balances_return; } void type<::mmx::Node_get_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_balances_return()); } void type<::mmx::Node_get_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block; } void type<::mmx::Node_get_block>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block()); } void type<::mmx::Node_get_block>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_return; } void type<::mmx::Node_get_block_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_return()); } void type<::mmx::Node_get_block_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_at>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_at; } void type<::mmx::Node_get_block_at>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_at()); } void type<::mmx::Node_get_block_at>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_at& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_at_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_at_return; } void type<::mmx::Node_get_block_at_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_at_return()); } void type<::mmx::Node_get_block_at_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_at_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_hash>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_hash; } void type<::mmx::Node_get_block_hash>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_hash()); } void type<::mmx::Node_get_block_hash>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_hash_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_hash_return; } void type<::mmx::Node_get_block_hash_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_hash_return()); } void type<::mmx::Node_get_block_hash_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_hash_ex>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_hash_ex; } void type<::mmx::Node_get_block_hash_ex>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_hash_ex()); } void type<::mmx::Node_get_block_hash_ex>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_ex& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_block_hash_ex_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_block_hash_ex_return; } void type<::mmx::Node_get_block_hash_ex_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_block_hash_ex_return()); } void type<::mmx::Node_get_block_hash_ex_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_block_hash_ex_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract; } void type<::mmx::Node_get_contract>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract()); } void type<::mmx::Node_get_contract>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract_return; } void type<::mmx::Node_get_contract_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract_return()); } void type<::mmx::Node_get_contract_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract_balances>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract_balances; } void type<::mmx::Node_get_contract_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract_balances()); } void type<::mmx::Node_get_contract_balances>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract_balances_return; } void type<::mmx::Node_get_contract_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract_balances_return()); } void type<::mmx::Node_get_contract_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract_for>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract_for; } void type<::mmx::Node_get_contract_for>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract_for()); } void type<::mmx::Node_get_contract_for>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_for& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contract_for_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contract_for_return; } void type<::mmx::Node_get_contract_for_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contract_for_return()); } void type<::mmx::Node_get_contract_for_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contract_for_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts; } void type<::mmx::Node_get_contracts>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts()); } void type<::mmx::Node_get_contracts>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts_return; } void type<::mmx::Node_get_contracts_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts_return()); } void type<::mmx::Node_get_contracts_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts_by>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts_by; } void type<::mmx::Node_get_contracts_by>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts_by()); } void type<::mmx::Node_get_contracts_by>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_by& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts_by_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts_by_return; } void type<::mmx::Node_get_contracts_by_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts_by_return()); } void type<::mmx::Node_get_contracts_by_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_by_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts_owned_by>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts_owned_by; } void type<::mmx::Node_get_contracts_owned_by>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts_owned_by()); } void type<::mmx::Node_get_contracts_owned_by>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_owned_by& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_contracts_owned_by_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_contracts_owned_by_return; } void type<::mmx::Node_get_contracts_owned_by_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_contracts_owned_by_return()); } void type<::mmx::Node_get_contracts_owned_by_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_contracts_owned_by_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_exec_history>::get_type_code() { return mmx::vnx_native_type_code_Node_get_exec_history; } void type<::mmx::Node_get_exec_history>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_exec_history()); } void type<::mmx::Node_get_exec_history>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_exec_history& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_exec_history_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_exec_history_return; } void type<::mmx::Node_get_exec_history_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_exec_history_return()); } void type<::mmx::Node_get_exec_history_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_exec_history_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmed_block_summary>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmed_block_summary; } void type<::mmx::Node_get_farmed_block_summary>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmed_block_summary()); } void type<::mmx::Node_get_farmed_block_summary>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_block_summary& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmed_block_summary_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmed_block_summary_return; } void type<::mmx::Node_get_farmed_block_summary_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmed_block_summary_return()); } void type<::mmx::Node_get_farmed_block_summary_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_block_summary_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmed_blocks>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmed_blocks; } void type<::mmx::Node_get_farmed_blocks>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmed_blocks()); } void type<::mmx::Node_get_farmed_blocks>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_blocks& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmed_blocks_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmed_blocks_return; } void type<::mmx::Node_get_farmed_blocks_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmed_blocks_return()); } void type<::mmx::Node_get_farmed_blocks_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmed_blocks_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmer_ranking>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmer_ranking; } void type<::mmx::Node_get_farmer_ranking>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmer_ranking()); } void type<::mmx::Node_get_farmer_ranking>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmer_ranking& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_farmer_ranking_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_farmer_ranking_return; } void type<::mmx::Node_get_farmer_ranking_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_farmer_ranking_return()); } void type<::mmx::Node_get_farmer_ranking_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_farmer_ranking_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_genesis_hash>::get_type_code() { return mmx::vnx_native_type_code_Node_get_genesis_hash; } void type<::mmx::Node_get_genesis_hash>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_genesis_hash()); } void type<::mmx::Node_get_genesis_hash>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_genesis_hash& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_genesis_hash_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_genesis_hash_return; } void type<::mmx::Node_get_genesis_hash_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_genesis_hash_return()); } void type<::mmx::Node_get_genesis_hash_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_genesis_hash_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_header>::get_type_code() { return mmx::vnx_native_type_code_Node_get_header; } void type<::mmx::Node_get_header>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_header()); } void type<::mmx::Node_get_header>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_header& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_header_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_header_return; } void type<::mmx::Node_get_header_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_header_return()); } void type<::mmx::Node_get_header_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_header_at>::get_type_code() { return mmx::vnx_native_type_code_Node_get_header_at; } void type<::mmx::Node_get_header_at>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_header_at()); } void type<::mmx::Node_get_header_at>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_at& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_header_at_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_header_at_return; } void type<::mmx::Node_get_header_at_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_header_at_return()); } void type<::mmx::Node_get_header_at_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_header_at_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_height>::get_type_code() { return mmx::vnx_native_type_code_Node_get_height; } void type<::mmx::Node_get_height>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_height()); } void type<::mmx::Node_get_height>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_height& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_height_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_height_return; } void type<::mmx::Node_get_height_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_height_return()); } void type<::mmx::Node_get_height_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_height_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_history>::get_type_code() { return mmx::vnx_native_type_code_Node_get_history; } void type<::mmx::Node_get_history>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_history()); } void type<::mmx::Node_get_history>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_history& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_history_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_history_return; } void type<::mmx::Node_get_history_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_history_return()); } void type<::mmx::Node_get_history_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_history_memo>::get_type_code() { return mmx::vnx_native_type_code_Node_get_history_memo; } void type<::mmx::Node_get_history_memo>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_history_memo()); } void type<::mmx::Node_get_history_memo>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_memo& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_history_memo_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_history_memo_return; } void type<::mmx::Node_get_history_memo_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_history_memo_return()); } void type<::mmx::Node_get_history_memo_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_history_memo_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_network_info>::get_type_code() { return mmx::vnx_native_type_code_Node_get_network_info; } void type<::mmx::Node_get_network_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_network_info()); } void type<::mmx::Node_get_network_info>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_network_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_network_info_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_network_info_return; } void type<::mmx::Node_get_network_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_network_info_return()); } void type<::mmx::Node_get_network_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_network_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offer>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offer; } void type<::mmx::Node_get_offer>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offer()); } void type<::mmx::Node_get_offer>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offer& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offer_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offer_return; } void type<::mmx::Node_get_offer_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offer_return()); } void type<::mmx::Node_get_offer_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offer_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offers>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offers; } void type<::mmx::Node_get_offers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offers()); } void type<::mmx::Node_get_offers>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offers_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offers_return; } void type<::mmx::Node_get_offers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offers_return()); } void type<::mmx::Node_get_offers_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offers_by>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offers_by; } void type<::mmx::Node_get_offers_by>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offers_by()); } void type<::mmx::Node_get_offers_by>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_by& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_offers_by_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_offers_by_return; } void type<::mmx::Node_get_offers_by_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_offers_by_return()); } void type<::mmx::Node_get_offers_by_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_offers_by_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_params>::get_type_code() { return mmx::vnx_native_type_code_Node_get_params; } void type<::mmx::Node_get_params>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_params()); } void type<::mmx::Node_get_params>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_params& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_params_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_params_return; } void type<::mmx::Node_get_params_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_params_return()); } void type<::mmx::Node_get_params_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_params_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_plot_nft_info>::get_type_code() { return mmx::vnx_native_type_code_Node_get_plot_nft_info; } void type<::mmx::Node_get_plot_nft_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_plot_nft_info()); } void type<::mmx::Node_get_plot_nft_info>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_plot_nft_info_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_plot_nft_info_return; } void type<::mmx::Node_get_plot_nft_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_plot_nft_info_return()); } void type<::mmx::Node_get_plot_nft_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_plot_nft_target>::get_type_code() { return mmx::vnx_native_type_code_Node_get_plot_nft_target; } void type<::mmx::Node_get_plot_nft_target>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_plot_nft_target()); } void type<::mmx::Node_get_plot_nft_target>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_target& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_plot_nft_target_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_plot_nft_target_return; } void type<::mmx::Node_get_plot_nft_target_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_plot_nft_target_return()); } void type<::mmx::Node_get_plot_nft_target_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_plot_nft_target_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_recent_offers>::get_type_code() { return mmx::vnx_native_type_code_Node_get_recent_offers; } void type<::mmx::Node_get_recent_offers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_recent_offers()); } void type<::mmx::Node_get_recent_offers>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_recent_offers_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_recent_offers_return; } void type<::mmx::Node_get_recent_offers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_recent_offers_return()); } void type<::mmx::Node_get_recent_offers_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_recent_offers_for>::get_type_code() { return mmx::vnx_native_type_code_Node_get_recent_offers_for; } void type<::mmx::Node_get_recent_offers_for>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_recent_offers_for()); } void type<::mmx::Node_get_recent_offers_for>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_for& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_recent_offers_for_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_recent_offers_for_return; } void type<::mmx::Node_get_recent_offers_for_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_recent_offers_for_return()); } void type<::mmx::Node_get_recent_offers_for_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_recent_offers_for_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_equivalent_liquidity>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity; } void type<::mmx::Node_get_swap_equivalent_liquidity>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_equivalent_liquidity()); } void type<::mmx::Node_get_swap_equivalent_liquidity>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_equivalent_liquidity& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_equivalent_liquidity_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_equivalent_liquidity_return; } void type<::mmx::Node_get_swap_equivalent_liquidity_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_equivalent_liquidity_return()); } void type<::mmx::Node_get_swap_equivalent_liquidity_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_equivalent_liquidity_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_fees_earned>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_fees_earned; } void type<::mmx::Node_get_swap_fees_earned>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_fees_earned()); } void type<::mmx::Node_get_swap_fees_earned>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_fees_earned& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_fees_earned_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_fees_earned_return; } void type<::mmx::Node_get_swap_fees_earned_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_fees_earned_return()); } void type<::mmx::Node_get_swap_fees_earned_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_fees_earned_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_history>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_history; } void type<::mmx::Node_get_swap_history>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_history()); } void type<::mmx::Node_get_swap_history>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_history& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_history_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_history_return; } void type<::mmx::Node_get_swap_history_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_history_return()); } void type<::mmx::Node_get_swap_history_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_history_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_info>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_info; } void type<::mmx::Node_get_swap_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_info()); } void type<::mmx::Node_get_swap_info>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_info_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_info_return; } void type<::mmx::Node_get_swap_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_info_return()); } void type<::mmx::Node_get_swap_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_liquidity_by>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_liquidity_by; } void type<::mmx::Node_get_swap_liquidity_by>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_liquidity_by()); } void type<::mmx::Node_get_swap_liquidity_by>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_liquidity_by& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_liquidity_by_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_liquidity_by_return; } void type<::mmx::Node_get_swap_liquidity_by_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_liquidity_by_return()); } void type<::mmx::Node_get_swap_liquidity_by_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_liquidity_by_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_trade_estimate>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_trade_estimate; } void type<::mmx::Node_get_swap_trade_estimate>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_trade_estimate()); } void type<::mmx::Node_get_swap_trade_estimate>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_trade_estimate& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_trade_estimate_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_trade_estimate_return; } void type<::mmx::Node_get_swap_trade_estimate_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_trade_estimate_return()); } void type<::mmx::Node_get_swap_trade_estimate_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_trade_estimate_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_user_info>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_user_info; } void type<::mmx::Node_get_swap_user_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_user_info()); } void type<::mmx::Node_get_swap_user_info>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_user_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swap_user_info_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swap_user_info_return; } void type<::mmx::Node_get_swap_user_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swap_user_info_return()); } void type<::mmx::Node_get_swap_user_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swap_user_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swaps>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swaps; } void type<::mmx::Node_get_swaps>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swaps()); } void type<::mmx::Node_get_swaps>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swaps& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_swaps_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_swaps_return; } void type<::mmx::Node_get_swaps_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_swaps_return()); } void type<::mmx::Node_get_swaps_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_swaps_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_synced_height>::get_type_code() { return mmx::vnx_native_type_code_Node_get_synced_height; } void type<::mmx::Node_get_synced_height>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_synced_height()); } void type<::mmx::Node_get_synced_height>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_height& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_synced_height_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_synced_height_return; } void type<::mmx::Node_get_synced_height_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_synced_height_return()); } void type<::mmx::Node_get_synced_height_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_height_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_synced_vdf_height>::get_type_code() { return mmx::vnx_native_type_code_Node_get_synced_vdf_height; } void type<::mmx::Node_get_synced_vdf_height>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_synced_vdf_height()); } void type<::mmx::Node_get_synced_vdf_height>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_vdf_height& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_synced_vdf_height_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_synced_vdf_height_return; } void type<::mmx::Node_get_synced_vdf_height_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_synced_vdf_height_return()); } void type<::mmx::Node_get_synced_vdf_height_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_synced_vdf_height_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_balance>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_balance; } void type<::mmx::Node_get_total_balance>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_balance()); } void type<::mmx::Node_get_total_balance>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balance& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_balance_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_balance_return; } void type<::mmx::Node_get_total_balance_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_balance_return()); } void type<::mmx::Node_get_total_balance_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balance_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_balances>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_balances; } void type<::mmx::Node_get_total_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_balances()); } void type<::mmx::Node_get_total_balances>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_balances_return; } void type<::mmx::Node_get_total_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_balances_return()); } void type<::mmx::Node_get_total_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_supply>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_supply; } void type<::mmx::Node_get_total_supply>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_supply()); } void type<::mmx::Node_get_total_supply>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_supply& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_total_supply_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_total_supply_return; } void type<::mmx::Node_get_total_supply_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_total_supply_return()); } void type<::mmx::Node_get_total_supply_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_total_supply_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_trade_history>::get_type_code() { return mmx::vnx_native_type_code_Node_get_trade_history; } void type<::mmx::Node_get_trade_history>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_trade_history()); } void type<::mmx::Node_get_trade_history>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_trade_history_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_trade_history_return; } void type<::mmx::Node_get_trade_history_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_trade_history_return()); } void type<::mmx::Node_get_trade_history_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_trade_history_for>::get_type_code() { return mmx::vnx_native_type_code_Node_get_trade_history_for; } void type<::mmx::Node_get_trade_history_for>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_trade_history_for()); } void type<::mmx::Node_get_trade_history_for>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_for& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_trade_history_for_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_trade_history_for_return; } void type<::mmx::Node_get_trade_history_for_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_trade_history_for_return()); } void type<::mmx::Node_get_trade_history_for_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_trade_history_for_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_transaction>::get_type_code() { return mmx::vnx_native_type_code_Node_get_transaction; } void type<::mmx::Node_get_transaction>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_transaction()); } void type<::mmx::Node_get_transaction>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_transaction& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_transaction_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_transaction_return; } void type<::mmx::Node_get_transaction_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_transaction_return()); } void type<::mmx::Node_get_transaction_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_transaction_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_transactions>::get_type_code() { return mmx::vnx_native_type_code_Node_get_transactions; } void type<::mmx::Node_get_transactions>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_transactions()); } void type<::mmx::Node_get_transactions>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_transactions& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_transactions_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_transactions_return; } void type<::mmx::Node_get_transactions_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_transactions_return()); } void type<::mmx::Node_get_transactions_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_transactions_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_height>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_height; } void type<::mmx::Node_get_tx_height>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_height()); } void type<::mmx::Node_get_tx_height>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_height& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_height_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_height_return; } void type<::mmx::Node_get_tx_height_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_height_return()); } void type<::mmx::Node_get_tx_height_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_height_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids; } void type<::mmx::Node_get_tx_ids>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids()); } void type<::mmx::Node_get_tx_ids>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids_return; } void type<::mmx::Node_get_tx_ids_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids_return()); } void type<::mmx::Node_get_tx_ids_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids_at>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids_at; } void type<::mmx::Node_get_tx_ids_at>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids_at()); } void type<::mmx::Node_get_tx_ids_at>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_at& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids_at_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids_at_return; } void type<::mmx::Node_get_tx_ids_at_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids_at_return()); } void type<::mmx::Node_get_tx_ids_at_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_at_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids_since>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids_since; } void type<::mmx::Node_get_tx_ids_since>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids_since()); } void type<::mmx::Node_get_tx_ids_since>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_since& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_ids_since_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_ids_since_return; } void type<::mmx::Node_get_tx_ids_since_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_ids_since_return()); } void type<::mmx::Node_get_tx_ids_since_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_ids_since_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_info>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_info; } void type<::mmx::Node_get_tx_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_info()); } void type<::mmx::Node_get_tx_info>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_info_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_info_return; } void type<::mmx::Node_get_tx_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_info_return()); } void type<::mmx::Node_get_tx_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_info_for>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_info_for; } void type<::mmx::Node_get_tx_info_for>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_info_for()); } void type<::mmx::Node_get_tx_info_for>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_for& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_tx_info_for_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_tx_info_for_return; } void type<::mmx::Node_get_tx_info_for_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_tx_info_for_return()); } void type<::mmx::Node_get_tx_info_for_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_tx_info_for_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_vdf_height>::get_type_code() { return mmx::vnx_native_type_code_Node_get_vdf_height; } void type<::mmx::Node_get_vdf_height>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_vdf_height()); } void type<::mmx::Node_get_vdf_height>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_height& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_vdf_height_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_vdf_height_return; } void type<::mmx::Node_get_vdf_height_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_vdf_height_return()); } void type<::mmx::Node_get_vdf_height_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_height_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_vdf_peak>::get_type_code() { return mmx::vnx_native_type_code_Node_get_vdf_peak; } void type<::mmx::Node_get_vdf_peak>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_vdf_peak()); } void type<::mmx::Node_get_vdf_peak>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_peak& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_get_vdf_peak_return>::get_type_code() { return mmx::vnx_native_type_code_Node_get_vdf_peak_return; } void type<::mmx::Node_get_vdf_peak_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_get_vdf_peak_return()); } void type<::mmx::Node_get_vdf_peak_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_get_vdf_peak_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage; } void type<::mmx::Node_read_storage>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage()); } void type<::mmx::Node_read_storage>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_return; } void type<::mmx::Node_read_storage_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_return()); } void type<::mmx::Node_read_storage_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_array>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_array; } void type<::mmx::Node_read_storage_array>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_array()); } void type<::mmx::Node_read_storage_array>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_array& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_array_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_array_return; } void type<::mmx::Node_read_storage_array_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_array_return()); } void type<::mmx::Node_read_storage_array_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_array_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_addr>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_addr; } void type<::mmx::Node_read_storage_entry_addr>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_addr()); } void type<::mmx::Node_read_storage_entry_addr>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_addr& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_addr_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_addr_return; } void type<::mmx::Node_read_storage_entry_addr_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_addr_return()); } void type<::mmx::Node_read_storage_entry_addr_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_addr_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_string>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_string; } void type<::mmx::Node_read_storage_entry_string>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_string()); } void type<::mmx::Node_read_storage_entry_string>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_string& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_string_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_string_return; } void type<::mmx::Node_read_storage_entry_string_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_string_return()); } void type<::mmx::Node_read_storage_entry_string_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_string_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_var>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_var; } void type<::mmx::Node_read_storage_entry_var>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_var()); } void type<::mmx::Node_read_storage_entry_var>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_var& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_entry_var_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_entry_var_return; } void type<::mmx::Node_read_storage_entry_var_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_entry_var_return()); } void type<::mmx::Node_read_storage_entry_var_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_entry_var_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_field>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_field; } void type<::mmx::Node_read_storage_field>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_field()); } void type<::mmx::Node_read_storage_field>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_field& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_field_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_field_return; } void type<::mmx::Node_read_storage_field_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_field_return()); } void type<::mmx::Node_read_storage_field_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_field_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_map>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_map; } void type<::mmx::Node_read_storage_map>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_map()); } void type<::mmx::Node_read_storage_map>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_map& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_map_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_map_return; } void type<::mmx::Node_read_storage_map_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_map_return()); } void type<::mmx::Node_read_storage_map_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_map_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_object>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_object; } void type<::mmx::Node_read_storage_object>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_object()); } void type<::mmx::Node_read_storage_object>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_object& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_object_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_object_return; } void type<::mmx::Node_read_storage_object_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_object_return()); } void type<::mmx::Node_read_storage_object_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_object_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_var>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_var; } void type<::mmx::Node_read_storage_var>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_var()); } void type<::mmx::Node_read_storage_var>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_var& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_read_storage_var_return>::get_type_code() { return mmx::vnx_native_type_code_Node_read_storage_var_return; } void type<::mmx::Node_read_storage_var_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_read_storage_var_return()); } void type<::mmx::Node_read_storage_var_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_read_storage_var_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_revert_sync>::get_type_code() { return mmx::vnx_native_type_code_Node_revert_sync; } void type<::mmx::Node_revert_sync>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_revert_sync()); } void type<::mmx::Node_revert_sync>::create_dynamic_code(std::vector& code, const ::mmx::Node_revert_sync& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_revert_sync_return>::get_type_code() { return mmx::vnx_native_type_code_Node_revert_sync_return; } void type<::mmx::Node_revert_sync_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_revert_sync_return()); } void type<::mmx::Node_revert_sync_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_revert_sync_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_start_sync>::get_type_code() { return mmx::vnx_native_type_code_Node_start_sync; } void type<::mmx::Node_start_sync>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_start_sync()); } void type<::mmx::Node_start_sync>::create_dynamic_code(std::vector& code, const ::mmx::Node_start_sync& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_start_sync_return>::get_type_code() { return mmx::vnx_native_type_code_Node_start_sync_return; } void type<::mmx::Node_start_sync_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_start_sync_return()); } void type<::mmx::Node_start_sync_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_start_sync_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_validate>::get_type_code() { return mmx::vnx_native_type_code_Node_validate; } void type<::mmx::Node_validate>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_validate()); } void type<::mmx::Node_validate>::create_dynamic_code(std::vector& code, const ::mmx::Node_validate& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_validate_return>::get_type_code() { return mmx::vnx_native_type_code_Node_validate_return; } void type<::mmx::Node_validate_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_validate_return()); } void type<::mmx::Node_validate_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_validate_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_verify_partial>::get_type_code() { return mmx::vnx_native_type_code_Node_verify_partial; } void type<::mmx::Node_verify_partial>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_verify_partial()); } void type<::mmx::Node_verify_partial>::create_dynamic_code(std::vector& code, const ::mmx::Node_verify_partial& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_verify_partial_return>::get_type_code() { return mmx::vnx_native_type_code_Node_verify_partial_return; } void type<::mmx::Node_verify_partial_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_verify_partial_return()); } void type<::mmx::Node_verify_partial_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_verify_partial_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_verify_plot_nft_target>::get_type_code() { return mmx::vnx_native_type_code_Node_verify_plot_nft_target; } void type<::mmx::Node_verify_plot_nft_target>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_verify_plot_nft_target()); } void type<::mmx::Node_verify_plot_nft_target>::create_dynamic_code(std::vector& code, const ::mmx::Node_verify_plot_nft_target& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Node_verify_plot_nft_target_return>::get_type_code() { return mmx::vnx_native_type_code_Node_verify_plot_nft_target_return; } void type<::mmx::Node_verify_plot_nft_target_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Node_verify_plot_nft_target_return()); } void type<::mmx::Node_verify_plot_nft_target_return>::create_dynamic_code(std::vector& code, const ::mmx::Node_verify_plot_nft_target_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Operation>::get_type_code() { return mmx::vnx_native_type_code_Operation; } void type<::mmx::Operation>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Operation()); } void type<::mmx::Operation>::create_dynamic_code(std::vector& code, const ::mmx::Operation& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Partial>::get_type_code() { return mmx::vnx_native_type_code_Partial; } void type<::mmx::Partial>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Partial()); } void type<::mmx::Partial>::create_dynamic_code(std::vector& code, const ::mmx::Partial& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::PeerInfo>::get_type_code() { return mmx::vnx_native_type_code_PeerInfo; } void type<::mmx::PeerInfo>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::PeerInfo()); } void type<::mmx::PeerInfo>::create_dynamic_code(std::vector& code, const ::mmx::PeerInfo& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::PlotHeader>::get_type_code() { return mmx::vnx_native_type_code_PlotHeader; } void type<::mmx::PlotHeader>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::PlotHeader()); } void type<::mmx::PlotHeader>::create_dynamic_code(std::vector& code, const ::mmx::PlotHeader& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofOfSpace>::get_type_code() { return mmx::vnx_native_type_code_ProofOfSpace; } void type<::mmx::ProofOfSpace>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofOfSpace()); } void type<::mmx::ProofOfSpace>::create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpace& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofOfSpaceNFT>::get_type_code() { return mmx::vnx_native_type_code_ProofOfSpaceNFT; } void type<::mmx::ProofOfSpaceNFT>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofOfSpaceNFT()); } void type<::mmx::ProofOfSpaceNFT>::create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpaceNFT& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofOfSpaceOG>::get_type_code() { return mmx::vnx_native_type_code_ProofOfSpaceOG; } void type<::mmx::ProofOfSpaceOG>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofOfSpaceOG()); } void type<::mmx::ProofOfSpaceOG>::create_dynamic_code(std::vector& code, const ::mmx::ProofOfSpaceOG& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofOfTime>::get_type_code() { return mmx::vnx_native_type_code_ProofOfTime; } void type<::mmx::ProofOfTime>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofOfTime()); } void type<::mmx::ProofOfTime>::create_dynamic_code(std::vector& code, const ::mmx::ProofOfTime& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofResponse>::get_type_code() { return mmx::vnx_native_type_code_ProofResponse; } void type<::mmx::ProofResponse>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofResponse()); } void type<::mmx::ProofResponse>::create_dynamic_code(std::vector& code, const ::mmx::ProofResponse& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofServer_compute>::get_type_code() { return mmx::vnx_native_type_code_ProofServer_compute; } void type<::mmx::ProofServer_compute>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofServer_compute()); } void type<::mmx::ProofServer_compute>::create_dynamic_code(std::vector& code, const ::mmx::ProofServer_compute& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ProofServer_compute_return>::get_type_code() { return mmx::vnx_native_type_code_ProofServer_compute_return; } void type<::mmx::ProofServer_compute_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ProofServer_compute_return()); } void type<::mmx::ProofServer_compute_return>::create_dynamic_code(std::vector& code, const ::mmx::ProofServer_compute_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ReceiveNote>::get_type_code() { return mmx::vnx_native_type_code_ReceiveNote; } void type<::mmx::ReceiveNote>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ReceiveNote()); } void type<::mmx::ReceiveNote>::create_dynamic_code(std::vector& code, const ::mmx::ReceiveNote& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Request>::get_type_code() { return mmx::vnx_native_type_code_Request; } void type<::mmx::Request>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Request()); } void type<::mmx::Request>::create_dynamic_code(std::vector& code, const ::mmx::Request& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Return>::get_type_code() { return mmx::vnx_native_type_code_Return; } void type<::mmx::Return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Return()); } void type<::mmx::Return>::create_dynamic_code(std::vector& code, const ::mmx::Return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_discover>::get_type_code() { return mmx::vnx_native_type_code_Router_discover; } void type<::mmx::Router_discover>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_discover()); } void type<::mmx::Router_discover>::create_dynamic_code(std::vector& code, const ::mmx::Router_discover& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_discover_return>::get_type_code() { return mmx::vnx_native_type_code_Router_discover_return; } void type<::mmx::Router_discover_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_discover_return()); } void type<::mmx::Router_discover_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_discover_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_fetch_block>::get_type_code() { return mmx::vnx_native_type_code_Router_fetch_block; } void type<::mmx::Router_fetch_block>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_fetch_block()); } void type<::mmx::Router_fetch_block>::create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_fetch_block_return>::get_type_code() { return mmx::vnx_native_type_code_Router_fetch_block_return; } void type<::mmx::Router_fetch_block_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_fetch_block_return()); } void type<::mmx::Router_fetch_block_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_fetch_block_at>::get_type_code() { return mmx::vnx_native_type_code_Router_fetch_block_at; } void type<::mmx::Router_fetch_block_at>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_fetch_block_at()); } void type<::mmx::Router_fetch_block_at>::create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_at& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_fetch_block_at_return>::get_type_code() { return mmx::vnx_native_type_code_Router_fetch_block_at_return; } void type<::mmx::Router_fetch_block_at_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_fetch_block_at_return()); } void type<::mmx::Router_fetch_block_at_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_fetch_block_at_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_blocks_at>::get_type_code() { return mmx::vnx_native_type_code_Router_get_blocks_at; } void type<::mmx::Router_get_blocks_at>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_blocks_at()); } void type<::mmx::Router_get_blocks_at>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_blocks_at& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_blocks_at_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_blocks_at_return; } void type<::mmx::Router_get_blocks_at_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_blocks_at_return()); } void type<::mmx::Router_get_blocks_at_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_blocks_at_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_connected_peers>::get_type_code() { return mmx::vnx_native_type_code_Router_get_connected_peers; } void type<::mmx::Router_get_connected_peers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_connected_peers()); } void type<::mmx::Router_get_connected_peers>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_connected_peers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_connected_peers_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_connected_peers_return; } void type<::mmx::Router_get_connected_peers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_connected_peers_return()); } void type<::mmx::Router_get_connected_peers_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_connected_peers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_id>::get_type_code() { return mmx::vnx_native_type_code_Router_get_id; } void type<::mmx::Router_get_id>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_id()); } void type<::mmx::Router_get_id>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_id& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_id_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_id_return; } void type<::mmx::Router_get_id_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_id_return()); } void type<::mmx::Router_get_id_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_id_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_info>::get_type_code() { return mmx::vnx_native_type_code_Router_get_info; } void type<::mmx::Router_get_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_info()); } void type<::mmx::Router_get_info>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_info_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_info_return; } void type<::mmx::Router_get_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_info_return()); } void type<::mmx::Router_get_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_known_peers>::get_type_code() { return mmx::vnx_native_type_code_Router_get_known_peers; } void type<::mmx::Router_get_known_peers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_known_peers()); } void type<::mmx::Router_get_known_peers>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_known_peers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_known_peers_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_known_peers_return; } void type<::mmx::Router_get_known_peers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_known_peers_return()); } void type<::mmx::Router_get_known_peers_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_known_peers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_peer_info>::get_type_code() { return mmx::vnx_native_type_code_Router_get_peer_info; } void type<::mmx::Router_get_peer_info>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_peer_info()); } void type<::mmx::Router_get_peer_info>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_peer_info& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_peer_info_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_peer_info_return; } void type<::mmx::Router_get_peer_info_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_peer_info_return()); } void type<::mmx::Router_get_peer_info_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_peer_info_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_peers>::get_type_code() { return mmx::vnx_native_type_code_Router_get_peers; } void type<::mmx::Router_get_peers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_peers()); } void type<::mmx::Router_get_peers>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_peers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_get_peers_return>::get_type_code() { return mmx::vnx_native_type_code_Router_get_peers_return; } void type<::mmx::Router_get_peers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_get_peers_return()); } void type<::mmx::Router_get_peers_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_get_peers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_kick_peer>::get_type_code() { return mmx::vnx_native_type_code_Router_kick_peer; } void type<::mmx::Router_kick_peer>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_kick_peer()); } void type<::mmx::Router_kick_peer>::create_dynamic_code(std::vector& code, const ::mmx::Router_kick_peer& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_kick_peer_return>::get_type_code() { return mmx::vnx_native_type_code_Router_kick_peer_return; } void type<::mmx::Router_kick_peer_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_kick_peer_return()); } void type<::mmx::Router_kick_peer_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_kick_peer_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_sign_msg>::get_type_code() { return mmx::vnx_native_type_code_Router_sign_msg; } void type<::mmx::Router_sign_msg>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_sign_msg()); } void type<::mmx::Router_sign_msg>::create_dynamic_code(std::vector& code, const ::mmx::Router_sign_msg& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Router_sign_msg_return>::get_type_code() { return mmx::vnx_native_type_code_Router_sign_msg_return; } void type<::mmx::Router_sign_msg_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Router_sign_msg_return()); } void type<::mmx::Router_sign_msg_return>::create_dynamic_code(std::vector& code, const ::mmx::Router_sign_msg_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Solution>::get_type_code() { return mmx::vnx_native_type_code_Solution; } void type<::mmx::Solution>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Solution()); } void type<::mmx::Solution>::create_dynamic_code(std::vector& code, const ::mmx::Solution& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::TimeLord_stop_vdf>::get_type_code() { return mmx::vnx_native_type_code_TimeLord_stop_vdf; } void type<::mmx::TimeLord_stop_vdf>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::TimeLord_stop_vdf()); } void type<::mmx::TimeLord_stop_vdf>::create_dynamic_code(std::vector& code, const ::mmx::TimeLord_stop_vdf& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::TimeLord_stop_vdf_return>::get_type_code() { return mmx::vnx_native_type_code_TimeLord_stop_vdf_return; } void type<::mmx::TimeLord_stop_vdf_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::TimeLord_stop_vdf_return()); } void type<::mmx::TimeLord_stop_vdf_return>::create_dynamic_code(std::vector& code, const ::mmx::TimeLord_stop_vdf_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Transaction>::get_type_code() { return mmx::vnx_native_type_code_Transaction; } void type<::mmx::Transaction>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Transaction()); } void type<::mmx::Transaction>::create_dynamic_code(std::vector& code, const ::mmx::Transaction& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::TransactionBase>::get_type_code() { return mmx::vnx_native_type_code_TransactionBase; } void type<::mmx::TransactionBase>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::TransactionBase()); } void type<::mmx::TransactionBase>::create_dynamic_code(std::vector& code, const ::mmx::TransactionBase& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::VDF_Point>::get_type_code() { return mmx::vnx_native_type_code_VDF_Point; } void type<::mmx::VDF_Point>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::VDF_Point()); } void type<::mmx::VDF_Point>::create_dynamic_code(std::vector& code, const ::mmx::VDF_Point& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ValidatorVote>::get_type_code() { return mmx::vnx_native_type_code_ValidatorVote; } void type<::mmx::ValidatorVote>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ValidatorVote()); } void type<::mmx::ValidatorVote>::create_dynamic_code(std::vector& code, const ::mmx::ValidatorVote& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_accept_offer>::get_type_code() { return mmx::vnx_native_type_code_Wallet_accept_offer; } void type<::mmx::Wallet_accept_offer>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_accept_offer()); } void type<::mmx::Wallet_accept_offer>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_accept_offer& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_accept_offer_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_accept_offer_return; } void type<::mmx::Wallet_accept_offer_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_accept_offer_return()); } void type<::mmx::Wallet_accept_offer_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_accept_offer_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_add_account>::get_type_code() { return mmx::vnx_native_type_code_Wallet_add_account; } void type<::mmx::Wallet_add_account>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_add_account()); } void type<::mmx::Wallet_add_account>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_account& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_add_account_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_add_account_return; } void type<::mmx::Wallet_add_account_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_add_account_return()); } void type<::mmx::Wallet_add_account_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_account_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_add_token>::get_type_code() { return mmx::vnx_native_type_code_Wallet_add_token; } void type<::mmx::Wallet_add_token>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_add_token()); } void type<::mmx::Wallet_add_token>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_token& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_add_token_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_add_token_return; } void type<::mmx::Wallet_add_token_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_add_token_return()); } void type<::mmx::Wallet_add_token_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_add_token_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_cancel_offer>::get_type_code() { return mmx::vnx_native_type_code_Wallet_cancel_offer; } void type<::mmx::Wallet_cancel_offer>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_cancel_offer()); } void type<::mmx::Wallet_cancel_offer>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_cancel_offer& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_cancel_offer_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_cancel_offer_return; } void type<::mmx::Wallet_cancel_offer_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_cancel_offer_return()); } void type<::mmx::Wallet_cancel_offer_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_cancel_offer_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_complete>::get_type_code() { return mmx::vnx_native_type_code_Wallet_complete; } void type<::mmx::Wallet_complete>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_complete()); } void type<::mmx::Wallet_complete>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_complete& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_complete_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_complete_return; } void type<::mmx::Wallet_complete_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_complete_return()); } void type<::mmx::Wallet_complete_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_complete_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_create_account>::get_type_code() { return mmx::vnx_native_type_code_Wallet_create_account; } void type<::mmx::Wallet_create_account>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_create_account()); } void type<::mmx::Wallet_create_account>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_account& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_create_account_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_create_account_return; } void type<::mmx::Wallet_create_account_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_create_account_return()); } void type<::mmx::Wallet_create_account_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_account_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_create_wallet>::get_type_code() { return mmx::vnx_native_type_code_Wallet_create_wallet; } void type<::mmx::Wallet_create_wallet>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_create_wallet()); } void type<::mmx::Wallet_create_wallet>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_wallet& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_create_wallet_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_create_wallet_return; } void type<::mmx::Wallet_create_wallet_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_create_wallet_return()); } void type<::mmx::Wallet_create_wallet_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_create_wallet_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_deploy>::get_type_code() { return mmx::vnx_native_type_code_Wallet_deploy; } void type<::mmx::Wallet_deploy>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_deploy()); } void type<::mmx::Wallet_deploy>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_deploy& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_deploy_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_deploy_return; } void type<::mmx::Wallet_deploy_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_deploy_return()); } void type<::mmx::Wallet_deploy_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_deploy_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_deposit>::get_type_code() { return mmx::vnx_native_type_code_Wallet_deposit; } void type<::mmx::Wallet_deposit>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_deposit()); } void type<::mmx::Wallet_deposit>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_deposit& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_deposit_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_deposit_return; } void type<::mmx::Wallet_deposit_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_deposit_return()); } void type<::mmx::Wallet_deposit_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_deposit_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_execute>::get_type_code() { return mmx::vnx_native_type_code_Wallet_execute; } void type<::mmx::Wallet_execute>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_execute()); } void type<::mmx::Wallet_execute>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_execute& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_execute_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_execute_return; } void type<::mmx::Wallet_execute_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_execute_return()); } void type<::mmx::Wallet_execute_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_execute_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_export_wallet>::get_type_code() { return mmx::vnx_native_type_code_Wallet_export_wallet; } void type<::mmx::Wallet_export_wallet>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_export_wallet()); } void type<::mmx::Wallet_export_wallet>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_export_wallet& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_export_wallet_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_export_wallet_return; } void type<::mmx::Wallet_export_wallet_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_export_wallet_return()); } void type<::mmx::Wallet_export_wallet_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_export_wallet_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_find_wallet_by_addr>::get_type_code() { return mmx::vnx_native_type_code_Wallet_find_wallet_by_addr; } void type<::mmx::Wallet_find_wallet_by_addr>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_find_wallet_by_addr()); } void type<::mmx::Wallet_find_wallet_by_addr>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_find_wallet_by_addr& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_find_wallet_by_addr_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_find_wallet_by_addr_return; } void type<::mmx::Wallet_find_wallet_by_addr_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_find_wallet_by_addr_return()); } void type<::mmx::Wallet_find_wallet_by_addr_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_find_wallet_by_addr_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_gather_inputs_for>::get_type_code() { return mmx::vnx_native_type_code_Wallet_gather_inputs_for; } void type<::mmx::Wallet_gather_inputs_for>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_gather_inputs_for()); } void type<::mmx::Wallet_gather_inputs_for>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_gather_inputs_for& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_gather_inputs_for_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_gather_inputs_for_return; } void type<::mmx::Wallet_gather_inputs_for_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_gather_inputs_for_return()); } void type<::mmx::Wallet_gather_inputs_for_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_gather_inputs_for_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_account>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_account; } void type<::mmx::Wallet_get_account>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_account()); } void type<::mmx::Wallet_get_account>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_account& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_account_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_account_return; } void type<::mmx::Wallet_get_account_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_account_return()); } void type<::mmx::Wallet_get_account_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_account_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_address>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_address; } void type<::mmx::Wallet_get_address>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_address()); } void type<::mmx::Wallet_get_address>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_address& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_address_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_address_return; } void type<::mmx::Wallet_get_address_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_address_return()); } void type<::mmx::Wallet_get_address_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_address_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_accounts>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_accounts; } void type<::mmx::Wallet_get_all_accounts>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_accounts()); } void type<::mmx::Wallet_get_all_accounts>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_accounts& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_accounts_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_accounts_return; } void type<::mmx::Wallet_get_all_accounts_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_accounts_return()); } void type<::mmx::Wallet_get_all_accounts_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_accounts_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_addresses>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_addresses; } void type<::mmx::Wallet_get_all_addresses>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_addresses()); } void type<::mmx::Wallet_get_all_addresses>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_addresses& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_addresses_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_addresses_return; } void type<::mmx::Wallet_get_all_addresses_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_addresses_return()); } void type<::mmx::Wallet_get_all_addresses_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_addresses_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_farmer_keys>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_farmer_keys; } void type<::mmx::Wallet_get_all_farmer_keys>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_farmer_keys()); } void type<::mmx::Wallet_get_all_farmer_keys>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_farmer_keys& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_all_farmer_keys_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_all_farmer_keys_return; } void type<::mmx::Wallet_get_all_farmer_keys_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_all_farmer_keys_return()); } void type<::mmx::Wallet_get_all_farmer_keys_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_all_farmer_keys_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_balance>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_balance; } void type<::mmx::Wallet_get_balance>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_balance()); } void type<::mmx::Wallet_get_balance>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balance& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_balance_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_balance_return; } void type<::mmx::Wallet_get_balance_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_balance_return()); } void type<::mmx::Wallet_get_balance_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balance_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_balances>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_balances; } void type<::mmx::Wallet_get_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_balances()); } void type<::mmx::Wallet_get_balances>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_balances_return; } void type<::mmx::Wallet_get_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_balances_return()); } void type<::mmx::Wallet_get_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contract_balances>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contract_balances; } void type<::mmx::Wallet_get_contract_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contract_balances()); } void type<::mmx::Wallet_get_contract_balances>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contract_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contract_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contract_balances_return; } void type<::mmx::Wallet_get_contract_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contract_balances_return()); } void type<::mmx::Wallet_get_contract_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contract_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contracts>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contracts; } void type<::mmx::Wallet_get_contracts>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contracts()); } void type<::mmx::Wallet_get_contracts>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contracts_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contracts_return; } void type<::mmx::Wallet_get_contracts_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contracts_return()); } void type<::mmx::Wallet_get_contracts_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contracts_owned>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contracts_owned; } void type<::mmx::Wallet_get_contracts_owned>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contracts_owned()); } void type<::mmx::Wallet_get_contracts_owned>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_owned& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_contracts_owned_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_contracts_owned_return; } void type<::mmx::Wallet_get_contracts_owned_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_contracts_owned_return()); } void type<::mmx::Wallet_get_contracts_owned_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_contracts_owned_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_farmer_keys>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_farmer_keys; } void type<::mmx::Wallet_get_farmer_keys>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_farmer_keys()); } void type<::mmx::Wallet_get_farmer_keys>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_farmer_keys& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_farmer_keys_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_farmer_keys_return; } void type<::mmx::Wallet_get_farmer_keys_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_farmer_keys_return()); } void type<::mmx::Wallet_get_farmer_keys_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_farmer_keys_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_history>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_history; } void type<::mmx::Wallet_get_history>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_history()); } void type<::mmx::Wallet_get_history>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_history& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_history_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_history_return; } void type<::mmx::Wallet_get_history_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_history_return()); } void type<::mmx::Wallet_get_history_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_history_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_master_seed>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_master_seed; } void type<::mmx::Wallet_get_master_seed>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_master_seed()); } void type<::mmx::Wallet_get_master_seed>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_master_seed& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_master_seed_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_master_seed_return; } void type<::mmx::Wallet_get_master_seed_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_master_seed_return()); } void type<::mmx::Wallet_get_master_seed_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_master_seed_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_mnemonic_seed>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_mnemonic_seed; } void type<::mmx::Wallet_get_mnemonic_seed>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_mnemonic_seed()); } void type<::mmx::Wallet_get_mnemonic_seed>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_seed& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_mnemonic_seed_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_mnemonic_seed_return; } void type<::mmx::Wallet_get_mnemonic_seed_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_mnemonic_seed_return()); } void type<::mmx::Wallet_get_mnemonic_seed_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_seed_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_mnemonic_wordlist>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist; } void type<::mmx::Wallet_get_mnemonic_wordlist>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_mnemonic_wordlist()); } void type<::mmx::Wallet_get_mnemonic_wordlist>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_wordlist& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_mnemonic_wordlist_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_mnemonic_wordlist_return; } void type<::mmx::Wallet_get_mnemonic_wordlist_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_mnemonic_wordlist_return()); } void type<::mmx::Wallet_get_mnemonic_wordlist_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_mnemonic_wordlist_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_offers>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_offers; } void type<::mmx::Wallet_get_offers>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_offers()); } void type<::mmx::Wallet_get_offers>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_offers& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_offers_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_offers_return; } void type<::mmx::Wallet_get_offers_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_offers_return()); } void type<::mmx::Wallet_get_offers_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_offers_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_swap_liquidity>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_swap_liquidity; } void type<::mmx::Wallet_get_swap_liquidity>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_swap_liquidity()); } void type<::mmx::Wallet_get_swap_liquidity>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_swap_liquidity& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_swap_liquidity_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_swap_liquidity_return; } void type<::mmx::Wallet_get_swap_liquidity_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_swap_liquidity_return()); } void type<::mmx::Wallet_get_swap_liquidity_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_swap_liquidity_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_token_list>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_token_list; } void type<::mmx::Wallet_get_token_list>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_token_list()); } void type<::mmx::Wallet_get_token_list>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_token_list& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_token_list_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_token_list_return; } void type<::mmx::Wallet_get_token_list_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_token_list_return()); } void type<::mmx::Wallet_get_token_list_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_token_list_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_total_balances>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_total_balances; } void type<::mmx::Wallet_get_total_balances>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_total_balances()); } void type<::mmx::Wallet_get_total_balances>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_total_balances& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_total_balances_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_total_balances_return; } void type<::mmx::Wallet_get_total_balances_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_total_balances_return()); } void type<::mmx::Wallet_get_total_balances_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_total_balances_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_tx_log>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_tx_log; } void type<::mmx::Wallet_get_tx_log>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_tx_log()); } void type<::mmx::Wallet_get_tx_log>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_tx_log& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_get_tx_log_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_get_tx_log_return; } void type<::mmx::Wallet_get_tx_log_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_get_tx_log_return()); } void type<::mmx::Wallet_get_tx_log_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_get_tx_log_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_import_wallet>::get_type_code() { return mmx::vnx_native_type_code_Wallet_import_wallet; } void type<::mmx::Wallet_import_wallet>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_import_wallet()); } void type<::mmx::Wallet_import_wallet>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_import_wallet& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_import_wallet_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_import_wallet_return; } void type<::mmx::Wallet_import_wallet_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_import_wallet_return()); } void type<::mmx::Wallet_import_wallet_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_import_wallet_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_is_locked>::get_type_code() { return mmx::vnx_native_type_code_Wallet_is_locked; } void type<::mmx::Wallet_is_locked>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_is_locked()); } void type<::mmx::Wallet_is_locked>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_is_locked& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_is_locked_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_is_locked_return; } void type<::mmx::Wallet_is_locked_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_is_locked_return()); } void type<::mmx::Wallet_is_locked_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_is_locked_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_lock>::get_type_code() { return mmx::vnx_native_type_code_Wallet_lock; } void type<::mmx::Wallet_lock>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_lock()); } void type<::mmx::Wallet_lock>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_lock& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_lock_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_lock_return; } void type<::mmx::Wallet_lock_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_lock_return()); } void type<::mmx::Wallet_lock_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_lock_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_make_offer>::get_type_code() { return mmx::vnx_native_type_code_Wallet_make_offer; } void type<::mmx::Wallet_make_offer>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_make_offer()); } void type<::mmx::Wallet_make_offer>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_make_offer& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_make_offer_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_make_offer_return; } void type<::mmx::Wallet_make_offer_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_make_offer_return()); } void type<::mmx::Wallet_make_offer_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_make_offer_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_mark_spent>::get_type_code() { return mmx::vnx_native_type_code_Wallet_mark_spent; } void type<::mmx::Wallet_mark_spent>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_mark_spent()); } void type<::mmx::Wallet_mark_spent>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_mark_spent& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_mark_spent_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_mark_spent_return; } void type<::mmx::Wallet_mark_spent_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_mark_spent_return()); } void type<::mmx::Wallet_mark_spent_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_mark_spent_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_offer_trade>::get_type_code() { return mmx::vnx_native_type_code_Wallet_offer_trade; } void type<::mmx::Wallet_offer_trade>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_offer_trade()); } void type<::mmx::Wallet_offer_trade>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_trade& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_offer_trade_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_offer_trade_return; } void type<::mmx::Wallet_offer_trade_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_offer_trade_return()); } void type<::mmx::Wallet_offer_trade_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_trade_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_offer_withdraw>::get_type_code() { return mmx::vnx_native_type_code_Wallet_offer_withdraw; } void type<::mmx::Wallet_offer_withdraw>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_offer_withdraw()); } void type<::mmx::Wallet_offer_withdraw>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_withdraw& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_offer_withdraw_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_offer_withdraw_return; } void type<::mmx::Wallet_offer_withdraw_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_offer_withdraw_return()); } void type<::mmx::Wallet_offer_withdraw_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_offer_withdraw_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_plotnft_create>::get_type_code() { return mmx::vnx_native_type_code_Wallet_plotnft_create; } void type<::mmx::Wallet_plotnft_create>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_plotnft_create()); } void type<::mmx::Wallet_plotnft_create>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_create& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_plotnft_create_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_plotnft_create_return; } void type<::mmx::Wallet_plotnft_create_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_plotnft_create_return()); } void type<::mmx::Wallet_plotnft_create_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_create_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_plotnft_exec>::get_type_code() { return mmx::vnx_native_type_code_Wallet_plotnft_exec; } void type<::mmx::Wallet_plotnft_exec>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_plotnft_exec()); } void type<::mmx::Wallet_plotnft_exec>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_exec& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_plotnft_exec_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_plotnft_exec_return; } void type<::mmx::Wallet_plotnft_exec_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_plotnft_exec_return()); } void type<::mmx::Wallet_plotnft_exec_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_plotnft_exec_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_release>::get_type_code() { return mmx::vnx_native_type_code_Wallet_release; } void type<::mmx::Wallet_release>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_release()); } void type<::mmx::Wallet_release>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_release& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_release_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_release_return; } void type<::mmx::Wallet_release_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_release_return()); } void type<::mmx::Wallet_release_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_release_all>::get_type_code() { return mmx::vnx_native_type_code_Wallet_release_all; } void type<::mmx::Wallet_release_all>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_release_all()); } void type<::mmx::Wallet_release_all>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_all& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_release_all_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_release_all_return; } void type<::mmx::Wallet_release_all_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_release_all_return()); } void type<::mmx::Wallet_release_all_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_release_all_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_rem_token>::get_type_code() { return mmx::vnx_native_type_code_Wallet_rem_token; } void type<::mmx::Wallet_rem_token>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_rem_token()); } void type<::mmx::Wallet_rem_token>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_rem_token& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_rem_token_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_rem_token_return; } void type<::mmx::Wallet_rem_token_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_rem_token_return()); } void type<::mmx::Wallet_rem_token_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_rem_token_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_remove_account>::get_type_code() { return mmx::vnx_native_type_code_Wallet_remove_account; } void type<::mmx::Wallet_remove_account>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_remove_account()); } void type<::mmx::Wallet_remove_account>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_remove_account& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_remove_account_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_remove_account_return; } void type<::mmx::Wallet_remove_account_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_remove_account_return()); } void type<::mmx::Wallet_remove_account_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_remove_account_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_reserve>::get_type_code() { return mmx::vnx_native_type_code_Wallet_reserve; } void type<::mmx::Wallet_reserve>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_reserve()); } void type<::mmx::Wallet_reserve>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_reserve& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_reserve_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_reserve_return; } void type<::mmx::Wallet_reserve_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_reserve_return()); } void type<::mmx::Wallet_reserve_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_reserve_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_reset_cache>::get_type_code() { return mmx::vnx_native_type_code_Wallet_reset_cache; } void type<::mmx::Wallet_reset_cache>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_reset_cache()); } void type<::mmx::Wallet_reset_cache>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_reset_cache& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_reset_cache_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_reset_cache_return; } void type<::mmx::Wallet_reset_cache_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_reset_cache_return()); } void type<::mmx::Wallet_reset_cache_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_reset_cache_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send; } void type<::mmx::Wallet_send>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send()); } void type<::mmx::Wallet_send>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_return; } void type<::mmx::Wallet_send_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_return()); } void type<::mmx::Wallet_send_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_from>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_from; } void type<::mmx::Wallet_send_from>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_from()); } void type<::mmx::Wallet_send_from>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_from& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_from_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_from_return; } void type<::mmx::Wallet_send_from_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_from_return()); } void type<::mmx::Wallet_send_from_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_from_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_many>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_many; } void type<::mmx::Wallet_send_many>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_many()); } void type<::mmx::Wallet_send_many>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_many& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_many_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_many_return; } void type<::mmx::Wallet_send_many_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_many_return()); } void type<::mmx::Wallet_send_many_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_many_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_off>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_off; } void type<::mmx::Wallet_send_off>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_off()); } void type<::mmx::Wallet_send_off>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_off& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_send_off_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_send_off_return; } void type<::mmx::Wallet_send_off_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_send_off_return()); } void type<::mmx::Wallet_send_off_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_send_off_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_set_address_count>::get_type_code() { return mmx::vnx_native_type_code_Wallet_set_address_count; } void type<::mmx::Wallet_set_address_count>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_set_address_count()); } void type<::mmx::Wallet_set_address_count>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_set_address_count& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_set_address_count_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_set_address_count_return; } void type<::mmx::Wallet_set_address_count_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_set_address_count_return()); } void type<::mmx::Wallet_set_address_count_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_set_address_count_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_sign_msg>::get_type_code() { return mmx::vnx_native_type_code_Wallet_sign_msg; } void type<::mmx::Wallet_sign_msg>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_sign_msg()); } void type<::mmx::Wallet_sign_msg>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_msg& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_sign_msg_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_sign_msg_return; } void type<::mmx::Wallet_sign_msg_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_sign_msg_return()); } void type<::mmx::Wallet_sign_msg_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_msg_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_sign_off>::get_type_code() { return mmx::vnx_native_type_code_Wallet_sign_off; } void type<::mmx::Wallet_sign_off>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_sign_off()); } void type<::mmx::Wallet_sign_off>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_off& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_sign_off_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_sign_off_return; } void type<::mmx::Wallet_sign_off_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_sign_off_return()); } void type<::mmx::Wallet_sign_off_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_sign_off_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_add_liquid>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_add_liquid; } void type<::mmx::Wallet_swap_add_liquid>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_add_liquid()); } void type<::mmx::Wallet_swap_add_liquid>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_add_liquid& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_add_liquid_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_add_liquid_return; } void type<::mmx::Wallet_swap_add_liquid_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_add_liquid_return()); } void type<::mmx::Wallet_swap_add_liquid_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_add_liquid_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_rem_liquid>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_rem_liquid; } void type<::mmx::Wallet_swap_rem_liquid>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_rem_liquid()); } void type<::mmx::Wallet_swap_rem_liquid>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_rem_liquid& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_rem_liquid_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_rem_liquid_return; } void type<::mmx::Wallet_swap_rem_liquid_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_rem_liquid_return()); } void type<::mmx::Wallet_swap_rem_liquid_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_rem_liquid_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_trade>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_trade; } void type<::mmx::Wallet_swap_trade>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_trade()); } void type<::mmx::Wallet_swap_trade>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_trade& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_swap_trade_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_swap_trade_return; } void type<::mmx::Wallet_swap_trade_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_swap_trade_return()); } void type<::mmx::Wallet_swap_trade_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_swap_trade_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_unlock>::get_type_code() { return mmx::vnx_native_type_code_Wallet_unlock; } void type<::mmx::Wallet_unlock>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_unlock()); } void type<::mmx::Wallet_unlock>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_unlock& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_unlock_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_unlock_return; } void type<::mmx::Wallet_unlock_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_unlock_return()); } void type<::mmx::Wallet_unlock_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_unlock_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_update_cache>::get_type_code() { return mmx::vnx_native_type_code_Wallet_update_cache; } void type<::mmx::Wallet_update_cache>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_update_cache()); } void type<::mmx::Wallet_update_cache>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_update_cache& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::Wallet_update_cache_return>::get_type_code() { return mmx::vnx_native_type_code_Wallet_update_cache_return; } void type<::mmx::Wallet_update_cache_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::Wallet_update_cache_return()); } void type<::mmx::Wallet_update_cache_return>::create_dynamic_code(std::vector& code, const ::mmx::Wallet_update_cache_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::WalletFile>::get_type_code() { return mmx::vnx_native_type_code_WalletFile; } void type<::mmx::WalletFile>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::WalletFile()); } void type<::mmx::WalletFile>::create_dynamic_code(std::vector& code, const ::mmx::WalletFile& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::WebAPI_shutdown>::get_type_code() { return mmx::vnx_native_type_code_WebAPI_shutdown; } void type<::mmx::WebAPI_shutdown>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::WebAPI_shutdown()); } void type<::mmx::WebAPI_shutdown>::create_dynamic_code(std::vector& code, const ::mmx::WebAPI_shutdown& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::WebAPI_shutdown_return>::get_type_code() { return mmx::vnx_native_type_code_WebAPI_shutdown_return; } void type<::mmx::WebAPI_shutdown_return>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::WebAPI_shutdown_return()); } void type<::mmx::WebAPI_shutdown_return>::create_dynamic_code(std::vector& code, const ::mmx::WebAPI_shutdown_return& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::account_info_t>::get_type_code() { return mmx::vnx_native_type_code_account_info_t; } void type<::mmx::account_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::account_info_t()); } void type<::mmx::account_info_t>::create_dynamic_code(std::vector& code, const ::mmx::account_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::account_t>::get_type_code() { return mmx::vnx_native_type_code_account_t; } void type<::mmx::account_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::account_t()); } void type<::mmx::account_t>::create_dynamic_code(std::vector& code, const ::mmx::account_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::addr_t>::get_type_code() { return nullptr; } void type<::mmx::addr_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::addr_t()); } void type<::mmx::addr_t>::create_dynamic_code(std::vector& code, const ::mmx::addr_t& value, bool special) { const std::vector tmp = {11, 32, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::balance_t>::get_type_code() { return mmx::vnx_native_type_code_balance_t; } void type<::mmx::balance_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::balance_t()); } void type<::mmx::balance_t>::create_dynamic_code(std::vector& code, const ::mmx::balance_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::block_index_t>::get_type_code() { return mmx::vnx_native_type_code_block_index_t; } void type<::mmx::block_index_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::block_index_t()); } void type<::mmx::block_index_t>::create_dynamic_code(std::vector& code, const ::mmx::block_index_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::compile_flags_t>::get_type_code() { return mmx::vnx_native_type_code_compile_flags_t; } void type<::mmx::compile_flags_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::compile_flags_t()); } void type<::mmx::compile_flags_t>::create_dynamic_code(std::vector& code, const ::mmx::compile_flags_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::error_code_e>::get_type_code() { return mmx::vnx_native_type_code_error_code_e; } void type<::mmx::error_code_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::error_code_e()); } void type<::mmx::error_code_e>::create_dynamic_code(std::vector& code, const ::mmx::error_code_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::exec_entry_t>::get_type_code() { return mmx::vnx_native_type_code_exec_entry_t; } void type<::mmx::exec_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::exec_entry_t()); } void type<::mmx::exec_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::exec_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::exec_error_t>::get_type_code() { return mmx::vnx_native_type_code_exec_error_t; } void type<::mmx::exec_error_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::exec_error_t()); } void type<::mmx::exec_error_t>::create_dynamic_code(std::vector& code, const ::mmx::exec_error_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::exec_result_t>::get_type_code() { return mmx::vnx_native_type_code_exec_result_t; } void type<::mmx::exec_result_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::exec_result_t()); } void type<::mmx::exec_result_t>::create_dynamic_code(std::vector& code, const ::mmx::exec_result_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::farmed_block_info_t>::get_type_code() { return mmx::vnx_native_type_code_farmed_block_info_t; } void type<::mmx::farmed_block_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::farmed_block_info_t()); } void type<::mmx::farmed_block_info_t>::create_dynamic_code(std::vector& code, const ::mmx::farmed_block_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::farmed_block_summary_t>::get_type_code() { return mmx::vnx_native_type_code_farmed_block_summary_t; } void type<::mmx::farmed_block_summary_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::farmed_block_summary_t()); } void type<::mmx::farmed_block_summary_t>::create_dynamic_code(std::vector& code, const ::mmx::farmed_block_summary_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::fixed128>::get_type_code() { return nullptr; } void type<::mmx::fixed128>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::fixed128()); } void type<::mmx::fixed128>::create_dynamic_code(std::vector& code, const ::mmx::fixed128& value, bool special) { const std::vector tmp = {11, 16, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::hash_512_t>::get_type_code() { return nullptr; } void type<::mmx::hash_512_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::hash_512_t()); } void type<::mmx::hash_512_t>::create_dynamic_code(std::vector& code, const ::mmx::hash_512_t& value, bool special) { const std::vector tmp = {11, 64, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::hash_t>::get_type_code() { return nullptr; } void type<::mmx::hash_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::hash_t()); } void type<::mmx::hash_t>::create_dynamic_code(std::vector& code, const ::mmx::hash_t& value, bool special) { const std::vector tmp = {11, 32, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::node_info_t>::get_type_code() { return mmx::vnx_native_type_code_node_info_t; } void type<::mmx::node_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::node_info_t()); } void type<::mmx::node_info_t>::create_dynamic_code(std::vector& code, const ::mmx::node_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::node_type_e>::get_type_code() { return mmx::vnx_native_type_code_node_type_e; } void type<::mmx::node_type_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::node_type_e()); } void type<::mmx::node_type_e>::create_dynamic_code(std::vector& code, const ::mmx::node_type_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::offer_data_t>::get_type_code() { return mmx::vnx_native_type_code_offer_data_t; } void type<::mmx::offer_data_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::offer_data_t()); } void type<::mmx::offer_data_t>::create_dynamic_code(std::vector& code, const ::mmx::offer_data_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::peer_info_t>::get_type_code() { return mmx::vnx_native_type_code_peer_info_t; } void type<::mmx::peer_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::peer_info_t()); } void type<::mmx::peer_info_t>::create_dynamic_code(std::vector& code, const ::mmx::peer_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::permission_e>::get_type_code() { return mmx::vnx_native_type_code_permission_e; } void type<::mmx::permission_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::permission_e()); } void type<::mmx::permission_e>::create_dynamic_code(std::vector& code, const ::mmx::permission_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::plot_nft_info_t>::get_type_code() { return mmx::vnx_native_type_code_plot_nft_info_t; } void type<::mmx::plot_nft_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::plot_nft_info_t()); } void type<::mmx::plot_nft_info_t>::create_dynamic_code(std::vector& code, const ::mmx::plot_nft_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::pooling_error_e>::get_type_code() { return mmx::vnx_native_type_code_pooling_error_e; } void type<::mmx::pooling_error_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::pooling_error_e()); } void type<::mmx::pooling_error_e>::create_dynamic_code(std::vector& code, const ::mmx::pooling_error_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::pooling_info_t>::get_type_code() { return mmx::vnx_native_type_code_pooling_info_t; } void type<::mmx::pooling_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::pooling_info_t()); } void type<::mmx::pooling_info_t>::create_dynamic_code(std::vector& code, const ::mmx::pooling_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::pooling_stats_t>::get_type_code() { return mmx::vnx_native_type_code_pooling_stats_t; } void type<::mmx::pooling_stats_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::pooling_stats_t()); } void type<::mmx::pooling_stats_t>::create_dynamic_code(std::vector& code, const ::mmx::pooling_stats_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::pubkey_t>::get_type_code() { return nullptr; } void type<::mmx::pubkey_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::pubkey_t()); } void type<::mmx::pubkey_t>::create_dynamic_code(std::vector& code, const ::mmx::pubkey_t& value, bool special) { const std::vector tmp = {11, 33, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::query_filter_t>::get_type_code() { return mmx::vnx_native_type_code_query_filter_t; } void type<::mmx::query_filter_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::query_filter_t()); } void type<::mmx::query_filter_t>::create_dynamic_code(std::vector& code, const ::mmx::query_filter_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::signature_t>::get_type_code() { return nullptr; } void type<::mmx::signature_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::signature_t()); } void type<::mmx::signature_t>::create_dynamic_code(std::vector& code, const ::mmx::signature_t& value, bool special) { const std::vector tmp = {11, 64, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::skey_t>::get_type_code() { return nullptr; } void type<::mmx::skey_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::skey_t()); } void type<::mmx::skey_t>::create_dynamic_code(std::vector& code, const ::mmx::skey_t& value, bool special) { const std::vector tmp = {11, 32, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::spend_options_t>::get_type_code() { return mmx::vnx_native_type_code_spend_options_t; } void type<::mmx::spend_options_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::spend_options_t()); } void type<::mmx::spend_options_t>::create_dynamic_code(std::vector& code, const ::mmx::spend_options_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::swap_entry_t>::get_type_code() { return mmx::vnx_native_type_code_swap_entry_t; } void type<::mmx::swap_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::swap_entry_t()); } void type<::mmx::swap_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::swap_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::swap_info_t>::get_type_code() { return mmx::vnx_native_type_code_swap_info_t; } void type<::mmx::swap_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::swap_info_t()); } void type<::mmx::swap_info_t>::create_dynamic_code(std::vector& code, const ::mmx::swap_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::swap_pool_info_t>::get_type_code() { return mmx::vnx_native_type_code_swap_pool_info_t; } void type<::mmx::swap_pool_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::swap_pool_info_t()); } void type<::mmx::swap_pool_info_t>::create_dynamic_code(std::vector& code, const ::mmx::swap_pool_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::swap_user_info_t>::get_type_code() { return mmx::vnx_native_type_code_swap_user_info_t; } void type<::mmx::swap_user_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::swap_user_info_t()); } void type<::mmx::swap_user_info_t>::create_dynamic_code(std::vector& code, const ::mmx::swap_user_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::table_entry_t>::get_type_code() { return mmx::vnx_native_type_code_table_entry_t; } void type<::mmx::table_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::table_entry_t()); } void type<::mmx::table_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::table_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::trade_entry_t>::get_type_code() { return mmx::vnx_native_type_code_trade_entry_t; } void type<::mmx::trade_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::trade_entry_t()); } void type<::mmx::trade_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::trade_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::trade_log_t>::get_type_code() { return mmx::vnx_native_type_code_trade_log_t; } void type<::mmx::trade_log_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::trade_log_t()); } void type<::mmx::trade_log_t>::create_dynamic_code(std::vector& code, const ::mmx::trade_log_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::tx_entry_t>::get_type_code() { return mmx::vnx_native_type_code_tx_entry_t; } void type<::mmx::tx_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_entry_t()); } void type<::mmx::tx_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::tx_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::tx_index_t>::get_type_code() { return mmx::vnx_native_type_code_tx_index_t; } void type<::mmx::tx_index_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_index_t()); } void type<::mmx::tx_index_t>::create_dynamic_code(std::vector& code, const ::mmx::tx_index_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::tx_info_t>::get_type_code() { return mmx::vnx_native_type_code_tx_info_t; } void type<::mmx::tx_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_info_t()); } void type<::mmx::tx_info_t>::create_dynamic_code(std::vector& code, const ::mmx::tx_info_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::tx_log_entry_t>::get_type_code() { return mmx::vnx_native_type_code_tx_log_entry_t; } void type<::mmx::tx_log_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_log_entry_t()); } void type<::mmx::tx_log_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::tx_log_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::tx_note_e>::get_type_code() { return mmx::vnx_native_type_code_tx_note_e; } void type<::mmx::tx_note_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_note_e()); } void type<::mmx::tx_note_e>::create_dynamic_code(std::vector& code, const ::mmx::tx_note_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::tx_type_e>::get_type_code() { return mmx::vnx_native_type_code_tx_type_e; } void type<::mmx::tx_type_e>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::tx_type_e()); } void type<::mmx::tx_type_e>::create_dynamic_code(std::vector& code, const ::mmx::tx_type_e& value, bool special) { if(!special || value.is_valid()) { code.push_back(CODE_STRING); } else { code.push_back(CODE_UINT32); } } const TypeCode* type<::mmx::txin_t>::get_type_code() { return mmx::vnx_native_type_code_txin_t; } void type<::mmx::txin_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::txin_t()); } void type<::mmx::txin_t>::create_dynamic_code(std::vector& code, const ::mmx::txin_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::txio_entry_t>::get_type_code() { return mmx::vnx_native_type_code_txio_entry_t; } void type<::mmx::txio_entry_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::txio_entry_t()); } void type<::mmx::txio_entry_t>::create_dynamic_code(std::vector& code, const ::mmx::txio_entry_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::txio_t>::get_type_code() { return mmx::vnx_native_type_code_txio_t; } void type<::mmx::txio_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::txio_t()); } void type<::mmx::txio_t>::create_dynamic_code(std::vector& code, const ::mmx::txio_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::txout_t>::get_type_code() { return mmx::vnx_native_type_code_txout_t; } void type<::mmx::txout_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::txout_t()); } void type<::mmx::txout_t>::create_dynamic_code(std::vector& code, const ::mmx::txout_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::uint128>::get_type_code() { return nullptr; } void type<::mmx::uint128>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::uint128()); } void type<::mmx::uint128>::create_dynamic_code(std::vector& code, const ::mmx::uint128& value, bool special) { const std::vector tmp = {11, 16, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} const TypeCode* type<::mmx::uint_fraction_t>::get_type_code() { return mmx::vnx_native_type_code_uint_fraction_t; } void type<::mmx::uint_fraction_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::uint_fraction_t()); } void type<::mmx::uint_fraction_t>::create_dynamic_code(std::vector& code, const ::mmx::uint_fraction_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::ulong_fraction_t>::get_type_code() { return mmx::vnx_native_type_code_ulong_fraction_t; } void type<::mmx::ulong_fraction_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::ulong_fraction_t()); } void type<::mmx::ulong_fraction_t>::create_dynamic_code(std::vector& code, const ::mmx::ulong_fraction_t& value, bool special) { code.push_back(CODE_OBJECT); } const TypeCode* type<::mmx::virtual_plot_info_t>::get_type_code() { return mmx::vnx_native_type_code_virtual_plot_info_t; } void type<::mmx::virtual_plot_info_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::virtual_plot_info_t()); } void type<::mmx::virtual_plot_info_t>::create_dynamic_code(std::vector& code, const ::mmx::virtual_plot_info_t& value, bool special) { code.push_back(CODE_OBJECT); } } // namespace vnx namespace mmx { void register_all_types() { vnx::register_type_code(::mmx::Block::static_create_type_code()); vnx::register_type_code(::mmx::BlockHeader::static_create_type_code()); vnx::register_type_code(::mmx::ChainParams::static_create_type_code()); vnx::register_type_code(::mmx::Challenge::static_create_type_code()); vnx::register_type_code(::mmx::Contract::static_create_type_code()); vnx::register_type_code(::mmx::FarmInfo::static_create_type_code()); vnx::register_type_code(::mmx::FarmerBase::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_farm_info::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_farm_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_farmer_keys::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_farmer_keys_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_mac_addr::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_mac_addr_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_partial_diff::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_partial_diff_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_partial_diffs::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_get_partial_diffs_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_sign_block::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_sign_block_return::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_sign_vote::static_create_type_code()); vnx::register_type_code(::mmx::Farmer_sign_vote_return::static_create_type_code()); vnx::register_type_code(::mmx::HarvesterBase::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_add_plot_dir::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_add_plot_dir_return::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_get_farm_info::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_get_farm_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_get_total_bytes::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_get_total_bytes_return::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_reload::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_reload_return::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_rem_plot_dir::static_create_type_code()); vnx::register_type_code(::mmx::Harvester_rem_plot_dir_return::static_create_type_code()); vnx::register_type_code(::mmx::IntervalRequest::static_create_type_code()); vnx::register_type_code(::mmx::KeyFile::static_create_type_code()); vnx::register_type_code(::mmx::LookupInfo::static_create_type_code()); vnx::register_type_code(::mmx::NetworkInfo::static_create_type_code()); vnx::register_type_code(::mmx::NodeBase::static_create_type_code()); vnx::register_type_code(::mmx::Node_add_block::static_create_type_code()); vnx::register_type_code(::mmx::Node_add_block_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_add_transaction::static_create_type_code()); vnx::register_type_code(::mmx::Node_add_transaction_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_call_contract::static_create_type_code()); vnx::register_type_code(::mmx::Node_call_contract_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_dump_storage::static_create_type_code()); vnx::register_type_code(::mmx::Node_dump_storage_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_fetch_offers::static_create_type_code()); vnx::register_type_code(::mmx::Node_fetch_offers_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_all_balances::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_all_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_balance::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_balance_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_balances::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_at::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_at_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_hash::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_hash_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_hash_ex::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_block_hash_ex_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract_balances::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract_for::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contract_for_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts_by::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts_by_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts_owned_by::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_contracts_owned_by_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_exec_history::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_exec_history_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmed_block_summary::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmed_block_summary_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmed_blocks::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmed_blocks_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmer_ranking::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_farmer_ranking_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_genesis_hash::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_genesis_hash_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_header::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_header_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_header_at::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_header_at_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_height::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_height_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_history::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_history_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_history_memo::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_history_memo_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_network_info::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_network_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offer::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offer_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offers::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offers_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offers_by::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_offers_by_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_params::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_params_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_plot_nft_info::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_plot_nft_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_plot_nft_target::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_plot_nft_target_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_recent_offers::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_recent_offers_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_recent_offers_for::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_recent_offers_for_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_equivalent_liquidity::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_equivalent_liquidity_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_fees_earned::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_fees_earned_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_history::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_history_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_info::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_liquidity_by::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_liquidity_by_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_trade_estimate::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_trade_estimate_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_user_info::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swap_user_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swaps::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_swaps_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_synced_height::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_synced_height_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_synced_vdf_height::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_synced_vdf_height_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_balance::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_balance_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_balances::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_supply::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_total_supply_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_trade_history::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_trade_history_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_trade_history_for::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_trade_history_for_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_transaction::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_transaction_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_transactions::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_transactions_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_height::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_height_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids_at::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids_at_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids_since::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_ids_since_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_info::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_info_for::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_tx_info_for_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_vdf_height::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_vdf_height_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_vdf_peak::static_create_type_code()); vnx::register_type_code(::mmx::Node_get_vdf_peak_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_array::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_array_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_addr::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_addr_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_string::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_string_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_var::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_entry_var_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_field::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_field_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_map::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_map_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_object::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_object_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_var::static_create_type_code()); vnx::register_type_code(::mmx::Node_read_storage_var_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_revert_sync::static_create_type_code()); vnx::register_type_code(::mmx::Node_revert_sync_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_start_sync::static_create_type_code()); vnx::register_type_code(::mmx::Node_start_sync_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_validate::static_create_type_code()); vnx::register_type_code(::mmx::Node_validate_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_verify_partial::static_create_type_code()); vnx::register_type_code(::mmx::Node_verify_partial_return::static_create_type_code()); vnx::register_type_code(::mmx::Node_verify_plot_nft_target::static_create_type_code()); vnx::register_type_code(::mmx::Node_verify_plot_nft_target_return::static_create_type_code()); vnx::register_type_code(::mmx::Operation::static_create_type_code()); vnx::register_type_code(::mmx::Partial::static_create_type_code()); vnx::register_type_code(::mmx::PeerInfo::static_create_type_code()); vnx::register_type_code(::mmx::PlotHeader::static_create_type_code()); vnx::register_type_code(::mmx::ProofOfSpace::static_create_type_code()); vnx::register_type_code(::mmx::ProofOfSpaceNFT::static_create_type_code()); vnx::register_type_code(::mmx::ProofOfSpaceOG::static_create_type_code()); vnx::register_type_code(::mmx::ProofOfTime::static_create_type_code()); vnx::register_type_code(::mmx::ProofResponse::static_create_type_code()); vnx::register_type_code(::mmx::ProofServerBase::static_create_type_code()); vnx::register_type_code(::mmx::ProofServer_compute::static_create_type_code()); vnx::register_type_code(::mmx::ProofServer_compute_return::static_create_type_code()); vnx::register_type_code(::mmx::ReceiveNote::static_create_type_code()); vnx::register_type_code(::mmx::Request::static_create_type_code()); vnx::register_type_code(::mmx::Return::static_create_type_code()); vnx::register_type_code(::mmx::RouterBase::static_create_type_code()); vnx::register_type_code(::mmx::Router_discover::static_create_type_code()); vnx::register_type_code(::mmx::Router_discover_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_fetch_block::static_create_type_code()); vnx::register_type_code(::mmx::Router_fetch_block_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_fetch_block_at::static_create_type_code()); vnx::register_type_code(::mmx::Router_fetch_block_at_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_blocks_at::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_blocks_at_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_connected_peers::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_connected_peers_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_id::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_id_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_info::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_known_peers::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_known_peers_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_peer_info::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_peer_info_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_peers::static_create_type_code()); vnx::register_type_code(::mmx::Router_get_peers_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_kick_peer::static_create_type_code()); vnx::register_type_code(::mmx::Router_kick_peer_return::static_create_type_code()); vnx::register_type_code(::mmx::Router_sign_msg::static_create_type_code()); vnx::register_type_code(::mmx::Router_sign_msg_return::static_create_type_code()); vnx::register_type_code(::mmx::Solution::static_create_type_code()); vnx::register_type_code(::mmx::TimeLordBase::static_create_type_code()); vnx::register_type_code(::mmx::TimeLord_stop_vdf::static_create_type_code()); vnx::register_type_code(::mmx::TimeLord_stop_vdf_return::static_create_type_code()); vnx::register_type_code(::mmx::Transaction::static_create_type_code()); vnx::register_type_code(::mmx::TransactionBase::static_create_type_code()); vnx::register_type_code(::mmx::VDF_Point::static_create_type_code()); vnx::register_type_code(::mmx::ValidatorVote::static_create_type_code()); vnx::register_type_code(::mmx::WalletBase::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_accept_offer::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_accept_offer_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_add_account::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_add_account_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_add_token::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_add_token_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_cancel_offer::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_cancel_offer_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_complete::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_complete_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_create_account::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_create_account_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_create_wallet::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_create_wallet_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_deploy::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_deploy_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_deposit::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_deposit_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_execute::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_execute_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_export_wallet::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_export_wallet_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_find_wallet_by_addr::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_find_wallet_by_addr_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_gather_inputs_for::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_gather_inputs_for_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_account::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_account_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_address::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_address_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_accounts::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_accounts_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_addresses::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_addresses_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_farmer_keys::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_all_farmer_keys_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_balance::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_balance_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_balances::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contract_balances::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contract_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contracts::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contracts_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contracts_owned::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_contracts_owned_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_farmer_keys::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_farmer_keys_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_history::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_history_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_master_seed::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_master_seed_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_mnemonic_seed::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_mnemonic_seed_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_mnemonic_wordlist::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_mnemonic_wordlist_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_offers::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_offers_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_swap_liquidity::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_swap_liquidity_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_token_list::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_token_list_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_total_balances::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_total_balances_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_tx_log::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_get_tx_log_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_import_wallet::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_import_wallet_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_is_locked::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_is_locked_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_lock::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_lock_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_make_offer::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_make_offer_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_mark_spent::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_mark_spent_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_offer_trade::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_offer_trade_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_offer_withdraw::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_offer_withdraw_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_plotnft_create::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_plotnft_create_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_plotnft_exec::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_plotnft_exec_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_release::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_release_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_release_all::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_release_all_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_rem_token::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_rem_token_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_remove_account::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_remove_account_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_reserve::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_reserve_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_reset_cache::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_reset_cache_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_from::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_from_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_many::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_many_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_off::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_send_off_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_set_address_count::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_set_address_count_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_sign_msg::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_sign_msg_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_sign_off::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_sign_off_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_add_liquid::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_add_liquid_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_rem_liquid::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_rem_liquid_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_trade::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_swap_trade_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_unlock::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_unlock_return::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_update_cache::static_create_type_code()); vnx::register_type_code(::mmx::Wallet_update_cache_return::static_create_type_code()); vnx::register_type_code(::mmx::WalletFile::static_create_type_code()); vnx::register_type_code(::mmx::WebAPIBase::static_create_type_code()); vnx::register_type_code(::mmx::WebAPI_shutdown::static_create_type_code()); vnx::register_type_code(::mmx::WebAPI_shutdown_return::static_create_type_code()); vnx::register_type_code(::mmx::account_info_t::static_create_type_code()); vnx::register_type_code(::mmx::account_t::static_create_type_code()); vnx::register_type_code(::mmx::balance_t::static_create_type_code()); vnx::register_type_code(::mmx::block_index_t::static_create_type_code()); vnx::register_type_code(::mmx::compile_flags_t::static_create_type_code()); vnx::register_type_code(::mmx::error_code_e::static_create_type_code()); vnx::register_type_code(::mmx::exec_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::exec_error_t::static_create_type_code()); vnx::register_type_code(::mmx::exec_result_t::static_create_type_code()); vnx::register_type_code(::mmx::farmed_block_info_t::static_create_type_code()); vnx::register_type_code(::mmx::farmed_block_summary_t::static_create_type_code()); vnx::register_type_code(::mmx::node_info_t::static_create_type_code()); vnx::register_type_code(::mmx::node_type_e::static_create_type_code()); vnx::register_type_code(::mmx::offer_data_t::static_create_type_code()); vnx::register_type_code(::mmx::peer_info_t::static_create_type_code()); vnx::register_type_code(::mmx::permission_e::static_create_type_code()); vnx::register_type_code(::mmx::plot_nft_info_t::static_create_type_code()); vnx::register_type_code(::mmx::pooling_error_e::static_create_type_code()); vnx::register_type_code(::mmx::pooling_info_t::static_create_type_code()); vnx::register_type_code(::mmx::pooling_stats_t::static_create_type_code()); vnx::register_type_code(::mmx::query_filter_t::static_create_type_code()); vnx::register_type_code(::mmx::spend_options_t::static_create_type_code()); vnx::register_type_code(::mmx::swap_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::swap_info_t::static_create_type_code()); vnx::register_type_code(::mmx::swap_pool_info_t::static_create_type_code()); vnx::register_type_code(::mmx::swap_user_info_t::static_create_type_code()); vnx::register_type_code(::mmx::table_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::trade_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::trade_log_t::static_create_type_code()); vnx::register_type_code(::mmx::tx_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::tx_index_t::static_create_type_code()); vnx::register_type_code(::mmx::tx_info_t::static_create_type_code()); vnx::register_type_code(::mmx::tx_log_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::tx_note_e::static_create_type_code()); vnx::register_type_code(::mmx::tx_type_e::static_create_type_code()); vnx::register_type_code(::mmx::txin_t::static_create_type_code()); vnx::register_type_code(::mmx::txio_entry_t::static_create_type_code()); vnx::register_type_code(::mmx::txio_t::static_create_type_code()); vnx::register_type_code(::mmx::txout_t::static_create_type_code()); vnx::register_type_code(::mmx::uint_fraction_t::static_create_type_code()); vnx::register_type_code(::mmx::ulong_fraction_t::static_create_type_code()); vnx::register_type_code(::mmx::virtual_plot_info_t::static_create_type_code()); } static struct vnx_static_init { vnx_static_init() { register_all_types(); } } vnx_static_init_; const vnx::TypeCode* const vnx_native_type_code_Block = vnx::get_type_code(vnx::Hash64(0x94965d816d328467ull)); const vnx::TypeCode* const vnx_native_type_code_BlockHeader = vnx::get_type_code(vnx::Hash64(0xcaae941a2fc712a6ull)); const vnx::TypeCode* const vnx_native_type_code_ChainParams = vnx::get_type_code(vnx::Hash64(0x51bba8d28881e8e7ull)); const vnx::TypeCode* const vnx_native_type_code_Challenge = vnx::get_type_code(vnx::Hash64(0x4bf49f8022405249ull)); const vnx::TypeCode* const vnx_native_type_code_Contract = vnx::get_type_code(vnx::Hash64(0x26b896ae8c415285ull)); const vnx::TypeCode* const vnx_native_type_code_FarmInfo = vnx::get_type_code(vnx::Hash64(0xa2701372b9137f0eull)); const vnx::TypeCode* const vnx_native_type_code_FarmerBase = vnx::get_type_code(vnx::Hash64(0xff732ba14d9d1abull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farm_info = vnx::get_type_code(vnx::Hash64(0x7e72655f6f215b5aull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farm_info_return = vnx::get_type_code(vnx::Hash64(0xccf47453b394d3e3ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farmer_keys = vnx::get_type_code(vnx::Hash64(0x784507b4594a776aull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_farmer_keys_return = vnx::get_type_code(vnx::Hash64(0xdb382c476694095full)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_mac_addr = vnx::get_type_code(vnx::Hash64(0xe9ced9f6feb676b3ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_mac_addr_return = vnx::get_type_code(vnx::Hash64(0x9e4caad2ffaba990ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diff = vnx::get_type_code(vnx::Hash64(0x40f08b90e2eb4ca0ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diff_return = vnx::get_type_code(vnx::Hash64(0xd5650a69bbe8d978ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diffs = vnx::get_type_code(vnx::Hash64(0x8806f6763215c58bull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_get_partial_diffs_return = vnx::get_type_code(vnx::Hash64(0x439549fd31330df6ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_block = vnx::get_type_code(vnx::Hash64(0x6924b10f345eb316ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_block_return = vnx::get_type_code(vnx::Hash64(0xb8acce9269f91310ull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_vote = vnx::get_type_code(vnx::Hash64(0x655117e05d64b5fcull)); const vnx::TypeCode* const vnx_native_type_code_Farmer_sign_vote_return = vnx::get_type_code(vnx::Hash64(0x40848c38fe18b587ull)); const vnx::TypeCode* const vnx_native_type_code_HarvesterBase = vnx::get_type_code(vnx::Hash64(0xc17118896cde1555ull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_add_plot_dir = vnx::get_type_code(vnx::Hash64(0x61714d1c7ecaffddull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_add_plot_dir_return = vnx::get_type_code(vnx::Hash64(0x8b5f7bc4f34fb5d5ull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_get_farm_info = vnx::get_type_code(vnx::Hash64(0x129f91b9ade2891full)); const vnx::TypeCode* const vnx_native_type_code_Harvester_get_farm_info_return = vnx::get_type_code(vnx::Hash64(0x87a91b15ec42441full)); const vnx::TypeCode* const vnx_native_type_code_Harvester_get_total_bytes = vnx::get_type_code(vnx::Hash64(0x36f2104b41d9a25cull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_get_total_bytes_return = vnx::get_type_code(vnx::Hash64(0xd9a9fe83ba7d6918ull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_reload = vnx::get_type_code(vnx::Hash64(0xc67a4577de7e85caull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_reload_return = vnx::get_type_code(vnx::Hash64(0x39fc8cc53bcf4659ull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_rem_plot_dir = vnx::get_type_code(vnx::Hash64(0x57674e56f3ab6076ull)); const vnx::TypeCode* const vnx_native_type_code_Harvester_rem_plot_dir_return = vnx::get_type_code(vnx::Hash64(0xb2a8cfb3633bf358ull)); const vnx::TypeCode* const vnx_native_type_code_IntervalRequest = vnx::get_type_code(vnx::Hash64(0xa4e39be061f13d71ull)); const vnx::TypeCode* const vnx_native_type_code_KeyFile = vnx::get_type_code(vnx::Hash64(0xdf868931a939cba1ull)); const vnx::TypeCode* const vnx_native_type_code_LookupInfo = vnx::get_type_code(vnx::Hash64(0xb7b2ff343487dd63ull)); const vnx::TypeCode* const vnx_native_type_code_NetworkInfo = vnx::get_type_code(vnx::Hash64(0xd984018819746101ull)); const vnx::TypeCode* const vnx_native_type_code_NodeBase = vnx::get_type_code(vnx::Hash64(0x289d7651582d76a3ull)); const vnx::TypeCode* const vnx_native_type_code_Node_add_block = vnx::get_type_code(vnx::Hash64(0x63abca4d23f93894ull)); const vnx::TypeCode* const vnx_native_type_code_Node_add_block_return = vnx::get_type_code(vnx::Hash64(0xb6d1115db03a6d6aull)); const vnx::TypeCode* const vnx_native_type_code_Node_add_transaction = vnx::get_type_code(vnx::Hash64(0xd9782531c0e3f766ull)); const vnx::TypeCode* const vnx_native_type_code_Node_add_transaction_return = vnx::get_type_code(vnx::Hash64(0x2ded8c10e1721ba8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_call_contract = vnx::get_type_code(vnx::Hash64(0x6a21b0dfe3e541e8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_call_contract_return = vnx::get_type_code(vnx::Hash64(0x8449f6656a89f7aeull)); const vnx::TypeCode* const vnx_native_type_code_Node_dump_storage = vnx::get_type_code(vnx::Hash64(0x8b66a712eea839bbull)); const vnx::TypeCode* const vnx_native_type_code_Node_dump_storage_return = vnx::get_type_code(vnx::Hash64(0xbc8c0b1ce37def41ull)); const vnx::TypeCode* const vnx_native_type_code_Node_fetch_offers = vnx::get_type_code(vnx::Hash64(0xfca08ee41b997129ull)); const vnx::TypeCode* const vnx_native_type_code_Node_fetch_offers_return = vnx::get_type_code(vnx::Hash64(0x8c5cc826b759938bull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_all_balances = vnx::get_type_code(vnx::Hash64(0xe099ac5aea49433ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_all_balances_return = vnx::get_type_code(vnx::Hash64(0x80800e710295b3c1ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_balance = vnx::get_type_code(vnx::Hash64(0x2e00172d0470479ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_balance_return = vnx::get_type_code(vnx::Hash64(0xe29d98f8f1ab3e21ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_balances = vnx::get_type_code(vnx::Hash64(0x1c8af02c41e96460ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_balances_return = vnx::get_type_code(vnx::Hash64(0x1e00f02ae6304cf0ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block = vnx::get_type_code(vnx::Hash64(0xeb3fabe56dec161aull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_return = vnx::get_type_code(vnx::Hash64(0x6d9abdbf20c4b4d2ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_at = vnx::get_type_code(vnx::Hash64(0xc69c9f876a00e48full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_at_return = vnx::get_type_code(vnx::Hash64(0x6e3c22a7391c5491ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash = vnx::get_type_code(vnx::Hash64(0x43c5087066b73f38ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_return = vnx::get_type_code(vnx::Hash64(0x47877c5597b978dfull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_ex = vnx::get_type_code(vnx::Hash64(0x6024ae54abca18cbull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_block_hash_ex_return = vnx::get_type_code(vnx::Hash64(0x8d82a7b11dfd7a4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract = vnx::get_type_code(vnx::Hash64(0xa28704c65a67a293ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_return = vnx::get_type_code(vnx::Hash64(0x314d0901de362f8cull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_balances = vnx::get_type_code(vnx::Hash64(0xeb1e66155927b13aull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_balances_return = vnx::get_type_code(vnx::Hash64(0x4974c6093398e264ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_for = vnx::get_type_code(vnx::Hash64(0x6a953dcea83b9832ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contract_for_return = vnx::get_type_code(vnx::Hash64(0xde97319367a6d647ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts = vnx::get_type_code(vnx::Hash64(0x49e218583c1f1c8aull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_return = vnx::get_type_code(vnx::Hash64(0x13d73d6d69c8af0bull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_by = vnx::get_type_code(vnx::Hash64(0xe7c397362a63f57cull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_by_return = vnx::get_type_code(vnx::Hash64(0x9ad1099f1adf2565ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_owned_by = vnx::get_type_code(vnx::Hash64(0x63989a04fee2fba4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_contracts_owned_by_return = vnx::get_type_code(vnx::Hash64(0x3b9dbec85ee482bfull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_exec_history = vnx::get_type_code(vnx::Hash64(0xf17c2f67bedb9df6ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_exec_history_return = vnx::get_type_code(vnx::Hash64(0x17079d265ede8785ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_block_summary = vnx::get_type_code(vnx::Hash64(0xa6cda1247bd4f537ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_block_summary_return = vnx::get_type_code(vnx::Hash64(0xef3dcd5d4d2a58e3ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_blocks = vnx::get_type_code(vnx::Hash64(0xfc412d06ff25542eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmed_blocks_return = vnx::get_type_code(vnx::Hash64(0xe8697ffd381616baull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmer_ranking = vnx::get_type_code(vnx::Hash64(0x548d571d6384bd43ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_farmer_ranking_return = vnx::get_type_code(vnx::Hash64(0xb74e7f1a70a60ecdull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_genesis_hash = vnx::get_type_code(vnx::Hash64(0xbfab786cb64c5a3ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_genesis_hash_return = vnx::get_type_code(vnx::Hash64(0x5c5ea53e3163fd5ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_header = vnx::get_type_code(vnx::Hash64(0xf17a5d0c180db198ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_header_return = vnx::get_type_code(vnx::Hash64(0xeffae31958103da7ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_header_at = vnx::get_type_code(vnx::Hash64(0x52658163d8767c79ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_header_at_return = vnx::get_type_code(vnx::Hash64(0x4efc6897885ee521ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_height = vnx::get_type_code(vnx::Hash64(0x55f0d4ef7a117716ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_height_return = vnx::get_type_code(vnx::Hash64(0x5fb0ff1e11add033ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_history = vnx::get_type_code(vnx::Hash64(0x8b3db05c6e91011dull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_history_return = vnx::get_type_code(vnx::Hash64(0xa925b7aa92603121ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_history_memo = vnx::get_type_code(vnx::Hash64(0x693c0c791039287cull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_history_memo_return = vnx::get_type_code(vnx::Hash64(0x3bba2b40c2e82885ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_network_info = vnx::get_type_code(vnx::Hash64(0x79cedc8662eeb2e4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_network_info_return = vnx::get_type_code(vnx::Hash64(0x28541acc5945ae0eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offer = vnx::get_type_code(vnx::Hash64(0xd3e336e279686563ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offer_return = vnx::get_type_code(vnx::Hash64(0xa92bb7b910e3424full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offers = vnx::get_type_code(vnx::Hash64(0x62e5e37dd72d3175ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_return = vnx::get_type_code(vnx::Hash64(0xf93f5d6546a50db1ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_by = vnx::get_type_code(vnx::Hash64(0xf83c55f59e407411ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_offers_by_return = vnx::get_type_code(vnx::Hash64(0x59efe1350028d6f4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_params = vnx::get_type_code(vnx::Hash64(0x6384b34900c2e465ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_params_return = vnx::get_type_code(vnx::Hash64(0xd0a614f2ed037180ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_info = vnx::get_type_code(vnx::Hash64(0x23efbfd355a3741full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_info_return = vnx::get_type_code(vnx::Hash64(0x4d3661c719d8496bull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_target = vnx::get_type_code(vnx::Hash64(0x14dfd6e2b1f3282eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_plot_nft_target_return = vnx::get_type_code(vnx::Hash64(0x6d6444fd1b89732ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers = vnx::get_type_code(vnx::Hash64(0xfcd729efd0504fdeull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_return = vnx::get_type_code(vnx::Hash64(0x15933813d284d584ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_for = vnx::get_type_code(vnx::Hash64(0xd89f845556eb17a0ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_recent_offers_for_return = vnx::get_type_code(vnx::Hash64(0x8fbaa054b954ea7bull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_equivalent_liquidity = vnx::get_type_code(vnx::Hash64(0xc43a3083725aa480ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_equivalent_liquidity_return = vnx::get_type_code(vnx::Hash64(0x8222183b679ab5f4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_fees_earned = vnx::get_type_code(vnx::Hash64(0x1dae57fb82265b93ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_fees_earned_return = vnx::get_type_code(vnx::Hash64(0x57002afc89a8db98ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_history = vnx::get_type_code(vnx::Hash64(0xc16faaf15fcc9f36ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_history_return = vnx::get_type_code(vnx::Hash64(0xe5d18002a6793518ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_info = vnx::get_type_code(vnx::Hash64(0x14f546a807fae18cull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_info_return = vnx::get_type_code(vnx::Hash64(0x302116742171428ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_liquidity_by = vnx::get_type_code(vnx::Hash64(0x426cded100da751eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_liquidity_by_return = vnx::get_type_code(vnx::Hash64(0x8401973e1930a6c0ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_trade_estimate = vnx::get_type_code(vnx::Hash64(0x1c3d2e0c3a431e9eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_trade_estimate_return = vnx::get_type_code(vnx::Hash64(0xdad9da7cd6d250a8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_user_info = vnx::get_type_code(vnx::Hash64(0xb92b8fb7df56ec0full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swap_user_info_return = vnx::get_type_code(vnx::Hash64(0x50fb0bab9551a420ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swaps = vnx::get_type_code(vnx::Hash64(0x219bbb3e5dcd19eaull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_swaps_return = vnx::get_type_code(vnx::Hash64(0x6c94172788fc0d28ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_height = vnx::get_type_code(vnx::Hash64(0xc4fb44ec3d1a8bb7ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_height_return = vnx::get_type_code(vnx::Hash64(0xd466ce92d1bbe9dbull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_vdf_height = vnx::get_type_code(vnx::Hash64(0x3c9ce92abd3b42c6ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_synced_vdf_height_return = vnx::get_type_code(vnx::Hash64(0x1122764a35c86b4ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balance = vnx::get_type_code(vnx::Hash64(0x91e9019d224db4b0ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balance_return = vnx::get_type_code(vnx::Hash64(0x3336380a894f52a8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balances = vnx::get_type_code(vnx::Hash64(0xf54c4ec46ee6053aull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_balances_return = vnx::get_type_code(vnx::Hash64(0x9332c7a83f7644d7ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_supply = vnx::get_type_code(vnx::Hash64(0x17d971db6900bd9dull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_total_supply_return = vnx::get_type_code(vnx::Hash64(0xe69f15a0766eaf27ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history = vnx::get_type_code(vnx::Hash64(0x62736b035e3995cdull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_return = vnx::get_type_code(vnx::Hash64(0x4d3692b594dd7f9eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_for = vnx::get_type_code(vnx::Hash64(0xd55cda633e3dd5b8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_trade_history_for_return = vnx::get_type_code(vnx::Hash64(0xd61154789cdb246bull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_transaction = vnx::get_type_code(vnx::Hash64(0x9c76ca142292750full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_transaction_return = vnx::get_type_code(vnx::Hash64(0x3848f078ff4024dull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_transactions = vnx::get_type_code(vnx::Hash64(0x715a5bb668426203ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_transactions_return = vnx::get_type_code(vnx::Hash64(0xd11c40a507abaaaull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_height = vnx::get_type_code(vnx::Hash64(0xf6f917fad9361e3aull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_height_return = vnx::get_type_code(vnx::Hash64(0xda69a0d06f4b5c3eull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids = vnx::get_type_code(vnx::Hash64(0xe268e5bf2a7f22d6ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_return = vnx::get_type_code(vnx::Hash64(0xba3ffcf776e64920ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_at = vnx::get_type_code(vnx::Hash64(0x904c686b59c101c3ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_at_return = vnx::get_type_code(vnx::Hash64(0x945565d9cbfadc31ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_since = vnx::get_type_code(vnx::Hash64(0x640af36b555e1606ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_ids_since_return = vnx::get_type_code(vnx::Hash64(0xe5c1511a48d2d288ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info = vnx::get_type_code(vnx::Hash64(0xb5409a3aaa19d1d2ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_return = vnx::get_type_code(vnx::Hash64(0x3668f41cc643227full)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_for = vnx::get_type_code(vnx::Hash64(0xba1c6e6eccfe9369ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_tx_info_for_return = vnx::get_type_code(vnx::Hash64(0xfd527dc84681a04ull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_height = vnx::get_type_code(vnx::Hash64(0x33db3aa655c4e5feull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_height_return = vnx::get_type_code(vnx::Hash64(0x5f83cae2903e53bfull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_peak = vnx::get_type_code(vnx::Hash64(0xf3449b43830283ddull)); const vnx::TypeCode* const vnx_native_type_code_Node_get_vdf_peak_return = vnx::get_type_code(vnx::Hash64(0x837f2b6433a274a1ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage = vnx::get_type_code(vnx::Hash64(0xd74cd2b291cb9cd6ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_return = vnx::get_type_code(vnx::Hash64(0xab73866ba23ed19aull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_array = vnx::get_type_code(vnx::Hash64(0xe5826950ca0a442bull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_array_return = vnx::get_type_code(vnx::Hash64(0xba7fed069216454dull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_addr = vnx::get_type_code(vnx::Hash64(0xffbf8c4478bb5ab5ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_addr_return = vnx::get_type_code(vnx::Hash64(0xacd2f58f1ca8df54ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_string = vnx::get_type_code(vnx::Hash64(0xe5b52723a3714e9full)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_string_return = vnx::get_type_code(vnx::Hash64(0x56c6103ea03d7ceaull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_var = vnx::get_type_code(vnx::Hash64(0xb0ebcc688396e6dbull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_entry_var_return = vnx::get_type_code(vnx::Hash64(0x773a90b50f714a11ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_field = vnx::get_type_code(vnx::Hash64(0xc9a10c9f7f2cef16ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_field_return = vnx::get_type_code(vnx::Hash64(0xf817bcace12b9ef3ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_map = vnx::get_type_code(vnx::Hash64(0x1cc0cc12bc2c1b4eull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_map_return = vnx::get_type_code(vnx::Hash64(0x1d56300164b3e79ull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_object = vnx::get_type_code(vnx::Hash64(0x5930cf36eeb662fbull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_object_return = vnx::get_type_code(vnx::Hash64(0x48c9a69123ef41afull)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_var = vnx::get_type_code(vnx::Hash64(0x16d0361bcb359c2full)); const vnx::TypeCode* const vnx_native_type_code_Node_read_storage_var_return = vnx::get_type_code(vnx::Hash64(0xaaa6685b20943467ull)); const vnx::TypeCode* const vnx_native_type_code_Node_revert_sync = vnx::get_type_code(vnx::Hash64(0x8c1cc38a7a8a6c1dull)); const vnx::TypeCode* const vnx_native_type_code_Node_revert_sync_return = vnx::get_type_code(vnx::Hash64(0x3962a4b86b203e0aull)); const vnx::TypeCode* const vnx_native_type_code_Node_start_sync = vnx::get_type_code(vnx::Hash64(0x6c5be8aeb25ef3c8ull)); const vnx::TypeCode* const vnx_native_type_code_Node_start_sync_return = vnx::get_type_code(vnx::Hash64(0xe75b8e6a62d7e744ull)); const vnx::TypeCode* const vnx_native_type_code_Node_validate = vnx::get_type_code(vnx::Hash64(0x95dbbd65f36b618ull)); const vnx::TypeCode* const vnx_native_type_code_Node_validate_return = vnx::get_type_code(vnx::Hash64(0xe3c465d0fc0c4a4cull)); const vnx::TypeCode* const vnx_native_type_code_Node_verify_partial = vnx::get_type_code(vnx::Hash64(0xeb15396685387f88ull)); const vnx::TypeCode* const vnx_native_type_code_Node_verify_partial_return = vnx::get_type_code(vnx::Hash64(0xb64fb769c6ffcf36ull)); const vnx::TypeCode* const vnx_native_type_code_Node_verify_plot_nft_target = vnx::get_type_code(vnx::Hash64(0xf3ac786edcae50e1ull)); const vnx::TypeCode* const vnx_native_type_code_Node_verify_plot_nft_target_return = vnx::get_type_code(vnx::Hash64(0x82f0f6ed43a0c4bull)); const vnx::TypeCode* const vnx_native_type_code_Operation = vnx::get_type_code(vnx::Hash64(0xfd69dd82e906e619ull)); const vnx::TypeCode* const vnx_native_type_code_Partial = vnx::get_type_code(vnx::Hash64(0x2c849b13a7efd71aull)); const vnx::TypeCode* const vnx_native_type_code_PeerInfo = vnx::get_type_code(vnx::Hash64(0xf7a37f624c94a121ull)); const vnx::TypeCode* const vnx_native_type_code_PlotHeader = vnx::get_type_code(vnx::Hash64(0x299c5790983c47b6ull)); const vnx::TypeCode* const vnx_native_type_code_ProofOfSpace = vnx::get_type_code(vnx::Hash64(0x9269760ad5fd0058ull)); const vnx::TypeCode* const vnx_native_type_code_ProofOfSpaceNFT = vnx::get_type_code(vnx::Hash64(0x22a4d97166711bd9ull)); const vnx::TypeCode* const vnx_native_type_code_ProofOfSpaceOG = vnx::get_type_code(vnx::Hash64(0x6def5518efc37b4ull)); const vnx::TypeCode* const vnx_native_type_code_ProofOfTime = vnx::get_type_code(vnx::Hash64(0xa84a63942b8e5c6aull)); const vnx::TypeCode* const vnx_native_type_code_ProofResponse = vnx::get_type_code(vnx::Hash64(0x816e898b36befae0ull)); const vnx::TypeCode* const vnx_native_type_code_ProofServerBase = vnx::get_type_code(vnx::Hash64(0xa531590f144986a6ull)); const vnx::TypeCode* const vnx_native_type_code_ProofServer_compute = vnx::get_type_code(vnx::Hash64(0x1565fa29d1604750ull)); const vnx::TypeCode* const vnx_native_type_code_ProofServer_compute_return = vnx::get_type_code(vnx::Hash64(0x5b42e049360ce028ull)); const vnx::TypeCode* const vnx_native_type_code_ReceiveNote = vnx::get_type_code(vnx::Hash64(0x30439468cf29fa4bull)); const vnx::TypeCode* const vnx_native_type_code_Request = vnx::get_type_code(vnx::Hash64(0x110ce6958669f66bull)); const vnx::TypeCode* const vnx_native_type_code_Return = vnx::get_type_code(vnx::Hash64(0xb479dce669278664ull)); const vnx::TypeCode* const vnx_native_type_code_RouterBase = vnx::get_type_code(vnx::Hash64(0x952c4ef2956f31c4ull)); const vnx::TypeCode* const vnx_native_type_code_Router_discover = vnx::get_type_code(vnx::Hash64(0xeda51767d96e246cull)); const vnx::TypeCode* const vnx_native_type_code_Router_discover_return = vnx::get_type_code(vnx::Hash64(0xb4e47e012f264f94ull)); const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block = vnx::get_type_code(vnx::Hash64(0x7c2f762681e7cc51ull)); const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_return = vnx::get_type_code(vnx::Hash64(0xcbe76155006bbb44ull)); const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_at = vnx::get_type_code(vnx::Hash64(0xa4deba522ed6f8adull)); const vnx::TypeCode* const vnx_native_type_code_Router_fetch_block_at_return = vnx::get_type_code(vnx::Hash64(0xff711a762d6f885ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_blocks_at = vnx::get_type_code(vnx::Hash64(0x1eb0c0d7eae3c33aull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_blocks_at_return = vnx::get_type_code(vnx::Hash64(0x70f0e9e7aa72b810ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers = vnx::get_type_code(vnx::Hash64(0x8682feb65fbb77feull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_connected_peers_return = vnx::get_type_code(vnx::Hash64(0x5c96b95e03d32e32ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_id = vnx::get_type_code(vnx::Hash64(0xb9f7168b5ae94cd9ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_id_return = vnx::get_type_code(vnx::Hash64(0x3924146b7a803806ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_info = vnx::get_type_code(vnx::Hash64(0x364ea887c149a265ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_info_return = vnx::get_type_code(vnx::Hash64(0x15170c71ca9209a9ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_known_peers = vnx::get_type_code(vnx::Hash64(0xaa408b6bf4e8168dull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_known_peers_return = vnx::get_type_code(vnx::Hash64(0xc08cde4fbf7f2abcull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_peer_info = vnx::get_type_code(vnx::Hash64(0x520a467ef9324cb3ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_peer_info_return = vnx::get_type_code(vnx::Hash64(0xffff4ae0244281b5ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_peers = vnx::get_type_code(vnx::Hash64(0x66d68bd91b462049ull)); const vnx::TypeCode* const vnx_native_type_code_Router_get_peers_return = vnx::get_type_code(vnx::Hash64(0x595714f80f272d86ull)); const vnx::TypeCode* const vnx_native_type_code_Router_kick_peer = vnx::get_type_code(vnx::Hash64(0x359a21379021beedull)); const vnx::TypeCode* const vnx_native_type_code_Router_kick_peer_return = vnx::get_type_code(vnx::Hash64(0xd7189e110cc3a50full)); const vnx::TypeCode* const vnx_native_type_code_Router_sign_msg = vnx::get_type_code(vnx::Hash64(0x88ede2fbb99ab63eull)); const vnx::TypeCode* const vnx_native_type_code_Router_sign_msg_return = vnx::get_type_code(vnx::Hash64(0x67c8c37a7b5fc991ull)); const vnx::TypeCode* const vnx_native_type_code_Solution = vnx::get_type_code(vnx::Hash64(0x9f693babd1a91ccdull)); const vnx::TypeCode* const vnx_native_type_code_TimeLordBase = vnx::get_type_code(vnx::Hash64(0x311081636f6570efull)); const vnx::TypeCode* const vnx_native_type_code_TimeLord_stop_vdf = vnx::get_type_code(vnx::Hash64(0xf7f78eb9f371e6e7ull)); const vnx::TypeCode* const vnx_native_type_code_TimeLord_stop_vdf_return = vnx::get_type_code(vnx::Hash64(0x53e37fb500ea3a9full)); const vnx::TypeCode* const vnx_native_type_code_Transaction = vnx::get_type_code(vnx::Hash64(0xce0462acdceaa5bcull)); const vnx::TypeCode* const vnx_native_type_code_TransactionBase = vnx::get_type_code(vnx::Hash64(0x6697ffbf3611887dull)); const vnx::TypeCode* const vnx_native_type_code_VDF_Point = vnx::get_type_code(vnx::Hash64(0x1671551501b6c956ull)); const vnx::TypeCode* const vnx_native_type_code_ValidatorVote = vnx::get_type_code(vnx::Hash64(0xc056a2ff24cdee25ull)); const vnx::TypeCode* const vnx_native_type_code_WalletBase = vnx::get_type_code(vnx::Hash64(0x62207fd96d3aead7ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_accept_offer = vnx::get_type_code(vnx::Hash64(0x3299e81eb354b78full)); const vnx::TypeCode* const vnx_native_type_code_Wallet_accept_offer_return = vnx::get_type_code(vnx::Hash64(0xb44ec1a26ab66acdull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_add_account = vnx::get_type_code(vnx::Hash64(0x92d2d3518d9c33aeull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_add_account_return = vnx::get_type_code(vnx::Hash64(0xda0b2d71dd9e8336ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_add_token = vnx::get_type_code(vnx::Hash64(0x15fcc67eabc550b6ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_add_token_return = vnx::get_type_code(vnx::Hash64(0xb0b00a9f88ea83b5ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_cancel_offer = vnx::get_type_code(vnx::Hash64(0x200cca704ba873c6ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_cancel_offer_return = vnx::get_type_code(vnx::Hash64(0x86f3531ebf8c56a2ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_complete = vnx::get_type_code(vnx::Hash64(0x20da222e7c7de702ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_complete_return = vnx::get_type_code(vnx::Hash64(0x490ab9293f9dbfd0ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_create_account = vnx::get_type_code(vnx::Hash64(0x11cd618b00e9e56cull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_create_account_return = vnx::get_type_code(vnx::Hash64(0x3a0ff64dc755a8d8ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_create_wallet = vnx::get_type_code(vnx::Hash64(0xdcc08a3a1b171a19ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_create_wallet_return = vnx::get_type_code(vnx::Hash64(0xb417dca300f1949bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_deploy = vnx::get_type_code(vnx::Hash64(0xcd71b07853d17497ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_deploy_return = vnx::get_type_code(vnx::Hash64(0x7de4805b16e313f6ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_deposit = vnx::get_type_code(vnx::Hash64(0x4bf71b9049e1c689ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_deposit_return = vnx::get_type_code(vnx::Hash64(0xf21ba8f2309d78aeull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_execute = vnx::get_type_code(vnx::Hash64(0x51a1276a27db7b4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_execute_return = vnx::get_type_code(vnx::Hash64(0x9a51f18a1c26c764ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_export_wallet = vnx::get_type_code(vnx::Hash64(0xd52b494df565ce7ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_export_wallet_return = vnx::get_type_code(vnx::Hash64(0x1c82818ba92b03f4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_find_wallet_by_addr = vnx::get_type_code(vnx::Hash64(0x320237e79adcef6bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_find_wallet_by_addr_return = vnx::get_type_code(vnx::Hash64(0xdae07576f8844f6aull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_gather_inputs_for = vnx::get_type_code(vnx::Hash64(0x31d9b9888b8c2de3ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_gather_inputs_for_return = vnx::get_type_code(vnx::Hash64(0xb099ed949b98dc77ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_account = vnx::get_type_code(vnx::Hash64(0xf9669d0d42aec09eull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_account_return = vnx::get_type_code(vnx::Hash64(0xaed020aa500eed2bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_address = vnx::get_type_code(vnx::Hash64(0xccad8dfe1543aa77ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_address_return = vnx::get_type_code(vnx::Hash64(0x4c76a08d8d85c4e4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_accounts = vnx::get_type_code(vnx::Hash64(0xdf8bfad64085cb83ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_accounts_return = vnx::get_type_code(vnx::Hash64(0x2bb48cc4299c5782ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_addresses = vnx::get_type_code(vnx::Hash64(0xf5e2b4554613fd97ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_addresses_return = vnx::get_type_code(vnx::Hash64(0x2f16846155284194ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_farmer_keys = vnx::get_type_code(vnx::Hash64(0xc6a03b3f813d071dull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_all_farmer_keys_return = vnx::get_type_code(vnx::Hash64(0xa2de9b0aaffc515aull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balance = vnx::get_type_code(vnx::Hash64(0x1bc2c2dd67ab2829ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balance_return = vnx::get_type_code(vnx::Hash64(0xfa00e6f62563141full)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balances = vnx::get_type_code(vnx::Hash64(0x5be581d54ae69a4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_balances_return = vnx::get_type_code(vnx::Hash64(0xe041fcc6b3606c0full)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contract_balances = vnx::get_type_code(vnx::Hash64(0x4d6b36c0c2804d26ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contract_balances_return = vnx::get_type_code(vnx::Hash64(0x7800bce5a77b8bdcull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts = vnx::get_type_code(vnx::Hash64(0x9ff1932bcec18d57ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_return = vnx::get_type_code(vnx::Hash64(0xf384dd12e1fac072ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_owned = vnx::get_type_code(vnx::Hash64(0x7834485ec000f577ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_contracts_owned_return = vnx::get_type_code(vnx::Hash64(0x40aec1bc5f5f5c90ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_farmer_keys = vnx::get_type_code(vnx::Hash64(0x44709e11ff3ff3eeull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_farmer_keys_return = vnx::get_type_code(vnx::Hash64(0x25479f868269fbb0ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_history = vnx::get_type_code(vnx::Hash64(0x921f73f3d97d2d4dull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_history_return = vnx::get_type_code(vnx::Hash64(0xb1b8c9a446a81b1full)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_master_seed = vnx::get_type_code(vnx::Hash64(0x8fddd77ece4d295bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_master_seed_return = vnx::get_type_code(vnx::Hash64(0x8b0f38e742e132f0ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_seed = vnx::get_type_code(vnx::Hash64(0xacf58d3b1a8ce4c0ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_seed_return = vnx::get_type_code(vnx::Hash64(0xd02dd0736911ac8bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_wordlist = vnx::get_type_code(vnx::Hash64(0xb833298e3ff28a44ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_mnemonic_wordlist_return = vnx::get_type_code(vnx::Hash64(0x8ce49a9b57ee5789ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_offers = vnx::get_type_code(vnx::Hash64(0x6dacbe70cbe08925ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_offers_return = vnx::get_type_code(vnx::Hash64(0xdb130e20d160c564ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_swap_liquidity = vnx::get_type_code(vnx::Hash64(0x3a8f17d496f625bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_swap_liquidity_return = vnx::get_type_code(vnx::Hash64(0x6846e8caa82b1463ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_token_list = vnx::get_type_code(vnx::Hash64(0x322b4f4af3737efcull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_token_list_return = vnx::get_type_code(vnx::Hash64(0xe36d7210ddf3d216ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_total_balances = vnx::get_type_code(vnx::Hash64(0xedd130caba2e2f04ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_total_balances_return = vnx::get_type_code(vnx::Hash64(0x46f0368d7c4e45ddull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_tx_log = vnx::get_type_code(vnx::Hash64(0xc5570936be29c0ebull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_get_tx_log_return = vnx::get_type_code(vnx::Hash64(0x5c6d4b8fc9820ec1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_import_wallet = vnx::get_type_code(vnx::Hash64(0x63a1d5b2fe482dd1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_import_wallet_return = vnx::get_type_code(vnx::Hash64(0xc6edac537d44ecd1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_is_locked = vnx::get_type_code(vnx::Hash64(0x6087e83febcc233ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_is_locked_return = vnx::get_type_code(vnx::Hash64(0x1ea1b30193de8d7bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_lock = vnx::get_type_code(vnx::Hash64(0x9072deb8ab538b2bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_lock_return = vnx::get_type_code(vnx::Hash64(0x74cb9d670ae675f3ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_make_offer = vnx::get_type_code(vnx::Hash64(0x8b0cf597e8265a73ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_make_offer_return = vnx::get_type_code(vnx::Hash64(0xf8ecff218266aadaull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_mark_spent = vnx::get_type_code(vnx::Hash64(0x107fed23348b3333ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_mark_spent_return = vnx::get_type_code(vnx::Hash64(0xf28950d2b8f874dfull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_trade = vnx::get_type_code(vnx::Hash64(0x557a94a5a4887bf2ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_trade_return = vnx::get_type_code(vnx::Hash64(0xb43f9bef89670cebull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_withdraw = vnx::get_type_code(vnx::Hash64(0x790a334fbf5dd1e6ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_offer_withdraw_return = vnx::get_type_code(vnx::Hash64(0xea9f43cd17c41965ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_create = vnx::get_type_code(vnx::Hash64(0x6b0c985ca2c555c9ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_create_return = vnx::get_type_code(vnx::Hash64(0x349cedc7d1d4dcfull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_exec = vnx::get_type_code(vnx::Hash64(0xca9e9d0dfde795d1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_plotnft_exec_return = vnx::get_type_code(vnx::Hash64(0x8330b38d9cb47b24ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_release = vnx::get_type_code(vnx::Hash64(0x2cd72a3370e05db3ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_release_return = vnx::get_type_code(vnx::Hash64(0xd302995a8c4dcf83ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_release_all = vnx::get_type_code(vnx::Hash64(0x4bd57b9deca4be51ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_release_all_return = vnx::get_type_code(vnx::Hash64(0xf7029fb06b3b3fa5ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_rem_token = vnx::get_type_code(vnx::Hash64(0xc913cdd1600a2609ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_rem_token_return = vnx::get_type_code(vnx::Hash64(0xb59ee8fb44d30755ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_remove_account = vnx::get_type_code(vnx::Hash64(0xdf7d8816958bcb8bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_remove_account_return = vnx::get_type_code(vnx::Hash64(0x8e0d71e4003dca80ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_reserve = vnx::get_type_code(vnx::Hash64(0xd14c466e8e7ebd76ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_reserve_return = vnx::get_type_code(vnx::Hash64(0x79de0793f575d4d6ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_reset_cache = vnx::get_type_code(vnx::Hash64(0x922c4f0299ea0bf4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_reset_cache_return = vnx::get_type_code(vnx::Hash64(0x59e9fbfbf5d8218bull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send = vnx::get_type_code(vnx::Hash64(0x3842658ae3c2d5ebull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_return = vnx::get_type_code(vnx::Hash64(0x5df7b911342a1e6full)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_from = vnx::get_type_code(vnx::Hash64(0x40c3c88665341592ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_from_return = vnx::get_type_code(vnx::Hash64(0xf578239f07abf05dull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_many = vnx::get_type_code(vnx::Hash64(0x4f35769a1b4c6786ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_many_return = vnx::get_type_code(vnx::Hash64(0x828bddc86fbaf1e1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_off = vnx::get_type_code(vnx::Hash64(0x8b7bfc0751d27adbull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_send_off_return = vnx::get_type_code(vnx::Hash64(0x9b9017e8636e8571ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_set_address_count = vnx::get_type_code(vnx::Hash64(0x9638ddc0c1d52b15ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_set_address_count_return = vnx::get_type_code(vnx::Hash64(0x5948620640c50bf8ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_msg = vnx::get_type_code(vnx::Hash64(0x5bc54cc8b0112d3aull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_msg_return = vnx::get_type_code(vnx::Hash64(0x5cf2f6b20fa33f51ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_off = vnx::get_type_code(vnx::Hash64(0x232c89cf3ed4d5b1ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_sign_off_return = vnx::get_type_code(vnx::Hash64(0x4b2ee7febe4ec00aull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_add_liquid = vnx::get_type_code(vnx::Hash64(0xe053d1ae718e2f64ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_add_liquid_return = vnx::get_type_code(vnx::Hash64(0xc2812565c73ec527ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_rem_liquid = vnx::get_type_code(vnx::Hash64(0x6494b41c51e158eaull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_rem_liquid_return = vnx::get_type_code(vnx::Hash64(0x946935a83dd0b8d2ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_trade = vnx::get_type_code(vnx::Hash64(0x4b5a42cbf6657910ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_swap_trade_return = vnx::get_type_code(vnx::Hash64(0x8fe4c13b007c63f4ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_unlock = vnx::get_type_code(vnx::Hash64(0x800deedf12a4df74ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_unlock_return = vnx::get_type_code(vnx::Hash64(0xe8e5c839343f6bbcull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_update_cache = vnx::get_type_code(vnx::Hash64(0xf98cf07accda73b8ull)); const vnx::TypeCode* const vnx_native_type_code_Wallet_update_cache_return = vnx::get_type_code(vnx::Hash64(0x7e1b25fb37caf248ull)); const vnx::TypeCode* const vnx_native_type_code_WalletFile = vnx::get_type_code(vnx::Hash64(0xefcdc0f20fc4360eull)); const vnx::TypeCode* const vnx_native_type_code_WebAPIBase = vnx::get_type_code(vnx::Hash64(0xfe90ce601fcc0cc6ull)); const vnx::TypeCode* const vnx_native_type_code_WebAPI_shutdown = vnx::get_type_code(vnx::Hash64(0x75dd6111dc25b9d6ull)); const vnx::TypeCode* const vnx_native_type_code_WebAPI_shutdown_return = vnx::get_type_code(vnx::Hash64(0x248624ff297c34ull)); const vnx::TypeCode* const vnx_native_type_code_account_info_t = vnx::get_type_code(vnx::Hash64(0x5858a2f32468feaeull)); const vnx::TypeCode* const vnx_native_type_code_account_t = vnx::get_type_code(vnx::Hash64(0xc0c163f453729a7ull)); const vnx::TypeCode* const vnx_native_type_code_balance_t = vnx::get_type_code(vnx::Hash64(0x613173c7e5ce65b4ull)); const vnx::TypeCode* const vnx_native_type_code_block_index_t = vnx::get_type_code(vnx::Hash64(0xd00c722670bca900ull)); const vnx::TypeCode* const vnx_native_type_code_compile_flags_t = vnx::get_type_code(vnx::Hash64(0x2d1279b3d438d884ull)); const vnx::TypeCode* const vnx_native_type_code_error_code_e = vnx::get_type_code(vnx::Hash64(0xc3330407879f46ull)); const vnx::TypeCode* const vnx_native_type_code_exec_entry_t = vnx::get_type_code(vnx::Hash64(0xd30282844b1862a4ull)); const vnx::TypeCode* const vnx_native_type_code_exec_error_t = vnx::get_type_code(vnx::Hash64(0x5cd84f2d984d4bfull)); const vnx::TypeCode* const vnx_native_type_code_exec_result_t = vnx::get_type_code(vnx::Hash64(0x18fe02e2374b039eull)); const vnx::TypeCode* const vnx_native_type_code_farmed_block_info_t = vnx::get_type_code(vnx::Hash64(0x2e10154a52617b19ull)); const vnx::TypeCode* const vnx_native_type_code_farmed_block_summary_t = vnx::get_type_code(vnx::Hash64(0x9fe2bac01782721dull)); const vnx::TypeCode* const vnx_native_type_code_node_info_t = vnx::get_type_code(vnx::Hash64(0xda45b5e3a527588eull)); const vnx::TypeCode* const vnx_native_type_code_node_type_e = vnx::get_type_code(vnx::Hash64(0xa5de458f1ce5539aull)); const vnx::TypeCode* const vnx_native_type_code_offer_data_t = vnx::get_type_code(vnx::Hash64(0xc97a08a709a5f1efull)); const vnx::TypeCode* const vnx_native_type_code_peer_info_t = vnx::get_type_code(vnx::Hash64(0xce0ff32e89625afbull)); const vnx::TypeCode* const vnx_native_type_code_permission_e = vnx::get_type_code(vnx::Hash64(0x7d75a3f04c313898ull)); const vnx::TypeCode* const vnx_native_type_code_plot_nft_info_t = vnx::get_type_code(vnx::Hash64(0xf8e0b44f3c0a54aeull)); const vnx::TypeCode* const vnx_native_type_code_pooling_error_e = vnx::get_type_code(vnx::Hash64(0xec786b877a93f17ull)); const vnx::TypeCode* const vnx_native_type_code_pooling_info_t = vnx::get_type_code(vnx::Hash64(0xbddcc977498f516full)); const vnx::TypeCode* const vnx_native_type_code_pooling_stats_t = vnx::get_type_code(vnx::Hash64(0xb2441a254359df11ull)); const vnx::TypeCode* const vnx_native_type_code_query_filter_t = vnx::get_type_code(vnx::Hash64(0x92b02006aeea9a76ull)); const vnx::TypeCode* const vnx_native_type_code_spend_options_t = vnx::get_type_code(vnx::Hash64(0x37f7c6d377362e95ull)); const vnx::TypeCode* const vnx_native_type_code_swap_entry_t = vnx::get_type_code(vnx::Hash64(0xe3110712aa0f6064ull)); const vnx::TypeCode* const vnx_native_type_code_swap_info_t = vnx::get_type_code(vnx::Hash64(0x7586be908f15ae8ull)); const vnx::TypeCode* const vnx_native_type_code_swap_pool_info_t = vnx::get_type_code(vnx::Hash64(0x6502e235a743dabull)); const vnx::TypeCode* const vnx_native_type_code_swap_user_info_t = vnx::get_type_code(vnx::Hash64(0x1b6c720bff2d638cull)); const vnx::TypeCode* const vnx_native_type_code_table_entry_t = vnx::get_type_code(vnx::Hash64(0x9bdbee40872de9a7ull)); const vnx::TypeCode* const vnx_native_type_code_trade_entry_t = vnx::get_type_code(vnx::Hash64(0xed7d8e67cb8db394ull)); const vnx::TypeCode* const vnx_native_type_code_trade_log_t = vnx::get_type_code(vnx::Hash64(0xafedf6853c645eb8ull)); const vnx::TypeCode* const vnx_native_type_code_tx_entry_t = vnx::get_type_code(vnx::Hash64(0x438cda5719015870ull)); const vnx::TypeCode* const vnx_native_type_code_tx_index_t = vnx::get_type_code(vnx::Hash64(0xc326e232ee2ebb41ull)); const vnx::TypeCode* const vnx_native_type_code_tx_info_t = vnx::get_type_code(vnx::Hash64(0x44e4a710953f4785ull)); const vnx::TypeCode* const vnx_native_type_code_tx_log_entry_t = vnx::get_type_code(vnx::Hash64(0xc29d95c24aff8b43ull)); const vnx::TypeCode* const vnx_native_type_code_tx_note_e = vnx::get_type_code(vnx::Hash64(0x347c1deca0a9c9cull)); const vnx::TypeCode* const vnx_native_type_code_tx_type_e = vnx::get_type_code(vnx::Hash64(0x3b7f577c2cfd4c91ull)); const vnx::TypeCode* const vnx_native_type_code_txin_t = vnx::get_type_code(vnx::Hash64(0xda6587114a2413full)); const vnx::TypeCode* const vnx_native_type_code_txio_entry_t = vnx::get_type_code(vnx::Hash64(0x2d1c65e166ab244bull)); const vnx::TypeCode* const vnx_native_type_code_txio_t = vnx::get_type_code(vnx::Hash64(0x32adb93b85c82cf4ull)); const vnx::TypeCode* const vnx_native_type_code_txout_t = vnx::get_type_code(vnx::Hash64(0xaa91772752216576ull)); const vnx::TypeCode* const vnx_native_type_code_uint_fraction_t = vnx::get_type_code(vnx::Hash64(0xe5632136b5a3ed5aull)); const vnx::TypeCode* const vnx_native_type_code_ulong_fraction_t = vnx::get_type_code(vnx::Hash64(0xe9c2388a9c35ce06ull)); const vnx::TypeCode* const vnx_native_type_code_virtual_plot_info_t = vnx::get_type_code(vnx::Hash64(0xcbcd7c49be95180eull)); } // namespace mmx ================================================ FILE: generated/src/peer_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 peer_info_t::VNX_TYPE_HASH(0xce0ff32e89625afbull); const vnx::Hash64 peer_info_t::VNX_CODE_HASH(0xd6ab74a4c33a8685ull); vnx::Hash64 peer_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string peer_info_t::get_type_name() const { return "mmx.peer_info_t"; } const vnx::TypeCode* peer_info_t::get_type_code() const { return mmx::vnx_native_type_code_peer_info_t; } std::shared_ptr peer_info_t::create() { return std::make_shared(); } std::shared_ptr peer_info_t::clone() const { return std::make_shared(*this); } void peer_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void peer_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void peer_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_peer_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, type); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, ping_ms); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, version); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, recv_timeout_ms); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, connect_time_ms); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, bytes_send); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, bytes_recv); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, pending_cost); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, compression_ratio); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, is_synced); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, is_paused); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, is_blocked); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, is_outbound); _visitor.type_end(*_type_code); } void peer_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"id\": "; vnx::write(_out, id); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"type\": "; vnx::write(_out, type); _out << ", \"ping_ms\": "; vnx::write(_out, ping_ms); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"version\": "; vnx::write(_out, version); _out << ", \"recv_timeout_ms\": "; vnx::write(_out, recv_timeout_ms); _out << ", \"connect_time_ms\": "; vnx::write(_out, connect_time_ms); _out << ", \"bytes_send\": "; vnx::write(_out, bytes_send); _out << ", \"bytes_recv\": "; vnx::write(_out, bytes_recv); _out << ", \"pending_cost\": "; vnx::write(_out, pending_cost); _out << ", \"compression_ratio\": "; vnx::write(_out, compression_ratio); _out << ", \"is_synced\": "; vnx::write(_out, is_synced); _out << ", \"is_paused\": "; vnx::write(_out, is_paused); _out << ", \"is_blocked\": "; vnx::write(_out, is_blocked); _out << ", \"is_outbound\": "; vnx::write(_out, is_outbound); _out << "}"; } void peer_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object peer_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.peer_info_t"; _object["id"] = id; _object["address"] = address; _object["type"] = type; _object["ping_ms"] = ping_ms; _object["height"] = height; _object["version"] = version; _object["recv_timeout_ms"] = recv_timeout_ms; _object["connect_time_ms"] = connect_time_ms; _object["bytes_send"] = bytes_send; _object["bytes_recv"] = bytes_recv; _object["pending_cost"] = pending_cost; _object["compression_ratio"] = compression_ratio; _object["is_synced"] = is_synced; _object["is_paused"] = is_paused; _object["is_blocked"] = is_blocked; _object["is_outbound"] = is_outbound; return _object; } void peer_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "bytes_recv") { _entry.second.to(bytes_recv); } else if(_entry.first == "bytes_send") { _entry.second.to(bytes_send); } else if(_entry.first == "compression_ratio") { _entry.second.to(compression_ratio); } else if(_entry.first == "connect_time_ms") { _entry.second.to(connect_time_ms); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "is_blocked") { _entry.second.to(is_blocked); } else if(_entry.first == "is_outbound") { _entry.second.to(is_outbound); } else if(_entry.first == "is_paused") { _entry.second.to(is_paused); } else if(_entry.first == "is_synced") { _entry.second.to(is_synced); } else if(_entry.first == "pending_cost") { _entry.second.to(pending_cost); } else if(_entry.first == "ping_ms") { _entry.second.to(ping_ms); } else if(_entry.first == "recv_timeout_ms") { _entry.second.to(recv_timeout_ms); } else if(_entry.first == "type") { _entry.second.to(type); } else if(_entry.first == "version") { _entry.second.to(version); } } } vnx::Variant peer_info_t::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "address") { return vnx::Variant(address); } if(_name == "type") { return vnx::Variant(type); } if(_name == "ping_ms") { return vnx::Variant(ping_ms); } if(_name == "height") { return vnx::Variant(height); } if(_name == "version") { return vnx::Variant(version); } if(_name == "recv_timeout_ms") { return vnx::Variant(recv_timeout_ms); } if(_name == "connect_time_ms") { return vnx::Variant(connect_time_ms); } if(_name == "bytes_send") { return vnx::Variant(bytes_send); } if(_name == "bytes_recv") { return vnx::Variant(bytes_recv); } if(_name == "pending_cost") { return vnx::Variant(pending_cost); } if(_name == "compression_ratio") { return vnx::Variant(compression_ratio); } if(_name == "is_synced") { return vnx::Variant(is_synced); } if(_name == "is_paused") { return vnx::Variant(is_paused); } if(_name == "is_blocked") { return vnx::Variant(is_blocked); } if(_name == "is_outbound") { return vnx::Variant(is_outbound); } return vnx::Variant(); } void peer_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "address") { _value.to(address); } else if(_name == "type") { _value.to(type); } else if(_name == "ping_ms") { _value.to(ping_ms); } else if(_name == "height") { _value.to(height); } else if(_name == "version") { _value.to(version); } else if(_name == "recv_timeout_ms") { _value.to(recv_timeout_ms); } else if(_name == "connect_time_ms") { _value.to(connect_time_ms); } else if(_name == "bytes_send") { _value.to(bytes_send); } else if(_name == "bytes_recv") { _value.to(bytes_recv); } else if(_name == "pending_cost") { _value.to(pending_cost); } else if(_name == "compression_ratio") { _value.to(compression_ratio); } else if(_name == "is_synced") { _value.to(is_synced); } else if(_name == "is_paused") { _value.to(is_paused); } else if(_name == "is_blocked") { _value.to(is_blocked); } else if(_name == "is_outbound") { _value.to(is_outbound); } } /// \private std::ostream& operator<<(std::ostream& _out, const peer_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, peer_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* peer_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr peer_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.peer_info_t"; type_code->type_hash = vnx::Hash64(0xce0ff32e89625afbull); type_code->code_hash = vnx::Hash64(0xd6ab74a4c33a8685ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::peer_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::node_type_e::static_get_type_code(); type_code->fields.resize(16); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "id"; field.code = {4}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "type"; field.code = {19, 0}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "ping_ms"; field.code = {7}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "version"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "recv_timeout_ms"; field.code = {8}; } { auto& field = type_code->fields[7]; field.data_size = 8; field.name = "connect_time_ms"; field.code = {8}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "bytes_send"; field.code = {4}; } { auto& field = type_code->fields[9]; field.data_size = 8; field.name = "bytes_recv"; field.code = {4}; } { auto& field = type_code->fields[10]; field.data_size = 8; field.name = "pending_cost"; field.code = {10}; } { auto& field = type_code->fields[11]; field.data_size = 8; field.name = "compression_ratio"; field.code = {10}; } { auto& field = type_code->fields[12]; field.data_size = 1; field.name = "is_synced"; field.code = {31}; } { auto& field = type_code->fields[13]; field.data_size = 1; field.name = "is_paused"; field.code = {31}; } { auto& field = type_code->fields[14]; field.data_size = 1; field.name = "is_blocked"; field.code = {31}; } { auto& field = type_code->fields[15]; field.data_size = 1; field.name = "is_outbound"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.id, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.ping_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.version, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.recv_timeout_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.connect_time_ms, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.bytes_send, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.bytes_recv, _field->code.data()); } if(const auto* const _field = type_code->field_map[10]) { vnx::read_value(_buf + _field->offset, value.pending_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.compression_ratio, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.is_synced, _field->code.data()); } if(const auto* const _field = type_code->field_map[13]) { vnx::read_value(_buf + _field->offset, value.is_paused, _field->code.data()); } if(const auto* const _field = type_code->field_map[14]) { vnx::read_value(_buf + _field->offset, value.is_blocked, _field->code.data()); } if(const auto* const _field = type_code->field_map[15]) { vnx::read_value(_buf + _field->offset, value.is_outbound, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.type, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::peer_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_peer_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::peer_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(72); vnx::write_value(_buf + 0, value.id); vnx::write_value(_buf + 8, value.ping_ms); vnx::write_value(_buf + 12, value.height); vnx::write_value(_buf + 16, value.version); vnx::write_value(_buf + 20, value.recv_timeout_ms); vnx::write_value(_buf + 28, value.connect_time_ms); vnx::write_value(_buf + 36, value.bytes_send); vnx::write_value(_buf + 44, value.bytes_recv); vnx::write_value(_buf + 52, value.pending_cost); vnx::write_value(_buf + 60, value.compression_ratio); vnx::write_value(_buf + 68, value.is_synced); vnx::write_value(_buf + 69, value.is_paused); vnx::write_value(_buf + 70, value.is_blocked); vnx::write_value(_buf + 71, value.is_outbound); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.type, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::peer_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::peer_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::peer_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::peer_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::peer_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/permission_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 permission_e::VNX_TYPE_HASH(0x7d75a3f04c313898ull); const vnx::Hash64 permission_e::VNX_CODE_HASH(0x8c018d9153a2dcebull); vnx::Hash64 permission_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string permission_e::get_type_name() const { return "mmx.permission_e"; } const vnx::TypeCode* permission_e::get_type_code() const { return mmx::vnx_native_type_code_permission_e; } std::shared_ptr permission_e::create() { return std::make_shared(); } std::shared_ptr permission_e::clone() const { return std::make_shared(*this); } void permission_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void permission_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t permission_e::is_valid() const { switch(value) { case PUBLIC: return true; case REMOTE: return true; case SIGN_BLOCK: return true; case SPENDING: return true; } return false; } std::string permission_e::to_string() const { switch(value) { case PUBLIC: return "\"PUBLIC\""; case REMOTE: return "\"REMOTE\""; case SIGN_BLOCK: return "\"SIGN_BLOCK\""; case SPENDING: return "\"SPENDING\""; } return std::to_string(value); } std::string permission_e::to_string_value() const { switch(value) { case PUBLIC: return "PUBLIC"; case REMOTE: return "REMOTE"; case SIGN_BLOCK: return "SIGN_BLOCK"; case SPENDING: return "SPENDING"; } return std::to_string(value); } std::string permission_e::to_string_value_full() const { switch(value) { case PUBLIC: return "mmx.permission_e.PUBLIC"; case REMOTE: return "mmx.permission_e.REMOTE"; case SIGN_BLOCK: return "mmx.permission_e.SIGN_BLOCK"; case SPENDING: return "mmx.permission_e.SPENDING"; } return std::to_string(value); } void permission_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void permission_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "PUBLIC") value = PUBLIC; else if(_name == "REMOTE") value = REMOTE; else if(_name == "SIGN_BLOCK") value = SIGN_BLOCK; else if(_name == "SPENDING") value = SPENDING; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void permission_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case PUBLIC: _name = "PUBLIC"; break; case REMOTE: _name = "REMOTE"; break; case SIGN_BLOCK: _name = "SIGN_BLOCK"; break; case SPENDING: _name = "SPENDING"; break; } _visitor.enum_value(value, _name); } void permission_e::write(std::ostream& _out) const { switch(value) { case PUBLIC: _out << "\"PUBLIC\""; break; case REMOTE: _out << "\"REMOTE\""; break; case SIGN_BLOCK: _out << "\"SIGN_BLOCK\""; break; case SPENDING: _out << "\"SPENDING\""; break; default: _out << value; } } void permission_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object permission_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.permission_e"; _object["value"] = value; return _object; } void permission_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant permission_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void permission_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const permission_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, permission_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* permission_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr permission_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.permission_e"; type_code->type_hash = vnx::Hash64(0x7d75a3f04c313898ull); type_code->code_hash = vnx::Hash64(0x8c018d9153a2dcebull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::permission_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[2166575688] = "PUBLIC"; type_code->enum_map[412167022] = "REMOTE"; type_code->enum_map[1091809605] = "SIGN_BLOCK"; type_code->enum_map[1957258863] = "SPENDING"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::permission_e::enum_t(tmp.to()); } else { value = ::mmx::permission_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::permission_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_permission_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::permission_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::permission_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::permission_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::permission_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::permission_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::permission_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::permission_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::permission_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::permission_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::permission_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::permission_e::enum_t& _value) { return ::mmx::permission_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::permission_e::enum_t& _value) { return ::mmx::permission_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::permission_e::enum_t& _value) { return ::mmx::permission_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::permission_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::permission_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/plot_nft_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 plot_nft_info_t::VNX_TYPE_HASH(0xf8e0b44f3c0a54aeull); const vnx::Hash64 plot_nft_info_t::VNX_CODE_HASH(0x3e8732c6d4e57af7ull); vnx::Hash64 plot_nft_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string plot_nft_info_t::get_type_name() const { return "mmx.plot_nft_info_t"; } const vnx::TypeCode* plot_nft_info_t::get_type_code() const { return mmx::vnx_native_type_code_plot_nft_info_t; } std::shared_ptr plot_nft_info_t::create() { return std::make_shared(); } std::shared_ptr plot_nft_info_t::clone() const { return std::make_shared(*this); } void plot_nft_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void plot_nft_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void plot_nft_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_plot_nft_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, owner); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, is_locked); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, target); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, unlock_height); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, server_url); _visitor.type_end(*_type_code); } void plot_nft_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"name\": "; vnx::write(_out, name); _out << ", \"owner\": "; vnx::write(_out, owner); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"is_locked\": "; vnx::write(_out, is_locked); _out << ", \"target\": "; vnx::write(_out, target); _out << ", \"unlock_height\": "; vnx::write(_out, unlock_height); _out << ", \"server_url\": "; vnx::write(_out, server_url); _out << "}"; } void plot_nft_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object plot_nft_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.plot_nft_info_t"; _object["name"] = name; _object["owner"] = owner; _object["address"] = address; _object["is_locked"] = is_locked; _object["target"] = target; _object["unlock_height"] = unlock_height; _object["server_url"] = server_url; return _object; } void plot_nft_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "is_locked") { _entry.second.to(is_locked); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "owner") { _entry.second.to(owner); } else if(_entry.first == "server_url") { _entry.second.to(server_url); } else if(_entry.first == "target") { _entry.second.to(target); } else if(_entry.first == "unlock_height") { _entry.second.to(unlock_height); } } } vnx::Variant plot_nft_info_t::get_field(const std::string& _name) const { if(_name == "name") { return vnx::Variant(name); } if(_name == "owner") { return vnx::Variant(owner); } if(_name == "address") { return vnx::Variant(address); } if(_name == "is_locked") { return vnx::Variant(is_locked); } if(_name == "target") { return vnx::Variant(target); } if(_name == "unlock_height") { return vnx::Variant(unlock_height); } if(_name == "server_url") { return vnx::Variant(server_url); } return vnx::Variant(); } void plot_nft_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "name") { _value.to(name); } else if(_name == "owner") { _value.to(owner); } else if(_name == "address") { _value.to(address); } else if(_name == "is_locked") { _value.to(is_locked); } else if(_name == "target") { _value.to(target); } else if(_name == "unlock_height") { _value.to(unlock_height); } else if(_name == "server_url") { _value.to(server_url); } } /// \private std::ostream& operator<<(std::ostream& _out, const plot_nft_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, plot_nft_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* plot_nft_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr plot_nft_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.plot_nft_info_t"; type_code->type_hash = vnx::Hash64(0xf8e0b44f3c0a54aeull); type_code->code_hash = vnx::Hash64(0x3e8732c6d4e57af7ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::plot_nft_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "owner"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.data_size = 1; field.name = "is_locked"; field.code = {31}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "target"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "unlock_height"; field.code = {33, 3}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "server_url"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.is_locked, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.name, type_code, _field->code.data()); break; case 1: vnx::read(in, value.owner, type_code, _field->code.data()); break; case 2: vnx::read(in, value.address, type_code, _field->code.data()); break; case 4: vnx::read(in, value.target, type_code, _field->code.data()); break; case 5: vnx::read(in, value.unlock_height, type_code, _field->code.data()); break; case 6: vnx::read(in, value.server_url, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::plot_nft_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_plot_nft_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::plot_nft_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(1); vnx::write_value(_buf + 0, value.is_locked); vnx::write(out, value.name, type_code, type_code->fields[0].code.data()); vnx::write(out, value.owner, type_code, type_code->fields[1].code.data()); vnx::write(out, value.address, type_code, type_code->fields[2].code.data()); vnx::write(out, value.target, type_code, type_code->fields[4].code.data()); vnx::write(out, value.unlock_height, type_code, type_code->fields[5].code.data()); vnx::write(out, value.server_url, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::plot_nft_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::plot_nft_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::plot_nft_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::plot_nft_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::plot_nft_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/pooling_error_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 pooling_error_e::VNX_TYPE_HASH(0xec786b877a93f17ull); const vnx::Hash64 pooling_error_e::VNX_CODE_HASH(0x598a3a53e6c7f787ull); vnx::Hash64 pooling_error_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string pooling_error_e::get_type_name() const { return "mmx.pooling_error_e"; } const vnx::TypeCode* pooling_error_e::get_type_code() const { return mmx::vnx_native_type_code_pooling_error_e; } std::shared_ptr pooling_error_e::create() { return std::make_shared(); } std::shared_ptr pooling_error_e::clone() const { return std::make_shared(*this); } void pooling_error_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void pooling_error_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t pooling_error_e::is_valid() const { switch(value) { case CHALLENGE_NOT_CONFIRMED: return true; case CHALLENGE_NOT_FOUND: return true; case CHALLENGE_REVERTED: return true; case DUPLICATE_PARTIAL: return true; case INVALID_ACCOUNT: return true; case INVALID_AUTH_KEY: return true; case INVALID_CONTRACT: return true; case INVALID_DIFFICULTY: return true; case INVALID_PARTIAL: return true; case INVALID_PROOF: return true; case INVALID_SIGNATURE: return true; case INVALID_TIMESTAMP: return true; case NONE: return true; case PARTIAL_NOT_GOOD_ENOUGH: return true; case PARTIAL_TOO_LATE: return true; case POOL_LOST_SYNC: return true; case SERVER_ERROR: return true; } return false; } std::string pooling_error_e::to_string() const { switch(value) { case CHALLENGE_NOT_CONFIRMED: return "\"CHALLENGE_NOT_CONFIRMED\""; case CHALLENGE_NOT_FOUND: return "\"CHALLENGE_NOT_FOUND\""; case CHALLENGE_REVERTED: return "\"CHALLENGE_REVERTED\""; case DUPLICATE_PARTIAL: return "\"DUPLICATE_PARTIAL\""; case INVALID_ACCOUNT: return "\"INVALID_ACCOUNT\""; case INVALID_AUTH_KEY: return "\"INVALID_AUTH_KEY\""; case INVALID_CONTRACT: return "\"INVALID_CONTRACT\""; case INVALID_DIFFICULTY: return "\"INVALID_DIFFICULTY\""; case INVALID_PARTIAL: return "\"INVALID_PARTIAL\""; case INVALID_PROOF: return "\"INVALID_PROOF\""; case INVALID_SIGNATURE: return "\"INVALID_SIGNATURE\""; case INVALID_TIMESTAMP: return "\"INVALID_TIMESTAMP\""; case NONE: return "\"NONE\""; case PARTIAL_NOT_GOOD_ENOUGH: return "\"PARTIAL_NOT_GOOD_ENOUGH\""; case PARTIAL_TOO_LATE: return "\"PARTIAL_TOO_LATE\""; case POOL_LOST_SYNC: return "\"POOL_LOST_SYNC\""; case SERVER_ERROR: return "\"SERVER_ERROR\""; } return std::to_string(value); } std::string pooling_error_e::to_string_value() const { switch(value) { case CHALLENGE_NOT_CONFIRMED: return "CHALLENGE_NOT_CONFIRMED"; case CHALLENGE_NOT_FOUND: return "CHALLENGE_NOT_FOUND"; case CHALLENGE_REVERTED: return "CHALLENGE_REVERTED"; case DUPLICATE_PARTIAL: return "DUPLICATE_PARTIAL"; case INVALID_ACCOUNT: return "INVALID_ACCOUNT"; case INVALID_AUTH_KEY: return "INVALID_AUTH_KEY"; case INVALID_CONTRACT: return "INVALID_CONTRACT"; case INVALID_DIFFICULTY: return "INVALID_DIFFICULTY"; case INVALID_PARTIAL: return "INVALID_PARTIAL"; case INVALID_PROOF: return "INVALID_PROOF"; case INVALID_SIGNATURE: return "INVALID_SIGNATURE"; case INVALID_TIMESTAMP: return "INVALID_TIMESTAMP"; case NONE: return "NONE"; case PARTIAL_NOT_GOOD_ENOUGH: return "PARTIAL_NOT_GOOD_ENOUGH"; case PARTIAL_TOO_LATE: return "PARTIAL_TOO_LATE"; case POOL_LOST_SYNC: return "POOL_LOST_SYNC"; case SERVER_ERROR: return "SERVER_ERROR"; } return std::to_string(value); } std::string pooling_error_e::to_string_value_full() const { switch(value) { case CHALLENGE_NOT_CONFIRMED: return "mmx.pooling_error_e.CHALLENGE_NOT_CONFIRMED"; case CHALLENGE_NOT_FOUND: return "mmx.pooling_error_e.CHALLENGE_NOT_FOUND"; case CHALLENGE_REVERTED: return "mmx.pooling_error_e.CHALLENGE_REVERTED"; case DUPLICATE_PARTIAL: return "mmx.pooling_error_e.DUPLICATE_PARTIAL"; case INVALID_ACCOUNT: return "mmx.pooling_error_e.INVALID_ACCOUNT"; case INVALID_AUTH_KEY: return "mmx.pooling_error_e.INVALID_AUTH_KEY"; case INVALID_CONTRACT: return "mmx.pooling_error_e.INVALID_CONTRACT"; case INVALID_DIFFICULTY: return "mmx.pooling_error_e.INVALID_DIFFICULTY"; case INVALID_PARTIAL: return "mmx.pooling_error_e.INVALID_PARTIAL"; case INVALID_PROOF: return "mmx.pooling_error_e.INVALID_PROOF"; case INVALID_SIGNATURE: return "mmx.pooling_error_e.INVALID_SIGNATURE"; case INVALID_TIMESTAMP: return "mmx.pooling_error_e.INVALID_TIMESTAMP"; case NONE: return "mmx.pooling_error_e.NONE"; case PARTIAL_NOT_GOOD_ENOUGH: return "mmx.pooling_error_e.PARTIAL_NOT_GOOD_ENOUGH"; case PARTIAL_TOO_LATE: return "mmx.pooling_error_e.PARTIAL_TOO_LATE"; case POOL_LOST_SYNC: return "mmx.pooling_error_e.POOL_LOST_SYNC"; case SERVER_ERROR: return "mmx.pooling_error_e.SERVER_ERROR"; } return std::to_string(value); } void pooling_error_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void pooling_error_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "CHALLENGE_NOT_CONFIRMED") value = CHALLENGE_NOT_CONFIRMED; else if(_name == "CHALLENGE_NOT_FOUND") value = CHALLENGE_NOT_FOUND; else if(_name == "CHALLENGE_REVERTED") value = CHALLENGE_REVERTED; else if(_name == "DUPLICATE_PARTIAL") value = DUPLICATE_PARTIAL; else if(_name == "INVALID_ACCOUNT") value = INVALID_ACCOUNT; else if(_name == "INVALID_AUTH_KEY") value = INVALID_AUTH_KEY; else if(_name == "INVALID_CONTRACT") value = INVALID_CONTRACT; else if(_name == "INVALID_DIFFICULTY") value = INVALID_DIFFICULTY; else if(_name == "INVALID_PARTIAL") value = INVALID_PARTIAL; else if(_name == "INVALID_PROOF") value = INVALID_PROOF; else if(_name == "INVALID_SIGNATURE") value = INVALID_SIGNATURE; else if(_name == "INVALID_TIMESTAMP") value = INVALID_TIMESTAMP; else if(_name == "NONE") value = NONE; else if(_name == "PARTIAL_NOT_GOOD_ENOUGH") value = PARTIAL_NOT_GOOD_ENOUGH; else if(_name == "PARTIAL_TOO_LATE") value = PARTIAL_TOO_LATE; else if(_name == "POOL_LOST_SYNC") value = POOL_LOST_SYNC; else if(_name == "SERVER_ERROR") value = SERVER_ERROR; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void pooling_error_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case CHALLENGE_NOT_CONFIRMED: _name = "CHALLENGE_NOT_CONFIRMED"; break; case CHALLENGE_NOT_FOUND: _name = "CHALLENGE_NOT_FOUND"; break; case CHALLENGE_REVERTED: _name = "CHALLENGE_REVERTED"; break; case DUPLICATE_PARTIAL: _name = "DUPLICATE_PARTIAL"; break; case INVALID_ACCOUNT: _name = "INVALID_ACCOUNT"; break; case INVALID_AUTH_KEY: _name = "INVALID_AUTH_KEY"; break; case INVALID_CONTRACT: _name = "INVALID_CONTRACT"; break; case INVALID_DIFFICULTY: _name = "INVALID_DIFFICULTY"; break; case INVALID_PARTIAL: _name = "INVALID_PARTIAL"; break; case INVALID_PROOF: _name = "INVALID_PROOF"; break; case INVALID_SIGNATURE: _name = "INVALID_SIGNATURE"; break; case INVALID_TIMESTAMP: _name = "INVALID_TIMESTAMP"; break; case NONE: _name = "NONE"; break; case PARTIAL_NOT_GOOD_ENOUGH: _name = "PARTIAL_NOT_GOOD_ENOUGH"; break; case PARTIAL_TOO_LATE: _name = "PARTIAL_TOO_LATE"; break; case POOL_LOST_SYNC: _name = "POOL_LOST_SYNC"; break; case SERVER_ERROR: _name = "SERVER_ERROR"; break; } _visitor.enum_value(value, _name); } void pooling_error_e::write(std::ostream& _out) const { switch(value) { case CHALLENGE_NOT_CONFIRMED: _out << "\"CHALLENGE_NOT_CONFIRMED\""; break; case CHALLENGE_NOT_FOUND: _out << "\"CHALLENGE_NOT_FOUND\""; break; case CHALLENGE_REVERTED: _out << "\"CHALLENGE_REVERTED\""; break; case DUPLICATE_PARTIAL: _out << "\"DUPLICATE_PARTIAL\""; break; case INVALID_ACCOUNT: _out << "\"INVALID_ACCOUNT\""; break; case INVALID_AUTH_KEY: _out << "\"INVALID_AUTH_KEY\""; break; case INVALID_CONTRACT: _out << "\"INVALID_CONTRACT\""; break; case INVALID_DIFFICULTY: _out << "\"INVALID_DIFFICULTY\""; break; case INVALID_PARTIAL: _out << "\"INVALID_PARTIAL\""; break; case INVALID_PROOF: _out << "\"INVALID_PROOF\""; break; case INVALID_SIGNATURE: _out << "\"INVALID_SIGNATURE\""; break; case INVALID_TIMESTAMP: _out << "\"INVALID_TIMESTAMP\""; break; case NONE: _out << "\"NONE\""; break; case PARTIAL_NOT_GOOD_ENOUGH: _out << "\"PARTIAL_NOT_GOOD_ENOUGH\""; break; case PARTIAL_TOO_LATE: _out << "\"PARTIAL_TOO_LATE\""; break; case POOL_LOST_SYNC: _out << "\"POOL_LOST_SYNC\""; break; case SERVER_ERROR: _out << "\"SERVER_ERROR\""; break; default: _out << value; } } void pooling_error_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object pooling_error_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.pooling_error_e"; _object["value"] = value; return _object; } void pooling_error_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant pooling_error_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void pooling_error_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const pooling_error_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, pooling_error_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* pooling_error_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr pooling_error_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.pooling_error_e"; type_code->type_hash = vnx::Hash64(0xec786b877a93f17ull); type_code->code_hash = vnx::Hash64(0x598a3a53e6c7f787ull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::pooling_error_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[1645788267] = "CHALLENGE_NOT_CONFIRMED"; type_code->enum_map[471927302] = "CHALLENGE_NOT_FOUND"; type_code->enum_map[1760085717] = "CHALLENGE_REVERTED"; type_code->enum_map[271202490] = "DUPLICATE_PARTIAL"; type_code->enum_map[3369359198] = "INVALID_ACCOUNT"; type_code->enum_map[1953340654] = "INVALID_AUTH_KEY"; type_code->enum_map[914919857] = "INVALID_CONTRACT"; type_code->enum_map[1883406896] = "INVALID_DIFFICULTY"; type_code->enum_map[405897781] = "INVALID_PARTIAL"; type_code->enum_map[3117556933] = "INVALID_PROOF"; type_code->enum_map[3529800621] = "INVALID_SIGNATURE"; type_code->enum_map[2157722321] = "INVALID_TIMESTAMP"; type_code->enum_map[0] = "NONE"; type_code->enum_map[1161496011] = "PARTIAL_NOT_GOOD_ENOUGH"; type_code->enum_map[2832488076] = "PARTIAL_TOO_LATE"; type_code->enum_map[1324712875] = "POOL_LOST_SYNC"; type_code->enum_map[2095599592] = "SERVER_ERROR"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::pooling_error_e::enum_t(tmp.to()); } else { value = ::mmx::pooling_error_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::pooling_error_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_pooling_error_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::pooling_error_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::pooling_error_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::pooling_error_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::pooling_error_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::pooling_error_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::pooling_error_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::pooling_error_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::pooling_error_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::pooling_error_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::pooling_error_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::pooling_error_e::enum_t& _value) { return ::mmx::pooling_error_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::pooling_error_e::enum_t& _value) { return ::mmx::pooling_error_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::pooling_error_e::enum_t& _value) { return ::mmx::pooling_error_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::pooling_error_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::pooling_error_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/pooling_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 pooling_info_t::VNX_TYPE_HASH(0xbddcc977498f516full); const vnx::Hash64 pooling_info_t::VNX_CODE_HASH(0x9ae4e6628fe7603aull); vnx::Hash64 pooling_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string pooling_info_t::get_type_name() const { return "mmx.pooling_info_t"; } const vnx::TypeCode* pooling_info_t::get_type_code() const { return mmx::vnx_native_type_code_pooling_info_t; } std::shared_ptr pooling_info_t::create() { return std::make_shared(); } std::shared_ptr pooling_info_t::clone() const { return std::make_shared(*this); } void pooling_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void pooling_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void pooling_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_pooling_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, server_url); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, pool_target); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, partial_diff); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, plot_count); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, is_plot_nft); _visitor.type_end(*_type_code); } void pooling_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"contract\": "; vnx::write(_out, contract); _out << ", \"name\": "; vnx::write(_out, name); _out << ", \"server_url\": "; vnx::write(_out, server_url); _out << ", \"pool_target\": "; vnx::write(_out, pool_target); _out << ", \"partial_diff\": "; vnx::write(_out, partial_diff); _out << ", \"plot_count\": "; vnx::write(_out, plot_count); _out << ", \"is_plot_nft\": "; vnx::write(_out, is_plot_nft); _out << "}"; } void pooling_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object pooling_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.pooling_info_t"; _object["contract"] = contract; _object["name"] = name; _object["server_url"] = server_url; _object["pool_target"] = pool_target; _object["partial_diff"] = partial_diff; _object["plot_count"] = plot_count; _object["is_plot_nft"] = is_plot_nft; return _object; } void pooling_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "is_plot_nft") { _entry.second.to(is_plot_nft); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "partial_diff") { _entry.second.to(partial_diff); } else if(_entry.first == "plot_count") { _entry.second.to(plot_count); } else if(_entry.first == "pool_target") { _entry.second.to(pool_target); } else if(_entry.first == "server_url") { _entry.second.to(server_url); } } } vnx::Variant pooling_info_t::get_field(const std::string& _name) const { if(_name == "contract") { return vnx::Variant(contract); } if(_name == "name") { return vnx::Variant(name); } if(_name == "server_url") { return vnx::Variant(server_url); } if(_name == "pool_target") { return vnx::Variant(pool_target); } if(_name == "partial_diff") { return vnx::Variant(partial_diff); } if(_name == "plot_count") { return vnx::Variant(plot_count); } if(_name == "is_plot_nft") { return vnx::Variant(is_plot_nft); } return vnx::Variant(); } void pooling_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "contract") { _value.to(contract); } else if(_name == "name") { _value.to(name); } else if(_name == "server_url") { _value.to(server_url); } else if(_name == "pool_target") { _value.to(pool_target); } else if(_name == "partial_diff") { _value.to(partial_diff); } else if(_name == "plot_count") { _value.to(plot_count); } else if(_name == "is_plot_nft") { _value.to(is_plot_nft); } } /// \private std::ostream& operator<<(std::ostream& _out, const pooling_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, pooling_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* pooling_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr pooling_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.pooling_info_t"; type_code->type_hash = vnx::Hash64(0xbddcc977498f516full); type_code->code_hash = vnx::Hash64(0x9ae4e6628fe7603aull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::pooling_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "name"; field.code = {33, 32}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "server_url"; field.code = {33, 32}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "pool_target"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "partial_diff"; field.code = {4}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "plot_count"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 1; field.name = "is_plot_nft"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.partial_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.plot_count, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.is_plot_nft, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 1: vnx::read(in, value.name, type_code, _field->code.data()); break; case 2: vnx::read(in, value.server_url, type_code, _field->code.data()); break; case 3: vnx::read(in, value.pool_target, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::pooling_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_pooling_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::pooling_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(13); vnx::write_value(_buf + 0, value.partial_diff); vnx::write_value(_buf + 8, value.plot_count); vnx::write_value(_buf + 12, value.is_plot_nft); vnx::write(out, value.contract, type_code, type_code->fields[0].code.data()); vnx::write(out, value.name, type_code, type_code->fields[1].code.data()); vnx::write(out, value.server_url, type_code, type_code->fields[2].code.data()); vnx::write(out, value.pool_target, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::pooling_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::pooling_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::pooling_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::pooling_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::pooling_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/pooling_stats_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 pooling_stats_t::VNX_TYPE_HASH(0xb2441a254359df11ull); const vnx::Hash64 pooling_stats_t::VNX_CODE_HASH(0xd172855ac604d22bull); vnx::Hash64 pooling_stats_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string pooling_stats_t::get_type_name() const { return "mmx.pooling_stats_t"; } const vnx::TypeCode* pooling_stats_t::get_type_code() const { return mmx::vnx_native_type_code_pooling_stats_t; } std::shared_ptr pooling_stats_t::create() { return std::make_shared(); } std::shared_ptr pooling_stats_t::clone() const { return std::make_shared(*this); } void pooling_stats_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void pooling_stats_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void pooling_stats_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_pooling_stats_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, server_url); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, partial_diff); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, valid_points); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, failed_points); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, total_partials); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, total_response_time); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, last_partial); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, error_count); _visitor.type_end(*_type_code); } void pooling_stats_t::write(std::ostream& _out) const { _out << "{"; _out << "\"server_url\": "; vnx::write(_out, server_url); _out << ", \"partial_diff\": "; vnx::write(_out, partial_diff); _out << ", \"valid_points\": "; vnx::write(_out, valid_points); _out << ", \"failed_points\": "; vnx::write(_out, failed_points); _out << ", \"total_partials\": "; vnx::write(_out, total_partials); _out << ", \"total_response_time\": "; vnx::write(_out, total_response_time); _out << ", \"last_partial\": "; vnx::write(_out, last_partial); _out << ", \"error_count\": "; vnx::write(_out, error_count); _out << "}"; } void pooling_stats_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object pooling_stats_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.pooling_stats_t"; _object["server_url"] = server_url; _object["partial_diff"] = partial_diff; _object["valid_points"] = valid_points; _object["failed_points"] = failed_points; _object["total_partials"] = total_partials; _object["total_response_time"] = total_response_time; _object["last_partial"] = last_partial; _object["error_count"] = error_count; return _object; } void pooling_stats_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "error_count") { _entry.second.to(error_count); } else if(_entry.first == "failed_points") { _entry.second.to(failed_points); } else if(_entry.first == "last_partial") { _entry.second.to(last_partial); } else if(_entry.first == "partial_diff") { _entry.second.to(partial_diff); } else if(_entry.first == "server_url") { _entry.second.to(server_url); } else if(_entry.first == "total_partials") { _entry.second.to(total_partials); } else if(_entry.first == "total_response_time") { _entry.second.to(total_response_time); } else if(_entry.first == "valid_points") { _entry.second.to(valid_points); } } } vnx::Variant pooling_stats_t::get_field(const std::string& _name) const { if(_name == "server_url") { return vnx::Variant(server_url); } if(_name == "partial_diff") { return vnx::Variant(partial_diff); } if(_name == "valid_points") { return vnx::Variant(valid_points); } if(_name == "failed_points") { return vnx::Variant(failed_points); } if(_name == "total_partials") { return vnx::Variant(total_partials); } if(_name == "total_response_time") { return vnx::Variant(total_response_time); } if(_name == "last_partial") { return vnx::Variant(last_partial); } if(_name == "error_count") { return vnx::Variant(error_count); } return vnx::Variant(); } void pooling_stats_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "server_url") { _value.to(server_url); } else if(_name == "partial_diff") { _value.to(partial_diff); } else if(_name == "valid_points") { _value.to(valid_points); } else if(_name == "failed_points") { _value.to(failed_points); } else if(_name == "total_partials") { _value.to(total_partials); } else if(_name == "total_response_time") { _value.to(total_response_time); } else if(_name == "last_partial") { _value.to(last_partial); } else if(_name == "error_count") { _value.to(error_count); } } /// \private std::ostream& operator<<(std::ostream& _out, const pooling_stats_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, pooling_stats_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* pooling_stats_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr pooling_stats_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.pooling_stats_t"; type_code->type_hash = vnx::Hash64(0xb2441a254359df11ull); type_code->code_hash = vnx::Hash64(0xd172855ac604d22bull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::pooling_stats_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::pooling_error_e::static_get_type_code(); type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "server_url"; field.code = {32}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "partial_diff"; field.code = {4}; } { auto& field = type_code->fields[2]; field.data_size = 8; field.name = "valid_points"; field.code = {4}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "failed_points"; field.code = {4}; } { auto& field = type_code->fields[4]; field.data_size = 4; field.name = "total_partials"; field.code = {3}; } { auto& field = type_code->fields[5]; field.data_size = 8; field.name = "total_response_time"; field.code = {8}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "last_partial"; field.code = {8}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "error_count"; field.code = {13, 4, 19, 0, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.partial_diff, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.valid_points, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.failed_points, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.total_partials, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.total_response_time, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.last_partial, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.server_url, type_code, _field->code.data()); break; case 7: vnx::read(in, value.error_count, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::pooling_stats_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_pooling_stats_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::pooling_stats_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(44); vnx::write_value(_buf + 0, value.partial_diff); vnx::write_value(_buf + 8, value.valid_points); vnx::write_value(_buf + 16, value.failed_points); vnx::write_value(_buf + 24, value.total_partials); vnx::write_value(_buf + 28, value.total_response_time); vnx::write_value(_buf + 36, value.last_partial); vnx::write(out, value.server_url, type_code, type_code->fields[0].code.data()); vnx::write(out, value.error_count, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::pooling_stats_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::pooling_stats_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::pooling_stats_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::pooling_stats_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::pooling_stats_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/query_filter_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 query_filter_t::VNX_TYPE_HASH(0x92b02006aeea9a76ull); const vnx::Hash64 query_filter_t::VNX_CODE_HASH(0xd4593a6cc6eb5537ull); vnx::Hash64 query_filter_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string query_filter_t::get_type_name() const { return "mmx.query_filter_t"; } const vnx::TypeCode* query_filter_t::get_type_code() const { return mmx::vnx_native_type_code_query_filter_t; } std::shared_ptr query_filter_t::create() { return std::make_shared(); } std::shared_ptr query_filter_t::clone() const { return std::make_shared(*this); } void query_filter_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void query_filter_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void query_filter_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_query_filter_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, since); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, until); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, limit); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, max_search); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, currency); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, type); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, white_list); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, with_pending); _visitor.type_end(*_type_code); } void query_filter_t::write(std::ostream& _out) const { _out << "{"; _out << "\"since\": "; vnx::write(_out, since); _out << ", \"until\": "; vnx::write(_out, until); _out << ", \"limit\": "; vnx::write(_out, limit); _out << ", \"max_search\": "; vnx::write(_out, max_search); _out << ", \"currency\": "; vnx::write(_out, currency); _out << ", \"type\": "; vnx::write(_out, type); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"white_list\": "; vnx::write(_out, white_list); _out << ", \"with_pending\": "; vnx::write(_out, with_pending); _out << "}"; } void query_filter_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object query_filter_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.query_filter_t"; _object["since"] = since; _object["until"] = until; _object["limit"] = limit; _object["max_search"] = max_search; _object["currency"] = currency; _object["type"] = type; _object["memo"] = memo; _object["white_list"] = white_list; _object["with_pending"] = with_pending; return _object; } void query_filter_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "currency") { _entry.second.to(currency); } else if(_entry.first == "limit") { _entry.second.to(limit); } else if(_entry.first == "max_search") { _entry.second.to(max_search); } else if(_entry.first == "memo") { _entry.second.to(memo); } else if(_entry.first == "since") { _entry.second.to(since); } else if(_entry.first == "type") { _entry.second.to(type); } else if(_entry.first == "until") { _entry.second.to(until); } else if(_entry.first == "white_list") { _entry.second.to(white_list); } else if(_entry.first == "with_pending") { _entry.second.to(with_pending); } } } vnx::Variant query_filter_t::get_field(const std::string& _name) const { if(_name == "since") { return vnx::Variant(since); } if(_name == "until") { return vnx::Variant(until); } if(_name == "limit") { return vnx::Variant(limit); } if(_name == "max_search") { return vnx::Variant(max_search); } if(_name == "currency") { return vnx::Variant(currency); } if(_name == "type") { return vnx::Variant(type); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "white_list") { return vnx::Variant(white_list); } if(_name == "with_pending") { return vnx::Variant(with_pending); } return vnx::Variant(); } void query_filter_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "since") { _value.to(since); } else if(_name == "until") { _value.to(until); } else if(_name == "limit") { _value.to(limit); } else if(_name == "max_search") { _value.to(max_search); } else if(_name == "currency") { _value.to(currency); } else if(_name == "type") { _value.to(type); } else if(_name == "memo") { _value.to(memo); } else if(_name == "white_list") { _value.to(white_list); } else if(_name == "with_pending") { _value.to(with_pending); } } /// \private std::ostream& operator<<(std::ostream& _out, const query_filter_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, query_filter_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* query_filter_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr query_filter_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.query_filter_t"; type_code->type_hash = vnx::Hash64(0x92b02006aeea9a76ull); type_code->code_hash = vnx::Hash64(0xd4593a6cc6eb5537ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::query_filter_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_type_e::static_get_type_code(); type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "since"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "until"; field.value = vnx::to_string(-1); field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "limit"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "max_search"; field.code = {3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "currency"; field.code = {12, 11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "type"; field.code = {33, 19, 0}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } { auto& field = type_code->fields[7]; field.data_size = 1; field.name = "white_list"; field.code = {31}; } { auto& field = type_code->fields[8]; field.data_size = 1; field.name = "with_pending"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.since, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.until, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.limit, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.max_search, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.white_list, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.with_pending, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 4: vnx::read(in, value.currency, type_code, _field->code.data()); break; case 5: vnx::read(in, value.type, type_code, _field->code.data()); break; case 6: vnx::read(in, value.memo, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::query_filter_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_query_filter_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::query_filter_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(18); vnx::write_value(_buf + 0, value.since); vnx::write_value(_buf + 4, value.until); vnx::write_value(_buf + 8, value.limit); vnx::write_value(_buf + 12, value.max_search); vnx::write_value(_buf + 16, value.white_list); vnx::write_value(_buf + 17, value.with_pending); vnx::write(out, value.currency, type_code, type_code->fields[4].code.data()); vnx::write(out, value.type, type_code, type_code->fields[5].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[6].code.data()); } void read(std::istream& in, ::mmx::query_filter_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::query_filter_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::query_filter_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::query_filter_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::query_filter_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/spend_options_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 spend_options_t::VNX_TYPE_HASH(0x37f7c6d377362e95ull); const vnx::Hash64 spend_options_t::VNX_CODE_HASH(0x4ac9872830f3000full); vnx::Hash64 spend_options_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string spend_options_t::get_type_name() const { return "mmx.spend_options_t"; } const vnx::TypeCode* spend_options_t::get_type_code() const { return mmx::vnx_native_type_code_spend_options_t; } std::shared_ptr spend_options_t::create() { return std::make_shared(); } std::shared_ptr spend_options_t::clone() const { return std::make_shared(*this); } void spend_options_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void spend_options_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void spend_options_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_spend_options_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, auto_send); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, mark_spent); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, fee_ratio); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, gas_limit); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, expire_at); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, expire_delta); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, nonce); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, user); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, sender); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, passphrase); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, note); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, owner_map); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, contract_map); _visitor.type_end(*_type_code); } void spend_options_t::write(std::ostream& _out) const { _out << "{"; _out << "\"auto_send\": "; vnx::write(_out, auto_send); _out << ", \"mark_spent\": "; vnx::write(_out, mark_spent); _out << ", \"fee_ratio\": "; vnx::write(_out, fee_ratio); _out << ", \"gas_limit\": "; vnx::write(_out, gas_limit); _out << ", \"expire_at\": "; vnx::write(_out, expire_at); _out << ", \"expire_delta\": "; vnx::write(_out, expire_delta); _out << ", \"nonce\": "; vnx::write(_out, nonce); _out << ", \"user\": "; vnx::write(_out, user); _out << ", \"sender\": "; vnx::write(_out, sender); _out << ", \"passphrase\": "; vnx::write(_out, passphrase); _out << ", \"note\": "; vnx::write(_out, note); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"owner_map\": "; vnx::write(_out, owner_map); _out << ", \"contract_map\": "; vnx::write(_out, contract_map); _out << "}"; } void spend_options_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object spend_options_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.spend_options_t"; _object["auto_send"] = auto_send; _object["mark_spent"] = mark_spent; _object["fee_ratio"] = fee_ratio; _object["gas_limit"] = gas_limit; _object["expire_at"] = expire_at; _object["expire_delta"] = expire_delta; _object["nonce"] = nonce; _object["user"] = user; _object["sender"] = sender; _object["passphrase"] = passphrase; _object["note"] = note; _object["memo"] = memo; _object["owner_map"] = owner_map; _object["contract_map"] = contract_map; return _object; } void spend_options_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "auto_send") { _entry.second.to(auto_send); } else if(_entry.first == "contract_map") { _entry.second.to(contract_map); } else if(_entry.first == "expire_at") { _entry.second.to(expire_at); } else if(_entry.first == "expire_delta") { _entry.second.to(expire_delta); } else if(_entry.first == "fee_ratio") { _entry.second.to(fee_ratio); } else if(_entry.first == "gas_limit") { _entry.second.to(gas_limit); } else if(_entry.first == "mark_spent") { _entry.second.to(mark_spent); } else if(_entry.first == "memo") { _entry.second.to(memo); } else if(_entry.first == "nonce") { _entry.second.to(nonce); } else if(_entry.first == "note") { _entry.second.to(note); } else if(_entry.first == "owner_map") { _entry.second.to(owner_map); } else if(_entry.first == "passphrase") { _entry.second.to(passphrase); } else if(_entry.first == "sender") { _entry.second.to(sender); } else if(_entry.first == "user") { _entry.second.to(user); } } } vnx::Variant spend_options_t::get_field(const std::string& _name) const { if(_name == "auto_send") { return vnx::Variant(auto_send); } if(_name == "mark_spent") { return vnx::Variant(mark_spent); } if(_name == "fee_ratio") { return vnx::Variant(fee_ratio); } if(_name == "gas_limit") { return vnx::Variant(gas_limit); } if(_name == "expire_at") { return vnx::Variant(expire_at); } if(_name == "expire_delta") { return vnx::Variant(expire_delta); } if(_name == "nonce") { return vnx::Variant(nonce); } if(_name == "user") { return vnx::Variant(user); } if(_name == "sender") { return vnx::Variant(sender); } if(_name == "passphrase") { return vnx::Variant(passphrase); } if(_name == "note") { return vnx::Variant(note); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "owner_map") { return vnx::Variant(owner_map); } if(_name == "contract_map") { return vnx::Variant(contract_map); } return vnx::Variant(); } void spend_options_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "auto_send") { _value.to(auto_send); } else if(_name == "mark_spent") { _value.to(mark_spent); } else if(_name == "fee_ratio") { _value.to(fee_ratio); } else if(_name == "gas_limit") { _value.to(gas_limit); } else if(_name == "expire_at") { _value.to(expire_at); } else if(_name == "expire_delta") { _value.to(expire_delta); } else if(_name == "nonce") { _value.to(nonce); } else if(_name == "user") { _value.to(user); } else if(_name == "sender") { _value.to(sender); } else if(_name == "passphrase") { _value.to(passphrase); } else if(_name == "note") { _value.to(note); } else if(_name == "memo") { _value.to(memo); } else if(_name == "owner_map") { _value.to(owner_map); } else if(_name == "contract_map") { _value.to(contract_map); } } /// \private std::ostream& operator<<(std::ostream& _out, const spend_options_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, spend_options_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* spend_options_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr spend_options_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.spend_options_t"; type_code->type_hash = vnx::Hash64(0x37f7c6d377362e95ull); type_code->code_hash = vnx::Hash64(0x4ac9872830f3000full); type_code->is_native = true; type_code->native_size = sizeof(::mmx::spend_options_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_note_e::static_get_type_code(); type_code->fields.resize(14); { auto& field = type_code->fields[0]; field.data_size = 1; field.name = "auto_send"; field.value = vnx::to_string(true); field.code = {31}; } { auto& field = type_code->fields[1]; field.data_size = 1; field.name = "mark_spent"; field.value = vnx::to_string(false); field.code = {31}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "fee_ratio"; field.value = vnx::to_string(1024); field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 4; field.name = "gas_limit"; field.value = vnx::to_string(5000000); field.code = {3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "expire_at"; field.code = {33, 3}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "expire_delta"; field.code = {33, 3}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "nonce"; field.code = {33, 4}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "sender"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "passphrase"; field.code = {33, 32}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "note"; field.code = {33, 19, 0}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "owner_map"; field.code = {13, 5, 11, 32, 1, 11, 32, 1}; } { auto& field = type_code->fields[13]; field.is_extended = true; field.name = "contract_map"; field.code = {13, 5, 11, 32, 1, 16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.auto_send, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.mark_spent, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.fee_ratio, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.gas_limit, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 4: vnx::read(in, value.expire_at, type_code, _field->code.data()); break; case 5: vnx::read(in, value.expire_delta, type_code, _field->code.data()); break; case 6: vnx::read(in, value.nonce, type_code, _field->code.data()); break; case 7: vnx::read(in, value.user, type_code, _field->code.data()); break; case 8: vnx::read(in, value.sender, type_code, _field->code.data()); break; case 9: vnx::read(in, value.passphrase, type_code, _field->code.data()); break; case 10: vnx::read(in, value.note, type_code, _field->code.data()); break; case 11: vnx::read(in, value.memo, type_code, _field->code.data()); break; case 12: vnx::read(in, value.owner_map, type_code, _field->code.data()); break; case 13: vnx::read(in, value.contract_map, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::spend_options_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_spend_options_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::spend_options_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(10); vnx::write_value(_buf + 0, value.auto_send); vnx::write_value(_buf + 1, value.mark_spent); vnx::write_value(_buf + 2, value.fee_ratio); vnx::write_value(_buf + 6, value.gas_limit); vnx::write(out, value.expire_at, type_code, type_code->fields[4].code.data()); vnx::write(out, value.expire_delta, type_code, type_code->fields[5].code.data()); vnx::write(out, value.nonce, type_code, type_code->fields[6].code.data()); vnx::write(out, value.user, type_code, type_code->fields[7].code.data()); vnx::write(out, value.sender, type_code, type_code->fields[8].code.data()); vnx::write(out, value.passphrase, type_code, type_code->fields[9].code.data()); vnx::write(out, value.note, type_code, type_code->fields[10].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[11].code.data()); vnx::write(out, value.owner_map, type_code, type_code->fields[12].code.data()); vnx::write(out, value.contract_map, type_code, type_code->fields[13].code.data()); } void read(std::istream& in, ::mmx::spend_options_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::spend_options_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::spend_options_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::spend_options_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::spend_options_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/swap_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 swap_entry_t::VNX_TYPE_HASH(0xe3110712aa0f6064ull); const vnx::Hash64 swap_entry_t::VNX_CODE_HASH(0xe1805d1d4cab1d30ull); vnx::Hash64 swap_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string swap_entry_t::get_type_name() const { return "mmx.swap_entry_t"; } const vnx::TypeCode* swap_entry_t::get_type_code() const { return mmx::vnx_native_type_code_swap_entry_t; } std::shared_ptr swap_entry_t::create() { return std::make_shared(); } std::shared_ptr swap_entry_t::clone() const { return std::make_shared(*this); } void swap_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void swap_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void swap_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_swap_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, type); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, index); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, value); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, symbol); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, user); _visitor.type_end(*_type_code); } void swap_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"type\": "; vnx::write(_out, type); _out << ", \"index\": "; vnx::write(_out, index); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"value\": "; vnx::write(_out, value); _out << ", \"symbol\": "; vnx::write(_out, symbol); _out << ", \"user\": "; vnx::write(_out, user); _out << "}"; } void swap_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object swap_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.swap_entry_t"; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["txid"] = txid; _object["type"] = type; _object["index"] = index; _object["amount"] = amount; _object["value"] = value; _object["symbol"] = symbol; _object["user"] = user; return _object; } void swap_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "index") { _entry.second.to(index); } else if(_entry.first == "symbol") { _entry.second.to(symbol); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } else if(_entry.first == "type") { _entry.second.to(type); } else if(_entry.first == "user") { _entry.second.to(user); } else if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant swap_entry_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "type") { return vnx::Variant(type); } if(_name == "index") { return vnx::Variant(index); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "value") { return vnx::Variant(value); } if(_name == "symbol") { return vnx::Variant(symbol); } if(_name == "user") { return vnx::Variant(user); } return vnx::Variant(); } void swap_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "txid") { _value.to(txid); } else if(_name == "type") { _value.to(type); } else if(_name == "index") { _value.to(index); } else if(_name == "amount") { _value.to(amount); } else if(_name == "value") { _value.to(value); } else if(_name == "symbol") { _value.to(symbol); } else if(_name == "user") { _value.to(user); } } /// \private std::ostream& operator<<(std::ostream& _out, const swap_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, swap_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* swap_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr swap_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.swap_entry_t"; type_code->type_hash = vnx::Hash64(0xe3110712aa0f6064ull); type_code->code_hash = vnx::Hash64(0xe1805d1d4cab1d30ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::swap_entry_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "type"; field.code = {32}; } { auto& field = type_code->fields[4]; field.data_size = 1; field.name = "index"; field.code = {1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "value"; field.code = {33, 10}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "symbol"; field.code = {33, 32}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "user"; field.code = {33, 11, 32, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.index, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 3: vnx::read(in, value.type, type_code, _field->code.data()); break; case 5: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 6: vnx::read(in, value.value, type_code, _field->code.data()); break; case 7: vnx::read(in, value.symbol, type_code, _field->code.data()); break; case 8: vnx::read(in, value.user, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::swap_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_swap_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::swap_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(13); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.time_stamp); vnx::write_value(_buf + 12, value.index); vnx::write(out, value.txid, type_code, type_code->fields[2].code.data()); vnx::write(out, value.type, type_code, type_code->fields[3].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[5].code.data()); vnx::write(out, value.value, type_code, type_code->fields[6].code.data()); vnx::write(out, value.symbol, type_code, type_code->fields[7].code.data()); vnx::write(out, value.user, type_code, type_code->fields[8].code.data()); } void read(std::istream& in, ::mmx::swap_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::swap_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::swap_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::swap_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::swap_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/swap_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 swap_info_t::VNX_TYPE_HASH(0x7586be908f15ae8ull); const vnx::Hash64 swap_info_t::VNX_CODE_HASH(0x5ce6cfe182fce2ull); vnx::Hash64 swap_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string swap_info_t::get_type_name() const { return "mmx.swap_info_t"; } const vnx::TypeCode* swap_info_t::get_type_code() const { return mmx::vnx_native_type_code_swap_info_t; } std::shared_ptr swap_info_t::create() { return std::make_shared(); } std::shared_ptr swap_info_t::clone() const { return std::make_shared(*this); } void swap_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void swap_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void swap_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_swap_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, name); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, tokens); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, wallet); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, balance); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, volume); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, fees_paid); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, fees_claimed); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, user_total); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, volume_1d); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, volume_7d); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, avg_apy_1d); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, avg_apy_7d); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, fee_rates); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, pools); _visitor.type_end(*_type_code); } void swap_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"name\": "; vnx::write(_out, name); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"tokens\": "; vnx::write(_out, tokens); _out << ", \"wallet\": "; vnx::write(_out, wallet); _out << ", \"balance\": "; vnx::write(_out, balance); _out << ", \"volume\": "; vnx::write(_out, volume); _out << ", \"fees_paid\": "; vnx::write(_out, fees_paid); _out << ", \"fees_claimed\": "; vnx::write(_out, fees_claimed); _out << ", \"user_total\": "; vnx::write(_out, user_total); _out << ", \"volume_1d\": "; vnx::write(_out, volume_1d); _out << ", \"volume_7d\": "; vnx::write(_out, volume_7d); _out << ", \"avg_apy_1d\": "; vnx::write(_out, avg_apy_1d); _out << ", \"avg_apy_7d\": "; vnx::write(_out, avg_apy_7d); _out << ", \"fee_rates\": "; vnx::write(_out, fee_rates); _out << ", \"pools\": "; vnx::write(_out, pools); _out << "}"; } void swap_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object swap_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.swap_info_t"; _object["name"] = name; _object["address"] = address; _object["tokens"] = tokens; _object["wallet"] = wallet; _object["balance"] = balance; _object["volume"] = volume; _object["fees_paid"] = fees_paid; _object["fees_claimed"] = fees_claimed; _object["user_total"] = user_total; _object["volume_1d"] = volume_1d; _object["volume_7d"] = volume_7d; _object["avg_apy_1d"] = avg_apy_1d; _object["avg_apy_7d"] = avg_apy_7d; _object["fee_rates"] = fee_rates; _object["pools"] = pools; return _object; } void swap_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "avg_apy_1d") { _entry.second.to(avg_apy_1d); } else if(_entry.first == "avg_apy_7d") { _entry.second.to(avg_apy_7d); } else if(_entry.first == "balance") { _entry.second.to(balance); } else if(_entry.first == "fee_rates") { _entry.second.to(fee_rates); } else if(_entry.first == "fees_claimed") { _entry.second.to(fees_claimed); } else if(_entry.first == "fees_paid") { _entry.second.to(fees_paid); } else if(_entry.first == "name") { _entry.second.to(name); } else if(_entry.first == "pools") { _entry.second.to(pools); } else if(_entry.first == "tokens") { _entry.second.to(tokens); } else if(_entry.first == "user_total") { _entry.second.to(user_total); } else if(_entry.first == "volume") { _entry.second.to(volume); } else if(_entry.first == "volume_1d") { _entry.second.to(volume_1d); } else if(_entry.first == "volume_7d") { _entry.second.to(volume_7d); } else if(_entry.first == "wallet") { _entry.second.to(wallet); } } } vnx::Variant swap_info_t::get_field(const std::string& _name) const { if(_name == "name") { return vnx::Variant(name); } if(_name == "address") { return vnx::Variant(address); } if(_name == "tokens") { return vnx::Variant(tokens); } if(_name == "wallet") { return vnx::Variant(wallet); } if(_name == "balance") { return vnx::Variant(balance); } if(_name == "volume") { return vnx::Variant(volume); } if(_name == "fees_paid") { return vnx::Variant(fees_paid); } if(_name == "fees_claimed") { return vnx::Variant(fees_claimed); } if(_name == "user_total") { return vnx::Variant(user_total); } if(_name == "volume_1d") { return vnx::Variant(volume_1d); } if(_name == "volume_7d") { return vnx::Variant(volume_7d); } if(_name == "avg_apy_1d") { return vnx::Variant(avg_apy_1d); } if(_name == "avg_apy_7d") { return vnx::Variant(avg_apy_7d); } if(_name == "fee_rates") { return vnx::Variant(fee_rates); } if(_name == "pools") { return vnx::Variant(pools); } return vnx::Variant(); } void swap_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "name") { _value.to(name); } else if(_name == "address") { _value.to(address); } else if(_name == "tokens") { _value.to(tokens); } else if(_name == "wallet") { _value.to(wallet); } else if(_name == "balance") { _value.to(balance); } else if(_name == "volume") { _value.to(volume); } else if(_name == "fees_paid") { _value.to(fees_paid); } else if(_name == "fees_claimed") { _value.to(fees_claimed); } else if(_name == "user_total") { _value.to(user_total); } else if(_name == "volume_1d") { _value.to(volume_1d); } else if(_name == "volume_7d") { _value.to(volume_7d); } else if(_name == "avg_apy_1d") { _value.to(avg_apy_1d); } else if(_name == "avg_apy_7d") { _value.to(avg_apy_7d); } else if(_name == "fee_rates") { _value.to(fee_rates); } else if(_name == "pools") { _value.to(pools); } } /// \private std::ostream& operator<<(std::ostream& _out, const swap_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, swap_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* swap_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr swap_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.swap_info_t"; type_code->type_hash = vnx::Hash64(0x7586be908f15ae8ull); type_code->code_hash = vnx::Hash64(0x5ce6cfe182fce2ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::swap_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::swap_pool_info_t::static_get_type_code(); type_code->fields.resize(15); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "name"; field.code = {32}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "tokens"; field.code = {11, 2, 11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "wallet"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "balance"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "volume"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "fees_paid"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "fees_claimed"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[8]; field.is_extended = true; field.name = "user_total"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "volume_1d"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "volume_7d"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[11]; field.data_size = 16; field.name = "avg_apy_1d"; field.code = {11, 2, 10}; } { auto& field = type_code->fields[12]; field.data_size = 16; field.name = "avg_apy_7d"; field.code = {11, 2, 10}; } { auto& field = type_code->fields[13]; field.is_extended = true; field.name = "fee_rates"; field.code = {12, 10}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "pools"; field.code = {12, 19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[11]) { vnx::read_value(_buf + _field->offset, value.avg_apy_1d, _field->code.data()); } if(const auto* const _field = type_code->field_map[12]) { vnx::read_value(_buf + _field->offset, value.avg_apy_7d, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.name, type_code, _field->code.data()); break; case 1: vnx::read(in, value.address, type_code, _field->code.data()); break; case 2: vnx::read(in, value.tokens, type_code, _field->code.data()); break; case 3: vnx::read(in, value.wallet, type_code, _field->code.data()); break; case 4: vnx::read(in, value.balance, type_code, _field->code.data()); break; case 5: vnx::read(in, value.volume, type_code, _field->code.data()); break; case 6: vnx::read(in, value.fees_paid, type_code, _field->code.data()); break; case 7: vnx::read(in, value.fees_claimed, type_code, _field->code.data()); break; case 8: vnx::read(in, value.user_total, type_code, _field->code.data()); break; case 9: vnx::read(in, value.volume_1d, type_code, _field->code.data()); break; case 10: vnx::read(in, value.volume_7d, type_code, _field->code.data()); break; case 13: vnx::read(in, value.fee_rates, type_code, _field->code.data()); break; case 14: vnx::read(in, value.pools, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::swap_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_swap_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::swap_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(32); vnx::write_value(_buf + 0, value.avg_apy_1d); vnx::write_value(_buf + 16, value.avg_apy_7d); vnx::write(out, value.name, type_code, type_code->fields[0].code.data()); vnx::write(out, value.address, type_code, type_code->fields[1].code.data()); vnx::write(out, value.tokens, type_code, type_code->fields[2].code.data()); vnx::write(out, value.wallet, type_code, type_code->fields[3].code.data()); vnx::write(out, value.balance, type_code, type_code->fields[4].code.data()); vnx::write(out, value.volume, type_code, type_code->fields[5].code.data()); vnx::write(out, value.fees_paid, type_code, type_code->fields[6].code.data()); vnx::write(out, value.fees_claimed, type_code, type_code->fields[7].code.data()); vnx::write(out, value.user_total, type_code, type_code->fields[8].code.data()); vnx::write(out, value.volume_1d, type_code, type_code->fields[9].code.data()); vnx::write(out, value.volume_7d, type_code, type_code->fields[10].code.data()); vnx::write(out, value.fee_rates, type_code, type_code->fields[13].code.data()); vnx::write(out, value.pools, type_code, type_code->fields[14].code.data()); } void read(std::istream& in, ::mmx::swap_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::swap_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::swap_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::swap_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::swap_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/swap_pool_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 swap_pool_info_t::VNX_TYPE_HASH(0x6502e235a743dabull); const vnx::Hash64 swap_pool_info_t::VNX_CODE_HASH(0x4faff85eb45fb55ull); vnx::Hash64 swap_pool_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string swap_pool_info_t::get_type_name() const { return "mmx.swap_pool_info_t"; } const vnx::TypeCode* swap_pool_info_t::get_type_code() const { return mmx::vnx_native_type_code_swap_pool_info_t; } std::shared_ptr swap_pool_info_t::create() { return std::make_shared(); } std::shared_ptr swap_pool_info_t::clone() const { return std::make_shared(*this); } void swap_pool_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void swap_pool_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void swap_pool_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_swap_pool_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, balance); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, fees_paid); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, fees_claimed); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, user_total); _visitor.type_end(*_type_code); } void swap_pool_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"balance\": "; vnx::write(_out, balance); _out << ", \"fees_paid\": "; vnx::write(_out, fees_paid); _out << ", \"fees_claimed\": "; vnx::write(_out, fees_claimed); _out << ", \"user_total\": "; vnx::write(_out, user_total); _out << "}"; } void swap_pool_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object swap_pool_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.swap_pool_info_t"; _object["balance"] = balance; _object["fees_paid"] = fees_paid; _object["fees_claimed"] = fees_claimed; _object["user_total"] = user_total; return _object; } void swap_pool_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "balance") { _entry.second.to(balance); } else if(_entry.first == "fees_claimed") { _entry.second.to(fees_claimed); } else if(_entry.first == "fees_paid") { _entry.second.to(fees_paid); } else if(_entry.first == "user_total") { _entry.second.to(user_total); } } } vnx::Variant swap_pool_info_t::get_field(const std::string& _name) const { if(_name == "balance") { return vnx::Variant(balance); } if(_name == "fees_paid") { return vnx::Variant(fees_paid); } if(_name == "fees_claimed") { return vnx::Variant(fees_claimed); } if(_name == "user_total") { return vnx::Variant(user_total); } return vnx::Variant(); } void swap_pool_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "balance") { _value.to(balance); } else if(_name == "fees_paid") { _value.to(fees_paid); } else if(_name == "fees_claimed") { _value.to(fees_claimed); } else if(_name == "user_total") { _value.to(user_total); } } /// \private std::ostream& operator<<(std::ostream& _out, const swap_pool_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, swap_pool_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* swap_pool_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr swap_pool_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.swap_pool_info_t"; type_code->type_hash = vnx::Hash64(0x6502e235a743dabull); type_code->code_hash = vnx::Hash64(0x4faff85eb45fb55ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::swap_pool_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "balance"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "fees_paid"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "fees_claimed"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "user_total"; field.code = {11, 2, 11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.balance, type_code, _field->code.data()); break; case 1: vnx::read(in, value.fees_paid, type_code, _field->code.data()); break; case 2: vnx::read(in, value.fees_claimed, type_code, _field->code.data()); break; case 3: vnx::read(in, value.user_total, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::swap_pool_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_swap_pool_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::swap_pool_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.balance, type_code, type_code->fields[0].code.data()); vnx::write(out, value.fees_paid, type_code, type_code->fields[1].code.data()); vnx::write(out, value.fees_claimed, type_code, type_code->fields[2].code.data()); vnx::write(out, value.user_total, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::swap_pool_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::swap_pool_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::swap_pool_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::swap_pool_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::swap_pool_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/swap_user_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 swap_user_info_t::VNX_TYPE_HASH(0x1b6c720bff2d638cull); const vnx::Hash64 swap_user_info_t::VNX_CODE_HASH(0x996df91e34c838d2ull); vnx::Hash64 swap_user_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string swap_user_info_t::get_type_name() const { return "mmx.swap_user_info_t"; } const vnx::TypeCode* swap_user_info_t::get_type_code() const { return mmx::vnx_native_type_code_swap_user_info_t; } std::shared_ptr swap_user_info_t::create() { return std::make_shared(); } std::shared_ptr swap_user_info_t::clone() const { return std::make_shared(*this); } void swap_user_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void swap_user_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void swap_user_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_swap_user_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, pool_idx); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, balance); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, last_user_total); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, last_fees_paid); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, fees_earned); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, equivalent_liquidity); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, unlock_height); _visitor.type_end(*_type_code); } void swap_user_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"pool_idx\": "; vnx::write(_out, pool_idx); _out << ", \"balance\": "; vnx::write(_out, balance); _out << ", \"last_user_total\": "; vnx::write(_out, last_user_total); _out << ", \"last_fees_paid\": "; vnx::write(_out, last_fees_paid); _out << ", \"fees_earned\": "; vnx::write(_out, fees_earned); _out << ", \"equivalent_liquidity\": "; vnx::write(_out, equivalent_liquidity); _out << ", \"unlock_height\": "; vnx::write(_out, unlock_height); _out << "}"; } void swap_user_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object swap_user_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.swap_user_info_t"; _object["pool_idx"] = pool_idx; _object["balance"] = balance; _object["last_user_total"] = last_user_total; _object["last_fees_paid"] = last_fees_paid; _object["fees_earned"] = fees_earned; _object["equivalent_liquidity"] = equivalent_liquidity; _object["unlock_height"] = unlock_height; return _object; } void swap_user_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "balance") { _entry.second.to(balance); } else if(_entry.first == "equivalent_liquidity") { _entry.second.to(equivalent_liquidity); } else if(_entry.first == "fees_earned") { _entry.second.to(fees_earned); } else if(_entry.first == "last_fees_paid") { _entry.second.to(last_fees_paid); } else if(_entry.first == "last_user_total") { _entry.second.to(last_user_total); } else if(_entry.first == "pool_idx") { _entry.second.to(pool_idx); } else if(_entry.first == "unlock_height") { _entry.second.to(unlock_height); } } } vnx::Variant swap_user_info_t::get_field(const std::string& _name) const { if(_name == "pool_idx") { return vnx::Variant(pool_idx); } if(_name == "balance") { return vnx::Variant(balance); } if(_name == "last_user_total") { return vnx::Variant(last_user_total); } if(_name == "last_fees_paid") { return vnx::Variant(last_fees_paid); } if(_name == "fees_earned") { return vnx::Variant(fees_earned); } if(_name == "equivalent_liquidity") { return vnx::Variant(equivalent_liquidity); } if(_name == "unlock_height") { return vnx::Variant(unlock_height); } return vnx::Variant(); } void swap_user_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "pool_idx") { _value.to(pool_idx); } else if(_name == "balance") { _value.to(balance); } else if(_name == "last_user_total") { _value.to(last_user_total); } else if(_name == "last_fees_paid") { _value.to(last_fees_paid); } else if(_name == "fees_earned") { _value.to(fees_earned); } else if(_name == "equivalent_liquidity") { _value.to(equivalent_liquidity); } else if(_name == "unlock_height") { _value.to(unlock_height); } } /// \private std::ostream& operator<<(std::ostream& _out, const swap_user_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, swap_user_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* swap_user_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr swap_user_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.swap_user_info_t"; type_code->type_hash = vnx::Hash64(0x1b6c720bff2d638cull); type_code->code_hash = vnx::Hash64(0x996df91e34c838d2ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::swap_user_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(7); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "pool_idx"; field.value = vnx::to_string(-1); field.code = {7}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "balance"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "last_user_total"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "last_fees_paid"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "fees_earned"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "equivalent_liquidity"; field.code = {11, 2, 11, 16, 1}; } { auto& field = type_code->fields[6]; field.data_size = 4; field.name = "unlock_height"; field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.pool_idx, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.unlock_height, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.balance, type_code, _field->code.data()); break; case 2: vnx::read(in, value.last_user_total, type_code, _field->code.data()); break; case 3: vnx::read(in, value.last_fees_paid, type_code, _field->code.data()); break; case 4: vnx::read(in, value.fees_earned, type_code, _field->code.data()); break; case 5: vnx::read(in, value.equivalent_liquidity, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::swap_user_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_swap_user_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::swap_user_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.pool_idx); vnx::write_value(_buf + 4, value.unlock_height); vnx::write(out, value.balance, type_code, type_code->fields[1].code.data()); vnx::write(out, value.last_user_total, type_code, type_code->fields[2].code.data()); vnx::write(out, value.last_fees_paid, type_code, type_code->fields[3].code.data()); vnx::write(out, value.fees_earned, type_code, type_code->fields[4].code.data()); vnx::write(out, value.equivalent_liquidity, type_code, type_code->fields[5].code.data()); } void read(std::istream& in, ::mmx::swap_user_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::swap_user_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::swap_user_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::swap_user_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::swap_user_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/table_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 table_entry_t::VNX_TYPE_HASH(0x9bdbee40872de9a7ull); const vnx::Hash64 table_entry_t::VNX_CODE_HASH(0x7dfd2e2748a04e22ull); vnx::Hash64 table_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string table_entry_t::get_type_name() const { return "mmx.table_entry_t"; } const vnx::TypeCode* table_entry_t::get_type_code() const { return mmx::vnx_native_type_code_table_entry_t; } std::shared_ptr table_entry_t::create() { return std::make_shared(); } std::shared_ptr table_entry_t::clone() const { return std::make_shared(*this); } void table_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void table_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void table_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_table_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, y); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, meta); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, x_values); _visitor.type_end(*_type_code); } void table_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"y\": "; vnx::write(_out, y); _out << ", \"meta\": "; vnx::write(_out, meta); _out << ", \"x_values\": "; vnx::write(_out, x_values); _out << "}"; } void table_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object table_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.table_entry_t"; _object["y"] = y; _object["meta"] = meta; _object["x_values"] = x_values; return _object; } void table_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "meta") { _entry.second.to(meta); } else if(_entry.first == "x_values") { _entry.second.to(x_values); } else if(_entry.first == "y") { _entry.second.to(y); } } } vnx::Variant table_entry_t::get_field(const std::string& _name) const { if(_name == "y") { return vnx::Variant(y); } if(_name == "meta") { return vnx::Variant(meta); } if(_name == "x_values") { return vnx::Variant(x_values); } return vnx::Variant(); } void table_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "y") { _value.to(y); } else if(_name == "meta") { _value.to(meta); } else if(_name == "x_values") { _value.to(x_values); } } /// \private std::ostream& operator<<(std::ostream& _out, const table_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, table_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* table_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr table_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.table_entry_t"; type_code->type_hash = vnx::Hash64(0x9bdbee40872de9a7ull); type_code->code_hash = vnx::Hash64(0x7dfd2e2748a04e22ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::table_entry_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(3); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "y"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 48; field.name = "meta"; field.code = {11, 48, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "x_values"; field.code = {12, 3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.y, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.meta, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.x_values, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::table_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_table_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::table_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(52); vnx::write_value(_buf + 0, value.y); vnx::write_value(_buf + 4, value.meta); vnx::write(out, value.x_values, type_code, type_code->fields[2].code.data()); } void read(std::istream& in, ::mmx::table_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::table_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::table_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::table_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::table_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/trade_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 trade_entry_t::VNX_TYPE_HASH(0xed7d8e67cb8db394ull); const vnx::Hash64 trade_entry_t::VNX_CODE_HASH(0x41a3f530c0620602ull); vnx::Hash64 trade_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string trade_entry_t::get_type_name() const { return "mmx.trade_entry_t"; } const vnx::TypeCode* trade_entry_t::get_type_code() const { return mmx::vnx_native_type_code_trade_entry_t; } std::shared_ptr trade_entry_t::create() { return std::make_shared(); } std::shared_ptr trade_entry_t::clone() const { return std::make_shared(*this); } void trade_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void trade_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void trade_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_trade_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, bid_currency); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, ask_currency); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, bid_amount); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, ask_amount); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, price); _visitor.type_end(*_type_code); } void trade_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"bid_currency\": "; vnx::write(_out, bid_currency); _out << ", \"ask_currency\": "; vnx::write(_out, ask_currency); _out << ", \"bid_amount\": "; vnx::write(_out, bid_amount); _out << ", \"ask_amount\": "; vnx::write(_out, ask_amount); _out << ", \"price\": "; vnx::write(_out, price); _out << "}"; } void trade_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object trade_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.trade_entry_t"; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["address"] = address; _object["txid"] = txid; _object["bid_currency"] = bid_currency; _object["ask_currency"] = ask_currency; _object["bid_amount"] = bid_amount; _object["ask_amount"] = ask_amount; _object["price"] = price; return _object; } void trade_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "ask_amount") { _entry.second.to(ask_amount); } else if(_entry.first == "ask_currency") { _entry.second.to(ask_currency); } else if(_entry.first == "bid_amount") { _entry.second.to(bid_amount); } else if(_entry.first == "bid_currency") { _entry.second.to(bid_currency); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "price") { _entry.second.to(price); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } } } vnx::Variant trade_entry_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "address") { return vnx::Variant(address); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "bid_currency") { return vnx::Variant(bid_currency); } if(_name == "ask_currency") { return vnx::Variant(ask_currency); } if(_name == "bid_amount") { return vnx::Variant(bid_amount); } if(_name == "ask_amount") { return vnx::Variant(ask_amount); } if(_name == "price") { return vnx::Variant(price); } return vnx::Variant(); } void trade_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "address") { _value.to(address); } else if(_name == "txid") { _value.to(txid); } else if(_name == "bid_currency") { _value.to(bid_currency); } else if(_name == "ask_currency") { _value.to(ask_currency); } else if(_name == "bid_amount") { _value.to(bid_amount); } else if(_name == "ask_amount") { _value.to(ask_amount); } else if(_name == "price") { _value.to(price); } } /// \private std::ostream& operator<<(std::ostream& _out, const trade_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, trade_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* trade_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr trade_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.trade_entry_t"; type_code->type_hash = vnx::Hash64(0xed7d8e67cb8db394ull); type_code->code_hash = vnx::Hash64(0x41a3f530c0620602ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::trade_entry_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(9); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "bid_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "ask_currency"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "bid_amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "ask_amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[8]; field.data_size = 8; field.name = "price"; field.code = {10}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.price, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 2: vnx::read(in, value.address, type_code, _field->code.data()); break; case 3: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 4: vnx::read(in, value.bid_currency, type_code, _field->code.data()); break; case 5: vnx::read(in, value.ask_currency, type_code, _field->code.data()); break; case 6: vnx::read(in, value.bid_amount, type_code, _field->code.data()); break; case 7: vnx::read(in, value.ask_amount, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::trade_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_trade_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::trade_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(20); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.time_stamp); vnx::write_value(_buf + 12, value.price); vnx::write(out, value.address, type_code, type_code->fields[2].code.data()); vnx::write(out, value.txid, type_code, type_code->fields[3].code.data()); vnx::write(out, value.bid_currency, type_code, type_code->fields[4].code.data()); vnx::write(out, value.ask_currency, type_code, type_code->fields[5].code.data()); vnx::write(out, value.bid_amount, type_code, type_code->fields[6].code.data()); vnx::write(out, value.ask_amount, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::trade_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::trade_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::trade_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::trade_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::trade_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/trade_log_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 trade_log_t::VNX_TYPE_HASH(0xafedf6853c645eb8ull); const vnx::Hash64 trade_log_t::VNX_CODE_HASH(0xac626531793faaf2ull); vnx::Hash64 trade_log_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string trade_log_t::get_type_name() const { return "mmx.trade_log_t"; } const vnx::TypeCode* trade_log_t::get_type_code() const { return mmx::vnx_native_type_code_trade_log_t; } std::shared_ptr trade_log_t::create() { return std::make_shared(); } std::shared_ptr trade_log_t::clone() const { return std::make_shared(*this); } void trade_log_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void trade_log_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void trade_log_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_trade_log_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, inv_price); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, ask_amount); _visitor.type_end(*_type_code); } void trade_log_t::write(std::ostream& _out) const { _out << "{"; _out << "\"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"address\": "; vnx::write(_out, address); _out << ", \"inv_price\": "; vnx::write(_out, inv_price); _out << ", \"ask_amount\": "; vnx::write(_out, ask_amount); _out << "}"; } void trade_log_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object trade_log_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.trade_log_t"; _object["time_stamp"] = time_stamp; _object["txid"] = txid; _object["address"] = address; _object["inv_price"] = inv_price; _object["ask_amount"] = ask_amount; return _object; } void trade_log_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "ask_amount") { _entry.second.to(ask_amount); } else if(_entry.first == "inv_price") { _entry.second.to(inv_price); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } } } vnx::Variant trade_log_t::get_field(const std::string& _name) const { if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "address") { return vnx::Variant(address); } if(_name == "inv_price") { return vnx::Variant(inv_price); } if(_name == "ask_amount") { return vnx::Variant(ask_amount); } return vnx::Variant(); } void trade_log_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "txid") { _value.to(txid); } else if(_name == "address") { _value.to(address); } else if(_name == "inv_price") { _value.to(inv_price); } else if(_name == "ask_amount") { _value.to(ask_amount); } } /// \private std::ostream& operator<<(std::ostream& _out, const trade_log_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, trade_log_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* trade_log_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr trade_log_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.trade_log_t"; type_code->type_hash = vnx::Hash64(0xafedf6853c645eb8ull); type_code->code_hash = vnx::Hash64(0xac626531793faaf2ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::trade_log_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "inv_price"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "ask_amount"; field.code = {11, 16, 1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 2: vnx::read(in, value.address, type_code, _field->code.data()); break; case 3: vnx::read(in, value.inv_price, type_code, _field->code.data()); break; case 4: vnx::read(in, value.ask_amount, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::trade_log_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_trade_log_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::trade_log_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.time_stamp); vnx::write(out, value.txid, type_code, type_code->fields[1].code.data()); vnx::write(out, value.address, type_code, type_code->fields[2].code.data()); vnx::write(out, value.inv_price, type_code, type_code->fields[3].code.data()); vnx::write(out, value.ask_amount, type_code, type_code->fields[4].code.data()); } void read(std::istream& in, ::mmx::trade_log_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::trade_log_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::trade_log_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::trade_log_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::trade_log_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/tx_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 tx_entry_t::VNX_TYPE_HASH(0x438cda5719015870ull); const vnx::Hash64 tx_entry_t::VNX_CODE_HASH(0x349db5d68f110d24ull); vnx::Hash64 tx_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_entry_t::get_type_name() const { return "mmx.tx_entry_t"; } const vnx::TypeCode* tx_entry_t::get_type_code() const { return mmx::vnx_native_type_code_tx_entry_t; } std::shared_ptr tx_entry_t::create() { return std::make_shared(); } std::shared_ptr tx_entry_t::clone() const { return std::make_shared(*this); } void tx_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void tx_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_tx_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, type); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, is_validated); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, is_pending); _visitor.type_end(*_type_code); } void tx_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"type\": "; vnx::write(_out, type); _out << ", \"is_validated\": "; vnx::write(_out, is_validated); _out << ", \"is_pending\": "; vnx::write(_out, is_pending); _out << "}"; } void tx_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object tx_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_entry_t"; _object["address"] = address; _object["contract"] = contract; _object["amount"] = amount; _object["memo"] = memo; _object["txid"] = txid; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["type"] = type; _object["is_validated"] = is_validated; _object["is_pending"] = is_pending; return _object; } void tx_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "is_pending") { _entry.second.to(is_pending); } else if(_entry.first == "is_validated") { _entry.second.to(is_validated); } else if(_entry.first == "memo") { _entry.second.to(memo); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } else if(_entry.first == "type") { _entry.second.to(type); } } } vnx::Variant tx_entry_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "type") { return vnx::Variant(type); } if(_name == "is_validated") { return vnx::Variant(is_validated); } if(_name == "is_pending") { return vnx::Variant(is_pending); } return vnx::Variant(); } void tx_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "contract") { _value.to(contract); } else if(_name == "amount") { _value.to(amount); } else if(_name == "memo") { _value.to(memo); } else if(_name == "txid") { _value.to(txid); } else if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "type") { _value.to(type); } else if(_name == "is_validated") { _value.to(is_validated); } else if(_name == "is_pending") { _value.to(is_pending); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_entry_t"; type_code->type_hash = vnx::Hash64(0x438cda5719015870ull); type_code->code_hash = vnx::Hash64(0x349db5d68f110d24ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::tx_entry_t); type_code->parents.resize(2); type_code->parents[0] = ::mmx::txio_entry_t::static_get_type_code(); type_code->parents[1] = ::mmx::txio_t::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_type_e::static_get_type_code(); type_code->fields.resize(10); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "type"; field.code = {19, 0}; } { auto& field = type_code->fields[8]; field.data_size = 1; field.name = "is_validated"; field.code = {31}; } { auto& field = type_code->fields[9]; field.data_size = 1; field.name = "is_pending"; field.code = {31}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.is_validated, _field->code.data()); } if(const auto* const _field = type_code->field_map[9]) { vnx::read_value(_buf + _field->offset, value.is_pending, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.memo, type_code, _field->code.data()); break; case 4: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 7: vnx::read(in, value.type, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(14); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.time_stamp); vnx::write_value(_buf + 12, value.is_validated); vnx::write_value(_buf + 13, value.is_pending); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[3].code.data()); vnx::write(out, value.txid, type_code, type_code->fields[4].code.data()); vnx::write(out, value.type, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::tx_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::tx_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::tx_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/tx_index_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 tx_index_t::VNX_TYPE_HASH(0xc326e232ee2ebb41ull); const vnx::Hash64 tx_index_t::VNX_CODE_HASH(0xcc0b998144214be3ull); vnx::Hash64 tx_index_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_index_t::get_type_name() const { return "mmx.tx_index_t"; } const vnx::TypeCode* tx_index_t::get_type_code() const { return mmx::vnx_native_type_code_tx_index_t; } std::shared_ptr tx_index_t::create() { return std::make_shared(); } std::shared_ptr tx_index_t::clone() const { return std::make_shared(*this); } void tx_index_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_index_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void tx_index_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_tx_index_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, static_cost); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, contract_read_cost); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, file_offset); _visitor.type_end(*_type_code); } void tx_index_t::write(std::ostream& _out) const { _out << "{"; _out << "\"height\": "; vnx::write(_out, height); _out << ", \"static_cost\": "; vnx::write(_out, static_cost); _out << ", \"contract_read_cost\": "; vnx::write(_out, contract_read_cost); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"file_offset\": "; vnx::write(_out, file_offset); _out << "}"; } void tx_index_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object tx_index_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_index_t"; _object["height"] = height; _object["static_cost"] = static_cost; _object["contract_read_cost"] = contract_read_cost; _object["time_stamp"] = time_stamp; _object["file_offset"] = file_offset; return _object; } void tx_index_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "contract_read_cost") { _entry.second.to(contract_read_cost); } else if(_entry.first == "file_offset") { _entry.second.to(file_offset); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "static_cost") { _entry.second.to(static_cost); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } } } vnx::Variant tx_index_t::get_field(const std::string& _name) const { if(_name == "height") { return vnx::Variant(height); } if(_name == "static_cost") { return vnx::Variant(static_cost); } if(_name == "contract_read_cost") { return vnx::Variant(contract_read_cost); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "file_offset") { return vnx::Variant(file_offset); } return vnx::Variant(); } void tx_index_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "height") { _value.to(height); } else if(_name == "static_cost") { _value.to(static_cost); } else if(_name == "contract_read_cost") { _value.to(contract_read_cost); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "file_offset") { _value.to(file_offset); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_index_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_index_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_index_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_index_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_index_t"; type_code->type_hash = vnx::Hash64(0xc326e232ee2ebb41ull); type_code->code_hash = vnx::Hash64(0xcc0b998144214be3ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::tx_index_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(5); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "static_cost"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 4; field.name = "contract_read_cost"; field.code = {3}; } { auto& field = type_code->fields[3]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "file_offset"; field.code = {8}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.static_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.contract_read_cost, _field->code.data()); } if(const auto* const _field = type_code->field_map[3]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.file_offset, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_index_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_index_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_index_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(28); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.static_cost); vnx::write_value(_buf + 8, value.contract_read_cost); vnx::write_value(_buf + 12, value.time_stamp); vnx::write_value(_buf + 20, value.file_offset); } void read(std::istream& in, ::mmx::tx_index_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_index_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_index_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::tx_index_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::tx_index_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/tx_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { const vnx::Hash64 tx_info_t::VNX_TYPE_HASH(0x44e4a710953f4785ull); const vnx::Hash64 tx_info_t::VNX_CODE_HASH(0x455bd4d0fb65c9ccull); vnx::Hash64 tx_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_info_t::get_type_name() const { return "mmx.tx_info_t"; } const vnx::TypeCode* tx_info_t::get_type_code() const { return mmx::vnx_native_type_code_tx_info_t; } std::shared_ptr tx_info_t::create() { return std::make_shared(); } std::shared_ptr tx_info_t::clone() const { return std::make_shared(*this); } void tx_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void tx_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_tx_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, id); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, expires); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, did_fail); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, block); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, message); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, fee); _visitor.type_field(_type_code->fields[8], 8); vnx::accept(_visitor, cost); _visitor.type_field(_type_code->fields[9], 9); vnx::accept(_visitor, note); _visitor.type_field(_type_code->fields[10], 10); vnx::accept(_visitor, sender); _visitor.type_field(_type_code->fields[11], 11); vnx::accept(_visitor, inputs); _visitor.type_field(_type_code->fields[12], 12); vnx::accept(_visitor, outputs); _visitor.type_field(_type_code->fields[13], 13); vnx::accept(_visitor, operations); _visitor.type_field(_type_code->fields[14], 14); vnx::accept(_visitor, deployed); _visitor.type_field(_type_code->fields[15], 15); vnx::accept(_visitor, input_amounts); _visitor.type_field(_type_code->fields[16], 16); vnx::accept(_visitor, output_amounts); _visitor.type_field(_type_code->fields[17], 17); vnx::accept(_visitor, contracts); _visitor.type_end(*_type_code); } void tx_info_t::write(std::ostream& _out) const { _out << "{\"__type\": \"mmx.tx_info_t\""; _out << ", \"id\": "; vnx::write(_out, id); _out << ", \"expires\": "; vnx::write(_out, expires); _out << ", \"did_fail\": "; vnx::write(_out, did_fail); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"block\": "; vnx::write(_out, block); _out << ", \"message\": "; vnx::write(_out, message); _out << ", \"fee\": "; vnx::write(_out, fee); _out << ", \"cost\": "; vnx::write(_out, cost); _out << ", \"note\": "; vnx::write(_out, note); _out << ", \"sender\": "; vnx::write(_out, sender); _out << ", \"inputs\": "; vnx::write(_out, inputs); _out << ", \"outputs\": "; vnx::write(_out, outputs); _out << ", \"operations\": "; vnx::write(_out, operations); _out << ", \"deployed\": "; vnx::write(_out, deployed); _out << ", \"input_amounts\": "; vnx::write(_out, input_amounts); _out << ", \"output_amounts\": "; vnx::write(_out, output_amounts); _out << ", \"contracts\": "; vnx::write(_out, contracts); _out << "}"; } void tx_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object tx_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_info_t"; _object["id"] = id; _object["expires"] = expires; _object["did_fail"] = did_fail; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["block"] = block; _object["message"] = message; _object["fee"] = fee; _object["cost"] = cost; _object["note"] = note; _object["sender"] = sender; _object["inputs"] = inputs; _object["outputs"] = outputs; _object["operations"] = operations; _object["deployed"] = deployed; _object["input_amounts"] = input_amounts; _object["output_amounts"] = output_amounts; _object["contracts"] = contracts; return _object; } void tx_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "block") { _entry.second.to(block); } else if(_entry.first == "contracts") { _entry.second.to(contracts); } else if(_entry.first == "cost") { _entry.second.to(cost); } else if(_entry.first == "deployed") { _entry.second.to(deployed); } else if(_entry.first == "did_fail") { _entry.second.to(did_fail); } else if(_entry.first == "expires") { _entry.second.to(expires); } else if(_entry.first == "fee") { _entry.second.to(fee); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "id") { _entry.second.to(id); } else if(_entry.first == "input_amounts") { _entry.second.to(input_amounts); } else if(_entry.first == "inputs") { _entry.second.to(inputs); } else if(_entry.first == "message") { _entry.second.to(message); } else if(_entry.first == "note") { _entry.second.to(note); } else if(_entry.first == "operations") { _entry.second.to(operations); } else if(_entry.first == "output_amounts") { _entry.second.to(output_amounts); } else if(_entry.first == "outputs") { _entry.second.to(outputs); } else if(_entry.first == "sender") { _entry.second.to(sender); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } } } vnx::Variant tx_info_t::get_field(const std::string& _name) const { if(_name == "id") { return vnx::Variant(id); } if(_name == "expires") { return vnx::Variant(expires); } if(_name == "did_fail") { return vnx::Variant(did_fail); } if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "block") { return vnx::Variant(block); } if(_name == "message") { return vnx::Variant(message); } if(_name == "fee") { return vnx::Variant(fee); } if(_name == "cost") { return vnx::Variant(cost); } if(_name == "note") { return vnx::Variant(note); } if(_name == "sender") { return vnx::Variant(sender); } if(_name == "inputs") { return vnx::Variant(inputs); } if(_name == "outputs") { return vnx::Variant(outputs); } if(_name == "operations") { return vnx::Variant(operations); } if(_name == "deployed") { return vnx::Variant(deployed); } if(_name == "input_amounts") { return vnx::Variant(input_amounts); } if(_name == "output_amounts") { return vnx::Variant(output_amounts); } if(_name == "contracts") { return vnx::Variant(contracts); } return vnx::Variant(); } void tx_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "id") { _value.to(id); } else if(_name == "expires") { _value.to(expires); } else if(_name == "did_fail") { _value.to(did_fail); } else if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "block") { _value.to(block); } else if(_name == "message") { _value.to(message); } else if(_name == "fee") { _value.to(fee); } else if(_name == "cost") { _value.to(cost); } else if(_name == "note") { _value.to(note); } else if(_name == "sender") { _value.to(sender); } else if(_name == "inputs") { _value.to(inputs); } else if(_name == "outputs") { _value.to(outputs); } else if(_name == "operations") { _value.to(operations); } else if(_name == "deployed") { _value.to(deployed); } else if(_name == "input_amounts") { _value.to(input_amounts); } else if(_name == "output_amounts") { _value.to(output_amounts); } else if(_name == "contracts") { _value.to(contracts); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_info_t"; type_code->type_hash = vnx::Hash64(0x44e4a710953f4785ull); type_code->code_hash = vnx::Hash64(0x455bd4d0fb65c9ccull); type_code->is_native = true; type_code->is_class = true; type_code->native_size = sizeof(::mmx::tx_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared(); }; type_code->depends.resize(3); type_code->depends[0] = ::mmx::tx_note_e::static_get_type_code(); type_code->depends[1] = ::mmx::txin_t::static_get_type_code(); type_code->depends[2] = ::mmx::txout_t::static_get_type_code(); type_code->fields.resize(18); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "id"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "expires"; field.code = {3}; } { auto& field = type_code->fields[2]; field.data_size = 1; field.name = "did_fail"; field.code = {31}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "height"; field.code = {33, 3}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "time_stamp"; field.code = {33, 8}; } { auto& field = type_code->fields[5]; field.is_extended = true; field.name = "block"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[6]; field.is_extended = true; field.name = "message"; field.code = {33, 32}; } { auto& field = type_code->fields[7]; field.data_size = 4; field.name = "fee"; field.code = {3}; } { auto& field = type_code->fields[8]; field.data_size = 4; field.name = "cost"; field.code = {3}; } { auto& field = type_code->fields[9]; field.is_extended = true; field.name = "note"; field.code = {19, 0}; } { auto& field = type_code->fields[10]; field.is_extended = true; field.name = "sender"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[11]; field.is_extended = true; field.name = "inputs"; field.code = {12, 19, 1}; } { auto& field = type_code->fields[12]; field.is_extended = true; field.name = "outputs"; field.code = {12, 19, 2}; } { auto& field = type_code->fields[13]; field.is_extended = true; field.name = "operations"; field.code = {12, 16}; } { auto& field = type_code->fields[14]; field.is_extended = true; field.name = "deployed"; field.code = {16}; } { auto& field = type_code->fields[15]; field.is_extended = true; field.name = "input_amounts"; field.code = {13, 5, 11, 32, 1, 11, 16, 1}; } { auto& field = type_code->fields[16]; field.is_extended = true; field.name = "output_amounts"; field.code = {13, 5, 11, 32, 1, 11, 16, 1}; } { auto& field = type_code->fields[17]; field.is_extended = true; field.name = "contracts"; field.code = {13, 5, 11, 32, 1, 16}; } type_code->build(); return type_code; } std::shared_ptr tx_info_t::vnx_call_switch(std::shared_ptr _method) { switch(_method->get_type_hash()) { } return nullptr; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.expires, _field->code.data()); } if(const auto* const _field = type_code->field_map[2]) { vnx::read_value(_buf + _field->offset, value.did_fail, _field->code.data()); } if(const auto* const _field = type_code->field_map[7]) { vnx::read_value(_buf + _field->offset, value.fee, _field->code.data()); } if(const auto* const _field = type_code->field_map[8]) { vnx::read_value(_buf + _field->offset, value.cost, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.id, type_code, _field->code.data()); break; case 3: vnx::read(in, value.height, type_code, _field->code.data()); break; case 4: vnx::read(in, value.time_stamp, type_code, _field->code.data()); break; case 5: vnx::read(in, value.block, type_code, _field->code.data()); break; case 6: vnx::read(in, value.message, type_code, _field->code.data()); break; case 9: vnx::read(in, value.note, type_code, _field->code.data()); break; case 10: vnx::read(in, value.sender, type_code, _field->code.data()); break; case 11: vnx::read(in, value.inputs, type_code, _field->code.data()); break; case 12: vnx::read(in, value.outputs, type_code, _field->code.data()); break; case 13: vnx::read(in, value.operations, type_code, _field->code.data()); break; case 14: vnx::read(in, value.deployed, type_code, _field->code.data()); break; case 15: vnx::read(in, value.input_amounts, type_code, _field->code.data()); break; case 16: vnx::read(in, value.output_amounts, type_code, _field->code.data()); break; case 17: vnx::read(in, value.contracts, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(13); vnx::write_value(_buf + 0, value.expires); vnx::write_value(_buf + 4, value.did_fail); vnx::write_value(_buf + 5, value.fee); vnx::write_value(_buf + 9, value.cost); vnx::write(out, value.id, type_code, type_code->fields[0].code.data()); vnx::write(out, value.height, type_code, type_code->fields[3].code.data()); vnx::write(out, value.time_stamp, type_code, type_code->fields[4].code.data()); vnx::write(out, value.block, type_code, type_code->fields[5].code.data()); vnx::write(out, value.message, type_code, type_code->fields[6].code.data()); vnx::write(out, value.note, type_code, type_code->fields[9].code.data()); vnx::write(out, value.sender, type_code, type_code->fields[10].code.data()); vnx::write(out, value.inputs, type_code, type_code->fields[11].code.data()); vnx::write(out, value.outputs, type_code, type_code->fields[12].code.data()); vnx::write(out, value.operations, type_code, type_code->fields[13].code.data()); vnx::write(out, value.deployed, type_code, type_code->fields[14].code.data()); vnx::write(out, value.input_amounts, type_code, type_code->fields[15].code.data()); vnx::write(out, value.output_amounts, type_code, type_code->fields[16].code.data()); vnx::write(out, value.contracts, type_code, type_code->fields[17].code.data()); } void read(std::istream& in, ::mmx::tx_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_info_t& value) { value.accept(visitor); } } // vnx ================================================ FILE: generated/src/tx_log_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 tx_log_entry_t::VNX_TYPE_HASH(0xc29d95c24aff8b43ull); const vnx::Hash64 tx_log_entry_t::VNX_CODE_HASH(0x137c7ee80c73c070ull); vnx::Hash64 tx_log_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_log_entry_t::get_type_name() const { return "mmx.tx_log_entry_t"; } const vnx::TypeCode* tx_log_entry_t::get_type_code() const { return mmx::vnx_native_type_code_tx_log_entry_t; } std::shared_ptr tx_log_entry_t::create() { return std::make_shared(); } std::shared_ptr tx_log_entry_t::clone() const { return std::make_shared(*this); } void tx_log_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_log_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void tx_log_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_tx_log_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, time); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, tx); _visitor.type_end(*_type_code); } void tx_log_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"time\": "; vnx::write(_out, time); _out << ", \"tx\": "; vnx::write(_out, tx); _out << "}"; } void tx_log_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object tx_log_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_log_entry_t"; _object["time"] = time; _object["tx"] = tx; return _object; } void tx_log_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "time") { _entry.second.to(time); } else if(_entry.first == "tx") { _entry.second.to(tx); } } } vnx::Variant tx_log_entry_t::get_field(const std::string& _name) const { if(_name == "time") { return vnx::Variant(time); } if(_name == "tx") { return vnx::Variant(tx); } return vnx::Variant(); } void tx_log_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "time") { _value.to(time); } else if(_name == "tx") { _value.to(tx); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_log_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_log_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_log_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_log_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_log_entry_t"; type_code->type_hash = vnx::Hash64(0xc29d95c24aff8b43ull); type_code->code_hash = vnx::Hash64(0x137c7ee80c73c070ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::tx_log_entry_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "time"; field.code = {8}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "tx"; field.code = {16}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.time, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 1: vnx::read(in, value.tx, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_log_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_log_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_log_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.time); vnx::write(out, value.tx, type_code, type_code->fields[1].code.data()); } void read(std::istream& in, ::mmx::tx_log_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_log_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_log_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::tx_log_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::tx_log_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/tx_note_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 tx_note_e::VNX_TYPE_HASH(0x347c1deca0a9c9cull); const vnx::Hash64 tx_note_e::VNX_CODE_HASH(0x77210f7cf5390671ull); vnx::Hash64 tx_note_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_note_e::get_type_name() const { return "mmx.tx_note_e"; } const vnx::TypeCode* tx_note_e::get_type_code() const { return mmx::vnx_native_type_code_tx_note_e; } std::shared_ptr tx_note_e::create() { return std::make_shared(); } std::shared_ptr tx_note_e::clone() const { return std::make_shared(*this); } void tx_note_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_note_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t tx_note_e::is_valid() const { switch(value) { case BURN: return true; case CLAIM: return true; case DEPLOY: return true; case DEPOSIT: return true; case EXECUTE: return true; case MINT: return true; case MUTATE: return true; case OFFER: return true; case REVOKE: return true; case REWARD: return true; case TIMELORD_REWARD: return true; case TRADE: return true; case TRANSFER: return true; case WITHDRAW: return true; } return false; } std::string tx_note_e::to_string() const { switch(value) { case BURN: return "\"BURN\""; case CLAIM: return "\"CLAIM\""; case DEPLOY: return "\"DEPLOY\""; case DEPOSIT: return "\"DEPOSIT\""; case EXECUTE: return "\"EXECUTE\""; case MINT: return "\"MINT\""; case MUTATE: return "\"MUTATE\""; case OFFER: return "\"OFFER\""; case REVOKE: return "\"REVOKE\""; case REWARD: return "\"REWARD\""; case TIMELORD_REWARD: return "\"TIMELORD_REWARD\""; case TRADE: return "\"TRADE\""; case TRANSFER: return "\"TRANSFER\""; case WITHDRAW: return "\"WITHDRAW\""; } return std::to_string(value); } std::string tx_note_e::to_string_value() const { switch(value) { case BURN: return "BURN"; case CLAIM: return "CLAIM"; case DEPLOY: return "DEPLOY"; case DEPOSIT: return "DEPOSIT"; case EXECUTE: return "EXECUTE"; case MINT: return "MINT"; case MUTATE: return "MUTATE"; case OFFER: return "OFFER"; case REVOKE: return "REVOKE"; case REWARD: return "REWARD"; case TIMELORD_REWARD: return "TIMELORD_REWARD"; case TRADE: return "TRADE"; case TRANSFER: return "TRANSFER"; case WITHDRAW: return "WITHDRAW"; } return std::to_string(value); } std::string tx_note_e::to_string_value_full() const { switch(value) { case BURN: return "mmx.tx_note_e.BURN"; case CLAIM: return "mmx.tx_note_e.CLAIM"; case DEPLOY: return "mmx.tx_note_e.DEPLOY"; case DEPOSIT: return "mmx.tx_note_e.DEPOSIT"; case EXECUTE: return "mmx.tx_note_e.EXECUTE"; case MINT: return "mmx.tx_note_e.MINT"; case MUTATE: return "mmx.tx_note_e.MUTATE"; case OFFER: return "mmx.tx_note_e.OFFER"; case REVOKE: return "mmx.tx_note_e.REVOKE"; case REWARD: return "mmx.tx_note_e.REWARD"; case TIMELORD_REWARD: return "mmx.tx_note_e.TIMELORD_REWARD"; case TRADE: return "mmx.tx_note_e.TRADE"; case TRANSFER: return "mmx.tx_note_e.TRANSFER"; case WITHDRAW: return "mmx.tx_note_e.WITHDRAW"; } return std::to_string(value); } void tx_note_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void tx_note_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "BURN") value = BURN; else if(_name == "CLAIM") value = CLAIM; else if(_name == "DEPLOY") value = DEPLOY; else if(_name == "DEPOSIT") value = DEPOSIT; else if(_name == "EXECUTE") value = EXECUTE; else if(_name == "MINT") value = MINT; else if(_name == "MUTATE") value = MUTATE; else if(_name == "OFFER") value = OFFER; else if(_name == "REVOKE") value = REVOKE; else if(_name == "REWARD") value = REWARD; else if(_name == "TIMELORD_REWARD") value = TIMELORD_REWARD; else if(_name == "TRADE") value = TRADE; else if(_name == "TRANSFER") value = TRANSFER; else if(_name == "WITHDRAW") value = WITHDRAW; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void tx_note_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case BURN: _name = "BURN"; break; case CLAIM: _name = "CLAIM"; break; case DEPLOY: _name = "DEPLOY"; break; case DEPOSIT: _name = "DEPOSIT"; break; case EXECUTE: _name = "EXECUTE"; break; case MINT: _name = "MINT"; break; case MUTATE: _name = "MUTATE"; break; case OFFER: _name = "OFFER"; break; case REVOKE: _name = "REVOKE"; break; case REWARD: _name = "REWARD"; break; case TIMELORD_REWARD: _name = "TIMELORD_REWARD"; break; case TRADE: _name = "TRADE"; break; case TRANSFER: _name = "TRANSFER"; break; case WITHDRAW: _name = "WITHDRAW"; break; } _visitor.enum_value(value, _name); } void tx_note_e::write(std::ostream& _out) const { switch(value) { case BURN: _out << "\"BURN\""; break; case CLAIM: _out << "\"CLAIM\""; break; case DEPLOY: _out << "\"DEPLOY\""; break; case DEPOSIT: _out << "\"DEPOSIT\""; break; case EXECUTE: _out << "\"EXECUTE\""; break; case MINT: _out << "\"MINT\""; break; case MUTATE: _out << "\"MUTATE\""; break; case OFFER: _out << "\"OFFER\""; break; case REVOKE: _out << "\"REVOKE\""; break; case REWARD: _out << "\"REWARD\""; break; case TIMELORD_REWARD: _out << "\"TIMELORD_REWARD\""; break; case TRADE: _out << "\"TRADE\""; break; case TRANSFER: _out << "\"TRANSFER\""; break; case WITHDRAW: _out << "\"WITHDRAW\""; break; default: _out << value; } } void tx_note_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object tx_note_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_note_e"; _object["value"] = value; return _object; } void tx_note_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant tx_note_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void tx_note_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_note_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_note_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_note_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_note_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_note_e"; type_code->type_hash = vnx::Hash64(0x347c1deca0a9c9cull); type_code->code_hash = vnx::Hash64(0x77210f7cf5390671ull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::tx_note_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[1273454750] = "BURN"; type_code->enum_map[3251493825] = "CLAIM"; type_code->enum_map[251696509] = "DEPLOY"; type_code->enum_map[4272391094] = "DEPOSIT"; type_code->enum_map[356250251] = "EXECUTE"; type_code->enum_map[2140500429] = "MINT"; type_code->enum_map[2579166487] = "MUTATE"; type_code->enum_map[1549148948] = "OFFER"; type_code->enum_map[3821531424] = "REVOKE"; type_code->enum_map[3842121424] = "REWARD"; type_code->enum_map[1783340485] = "TIMELORD_REWARD"; type_code->enum_map[329618288] = "TRADE"; type_code->enum_map[858544509] = "TRANSFER"; type_code->enum_map[4266232802] = "WITHDRAW"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::tx_note_e::enum_t(tmp.to()); } else { value = ::mmx::tx_note_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_note_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_note_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_note_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::tx_note_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_note_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_note_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::tx_note_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::tx_note_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::tx_note_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::tx_note_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::tx_note_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::tx_note_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::tx_note_e::enum_t& _value) { return ::mmx::tx_note_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::tx_note_e::enum_t& _value) { return ::mmx::tx_note_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::tx_note_e::enum_t& _value) { return ::mmx::tx_note_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::tx_note_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::tx_note_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/tx_type_e.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 tx_type_e::VNX_TYPE_HASH(0x3b7f577c2cfd4c91ull); const vnx::Hash64 tx_type_e::VNX_CODE_HASH(0x3fb4b4c341be138dull); vnx::Hash64 tx_type_e::get_type_hash() const { return VNX_TYPE_HASH; } std::string tx_type_e::get_type_name() const { return "mmx.tx_type_e"; } const vnx::TypeCode* tx_type_e::get_type_code() const { return mmx::vnx_native_type_code_tx_type_e; } std::shared_ptr tx_type_e::create() { return std::make_shared(); } std::shared_ptr tx_type_e::clone() const { return std::make_shared(*this); } void tx_type_e::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void tx_type_e::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } vnx::bool_t tx_type_e::is_valid() const { switch(value) { case PROJECT_REWARD: return true; case RECEIVE: return true; case REWARD: return true; case SPEND: return true; case TXFEE: return true; case VDF_REWARD: return true; } return false; } std::string tx_type_e::to_string() const { switch(value) { case PROJECT_REWARD: return "\"PROJECT_REWARD\""; case RECEIVE: return "\"RECEIVE\""; case REWARD: return "\"REWARD\""; case SPEND: return "\"SPEND\""; case TXFEE: return "\"TXFEE\""; case VDF_REWARD: return "\"VDF_REWARD\""; } return std::to_string(value); } std::string tx_type_e::to_string_value() const { switch(value) { case PROJECT_REWARD: return "PROJECT_REWARD"; case RECEIVE: return "RECEIVE"; case REWARD: return "REWARD"; case SPEND: return "SPEND"; case TXFEE: return "TXFEE"; case VDF_REWARD: return "VDF_REWARD"; } return std::to_string(value); } std::string tx_type_e::to_string_value_full() const { switch(value) { case PROJECT_REWARD: return "mmx.tx_type_e.PROJECT_REWARD"; case RECEIVE: return "mmx.tx_type_e.RECEIVE"; case REWARD: return "mmx.tx_type_e.REWARD"; case SPEND: return "mmx.tx_type_e.SPEND"; case TXFEE: return "mmx.tx_type_e.TXFEE"; case VDF_REWARD: return "mmx.tx_type_e.VDF_REWARD"; } return std::to_string(value); } void tx_type_e::from_string(const std::string& _str) { std::string _name; vnx::from_string(_str, _name); from_string_value(_name); } void tx_type_e::from_string_value(const std::string& _name) { vnx::Variant var; vnx::from_string_value(_name, var); if(var.is_string()) { if(_name == "PROJECT_REWARD") value = PROJECT_REWARD; else if(_name == "RECEIVE") value = RECEIVE; else if(_name == "REWARD") value = REWARD; else if(_name == "SPEND") value = SPEND; else if(_name == "TXFEE") value = TXFEE; else if(_name == "VDF_REWARD") value = VDF_REWARD; else value = enum_t(vnx::hash64(_name)); } else { value = enum_t(std::stoul(_name.c_str(), nullptr, 0)); } } void tx_type_e::accept(vnx::Visitor& _visitor) const { std::string _name; switch(value) { case PROJECT_REWARD: _name = "PROJECT_REWARD"; break; case RECEIVE: _name = "RECEIVE"; break; case REWARD: _name = "REWARD"; break; case SPEND: _name = "SPEND"; break; case TXFEE: _name = "TXFEE"; break; case VDF_REWARD: _name = "VDF_REWARD"; break; } _visitor.enum_value(value, _name); } void tx_type_e::write(std::ostream& _out) const { switch(value) { case PROJECT_REWARD: _out << "\"PROJECT_REWARD\""; break; case RECEIVE: _out << "\"RECEIVE\""; break; case REWARD: _out << "\"REWARD\""; break; case SPEND: _out << "\"SPEND\""; break; case TXFEE: _out << "\"TXFEE\""; break; case VDF_REWARD: _out << "\"VDF_REWARD\""; break; default: _out << value; } } void tx_type_e::read(std::istream& _in) { from_string_value(vnx::read(_in).to_string_value()); } vnx::Object tx_type_e::to_object() const { vnx::Object _object; _object["__type"] = "mmx.tx_type_e"; _object["value"] = value; return _object; } void tx_type_e::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant tx_type_e::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } return vnx::Variant(); } void tx_type_e::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } } /// \private std::ostream& operator<<(std::ostream& _out, const tx_type_e& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, tx_type_e& _value) { _value.read(_in); return _in; } const vnx::TypeCode* tx_type_e::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr tx_type_e::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.tx_type_e"; type_code->type_hash = vnx::Hash64(0x3b7f577c2cfd4c91ull); type_code->code_hash = vnx::Hash64(0x3fb4b4c341be138dull); type_code->is_native = true; type_code->is_enum = true; type_code->native_size = sizeof(::mmx::tx_type_e); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(1); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } type_code->enum_map[795347438] = "PROJECT_REWARD"; type_code->enum_map[940023181] = "RECEIVE"; type_code->enum_map[3842121424] = "REWARD"; type_code->enum_map[2341768809] = "SPEND"; type_code->enum_map[3965595220] = "TXFEE"; type_code->enum_map[1923446990] = "VDF_REWARD"; type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { vnx::from_string(tmp.to_string(), value); } else if(tmp.is_ulong()) { value = ::mmx::tx_type_e::enum_t(tmp.to()); } else { value = ::mmx::tx_type_e(); } return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::tx_type_e& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_STRING) { vnx::write(out, value.to_string_value(), nullptr, code); return; } if(code && code[0] == CODE_UINT32) { vnx::write(out, value.value, nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_tx_type_e; out.write_type_code(type_code); vnx::write_class_header<::mmx::tx_type_e>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(4); vnx::write_value(_buf + 0, value.value); } void read(std::istream& in, ::mmx::tx_type_e& value) { value.read(in); } void write(std::ostream& out, const ::mmx::tx_type_e& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::tx_type_e& value) { value.accept(visitor); } void read(TypeInput& in, ::mmx::tx_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { uint32_t tmp = 0; vnx::read(in, tmp, type_code, code); value = ::mmx::tx_type_e::enum_t(tmp); } void write(TypeOutput& out, const ::mmx::tx_type_e::enum_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, uint32_t(value), type_code, code); } template<> std::string to_string(const ::mmx::tx_type_e& _value) { return _value.to_string(); } template<> std::string to_string_value(const ::mmx::tx_type_e& _value) { return _value.to_string_value(); } template<> std::string to_string_value_full(const ::mmx::tx_type_e& _value) { return _value.to_string_value_full(); } template<> std::string to_string(const ::mmx::tx_type_e::enum_t& _value) { return ::mmx::tx_type_e(_value).to_string(); } template<> std::string to_string_value(const ::mmx::tx_type_e::enum_t& _value) { return ::mmx::tx_type_e(_value).to_string_value(); } template<> std::string to_string_value_full(const ::mmx::tx_type_e::enum_t& _value) { return ::mmx::tx_type_e(_value).to_string_value_full(); } bool is_equivalent<::mmx::tx_type_e>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::tx_type_e::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/txin_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const uint8_t txin_t::IS_EXEC; const uint16_t txin_t::NO_SOLUTION; const vnx::Hash64 txin_t::VNX_TYPE_HASH(0xda6587114a2413full); const vnx::Hash64 txin_t::VNX_CODE_HASH(0xf995f5e67a956c4eull); vnx::Hash64 txin_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string txin_t::get_type_name() const { return "mmx.txin_t"; } const vnx::TypeCode* txin_t::get_type_code() const { return mmx::vnx_native_type_code_txin_t; } std::shared_ptr txin_t::create() { return std::make_shared(); } std::shared_ptr txin_t::clone() const { return std::make_shared(*this); } void txin_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void txin_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void txin_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_txin_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, solution); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, flags); _visitor.type_end(*_type_code); } void txin_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"solution\": "; vnx::write(_out, solution); _out << ", \"flags\": "; vnx::write(_out, flags); _out << "}"; } void txin_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object txin_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.txin_t"; _object["address"] = address; _object["contract"] = contract; _object["amount"] = amount; _object["memo"] = memo; _object["solution"] = solution; _object["flags"] = flags; return _object; } void txin_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "flags") { _entry.second.to(flags); } else if(_entry.first == "memo") { _entry.second.to(memo); } else if(_entry.first == "solution") { _entry.second.to(solution); } } } vnx::Variant txin_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "solution") { return vnx::Variant(solution); } if(_name == "flags") { return vnx::Variant(flags); } return vnx::Variant(); } void txin_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "contract") { _value.to(contract); } else if(_name == "amount") { _value.to(amount); } else if(_name == "memo") { _value.to(memo); } else if(_name == "solution") { _value.to(solution); } else if(_name == "flags") { _value.to(flags); } } /// \private std::ostream& operator<<(std::ostream& _out, const txin_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, txin_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* txin_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr txin_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.txin_t"; type_code->type_hash = vnx::Hash64(0xda6587114a2413full); type_code->code_hash = vnx::Hash64(0xf995f5e67a956c4eull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::txin_t); type_code->parents.resize(1); type_code->parents[0] = ::mmx::txio_t::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } { auto& field = type_code->fields[4]; field.data_size = 2; field.name = "solution"; field.value = vnx::to_string(-1); field.code = {2}; } { auto& field = type_code->fields[5]; field.data_size = 1; field.name = "flags"; field.code = {1}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.solution, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.flags, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.memo, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::txin_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_txin_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::txin_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(3); vnx::write_value(_buf + 0, value.solution); vnx::write_value(_buf + 2, value.flags); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::txin_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::txin_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::txin_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::txin_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::txin_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/txio_entry_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const vnx::Hash64 txio_entry_t::VNX_TYPE_HASH(0x2d1c65e166ab244bull); const vnx::Hash64 txio_entry_t::VNX_CODE_HASH(0x2daf93e2887e8013ull); vnx::Hash64 txio_entry_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string txio_entry_t::get_type_name() const { return "mmx.txio_entry_t"; } const vnx::TypeCode* txio_entry_t::get_type_code() const { return mmx::vnx_native_type_code_txio_entry_t; } std::shared_ptr txio_entry_t::create() { return std::make_shared(); } std::shared_ptr txio_entry_t::clone() const { return std::make_shared(*this); } void txio_entry_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void txio_entry_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void txio_entry_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_txio_entry_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, memo); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, txid); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, height); _visitor.type_field(_type_code->fields[6], 6); vnx::accept(_visitor, time_stamp); _visitor.type_field(_type_code->fields[7], 7); vnx::accept(_visitor, type); _visitor.type_end(*_type_code); } void txio_entry_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"memo\": "; vnx::write(_out, memo); _out << ", \"txid\": "; vnx::write(_out, txid); _out << ", \"height\": "; vnx::write(_out, height); _out << ", \"time_stamp\": "; vnx::write(_out, time_stamp); _out << ", \"type\": "; vnx::write(_out, type); _out << "}"; } void txio_entry_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object txio_entry_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.txio_entry_t"; _object["address"] = address; _object["contract"] = contract; _object["amount"] = amount; _object["memo"] = memo; _object["txid"] = txid; _object["height"] = height; _object["time_stamp"] = time_stamp; _object["type"] = type; return _object; } void txio_entry_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "height") { _entry.second.to(height); } else if(_entry.first == "memo") { _entry.second.to(memo); } else if(_entry.first == "time_stamp") { _entry.second.to(time_stamp); } else if(_entry.first == "txid") { _entry.second.to(txid); } else if(_entry.first == "type") { _entry.second.to(type); } } } vnx::Variant txio_entry_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "memo") { return vnx::Variant(memo); } if(_name == "txid") { return vnx::Variant(txid); } if(_name == "height") { return vnx::Variant(height); } if(_name == "time_stamp") { return vnx::Variant(time_stamp); } if(_name == "type") { return vnx::Variant(type); } return vnx::Variant(); } void txio_entry_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "contract") { _value.to(contract); } else if(_name == "amount") { _value.to(amount); } else if(_name == "memo") { _value.to(memo); } else if(_name == "txid") { _value.to(txid); } else if(_name == "height") { _value.to(height); } else if(_name == "time_stamp") { _value.to(time_stamp); } else if(_name == "type") { _value.to(type); } } /// \private std::ostream& operator<<(std::ostream& _out, const txio_entry_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, txio_entry_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* txio_entry_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr txio_entry_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.txio_entry_t"; type_code->type_hash = vnx::Hash64(0x2d1c65e166ab244bull); type_code->code_hash = vnx::Hash64(0x2daf93e2887e8013ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::txio_entry_t); type_code->parents.resize(1); type_code->parents[0] = ::mmx::txio_t::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->depends.resize(1); type_code->depends[0] = ::mmx::tx_type_e::static_get_type_code(); type_code->fields.resize(8); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } { auto& field = type_code->fields[4]; field.is_extended = true; field.name = "txid"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[5]; field.data_size = 4; field.name = "height"; field.code = {3}; } { auto& field = type_code->fields[6]; field.data_size = 8; field.name = "time_stamp"; field.code = {8}; } { auto& field = type_code->fields[7]; field.is_extended = true; field.name = "type"; field.code = {19, 0}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.height, _field->code.data()); } if(const auto* const _field = type_code->field_map[6]) { vnx::read_value(_buf + _field->offset, value.time_stamp, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.memo, type_code, _field->code.data()); break; case 4: vnx::read(in, value.txid, type_code, _field->code.data()); break; case 7: vnx::read(in, value.type, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::txio_entry_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_txio_entry_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::txio_entry_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(12); vnx::write_value(_buf + 0, value.height); vnx::write_value(_buf + 4, value.time_stamp); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[3].code.data()); vnx::write(out, value.txid, type_code, type_code->fields[4].code.data()); vnx::write(out, value.type, type_code, type_code->fields[7].code.data()); } void read(std::istream& in, ::mmx::txio_entry_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::txio_entry_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::txio_entry_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::txio_entry_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::txio_entry_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/txio_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include #include namespace mmx { const uint32_t txio_t::MAX_MEMO_SIZE; const vnx::Hash64 txio_t::VNX_TYPE_HASH(0x32adb93b85c82cf4ull); const vnx::Hash64 txio_t::VNX_CODE_HASH(0x7ddcede672a6e7ddull); vnx::Hash64 txio_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string txio_t::get_type_name() const { return "mmx.txio_t"; } const vnx::TypeCode* txio_t::get_type_code() const { return mmx::vnx_native_type_code_txio_t; } std::shared_ptr txio_t::create() { return std::make_shared(); } std::shared_ptr txio_t::clone() const { return std::make_shared(*this); } void txio_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void txio_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void txio_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_txio_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, memo); _visitor.type_end(*_type_code); } void txio_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"memo\": "; vnx::write(_out, memo); _out << "}"; } void txio_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object txio_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.txio_t"; _object["address"] = address; _object["contract"] = contract; _object["amount"] = amount; _object["memo"] = memo; return _object; } void txio_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "memo") { _entry.second.to(memo); } } } vnx::Variant txio_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "memo") { return vnx::Variant(memo); } return vnx::Variant(); } void txio_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "contract") { _value.to(contract); } else if(_name == "amount") { _value.to(amount); } else if(_name == "memo") { _value.to(memo); } } /// \private std::ostream& operator<<(std::ostream& _out, const txio_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, txio_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* txio_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr txio_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.txio_t"; type_code->type_hash = vnx::Hash64(0x32adb93b85c82cf4ull); type_code->code_hash = vnx::Hash64(0x7ddcede672a6e7ddull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::txio_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.memo, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::txio_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_txio_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::txio_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::txio_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::txio_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::txio_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::txio_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::txio_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/txout_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include namespace mmx { const vnx::Hash64 txout_t::VNX_TYPE_HASH(0xaa91772752216576ull); const vnx::Hash64 txout_t::VNX_CODE_HASH(0xa65c408fd2dafa11ull); vnx::Hash64 txout_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string txout_t::get_type_name() const { return "mmx.txout_t"; } const vnx::TypeCode* txout_t::get_type_code() const { return mmx::vnx_native_type_code_txout_t; } std::shared_ptr txout_t::create() { return std::make_shared(); } std::shared_ptr txout_t::clone() const { return std::make_shared(*this); } void txout_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void txout_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void txout_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_txout_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, contract); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, amount); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, memo); _visitor.type_end(*_type_code); } void txout_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"contract\": "; vnx::write(_out, contract); _out << ", \"amount\": "; vnx::write(_out, amount); _out << ", \"memo\": "; vnx::write(_out, memo); _out << "}"; } void txout_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object txout_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.txout_t"; _object["address"] = address; _object["contract"] = contract; _object["amount"] = amount; _object["memo"] = memo; return _object; } void txout_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "amount") { _entry.second.to(amount); } else if(_entry.first == "contract") { _entry.second.to(contract); } else if(_entry.first == "memo") { _entry.second.to(memo); } } } vnx::Variant txout_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "contract") { return vnx::Variant(contract); } if(_name == "amount") { return vnx::Variant(amount); } if(_name == "memo") { return vnx::Variant(memo); } return vnx::Variant(); } void txout_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "contract") { _value.to(contract); } else if(_name == "amount") { _value.to(amount); } else if(_name == "memo") { _value.to(memo); } } /// \private std::ostream& operator<<(std::ostream& _out, const txout_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, txout_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* txout_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr txout_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.txout_t"; type_code->type_hash = vnx::Hash64(0xaa91772752216576ull); type_code->code_hash = vnx::Hash64(0xa65c408fd2dafa11ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::txout_t); type_code->parents.resize(1); type_code->parents[0] = ::mmx::txio_t::static_get_type_code(); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(4); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "contract"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "amount"; field.code = {11, 16, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "memo"; field.code = {33, 32}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } in.read(type_code->total_field_size); if(type_code->is_matched) { } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.contract, type_code, _field->code.data()); break; case 2: vnx::read(in, value.amount, type_code, _field->code.data()); break; case 3: vnx::read(in, value.memo, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::txout_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_txout_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::txout_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.contract, type_code, type_code->fields[1].code.data()); vnx::write(out, value.amount, type_code, type_code->fields[2].code.data()); vnx::write(out, value.memo, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::txout_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::txout_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::txout_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::txout_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::txout_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/uint_fraction_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 uint_fraction_t::VNX_TYPE_HASH(0xe5632136b5a3ed5aull); const vnx::Hash64 uint_fraction_t::VNX_CODE_HASH(0xb9b3b6bfa9321e82ull); vnx::Hash64 uint_fraction_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string uint_fraction_t::get_type_name() const { return "mmx.uint_fraction_t"; } const vnx::TypeCode* uint_fraction_t::get_type_code() const { return mmx::vnx_native_type_code_uint_fraction_t; } std::shared_ptr uint_fraction_t::create() { return std::make_shared(); } std::shared_ptr uint_fraction_t::clone() const { return std::make_shared(*this); } void uint_fraction_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void uint_fraction_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void uint_fraction_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_uint_fraction_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, value); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, inverse); _visitor.type_end(*_type_code); } void uint_fraction_t::write(std::ostream& _out) const { _out << "{"; _out << "\"value\": "; vnx::write(_out, value); _out << ", \"inverse\": "; vnx::write(_out, inverse); _out << "}"; } void uint_fraction_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object uint_fraction_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.uint_fraction_t"; _object["value"] = value; _object["inverse"] = inverse; return _object; } void uint_fraction_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "inverse") { _entry.second.to(inverse); } else if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant uint_fraction_t::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } if(_name == "inverse") { return vnx::Variant(inverse); } return vnx::Variant(); } void uint_fraction_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } else if(_name == "inverse") { _value.to(inverse); } } /// \private std::ostream& operator<<(std::ostream& _out, const uint_fraction_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, uint_fraction_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* uint_fraction_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr uint_fraction_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.uint_fraction_t"; type_code->type_hash = vnx::Hash64(0xe5632136b5a3ed5aull); type_code->code_hash = vnx::Hash64(0xb9b3b6bfa9321e82ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::uint_fraction_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 4; field.name = "value"; field.code = {3}; } { auto& field = type_code->fields[1]; field.data_size = 4; field.name = "inverse"; field.value = vnx::to_string(1); field.code = {3}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.inverse, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::uint_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_uint_fraction_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::uint_fraction_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(8); vnx::write_value(_buf + 0, value.value); vnx::write_value(_buf + 4, value.inverse); } void read(std::istream& in, ::mmx::uint_fraction_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::uint_fraction_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::uint_fraction_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::uint_fraction_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::uint_fraction_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/ulong_fraction_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace mmx { const vnx::Hash64 ulong_fraction_t::VNX_TYPE_HASH(0xe9c2388a9c35ce06ull); const vnx::Hash64 ulong_fraction_t::VNX_CODE_HASH(0xaac983b163951134ull); vnx::Hash64 ulong_fraction_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string ulong_fraction_t::get_type_name() const { return "mmx.ulong_fraction_t"; } const vnx::TypeCode* ulong_fraction_t::get_type_code() const { return mmx::vnx_native_type_code_ulong_fraction_t; } std::shared_ptr ulong_fraction_t::create() { return std::make_shared(); } std::shared_ptr ulong_fraction_t::clone() const { return std::make_shared(*this); } void ulong_fraction_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void ulong_fraction_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void ulong_fraction_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_ulong_fraction_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, value); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, inverse); _visitor.type_end(*_type_code); } void ulong_fraction_t::write(std::ostream& _out) const { _out << "{"; _out << "\"value\": "; vnx::write(_out, value); _out << ", \"inverse\": "; vnx::write(_out, inverse); _out << "}"; } void ulong_fraction_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object ulong_fraction_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.ulong_fraction_t"; _object["value"] = value; _object["inverse"] = inverse; return _object; } void ulong_fraction_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "inverse") { _entry.second.to(inverse); } else if(_entry.first == "value") { _entry.second.to(value); } } } vnx::Variant ulong_fraction_t::get_field(const std::string& _name) const { if(_name == "value") { return vnx::Variant(value); } if(_name == "inverse") { return vnx::Variant(inverse); } return vnx::Variant(); } void ulong_fraction_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "value") { _value.to(value); } else if(_name == "inverse") { _value.to(inverse); } } /// \private std::ostream& operator<<(std::ostream& _out, const ulong_fraction_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, ulong_fraction_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* ulong_fraction_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr ulong_fraction_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.ulong_fraction_t"; type_code->type_hash = vnx::Hash64(0xe9c2388a9c35ce06ull); type_code->code_hash = vnx::Hash64(0xaac983b163951134ull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::ulong_fraction_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(2); { auto& field = type_code->fields[0]; field.data_size = 8; field.name = "value"; field.code = {4}; } { auto& field = type_code->fields[1]; field.data_size = 8; field.name = "inverse"; field.value = vnx::to_string(1); field.code = {4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[0]) { vnx::read_value(_buf + _field->offset, value.value, _field->code.data()); } if(const auto* const _field = type_code->field_map[1]) { vnx::read_value(_buf + _field->offset, value.inverse, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::ulong_fraction_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_ulong_fraction_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::ulong_fraction_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(16); vnx::write_value(_buf + 0, value.value); vnx::write_value(_buf + 8, value.inverse); } void read(std::istream& in, ::mmx::ulong_fraction_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::ulong_fraction_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::ulong_fraction_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::ulong_fraction_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::ulong_fraction_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/src/virtual_plot_info_t.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include #include #include namespace mmx { const vnx::Hash64 virtual_plot_info_t::VNX_TYPE_HASH(0xcbcd7c49be95180eull); const vnx::Hash64 virtual_plot_info_t::VNX_CODE_HASH(0xd4df0d56b713df9eull); vnx::Hash64 virtual_plot_info_t::get_type_hash() const { return VNX_TYPE_HASH; } std::string virtual_plot_info_t::get_type_name() const { return "mmx.virtual_plot_info_t"; } const vnx::TypeCode* virtual_plot_info_t::get_type_code() const { return mmx::vnx_native_type_code_virtual_plot_info_t; } std::shared_ptr virtual_plot_info_t::create() { return std::make_shared(); } std::shared_ptr virtual_plot_info_t::clone() const { return std::make_shared(*this); } void virtual_plot_info_t::read(vnx::TypeInput& _in, const vnx::TypeCode* _type_code, const uint16_t* _code) { vnx::read(_in, *this, _type_code, _code); } void virtual_plot_info_t::write(vnx::TypeOutput& _out, const vnx::TypeCode* _type_code, const uint16_t* _code) const { vnx::write(_out, *this, _type_code, _code); } void virtual_plot_info_t::accept(vnx::Visitor& _visitor) const { const vnx::TypeCode* _type_code = mmx::vnx_native_type_code_virtual_plot_info_t; _visitor.type_begin(*_type_code); _visitor.type_field(_type_code->fields[0], 0); vnx::accept(_visitor, address); _visitor.type_field(_type_code->fields[1], 1); vnx::accept(_visitor, owner); _visitor.type_field(_type_code->fields[2], 2); vnx::accept(_visitor, farmer_key); _visitor.type_field(_type_code->fields[3], 3); vnx::accept(_visitor, reward_address); _visitor.type_field(_type_code->fields[4], 4); vnx::accept(_visitor, balance); _visitor.type_field(_type_code->fields[5], 5); vnx::accept(_visitor, size_bytes); _visitor.type_end(*_type_code); } void virtual_plot_info_t::write(std::ostream& _out) const { _out << "{"; _out << "\"address\": "; vnx::write(_out, address); _out << ", \"owner\": "; vnx::write(_out, owner); _out << ", \"farmer_key\": "; vnx::write(_out, farmer_key); _out << ", \"reward_address\": "; vnx::write(_out, reward_address); _out << ", \"balance\": "; vnx::write(_out, balance); _out << ", \"size_bytes\": "; vnx::write(_out, size_bytes); _out << "}"; } void virtual_plot_info_t::read(std::istream& _in) { if(auto _json = vnx::read_json(_in)) { from_object(_json->to_object()); } } vnx::Object virtual_plot_info_t::to_object() const { vnx::Object _object; _object["__type"] = "mmx.virtual_plot_info_t"; _object["address"] = address; _object["owner"] = owner; _object["farmer_key"] = farmer_key; _object["reward_address"] = reward_address; _object["balance"] = balance; _object["size_bytes"] = size_bytes; return _object; } void virtual_plot_info_t::from_object(const vnx::Object& _object) { for(const auto& _entry : _object.field) { if(_entry.first == "address") { _entry.second.to(address); } else if(_entry.first == "balance") { _entry.second.to(balance); } else if(_entry.first == "farmer_key") { _entry.second.to(farmer_key); } else if(_entry.first == "owner") { _entry.second.to(owner); } else if(_entry.first == "reward_address") { _entry.second.to(reward_address); } else if(_entry.first == "size_bytes") { _entry.second.to(size_bytes); } } } vnx::Variant virtual_plot_info_t::get_field(const std::string& _name) const { if(_name == "address") { return vnx::Variant(address); } if(_name == "owner") { return vnx::Variant(owner); } if(_name == "farmer_key") { return vnx::Variant(farmer_key); } if(_name == "reward_address") { return vnx::Variant(reward_address); } if(_name == "balance") { return vnx::Variant(balance); } if(_name == "size_bytes") { return vnx::Variant(size_bytes); } return vnx::Variant(); } void virtual_plot_info_t::set_field(const std::string& _name, const vnx::Variant& _value) { if(_name == "address") { _value.to(address); } else if(_name == "owner") { _value.to(owner); } else if(_name == "farmer_key") { _value.to(farmer_key); } else if(_name == "reward_address") { _value.to(reward_address); } else if(_name == "balance") { _value.to(balance); } else if(_name == "size_bytes") { _value.to(size_bytes); } } /// \private std::ostream& operator<<(std::ostream& _out, const virtual_plot_info_t& _value) { _value.write(_out); return _out; } /// \private std::istream& operator>>(std::istream& _in, virtual_plot_info_t& _value) { _value.read(_in); return _in; } const vnx::TypeCode* virtual_plot_info_t::static_get_type_code() { const vnx::TypeCode* type_code = vnx::get_type_code(VNX_TYPE_HASH); if(!type_code) { type_code = vnx::register_type_code(static_create_type_code()); } return type_code; } std::shared_ptr virtual_plot_info_t::static_create_type_code() { auto type_code = std::make_shared(); type_code->name = "mmx.virtual_plot_info_t"; type_code->type_hash = vnx::Hash64(0xcbcd7c49be95180eull); type_code->code_hash = vnx::Hash64(0xd4df0d56b713df9eull); type_code->is_native = true; type_code->native_size = sizeof(::mmx::virtual_plot_info_t); type_code->create_value = []() -> std::shared_ptr { return std::make_shared>(); }; type_code->fields.resize(6); { auto& field = type_code->fields[0]; field.is_extended = true; field.name = "address"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[1]; field.is_extended = true; field.name = "owner"; field.code = {11, 32, 1}; } { auto& field = type_code->fields[2]; field.is_extended = true; field.name = "farmer_key"; field.code = {11, 33, 1}; } { auto& field = type_code->fields[3]; field.is_extended = true; field.name = "reward_address"; field.code = {33, 11, 32, 1}; } { auto& field = type_code->fields[4]; field.data_size = 8; field.name = "balance"; field.code = {4}; } { auto& field = type_code->fields[5]; field.data_size = 8; field.name = "size_bytes"; field.code = {4}; } type_code->build(); return type_code; } } // namespace mmx namespace vnx { void read(TypeInput& in, ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code) { TypeInput::recursion_t tag(in); if(code) { switch(code[0]) { case CODE_OBJECT: case CODE_ALT_OBJECT: { Object tmp; vnx::read(in, tmp, type_code, code); value.from_object(tmp); return; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: vnx::read_dynamic(in, value); return; } } if(!type_code) { vnx::skip(in, type_code, code); return; } if(code) { switch(code[0]) { case CODE_STRUCT: type_code = type_code->depends[code[1]]; break; case CODE_ALT_STRUCT: type_code = type_code->depends[vnx::flip_bytes(code[1])]; break; default: { vnx::skip(in, type_code, code); return; } } } const auto* const _buf = in.read(type_code->total_field_size); if(type_code->is_matched) { if(const auto* const _field = type_code->field_map[4]) { vnx::read_value(_buf + _field->offset, value.balance, _field->code.data()); } if(const auto* const _field = type_code->field_map[5]) { vnx::read_value(_buf + _field->offset, value.size_bytes, _field->code.data()); } } for(const auto* _field : type_code->ext_fields) { switch(_field->native_index) { case 0: vnx::read(in, value.address, type_code, _field->code.data()); break; case 1: vnx::read(in, value.owner, type_code, _field->code.data()); break; case 2: vnx::read(in, value.farmer_key, type_code, _field->code.data()); break; case 3: vnx::read(in, value.reward_address, type_code, _field->code.data()); break; default: vnx::skip(in, type_code, _field->code.data()); } } } void write(TypeOutput& out, const ::mmx::virtual_plot_info_t& value, const TypeCode* type_code, const uint16_t* code) { if(code && code[0] == CODE_OBJECT) { vnx::write(out, value.to_object(), nullptr, code); return; } if(!type_code || (code && code[0] == CODE_ANY)) { type_code = mmx::vnx_native_type_code_virtual_plot_info_t; out.write_type_code(type_code); vnx::write_class_header<::mmx::virtual_plot_info_t>(out); } else if(code && code[0] == CODE_STRUCT) { type_code = type_code->depends[code[1]]; } auto* const _buf = out.write(16); vnx::write_value(_buf + 0, value.balance); vnx::write_value(_buf + 8, value.size_bytes); vnx::write(out, value.address, type_code, type_code->fields[0].code.data()); vnx::write(out, value.owner, type_code, type_code->fields[1].code.data()); vnx::write(out, value.farmer_key, type_code, type_code->fields[2].code.data()); vnx::write(out, value.reward_address, type_code, type_code->fields[3].code.data()); } void read(std::istream& in, ::mmx::virtual_plot_info_t& value) { value.read(in); } void write(std::ostream& out, const ::mmx::virtual_plot_info_t& value) { value.write(out); } void accept(Visitor& visitor, const ::mmx::virtual_plot_info_t& value) { value.accept(visitor); } bool is_equivalent<::mmx::virtual_plot_info_t>::operator()(const uint16_t* code, const TypeCode* type_code) { if(code[0] != CODE_STRUCT || !type_code) { return false; } type_code = type_code->depends[code[1]]; return type_code->type_hash == ::mmx::virtual_plot_info_t::VNX_TYPE_HASH && type_code->is_equivalent; } } // vnx ================================================ FILE: generated/vm/include/mmx/vm/accept_generic.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_vm_ACCEPT_GENERIC_HXX_ #define INCLUDE_mmx_vm_ACCEPT_GENERIC_HXX_ namespace vnx { } // namespace vnx #endif // INCLUDE_mmx_vm_ACCEPT_GENERIC_HXX_ ================================================ FILE: generated/vm/include/mmx/vm/package.hxx ================================================ // AUTO GENERATED by vnxcppcodegen #ifndef INCLUDE_mmx_vm_PACKAGE_HXX_ #define INCLUDE_mmx_vm_PACKAGE_HXX_ #include #ifdef MMX_VM_EXPORT_ENABLE #include #else #ifndef MMX_VM_EXPORT #define MMX_VM_EXPORT #endif #endif namespace mmx { namespace vm { void register_all_types(); class varptr_t; } // namespace mmx } // namespace vm namespace vnx { void read(TypeInput& in, ::mmx::vm::varptr_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void write(TypeOutput& out, const ::mmx::vm::varptr_t& value, const TypeCode* type_code, const uint16_t* code); ///< \private void read(std::istream& in, ::mmx::vm::varptr_t& value); ///< \private void write(std::ostream& out, const ::mmx::vm::varptr_t& value); ///< \private void accept(Visitor& visitor, const ::mmx::vm::varptr_t& value); ///< \private /// \private template<> struct type<::mmx::vm::varptr_t> { void read(TypeInput& in, ::mmx::vm::varptr_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::read(in, value, type_code, code); } void write(TypeOutput& out, const ::mmx::vm::varptr_t& value, const TypeCode* type_code, const uint16_t* code) { vnx::write(out, value, type_code, code); } void read(std::istream& in, ::mmx::vm::varptr_t& value) { vnx::read(in, value); } void write(std::ostream& out, const ::mmx::vm::varptr_t& value) { vnx::write(out, value); } void accept(Visitor& visitor, const ::mmx::vm::varptr_t& value) { vnx::accept(visitor, value); } const TypeCode* get_type_code(); void create_dynamic_code(std::vector& code); void create_dynamic_code(std::vector& code, const ::mmx::vm::varptr_t& value, bool special = false); }; } // namespace vnx #endif // INCLUDE_mmx_vm_PACKAGE_HXX_ ================================================ FILE: generated/vm/src/package.cpp ================================================ // AUTO GENERATED by vnxcppcodegen #include #include #include namespace vnx { const TypeCode* type<::mmx::vm::varptr_t>::get_type_code() { return nullptr; } void type<::mmx::vm::varptr_t>::create_dynamic_code(std::vector& code) { create_dynamic_code(code, ::mmx::vm::varptr_t()); } void type<::mmx::vm::varptr_t>::create_dynamic_code(std::vector& code, const ::mmx::vm::varptr_t& value, bool special) { const std::vector tmp = {12, 1}; code.insert(code.end(), tmp.begin(), tmp.end());} } // namespace vnx namespace mmx { namespace vm { void register_all_types() { } static struct vnx_static_init { vnx_static_init() { register_all_types(); } } vnx_static_init_; } // namespace mmx } // namespace vm ================================================ FILE: include/cuda_sha512.h ================================================ /* * cuda_sha512.h * * Created on: Nov 13, 2023 * Author: mad */ #ifndef INCLUDE_MMX_CUDA_SHA512_H_ #define INCLUDE_MMX_CUDA_SHA512_H_ #include #include __device__ static const uint64_t SHA512_K[80] = { 0x428a2f98d728ae22ull, 0x7137449123ef65cdull, 0xb5c0fbcfec4d3b2full, 0xe9b5dba58189dbbcull, 0x3956c25bf348b538ull, 0x59f111f1b605d019ull, 0x923f82a4af194f9bull, 0xab1c5ed5da6d8118ull, 0xd807aa98a3030242ull, 0x12835b0145706fbeull, 0x243185be4ee4b28cull, 0x550c7dc3d5ffb4e2ull, 0x72be5d74f27b896full, 0x80deb1fe3b1696b1ull, 0x9bdc06a725c71235ull, 0xc19bf174cf692694ull, 0xe49b69c19ef14ad2ull, 0xefbe4786384f25e3ull, 0x0fc19dc68b8cd5b5ull, 0x240ca1cc77ac9c65ull, 0x2de92c6f592b0275ull, 0x4a7484aa6ea6e483ull, 0x5cb0a9dcbd41fbd4ull, 0x76f988da831153b5ull, 0x983e5152ee66dfabull, 0xa831c66d2db43210ull, 0xb00327c898fb213full, 0xbf597fc7beef0ee4ull, 0xc6e00bf33da88fc2ull, 0xd5a79147930aa725ull, 0x06ca6351e003826full, 0x142929670a0e6e70ull, 0x27b70a8546d22ffcull, 0x2e1b21385c26c926ull, 0x4d2c6dfc5ac42aedull, 0x53380d139d95b3dfull, 0x650a73548baf63deull, 0x766a0abb3c77b2a8ull, 0x81c2c92e47edaee6ull, 0x92722c851482353bull, 0xa2bfe8a14cf10364ull, 0xa81a664bbc423001ull, 0xc24b8b70d0f89791ull, 0xc76c51a30654be30ull, 0xd192e819d6ef5218ull, 0xd69906245565a910ull, 0xf40e35855771202aull, 0x106aa07032bbd1b8ull, 0x19a4c116b8d2d0c8ull, 0x1e376c085141ab53ull, 0x2748774cdf8eeb99ull, 0x34b0bcb5e19b48a8ull, 0x391c0cb3c5c95a63ull, 0x4ed8aa4ae3418acbull, 0x5b9cca4f7763e373ull, 0x682e6ff3d6b2b8a3ull, 0x748f82ee5defb2fcull, 0x78a5636f43172f60ull, 0x84c87814a1f0ab72ull, 0x8cc702081a6439ecull, 0x90befffa23631e28ull, 0xa4506cebde82bde9ull, 0xbef9a3f7b2c67915ull, 0xc67178f2e372532bull, 0xca273eceea26619cull, 0xd186b8c721c0c207ull, 0xeada7dd6cde0eb1eull, 0xf57d4f7fee6ed178ull, 0x06f067aa72176fbaull, 0x0a637dc5a2c898a6ull, 0x113f9804bef90daeull, 0x1b710b35131c471bull, 0x28db77f523047d84ull, 0x32caab7b40c72493ull, 0x3c9ebe0a15c9bebcull, 0x431d67c49c100d4cull, 0x4cc5d4becb3e42b6ull, 0x597f299cfc657e2aull, 0x5fcb6fab3ad6faecull, 0x6c44198c4a475817ull }; __device__ static const uint64_t SHA512_INIT[8] = { 0x6a09e667f3bcc908ull, 0xbb67ae8584caa73bull, 0x3c6ef372fe94f82bull, 0xa54ff53a5f1d36f1ull, 0x510e527fade682d1ull, 0x9b05688c2b3e6c1full, 0x1f83d9abfb41bd6bull, 0x5be0cd19137e2179ull }; __device__ inline uint32_t cuda_bswap_32(const uint32_t y) { return (y << 24) | ((y << 8) & 0xFF0000) | ((y >> 8) & 0xFF00) | (y >> 24); } __device__ inline uint64_t cuda_bswap_64(const uint64_t y) { return (uint64_t(cuda_bswap_32(y)) << 32) | cuda_bswap_32(y >> 32); } // TODO: optimize with __funnelshift_l() uint64_t __device__ inline sha512_Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); } uint64_t __device__ inline sha512_Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); } uint64_t __device__ inline sha512_S0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); } uint64_t __device__ inline sha512_S1(uint64_t x) { return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); } uint64_t __device__ inline sha512_s0(uint64_t x) { return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); } uint64_t __device__ inline sha512_s1(uint64_t x) { return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); } __device__ inline void cuda_sha512_chunk(const uint64_t* msg, uint64_t* state) { uint64_t w[80]; for(int i = 0; i < 16; ++i) { w[i] = cuda_bswap_64(msg[i]); } uint64_t a = state[0]; uint64_t b = state[1]; uint64_t c = state[2]; uint64_t d = state[3]; uint64_t e = state[4]; uint64_t f = state[5]; uint64_t g = state[6]; uint64_t h = state[7]; #pragma unroll for(int i = 0; i < 80; ++i) { if(i >= 16) { const uint64_t s0 = sha512_s0(w[i-15]); const uint64_t s1 = sha512_s1(w[i-2]); w[i] = w[i-16] + s0 + w[i-7] + s1; } const uint64_t S1 = sha512_S1(e); const uint64_t ch = sha512_Ch(e, f, g); const uint64_t temp1 = h + S1 + ch + SHA512_K[i] + w[i]; const uint64_t S0 = sha512_S0(a); const uint64_t maj = sha512_Maj(a, b, c); const uint64_t temp2 = S0 + maj; h = g; g = f; f = e; e = d + temp1; d = c; c = b; b = a; a = temp1 + temp2; } state[0] += a; state[1] += b; state[2] += c; state[3] += d; state[4] += e; state[5] += f; state[6] += g; state[7] += h; } /* * msg needs 17 bytes buffer at the end and must be multiple of 16x 64-bit * msg needs to be zero initialized */ __device__ inline void cuda_sha512(uint64_t* msg, const uint32_t length, uint64_t* hash) { const uint64_t num_bits = uint64_t(length) * 8; const uint32_t total_bytes = length + 17; const uint32_t num_chunks = (total_bytes + 127) / 128; msg[length / 8] |= (uint64_t(0x80) << ((length % 8) * 8)); msg[num_chunks * 16 - 1] = cuda_bswap_64(num_bits); #pragma unroll for(int i = 0; i < 8; ++i) { hash[i] = SHA512_INIT[i]; } #pragma unroll for(uint32_t i = 0; i < num_chunks; ++i) { cuda_sha512_chunk(msg + i * 16, hash); } #pragma unroll for(int i = 0; i < 8; ++i) { hash[i] = cuda_bswap_64(hash[i]); } } #endif /* INCLUDE_MMX_CUDA_SHA512_H_ */ ================================================ FILE: include/hmac_sha512.h ================================================ // Copyright (c) 2014-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CRYPTO_HMAC_SHA512_H #define BITCOIN_CRYPTO_HMAC_SHA512_H #include #include #include /** A hasher class for HMAC-SHA-512. */ class HMAC_SHA512 { private: SHA512 outer; SHA512 inner; public: static const size_t OUTPUT_SIZE = 64; HMAC_SHA512(const unsigned char* key, size_t keylen); HMAC_SHA512& Write(const unsigned char* data, size_t len) { inner.Write(data, len); return *this; } void Finalize(unsigned char hash[OUTPUT_SIZE]); }; #endif // BITCOIN_CRYPTO_HMAC_SHA512_H ================================================ FILE: include/mmx/DataBase.h ================================================ /* * DataBase.h * * Created on: Jun 6, 2022 * Author: mad */ #ifndef INCLUDE_MMX_DB_DATABASE_H_ #define INCLUDE_MMX_DB_DATABASE_H_ #include #include #include #include namespace mmx { struct db_val_t { uint8_t* data = nullptr; uint32_t size = 0; db_val_t() = default; db_val_t(const uint32_t size) : size(size) { if(size) { data = new uint8_t[size]; } } db_val_t(const void* data, const uint32_t size) : db_val_t(size) { ::memcpy(this->data, data, size); } db_val_t(void* data, const uint32_t size, bool copy = true) : size(size) { if(copy) { this->data = new uint8_t[size]; ::memcpy(this->data, data, size); } else { this->data = (uint8_t*)data; } } db_val_t(const std::string& value) : db_val_t(value.c_str(), value.size()) {} db_val_t(const db_val_t&) = delete; db_val_t& operator=(const db_val_t&) = delete; ~db_val_t() { delete [] data; data = nullptr; size = 0; } bool operator==(const db_val_t& other) const { if(other.size == size) { return ::memcmp(other.data, data, size) == 0; } return false; } bool operator!=(const db_val_t& other) const { if(other.size == size) { return ::memcmp(other.data, data, size) != 0; } return true; } template T to() const { if(size != sizeof(T)) { throw std::logic_error("data size mismatch"); } return *((const T*)data); } std::string to_string() const { return std::string((const char*)data, size); } std::string to_hex_string() const { return vnx::to_hex_string(data, size, false, false); } }; class Table { protected: struct block_t { uint32_t level = 0; uint32_t min_version = 0; uint32_t max_version = 0; uint64_t total_count = 0; int64_t index_offset = 0; vnx::File file; std::string name; std::vector index; }; struct key_compare_t { const Table* table = nullptr; key_compare_t(const Table* table) : table(table) {} bool operator()(const std::shared_ptr& lhs, const std::shared_ptr& rhs) const { return table->options.comparator(*lhs, *rhs) < 0; } }; struct mem_compare_t { const Table* table = nullptr; mem_compare_t(const Table* table) : table(table) {} bool operator()(const std::pair, uint32_t>& lhs, const std::pair, uint32_t>& rhs) const { const auto res = table->options.comparator(*lhs.first, *rhs.first); if(res == 0) { return lhs.second > rhs.second; } return res < 0; } }; public: struct options_t { size_t level_factor = 4; size_t max_block_size = 4 * 1024 * 1024; size_t force_flush_threshold = 100000; std::function comparator = default_comparator; }; const options_t options; const std::string root_path; Table(const std::string& file_path, const options_t& options = default_options); void insert(std::shared_ptr key, std::shared_ptr value); std::shared_ptr find(std::shared_ptr key, const uint32_t max_version = -1) const; bool commit(const uint32_t new_version, const bool auto_flush = true); void revert(const uint32_t new_version); bool do_flush() const; void flush(); uint32_t current_version() const { return curr_version; } class Iterator { public: Iterator() = default; Iterator(const Table* table); Iterator(std::shared_ptr table); ~Iterator(); bool is_valid() const; uint32_t version() const; std::shared_ptr key() const; std::shared_ptr value() const; void prev(); void next(); void seek_begin(); void seek_last(); void seek(std::shared_ptr key); void seek_next(std::shared_ptr key); void seek_prev(std::shared_ptr key); void seek_for_prev(std::shared_ptr key); private: struct pointer_t { size_t pos = -1; std::shared_ptr block; std::shared_ptr value; std::map, std::pair, uint32_t>, key_compare_t>::const_iterator iter; }; struct compare_t { const Iterator* iter = nullptr; compare_t(const Iterator* iter) : iter(iter) {} bool operator()(const std::pair, uint32_t>& lhs, const std::pair, uint32_t>& rhs) const; }; void seek(std::shared_ptr key, const int mode); void seek(const std::list>& blocks, std::shared_ptr key, const int mode); std::map, uint32_t>, pointer_t, key_compare_t>::const_iterator current() const; int direction = 0; const Table* table = nullptr; std::shared_ptr p_table; std::map, uint32_t>, pointer_t, compare_t> block_map; }; static const std::function default_comparator; static const options_t default_options; private: static constexpr uint32_t entry_overhead = 20; static constexpr uint32_t block_header_size = 30; void insert_entry(uint32_t version, std::shared_ptr key, std::shared_ptr value); std::shared_ptr read_block(const std::string& name) const; std::shared_ptr find(std::shared_ptr block, std::shared_ptr key, const uint32_t max_version = -1) const; size_t lower_bound(std::shared_ptr block, uint32_t& version, std::shared_ptr& key, bool& is_match) const; std::shared_ptr rewrite(std::list> blocks, const uint32_t level) const; void check_rewrite(); void write_block_header(vnx::TypeOutput& out, std::shared_ptr block) const; void write_block_index(vnx::TypeOutput& out, std::shared_ptr block) const; std::shared_ptr create_block(const uint32_t level, const std::string& name) const; void finish_block(std::shared_ptr block) const; void rename(std::shared_ptr block, const uint64_t new_index) const; void rename(std::shared_ptr block, const std::string& new_name) const; private: uint32_t last_flush = 0; uint32_t curr_version = 0; uint64_t next_block_id = 0; vnx::File write_log; std::list> blocks; size_t mem_block_size = 0; std::map, std::pair, uint32_t>, key_compare_t> mem_index; std::map, uint32_t>, std::shared_ptr, mem_compare_t> mem_block; mutable std::mutex mutex; mutable int64_t write_lock = 0; std::ofstream debug_log; }; class DataBase { public: DataBase(const int num_threads = 0); ~DataBase(); void add(std::shared_ptr table); void commit(const uint32_t new_version); void revert(const uint32_t new_version); uint32_t version() const; uint32_t min_version() const; uint32_t recover(); template void open_async(T& table, const std::string& path) { threads.add_task([this, &table, path]() { add(table.open(path)); }); } void sync() { threads.sync(); } private: mutable std::mutex mutex; vnx::ThreadPool threads; std::vector> tables; }; } // mmx #endif /* INCLUDE_MMX_DB_DATABASE_H_ */ ================================================ FILE: include/mmx/ECDSA_Wallet.h ================================================ /* * ECDSA_Wallet.h * * Created on: Dec 11, 2021 * Author: mad */ #ifndef INCLUDE_MMX_ECDSA_WALLET_H_ #define INCLUDE_MMX_ECDSA_WALLET_H_ #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class ECDSA_Wallet { public: const account_t config; uint32_t default_expire = 100; ECDSA_Wallet( const hash_t& seed_value, const account_t& config, std::shared_ptr params) : config(config), seed_value(seed_value), params(params) { if(seed_value == hash_t()) { throw std::logic_error("seed == zero"); } create_farmer_key(); } ECDSA_Wallet( const hash_t& seed_value, const std::vector& addresses, const account_t& config, std::shared_ptr params) : config(config), seed_value(seed_value), params(params) { if(seed_value == hash_t()) { throw std::logic_error("seed == zero"); } create_farmer_key(); size_t i = 0; for(const auto& addr : addresses) { index_map[addr] = i++; } this->addresses = addresses; } void lock() { // clear memory for(auto& entry : keypairs) { entry.first = skey_t(); entry.second = pubkey_t(); } keypairs.clear(); keypair_map.clear(); } void unlock() { unlock(std::string()); } void unlock(const std::string& passphrase) { if(config.with_passphrase) { const auto finger_print = get_finger_print(seed_value, passphrase); if(finger_print != config.finger_print) { throw std::logic_error("invalid passphrase"); } } unlock(hash_t("MMX/seed/" + passphrase)); } void unlock(const hash_t& passphrase) { vnx::optional first_addr; if(addresses.size()) { first_addr = addresses[0]; } const auto master = kdf_hmac_sha512(seed_value, passphrase, KDF_ITERS); const auto chain = hmac_sha512_n(master.first, master.second, 11337); const auto account = hmac_sha512_n(chain.first, chain.second, config.index); for(size_t i = 0; i < config.num_addresses; ++i) { std::pair keys; { const auto tmp = hmac_sha512_n(account.first, account.second, i); keys.first = skey_t(tmp.first); keys.second = pubkey_t(skey_t(tmp.first)); } const auto addr = keys.second.get_addr(); if(i == 0) { if(first_addr && addr != *first_addr) { throw std::runtime_error("invalid passphrase"); } keypairs.resize(config.num_addresses); addresses.resize(config.num_addresses); } keypairs[i] = keys; keypair_map[addr] = i; addresses[i] = addr; index_map[addr] = i; } } bool is_locked() const { return addresses.empty() || keypairs.size() < addresses.size(); } skey_t get_skey(const uint32_t index) const { return keypairs.at(index).first; } pubkey_t get_pubkey(const uint32_t index) const { return keypairs.at(index).second; } std::pair get_farmer_key() const { return farmer_key; } vnx::optional find_address(const uint32_t index) const { if(index >= addresses.size()) { return nullptr; } return addresses[index]; } addr_t get_address(const uint32_t index) const { if(index >= addresses.size()) { throw std::logic_error("address index out of range: " + std::to_string(index) + " >= " + std::to_string(addresses.size())); } return addresses[index]; } std::vector get_all_addresses() const { return addresses; } ssize_t find_address(const addr_t& address) const { auto iter = index_map.find(address); if(iter != index_map.end()) { return iter->second; } return -1; } size_t find_address_throw(const addr_t& address) const { const auto i = find_address(address); if(i >= 0) { return i; } throw std::logic_error("address not found: " + address.to_string()); } std::pair get_keypair(const uint32_t index) const { return keypairs.at(index); } vnx::optional> find_keypair(const addr_t& addr) const { auto iter = keypair_map.find(addr); if(iter != keypair_map.end()) { return keypairs[iter->second]; } return nullptr; } void update_cache( const std::map, uint128>& balances, const std::vector& history, const uint32_t height) { this->height = height; balance_map.clear(); balance_map.insert(balances.begin(), balances.end()); std::vector expired; for(const auto& entry : pending_tx) { if(entry.second < height) { expired.push_back(entry.first); } } for(const auto& txid : expired) { pending_tx.erase(txid); pending_map.erase(txid); } for(const auto& txid : history) { pending_tx.erase(txid); pending_map.erase(txid); } for(const auto& entry : reserved_map) { clamped_sub_assign(balance_map[entry.first], entry.second); } for(const auto& entry : pending_map) { for(const auto& pending : entry.second) { clamped_sub_assign(balance_map[pending.first], pending.second); } } } void update_from(std::shared_ptr tx) { if(pending_tx.count(tx->id)) { return; } if(tx->sender) { const auto key = std::make_pair(*tx->sender, addr_t()); const auto static_fee = cost_to_fee(tx->static_cost, tx->fee_ratio); clamped_sub_assign(balance_map[key], static_fee); pending_map[tx->id][key] += static_fee; } for(const auto& in : tx->inputs) { if(find_address(in.address) >= 0) { const auto key = std::make_pair(in.address, in.contract); clamped_sub_assign(balance_map[key], in.amount); pending_map[tx->id][key] += in.amount; } } pending_tx[tx->id] = tx->expires; } void gather_inputs( std::shared_ptr tx, std::map, uint128_t>& spent_map, const uint128_t& amount, const addr_t& currency, const spend_options_t& options = {}) const { auto left = amount; // try to reuse existing inputs if possible for(auto& in : tx->inputs) { if(!left) { return; } if(in.contract == currency && find_address(in.address) >= 0) { auto iter = balance_map.find(std::make_pair(in.address, in.contract)); if(iter != balance_map.end()) { auto balance = iter->second; { auto iter2 = spent_map.find(iter->first); if(iter2 != spent_map.end()) { balance -= iter2->second; } } uint128_t amount = 0; if(balance >= left) { amount = left; } else { amount = balance; } if(amount) { in.amount += amount; spent_map[iter->first] += amount; left -= amount; } } } } // gather addresses with non-zero balance std::vector> addr_list; for(const auto& entry : balance_map) { if(entry.first.second == currency) { auto balance = entry.second; const auto iter = spent_map.find(entry.first); if(iter != spent_map.end()) { balance -= iter->second; } if(balance) { addr_list.emplace_back(entry.first.first, balance); } } } // sort by largest balance first std::sort(addr_list.begin(), addr_list.end(), [](const std::pair& L, const std::pair& R) -> bool { return L.second > R.second; }); // create new inputs for(const auto& entry : addr_list) { if(!left) { break; } const auto& address = entry.first; const auto& balance = entry.second; txin_t in; in.address = address; in.contract = currency; in.memo = options.memo; if(left < balance) { in.amount = left; } else { in.amount = balance; } spent_map[std::make_pair(address, currency)] += in.amount; left -= in.amount; tx->inputs.push_back(in); } if(left) { throw std::logic_error("not enough funds"); } } void sign_off(std::shared_ptr tx, const spend_options_t& options = {}) { bool was_locked = false; if(is_locked()) { was_locked = true; if(auto passphrase = options.passphrase) { unlock(*passphrase); } else { throw std::logic_error("wallet is locked"); } } try { if(options.nonce) { tx->nonce = *options.nonce; } tx->network = params->network; tx->finalize(); std::unordered_map solution_map; auto sign_msg_ex = [this, tx, &options, &solution_map](const addr_t& owner) -> uint16_t { auto iter = solution_map.find(owner); if(iter != solution_map.end()) { return iter->second; } if(auto sol = sign_msg(owner, tx->id, options)) { const auto index = tx->solutions.size(); solution_map[owner] = index; tx->solutions.push_back(sol); return index; } return -1; }; // sign sender if(tx->sender && tx->solutions.empty()) { sign_msg_ex(*tx->sender); } // sign all inputs for(auto& in : tx->inputs) { if(in.solution != txin_t::NO_SOLUTION) { continue; } addr_t owner = in.address; { auto iter = options.owner_map.find(owner); if(iter != options.owner_map.end()) { in.flags |= txin_t::IS_EXEC; owner = iter->second; } } in.solution = sign_msg_ex(owner); } // sign all operations for(auto& op : tx->execute) { if(op->solution != Operation::NO_SOLUTION) { continue; } addr_t owner = op->address; if(auto exec = std::dynamic_pointer_cast(op)) { if(exec->user) { owner = *exec->user; } else { continue; } } else { auto iter = options.owner_map.find(op->address); if(iter != options.owner_map.end()) { owner = iter->second; } } auto copy = vnx::clone(op); copy->solution = sign_msg_ex(owner); op = copy; } // compute final content hash tx->static_cost = tx->calc_cost(params); tx->content_hash = tx->calc_hash(true); } catch(...) { if(was_locked) { lock(); } throw; } if(was_locked) { lock(); } } std::shared_ptr sign_msg(const addr_t& address, const hash_t& msg, const spend_options_t& options = {}) const { if(is_locked()) { throw std::logic_error("wallet is locked"); } // TODO: check for multi-sig via options.contract_map if(auto keys = find_keypair(address)) { auto sol = solution::PubKey::create(); sol->pubkey = keys->second; sol->signature = signature_t::sign(keys->first, msg); return sol; } return nullptr; } void complete( std::shared_ptr tx, const spend_options_t& options = {}, const std::vector>& deposit = {}) { bool was_locked = false; if(is_locked()) { was_locked = true; if(auto passphrase = options.passphrase) { unlock(*passphrase); } else { throw std::logic_error("wallet is locked"); } } try { if(options.note) { tx->note = *options.note; } if(options.expire_at) { tx->expires = std::min(tx->expires, *options.expire_at); } else if(options.expire_delta) { tx->expires = std::min(tx->expires, height + *options.expire_delta); } else { tx->expires = std::min(tx->expires, height + default_expire); } tx->fee_ratio = std::max(tx->fee_ratio, options.fee_ratio); std::map missing; for(const auto& out : tx->outputs) { missing[out.contract] += out.amount; } for(const auto& op : tx->execute) { if(auto deposit = std::dynamic_pointer_cast(op)) { missing[deposit->currency] += deposit->amount; } } for(const auto& in : tx->inputs) { auto& amount = missing[in.contract]; if(in.amount < amount) { amount -= in.amount; } else { amount = 0; } } for(const auto& entry : deposit) { missing[entry.first] += entry.second; } std::map, uint128_t> spent_map; for(const auto& entry : missing) { if(const auto& amount = entry.second) { gather_inputs(tx, spent_map, amount, entry.first, options); } } const auto static_cost = tx->calc_cost(params); const auto static_fee = cost_to_fee(static_cost, tx->fee_ratio); tx->max_fee_amount = cost_to_fee(static_cost + options.gas_limit, tx->fee_ratio); if(!tx->sender) { if(options.sender) { tx->sender = *options.sender; } else { // pick a sender address addr_t max_address; uint128_t max_amount = 0; for(const auto& entry : balance_map) { if(entry.first.second == addr_t()) { auto balance = entry.second; auto iter = spent_map.find(entry.first); if(iter != spent_map.end()) { balance -= iter->second; } if(balance > max_amount) { max_amount = balance; max_address = entry.first.first; } } } if(max_amount >= static_fee) { tx->sender = max_address; } else { throw std::logic_error("insufficient funds for tx fee"); } } } sign_off(tx, options); } catch(...) { if(was_locked) { lock(); } throw; } if(was_locked) { lock(); } } void reset_cache() { last_update = 0; balance_map.clear(); reserved_map.clear(); external_balance_map.clear(); pending_tx.clear(); pending_map.clear(); } uint32_t height = 0; int64_t last_update = 0; std::map, uint128_t> balance_map; // [[address, currency] => balance] std::map, uint128_t> reserved_map; // [[address, currency] => balance] std::map external_balance_map; // [currency => balance] std::unordered_map pending_tx; // [txid => expired height] std::unordered_map, uint128_t>> pending_map; // [txid => [[address, currency] => balance]] private: void create_farmer_key() { const auto master = kdf_hmac_sha512(seed_value, hash_t("MMX/farmer_keys"), KDF_ITERS); const auto tmp = hmac_sha512_n(master.first, master.second, 0); farmer_key.first = skey_t(tmp.first); farmer_key.second = pubkey_t(skey_t(tmp.first)); } private: const hash_t seed_value; std::vector addresses; std::unordered_map index_map; std::vector> keypairs; std::unordered_map keypair_map; std::pair farmer_key; const std::shared_ptr params; static constexpr size_t KDF_ITERS = 4096; }; } // mmx #endif /* INCLUDE_MMX_ECDSA_WALLET_H_ */ ================================================ FILE: include/mmx/Farmer.h ================================================ /* * Farmer.h * * Created on: Dec 12, 2021 * Author: mad */ #ifndef INCLUDE_MMX_FARMER_H_ #define INCLUDE_MMX_FARMER_H_ #include #include #include #include namespace mmx { class Farmer : public FarmerBase { public: Farmer(const std::string& _vnx_name); protected: void init() override; void main() override; vnx::Hash64 get_mac_addr() const override; uint64_t get_partial_diff(const addr_t& plot_nft) const override; std::map get_partial_diffs(const std::vector& plot_nfts) const override; std::vector get_farmer_keys() const override; std::shared_ptr get_farm_info() const override; std::shared_ptr sign_block(std::shared_ptr block) const override; signature_t sign_vote(std::shared_ptr vote) const override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; private: void update(); void update_difficulty(); void query_difficulty(const addr_t& contract, const std::string& url); skey_t get_skey(const pubkey_t& pubkey) const; private: std::shared_ptr pipe; std::shared_ptr params; std::shared_ptr wallet; std::shared_ptr http_async; mutable std::map key_map; std::map> info_map; std::map nft_stats; vnx::Handle http_client; }; } // mmx #endif /* INCLUDE_MMX_FARMER_H_ */ ================================================ FILE: include/mmx/Harvester.h ================================================ /* * Harvester.h * * Created on: Dec 11, 2021 * Author: mad */ #ifndef INCLUDE_MMX_HARVESTER_H_ #define INCLUDE_MMX_HARVESTER_H_ #include #include #include #include #include #include #include #include namespace mmx { class Harvester : public HarvesterBase { public: Harvester(const std::string& _vnx_name); protected: void init() override; void main() override; void handle(std::shared_ptr value) override; void reload() override; void add_plot_dir(const std::string& path) override; void rem_plot_dir(const std::string& path) override; uint64_t get_total_bytes() const override; std::shared_ptr get_farm_info() const override; void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const override; void http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const override; private: void update(); void update_nfts(); void check_queue(); std::vector fetch_full_proof( std::shared_ptr prover, const uint64_t index) const; void lookup_task(std::shared_ptr value, const int64_t recv_time_ms) const; void find_plot_dirs(const std::set& dirs, std::set& all_dirs, const size_t depth) const; // thread safe void send_response( std::shared_ptr request, std::shared_ptr proof, const int64_t time_begin_ms) const; private: bool is_ready = false; hash_t harvester_id; uint64_t total_bytes = 0; uint64_t total_bytes_effective = 0; vnx::Hash64 farmer_addr; std::shared_ptr farmer; std::shared_ptr farmer_async; std::shared_ptr node_async; std::shared_ptr threads; std::shared_ptr params; std::unordered_set already_checked; std::unordered_map id_map; std::unordered_map> plot_map; std::map plot_contract_set; std::map plot_nfts; std::map partial_diff; struct lookup_t { int64_t recv_time_ms = 0; std::shared_ptr request; }; std::map lookup_queue; std::shared_ptr lookup_timer; std::shared_ptr> http; mutable std::mutex mutex; friend class vnx::addons::HttpInterface; }; } // mmx #endif /* INCLUDE_MMX_HARVESTER_H_ */ ================================================ FILE: include/mmx/Node.h ================================================ /* * Node.h * * Created on: Dec 7, 2021 * Author: mad */ #ifndef INCLUDE_MMX_NODE_H_ #define INCLUDE_MMX_NODE_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { class Node : public NodeBase { public: Node(const std::string& _vnx_value); protected: void init() override; void main() override; std::shared_ptr get_params() const override; std::shared_ptr get_network_info() const override; hash_t get_genesis_hash() const override; uint32_t get_height() const override; uint32_t get_vdf_height() const override; hash_t get_vdf_peak() const override; vnx::optional get_synced_height() const override; vnx::optional get_synced_vdf_height() const override; std::shared_ptr get_block(const hash_t& hash) const override; std::shared_ptr get_block_at(const uint32_t& height) const override; std::shared_ptr get_header(const hash_t& hash) const override; std::shared_ptr get_header_at(const uint32_t& height) const override; vnx::optional get_block_hash(const uint32_t& height) const override; vnx::optional> get_block_hash_ex(const uint32_t& height) const override; vnx::optional get_tx_height(const hash_t& id) const override; std::vector get_tx_ids_at(const uint32_t& height) const override; std::vector get_tx_ids_since(const uint32_t& height) const override; std::vector get_tx_ids(const uint32_t& limit) const override; vnx::optional get_tx_info(const hash_t& id) const override; vnx::optional get_tx_info_for(std::shared_ptr tx) const override; std::shared_ptr get_transaction(const hash_t& id, const bool& pending = false) const override; std::vector> get_transactions(const std::vector& ids) const override; std::vector get_history(const std::vector& addresses, const query_filter_t& filter) const override; std::vector get_history_memo(const std::vector& addresses, const std::string& memo, const query_filter_t& filter) const override; std::shared_ptr get_contract(const addr_t& address) const override; std::shared_ptr get_contract_for(const addr_t& address) const override; std::vector> get_contracts(const std::vector& addresses) const override; std::vector get_contracts_by(const std::vector& addresses, const vnx::optional& type_hash = nullptr) const override; std::vector get_contracts_owned_by(const std::vector& addresses, const vnx::optional& type_hash = nullptr) const override; exec_result_t validate(std::shared_ptr tx) const override; void add_block(std::shared_ptr block) override; void add_transaction(std::shared_ptr tx, const vnx::bool_t& pre_validate = false) override; uint128 get_balance(const addr_t& address, const addr_t& currency) const override; uint128 get_total_balance(const std::vector& addresses, const addr_t& currency) const override; std::map get_balances(const addr_t& address, const std::set& whitelist, const int32_t& limit) const override; std::map get_contract_balances( const addr_t& address, const std::set& whitelist, const int32_t& limit) const override; std::map get_total_balances( const std::vector& addresses, const std::set& whitelist, const int32_t& limit) const override; std::map, uint128> get_all_balances( const std::vector& addresses, const std::set& whitelist, const int32_t& limit) const override; std::vector get_exec_history(const addr_t& address, const int32_t& limit, const vnx::bool_t& recent) const override; std::map read_storage(const addr_t& contract, const uint32_t& height = -1) const override; std::map dump_storage(const addr_t& contract, const uint32_t& height = -1) const override; vm::varptr_t read_storage_var(const addr_t& contract, const uint64_t& address, const uint32_t& height = -1) const override; vm::varptr_t read_storage_entry_var(const addr_t& contract, const uint64_t& address, const uint64_t& key, const uint32_t& height = -1) const override; std::pair read_storage_field(const addr_t& contract, const std::string& name, const uint32_t& height = -1) const override; std::tuple read_storage_entry_addr( const addr_t& contract, const std::string& name, const addr_t& key, const uint32_t& height = -1) const override; std::tuple read_storage_entry_string( const addr_t& contract, const std::string& name, const std::string& key, const uint32_t& height = -1) const override; std::vector read_storage_array(const addr_t& contract, const uint64_t& address, const uint32_t& height = -1) const override; std::map read_storage_map(const addr_t& contract, const uint64_t& address, const uint32_t& height = -1) const override; std::map read_storage_object(const addr_t& contract, const uint64_t& address, const uint32_t& height = -1) const override; vnx::Variant call_contract( const addr_t& address, const std::string& method, const std::vector& args = {}, const vnx::optional& user = nullptr, const vnx::optional>& deposit = nullptr) const override; uint128 get_total_supply(const addr_t& currency) const override; vnx::optional get_plot_nft_info(const addr_t& address) const override; addr_t get_plot_nft_target(const addr_t& address, const vnx::optional& farmer_addr = nullptr) const override; offer_data_t get_offer(const addr_t& address) const override; std::vector fetch_offers(const std::vector& addresses, const vnx::bool_t& state, const vnx::bool_t& closed = false) const override; std::vector get_offers(const uint32_t& since, const vnx::bool_t& state) const override; std::vector get_offers_by(const std::vector& owners, const vnx::bool_t& state) const override; std::vector get_recent_offers(const int32_t& limit, const vnx::bool_t& state) const override; std::vector get_recent_offers_for( const vnx::optional& bid, const vnx::optional& ask, const uint128& min_bid, const int32_t& limit, const vnx::bool_t& state) const override; std::vector get_trade_history(const int32_t& limit, const uint32_t& since = 0) const override; std::vector get_trade_history_for( const vnx::optional& bid, const vnx::optional& ask, const int32_t& limit, const uint32_t& since = 0) const override; std::vector get_swaps( const uint32_t& since, const vnx::optional& token, const vnx::optional& currency, const int32_t& limit) const override; swap_info_t get_swap_info(const addr_t& address) const override; swap_user_info_t get_swap_user_info(const addr_t& address, const addr_t& user) const override; std::vector get_swap_history(const addr_t& address, const int32_t& limit) const override; std::array get_swap_trade_estimate(const addr_t& address, const uint32_t& i, const uint128& amount, const int32_t& num_iter) const override; std::array get_swap_fees_earned(const addr_t& address, const addr_t& user) const override; std::array get_swap_equivalent_liquidity(const addr_t& address, const addr_t& user) const override; std::map, 2>> get_swap_liquidity_by(const std::vector& addresses) const override; std::vector> get_farmed_blocks( const std::vector& farmer_keys, const vnx::bool_t& full_blocks, const uint32_t& since = 0, const int32_t& limit = -1) const override; farmed_block_summary_t get_farmed_block_summary(const std::vector& farmer_keys, const uint32_t& since = 0) const override; std::vector> get_farmer_ranking(const int32_t& limit) const override; std::tuple verify_plot_nft_target(const addr_t& address, const addr_t& pool_target) const override; std::tuple verify_partial( std::shared_ptr partial, const vnx::optional& pool_target) const override; void start_sync(const vnx::bool_t& force) override; void revert_sync(const uint32_t& height) override; void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const override; void http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr tx) override; void handle(std::shared_ptr proof) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; std::shared_ptr vnx_call_switch(std::shared_ptr method, const vnx::request_id_t& request_id) override; private: struct waitcond_t { std::mutex mutex; std::condition_variable signal; bool do_wait = true; }; struct execution_context_t { bool do_profile = false; bool do_trace = false; uint32_t height = 0; std::shared_ptr storage; std::unordered_map> mutate_map; // [contract => TX ids] std::unordered_map> wait_map; // [TX id => TX ids] std::unordered_map> signal_map; // [TX id => condition] void wait(const hash_t& txid) const; void signal(const hash_t& txid) const; void setup_wait(const hash_t& txid, const addr_t& address); }; struct fork_t { bool is_invalid = false; bool is_validated = false; bool is_connected = false; bool is_vdf_verified = false; bool is_proof_verified = false; bool is_all_proof_verified = false; int64_t recv_time_ms = 0; // [ms] uint32_t votes = 0; // validator votes uint32_t total_votes = 0; uint32_t fork_length = 0; std::weak_ptr prev; std::shared_ptr block; std::shared_ptr root; std::map validators; std::vector> vdf_points; std::shared_ptr context; }; struct tx_map_t { uint32_t height = -1; std::shared_ptr tx; }; struct tx_pool_t { bool is_valid = false; bool is_skipped = false; uint32_t cost = 0; uint32_t fee = 0; uint32_t luck = 0; // random value std::shared_ptr tx; }; struct proof_data_t { hash_t hash; vnx::Hash64 farmer_mac; std::shared_ptr proof; }; void update(); void init_chain(); void trigger_update(); void update_control(); void verify_vdfs(); void verify_votes(); void verify_proofs(); void verify_block_proofs(); void print_stats(); void add_fork(std::shared_ptr fork); bool tx_pool_update(const tx_pool_t& entry, const bool force_add = false); void tx_pool_erase(const hash_t& txid); void purge_tx_pool(); void validate_new(); void on_sync_done(const uint32_t height); void on_stuck_timeout(); std::vector validate_for_block(const int64_t deadline_ms); std::shared_ptr make_block( std::shared_ptr prev, std::vector> vdf_points, const hash_t& challenge); int get_offer_state(const addr_t& address) const; trade_entry_t make_trade_entry(const uint32_t& height, const trade_log_t& log) const; std::tuple read_storage_entry_var( const addr_t& contract, const std::string& name, const vm::varptr_t& key, const uint32_t& height = -1) const; void sync_more(); void sync_height(const uint32_t& height); void sync_result(const uint32_t& height, const std::vector>& blocks); void fetch_block(const hash_t& hash); void fetch_result(const hash_t& hash, std::shared_ptr block); std::shared_ptr fork_to(const hash_t& state); std::shared_ptr fork_to(std::shared_ptr fork_head); std::shared_ptr find_best_fork() const; std::vector> get_fork_line(std::shared_ptr fork_head = nullptr) const; void vote_for_block(std::shared_ptr fork); std::shared_ptr validate(std::shared_ptr block) const; std::shared_ptr new_exec_context(const uint32_t height) const; void prepare_context(std::shared_ptr context, std::shared_ptr tx) const; void execute( std::shared_ptr tx, std::shared_ptr context, std::shared_ptr op, std::shared_ptr contract, const addr_t& address, std::vector& exec_outputs, std::map, uint128>& exec_spend_map, std::shared_ptr storage_cache, uint64_t& tx_cost, exec_error_t& error, const bool is_init) const; void execute( std::shared_ptr tx, std::shared_ptr context, std::shared_ptr executable, std::vector& exec_outputs, std::map, uint128>& exec_spend_map, std::shared_ptr storage_cache, std::shared_ptr engine, const std::string& method_name, exec_error_t& error, const bool is_init) const; std::shared_ptr validate( std::shared_ptr tx, std::shared_ptr context) const; void validate_diff_adjust(const uint64_t& block, const uint64_t& prev) const; void commit(std::shared_ptr block); void update_farmer_ranking(); void add_proof(std::shared_ptr proof, const uint32_t vdf_height, const vnx::Hash64 farmer_mac); void verify(std::shared_ptr value) const; void verify_proof(std::shared_ptr block) const; template void verify_proof_impl(std::shared_ptr proof, const hash_t& challenge, const uint64_t space_diff, const uint32_t& vdf_height) const; void verify_proof(std::shared_ptr proof, const hash_t& challenge, const uint64_t space_diff, const uint32_t& vdf_height) const; void verify_vdf(std::shared_ptr proof, const int64_t recv_time); void verify_vdf_cpu(std::shared_ptr proof) const; void verify_vdf_success(std::shared_ptr point, const int64_t took_ms); void verify_vdf_task(std::shared_ptr proof, const int64_t recv_time) noexcept; size_t prefetch_balances(const std::set>& keys) const; void apply( std::shared_ptr block, std::shared_ptr context); void apply( std::shared_ptr block, std::shared_ptr tx, uint32_t& counter); void revert(const uint32_t height); void reset(); std::shared_ptr get_root() const; std::shared_ptr get_peak() const; std::shared_ptr get_block_ex(const hash_t& hash, bool full_block) const; std::shared_ptr get_block_at_ex(const uint32_t& height, bool full_block) const; std::shared_ptr find_fork(const hash_t& hash) const; std::shared_ptr find_prev_fork(std::shared_ptr fork, const size_t distance = 1) const; std::shared_ptr find_prev( std::shared_ptr block, const size_t distance = 1, bool clamped = false) const; bool find_challenge(std::shared_ptr block, const uint32_t offset, hash_t& challenge, uint64_t& space_diff) const; bool find_challenge(const uint32_t vdf_height, hash_t& challenge, uint64_t& space_diff) const; hash_t get_challenge(std::shared_ptr block, const uint32_t offset, uint64_t& space_diff) const; uint64_t get_time_diff(std::shared_ptr infused) const; bool find_infusion(std::shared_ptr block, const uint32_t offset, hash_t& value, uint64_t& num_iters) const; hash_t get_infusion(std::shared_ptr block, const uint32_t offset, uint64_t& num_iters) const; std::shared_ptr find_vdf_point(const hash_t& input, const hash_t& output) const; std::vector> find_vdf_points(std::shared_ptr block) const; std::vector> find_next_vdf_points(std::shared_ptr block) const; std::pair get_vdf_peak_ex() const; std::set get_validators(std::shared_ptr block) const; std::vector get_all_depends(std::shared_ptr exec) const; std::vector get_all_depends(const addr_t& address, const uint32_t depth) const; vnx::optional find_best_proof(const hash_t& challenge) const; uint64_t calc_block_reward(std::shared_ptr block, const uint64_t total_fees) const; vnx::optional get_vdf_reward_winner(std::shared_ptr block) const; std::shared_ptr read_block( vnx::File& file, bool full_block = true, std::vector* tx_offsets = nullptr) const; void write_block(std::shared_ptr block, const bool is_main = true); template std::shared_ptr get_contract_as(const addr_t& address, uint64_t* read_cost = nullptr, const uint64_t gas_limit = 0) const; std::shared_ptr get_contract_ex(const addr_t& address, uint64_t* read_cost = nullptr, const uint64_t gas_limit = 0) const; std::shared_ptr get_contract_for_ex(const addr_t& address, uint64_t* read_cost = nullptr, const uint64_t gas_limit = 0) const; void async_api_call(std::shared_ptr method, const vnx::request_id_t& request_id); void test_all(); std::shared_ptr create_test_block(std::shared_ptr prev, const bool valid = true); std::shared_ptr create_test_fork(std::shared_ptr prev, const bool valid = true); private: hash_t state_hash; std::shared_ptr db; std::shared_ptr db_blocks; hash_uint_uint_table txio_log; // [[address, height, counter] => entry] hash_uint_uint_table exec_log; // [[address, height, counter] => entry] hash_uint_uint_table memo_log; // [[hash(address | memo), height, counter] => address] hash_table> contract_depends; // [address => depends] hash_table> contract_map; // [address => contract] hash_uint_uint_table contract_log; // [[type hash, height, counter] => contract] hash_uint_uint_table> deploy_map; // [[sender, height, counter] => [contract, type]] hash_uint_uint_table> owner_map; // [[owner, height, counter] => [contract, type]] hash_uint_uint_table swap_index; // [[hash(bid, ask), height, counter] => contract] hash_uint_uint_table offer_index; // [[hash(bid, ask), height, counter] => contract] hash_uint_uint_table trade_index; // [hash(bid, ask), height, counter] uint_uint_table trade_log; // [[height, counter] => info] balance_table_t balance_table; // [[address, currency] => balance] balance_table_t> swap_liquid_map; // [[address, swap] => [amount, amount]] hash_table total_supply_map; // [currency => supply] std::unordered_map tx_pool; // [txid => transaction] (non-executed only) std::unordered_map tx_pool_fees; // [address => total pending fees] std::map, std::shared_ptr> tx_pool_index; // [[key, txid] => tx] std::unordered_map> fork_tree; // [block hash => fork] (pending only) std::multimap> fork_index; // [height => fork] (pending only) std::unordered_map> history; // cache [hash => block header] std::multimap history_log; // [height => hash] std::multimap> vdf_tree; // [output => proof] std::multimap> vdf_index; // [iters => proof] std::shared_ptr root; // root for heaviest chain std::multimap challenge_map; // [vdf height => challenge] std::unordered_map> proof_map; // [challenge => sorted proofs] std::unordered_map created_blocks; // [proof hash => block hash] std::unordered_map> voted_blocks; // [prev => [block hash, time ms]] std::map farmer_keys; // [key => farmer_mac] our farmer keys std::string node_version; std::string node_commit; bool is_synced = false; bool update_pending = false; uint32_t min_pool_fee_ratio = 0; uint64_t mmx_address_count = 0; std::shared_ptr blocks; std::shared_ptr storage; hash_table block_index; // [hash => index] (no revert) uint_multi_table height_index; // [height => hash] (no revert) uint_table height_map; // [height => hash] uint_table> tx_log; // [height => txids] hash_table tx_index; // [txid => index] hash_uint_table farmer_block_map; // [[farmer key, height] => info] std::vector> farmer_ranking; // sorted by count DSC [farmer key => num blocks] uint32_t sync_pos = 0; // current sync height uint32_t sync_start = 0; // sync start height uint32_t sync_retry = 0; uint32_t synced_since = 0; // height of last sync done int64_t sync_finish_ms = 0; // when peak was reached double max_sync_pending = 0; std::set sync_pending; // set of heights vnx::optional sync_peak; // max height we can sync std::unordered_set fetch_pending; // block hash std::vector, int64_t>> proof_queue; // [data, recv_time_ms] std::vector, int64_t>> vdf_queue; // [data, recv_time_ms] std::vector, int64_t>> vote_queue; // [data, recv_time_ms] std::unordered_set vdf_verify_pending; // [proof hash] std::map timelord_trust; // [timelord key => trust] std::unordered_map> tx_queue; // [content_hash => tx] std::shared_mutex db_mutex; // covers DB as well as history std::shared_ptr threads; std::shared_ptr api_threads; // executed under shared db_mutex lock std::shared_ptr stuck_timer; std::shared_ptr update_timer; mutable std::mutex mutex; // network + contract_cache + tx_pool_index mutable std::shared_ptr network; mutable std::unordered_map> contract_cache; std::shared_ptr params; std::shared_ptr router; std::shared_ptr> http; std::mutex vdf_mutex; std::condition_variable vdf_signal; std::vector> opencl_vdf; std::shared_ptr vdf_threads; bool opencl_vdf_enable = false; std::mutex fetch_mutex; int reward_vote = 0; std::set pending_fetch; std::shared_ptr fetch_threads; friend class vnx::addons::HttpInterface; }; template std::shared_ptr Node::get_contract_as(const addr_t& address, uint64_t* read_cost, const uint64_t gas_limit) const { return std::dynamic_pointer_cast(get_contract_ex(address, read_cost, gas_limit)); } } // mmx #endif /* INCLUDE_MMX_NODE_H_ */ ================================================ FILE: include/mmx/OCL_VDF.h ================================================ /* * OCL_VDF.h * * Created on: Dec 23, 2021 * Author: mad */ #ifndef INCLUDE_MMX_OCL_VDF_H_ #define INCLUDE_MMX_OCL_VDF_H_ #include #ifdef WITH_OPENCL #include #include #include #include #else typedef void* cl_context; typedef void* cl_device_id; typedef void* cl_platform_id; #endif namespace mmx { class OCL_VDF { public: OCL_VDF(cl_context context, cl_device_id device); void compute(std::shared_ptr proof); void verify(std::shared_ptr proof); static void release(); private: #ifdef WITH_OPENCL using Kernel = automy::basic_opencl::Kernel; using Program = automy::basic_opencl::Program; using CommandQueue = automy::basic_opencl::CommandQueue; template using Buffer1D = automy::basic_opencl::Buffer1D; cl_context context = nullptr; size_t width = 0; std::vector hash; std::vector num_iters; Buffer1D hash_buf; Buffer1D num_iters_buf; std::shared_ptr kernel; std::shared_ptr queue; static std::mutex g_mutex; static std::shared_ptr g_program; #endif }; } // mmx #endif /* INCLUDE_MMX_OCL_VDF_H_ */ ================================================ FILE: include/mmx/ProofServer.h ================================================ /* * ProofServer.h * * Created on: May 13, 2025 * Author: mad */ #ifndef INCLUDE_MMX_PROOFSERVER_H_ #define INCLUDE_MMX_PROOFSERVER_H_ #include #include namespace mmx { class ProofServer : public ProofServerBase { public: ProofServer(const std::string& _vnx_name); protected: void init() override; void main() override; void compute_async( const std::vector& X_values, const hash_t& id, const int32_t& ksize, const int32_t& xbits, const vnx::request_id_t& request_id) const; private: std::shared_ptr threads; mutable uint32_t num_requests = 0; mutable std::map, uint32_t> request_map; }; } // mmx #endif /* INCLUDE_MMX_PROOFSERVER_H_ */ ================================================ FILE: include/mmx/Qt_GUI.h ================================================ /* * Qt_GUI.h * * Created on: Jan 22, 2025 * Author: mad */ #ifndef INCLUDE_MMX_QT_GUI_H_ #define INCLUDE_MMX_QT_GUI_H_ #include void qt_gui_exec(char** argv, std::string host, std::string api_token, std::string api_token_header); #endif /* INCLUDE_MMX_QT_GUI_H_ */ ================================================ FILE: include/mmx/Router.h ================================================ /* * Router.h * * Created on: Dec 17, 2021 * Author: mad */ #ifndef INCLUDE_MMX_ROUTER_H_ #define INCLUDE_MMX_ROUTER_H_ #include #include #include #include #include #include #include #include #include #include namespace mmx { class Router : public RouterBase { public: Router(const std::string& _vnx_name); protected: void init() override; void main() override; void discover() override; hash_t get_id() const override; node_info_t get_info() const override; std::pair sign_msg(const hash_t& msg) const override; std::vector get_peers(const uint32_t& max_count) const override; std::vector get_known_peers() const override; std::vector get_connected_peers() const override; std::shared_ptr get_peer_info() const override; void kick_peer(const std::string& address) override; void get_blocks_at_async(const uint32_t& height, const vnx::request_id_t& request_id) const override; void fetch_block_async(const hash_t& hash, const vnx::optional& address, const vnx::request_id_t& request_id) const override; void fetch_block_at_async(const uint32_t& height, const std::string& address, const vnx::request_id_t& request_id) const override; void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const override; void http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; private: struct send_item_t { bool reliable = false; hash_t hash; std::shared_ptr value; }; struct peer_t : Super::peer_t { bool is_valid = true; bool is_synced = false; bool is_paused = false; bool is_blocked = false; bool is_outbound = false; uint32_t height = 0; int32_t ping_ms = 0; int64_t last_receive_ms = 0; int64_t connected_since_ms = 0; double pending_cost = 0; node_info_t info; hash_t challenge; std::string address; std::string host_name; vnx::optional node_id; std::queue hash_queue; std::unordered_set sent_hashes; std::map send_queue; std::unordered_map pending_map; }; struct sync_job_t { bool is_done = false; uint32_t height = 0; uint32_t num_fetch = 0; int64_t start_time_ms = 0; int64_t last_recv_ms = 0; std::unordered_set failed; std::unordered_set pending; std::unordered_set succeeded; std::unordered_map> got_hash; // [client, [block hash, content hash]] std::unordered_map request_map; // [request id, client] std::unordered_map pending_blocks; // [content hash, timeout] std::unordered_map> blocks; // [content hash, block] }; struct fetch_job_t { bool is_done = false; vnx::optional hash; vnx::optional height; vnx::optional from_peer; std::function)> callback; int64_t start_time_ms = 0; int64_t last_recv_ms = 0; std::unordered_set failed; std::unordered_set pending; std::unordered_map request_map; // [request id, client] }; void send(); void update(); bool process(std::shared_ptr ret = nullptr); void connect(); void query(); void save_data(); void ban_peer(uint64_t client, const std::string& reason); void connect_to(const std::string& address); void print_stats() override; uint32_t send_request(std::shared_ptr peer, std::shared_ptr method, bool reliable = true); uint32_t send_request(uint64_t client, std::shared_ptr method, bool reliable = true); void on_vdf(uint64_t client, std::shared_ptr proof); void on_vdf_point(uint64_t client, std::shared_ptr value); void on_block(uint64_t client, std::shared_ptr block); void on_vote(uint64_t client, std::shared_ptr value); void on_proof(uint64_t client, std::shared_ptr response); void on_transaction(uint64_t client, std::shared_ptr tx); void on_recv_note(uint64_t client, std::shared_ptr note); void recv_notify(const hash_t& msg_hash); void relay(std::shared_ptr msg, const hash_t& msg_hash, const std::set& filter); void broadcast( std::shared_ptr msg, const hash_t& msg_hash, const std::set& filter, bool reliable, bool synced_only = false); void send_to(std::vector> peers, std::shared_ptr msg, const hash_t& msg_hash, bool reliable); bool send_to(uint64_t client, std::shared_ptr msg, bool reliable = true); bool send_to(std::shared_ptr peer, std::shared_ptr msg, bool reliable = true); void send_all(std::shared_ptr msg, const std::set& filter, bool reliable = true); template void send_result(uint64_t client, uint32_t id, const T& value); void on_error(uint64_t client, uint32_t id, const vnx::exception& ex); void on_request(uint64_t client, std::shared_ptr msg); void on_return(uint64_t client, std::shared_ptr msg); void on_msg(uint64_t client, std::shared_ptr msg) override; void on_pause(uint64_t client) override; void on_resume(uint64_t client) override; void on_connect(uint64_t client, const std::string& address) override; void on_disconnect(uint64_t client, const std::string& address) override; std::shared_ptr get_peer_base(uint64_t client) const override; std::shared_ptr get_peer(uint64_t client) const; std::shared_ptr find_peer(uint64_t client) const; std::vector> find_peers(const std::string& address) const; std::string resolve(const std::string& host_name); bool relay_msg_hash(const hash_t& hash); bool receive_msg_hash(const hash_t& hash, uint64_t client); private: bool is_connected = false; hash_t node_id; skey_t node_skey; pubkey_t node_key; std::set peer_set; std::set self_addrs; std::map host_map; // [hostname => IP address] std::map peer_retry_map; // [address => when to try again [sec]] std::map connect_tasks; std::multimap> vdf_history; // [vdf_height => proof] std::set synced_peers; std::unordered_map> peer_map; std::multimap> peer_addr_map; struct hash_info_t { bool did_relay = false; }; std::queue hash_queue; std::unordered_map hash_info; std::map> farmer_credit; std::map timelord_credit; std::set our_timelords; double tx_upload_credits = 0; double tx_upload_bandwidth = 0; double max_pending_cost_value = 0; mutable std::unordered_map> sync_jobs; mutable std::unordered_map> fetch_jobs; struct { uint32_t height = -1; uint32_t request_id = 0; hash_t our_hash; } peer_check; std::shared_ptr node; std::shared_ptr params; mutable std::default_random_engine rand_engine; uint32_t next_request_id = 0; uint32_t verified_vdf_height = 0; uint32_t verified_peak_height = 0; int64_t last_query_ms = 0; size_t tx_counter = 0; size_t vdf_counter = 0; size_t vote_counter = 0; size_t block_counter = 0; size_t proof_counter = 0; size_t upload_counter = 0; double tx_upload_sum = 0; size_t tx_drop_counter = 0; size_t vdf_drop_counter = 0; size_t proof_drop_counter = 0; size_t block_drop_counter = 0; std::shared_ptr upnp_mapper; std::shared_ptr> http; friend class vnx::addons::HttpInterface; }; } // mmx #endif /* INCLUDE_MMX_ROUTER_H_ */ ================================================ FILE: include/mmx/TimeLord.h ================================================ /* * TimeLord.h * * Created on: Dec 6, 2021 * Author: mad */ #ifndef INCLUDE_MMX_TIMELORD_H_ #define INCLUDE_MMX_TIMELORD_H_ #include #include #include namespace mmx { class TimeLord : public TimeLordBase { public: TimeLord(const std::string& _vnx_name); protected: void init() override; void main() override; void handle(std::shared_ptr value) override; void stop_vdf() override; private: struct vdf_point_t { hash_t output; uint64_t num_iters = 0; }; void update(); void start_vdf(vdf_point_t begin); void vdf_loop(); static hash_t compute(const hash_t& input, const uint64_t num_iters); void print_info(); private: std::mutex mutex; std::thread vdf_thread; std::condition_variable vdf_signal; bool do_run = false; bool is_reset = false; uint64_t segment_iters = 1000; uint64_t avg_iters_per_sec = 0; std::map history; std::map infuse; uint64_t peak_iters = 0; std::map> pending; // [end => request] std::shared_ptr peak; skey_t timelord_sk; pubkey_t timelord_key; }; } // mmx #endif /* INCLUDE_MMX_TIMELORD_H_ */ ================================================ FILE: include/mmx/TimeLordRewards.h ================================================ /* * TimeLordRewards.h * * Created on: Mar 20, 2022 * Author: mad */ #ifndef INCLUDE_MMX_TIMELORDREWARDS_H_ #define INCLUDE_MMX_TIMELORDREWARDS_H_ #include #include namespace mmx { class TimeLordRewards : public TimeLordRewardsBase { public: TimeLordRewards(const std::string& _vnx_name); protected: void main() override; void handle(std::shared_ptr value) override; private: std::shared_ptr wallet; uint32_t last_height = 0; }; } // mmx #endif /* INCLUDE_MMX_TIMELORDREWARDS_H_ */ ================================================ FILE: include/mmx/Wallet.h ================================================ /* * Wallet.h * * Created on: Dec 11, 2021 * Author: mad */ #ifndef INCLUDE_MMX_WALLET_H_ #define INCLUDE_MMX_WALLET_H_ #include #include #include #include #include #include namespace mmx { class Wallet : public WalletBase { public: Wallet(const std::string& _vnx_name); protected: void init() override; void main() override; std::shared_ptr send( const uint32_t& index, const uint128& amount, const addr_t& dst_addr, const addr_t& currency, const spend_options_t& options) const override; std::shared_ptr send_many( const uint32_t& index, const std::vector>& amounts, const addr_t& currency, const spend_options_t& options) const override; std::shared_ptr send_from( const uint32_t& index, const uint128& amount, const addr_t& dst_addr, const addr_t& src_addr, const addr_t& currency, const spend_options_t& options) const override; std::shared_ptr deploy( const uint32_t& index, std::shared_ptr contract, const spend_options_t& options) const override; std::shared_ptr execute( const uint32_t& index, const addr_t& address, const std::string& method, const std::vector& args, const vnx::optional& user, const spend_options_t& options) const override; std::shared_ptr deposit( const uint32_t& index, const addr_t& address, const std::string& method, const std::vector& args, const uint128& amount, const addr_t& currency, const spend_options_t& options) const override; std::shared_ptr make_offer( const uint32_t& index, const uint32_t& owner, const uint128& bid_amount, const addr_t& bid_currency, const uint128& ask_amount, const addr_t& ask_currency, const spend_options_t& options) const override; std::shared_ptr offer_trade( const uint32_t& index, const addr_t& address, const uint128& amount, const uint32_t& dst_addr, const uint128& price, const spend_options_t& options) const override; std::shared_ptr accept_offer( const uint32_t& index, const addr_t& address, const uint32_t& dst_addr, const uint128& price, const spend_options_t& options) const override; std::shared_ptr offer_withdraw( const uint32_t& index, const addr_t& address, const spend_options_t& options) const override; std::shared_ptr cancel_offer( const uint32_t& index, const addr_t& address, const spend_options_t& options) const override; std::shared_ptr swap_trade( const uint32_t& index, const addr_t& address, const uint128& amount, const addr_t& currency, const vnx::optional& min_trade, const int32_t& num_iter, const spend_options_t& options) const override; std::shared_ptr swap_add_liquid( const uint32_t& index, const addr_t& address, const std::array& amount, const uint32_t& pool_idx, const spend_options_t& options) const override; std::shared_ptr swap_rem_liquid( const uint32_t& index, const addr_t& address, const std::array& amount, const spend_options_t& options) const override; std::shared_ptr plotnft_exec( const addr_t& address, const std::string& method, const std::vector& args, const spend_options_t& options) const override; std::shared_ptr plotnft_create( const uint32_t& index, const std::string& name, const vnx::optional& owner, const spend_options_t& options) const override; std::shared_ptr complete( const uint32_t& index, std::shared_ptr tx, const spend_options_t& options) const override; std::shared_ptr sign_off( const uint32_t& index, std::shared_ptr tx, const spend_options_t& options) const override; std::shared_ptr sign_msg(const uint32_t& index, const addr_t& address, const hash_t& msg) const override; void send_off(const uint32_t& index, std::shared_ptr tx) const override; void mark_spent(const uint32_t& index, const std::map, uint128>& amounts) override; void reserve(const uint32_t& index, const std::map, uint128>& amounts) override; void release(const uint32_t& index, const std::map, uint128>& amounts) override; void release_all() override; void reset_cache(const uint32_t& index) override; void update_cache(const uint32_t& index) const override; std::vector gather_inputs_for( const uint32_t& index, const uint128& amount, const addr_t& currency, const spend_options_t& options) const override; std::vector get_history(const uint32_t& index, const query_filter_t& filter) const override; std::vector get_tx_log(const uint32_t& index, const int32_t& limit) const override; balance_t get_balance(const uint32_t& index, const addr_t& currency) const override; std::map get_balances( const uint32_t& index, const vnx::bool_t& with_zero = false) const override; std::map get_total_balances(const std::vector& addresses) const override; std::map get_contract_balances(const addr_t& address) const override; std::map> get_contracts( const uint32_t& index, const vnx::optional& type_name, const vnx::optional& type_hash) const override; std::map> get_contracts_owned( const uint32_t& index, const vnx::optional& type_name, const vnx::optional& type_hash) const override; std::vector get_offers(const uint32_t& index, const vnx::bool_t& state) const override; std::map, 2>> get_swap_liquidity(const uint32_t& index) const override; addr_t get_address(const uint32_t& index, const uint32_t& offset) const override; std::vector get_all_addresses(const int32_t& index) const override; int32_t find_wallet_by_addr(const addr_t& address) const override; std::pair get_farmer_keys(const uint32_t& index) const override; std::vector> get_all_farmer_keys() const override; account_info_t get_account(const uint32_t& index) const override; std::vector get_all_accounts() const override; bool is_locked(const uint32_t& index) const override; void lock(const uint32_t& index) override; void unlock(const uint32_t& index, const std::string& passphrase) override; void add_account(const uint32_t& index, const account_t& config, const vnx::optional& passphrase) override; void create_account(const account_t& config, const vnx::optional& passphrase) override; void create_wallet(const account_t& config, const vnx::optional& words, const vnx::optional& passphrase) override; void import_wallet(const account_t& config, std::shared_ptr key_file, const vnx::optional& passphrase) override; std::shared_ptr export_wallet(const uint32_t& index) const override; void remove_account(const uint32_t& index, const uint32_t& account) override; void set_address_count(const uint32_t& index, const uint32_t& count) override; std::set get_token_list() const override; void add_token(const addr_t& address) override; void rem_token(const addr_t& address) override; hash_t get_master_seed(const uint32_t& index) const override; std::vector get_mnemonic_seed(const uint32_t& index) const override; std::vector get_mnemonic_wordlist(const std::string& lang) const override; void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const override; void http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const override; private: std::shared_ptr get_wallet(const uint32_t& index) const; addr_t get_plotnft_owner(const addr_t& address) const; private: std::shared_ptr node; std::vector> wallets; std::map> lock_timers; mutable mmx::hash_multi_table tx_log; std::shared_ptr params; std::shared_ptr> http; friend class vnx::addons::HttpInterface; }; } // mmx #endif /* INCLUDE_MMX_WALLET_H_ */ ================================================ FILE: include/mmx/WebAPI.h ================================================ /* * WebAPI.h * * Created on: Jan 25, 2022 * Author: mad */ #ifndef INCLUDE_MMX_WEBAPI_H_ #define INCLUDE_MMX_WEBAPI_H_ #include #include #include #include #include #include namespace mmx { class RenderContext; class WebAPI : public WebAPIBase { public: WebAPI(const std::string& _vnx_name); protected: void init() override; void main() override; void shutdown() override; void http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const override; void http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const override; void handle(std::shared_ptr block) override; void handle(std::shared_ptr value) override; void handle(std::shared_ptr value) override; private: void update(); std::shared_ptr get_context() const; void render_header(const vnx::request_id_t& request_id, std::shared_ptr block) const; void render_headers(const vnx::request_id_t& request_id, size_t limit, const size_t offset) const; void render_block(const vnx::request_id_t& request_id, std::shared_ptr block) const; void render_blocks(const vnx::request_id_t& request_id, size_t limit, const size_t offset) const; void render_transaction(const vnx::request_id_t& request_id, const vnx::optional& info) const; void render_transactions(const vnx::request_id_t& request_id, size_t limit, const size_t offset, const std::vector& tx_ids) const; void render_address(const vnx::request_id_t& request_id, const addr_t& address, const std::map& balances) const; void render_balances(const vnx::request_id_t& request_id, const vnx::optional& currency, const std::map& balances) const; void render_history(const vnx::request_id_t& request_id, std::vector history) const; void render_tx_history(const vnx::request_id_t& request_id, const std::vector& history) const; void render_block_graph(const vnx::request_id_t& request_id, size_t limit, const size_t step, const uint32_t height) const; void get_context( const std::unordered_set& addr_set, const vnx::request_id_t& request_id, const std::function)>& callback) const; void resolve_vm_varptr( const addr_t& contract, const vm::varptr_t& var, const vnx::request_id_t& request_id, const uint32_t call_depth, const std::function& callback) const; void respond(const vnx::request_id_t& request_id, std::shared_ptr response) const; void respond(const vnx::request_id_t& request_id, const vnx::Variant& value) const; void respond(const vnx::request_id_t& request_id, const vnx::Object& value) const; void respond_ex(const vnx::request_id_t& request_id, const std::exception& ex) const; void respond_status(const vnx::request_id_t& request_id, const int32_t& status, const std::string& text = "") const; private: std::shared_ptr node; std::shared_ptr wallet; std::shared_ptr farmer; std::shared_ptr params; std::list, uint64_t>> log_history; std::list, uint64_t>> proof_history; bool is_synced = false; uint32_t curr_height = 0; uint32_t synced_since = 0; uint64_t log_counter = 0; uint64_t proof_counter = 0; static std::mutex g_config_mutex; }; } // mmx #endif /* INCLUDE_MMX_WEBAPI_H_ */ ================================================ FILE: include/mmx/WebRender.h ================================================ /* * WebRender.h * * Created on: Sep 19, 2024 * Author: mad */ #ifndef INCLUDE_MMX_WEBRENDER_H_ #define INCLUDE_MMX_WEBRENDER_H_ #include #include #include #include #include #include #include #include #include namespace mmx { template vnx::Object web_render(const T& value); template vnx::Variant web_render(std::shared_ptr value); class WebRender { public: vnx::Object object; vnx::Variant result; WebRender() = default; template void type_begin(int num_fields) { if(auto type_code = T::static_get_type_code()) { object["__type"] = type_code->name; } } template void type_end(int num_fields) { result = vnx::Variant(object); } void type_field(const std::string& name, const size_t index) { p_value = &object[name]; } template void set(const T& value) { *p_value = value; } template void accept(const T& value) { if constexpr(vnx::is_object()) { set(web_render(value)); } else { set(value); } } template void accept(const bytes_t& value) { set(value.to_string()); } void accept(const uint128& value) { set(value.str(10)); } void accept(const fixed128& value) { set(value.to_string()); } void accept(const hash_t& value) { set(value.to_string()); } void accept(const addr_t& value) { set(value.to_string()); } void accept(const pubkey_t& value) { set(value.to_string()); } void accept(const signature_t& value) { set(value.to_string()); } template void accept(const vnx::optional& value) { if(value) { accept(*value); } else { set(nullptr); } } template void accept(const std::pair& value) { const auto prev = p_value; std::array tmp; p_value = &tmp[0]; accept(value.first); p_value = &tmp[1]; accept(value.second); p_value = prev; set(tmp); } template void accept(const std::array& value) { accept_range(value.begin(), value.end()); } template void accept(const std::vector& value) { accept_range(value.begin(), value.end()); } template void accept(const std::set& value) { accept_range(value.begin(), value.end()); } template void accept(const std::map& value) { accept_range(value.begin(), value.end()); } template void accept_range(const T& begin, const T& end) { const auto prev = p_value; std::list tmp; for(T iter = begin; iter != end; ++iter) { tmp.emplace_back(); p_value = &tmp.back(); accept(*iter); } p_value = prev; set(tmp); } void accept(const std::vector& value) { set(vnx::to_hex_string(value.data(), value.size())); } template void accept(std::shared_ptr value) { set(web_render(value)); } private: vnx::Variant* p_value = &result; }; template vnx::Object web_render(const T& value) { WebRender visitor; value.accept_generic(visitor); return std::move(visitor.object); } template vnx::Variant web_render(std::shared_ptr value) { WebRender visitor; vnx::accept_generic(visitor, std::shared_ptr(value)); return std::move(visitor.result); } template vnx::Variant web_render_value(const T& value) { WebRender visitor; vnx::accept_generic(visitor, value); return std::move(visitor.result); } } // mmx #endif /* INCLUDE_MMX_WEBRENDER_H_ */ ================================================ FILE: include/mmx/addr_t.hpp ================================================ /* * addr_t.hpp * * Created on: Dec 12, 2021 * Author: mad */ #ifndef INCLUDE_MMX_ADDR_T_HPP_ #define INCLUDE_MMX_ADDR_T_HPP_ #include namespace mmx { class addr_t : public hash_t { public: typedef hash_t super_t; addr_t() = default; addr_t(const hash_t& hash); addr_t(const std::string& addr); std::string to_string() const; void from_string(const std::string& addr); }; inline addr_t::addr_t(const hash_t& hash) : super_t(hash) { } inline addr_t::addr_t(const std::string& addr) { from_string(addr); } inline std::ostream& operator<<(std::ostream& out, const addr_t& addr) { return out << addr.to_string(); } } //mmx namespace vnx { void read(vnx::TypeInput& in, mmx::addr_t& value, const vnx::TypeCode* type_code, const uint16_t* code); inline void write(vnx::TypeOutput& out, const mmx::addr_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, value.bytes, type_code, code); } inline void read(std::istream& in, mmx::addr_t& value) { std::string tmp; vnx::read(in, tmp); value.from_string(tmp); } inline void write(std::ostream& out, const mmx::addr_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::addr_t& value) { vnx::accept(visitor, value.to_string()); } } // vnx namespace std { template<> struct hash { size_t operator()(const mmx::addr_t& x) const { return std::hash{}(x); } }; } // std #endif /* INCLUDE_MMX_ADDR_T_HPP_ */ ================================================ FILE: include/mmx/balance_cache_t.h ================================================ /* * balance_cache_t.h * * Created on: May 8, 2022 * Author: mad */ #ifndef INCLUDE_MMX_BALANCE_CACHE_T_H_ #define INCLUDE_MMX_BALANCE_CACHE_T_H_ #include #include #include #include namespace mmx { class balance_cache_t { public: balance_cache_t(const balance_cache_t&) = default; balance_cache_t(balance_cache_t* parent) : parent(parent) {} balance_cache_t(const balance_table_t* source) : source(source) {} balance_cache_t& operator=(const balance_cache_t&) = default; uint128* find(const addr_t& address, const addr_t& contract) { const auto key = std::make_pair(address, contract); auto iter = balance.find(key); if(iter == balance.end()) { if(source) { uint128 value = 0; if(source->find(key, value)) { iter = balance.emplace(key, value).first; } else { return nullptr; } } if(parent) { if(auto value = parent->find(address, contract)) { iter = balance.emplace(key, *value).first; } else { return nullptr; } } } return &iter->second; } uint128& get(const addr_t& address, const addr_t& contract) { if(auto value = find(address, contract)) { return *value; } return balance[std::make_pair(address, contract)] = 0; } void apply(const balance_cache_t& cache) { for(const auto& entry : cache.balance) { balance[entry.first] = entry.second; } } std::map, uint128> balance; private: balance_cache_t* parent = nullptr; const balance_table_t* source = nullptr; }; } // mmx #endif /* INCLUDE_MMX_BALANCE_CACHE_T_H_ */ ================================================ FILE: include/mmx/bls_pubkey_t.hpp ================================================ /* * bls_pubkey_t.hpp * * Created on: Nov 30, 2021 * Author: mad */ #ifndef INCLUDE_MMX_BLS_PUBKEY_T_HPP_ #define INCLUDE_MMX_BLS_PUBKEY_T_HPP_ #include #include namespace bls { class G1Element; } namespace mmx { class bls_pubkey_t : public bytes_t<48> { public: typedef bytes_t<48> super_t; bls_pubkey_t() = default; bls_pubkey_t(const super_t& bytes); bls_pubkey_t(const bls::G1Element& key); hash_t get_addr() const; void to(bls::G1Element& key) const; }; inline bls_pubkey_t::bls_pubkey_t(const super_t& bytes) : super_t(bytes) { } } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::bls_pubkey_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::bls_pubkey_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::bls_pubkey_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::bls_pubkey_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::bls_pubkey_t& value) { vnx::read(in, (mmx::bls_pubkey_t::super_t&)value); } inline void write(std::ostream& out, const mmx::bls_pubkey_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::bls_pubkey_t& value) { vnx::accept(visitor, (const mmx::bls_pubkey_t::super_t&)value); } } // vnx namespace std { template<> struct hash { size_t operator()(const mmx::bls_pubkey_t& x) const { return std::hash{}(x); } }; } // std #endif /* INCLUDE_MMX_BLS_PUBKEY_T_HPP_ */ ================================================ FILE: include/mmx/bls_signature_t.hpp ================================================ /* * bls_bls_signature_t.hpp * * Created on: Nov 30, 2021 * Author: mad */ #ifndef INCLUDE_MMX_BLS_bls_signature_t_HPP_ #define INCLUDE_MMX_BLS_bls_signature_t_HPP_ #include #include #include #include namespace bls { class G2Element; } namespace mmx { class bls_signature_t : public bytes_t<96> { public: typedef bytes_t<96> super_t; bls_signature_t() = default; bls_signature_t(const bls::G2Element& sig); bool verify(const bls_pubkey_t& pubkey, const hash_t& hash) const; void to(bls::G2Element& sig) const; static bls_signature_t sign(const skey_t& skey, const hash_t& hash); static bls_signature_t sign(const bls::PrivateKey& skey, const hash_t& hash); private: struct cache_t { bytes_t<96> sig; hash_t hash; bls_pubkey_t pubkey; }; static std::mutex mutex; static const size_t hash_salt; static std::array sig_cache; }; } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::bls_signature_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::bls_signature_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::bls_signature_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::bls_signature_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::bls_signature_t& value) { vnx::read(in, (mmx::bls_signature_t::super_t&)value); } inline void write(std::ostream& out, const mmx::bls_signature_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::bls_signature_t& value) { vnx::accept(visitor, (const mmx::bls_signature_t::super_t&)value); } } // vnx #endif /* INCLUDE_MMX_BLS_bls_signature_t_HPP_ */ ================================================ FILE: include/mmx/bytes_t.hpp ================================================ /* * bytes_t.hpp * * Created on: Dec 2, 2021 * Author: mad */ #ifndef INCLUDE_MMX_BYTES_T_HPP_ #define INCLUDE_MMX_BYTES_T_HPP_ #include #include #include #include #include #include namespace mmx { template class bytes_t { public: static constexpr size_t size_ = N; std::array bytes = {}; bytes_t() = default; bytes_t(const std::vector& data); bytes_t(const std::array& data); bytes_t(const void* data, const size_t num_bytes); explicit bytes_t(const std::string& str); uint8_t* data(); const uint8_t* data() const; size_t size() const; bool is_zero() const; vnx::Hash64 crc64() const; std::string to_string() const; std::vector to_vector() const; void from_string(const std::string& str); template T to_uint(const bool big_endian = false) const; template bytes_t& from_uint(T value, const bool big_endian = false); uint8_t& operator[](size_t i) { return bytes[i]; } const uint8_t& operator[](size_t i) const { return bytes[i]; } bool operator==(const bytes_t& other) const { return bytes == other.bytes; } bool operator!=(const bytes_t& other) const { return bytes != other.bytes; } }; template bytes_t::bytes_t(const void* data, const size_t num_bytes) { if(num_bytes != N) { throw std::logic_error("bytes_t(): length mismatch (" + std::to_string(num_bytes) + " != " + std::to_string(N) + ")"); } ::memcpy(bytes.data(), data, num_bytes); } template bytes_t::bytes_t(const std::vector& data) : bytes_t(data.data(), data.size()) { } template bytes_t::bytes_t(const std::array& data) : bytes_t(data.data(), data.size()) { } template bytes_t::bytes_t(const std::string& str) { const auto tmp = vnx::from_hex_string(str); if(tmp.size() != N) { throw std::logic_error("bytes_t(std::string&): length mismatch (" + std::to_string(tmp.size()) + " != " + std::to_string(N) + ")"); } ::memcpy(bytes.data(), tmp.data(), N); } template uint8_t* bytes_t::data() { return bytes.data(); } template const uint8_t* bytes_t::data() const { return bytes.data(); } template size_t bytes_t::size() const { return N; } template bool bytes_t::is_zero() const { return *this == bytes_t(); } template template T bytes_t::to_uint(const bool big_endian) const { T out = T(); for(size_t i = 0; i < N; ++i) { out <<= 8; if(big_endian) { out |= bytes[i]; } else { out |= bytes[N - i - 1]; } } return out; } template template bytes_t& bytes_t::from_uint(T value, const bool big_endian) { for(size_t i = 0; i < N; ++i) { if(big_endian) { bytes[N - i - 1] = value; } else { bytes[i] = value; } value >>= 8; } return *this; } template std::string bytes_t::to_string() const { return vnx::to_hex_string(bytes.data(), bytes.size(), false, false); } template vnx::Hash64 bytes_t::crc64() const { return vnx::Hash64(bytes.data(), bytes.size()); } template std::vector bytes_t::to_vector() const { return std::vector(bytes.begin(), bytes.end()); } template void bytes_t::from_string(const std::string& str) { *this = bytes_t(str); } template bool operator<(const bytes_t& lhs, const bytes_t& rhs) { return ::memcmp(lhs.data(), rhs.data(), N) < 0; } template bool operator>(const bytes_t& lhs, const bytes_t& rhs) { return ::memcmp(lhs.data(), rhs.data(), N) > 0; } template std::ostream& operator<<(std::ostream& out, const bytes_t& bytes) { return out << bytes.to_string(); } template bytes_t operator+(const bytes_t& lhs, const bytes_t& rhs) { bytes_t res; ::memcpy(res.data(), lhs.data(), N); ::memcpy(res.data() + N, rhs.data(), M); return res; } template std::vector operator+(const std::vector& lhs, const bytes_t& rhs) { auto res = lhs; res.insert(res.end(), rhs.bytes.begin(), rhs.bytes.end()); return res; } template std::vector operator+(const bytes_t& lhs, const std::vector& rhs) { auto res = lhs.to_vector(); res.insert(res.end(), rhs.begin(), rhs.end()); return res; } template std::vector operator+(const std::string& lhs, const bytes_t& rhs) { std::vector res(lhs.begin(), lhs.end()); res.insert(res.end(), rhs.bytes.begin(), rhs.bytes.end()); return res; } template std::vector operator+(const bytes_t& lhs, const std::string& rhs) { auto res = lhs.to_vector(); res.insert(res.end(), rhs.begin(), rhs.end()); return res; } } // mmx namespace vnx { template void read(vnx::TypeInput& in, mmx::bytes_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { switch(code[0]) { case CODE_STRING: case CODE_ALT_STRING: { std::string tmp; vnx::read(in, tmp, type_code, code); try { value.from_string(tmp); } catch(...) { value = mmx::bytes_t(); } break; } case CODE_UINT64: case CODE_ALT_UINT64: { uint64_t tmp = 0; vnx::read(in, tmp, type_code, code); value.from_uint(tmp); break; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: { vnx::Variant tmp; vnx::read(in, tmp, type_code, code); if(tmp.is_string()) { try { value.from_string(tmp.to()); } catch(...) { value = mmx::bytes_t(); } } else { tmp.to(value.bytes); } break; } default: vnx::read(in, value.bytes, type_code, code); } } template void write(vnx::TypeOutput& out, const mmx::bytes_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, value.bytes, type_code, code); } template void read(std::istream& in, mmx::bytes_t& value) { std::string tmp; vnx::read(in, tmp); value.from_string(tmp); } template void write(std::ostream& out, const mmx::bytes_t& value) { vnx::write(out, value.to_string()); } template void accept(vnx::Visitor& visitor, const mmx::bytes_t& value) { visitor.visit(value.data(), value.size()); } } // vnx #endif /* INCLUDE_MMX_BYTES_T_HPP_ */ ================================================ FILE: include/mmx/exception.h ================================================ /* * exception.h * * Created on: Sep 3, 2022 * Author: mad */ #ifndef INCLUDE_MMX_EXCEPTION_H_ #define INCLUDE_MMX_EXCEPTION_H_ #include namespace mmx { class static_failure : public std::logic_error { public: static_failure(const std::string& note) : logic_error(note) {} }; class invalid_solution : public static_failure { public: invalid_solution() : static_failure("invalid solution") {} invalid_solution(const std::string& note) : static_failure("invalid solution (" + note + ")") {} }; } // mmx #endif /* INCLUDE_MMX_EXCEPTION_H_ */ ================================================ FILE: include/mmx/fixed128.hpp ================================================ /* * fixed128.hpp * * Created on: Dec 15, 2022 * Author: mad */ #ifndef INCLUDE_MMX_FIXED128_HPP_ #define INCLUDE_MMX_FIXED128_HPP_ #include #include #include #include #include namespace mmx { class fixed128 { public: uint128 fixed = uint128(); fixed128() = default; fixed128(const uint128& value) { fixed = value * divider; } fixed128(const uint128_t& value, const int decimals); fixed128(const double& value); fixed128(const std::string& str); explicit fixed128(const char* str) : fixed128(std::string(str)) {} uint128 uint() const { return fixed / divider; } uint64_t fractional() const { return fixed % divider; } double to_value() const; uint128 to_amount(const int decimals) const; std::string to_string() const; operator bool() const { return bool(fixed); } operator uint64_t() const { return uint(); } operator double() const { return to_value(); } static const uint64_t divider; static constexpr int decimals = 15; }; inline std::ostream& operator<<(std::ostream& out, const fixed128& value) { return out << value.to_string(); } } // mmx namespace vnx { void read(vnx::TypeInput& in, mmx::fixed128& value, const vnx::TypeCode* type_code, const uint16_t* code); inline void write(vnx::TypeOutput& out, const mmx::fixed128& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { write(out, value.fixed); } inline void read(std::istream& in, mmx::fixed128& value) { std::string str; vnx::read(in, str); value = mmx::fixed128(str); } inline void write(std::ostream& out, const mmx::fixed128& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::fixed128& value) { vnx::accept(visitor, value.to_string()); } } // vnx #endif /* INCLUDE_MMX_FIXED128_HPP_ */ ================================================ FILE: include/mmx/hash_512_t.hpp ================================================ /* * hash_512_t.hpp * * Created on: Nov 13, 2023 * Author: mad */ #ifndef INCLUDE_MMX_HASH_512_T_HPP_ #define INCLUDE_MMX_HASH_512_T_HPP_ #include #include #include namespace mmx { class hash_512_t : public bytes_t<64> { public: typedef bytes_t<64> super_t; hash_512_t() = default; explicit hash_512_t(const std::string& data); explicit hash_512_t(const std::vector& data); explicit hash_512_t(const void* data, const size_t num_bytes); static hash_512_t ones(); static hash_512_t empty(); static hash_512_t random(); static hash_512_t from_bytes(const std::vector& bytes); static hash_512_t from_bytes(const std::array& bytes); static hash_512_t from_bytes(const void* data); }; inline hash_512_t::hash_512_t(const std::string& data) : hash_512_t(data.data(), data.size()) { } inline hash_512_t::hash_512_t(const std::vector& data) : hash_512_t(data.data(), data.size()) { } inline hash_512_t hash_512_t::ones() { hash_512_t res; ::memset(res.data(), -1, res.size()); return res; } inline hash_512_t hash_512_t::empty() { return hash_512_t(nullptr, 0); } inline hash_512_t hash_512_t::from_bytes(const std::vector& bytes) { if(bytes.size() != 64) { throw std::logic_error("hash size mismatch"); } return from_bytes(bytes.data()); } inline hash_512_t hash_512_t::from_bytes(const std::array& bytes) { return from_bytes(bytes.data()); } inline hash_512_t hash_512_t::from_bytes(const void* data) { hash_512_t res; ::memcpy(res.data(), data, 64); return res; } } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::hash_512_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::hash_512_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::hash_512_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::hash_512_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::hash_512_t& value) { vnx::read(in, (mmx::hash_512_t::super_t&)value); } inline void write(std::ostream& out, const mmx::hash_512_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::hash_512_t& value) { vnx::accept(visitor, (const mmx::hash_512_t::super_t&)value); } } // vnx #endif /* INCLUDE_MMX_HASH_512_T_HPP_ */ ================================================ FILE: include/mmx/hash_t.hpp ================================================ /* * hash_t.hpp * * Created on: Nov 25, 2021 * Author: mad */ #ifndef INCLUDE_MMX_HASH_T_HPP_ #define INCLUDE_MMX_HASH_T_HPP_ #include #include #include namespace mmx { class hash_t : public bytes_t<32> { public: typedef bytes_t<32> super_t; hash_t() = default; explicit hash_t(const std::string& data); explicit hash_t(const std::vector& data); template explicit hash_t(const std::array& data); template explicit hash_t(const bytes_t& data); explicit hash_t(const void* data, const size_t num_bytes); uint256_t to_uint256() const { return to_uint(); } static hash_t ones(); static hash_t empty(); static hash_t random(); static hash_t secure_random(); static hash_t from_bytes(const std::vector& bytes); static hash_t from_bytes(const std::array& bytes); static hash_t from_bytes(const void* data); }; inline hash_t::hash_t(const std::string& data) : hash_t(data.data(), data.size()) { } inline hash_t::hash_t(const std::vector& data) : hash_t(data.data(), data.size()) { } template hash_t::hash_t(const std::array& data) : hash_t(data.data(), data.size()) { } template hash_t::hash_t(const bytes_t& data) : hash_t(data.data(), data.size()) { } inline hash_t hash_t::ones() { hash_t res; ::memset(res.data(), -1, res.size()); return res; } inline hash_t hash_t::empty() { return hash_t(nullptr, 0); } inline hash_t hash_t::from_bytes(const std::vector& bytes) { if(bytes.size() != 32) { throw std::logic_error("hash size mismatch"); } return from_bytes(bytes.data()); } inline hash_t hash_t::from_bytes(const std::array& bytes) { return from_bytes(bytes.data()); } inline hash_t hash_t::from_bytes(const void* data) { hash_t res; ::memcpy(res.data(), data, 32); return res; } } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::hash_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::hash_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::hash_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::hash_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::hash_t& value) { vnx::read(in, (mmx::hash_t::super_t&)value); } inline void write(std::ostream& out, const mmx::hash_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::hash_t& value) { vnx::accept(visitor, (const mmx::hash_t::super_t&)value); } } // vnx namespace std { template<> struct hash { size_t operator()(const mmx::hash_t& x) const { size_t res = 0; ::memcpy(&res, x.data(), std::min(x.size(), sizeof(res))); return res; } }; } // std #endif /* INCLUDE_MMX_HASH_T_HPP_ */ ================================================ FILE: include/mmx/helpers.h ================================================ /* * helpers.h * * Created on: Dec 29, 2024 * Author: mad */ #ifndef INCLUDE_MMX_HELPERS_H_ #define INCLUDE_MMX_HELPERS_H_ #include #include #include #include namespace mmx { template typename T::mapped_type find_value(const T& map, const typename T::key_type& key, const typename T::mapped_type& value) { auto iter = map.find(key); if(iter != map.end()) { return iter->second; } return value; } template vnx::optional find_value(const T& map, const typename T::key_type& key) { auto iter = map.find(key); if(iter != map.end()) { return iter->second; } return nullptr; } inline std::string read_file(const std::string& path) { std::stringstream buffer; std::ifstream stream(path); if(!stream.good()) { throw std::runtime_error("failed to open file: " + path); } buffer << stream.rdbuf(); return buffer.str(); } } // mmx #endif /* INCLUDE_MMX_HELPERS_H_ */ ================================================ FILE: include/mmx/hmac_sha512.hpp ================================================ /* * hmac_sha512.h * * Created on: Sep 11, 2022 * Author: mad */ #ifndef INCLUDE_MMX_HMAC_SHA512_H_ #define INCLUDE_MMX_HMAC_SHA512_H_ #include #include #include #include namespace mmx { inline std::pair hmac_sha512(const hash_t& seed, const hash_t& key) { HMAC_SHA512 func(key.data(), key.size()); func.Write(seed.data(), seed.size()); uint8_t tmp[64] = {}; func.Finalize(tmp); std::pair out; ::memcpy(out.first.data(), tmp, 32); ::memcpy(out.second.data(), tmp + 32, 32); return out; } inline std::pair hmac_sha512_n(const hash_t& seed, const hash_t& key, const uint32_t index) { HMAC_SHA512 func(key.data(), key.size()); func.Write(seed.data(), seed.size()); { const auto bindex = vnx::to_big_endian(index); func.Write((const uint8_t*)&bindex, sizeof(bindex)); } uint8_t tmp[64] = {}; func.Finalize(tmp); std::pair out; ::memcpy(out.first.data(), tmp, 32); ::memcpy(out.second.data(), tmp + 32, 32); return out; } inline std::pair kdf_hmac_sha512(const hash_t& seed, const hash_t& key, const uint32_t num_iters) { // This is NOT standard PBKDF2, but a simplified adaptation. uint8_t tmp[64] = {}; HMAC_SHA512 func(key.data(), key.size()); func.Write(seed.data(), seed.size()); func.Finalize(tmp); for(uint32_t i = 1; i < num_iters; ++i) { HMAC_SHA512 func(tmp, sizeof(tmp)); func.Write(seed.data(), seed.size()); func.Finalize(tmp); } std::pair out; ::memcpy(out.first.data(), tmp, 32); ::memcpy(out.second.data(), tmp + 32, 32); return out; } } // mmx #endif /* INCLUDE_MMX_HMAC_SHA512_H_ */ ================================================ FILE: include/mmx/http_request.h ================================================ /* * http_request.h * * Created on: May 6, 2024 * Author: mad */ #ifndef INCLUDE_MMX_HTTP_REQUEST_H_ #define INCLUDE_MMX_HTTP_REQUEST_H_ #include namespace mmx { void http_request_file(const std::string& url, const std::string& file_path, const std::string& options = ""); } // mmx #endif /* INCLUDE_MMX_HTTP_REQUEST_H_ */ ================================================ FILE: include/mmx/mnemonic.h ================================================ /* * mnemonic.h * * Created on: Sep 12, 2022 * Author: mad */ #ifndef INCLUDE_MMX_MNEMONIC_H_ #define INCLUDE_MMX_MNEMONIC_H_ #include #include #include #ifdef _MSC_VER #include #else #define MMX_IFACE_EXPORT #endif namespace mmx { namespace mnemonic { MMX_IFACE_EXPORT extern const std::vector wordlist_en; std::vector seed_to_words(const hash_t& seed, const std::vector& wordlist = wordlist_en); hash_t words_to_seed(const std::vector& words, const std::vector& wordlist = wordlist_en); std::string words_to_string(const std::vector& words); std::vector string_to_words(const std::string& phrase); } // mnemonic } // mmx #endif /* INCLUDE_MMX_MNEMONIC_H_ */ ================================================ FILE: include/mmx/multi_table.h ================================================ /* * multi_table.h * * Created on: Jun 21, 2022 * Author: mad */ #ifndef INCLUDE_MMX_MULTI_TABLE_H_ #define INCLUDE_MMX_MULTI_TABLE_H_ #include namespace mmx { template class multi_table : protected table, V> { private: typedef table, V> super_t; protected: using super_t::db; using super_t::read; using super_t::write; public: multi_table() = default; multi_table(const std::string& file_path) : super_t(file_path) { } using super_t::open; using super_t::close; void insert(const K& key, const V& value) { insert_many(key, {value}); } void insert_many(const K& key, const std::vector& values) { std::pair key_(key, std::numeric_limits::max()); { Table::Iterator iter(db); iter.seek_prev(write(key_)); key_.second = 0; if(iter.is_valid()) { std::pair found; read(iter.key(), found); if(found.first == key) { key_.second = found.second + 1; } } } for(const auto& value : values) { if(key_.second == std::numeric_limits::max()) { throw std::runtime_error("key space overflow (" + super_t::get_path() + ")"); } super_t::insert(key_, value); key_.second++; } } size_t count(const K& key) const { std::vector values; return find(key, values); } size_t find(const K& key, std::vector& values, const bool greater_equal = false) const { values.clear(); std::pair key_(key, 0); Table::Iterator iter(db); iter.seek(write(key_)); while(iter.is_valid()) { read(iter.key(), key_); if(!greater_equal && !(key_.first == key)) { break; } try { V value; read(iter.value(), value, super_t::value_type, super_t::value_code); values.push_back(std::move(value)); } catch(...) { // ignore } iter.next(); } return values.size(); } size_t find_last(const K& key, std::vector& values, const size_t limit) const { values.clear(); std::pair key_(key, std::numeric_limits::max()); Table::Iterator iter(db); iter.seek_prev(write(key_)); while(iter.is_valid() && values.size() < limit) { read(iter.key(), key_); if(!(key_.first == key)) { break; } try { V value; read(iter.value(), value, super_t::value_type, super_t::value_code); values.push_back(std::move(value)); } catch(...) { // ignore } iter.prev(); } return values.size(); } size_t find_range(const K& begin, const K& end, std::vector& values) const { values.clear(); std::pair key_(begin, 0); Table::Iterator iter(db); iter.seek(write(key_)); while(iter.is_valid()) { read(iter.key(), key_); if(!(key_.first < end)) { break; } try { V value; read(iter.value(), value, super_t::value_type, super_t::value_code); values.push_back(std::move(value)); } catch(...) { // ignore } iter.next(); } return values.size(); } size_t find_range(const K& begin, const K& end, std::vector>& result) const { result.clear(); std::pair key_(begin, 0); Table::Iterator iter(db); iter.seek(write(key_)); while(iter.is_valid()) { read(iter.key(), key_); if(!(key_.first < end)) { break; } try { std::pair tmp; tmp.first = key_.first; read(iter.value(), tmp.second, super_t::value_type, super_t::value_code); result.push_back(std::move(tmp)); } catch(...) { // ignore } iter.next(); } return result.size(); } void scan(const std::function& callback) const { super_t::scan([callback](const std::pair& key, const V& value) -> bool { return callback(key.first, value); }); } using super_t::commit; using super_t::revert; using super_t::flush; using super_t::iterator; using super_t::get_impl; using super_t::get_path; }; template class uint_multi_table : public multi_table { public: uint_multi_table() : multi_table() {} uint_multi_table(const std::string& file_path) : multi_table(file_path) {} protected: void read(std::shared_ptr entry, std::pair& key) const override { if(entry->size != sizeof(K) + sizeof(I)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + multi_table::get_path() + ")"); } key.first = vnx::from_big_endian(*((const K*)entry->data)); key.second = vnx::from_big_endian(*((const I*)(entry->data + sizeof(K)))); } std::shared_ptr write(const std::pair& key) const override { auto out = std::make_shared(sizeof(K) + sizeof(I)); vnx::write_value(out->data, vnx::to_big_endian(key.first)); vnx::write_value(out->data + sizeof(K), vnx::to_big_endian(key.second)); return out; } }; template class hash_multi_table : public multi_table { public: hash_multi_table() : multi_table() {} hash_multi_table(const std::string& file_path) : multi_table(file_path) {} protected: void read(std::shared_ptr entry, std::pair& key) const override { if(entry->size != key.first.size() + sizeof(I)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + multi_table::get_path() + ")"); } ::memcpy(key.first.data(), entry->data, key.first.size()); key.second = vnx::from_big_endian(*((const I*)(entry->data + key.first.size()))); } std::shared_ptr write(const std::pair& key) const override { auto out = std::make_shared(key.first.size() + sizeof(I)); ::memcpy(out->data, key.first.data(), key.first.size()); vnx::write_value(out->data + key.first.size(), vnx::to_big_endian(key.second)); return out; } }; template class hash_uint_multi_table : public multi_table, V, I> { public: hash_uint_multi_table() : multi_table, V, I>() {} hash_uint_multi_table(const std::string& file_path) : multi_table, V, I>(file_path) {} protected: void read(std::shared_ptr entry, std::pair, I>& key) const override { if(entry->size != key.first.first.size() + sizeof(H) + sizeof(I)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + multi_table, V, I>::get_path() + ")"); } auto* src = entry->data; ::memcpy(key.first.first.data(), src, key.first.first.size()); src += key.first.first.size(); key.first.second = vnx::from_big_endian(*((const H*)src)); src += sizeof(H); key.second = vnx::from_big_endian(*((const I*)src)); } std::shared_ptr write(const std::pair, I>& key) const override { auto out = std::make_shared(key.first.first.size() + sizeof(H) + sizeof(I)); auto* dst = out->data; ::memcpy(dst, key.first.first.data(), key.first.first.size()); dst += key.first.first.size(); vnx::write_value(dst, vnx::to_big_endian(key.first.second)); dst += sizeof(H); vnx::write_value(dst, vnx::to_big_endian(key.second)); return out; } }; } // mmx #endif /* INCLUDE_MMX_MULTI_TABLE_H_ */ ================================================ FILE: include/mmx/pos/Prover.h ================================================ /* * Prover.h * * Created on: Feb 6, 2024 * Author: mad */ #ifndef INCLUDE_MMX_POS_PROVER_H_ #define INCLUDE_MMX_POS_PROVER_H_ #include #include #include namespace mmx { namespace pos { struct proof_data_t { bool valid = false; uint64_t index = 0; // final entry index std::string error_msg; // in case valid == false std::vector proof; // SSD plots will return full proof as well bytes_t meta; }; class Prover { public: bool debug = false; int32_t initial_y_shift = -1024 * 24; Prover(const std::string& file_path); std::vector get_qualities(const hash_t& challenge, const int plot_filter) const; proof_data_t get_full_proof(const uint64_t final_index) const; std::shared_ptr get_header() const { return header; } bool has_meta() const { return header->has_meta; } std::string get_file_path() const { return file_path; } const hash_t& get_plot_id() const { return header->plot_id; } const pubkey_t& get_farmer_key() const { return header->farmer_key; } const vnx::optional get_contract() const { return header->contract; } int get_ksize() const { return header->ksize; } int get_clevel() const { return header->ksize - header->xbits; } private: const std::string file_path; std::shared_ptr header; }; } // pos } // mmx #endif /* INCLUDE_MMX_POS_PROVER_H_ */ ================================================ FILE: include/mmx/pos/config.h ================================================ /* * config.h * * Created on: Feb 2, 2025 * Author: mad */ #ifndef INCLUDE_MMX_POS_CONFIG_H_ #define INCLUDE_MMX_POS_CONFIG_H_ #include #include namespace mmx { namespace pos { static constexpr int N_META = 14; static constexpr int N_META_OUT = 12; static constexpr int N_TABLE = 9; static constexpr int META_BYTES = N_META * 4; static constexpr int META_BYTES_OUT = N_META_OUT * 4; static constexpr int MEM_HASH_ITER = 256; } // pos } // mmx #endif /* INCLUDE_MMX_POS_CONFIG_H_ */ ================================================ FILE: include/mmx/pos/cuda_recompute.h ================================================ /* * cuda_recompute.h * * Created on: Feb 2, 2025 * Author: mad */ #ifndef INCLUDE_MMX_POS_CUDA_RECOMPUTE_H_ #define INCLUDE_MMX_POS_CUDA_RECOMPUTE_H_ #include #include #include #include #include #include #include namespace mmx { namespace pos { struct cuda_device_t { int index = -1; std::string name; uint32_t max_resident = 0; uint64_t buffer_size = 0; }; struct cuda_result_t { uint64_t id = 0; bool failed = false; std::string error; std::vector X; std::vector>> entries; }; bool have_cuda_recompute(); std::vector get_cuda_devices(); std::vector get_cuda_devices_used(); void cuda_recompute_init(bool enable = true, std::vector device_list = {}); void cuda_recompute_shutdown(); uint64_t cuda_recompute(const int ksize, const int xbits, const hash_t& plot_id, const std::vector& x_values); std::shared_ptr cuda_recompute_poll(const std::set& jobs); } // pos } // mmx #endif /* INCLUDE_MMX_POS_CUDA_RECOMPUTE_H_ */ ================================================ FILE: include/mmx/pos/encoding.h ================================================ /* * encoding.h * * Created on: Nov 20, 2023 * Author: mad */ #ifndef INCLUDE_MMX_POS_ENCODING_H_ #define INCLUDE_MMX_POS_ENCODING_H_ #include #include #include #include namespace mmx { namespace pos { std::vector encode(const std::vector& symbols, uint64_t& total_bits); std::vector decode(const std::vector& bit_stream, const uint64_t num_symbols, const uint64_t bit_offset = 0); // Calculates x * (x-1) / 2. Division is done before multiplication. static uint64_t GetXEnc(uint32_t x) { uint32_t a = x; uint32_t b = x - 1; if(a % 2 == 0) { a /= 2; } else { b /= 2; } return uint64_t(a) * b; } static std::pair LinePointToSquare(uint64_t index) { // Performs a square root, without the use of doubles uint32_t x = 0; for(int i = 31; i >= 0; i--) { const uint32_t new_x = x + (uint32_t(1) << i); if(GetXEnc(new_x) <= index) { x = new_x; } } return std::pair(x, index - GetXEnc(x)); } // Same as LinePointToSquare() but handles the x == y case. static std::pair LinePointToSquare3(uint64_t index) { auto res = LinePointToSquare(index); if(!res.second) { // decode x == y // in this case x is incremented by one and y is zero res.first--; res.second = res.first; } return res; } // Same as LinePointToSquare() but handles the x == y case. static std::pair LinePointToSquare2(uint64_t index) { auto res = LinePointToSquare3(index); res.first--; res.second--; return res; } } // pos } // mmx #endif /* INCLUDE_MMX_POS_ENCODING_H_ */ ================================================ FILE: include/mmx/pos/mem_hash.h ================================================ /* * mem_hash.h * * Created on: Oct 29, 2023 * Author: mad */ #ifndef INCLUDE_MMX_POS_MEM_HASH_H_ #define INCLUDE_MMX_POS_MEM_HASH_H_ #include namespace mmx { namespace pos { /* * mem = array of size mem_size * key = 64 bytes */ void gen_mem_array(uint32_t* mem, const uint8_t* key, const uint32_t mem_size); /* * mem = array of size 1024 * hash = array of size 128 */ void calc_mem_hash(uint32_t* mem, uint8_t* hash, const int num_iter); } // pos } // mmx #endif /* INCLUDE_MMX_POS_MEM_HASH_H_ */ ================================================ FILE: include/mmx/pos/util.h ================================================ /* * util.h * * Created on: Oct 30, 2023 * Author: mad */ #ifndef INCLUDE_MMX_POS_UTIL_H_ #define INCLUDE_MMX_POS_UTIL_H_ #include #include // compiler-specific byte swap macros. #ifdef _MSC_VER #include // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/byteswap-uint64-byteswap-ulong-byteswap-ushort?view=msvc-160 inline uint16_t bswap_16(uint16_t x) { return _byteswap_ushort(x); } inline uint32_t bswap_32(uint32_t x) { return _byteswap_ulong(x); } inline uint64_t bswap_64(uint64_t x) { return _byteswap_uint64(x); } #elif defined(__clang__) || defined(__GNUC__) inline uint16_t bswap_16(uint16_t x) { return __builtin_bswap16(x); } inline uint32_t bswap_32(uint32_t x) { return __builtin_bswap32(x); } inline uint64_t bswap_64(uint64_t x) { return __builtin_bswap64(x); } #else #error "unknown compiler, don't know how to swap bytes" #endif #define MMXPOS_HASHROUND(a, b, c, d) \ a = a + b; \ d = rotl_32(d ^ a, 16); \ c = c + d; \ b = rotl_32(b ^ c, 12); \ a = a + b; \ d = rotl_32(d ^ a, 8); \ c = c + d; \ b = rotl_32(b ^ c, 7); namespace mmx { namespace pos { template constexpr inline Int cdiv(const Int& a, const Int2& b) { return (a + b - 1) / b; } inline uint32_t rotl_32(const uint32_t v, int bits) { #ifdef _MSC_VER return _rotl(v, bits); #else return (v << bits) | (v >> (32 - bits)); #endif } inline uint64_t rotl_64(const uint64_t v, int bits) { #ifdef _MSC_VER return _rotl64(v, bits); #else return (v << bits) | (v >> (64 - bits)); #endif } inline uint64_t write_bits(uint64_t* dst, uint64_t value, const uint64_t bit_offset, const uint32_t num_bits) { if(num_bits < 64) { value &= ((uint64_t(1) << num_bits) - 1); } const uint32_t shift = bit_offset % 64; const uint32_t free_bits = 64 - shift; dst[bit_offset / 64] |= (value << shift); if(free_bits < num_bits) { dst[bit_offset / 64 + 1] |= (value >> free_bits); } return bit_offset + num_bits; } inline uint64_t read_bits(const uint64_t* src, const uint64_t bit_offset, const uint32_t num_bits) { uint32_t count = 0; uint64_t offset = bit_offset; uint64_t result = 0; while(count < num_bits) { const uint32_t shift = offset % 64; const uint32_t bits = std::min(num_bits - count, 64 - shift); const uint64_t value = src[offset / 64] >> shift; result |= value << count; count += bits; offset += bits; } if(num_bits < 64) { result &= ((uint64_t(1) << num_bits) - 1); } return result; } } // pos } // mmx #endif /* INCLUDE_MMX_POS_UTIL_H_ */ ================================================ FILE: include/mmx/pos/verify.h ================================================ /* * verify.h * * Created on: Nov 5, 2023 * Author: mad */ #ifndef INCLUDE_MMX_POS_VERIFY_H_ #define INCLUDE_MMX_POS_VERIFY_H_ #include #include #include namespace mmx { namespace pos { void set_remote_compute(bool enable); hash_t calc_quality(const hash_t& challenge, const bytes_t& meta); bool check_post_filter(const hash_t& challenge, const bytes_t& meta, const int post_filter); std::vector>> compute(const std::vector& X_values, std::vector* X_out, const hash_t& id, const int ksize, const int xbits); std::vector>> compute_full( const std::vector& X_in, const std::vector& Y_in, std::vector>& M_in, std::vector* X_out, const hash_t& id, const int ksize); hash_t verify( const std::vector& X_values, const hash_t& challenge, const hash_t& id, const int plot_filter, const int post_filter, const int ksize, const bool hard_fork); } // pos } // mmx #endif /* INCLUDE_MMX_POS_VERIFY_H_ */ ================================================ FILE: include/mmx/pubkey_t.hpp ================================================ /* * pubkey_t.hpp * * Created on: Nov 25, 2021 * Author: mad */ #ifndef INCLUDE_MMX_PUBKEY_T_HPP_ #define INCLUDE_MMX_PUBKEY_T_HPP_ #include #include #include namespace mmx { class pubkey_t : public bytes_t<33> { public: typedef bytes_t<33> super_t; pubkey_t() = default; pubkey_t(const skey_t& key); pubkey_t(const std::vector& bytes) : super_t(bytes) {} pubkey_t(const secp256k1_pubkey& key); addr_t get_addr() const; secp256k1_pubkey to_secp256k1() const; }; inline addr_t pubkey_t::get_addr() const { return addr_t(hash_t(bytes)); } } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::pubkey_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::pubkey_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::pubkey_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::pubkey_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::pubkey_t& value) { vnx::read(in, (mmx::pubkey_t::super_t&)value); } inline void write(std::ostream& out, const mmx::pubkey_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::pubkey_t& value) { vnx::accept(visitor, (const mmx::pubkey_t::super_t&)value); } } // vnx #endif /* INCLUDE_MMX_PUBKEY_T_HPP_ */ ================================================ FILE: include/mmx/secp256k1.hpp ================================================ /* * secp256k1.hpp * * Created on: Nov 28, 2021 * Author: mad */ #ifndef INCLUDE_MMX_SECP256K1_HPP_ #define INCLUDE_MMX_SECP256K1_HPP_ #include #ifdef _MSC_VER #include #else #define MMX_IFACE_EXPORT #endif namespace mmx { MMX_IFACE_EXPORT extern const secp256k1_context* g_secp256k1; void secp256k1_init(); void secp256k1_free(); } // mmx #endif /* INCLUDE_MMX_SECP256K1_HPP_ */ ================================================ FILE: include/mmx/signature_t.hpp ================================================ /* * signature_t.hpp * * Created on: Nov 25, 2021 * Author: mad */ #ifndef INCLUDE_MMX_SIGNATURE_T_HPP_ #define INCLUDE_MMX_SIGNATURE_T_HPP_ #include #include #include #include #include namespace mmx { class signature_t : public bytes_t<64> { public: typedef bytes_t<64> super_t; signature_t() = default; signature_t(const std::vector& bytes) : super_t(bytes) {} signature_t(const secp256k1_ecdsa_signature& sig); bool verify(const pubkey_t& pubkey, const hash_t& hash) const; secp256k1_ecdsa_signature to_secp256k1() const; signature_t normalized() const; static signature_t sign(const skey_t& skey, const hash_t& hash); }; } // mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::signature_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::signature_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::signature_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::signature_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::signature_t& value) { vnx::read(in, (mmx::signature_t::super_t&)value); } inline void write(std::ostream& out, const mmx::signature_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::signature_t& value) { vnx::accept(visitor, (const mmx::signature_t::super_t&)value); } } // vnx #endif /* INCLUDE_MMX_SIGNATURE_T_HPP_ */ ================================================ FILE: include/mmx/skey_t.hpp ================================================ /* * skey_t.hpp * * Created on: Nov 25, 2021 * Author: mad */ #ifndef INCLUDE_MMX_SKEY_T_HPP_ #define INCLUDE_MMX_SKEY_T_HPP_ #include #include namespace mmx { class skey_t : public bytes_t<32> { public: typedef bytes_t<32> super_t; skey_t() = default; explicit skey_t(const hash_t& hash) : super_t(hash) {} ~skey_t() { ::memset(data(), 0, size()); } }; } //mmx namespace vnx { inline void read(vnx::TypeInput& in, mmx::skey_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { vnx::read(in, (mmx::skey_t::super_t&)value, type_code, code); } inline void write(vnx::TypeOutput& out, const mmx::skey_t& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr) { vnx::write(out, (const mmx::skey_t::super_t&)value, type_code, code); } inline void read(std::istream& in, mmx::skey_t& value) { vnx::read(in, (mmx::skey_t::super_t&)value); } inline void write(std::ostream& out, const mmx::skey_t& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::skey_t& value) { vnx::accept(visitor, (const mmx::skey_t::super_t&)value); } } // vnx #endif /* INCLUDE_MMX_SKEY_T_HPP_ */ ================================================ FILE: include/mmx/table.h ================================================ /* * table.h * * Created on: Jun 20, 2022 * Author: mad */ #ifndef INCLUDE_MMX_TABLE_H_ #define INCLUDE_MMX_TABLE_H_ #include #include #include #include #include #include #include #include #include namespace mmx { void sync_type_codes(const std::string& file_path); template class table { public: table(bool disable_type_codes = true) : stream(disable_type_codes) { vnx::type().create_dynamic_code(value_code); value_type = vnx::type().get_type_code(); } table(const std::string& file_path, bool disable_type_codes = true) : table(disable_type_codes) { open(file_path); } virtual ~table() { close(); } std::shared_ptr
open(const std::string& file_path) { close(); return db = std::make_shared
(file_path); } void close() { db = nullptr; } void insert(const K& key, const V& value) { db->insert(write(key), write(value, value_type, value_code)); } bool count(const K& key, const uint32_t max_version = -1) const { V dummy; return find(key, dummy, max_version); } bool find(const K& key, V& value, const uint32_t max_version = -1) const { const auto entry = db->find(write(key), max_version); if(entry) { read(entry, value, value_type, value_code); return true; } return false; } bool find_first(V& value) const { K dummy; return find_first(dummy, value); } bool find_first(K& key, V& value) const { Table::Iterator iter(db); iter.seek_begin(); if(iter.is_valid()) { read(iter.key(), key); read(iter.value(), value, value_type, value_code); return true; } key = K(); value = V(); return false; } bool find_last(V& value) const { K dummy; return find_last(dummy, value); } bool find_last(K& key, V& value) const { Table::Iterator iter(db); iter.seek_last(); if(iter.is_valid()) { read(iter.key(), key); read(iter.value(), value, value_type, value_code); return true; } key = K(); value = V(); return false; } size_t find_greater_equal(const K& key, std::vector& values, const size_t limit = -1) const { values.clear(); Table::Iterator iter(db); iter.seek(write(key)); while(iter.is_valid() && values.size() < limit) { try { V value; read(iter.value(), value, value_type, value_code); values.push_back(std::move(value)); } catch(...) { // ignore } iter.next(); } return values.size(); } size_t find_greater_equal(const K& key, std::vector>& result, const size_t limit = -1) const { result.clear(); Table::Iterator iter(db); iter.seek(write(key)); while(iter.is_valid() && result.size() < limit) { try { std::pair tmp; read(iter.key(), tmp.first); read(iter.value(), tmp, value_type, value_code); result.push_back(std::move(tmp)); } catch(...) { // ignore } iter.next(); } return result.size(); } size_t find_range(const K& begin, const K& end, std::vector& values, const size_t limit = -1) const { values.clear(); Table::Iterator iter(db); iter.seek(write(begin)); while(iter.is_valid() && values.size() < limit) { K key; read(iter.key(), key); if(!(key < end)) { break; } try { V value; read(iter.value(), value, value_type, value_code); values.push_back(std::move(value)); } catch(...) { // ignore } iter.next(); } return values.size(); } size_t find_range(const K& begin, const K& end, std::vector>& result, const size_t limit = -1) const { result.clear(); Table::Iterator iter(db); iter.seek(write(begin)); while(iter.is_valid() && result.size() < limit) { K key; read(iter.key(), key); if(!(key < end)) { break; } try { std::pair tmp; tmp.first = key; read(iter.value(), tmp.second, value_type, value_code); result.push_back(std::move(tmp)); } catch(...) { // ignore } iter.next(); } return result.size(); } size_t find_last_range(const K& begin, const K& end, std::vector& result, const size_t limit) const { result.clear(); Table::Iterator iter(db); iter.seek_prev(write(end)); while(iter.is_valid() && result.size() < limit) { K key; read(iter.key(), key); if(!(begin < key || key == begin)) { break; } try { V value; read(iter.value(), value, value_type, value_code); result.push_back(std::move(value)); } catch(...) { // ignore } iter.prev(); } return result.size(); } size_t find_last_range(const K& begin, const K& end, std::vector>& result, const size_t limit) const { result.clear(); Table::Iterator iter(db); iter.seek_prev(write(end)); while(iter.is_valid() && result.size() < limit) { K key; read(iter.key(), key); if(!(begin < key || key == begin)) { break; } try { std::pair tmp; tmp.first = key; read(iter.value(), tmp.second, value_type, value_code); result.push_back(std::move(tmp)); } catch(...) { // ignore } iter.prev(); } return result.size(); } void scan(const std::function& callback) const { Table::Iterator iter(db); iter.seek_begin(); while(iter.is_valid()) { K key; V value; bool valid = false; try { read(iter.key(), key); read(iter.value(), value, value_type, value_code); valid = true; } catch(...) { // ignore } if(valid) { if(!callback(key, value)) { break; } } iter.next(); } } void reverse_scan(const std::function& callback) const { Table::Iterator iter(db); iter.seek_last(); while(iter.is_valid()) { K key; V value; bool valid = false; try { read(iter.key(), key); read(iter.value(), value, value_type, value_code); valid = true; } catch(...) { // ignore } if(valid) { if(!callback(key, value)) { break; } } iter.prev(); } } void commit() { db->commit(db->current_version() + 1); } void commit(const uint32_t new_version) { db->commit(new_version); } void revert(const uint32_t new_version) { db->revert(new_version); } void flush() { db->flush(); } Table::Iterator iterator() const { return Table::Iterator(db); } std::shared_ptr
get_impl() const { return db; } std::string get_path() const { return db->root_path; } uint32_t current_version() const { return db->current_version(); } protected: struct stream_t { vnx::Memory memory; vnx::Buffer buffer; vnx::MemoryOutputStream stream; vnx::TypeOutput out; stream_t(bool disable_type_codes = true) : stream(&memory), out(&stream) { out.disable_type_codes = disable_type_codes; } }; virtual void read(std::shared_ptr entry, K& key) const = 0; virtual std::shared_ptr write(const K& key) const = 0; void read(std::shared_ptr slice, V& value, const vnx::TypeCode* type_code, const std::vector& code) const { vnx::PointerInputStream stream(slice->data, slice->size); vnx::TypeInput in(&stream); vnx::read(in, value, type_code, type_code ? nullptr : code.data()); } std::shared_ptr write(const V& value, const vnx::TypeCode* type_code, const std::vector& code) { stream.out.reset(); stream.memory.clear(); vnx::write(stream.out, value, type_code, type_code ? nullptr : code.data()); if(stream.memory.get_size()) { stream.out.flush(); stream.buffer = stream.memory; return std::make_shared(stream.buffer.data(), stream.buffer.size()); } return std::make_shared(stream.out.get_buffer(), stream.out.get_buffer_pos()); } protected: std::shared_ptr
db; stream_t stream; std::vector value_code; const vnx::TypeCode* value_type = nullptr; }; template class uint_table : public table { public: uint_table() : table() {} uint_table(const std::string& file_path, bool disable_type_codes = true) : table(file_path, disable_type_codes) {} protected: void read(std::shared_ptr entry, K& key) const override { if(entry->size != sizeof(K)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table::get_path() + ")"); } key = vnx::from_big_endian(*((const K*)entry->data)); } std::shared_ptr write(const K& key) const override { auto out = std::make_shared(sizeof(K)); vnx::write_value(out->data, vnx::to_big_endian(key)); return out; } }; template class uint_uint_table : public table, V> { public: uint_uint_table() : table, V>() {} uint_uint_table(const std::string& file_path) : table, V>(file_path) {} protected: void read(std::shared_ptr entry, std::pair& key) const override { if(entry->size != sizeof(K) + sizeof(I)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table, V>::get_path() + ")"); } key.first = vnx::from_big_endian(*((const K*)entry->data)); key.second = vnx::from_big_endian(*((const I*)(entry->data + sizeof(K)))); } std::shared_ptr write(const std::pair& key) const override { auto out = std::make_shared(sizeof(K) + sizeof(I)); vnx::write_value(out->data, vnx::to_big_endian(key.first)); vnx::write_value(out->data + sizeof(K), vnx::to_big_endian(key.second)); return out; } }; template class hash_table : public table { public: hash_table() : table() {} hash_table(const std::string& file_path) : table(file_path) {} protected: void read(std::shared_ptr entry, K& key) const override { if(entry->size != key.size()) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table::get_path() + ")"); } ::memcpy(key.data(), entry->data, key.size()); } std::shared_ptr write(const K& key) const override { auto out = std::make_shared(key.size()); ::memcpy(out->data, key.data(), key.size()); return out; } }; template class hash_uint_table : public table, V> { public: hash_uint_table() : table, V>() {} hash_uint_table(const std::string& file_path) : table, V>(file_path) {} protected: void read(std::shared_ptr entry, std::pair& key) const override { auto& hash = key.first; if(entry->size != hash.size() + sizeof(H)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table, V>::get_path() + ")"); } auto* src = entry->data; ::memcpy(hash.data(), src, hash.size()); src += hash.size(); key.second = vnx::from_big_endian(*((const H*)src)); src += sizeof(H); } std::shared_ptr write(const std::pair& key) const override { const auto& hash = key.first; auto out = std::make_shared(hash.size() + sizeof(H)); auto* dst = out->data; ::memcpy(dst, hash.data(), hash.size()); dst += hash.size(); vnx::write_value(dst, vnx::to_big_endian(key.second)); dst += sizeof(H); return out; } }; template class hash_uint_uint_table : public table, V> { public: hash_uint_uint_table() : table, V>() {} hash_uint_uint_table(const std::string& file_path) : table, V>(file_path) {} protected: void read(std::shared_ptr entry, std::tuple& key) const override { auto& hash = std::get<0>(key); if(entry->size != hash.size() + sizeof(H) + sizeof(I)) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table, V>::get_path() + ")"); } auto* src = entry->data; ::memcpy(hash.data(), src, hash.size()); src += hash.size(); std::get<1>(key) = vnx::from_big_endian(*((const H*)src)); src += sizeof(H); std::get<2>(key) = vnx::from_big_endian(*((const I*)src)); } std::shared_ptr write(const std::tuple& key) const override { const auto& hash = std::get<0>(key); auto out = std::make_shared(hash.size() + sizeof(H) + sizeof(I)); auto* dst = out->data; ::memcpy(dst, hash.data(), hash.size()); dst += hash.size(); vnx::write_value(dst, vnx::to_big_endian(std::get<1>(key))); dst += sizeof(H); vnx::write_value(dst, vnx::to_big_endian(std::get<2>(key))); return out; } }; template class balance_table_t : public table, V> { public: balance_table_t() : table, V>() {} balance_table_t(const std::string& file_path) : table, V>(file_path) {} protected: void read(std::shared_ptr entry, std::pair& key) const override { if(entry->size != 64) { throw std::logic_error("key size mismatch: " + std::to_string(entry->size) + " (" + table, V>::get_path() + ")"); } ::memcpy(key.first.data(), entry->data, 32); ::memcpy(key.second.data(), entry->data + 32, 32); } std::shared_ptr write(const std::pair& key) const override { auto out = std::make_shared(64); ::memcpy(out->data, key.first.data(), 32); ::memcpy(out->data + 32, key.second.data(), 32); return out; } }; } // mmx #endif /* INCLUDE_MMX_TABLE_H_ */ ================================================ FILE: include/mmx/tree_hash.h ================================================ /* * tree_hash.h * * Created on: Apr 20, 2024 * Author: mad */ #ifndef INCLUDE_MMX_TREE_HASH_H_ #define INCLUDE_MMX_TREE_HASH_H_ #include #include namespace mmx { inline hash_t calc_btree_hash(const std::vector& input) { auto tmp = input; while(tmp.size() > 1) { std::vector next; for(size_t i = 0; i < tmp.size(); i += 2) { if(i + 1 < tmp.size()) { next.emplace_back(tmp[i] + tmp[i + 1]); } else { next.push_back(tmp[i]); } } tmp = next; } return tmp.empty() ? hash_t() : tmp[0]; } } // mmx #endif /* INCLUDE_MMX_TREE_HASH_H_ */ ================================================ FILE: include/mmx/tx_entry_t.hpp ================================================ /* * tx_entry_t.hpp * * Created on: Oct 19, 2024 * Author: mad */ #ifndef INCLUDE_MMX_TX_ENTRY_T_HPP_ #define INCLUDE_MMX_TX_ENTRY_T_HPP_ #include namespace mmx { inline tx_entry_t tx_entry_t::create_ex(const txio_entry_t& entry, const bool& valid) { tx_entry_t out; out.txio_entry_t::operator=(entry); out.is_validated = valid; return out; } } // mmx #endif /* INCLUDE_MMX_TX_ENTRY_T_HPP_ */ ================================================ FILE: include/mmx/txio_entry_t.hpp ================================================ /* * txio_entry_t.hpp * * Created on: Apr 26, 2022 * Author: mad */ #ifndef INCLUDE_MMX_TXIO_ENTRY_T_HPP_ #define INCLUDE_MMX_TXIO_ENTRY_T_HPP_ #include namespace mmx { inline txio_entry_t txio_entry_t::create_ex(const hash_t& txid, const uint32_t& height, const int64_t& time_stamp, const tx_type_e& type, const txio_t& txio) { txio_entry_t out; out.txid = txid; out.height = height; out.time_stamp = time_stamp; out.type = type; out.txio_t::operator=(txio); return out; } } // mmx #endif /* INCLUDE_MMX_TXIO_ENTRY_T_HPP_ */ ================================================ FILE: include/mmx/txio_t.hpp ================================================ /* * txio_t.hpp * * Created on: Sep 16, 2023 * Author: mad */ #include namespace mmx { uint64_t txio_t::calc_cost(std::shared_ptr params) const { return params->min_txfee_io + (memo ? std::max((memo->size() + 31) / 32, 1) * params->min_txfee_memo : 0); } } // mmx ================================================ FILE: include/mmx/uint128.hpp ================================================ /* * uint128.hpp * * Created on: Apr 11, 2022 * Author: mad */ #ifndef INCLUDE_MMX_UINT128_HPP_ #define INCLUDE_MMX_UINT128_HPP_ #include #include #include #include #include #include #include namespace mmx { class uint128 : public uint128_t { public: uint128() : uint128_t(0) {} uint128(const uint128&) = default; uint128(const uint64_t& value) : uint128_t(value) {} uint128(const uint128_t& value) : uint128_t(value) {} uint128(const uint256_t& value) { if(value >> 128) { throw std::logic_error("uint128(uint256_t) overflow"); } *this = value.lower(); } uint128(const std::string& str); std::string to_string() const { return str(10); } std::string to_hex_string() const { return "0x" + str(16); } vnx::Variant to_var_arg() const { if((*this) >> 64) { return vnx::Variant(to_hex_string()); } return vnx::Variant(lower()); } double to_double() const { return double(upper()) * pow(2, 64) + double(lower()); } }; } //mmx namespace vnx { void read(vnx::TypeInput& in, mmx::uint128& value, const vnx::TypeCode* type_code, const uint16_t* code); void write(vnx::TypeOutput& out, const mmx::uint128& value, const vnx::TypeCode* type_code = nullptr, const uint16_t* code = nullptr); inline void read(std::istream& in, mmx::uint128& value) { std::string tmp; vnx::read(in, tmp); value = mmx::uint128(tmp); } inline void write(std::ostream& out, const mmx::uint128& value) { vnx::write(out, value.to_string()); } inline void accept(vnx::Visitor& visitor, const mmx::uint128& value) { vnx::accept(visitor, value.to_string()); } } // vnx #endif /* INCLUDE_MMX_UINT128_HPP_ */ ================================================ FILE: include/mmx/utils.h ================================================ /* * utils.h * * Created on: Dec 10, 2021 * Author: mad */ #ifndef INCLUDE_MMX_UTILS_H_ #define INCLUDE_MMX_UTILS_H_ #include #include #include #include #include #include #include #include #include #include #include namespace mmx { bool is_json(const vnx::Variant& var); uint64_t get_num_bytes(const vnx::Variant& var); inline std::shared_ptr get_params() { auto params = ChainParams::create(); vnx::read_config("chain.params", params); if(params->challenge_delay <= params->infuse_delay) { throw std::logic_error("challenge_delay <= infuse_delay"); } if(params->challenge_interval <= params->challenge_delay) { throw std::logic_error("challenge_interval <= challenge_delay"); } if(params->commit_delay >= params->challenge_interval - params->challenge_delay) { throw std::logic_error("commit_delay >= challenge_interval - challenge_delay"); } if(params->time_diff_constant % (2 * params->vdf_segment_size)) { throw std::logic_error("time_diff_constant not multiple of 2x vdf_segment_size"); } if(params->max_tx_cost > params->max_block_size / 5) { throw std::logic_error("max_tx_cost > band size"); } return params; } inline double to_value(const uint128_t& amount, const int decimals) { return (double(amount.upper()) * pow(2, 64) + double(amount.lower())) * pow(10, -decimals); } inline double to_value(const uint128_t& amount, std::shared_ptr params) { return to_value(amount, params->decimals); } inline uint128 to_amount(const double value, const int decimals) { if(decimals < 0 || decimals > 18) { throw std::runtime_error("invalid decimals: " + std::to_string(decimals)); } if(value == std::numeric_limits::quiet_NaN()) { throw std::runtime_error("invalid value: NaN"); } if(value < 0) { throw std::runtime_error("negative value: " + std::to_string(value)); } auto shift = uint128_1; for(int i = 0; i < decimals; ++i) { shift *= 10; } const double div_64 = pow(2, 64); const uint64_t value_128 = value / div_64; const uint64_t value_64 = fmod(value, div_64); const uint256_t amount = uint256_t((uint128_t(value_128) << 64) + value_64) * shift + uint64_t(fmod(value, 1) * pow(10, decimals) + 0.5); if(amount >> 128) { throw std::runtime_error("amount overflow: " + amount.str(10)); } return amount; } inline uint128 to_amount(const fixed128& value, const int decimals) { return value.to_amount(decimals); } inline uint128 to_amount(const double value, std::shared_ptr params) { return to_amount(value, params->decimals); } inline bool check_plot_filter( std::shared_ptr params, const hash_t& challenge, const hash_t& plot_id) { const hash_t hash(std::string("plot_filter") + plot_id + challenge); return (hash.to_uint256() >> (256 - params->plot_filter)) == 0; } inline bool check_space_fork(std::shared_ptr params, const hash_t& challenge, const hash_t& proof_hash) { const hash_t infuse_hash(std::string("proof_infusion_check") + challenge + proof_hash); return infuse_hash.to_uint256() % params->challenge_interval == 0; } inline hash_t calc_next_challenge( std::shared_ptr params, const hash_t& challenge, const uint32_t vdf_count, const hash_t& proof_hash, bool& is_space_fork) { hash_t out = challenge; for(uint32_t i = 0; i < vdf_count; ++i) { out = hash_t(std::string("next_challenge") + out); } is_space_fork = check_space_fork(params, out, proof_hash); if(is_space_fork) { out = hash_t(std::string("challenge_infusion") + out + proof_hash); } return out; } inline hash_t get_plot_challenge(const hash_t& challenge, const hash_t& plot_id) { return hash_t(std::string("plot_challenge") + plot_id + challenge); } inline uint128_t to_effective_space(const uint128_t num_bytes) { return (2464 * num_bytes) / 1000; } inline uint128_t calc_total_netspace(std::shared_ptr params, const uint64_t space_diff) { // the win chance of a k32 at diff 1 is: 0.6979321856 // don't ask why times two, it works const auto ideal = uint128_t(space_diff) * params->space_diff_constant * params->avg_proof_count * 2; return to_effective_space(ideal); } inline bool check_proof_threshold(std::shared_ptr params, const uint8_t ksize, const hash_t& quality, const uint64_t space_diff, const bool hard_fork) { if(space_diff <= 0) { return false; } const auto threshold = ((uint256_1 << 255) / (uint128_t(space_diff) * params->space_diff_constant)) * ((2 * ksize) + 1); auto value = quality.to_uint256(); if(hard_fork) { value >>= params->post_filter; // compensate for post filter } return (value >> (ksize - 1)) < threshold; } inline uint16_t get_proof_score(const hash_t& proof_hash) { return proof_hash.bytes[0]; } inline uint64_t get_block_iters(std::shared_ptr params, const uint64_t time_diff) { return (time_diff / params->time_diff_divider) * params->time_diff_constant; } inline hash_t calc_proof_hash(const hash_t& challenge, const std::vector& proof_xs) { auto tmp = proof_xs; for(auto& x : tmp) { x = vnx::to_little_endian(x); } // proof needs to be hashed after challenge, otherwise compression to 256-bit is possible return hash_t(challenge + hash_t(tmp.data(), tmp.size() * 4)); } inline uint64_t calc_project_reward(std::shared_ptr params, const uint64_t tx_fees) { const auto dynamic = (params->project_ratio.value * uint64_t(tx_fees)) / params->project_ratio.inverse; return std::min(params->fixed_project_reward + dynamic, tx_fees / 2); } inline uint64_t calc_min_reward_deduction(std::shared_ptr params, const uint64_t txfee_buffer) { const uint64_t divider = 8640; const uint64_t min_deduction = 1000; return std::min(std::max(txfee_buffer / divider, min_deduction), txfee_buffer); } inline uint64_t calc_final_block_reward(std::shared_ptr params, const uint64_t reward, const uint64_t tx_fees) { const auto fee_burn = tx_fees / 2; const auto fee_deduction = calc_project_reward(params, tx_fees); return reward + (tx_fees - std::max(fee_burn, fee_deduction)); } inline uint64_t calc_new_base_reward(std::shared_ptr params, std::shared_ptr prev) { const auto& base_reward = prev->base_reward; const auto& vote_sum = prev->reward_vote_sum; if(prev->reward_vote_count < params->reward_adjust_interval / 2) { return base_reward; } const auto step_size = std::max(base_reward / params->reward_adjust_div, params->reward_adjust_tick); int64_t reward = base_reward; if(vote_sum > 0) { reward += step_size; } else if(vote_sum < 0) { reward -= step_size; } return std::max(std::min(reward, 4200000000000ll), 0); } inline uint64_t get_effective_plot_size(const int ksize) { return to_effective_space(uint64_t((2 * ksize) + 1) << (ksize - 1)); } inline uint64_t calc_new_space_diff(std::shared_ptr params, std::shared_ptr prev) { const uint64_t diff = prev->space_diff; if(diff >> 48) { return diff - (diff / 1024); // clamp to 48 bits (should never happen) } if(prev->space_fork_len == 0) { return prev->space_diff; // should only happen at genesis } const uint32_t expected_count = prev->space_fork_len * params->avg_proof_count; const uint64_t new_diff = (uint128_t(diff) * prev->space_fork_proofs) / expected_count; int64_t delta = new_diff - diff; delta /= std::max((16 * params->challenge_interval) / prev->space_fork_len, 1u); if(delta == 0) { delta = (prev->space_fork_proofs > expected_count ? 1 : -1); } return std::max(diff + delta, 1); } inline uint64_t calc_new_netspace_ratio(std::shared_ptr params, const uint64_t prev_ratio, const bool is_og_proof) { const uint64_t value = is_og_proof ? uint64_t(1) << (2 * params->max_diff_adjust) : 0; return (prev_ratio * ((uint64_t(1) << params->max_diff_adjust) - 1) + value) >> params->max_diff_adjust; } inline uint64_t calc_new_txfee_buffer(std::shared_ptr params, std::shared_ptr prev) { return (prev->txfee_buffer - calc_min_reward_deduction(params, prev->txfee_buffer)) + prev->tx_fees; } inline uint128_t calc_block_weight(std::shared_ptr params, std::shared_ptr block, std::shared_ptr prev) { if(block->proof.empty()) { return 0; } const auto num_iters = (block->vdf_iters - prev->vdf_iters) / block->vdf_count; const auto time_diff = num_iters / params->time_diff_constant; return uint128_t(time_diff) * block->proof[0]->difficulty * params->avg_proof_count; } inline uint64_t get_vdf_speed(std::shared_ptr params, const uint64_t time_diff) { return (uint128_t(time_diff) * params->time_diff_constant * 1000) / params->time_diff_divider / params->block_interval_ms; } inline std::string get_finger_print(const hash_t& seed_value, const vnx::optional& passphrase) { hash_t pass_hash; if(passphrase) { pass_hash = hash_t("MMX/fingerprint/" + *passphrase); } hash_t hash; for(int i = 0; i < 16384; ++i) { hash = hash_t(hash + seed_value + pass_hash); } return std::to_string(hash.to_uint()); } inline int64_t get_time_sec() { return vnx::get_wall_time_seconds(); } inline int64_t get_time_ms() { return vnx::get_wall_time_millis(); } inline int64_t get_time_us() { return vnx::get_wall_time_micros(); } template uint64_t cost_to_fee(const uint64_t cost, const uint32_t fee_ratio) { const auto fee = (uint128_t(cost) * fee_ratio) / 1024; if(fee.upper()) { throw error_t("fee amount overflow"); } return fee; } template uint64_t fee_to_cost(const uint64_t fee, const uint32_t fee_ratio) { const auto cost = (uint128_t(fee) * 1024) / fee_ratio; if(cost.upper()) { throw error_t("cost value overflow"); } return cost; } template T clamped_sub(const T L, const S R) { if(L > R) { return L - R; } return T(0); } template void clamped_sub_assign(T& L, const S R) { L = clamped_sub(L, R); } } // mmx #endif /* INCLUDE_MMX_UTILS_H_ */ ================================================ FILE: include/mmx/vm/Compiler.h ================================================ /* * Compiler.h * * Created on: Dec 19, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_COMPILER_H_ #define INCLUDE_MMX_VM_COMPILER_H_ #include namespace mmx { namespace vm { std::shared_ptr compile(const std::string& source, const compile_flags_t& flags = compile_flags_t()); std::shared_ptr compile_files(const std::vector& file_names, const compile_flags_t& flags = compile_flags_t()); } // vm } // mmx #endif /* INCLUDE_MMX_VM_COMPILER_H_ */ ================================================ FILE: include/mmx/vm/Engine.h ================================================ /* * Engine.h * * Created on: Apr 21, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_ENGINE_H_ #define INCLUDE_MMX_VM_ENGINE_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { namespace vm { static constexpr uint64_t INSTR_COST = 20; static constexpr uint64_t INSTR_CALL_COST = 30; static constexpr uint64_t INSTR_MUL_128_COST = 50; static constexpr uint64_t INSTR_MUL_256_COST = 200; static constexpr uint64_t INSTR_DIV_64_COST = 50; static constexpr uint64_t INSTR_DIV_128_COST = 1000; static constexpr uint64_t INSTR_DIV_256_COST = 5000; static constexpr uint64_t WRITE_COST = 50; static constexpr uint64_t WRITE_32_BYTE_COST = 30; static constexpr uint64_t STOR_READ_COST = 2000; static constexpr uint64_t STOR_WRITE_COST = 2000; static constexpr uint64_t STOR_READ_32_BYTE_COST = 50; static constexpr uint64_t STOR_WRITE_BYTE_COST = 50; static constexpr uint64_t CONV_STRING_UINT_CHAR_COST = 200; static constexpr uint64_t CONV_UINT_32_STRING_COST = 500; static constexpr uint64_t CONV_UINT_64_STRING_COST = 1000; static constexpr uint64_t CONV_UINT_128_STRING_COST = 25000; static constexpr uint64_t CONV_UINT_256_STRING_COST = 250000; static constexpr uint64_t CONV_STRING_BECH32_COST = 1000; static constexpr uint64_t CONV_BECH32_STRING_COST = 1000; static constexpr uint64_t SHA256_BLOCK_COST = 2000; static constexpr uint64_t ECDSA_VERIFY_COST = 20000; static constexpr uint64_t MAX_KEY_BYTES = 4096; static constexpr uint64_t MAX_VALUE_BYTES = 1024 * 1024; static constexpr uint64_t MAX_CALL_RECURSION = 1000; static constexpr uint64_t MAX_ERASE_RECURSION = 100; static constexpr uint64_t MAX_COPY_RECURSION = 100; enum externvar_e : uint32_t { EXTERN_HEIGHT, EXTERN_TXID, EXTERN_USER, EXTERN_BALANCE, // obsolete EXTERN_DEPOSIT, EXTERN_ADDRESS, EXTERN_NETWORK, // network identifier }; enum globalvar_e : uint32_t { GLOBAL_NEXT_ALLOC = 1, GLOBAL_DYNAMIC_START = 0x1000 }; class Engine { public: struct frame_t { uint64_t instr_ptr = 0; uint64_t stack_ptr = 0; }; std::vector code; std::vector call_stack; std::vector outputs; std::vector mint_outputs; uint64_t gas_used = 0; uint64_t gas_limit = 0; uint32_t error_code = 0; uint32_t error_addr = -1; const addr_t contract; bool is_debug = false; bool do_profile = false; bool do_trace = false; std::map cost_map; // key => count std::function log_func; std::function event_func; std::function remote_call; std::function read_contract; const std::shared_ptr storage; Engine(const addr_t& contract, std::shared_ptr backend, bool read_only); virtual ~Engine(); void addref(const uint64_t dst); void unref(const uint64_t dst); var_t* assign(const uint64_t dst, std::unique_ptr value); uint64_t lookup(const uint64_t src, const bool read_only); uint64_t lookup(const var_t* var, const bool read_only); uint64_t lookup(const var_t& var, const bool read_only); uint64_t lookup(const varptr_t& var, const bool read_only); var_t* write(const uint64_t dst, const var_t* src); var_t* write(const uint64_t dst, const var_t& src); var_t* write(const uint64_t dst, const varptr_t& var); var_t* write_entry(const uint64_t dst, const uint64_t key, const var_t& src); var_t* write_entry(const uint64_t dst, const uint64_t key, const varptr_t& var); void erase_entry(const uint64_t dst, const uint64_t key); var_t* write_key(const uint64_t dst, const uint64_t key, const var_t& var); var_t* write_key(const uint64_t dst, const var_t& key, const var_t& var); var_t* write_key(const uint64_t dst, const varptr_t& key, const varptr_t& var); void erase_key(const uint64_t dst, const uint64_t key); void push_back(const uint64_t dst, const var_t& var); void push_back(const uint64_t dst, const varptr_t& var); void push_back(const uint64_t dst, const uint64_t src); void pop_back(const uint64_t dst, const uint64_t& src); void erase(const uint64_t dst); var_t* read(const uint64_t src, const bool mem_only = false); var_t& read_fail(const uint64_t src); var_t* read_entry(const uint64_t src, const uint64_t key); var_t& read_entry_fail(const uint64_t src, const uint64_t key); var_t* read_key(const uint64_t src, const uint64_t key); var_t* read_key(const uint64_t src, const var_t& key); var_t* read_key(const uint64_t src, const varptr_t& key); var_t& read_key_fail(const uint64_t src, const uint64_t key); void copy(const uint64_t dst, const uint64_t src); void clone(const uint64_t dst, const uint64_t src); void get(const uint64_t dst, const uint64_t addr, const uint64_t key, const uint8_t flags); void set(const uint64_t addr, const uint64_t key, const uint64_t src, const uint8_t flags); void erase(const uint64_t addr, const uint64_t key, const uint8_t flags); void concat(const uint64_t dst, const uint64_t lhs, const uint64_t rhs); void memcpy(const uint64_t dst, const uint64_t src, const uint64_t count, const uint64_t offset); void conv(const uint64_t dst, const uint64_t src, const uint64_t dflags, const uint64_t sflags); void sha256(const uint64_t dst, const uint64_t src); void verify(const uint64_t dst, const uint64_t msg, const uint64_t pubkey, const uint64_t signature); void log(const uint64_t level, const uint64_t msg); void event(const uint64_t name, const uint64_t data); void send(const uint64_t address, const uint64_t amount, const uint64_t currency, const uint64_t memo); void mint(const uint64_t address, const uint64_t amount, const uint64_t memo); void rcall(const uint64_t name, const uint64_t method, const uint64_t stack_ptr, const uint64_t nargs); void cread(const uint64_t dst, const uint64_t address, const uint64_t field); void read_balance(const uint64_t dst, const uint64_t currency); frame_t& get_frame(); uint64_t get_stack_ptr(); uint64_t deref(const uint64_t src); uint64_t alloc(); void init(); void begin(const uint64_t instr_ptr); void run(); void step(); void check_gas(); void jump(const uint64_t instr_ptr); void call(const uint64_t instr_ptr, const uint64_t stack_ptr); bool ret(); void exec(const instr_t& instr); void commit(); void clear_stack(const uint64_t offset = 0); vnx::optional parse_memo(const uint64_t addr); std::map find_entries(const uint64_t dst) const; uint128_t& get_balance(const uint64_t currency_addr); void dump_memory(const uint64_t begin = 0, const uint64_t end = -1); template T* read(const uint64_t src, const vartype_e& type); template T& read_fail(const uint64_t src, const vartype_e& type); template T* read_key(const uint64_t src, const uint64_t key, const vartype_e& type); template T& read_key_fail(const uint64_t src, const uint64_t key, const vartype_e& type); private: var_t* assign(std::unique_ptr& var, std::unique_ptr value); var_t* write(std::unique_ptr& var, const uint64_t* dst, const var_t& src); void clear(var_t* var); void erase(std::unique_ptr& var); void erase_entries(const uint64_t dst); uint64_t deref_addr(uint32_t src, const bool flag); uint64_t deref_value(uint32_t src, const bool flag); bool is_true(const uint64_t src); bool is_true(const var_t& var); private: bool have_init = false; std::map> memory; std::map, std::unique_ptr> entries; std::map key_map; std::map balance_map; size_t erase_call_depth = 0; bool first_alloc = true; uint64_t new_heap_base = -1; // start of newly allocated heap for this run }; template T* Engine::read(const uint64_t src, const vartype_e& type) { if(auto var = read(src)) { if(var->type != type) { throw std::logic_error("read type mismatch: expected " + to_string(type) + ", got " + to_string(var->type)); } return (T*)var; } return nullptr; } template T& Engine::read_fail(const uint64_t src, const vartype_e& type) { auto& var = read_fail(src); if(var.type != type) { throw std::logic_error("read type mismatch: expected " + to_string(type) + ", got " + to_string(var.type)); } return (T&)var; } template T* Engine::read_key(const uint64_t src, const uint64_t key, const vartype_e& type) { if(auto var = read_key(src, key)) { if(var->type != type) { throw std::logic_error("read type mismatch: expected " + to_string(type) + ", got " + to_string(var->type)); } return (T*)var; } return nullptr; } template T& Engine::read_key_fail(const uint64_t src, const uint64_t key, const vartype_e& type) { auto& var = read_key_fail(src, key); if(var.type != type) { throw std::logic_error("read type mismatch: expected " + to_string(type) + ", got " + to_string(var.type)); } return (T&)var; } } // vm } // mmx #endif /* INCLUDE_MMX_VM_ENGINE_H_ */ ================================================ FILE: include/mmx/vm/Storage.h ================================================ /* * Storage.h * * Created on: Apr 22, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_STORAGE_H_ #define INCLUDE_MMX_VM_STORAGE_H_ #include #include #include #include #include namespace mmx { namespace vm { class Storage { public: virtual ~Storage() {} virtual std::unique_ptr read(const addr_t& contract, const uint64_t src) const = 0; virtual std::unique_ptr read(const addr_t& contract, const uint64_t src, const uint64_t key) const = 0; virtual void write(const addr_t& contract, const uint64_t dst, const var_t& value) = 0; virtual void write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) = 0; virtual uint64_t lookup(const addr_t& contract, const var_t& value) const = 0; void write(const addr_t& contract, const uint64_t dst, const varptr_t& value) { if(value) { write(contract, dst, *value); } } void write(const addr_t& contract, const uint64_t dst, const uint64_t key, const varptr_t& value) { if(value) { write(contract, dst, key, *value); } } uint64_t lookup(const addr_t& contract, const varptr_t& value) const { if(value) { return lookup(contract, *value); } return 0; } virtual void set_balance(const addr_t& contract, const addr_t& currency, const uint128& amount) { throw std::logic_error("not implemented"); } virtual std::unique_ptr get_balance(const addr_t& contract, const addr_t& currency) { throw std::logic_error("not implemented"); } }; } // vm } // mmx #endif /* INCLUDE_MMX_VM_STORAGE_H_ */ ================================================ FILE: include/mmx/vm/StorageCache.h ================================================ /* * StorageCache.h * * Created on: May 5, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_STORAGECACHE_H_ #define INCLUDE_MMX_VM_STORAGECACHE_H_ #include namespace mmx { namespace vm { class StorageCache : public StorageRAM { public: typedef StorageRAM Super; StorageCache(std::shared_ptr backend); ~StorageCache(); std::unique_ptr read(const addr_t& contract, const uint64_t src) const override; std::unique_ptr read(const addr_t& contract, const uint64_t src, const uint64_t key) const override; uint64_t lookup(const addr_t& contract, const var_t& value) const override; void commit() const; std::unique_ptr get_balance(const addr_t& contract, const addr_t& currency) override; using Storage::write; using Storage::lookup; private: std::shared_ptr backend; }; } // vm } // mmx #endif /* INCLUDE_MMX_VM_STORAGECACHE_H_ */ ================================================ FILE: include/mmx/vm/StorageDB.h ================================================ /* * StorageDB.h * * Created on: Apr 22, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_STORAGEDB_H_ #define INCLUDE_MMX_VM_STORAGEDB_H_ #include #include #include #include namespace mmx { namespace vm { class StorageDB : public Storage { public: StorageDB(const std::string& database_path, std::shared_ptr db); ~StorageDB(); std::unique_ptr read(const addr_t& contract, const uint64_t src) const override; std::unique_ptr read(const addr_t& contract, const uint64_t src, const uint64_t key) const override; std::unique_ptr read_ex(const addr_t& contract, const uint64_t src, const uint32_t height) const; std::unique_ptr read_ex(const addr_t& contract, const uint64_t src, const uint64_t key, const uint32_t height) const; void write(const addr_t& contract, const uint64_t dst, const var_t& value) override; void write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) override; uint64_t lookup(const addr_t& contract, const var_t& value) const override; std::vector> find_range( const addr_t& contract, const uint64_t begin, const uint64_t end, const uint32_t height = -1) const; std::vector> find_entries( const addr_t& contract, const uint64_t address, const uint32_t height = -1) const; std::vector read_array( const addr_t& contract, const uint64_t address, const uint32_t height = -1) const; void set_balance(const addr_t& contract, const addr_t& currency, const uint128& amount) override; std::unique_ptr get_balance(const addr_t& contract, const addr_t& currency) override; std::function write_balance; std::function(const addr_t&, const addr_t&)> read_balance; using Storage::write; using Storage::lookup; private: std::shared_ptr
table; std::shared_ptr
table_entries; std::shared_ptr
table_index; }; } // vm } // mmx #endif /* INCLUDE_MMX_VM_STORAGEDB_H_ */ ================================================ FILE: include/mmx/vm/StorageProxy.h ================================================ /* * StorageProxy.h * * Created on: Apr 24, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_STORAGEPROXY_H_ #define INCLUDE_MMX_VM_STORAGEPROXY_H_ #include #include namespace mmx { namespace vm { class Engine; class StorageProxy : public Storage { public: Engine* const engine; const std::shared_ptr backend; const bool read_only; struct trace_t { std::string type; addr_t contract; uint64_t addr = 0; uint64_t key = 0; varptr_t value; }; mutable std::vector trace; StorageProxy(Engine* engine, std::shared_ptr backend, bool read_only); std::unique_ptr read(const addr_t& contract, const uint64_t src) const override; std::unique_ptr read(const addr_t& contract, const uint64_t src, const uint64_t key) const override; void write(const addr_t& contract, const uint64_t dst, const var_t& value) override; void write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) override; uint64_t lookup(const addr_t& contract, const var_t& value) const override; std::unique_ptr get_balance(const addr_t& contract, const addr_t& currency) override; using Storage::write; using Storage::lookup; private: std::unique_ptr read_ex(std::unique_ptr var) const; }; } // vm } // mmx #endif /* INCLUDE_MMX_VM_STORAGEPROXY_H_ */ ================================================ FILE: include/mmx/vm/StorageRAM.h ================================================ /* * StorageRAM.h * * Created on: Apr 30, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_STORAGERAM_H_ #define INCLUDE_MMX_VM_STORAGERAM_H_ #include #include #include #include #include namespace mmx { namespace vm { class StorageRAM : public Storage { public: ~StorageRAM(); // all methods below are thread-safe std::unique_ptr read(const addr_t& contract, const uint64_t src) const override; std::unique_ptr read(const addr_t& contract, const uint64_t src, const uint64_t key) const override; void write(const addr_t& contract, const uint64_t dst, const var_t& value) override; void write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) override; uint64_t lookup(const addr_t& contract, const var_t& value) const override; void clear(); void set_balance(const addr_t& contract, const addr_t& currency, const uint128& amount) override; std::unique_ptr get_balance(const addr_t& contract, const addr_t& currency) override; const std::map, std::unique_ptr>& get_memory() const { return memory; } const std::map, std::unique_ptr>& get_entries() const { return entries; } void dump_memory(std::ostream& out) const; using Storage::write; using Storage::lookup; protected: mutable std::mutex mutex; std::map, std::unique_ptr> memory; std::map, std::unique_ptr> entries; std::map> key_map; std::map> balance_map; }; } // vm } // mmx #endif /* INCLUDE_MMX_VM_STORAGERAM_H_ */ ================================================ FILE: include/mmx/vm/instr_t.h ================================================ /* * instr_t.h * * Created on: Apr 21, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_INSTR_T_H_ #define INCLUDE_MMX_VM_INSTR_T_H_ #include #include #include #include namespace mmx { namespace vm { static constexpr uint8_t OPFLAG_REF_A = (1 << 0); static constexpr uint8_t OPFLAG_REF_B = (1 << 1); static constexpr uint8_t OPFLAG_REF_C = (1 << 2); static constexpr uint8_t OPFLAG_REF_D = (1 << 3); static constexpr uint8_t OPFLAG_HARD_FAIL = (1 << 4); static constexpr uint8_t OPFLAG_CATCH_OVERFLOW = (1 << 5); static constexpr uint8_t OPFLAG_BITWISE = (1 << 6); enum opcode_e : uint8_t { OP_NOP, OP_CLR, // dst OP_COPY, // dst, src OP_CLONE, // dst, src OP_JUMP, // dst OP_JUMPI, // dst, cond OP_JUMPN, // dst, cond OP_CALL, // addr, stack_ptr OP_RET, OP_ADD = 0x20, // dst, lhs, rhs OP_SUB, // dst, lhs, rhs OP_MUL, // dst, lhs, rhs OP_DIV, // dst, lhs, rhs OP_MOD, // dst, lhs, rhs OP_NOT = 0x40, // dst, src OP_XOR, // dst, lhs, rhs OP_AND, // dst, lhs, rhs OP_OR, // dst, lhs, rhs OP_MIN, // dst, lhs, rhs OP_MAX, // dst, lhs, rhs OP_SHL, // dst, src, count OP_SHR, // dst, src, count OP_CMP_EQ = 0x60, // dst, lhs, rhs OP_CMP_NEQ, // dst, lhs, rhs OP_CMP_LT, // dst, lhs, rhs OP_CMP_GT, // dst, lhs, rhs OP_CMP_LTE, // dst, lhs, rhs OP_CMP_GTE, // dst, lhs, rhs OP_TYPE = 0x80, // dst, addr OP_SIZE, // dst, addr OP_GET, // dst, addr, key OP_SET, // addr, key, src OP_ERASE, // addr, key OP_PUSH_BACK, // addr, src OP_POP_BACK, // dst, src OP_CONV = 0xA0, // dst, src, dflags, sflags OP_CONCAT, // dst, lhs, rhs OP_MEMCPY, // dst, src, count, offset OP_SHA256, // dst, src OP_VERIFY, // dst, msg, pubkey, signature OP_LOG = 0xC0, // level, message OP_SEND, // address, amount, currency, memo OP_MINT, // address, amount, memo OP_EVENT, // name, data OP_FAIL, // message, code OP_RCALL, // name, method, stack_ptr, nargs (remote call) OP_CREAD, // dst, address, field (contract read) OP_BALANCE, // dst, currency }; enum convtype_e : uint32_t { CONVTYPE_DEFAULT = 0, CONVTYPE_BASE_2, CONVTYPE_BASE_8, CONVTYPE_BASE_10, CONVTYPE_BASE_16, CONVTYPE_BOOL, CONVTYPE_UINT, CONVTYPE_STRING, CONVTYPE_BINARY, CONVTYPE_ARRAY, CONVTYPE_ADDRESS, CONVTYPE_BIG_ENDIAN, CONVTYPE_LITTLE_ENDIAN, }; struct instr_t { opcode_e code = OP_NOP; uint8_t flags = 0; uint32_t a = 0; uint32_t b = 0; uint32_t c = 0; uint32_t d = 0; instr_t() = default; instr_t(opcode_e code, uint8_t flags = 0, uint32_t a = 0, uint32_t b = 0, uint32_t c = 0, uint32_t d = 0) : code(code), flags(flags), a(a), b(b), c(c), d(d) {} }; struct opcode_info_t { std::string name; uint32_t nargs = 0; }; const opcode_info_t& get_opcode_info(opcode_e code); std::vector serialize(const std::vector& code); size_t deserialize(std::vector& code, const void* data, const size_t length); std::string to_string(const instr_t& instr); } // vm } // mmx #endif /* INCLUDE_MMX_VM_INSTR_T_H_ */ ================================================ FILE: include/mmx/vm/var_t.h ================================================ /* * var_t.h * * Created on: Apr 21, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_VAR_T_H_ #define INCLUDE_MMX_VM_VAR_T_H_ #include #include #include #include #include #include #include #include #include #include #include namespace mmx { namespace vm { static constexpr uint64_t SEG_SIZE = 0x4000000; static constexpr uint64_t STACK_SIZE = 16 * SEG_SIZE; static constexpr uint64_t MEM_CONST = 0; static constexpr uint64_t MEM_EXTERN = MEM_CONST + SEG_SIZE; static constexpr uint64_t MEM_STACK = MEM_EXTERN + SEG_SIZE; static constexpr uint64_t MEM_STATIC = MEM_STACK + STACK_SIZE; static constexpr uint64_t MEM_HEAP = uint64_t(1) << 32; static constexpr uint64_t STATIC_SIZE = MEM_HEAP - MEM_STATIC; static constexpr uint8_t FLAG_DIRTY = (1 << 0); static constexpr uint8_t FLAG_CONST = (1 << 1); static constexpr uint8_t FLAG_STORED = (1 << 2); static constexpr uint8_t FLAG_DELETED = (1 << 3); static constexpr uint8_t FLAG_KEY = (1 << 4); enum vartype_e : uint8_t { TYPE_NIL, TYPE_FALSE, TYPE_TRUE, TYPE_REF, TYPE_UINT, TYPE_STRING, TYPE_BINARY, TYPE_ARRAY, TYPE_MAP, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, TYPE_UINT128, TYPE_UINT256, }; struct var_t { uint32_t ref_count = 0; uint8_t flags = 0; vartype_e type = TYPE_NIL; var_t() = default; var_t(const var_t& var) : ref_count(var.ref_count), flags(var.flags), type(var.type) {} var_t(const vartype_e& type) : type(type) {} var_t(const vartype_e& type, const uint8_t& flags) : flags(flags), type(type) {} explicit var_t(bool value) { type = value ? TYPE_TRUE : TYPE_FALSE; } // needed to make delete work virtual ~var_t() {} void addref() { if(flags & FLAG_STORED) { return; } flags |= FLAG_DIRTY; ref_count++; } bool unref() { if(flags & FLAG_STORED) { return false; } if(!ref_count) { throw std::logic_error("var_t::unref() underflow"); } flags |= FLAG_DIRTY; return (ref_count--) == 1; } var_t* pin() { if(flags & FLAG_STORED) { return this; } if(!ref_count) { ref_count = 1; flags |= FLAG_DIRTY; } return this; } }; struct ref_t : var_t { uint64_t address = 0; ref_t() : var_t(TYPE_REF) {} ref_t(const ref_t&) = default; ref_t(uint64_t address) : ref_t() { this->address = address; } }; struct uint_t : var_t { uint256_t value = 0; uint_t() : var_t(TYPE_UINT) {} uint_t(const uint_t&) = default; uint_t(const uint256_t& value) : uint_t() { this->value = value; } }; struct binary_t : var_t { uint32_t size = 0; uint32_t capacity = 0; binary_t(const vartype_e& type) : var_t(type) {} binary_t(const binary_t&) = delete; binary_t& operator=(const binary_t&) = delete; ~binary_t() { ::free(p_data); } uint8_t& operator[](size_t index) { return *(((uint8_t*)p_data) + index); } const uint8_t& operator[](size_t index) const { return *(((const uint8_t*)p_data) + index); } uint8_t* data(const size_t offset = 0) { return ((uint8_t*)p_data) + offset; } const uint8_t* data(const size_t offset = 0) const { return ((const uint8_t*)p_data) + offset; } const char* c_str() const { return (const char*)p_data; } std::string to_string() const { return std::string(c_str(), size); } std::string to_hex_string() const { return vnx::to_hex_string(data(), size, false, false); } std::vector to_vector() const { std::vector out(size); ::memcpy(out.data(), p_data, size); return out; } hash_t to_hash() const { if(size != 32) { throw std::logic_error("to_hash(): binary size != 32: " + std::to_string(size)); } return hash_t::from_bytes(data()); } addr_t to_addr() const { if(size != 32) { throw std::logic_error("to_addr(): binary size != 32: " + std::to_string(size)); } return addr_t::from_bytes(data()); } static std::unique_ptr clone(const binary_t& src) { auto bin = alloc(src); bin->ref_count = src.ref_count; bin->flags = src.flags; return bin; } static std::unique_ptr alloc(const binary_t& src) { return alloc(src, src.type); } static std::unique_ptr alloc(const binary_t& src, const vartype_e type) { auto bin = unsafe_alloc(src.size, type); bin->size = src.size; ::memcpy(bin->data(), src.data(), bin->size); ::memset(bin->data(bin->size), 0, bin->capacity - bin->size); return bin; } static std::unique_ptr alloc(const std::string& src, const vartype_e type = TYPE_STRING) { auto bin = unsafe_alloc(src.size(), type); bin->size = src.size(); ::memcpy(bin->data(), src.c_str(), bin->size); ::memset(bin->data(bin->size), 0, bin->capacity - bin->size); return bin; } static std::unique_ptr alloc(const void* data, const size_t size, const vartype_e type = TYPE_BINARY) { auto bin = unsafe_alloc(size, type); bin->size = size; ::memcpy(bin->data(), data, bin->size); ::memset(bin->data(bin->size), 0, bin->capacity - bin->size); return bin; } static std::unique_ptr alloc(const size_t size, const vartype_e type) { auto bin = unsafe_alloc(size, type); ::memset(bin->data(), 0, bin->capacity); bin->size = size; return bin; } static std::unique_ptr unsafe_alloc(size_t size, const vartype_e type) { if(size >= std::numeric_limits::max()) { throw std::logic_error("binary size overflow"); } switch(type) { case TYPE_BINARY: break; case TYPE_STRING: size += 1; break; default: throw std::logic_error("invalid binary type"); } auto bin = std::make_unique(type); bin->capacity = size; bin->p_data = ::malloc(size); return bin; } private: void* p_data = nullptr; }; struct array_t : var_t { uint64_t address = 0; uint32_t size = 0; array_t() : var_t(TYPE_ARRAY) {} array_t(const array_t&) = default; array_t(uint32_t size) : array_t() { this->size = size; } }; struct map_t : var_t { uint64_t address = 0; map_t() : var_t(TYPE_MAP) {} map_t(const map_t&) = default; }; class invalid_type : public std::logic_error { public: invalid_type(const var_t& var) : logic_error("invalid type: " + std::to_string(int(var.type))) {} }; std::unique_ptr clone(const var_t& src); std::unique_ptr clone(const var_t* var); int compare(const var_t& lhs, const var_t& rhs); int compare(const var_t* lhs, const var_t* rhs); std::pair, size_t> serialize(const var_t& src, bool with_rc = true, bool with_vf = true); size_t deserialize(std::unique_ptr& var, const void* data, const size_t length, bool with_rc = true, bool with_vf = true); struct varptr_less_t { bool operator()(const var_t* const& lhs, const var_t* const& rhs) const { return compare(lhs, rhs) < 0; } }; inline bool operator<(const var_t& lhs, const var_t& rhs) { return compare(lhs, rhs) < 0; } inline bool operator>(const var_t& lhs, const var_t& rhs) { return compare(lhs, rhs) > 0; } inline bool operator==(const var_t& lhs, const var_t& rhs) { return compare(lhs, rhs) == 0; } inline bool operator!=(const var_t& lhs, const var_t& rhs) { return compare(lhs, rhs) != 0; } inline size_t num_bytes(const var_t& var) { switch(var.type) { case TYPE_REF: return 8; case TYPE_UINT: return 32; case TYPE_STRING: case TYPE_BINARY: return ((const binary_t&)var).size; case TYPE_ARRAY: return 8 + 4; case TYPE_MAP: return 8; default: return 0; } } std::string to_string(const vartype_e& type); std::string to_string(const var_t& var); std::string to_string_value(const var_t& var); std::string to_string_value_hex(const var_t& var); uint64_t to_ref(const var_t& var); uint256_t to_uint(const var_t& var); hash_t to_hash(const var_t& var); addr_t to_addr(const var_t& var); uint32_t get_size(const var_t& var); inline size_t num_bytes(const var_t* var) { return var ? num_bytes(*var) : 0; } inline std::string to_string(const var_t* var) { return var ? to_string(*var) : "nullptr"; } inline std::string to_string_value(const var_t* var) { return var ? to_string_value(*var) : "nullptr"; } inline std::string to_string_value_hex(const var_t* var) { return var ? to_string_value_hex(*var) : "nullptr"; } inline uint64_t to_ref(const var_t* var) { return var ? to_ref(*var) : 0; } inline uint256_t to_uint(const var_t* var) { return var ? to_uint(*var) : uint256_0; } inline hash_t to_hash(const var_t* var) { return var ? to_hash(*var) : hash_t(); } inline addr_t to_addr(const var_t* var) { return var ? to_addr(*var) : addr_t(); } inline uint32_t get_size(const var_t* var) { return var ? get_size(*var) : 0; } template std::unique_ptr to_binary(const bytes_t& value) { return binary_t::alloc(value.data(), value.size()); } inline std::unique_ptr to_binary(const std::string& value, const vartype_e& type = TYPE_STRING) { return binary_t::alloc(value, type); } template std::string to_hex(const T addr) { std::stringstream ss; ss << "0x" << std::uppercase << std::hex << addr; return ss.str(); } template std::string to_bin(const T value) { std::stringstream ss; ss << "0b"; bool enable = false; for(int i = sizeof(T) * 8 - 1; i >= 0; --i) { const bool bit = (value >> i) & 1; if(bit || enable || i == 0) { ss << (bit ? '1' : '0'); enable = true; } } return ss.str(); } } // vm } // mmx #endif /* INCLUDE_MMX_VM_VAR_T_H_ */ ================================================ FILE: include/mmx/vm/varptr_t.hpp ================================================ /* * varptr_t.hpp * * Created on: May 12, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_VARPTR_T_HPP_ #define INCLUDE_MMX_VM_VARPTR_T_HPP_ #include #include #include #include namespace mmx { namespace vm { class varptr_t { public: varptr_t() = default; varptr_t(const varptr_t&) = default; varptr_t(const std::nullptr_t&) {} template varptr_t(std::unique_ptr var) { ptr = std::move(var); } var_t* get() const { return ptr.get(); } operator bool() const { return bool(ptr); } var_t& operator*() { return *ptr; } const var_t& operator*() const { return *ptr; } var_t* operator->() { return get(); } const var_t* operator->() const { return get(); } private: std::shared_ptr ptr; }; inline bool operator<(const varptr_t& lhs, const varptr_t& rhs) { return compare(lhs.get(), rhs.get()) < 0; } inline bool operator>(const varptr_t& lhs, const varptr_t& rhs) { return compare(lhs.get(), rhs.get()) > 0; } inline bool operator==(const varptr_t& lhs, const varptr_t& rhs) { return compare(lhs.get(), rhs.get()) == 0; } inline bool operator!=(const varptr_t& lhs, const varptr_t& rhs) { return compare(lhs.get(), rhs.get()) != 0; } inline std::string to_string(const varptr_t& var) { return to_string(var.get()); } inline std::string to_string_value(const varptr_t& var) { return to_string_value(var.get()); } inline std::string to_string_value_hex(const varptr_t& var) { return to_string_value_hex(var.get()); } inline uint64_t to_ref(const varptr_t& var) { return to_ref(var.get()); } inline uint256_t to_uint(const varptr_t& var) { return to_uint(var.get()); } inline hash_t to_hash(const varptr_t& var) { return to_hash(var.get()); } inline addr_t to_addr(const varptr_t& var) { return to_addr(var.get()); } inline uint32_t get_size(const varptr_t& var) { return get_size(var.get()); } } // vm } // mmx namespace vnx { void read(vnx::TypeInput& in, mmx::vm::varptr_t& value, const vnx::TypeCode* type_code, const uint16_t* code); void write(vnx::TypeOutput& out, const mmx::vm::varptr_t& value, const vnx::TypeCode* type_code, const uint16_t* code); void read(std::istream& in, mmx::vm::varptr_t& value); void write(std::ostream& out, const mmx::vm::varptr_t& value); void accept(vnx::Visitor& visitor, const mmx::vm::varptr_t& value); } // vnx #endif /* INCLUDE_MMX_VM_VARPTR_T_HPP_ */ ================================================ FILE: include/mmx/vm_interface.h ================================================ /* * vm_interface.h * * Created on: May 9, 2022 * Author: mad */ #ifndef INCLUDE_MMX_VM_INTERFACE_H_ #define INCLUDE_MMX_VM_INTERFACE_H_ #include #include #include namespace mmx { namespace vm { const contract::method_t* find_method(std::shared_ptr binary, const std::string& method_name); void set_deposit(std::shared_ptr engine, const addr_t& currency, const uint128& amount); std::vector> read_constants(std::shared_ptr binary); void load( std::shared_ptr engine, std::shared_ptr binary); void copy(std::shared_ptr dst, std::shared_ptr src, const uint64_t dst_addr, const uint64_t src_addr); void assign(std::shared_ptr engine, const uint64_t dst, const vnx::Variant& value); vnx::Variant read(std::shared_ptr engine, const uint64_t address); void set_args(std::shared_ptr engine, const std::vector& args); void execute(std::shared_ptr engine, const contract::method_t& method, const bool commit); void dump_code(std::ostream& out, std::shared_ptr bin, const vnx::optional& method = nullptr); } // vm } // mmx #endif /* INCLUDE_MMX_VM_INTERFACE_H_ */ ================================================ FILE: include/mmx/write_bytes.h ================================================ /* * write_bytes.h * * Created on: Nov 27, 2021 * Author: mad */ #ifndef INCLUDE_MMX_WRITE_BYTES_H_ #define INCLUDE_MMX_WRITE_BYTES_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { template void write_bytes(vnx::OutputBuffer& out, const vnx::optional& value); template void write_bytes(vnx::OutputBuffer& out, const std::array& value); template void write_bytes(vnx::OutputBuffer& out, const std::vector& value); template void write_bytes(vnx::OutputBuffer& out, const std::set& value); template void write_bytes(vnx::OutputBuffer& out, const std::map& value); void write_bytes(vnx::OutputBuffer& out, const vnx::Object& value); template void write_field(vnx::OutputBuffer& out, const std::string& name, const T& value); inline void write_bytes(vnx::OutputBuffer& out, const bool& value) { const uint8_t tmp = value ? 1 : 0; out.write(&tmp, sizeof(tmp)); } inline void write_bytes(vnx::OutputBuffer& out, const int64_t& value) { const auto tmp = vnx::to_little_endian(value); out.write(&tmp, sizeof(tmp)); } inline void write_bytes(vnx::OutputBuffer& out, const int32_t& value) { write_bytes(out, int64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const int16_t& value) { write_bytes(out, int64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const int8_t& value) { write_bytes(out, int64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const uint64_t& value) { const auto tmp = vnx::to_little_endian(value); out.write(&tmp, sizeof(tmp)); } inline void write_bytes(vnx::OutputBuffer& out, const uint32_t& value) { write_bytes(out, uint64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const uint16_t& value) { write_bytes(out, uint64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const uint8_t& value) { write_bytes(out, uint64_t(value)); } inline void write_bytes(vnx::OutputBuffer& out, const uint128& value) { write_bytes(out, value.lower()); write_bytes(out, value.upper()); } inline void write_bytes_cstr(vnx::OutputBuffer& out, const char* str) { out.write(str, ::strlen(str)); } inline void write_bytes(vnx::OutputBuffer& out, const std::string& value) { write_bytes_cstr(out, "string<>"); write_bytes(out, uint64_t(value.size())); out.write(value.data(), value.size()); } template void write_bytes(vnx::OutputBuffer& out, const bytes_t& value) { write_bytes_cstr(out, "bytes<>"); write_bytes(out, uint64_t(value.size())); out.write(value.data(), value.size()); } inline void write_bytes(vnx::OutputBuffer& out, const std::vector& value) { write_bytes_cstr(out, "bytes<>"); write_bytes(out, uint64_t(value.size())); out.write(value.data(), value.size()); } inline void write_bytes(vnx::OutputBuffer& out, const vnx::Buffer& value) { write_bytes_cstr(out, "bytes<>"); write_bytes(out, uint64_t(value.size())); out.write(value.data(), value.size()); } inline void write_bytes(vnx::OutputBuffer& out, const vnx::Variant& value) { if(value.is_null()) { write_bytes_cstr(out, "NULL"); } else if(value.is_bool()) { write_bytes(out, value.to()); } else if(value.is_ulong()) { write_bytes(out, value.to()); } else if(value.is_long()) { write_bytes(out, value.to()); } else if(value.is_string()) { write_bytes(out, value.to()); } else if(value.is_array()) { write_bytes(out, value.to>()); } else if(value.is_object()) { write_bytes(out, value.to_object()); } else { write_bytes(out, value.data); } } inline void write_bytes(vnx::OutputBuffer& out, const vnx::Object& value) { write_bytes_cstr(out, "object<>"); write_bytes(out, value.field); } inline void write_bytes_ex(vnx::OutputBuffer& out, const txio_t& value) { write_bytes(out, value.address); write_bytes(out, value.contract); write_bytes(out, value.amount); write_bytes(out, value.memo); } inline void write_bytes(vnx::OutputBuffer& out, const txin_t& value, bool full_hash = false) { write_bytes_cstr(out, "txin_t<>"); write_bytes_ex(out, value); if(full_hash) { write_bytes(out, value.solution); write_bytes(out, value.flags); } } inline void write_bytes(vnx::OutputBuffer& out, const txout_t& value) { write_bytes_cstr(out, "txout_t<>"); write_bytes_ex(out, value); } inline void write_bytes(vnx::OutputBuffer& out, const ulong_fraction_t& value) { write_bytes_cstr(out, "ulong_fraction_t<>"); write_bytes(out, value.value); write_bytes(out, value.inverse); } inline void write_bytes(vnx::OutputBuffer& out, const compile_flags_t& value) { write_bytes_cstr(out, "compile_flags_t<>"); write_field(out, "verbose", value.verbose); write_field(out, "opt_level", value.opt_level); write_field(out, "catch_overflow", value.catch_overflow); } inline void write_bytes(vnx::OutputBuffer& out, const contract::method_t& value) { write_bytes(out, value.get_type_hash()); write_field(out, "name", value.name); write_field(out, "info", value.info); write_field(out, "is_init", value.is_init); write_field(out, "is_const", value.is_const); write_field(out, "is_public", value.is_public); write_field(out, "is_payable", value.is_payable); write_field(out, "entry_point", value.entry_point); write_field(out, "args", value.args); } template void write_bytes(vnx::OutputBuffer& out, const vnx::optional& value) { write_bytes_cstr(out, "optional<>"); if(value) { write_bytes(out, true); write_bytes(out, *value); } else { write_bytes(out, false); } } template void write_bytes(vnx::OutputBuffer& out, const std::pair& value) { write_bytes_cstr(out, "pair<>"); write_bytes(out, value.first); write_bytes(out, value.second); } template void write_bytes(vnx::OutputBuffer& out, const std::array& value) { write_bytes_cstr(out, "vector<>"); write_bytes(out, uint64_t(value.size())); for(const auto& elem : value) { write_bytes(out, elem); } } template void write_bytes(vnx::OutputBuffer& out, const std::vector& value) { write_bytes_cstr(out, "vector<>"); write_bytes(out, uint64_t(value.size())); for(const auto& elem : value) { write_bytes(out, elem); } } template void write_bytes(vnx::OutputBuffer& out, const std::vector& value, bool full_hash) { write_bytes_cstr(out, "vector<>"); write_bytes(out, uint64_t(value.size())); for(const auto& elem : value) { write_bytes(out, elem, full_hash); } } template void write_bytes(vnx::OutputBuffer& out, const std::set& value) { write_bytes_cstr(out, "vector<>"); write_bytes(out, uint64_t(value.size())); for(const auto& elem : value) { write_bytes(out, elem); } } template void write_bytes(vnx::OutputBuffer& out, const std::map& value) { write_bytes_cstr(out, "vector<>"); write_bytes(out, uint64_t(value.size())); for(const auto& entry : value) { write_bytes(out, entry); } } inline void write_field(vnx::OutputBuffer& out, const std::string& name) { write_bytes_cstr(out, "field<>"); write_bytes(out, name); } template void write_field(vnx::OutputBuffer& out, const std::string& name, const T& value) { write_field(out, name); write_bytes(out, value); } template void write_field(vnx::OutputBuffer& out, const std::string& name, const T& value, bool full_hash) { write_field(out, name); write_bytes(out, value, full_hash); } } // mmx #endif /* INCLUDE_MMX_WRITE_BYTES_H_ */ ================================================ FILE: include/sha256_arm.h ================================================ /* * sha256_arm.h * * Created on: Feb 21, 2024 * Author: mad, voidxno */ #ifndef INCLUDE_SHA256_ARM_H_ #define INCLUDE_SHA256_ARM_H_ #include void sha256_arm(uint8_t* out, const uint8_t* in, const uint64_t length); void recursive_sha256_arm(uint8_t* hash, const uint64_t num_iters); void recursive_sha256_arm_x2(uint8_t* hash, const uint64_t num_iters); bool sha256_arm_available(); #endif /* INCLUDE_SHA256_ARM_H_ */ ================================================ FILE: include/sha256_avx2.h ================================================ /* * sha256_avx2.h * * Created on: Jul 19, 2022 * Author: mad */ #ifndef INCLUDE_SHA256_AVX2_H_ #define INCLUDE_SHA256_AVX2_H_ #include void sha256_64_x8(uint8_t* out, uint8_t* in, const uint64_t length); void sha256_avx2_64_x8(uint8_t* out, uint8_t* in, const uint64_t length); bool avx2_available(); #endif /* INCLUDE_SHA256_AVX2_H_ */ ================================================ FILE: include/sha256_ni.h ================================================ /* * sha256_ni.h * * Created on: Jul 19, 2022 * Author: mad */ #ifndef INCLUDE_SHA256_NI_H_ #define INCLUDE_SHA256_NI_H_ #include void sha256_ni(uint8_t* out, const uint8_t* in, const uint64_t length); void recursive_sha256_ni(uint8_t* hash, const uint64_t num_iters); void recursive_sha256_ni_x2(uint8_t* hash, const uint64_t num_iters); bool sha256_ni_available(); #endif /* INCLUDE_SHA256_NI_H_ */ ================================================ FILE: include/sha512.h ================================================ // Copyright (c) 2014-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CRYPTO_SHA512_H #define BITCOIN_CRYPTO_SHA512_H #include #include /** A hasher class for SHA-512. */ class SHA512 { private: uint64_t s[8]; unsigned char buf[128]; uint64_t bytes; public: static constexpr size_t OUTPUT_SIZE = 64; SHA512(); SHA512& Write(const unsigned char* data, size_t len); void Finalize(unsigned char hash[OUTPUT_SIZE]); SHA512& Reset(); uint64_t Size() const { return bytes; } }; #endif // BITCOIN_CRYPTO_SHA512_H ================================================ FILE: include/upnp_mapper.h ================================================ /* * upnp.h * * Created on: Oct 22, 2022 * Author: mad */ #ifndef INCLUDE_UPNP_MAPPER_H_ #define INCLUDE_UPNP_MAPPER_H_ #include #include class UPNP_Mapper { public: virtual ~UPNP_Mapper() {} virtual void stop() = 0; }; std::shared_ptr upnp_start_mapping(const int port, const std::string& app_name); #endif /* INCLUDE_UPNP_MAPPER_H_ */ ================================================ FILE: interface/Block.vni ================================================ package mmx; class Block extends BlockHeader { vector tx_list; void finalize(); bool is_valid() const; hash_t calc_tx_hash() const; BlockHeader* get_header() const; vector get_transactions() const; vector get_inputs(ChainParams* params) const; vector get_outputs(ChainParams* params) const; } ================================================ FILE: interface/BlockHeader.vni ================================================ package mmx; class BlockHeader { uint version; // block format uint support_flags; // consensus flags hash_t hash; hash_t prev; uint height; uint vdf_height; ulong nonce; long time_stamp; // UNIX [ms] ulong time_diff; ulong space_diff; uint128 weight; uint128 total_weight; uint vdf_count; // how many blocks delta ulong vdf_iters; hash_t vdf_output; vector vdf_reward_addr; // for this block optional vdf_reward_payout; // for bundle payout vector proof; hash_t proof_hash; hash_t challenge; // for proof lookups bool is_space_fork; // if challenge is infused + space_diff update uint space_fork_len; // current length of space fork uint space_fork_proofs; // total number of proofs since last space fork ulong reward_amount; optional reward_addr; optional reward_contract; // plot NFT address optional reward_account; // farmer account char reward_vote; // 0 = unchanged, 1 = up, -1 = down int reward_vote_sum; uint reward_vote_count; ulong base_reward; addr_t project_addr; ulong static_cost; ulong total_cost; uint tx_count; ulong tx_fees; ulong txfee_buffer; hash_t tx_hash; optional farmer_sig; hash_t content_hash; bool is_valid() const; hash_t calc_hash() const; hash_t calc_content_hash() const; void validate() const; BlockHeader* get_header() const; pubkey_t get_farmer_key() const; block_index_t get_block_index(long file_offset) const; void set_space_diff(ChainParams* params, BlockHeader* prev); void set_base_reward(ChainParams* params, BlockHeader* prev); static const uint SUPPORT_HARDFORK1 = 0x1; } ================================================ FILE: interface/ChainParams.vni ================================================ package mmx; class ChainParams { uint port; int decimals = 6; uint min_ksize = 29; uint max_ksize = 32; uint plot_filter = 4; // log2 uint post_filter = 10; // log2 uint commit_delay = 18; // for writing to disk (should be less than challenge_interval - challenge_delay) uint infuse_delay = 6; // for primary VDF infusion uint challenge_delay = 9; // blocks until new challange is active uint challenge_interval = 48; // challenge (and difficulty) is for next N blocks uint max_diff_adjust = 10; // per block (1/2^x) uint max_vdf_count = 100; // chain will halt if no proof is found within this time uint avg_proof_count = 3; uint max_proof_count = 50; uint max_validators = 11; ulong min_reward = 200000; ulong vdf_reward = 500000; // per vdf_reward_interval uint vdf_reward_interval = 50; uint vdf_segment_size = 50000; uint reward_adjust_div = 100; // relative adjustment per reward_adjust_interval uint reward_adjust_tick = 10000; // minimum absolute adjustment uint reward_adjust_interval = 8640; // [blocks] uint target_mmx_gold_price = 2000; // [MMX / ounce] ulong time_diff_divider = 1000; // fixed-point precision ulong time_diff_constant = 1000000; ulong space_diff_constant = 100000000; ulong initial_time_diff = 50; ulong initial_space_diff = 10; ulong initial_time_stamp = 0; // genesis time stamp [ms] ulong min_txfee = 100; // per tx ulong min_txfee_io = 100; // per input / output ulong min_txfee_sign = 1000; // per solution ulong min_txfee_memo = 50; // per memo ulong min_txfee_exec = 10000; // per operation ulong min_txfee_deploy = 100000; // per contract ulong min_txfee_depend = 50000; // per dependency ulong min_txfee_byte = 10; // per byte of data ulong min_txfee_read = 1000; // per lookup ulong min_txfee_read_kbyte = 1000; // per 1000 bytes of data ulong max_block_size = 10000000; // max static size ulong max_block_cost = 100000000; // includes dynamic cost ulong max_tx_cost = 1000000; uint max_rcall_depth = 3; // max recursion for remote calls uint max_rcall_width = 10; // max total dependencies vector min_fee_ratio; // for dynamic block size long block_interval_ms = 10000; // [ms] string network; addr_t nft_binary; addr_t swap_binary; addr_t offer_binary; addr_t token_binary; addr_t plot_nft_binary; addr_t escrow_binary; addr_t time_lock_binary; addr_t relay_binary; ulong fixed_project_reward = 50000; uint_fraction_t project_ratio; uint reward_activation = 50000; uint transaction_activation = 100000; uint hardfork1_height = 1000000; // VDF height double get_block_time() const; // [sec] } ================================================ FILE: interface/Challenge.vni ================================================ package mmx; class Challenge { uint vdf_height; hash_t challenge; ulong difficulty; } ================================================ FILE: interface/Contract.vni ================================================ package mmx; class Contract { uint version; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; ulong calc_cost(ChainParams* params) const; optional get_owner() const; void validate(Solution* solution, hash_t txid) const; vnx.Variant read_field(string name) const; } ================================================ FILE: interface/FarmInfo.vni ================================================ package mmx; class FarmInfo { vector plot_dirs; map plot_count; // [ksize => count] map> harvester_bytes; // [physical, effective] map pool_info; // [plot_nft => pool info] map pool_stats; // [plot_nft => pool stats] ulong total_bytes; ulong total_bytes_effective; ulong total_balance; // virtual plots [MMX] optional harvester; optional harvester_id; optional reward_addr; } ================================================ FILE: interface/IntervalRequest.vni ================================================ package mmx; class IntervalRequest { uint vdf_height; ulong start; ulong end; hash_t infuse; optional input; } ================================================ FILE: interface/KeyFile.vni ================================================ package mmx; class KeyFile { hash_t seed_value; optional finger_print; // set if passphrase used } ================================================ FILE: interface/LookupInfo.vni ================================================ package mmx; class LookupInfo { hash_t id; // harvester id string name; uint vdf_height; uint num_passed; uint num_total; long slow_time_ms; // slowest plot lookup time long total_time_ms; // for all plots long total_delay_ms; optional slow_plot; // slowest plot file path } ================================================ FILE: interface/NetworkInfo.vni ================================================ package mmx; class NetworkInfo { bool is_synced; uint height; uint vdf_height; uint synced_since; long time_stamp; // UNIX [ms] ulong time_diff; ulong space_diff; ulong block_reward; // MMX * 1e6 ulong total_space; // [GB] ulong total_supply; // MMX * 1e6 ulong address_count; double vdf_speed; // [MH/s] double block_size; // 0 to 1 ulong average_txfee; // MMX * 1e6 hash_t genesis_hash; string name; // network name string node_commit; string node_version; } ================================================ FILE: interface/Operation.vni ================================================ package mmx; class Operation { uint version; addr_t address; // zero = deployed contract ushort solution = -1; // not part of crypto hash static const ushort NO_SOLUTION = -1; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong calc_cost(ChainParams* params) const; } ================================================ FILE: interface/Partial.vni ================================================ package mmx; class Partial { uint vdf_height; hash_t hash; addr_t contract; // plot NFT addr_t account; // payout address string pool_url; string harvester; // name (defaults to hostname) uint lookup_time_ms; ProofOfSpace* proof; optional farmer_sig; hash_t calc_hash() const; } ================================================ FILE: interface/PeerInfo.vni ================================================ package mmx; class PeerInfo { vector peers; } ================================================ FILE: interface/PlotHeader.vni ================================================ package mmx; class PlotHeader { int version; int ksize; int xbits; // ksize = uncompressed bool has_meta; hash_t seed; hash_t plot_id; pubkey_t farmer_key; optional contract; ulong plot_size; int park_size_x; int park_size_y; int park_size_pd; int park_size_meta; int park_bytes_x; int park_bytes_y; int park_bytes_pd; int park_bytes_meta; int entry_bits_x; ulong num_entries_y; ulong table_offset_x = -1; ulong table_offset_y = -1; ulong table_offset_meta = -1; vector table_offset_pd; } ================================================ FILE: interface/ProofOfSpace.vni ================================================ package mmx; class ProofOfSpace { ushort score; hash_t plot_id; hash_t challenge; // global challenge (not plot local) ulong difficulty; pubkey_t farmer_key; bool is_valid() const; hash_t calc_hash() const; hash_t calc_proof_hash() const; void validate() const; } ================================================ FILE: interface/ProofOfSpaceNFT.vni ================================================ package mmx; class ProofOfSpaceNFT extends ProofOfSpace { uchar ksize; hash_t seed; vector proof_xs; addr_t contract; bool is_valid() const; hash_t calc_hash() const; hash_t calc_proof_hash() const; void validate() const; } ================================================ FILE: interface/ProofOfSpaceOG.vni ================================================ package mmx; class ProofOfSpaceOG extends ProofOfSpace { uchar ksize; hash_t seed; vector proof_xs; bool is_valid() const; hash_t calc_hash() const; hash_t calc_proof_hash() const; void validate() const; } ================================================ FILE: interface/ProofOfTime.vni ================================================ package mmx; class ProofOfTime { uint version; hash_t hash; uint vdf_height; ulong start; // [iters] ulong num_iters; uint segment_size; hash_t input; hash_t prev; // infused block hash addr_t reward_addr; vector segments; pubkey_t timelord_key; signature_t timelord_sig; hash_t content_hash; bool is_valid() const; hash_t calc_hash() const; hash_t calc_content_hash() const; hash_t get_output() const; // final segment output ulong get_vdf_iters() const; void validate() const; } ================================================ FILE: interface/ProofResponse.vni ================================================ package mmx; class ProofResponse { hash_t hash; uint vdf_height; ProofOfSpace* proof; signature_t farmer_sig; hash_t content_hash; // --- below fields are not hashed (for local use only) --- vnx.Hash64 farmer_addr; string harvester; long lookup_time_ms; bool is_valid() const; hash_t calc_hash() const; hash_t calc_content_hash() const; void validate() const; } ================================================ FILE: interface/ReceiveNote.vni ================================================ package mmx; class ReceiveNote { long time; // [usec] hash_t hash; } ================================================ FILE: interface/Request.vni ================================================ package mmx; class Request { uint id; vnx.Value* method; } ================================================ FILE: interface/Return.vni ================================================ package mmx; class Return { uint id; vnx.Value* result; } ================================================ FILE: interface/Solution.vni ================================================ package mmx; class Solution { uint version; bool is_valid() const; hash_t calc_hash() const; ulong calc_cost(mmx.ChainParams* params) const; } ================================================ FILE: interface/Transaction.vni ================================================ package mmx; class Transaction extends TransactionBase { uint version; uint expires = -1; // height uint fee_ratio = 1024; // 1024 = 1.0 uint static_cost; uint max_fee_amount; tx_note_e note; ulong nonce; string network; optional sender; // to pay for tx fee (first signature) vector inputs; vector outputs; vector execute; vector solutions; Contract* deploy; optional exec_result; hash_t content_hash; // full hash including solutions and exec_result static const uint MAX_SOLUTIONS = 65535; // limit of 16-bit solution index void reset(ChainParams* params); void update(exec_result_t result, ChainParams* params); void finalize(); void add_input(addr_t currency, addr_t address, uint128 amount); void add_output(addr_t currency, addr_t address, uint128 amount, optional memo); void merge_sign(Transaction* tx); bool is_valid(ChainParams* params) const; bool is_signed() const; bool did_fail() const; hash_t calc_hash(bool full_hash = false) const; ulong calc_cost(ChainParams* params) const; Solution* get_solution(uint index) const; vector get_inputs() const; vector get_outputs() const; vector get_operations() const; map> get_balance() const; vector hash_serialize(bool full_hash = false) const; tx_index_t get_tx_index(ChainParams* params, BlockHeader* block, long file_offset) const; } ================================================ FILE: interface/TransactionBase.vni ================================================ package mmx; class TransactionBase { hash_t id; hash_t calc_hash(bool full_hash = false) const; ulong calc_cost(ChainParams* params) const; static TransactionBase* create_ex(hash_t id); } ================================================ FILE: interface/VDF_Point.vni ================================================ package mmx; class VDF_Point { uint vdf_height; ulong start; ulong num_iters; hash_t input; hash_t output; hash_t prev; // infused block hash addr_t reward_addr; hash_t content_hash; // below not included in content_hash long recv_time; // [ms] ProofOfTime* proof; bool is_valid() const; hash_t calc_hash() const; } ================================================ FILE: interface/ValidatorVote.vni ================================================ package mmx; class ValidatorVote { hash_t hash; // block hash pubkey_t farmer_key; signature_t farmer_sig; hash_t content_hash; bool is_valid() const; hash_t calc_content_hash() const; } ================================================ FILE: interface/WalletFile.vni ================================================ package mmx; class WalletFile { vector addresses; } ================================================ FILE: interface/account_info_t.vni ================================================ package mmx; struct account_info_t extends account_t { optional address; uint account; static account_info_t make(uint account, optional address, account_t config); } ================================================ FILE: interface/account_t.vni ================================================ package mmx; struct account_t { uint index; uint num_addresses = 1; string name; string key_file; string finger_print; bool with_passphrase; bool is_hidden; } ================================================ FILE: interface/balance_t.vni ================================================ package mmx; struct balance_t { uint128 spendable; uint128 reserved; uint128 locked; uint128 total; bool is_validated; // if token is in whitelist } ================================================ FILE: interface/block_index_t.vni ================================================ package mmx; struct block_index_t { hash_t hash; hash_t content_hash; uint static_cost; uint total_cost; long file_offset; } ================================================ FILE: interface/compile_flags_t.vni ================================================ package mmx; struct compile_flags_t { int verbose = 0; int opt_level = 3; bool catch_overflow = true; } ================================================ FILE: interface/contract/Binary.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; import mmx.compile_flags_t; class Binary extends mmx.Contract { string name; map fields; map methods; vector constant; vector binary; map line_info; string source; string compiler; compile_flags_t build_flags; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; optional find_field(string name) const; optional find_method(string name) const; optional find_line(uint address) const; } ================================================ FILE: interface/contract/Data.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class Data extends mmx.Contract { vnx.Variant value; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; } ================================================ FILE: interface/contract/Executable.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class Executable extends TokenBase { addr_t binary; string init_method = "init"; vector init_args; map depends; bool is_valid() const; addr_t get_external(string name) const; hash_t calc_hash(bool full_hash) const; ulong calc_cost(mmx.ChainParams* params) const; ulong num_bytes() const; vnx.Variant read_field(string name) const; vnx.Variant get_arg(uint index) const; } ================================================ FILE: interface/contract/MultiSig.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class MultiSig extends mmx.Contract { uint num_required; set owners; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; void validate(mmx.Solution* solution, hash_t txid) const; vnx.Variant read_field(string name) const; } ================================================ FILE: interface/contract/PubKey.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class PubKey extends mmx.Contract { addr_t address; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; optional get_owner() const; void validate(mmx.Solution* solution, hash_t txid) const; vnx.Variant read_field(string name) const; } ================================================ FILE: interface/contract/TokenBase.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class TokenBase extends mmx.Contract { string name; string symbol; int decimals = 0; vnx.Variant meta_data; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; } ================================================ FILE: interface/contract/WebData.vni ================================================ package mmx.contract; import mmx.hash_t; import mmx.addr_t; class WebData extends mmx.Contract { string mime_type; vnx.Buffer payload; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong num_bytes() const; vnx.Variant read_field(string name) const; } ================================================ FILE: interface/contract/method_t.vni ================================================ package mmx.contract; struct method_t { string name; string info; bool is_init; // constructor bool is_const; bool is_public; bool is_payable; uint entry_point; vector args; ulong num_bytes() const; } ================================================ FILE: interface/error_code_e.vni ================================================ package mmx; enum error_code_e { TX_EXPIRED, INSUFFICIENT_FUNDS, INSUFFICIENT_FUNDS_TXFEE, INVALID_CONTRACT, INVALID_OPERATION, TXFEE_OVERRUN, } ================================================ FILE: interface/exec_entry_t.vni ================================================ package mmx; struct exec_entry_t { uint height; long time_stamp; // UNIX [ms] hash_t txid; string method; vector args; optional user; optional> deposit; } ================================================ FILE: interface/exec_error_t.vni ================================================ package mmx; struct exec_error_t { uint code; uint address = -1; // (-1 = unknown) uint operation = -1; // index in execute array optional line; string message; static const uint MAX_MESSAGE_LENGTH = 160; // TODO: 120 bool is_valid() const; hash_t calc_hash() const; } ================================================ FILE: interface/exec_result_t.vni ================================================ package mmx; struct exec_result_t { bool did_fail; uint total_cost; // static cost + exec cost uint total_fee; vector inputs; vector outputs; optional error; bool is_valid() const; hash_t calc_hash() const; ulong calc_cost(ChainParams* params) const; string get_error_msg() const; } ================================================ FILE: interface/farmed_block_info_t.vni ================================================ package mmx; struct farmed_block_info_t { uint height; uint reward; mmx.addr_t reward_addr; } ================================================ FILE: interface/farmed_block_summary_t.vni ================================================ package mmx; struct farmed_block_summary_t { uint num_blocks; uint last_height; ulong total_rewards; map reward_map; } ================================================ FILE: interface/node_info_t.vni ================================================ package mmx; struct node_info_t { hash_t id; uint version; node_type_e type; } ================================================ FILE: interface/node_type_e.vni ================================================ package mmx; enum node_type_e { FULL_NODE, LIGHT_NODE, API_CLIENT, } ================================================ FILE: interface/offer_data_t.vni ================================================ package mmx; struct offer_data_t { uint height; uint last_update; // height long time_stamp; // UNIX [ms] addr_t owner; addr_t address; optional partner; addr_t bid_currency; addr_t ask_currency; uint128 bid_balance; uint128 ask_balance; uint128 ask_amount; // ask amount needed to fully trade offer uint128 inv_price; // 64-bit fractional [bid / ask] double price; // [ask / bid] bool is_scam() const; bool is_open() const; double get_price() const; // [ask / bid] uint128 get_bid_amount(uint128 ask_amount) const; uint128 get_ask_amount(uint128 bid_amount) const; } ================================================ FILE: interface/operation/Deposit.vni ================================================ package mmx.operation; import mmx.hash_t; import mmx.addr_t; import mmx.uint128; class Deposit extends Execute { addr_t currency; uint128 amount; bool is_valid() const; hash_t calc_hash(bool full_hash) const; } ================================================ FILE: interface/operation/Execute.vni ================================================ package mmx.operation; import mmx.hash_t; import mmx.addr_t; class Execute extends mmx.Operation { string method; vector args; optional user; bool is_valid() const; hash_t calc_hash(bool full_hash) const; ulong calc_cost(mmx.ChainParams* params) const; vnx.Variant get_arg(uint index) const; } ================================================ FILE: interface/package.vni ================================================ package mmx; extern uint128 = {11, 16, 1}; extern fixed128 = {11, 16, 1}; extern hash_t = {11, 32, 1}; extern hash_512_t = {11, 64, 1}; extern addr_t = {11, 32, 1}; extern skey_t = {11, 32, 1}; extern pubkey_t = {11, 33, 1}; extern signature_t = {11, 64, 1}; ================================================ FILE: interface/peer_info_t.vni ================================================ package mmx; struct peer_info_t { ulong id; string address; node_type_e type; int ping_ms; uint height; uint version; long recv_timeout_ms; // delta since last reply [ms] long connect_time_ms; // how long peer is connected [ms] ulong bytes_send; ulong bytes_recv; double pending_cost; double compression_ratio; // for send only bool is_synced; bool is_paused; bool is_blocked; bool is_outbound; } ================================================ FILE: interface/permission_e.vni ================================================ package mmx; enum permission_e { PUBLIC, // for public RPC REMOTE, // for remote services (harvester, etc) SPENDING, // for GUI / CLI SIGN_BLOCK // for signing blocks } ================================================ FILE: interface/plot_nft_info_t.vni ================================================ package mmx; struct plot_nft_info_t { string name; addr_t owner; addr_t address; bool is_locked; optional target; optional unlock_height; optional server_url; } ================================================ FILE: interface/pooling_error_e.vni ================================================ package mmx; enum pooling_error_e { NONE = 0, INVALID_PARTIAL, DUPLICATE_PARTIAL, PARTIAL_TOO_LATE, PARTIAL_NOT_GOOD_ENOUGH, CHALLENGE_REVERTED, CHALLENGE_NOT_FOUND, CHALLENGE_NOT_CONFIRMED, INVALID_PROOF, INVALID_DIFFICULTY, INVALID_SIGNATURE, INVALID_CONTRACT, INVALID_AUTH_KEY, INVALID_ACCOUNT, INVALID_TIMESTAMP, POOL_LOST_SYNC, SERVER_ERROR, } ================================================ FILE: interface/pooling_info_t.vni ================================================ package mmx; struct pooling_info_t { addr_t contract; optional name; optional server_url; optional pool_target; ulong partial_diff; uint plot_count; bool is_plot_nft; } ================================================ FILE: interface/pooling_stats_t.vni ================================================ package mmx; struct pooling_stats_t { string server_url; ulong partial_diff; ulong valid_points; ulong failed_points; uint total_partials; // valid only long total_response_time; // [ms] long last_partial; // UNIX [sec] map error_count; } ================================================ FILE: interface/query_filter_t.vni ================================================ package mmx; struct query_filter_t { uint since; // included uint until = -1; // included int limit = -1; // (-1 = no limit) uint max_search; // max number of rows to search (0 = no limit) set currency; optional type; optional memo; bool white_list; // if to apply whitelist bool with_pending; // if to include unconfirmed transactions } ================================================ FILE: interface/solution/MultiSig.vni ================================================ package mmx.solution; import mmx.hash_t; import mmx.addr_t; class MultiSig extends mmx.Solution { map solutions; uint num_required; bool is_valid() const; hash_t calc_hash() const; ulong calc_cost(mmx.ChainParams* params) const; } ================================================ FILE: interface/solution/PubKey.vni ================================================ package mmx.solution; import mmx.hash_t; import mmx.pubkey_t; import mmx.signature_t; class PubKey extends mmx.Solution { pubkey_t pubkey; signature_t signature; hash_t calc_hash() const; ulong calc_cost(mmx.ChainParams* params) const; } ================================================ FILE: interface/spend_options_t.vni ================================================ package mmx; struct spend_options_t { bool auto_send = true; bool mark_spent = false; uint fee_ratio = 1024; uint gas_limit = 5000000; // MMX optional expire_at; // overrides delta if set optional expire_delta; // expire at current height + delta optional nonce; // custom nonce optional user; optional sender; // for tx fee optional passphrase; optional note; optional memo; map owner_map; map contract_map; } ================================================ FILE: interface/swap_entry_t.vni ================================================ package mmx; struct swap_entry_t { uint height; long time_stamp; // UNIX [ms] hash_t txid; string type; // [buy, sell, add, remove, payout] uchar index; uint128 amount; optional value; optional symbol; optional user; } ================================================ FILE: interface/swap_info_t.vni ================================================ package mmx; struct swap_info_t { string name; addr_t address; addr_t tokens[2]; uint128 wallet[2]; uint128 balance[2]; uint128 volume[2]; uint128 fees_paid[2]; uint128 fees_claimed[2]; uint128 user_total[2]; uint128 volume_1d[2]; uint128 volume_7d[2]; double avg_apy_1d[2]; double avg_apy_7d[2]; vector fee_rates; vector pools; } ================================================ FILE: interface/swap_pool_info_t.vni ================================================ package mmx; struct swap_pool_info_t { uint128 balance[2]; uint128 fees_paid[2]; uint128 fees_claimed[2]; uint128 user_total[2]; } ================================================ FILE: interface/swap_user_info_t.vni ================================================ package mmx; struct swap_user_info_t { int pool_idx = -1; uint128 balance[2]; uint128 last_user_total[2]; uint128 last_fees_paid[2]; uint128 fees_earned[2]; uint128 equivalent_liquidity[2]; uint unlock_height; } ================================================ FILE: interface/table_entry_t.vni ================================================ package mmx; struct table_entry_t { uint32 y; uint8[48] meta; vector x_values; } ================================================ FILE: interface/trade_entry_t.vni ================================================ package mmx; struct trade_entry_t { uint height; long time_stamp; // UNIX [ms] addr_t address; hash_t txid; addr_t bid_currency; addr_t ask_currency; uint128 bid_amount; uint128 ask_amount; double price; // [ask / bid] } ================================================ FILE: interface/trade_log_t.vni ================================================ package mmx; struct trade_log_t { long time_stamp; // UNIX [ms] hash_t txid; addr_t address; // offer uint128 inv_price; // [bid / ask] uint128 ask_amount; uint128 get_bid_amount() const; double get_price() const; } ================================================ FILE: interface/tx_entry_t.vni ================================================ package mmx; struct tx_entry_t extends txio_entry_t { bool is_validated; // if token is in whitelist bool is_pending; // if not confirmed yet static tx_entry_t create_ex(txio_entry_t entry, bool validated); } ================================================ FILE: interface/tx_index_t.vni ================================================ package mmx; struct tx_index_t { uint height; uint static_cost; uint contract_read_cost; long time_stamp; // UNIX [ms] long file_offset; } ================================================ FILE: interface/tx_info_t.vni ================================================ package mmx; class tx_info_t { hash_t id; uint expires; bool did_fail; optional height; optional time_stamp; // UNIX [ms] optional block; optional message; uint fee; uint cost; tx_note_e note; optional sender; vector inputs; vector outputs; vector operations; Contract* deployed; map input_amounts; map output_amounts; map contracts; } ================================================ FILE: interface/tx_log_entry_t.vni ================================================ package mmx; struct tx_log_entry_t { long time; // [ms] Transaction* tx; } ================================================ FILE: interface/tx_note_e.vni ================================================ package mmx; enum tx_note_e { REWARD, TRANSFER, WITHDRAW, CLAIM, BURN, OFFER, TRADE, MINT, DEPLOY, MUTATE, EXECUTE, DEPOSIT, REVOKE, TIMELORD_REWARD } ================================================ FILE: interface/tx_type_e.vni ================================================ package mmx; enum tx_type_e { SPEND, RECEIVE, TXFEE, REWARD, VDF_REWARD, PROJECT_REWARD, } ================================================ FILE: interface/txin_t.vni ================================================ package mmx; struct txin_t extends txio_t { ushort solution = -1; // not part of crypto hash uchar flags; // not part of crypto hash static const uchar IS_EXEC = 1; static const ushort NO_SOLUTION = -1; } ================================================ FILE: interface/txio_entry_t.vni ================================================ package mmx; struct txio_entry_t extends txio_t { hash_t txid; // block hash in case type == REWARD uint height; // -1 = pending long time_stamp; // UNIX [ms] tx_type_e type; static txio_entry_t create_ex(hash_t txid, uint height, long time_stamp, tx_type_e type, txio_t txio); } ================================================ FILE: interface/txio_t.vni ================================================ package mmx; struct txio_t { addr_t address; addr_t contract; uint128 amount; optional memo; static const uint MAX_MEMO_SIZE = 64; ulong calc_cost(ChainParams* params) const; } ================================================ FILE: interface/txout_t.vni ================================================ package mmx; struct txout_t extends txio_t { } ================================================ FILE: interface/uint_fraction_t.vni ================================================ package mmx; struct uint_fraction_t { uint value; uint inverse = 1; } ================================================ FILE: interface/ulong_fraction_t.vni ================================================ package mmx; struct ulong_fraction_t { ulong value; ulong inverse = 1; } ================================================ FILE: interface/virtual_plot_info_t.vni ================================================ package mmx; struct virtual_plot_info_t { addr_t address; addr_t owner; pubkey_t farmer_key; optional reward_address; ulong balance; ulong size_bytes; } ================================================ FILE: interface/vm/package.vni ================================================ package mmx.vm; extern varptr_t = {12, 1}; ================================================ FILE: kernel/rsha256.cl ================================================ __kernel void rsha256_kernel(__global uint* hash, __global uint* num_iters, uint max_iters) { const uint id = get_global_id(0); const uint num_iters_org = num_iters[id]; const uint num_iters_i = min(num_iters_org, max_iters); if(num_iters_i == 0) { return; } num_iters[id] = num_iters_org - num_iters_i; uint msg[16]; #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(8))) #endif for(int i = 0; i < 8; ++i) { msg[i] = bswap_32(hash[id * 8 + i]); } msg[8] = bswap_32(0x80); #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(6))) #endif for(int i = 9; i < 15; ++i) { msg[i] = 0; } msg[15] = 256; uint state[8]; for(uint k = 0; k < num_iters_i; ++k) { #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(8))) #endif for(int i = 0; i < 8; ++i) { state[i] = h_init[i]; } sha256(msg, state); #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(8))) #endif for(int i = 0; i < 8; ++i) { msg[i] = state[i]; } } #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(8))) #endif for(int i = 0; i < 8; ++i) { hash[id * 8 + i] = bswap_32(state[i]); } } ================================================ FILE: kernel/sha256.cl ================================================ /* * sha256.cl * * Created on: 07.01.2014 * Author: mad */ __constant uint k[] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; __constant uint h_init[] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; #define Zrotr(a, b) rotate((uint)a, (uint)b) #define ZR25(n) ((Zrotr((n), 25) ^ Zrotr((n), 14) ^ ((n) >> 3U))) #define ZR15(n) ((Zrotr((n), 15) ^ Zrotr((n), 13) ^ ((n) >> 10U))) #define ZR26(n) ((Zrotr((n), 26) ^ Zrotr((n), 21) ^ Zrotr((n), 7))) #define ZR30(n) ((Zrotr((n), 30) ^ Zrotr((n), 19) ^ Zrotr((n), 10))) #define Ch(x, y, z) (z ^ (x & (y ^ z))) #define Ma(x, y, z) ((x & z) | (y & (x | z))) uint bswap_32(const uint value) { return as_uint(as_uchar4(value).s3210); } // msg needs to be byte swapped already // output state is not byte swapped void sha256( const uint* msg, uint* s ) { uint w[64]; #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(16))) #endif for(int i = 0; i < 16; ++i) { w[i] = msg[i]; } #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(48))) #endif for(int i = 16; i < 64; ++i) { const uint s0 = ZR25(w[i-15]); const uint s1 = ZR15(w[i-2]); w[i] = w[i-16] + s0 + w[i-7] + s1; } uint a = s[0]; uint b = s[1]; uint c = s[2]; uint d = s[3]; uint e = s[4]; uint f = s[5]; uint g = s[6]; uint h = s[7]; #if __OPENCL_VERSION__ >= 200 __attribute__((opencl_unroll_hint(64))) #endif for(int i = 0; i < 64; ++i) { const uint S1 = ZR26(e); // const uint ch = (e & f) ^ ((~e) & g); const uint ch = Ch(e, f, g); const uint temp1 = h + S1 + ch + k[i] + w[i]; const uint S0 = ZR30(a); // const uint maj = (a & b) ^ (a & c) ^ (b & c); const uint maj = Ma(a, b, c); const uint temp2 = S0 + maj; h = g; g = f; f = e; e = d + temp1; d = c; c = b; b = a; a = temp1 + temp2; } s[0] += a; s[1] += b; s[2] += c; s[3] += d; s[4] += e; s[5] += f; s[6] += g; s[7] += h; } ================================================ FILE: lib/.gitignore ================================================ /.cache ================================================ FILE: lib/bip-0039/english.txt ================================================ abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual adapt add addict address adjust admit adult advance advice aerobic affair afford afraid again age agent agree ahead aim air airport aisle alarm album alcohol alert alien all alley allow almost alone alpha already also alter always amateur amazing among amount amused analyst anchor ancient anger angle angry animal ankle announce annual another answer antenna antique anxiety any apart apology appear apple approve april arch arctic area arena argue arm armed armor army around arrange arrest arrive arrow art artefact artist artwork ask aspect assault asset assist assume asthma athlete atom attack attend attitude attract auction audit august aunt author auto autumn average avocado avoid awake aware away awesome awful awkward axis baby bachelor bacon badge bag balance balcony ball bamboo banana banner bar barely bargain barrel base basic basket battle beach bean beauty because become beef before begin behave behind believe below belt bench benefit best betray better between beyond bicycle bid bike bind biology bird birth bitter black blade blame blanket blast bleak bless blind blood blossom blouse blue blur blush board boat body boil bomb bone bonus book boost border boring borrow boss bottom bounce box boy bracket brain brand brass brave bread breeze brick bridge brief bright bring brisk broccoli broken bronze broom brother brown brush bubble buddy budget buffalo build bulb bulk bullet bundle bunker burden burger burst bus business busy butter buyer buzz cabbage cabin cable cactus cage cake call calm camera camp can canal cancel candy cannon canoe canvas canyon capable capital captain car carbon card cargo carpet carry cart case cash casino castle casual cat catalog catch category cattle caught cause caution cave ceiling celery cement census century cereal certain chair chalk champion change chaos chapter charge chase chat cheap check cheese chef cherry chest chicken chief child chimney choice choose chronic chuckle chunk churn cigar cinnamon circle citizen city civil claim clap clarify claw clay clean clerk clever click client cliff climb clinic clip clock clog close cloth cloud clown club clump cluster clutch coach coast coconut code coffee coil coin collect color column combine come comfort comic common company concert conduct confirm congress connect consider control convince cook cool copper copy coral core corn correct cost cotton couch country couple course cousin cover coyote crack cradle craft cram crane crash crater crawl crazy cream credit creek crew cricket crime crisp critic crop cross crouch crowd crucial cruel cruise crumble crunch crush cry crystal cube culture cup cupboard curious current curtain curve cushion custom cute cycle dad damage damp dance danger daring dash daughter dawn day deal debate debris decade december decide decline decorate decrease deer defense define defy degree delay deliver demand demise denial dentist deny depart depend deposit depth deputy derive describe desert design desk despair destroy detail detect develop device devote diagram dial diamond diary dice diesel diet differ digital dignity dilemma dinner dinosaur direct dirt disagree discover disease dish dismiss disorder display distance divert divide divorce dizzy doctor document dog doll dolphin domain donate donkey donor door dose double dove draft dragon drama drastic draw dream dress drift drill drink drip drive drop drum dry duck dumb dune during dust dutch duty dwarf dynamic eager eagle early earn earth easily east easy echo ecology economy edge edit educate effort egg eight either elbow elder electric elegant element elephant elevator elite else embark embody embrace emerge emotion employ empower empty enable enact end endless endorse enemy energy enforce engage engine enhance enjoy enlist enough enrich enroll ensure enter entire entry envelope episode equal equip era erase erode erosion error erupt escape essay essence estate eternal ethics evidence evil evoke evolve exact example excess exchange excite exclude excuse execute exercise exhaust exhibit exile exist exit exotic expand expect expire explain expose express extend extra eye eyebrow fabric face faculty fade faint faith fall false fame family famous fan fancy fantasy farm fashion fat fatal father fatigue fault favorite feature february federal fee feed feel female fence festival fetch fever few fiber fiction field figure file film filter final find fine finger finish fire firm first fiscal fish fit fitness fix flag flame flash flat flavor flee flight flip float flock floor flower fluid flush fly foam focus fog foil fold follow food foot force forest forget fork fortune forum forward fossil foster found fox fragile frame frequent fresh friend fringe frog front frost frown frozen fruit fuel fun funny furnace fury future gadget gain galaxy gallery game gap garage garbage garden garlic garment gas gasp gate gather gauge gaze general genius genre gentle genuine gesture ghost giant gift giggle ginger giraffe girl give glad glance glare glass glide glimpse globe gloom glory glove glow glue goat goddess gold good goose gorilla gospel gossip govern gown grab grace grain grant grape grass gravity great green grid grief grit grocery group grow grunt guard guess guide guilt guitar gun gym habit hair half hammer hamster hand happy harbor hard harsh harvest hat have hawk hazard head health heart heavy hedgehog height hello helmet help hen hero hidden high hill hint hip hire history hobby hockey hold hole holiday hollow home honey hood hope horn horror horse hospital host hotel hour hover hub huge human humble humor hundred hungry hunt hurdle hurry hurt husband hybrid ice icon idea identify idle ignore ill illegal illness image imitate immense immune impact impose improve impulse inch include income increase index indicate indoor industry infant inflict inform inhale inherit initial inject injury inmate inner innocent input inquiry insane insect inside inspire install intact interest into invest invite involve iron island isolate issue item ivory jacket jaguar jar jazz jealous jeans jelly jewel job join joke journey joy judge juice jump jungle junior junk just kangaroo keen keep ketchup key kick kid kidney kind kingdom kiss kit kitchen kite kitten kiwi knee knife knock know lab label labor ladder lady lake lamp language laptop large later latin laugh laundry lava law lawn lawsuit layer lazy leader leaf learn leave lecture left leg legal legend leisure lemon lend length lens leopard lesson letter level liar liberty library license life lift light like limb limit link lion liquid list little live lizard load loan lobster local lock logic lonely long loop lottery loud lounge love loyal lucky luggage lumber lunar lunch luxury lyrics machine mad magic magnet maid mail main major make mammal man manage mandate mango mansion manual maple marble march margin marine market marriage mask mass master match material math matrix matter maximum maze meadow mean measure meat mechanic medal media melody melt member memory mention menu mercy merge merit merry mesh message metal method middle midnight milk million mimic mind minimum minor minute miracle mirror misery miss mistake mix mixed mixture mobile model modify mom moment monitor monkey monster month moon moral more morning mosquito mother motion motor mountain mouse move movie much muffin mule multiply muscle museum mushroom music must mutual myself mystery myth naive name napkin narrow nasty nation nature near neck need negative neglect neither nephew nerve nest net network neutral never news next nice night noble noise nominee noodle normal north nose notable note nothing notice novel now nuclear number nurse nut oak obey object oblige obscure observe obtain obvious occur ocean october odor off offer office often oil okay old olive olympic omit once one onion online only open opera opinion oppose option orange orbit orchard order ordinary organ orient original orphan ostrich other outdoor outer output outside oval oven over own owner oxygen oyster ozone pact paddle page pair palace palm panda panel panic panther paper parade parent park parrot party pass patch path patient patrol pattern pause pave payment peace peanut pear peasant pelican pen penalty pencil people pepper perfect permit person pet phone photo phrase physical piano picnic picture piece pig pigeon pill pilot pink pioneer pipe pistol pitch pizza place planet plastic plate play please pledge pluck plug plunge poem poet point polar pole police pond pony pool popular portion position possible post potato pottery poverty powder power practice praise predict prefer prepare present pretty prevent price pride primary print priority prison private prize problem process produce profit program project promote proof property prosper protect proud provide public pudding pull pulp pulse pumpkin punch pupil puppy purchase purity purpose purse push put puzzle pyramid quality quantum quarter question quick quit quiz quote rabbit raccoon race rack radar radio rail rain raise rally ramp ranch random range rapid rare rate rather raven raw razor ready real reason rebel rebuild recall receive recipe record recycle reduce reflect reform refuse region regret regular reject relax release relief rely remain remember remind remove render renew rent reopen repair repeat replace report require rescue resemble resist resource response result retire retreat return reunion reveal review reward rhythm rib ribbon rice rich ride ridge rifle right rigid ring riot ripple risk ritual rival river road roast robot robust rocket romance roof rookie room rose rotate rough round route royal rubber rude rug rule run runway rural sad saddle sadness safe sail salad salmon salon salt salute same sample sand satisfy satoshi sauce sausage save say scale scan scare scatter scene scheme school science scissors scorpion scout scrap screen script scrub sea search season seat second secret section security seed seek segment select sell seminar senior sense sentence series service session settle setup seven shadow shaft shallow share shed shell sheriff shield shift shine ship shiver shock shoe shoot shop short shoulder shove shrimp shrug shuffle shy sibling sick side siege sight sign silent silk silly silver similar simple since sing siren sister situate six size skate sketch ski skill skin skirt skull slab slam sleep slender slice slide slight slim slogan slot slow slush small smart smile smoke smooth snack snake snap sniff snow soap soccer social sock soda soft solar soldier solid solution solve someone song soon sorry sort soul sound soup source south space spare spatial spawn speak special speed spell spend sphere spice spider spike spin spirit split spoil sponsor spoon sport spot spray spread spring spy square squeeze squirrel stable stadium staff stage stairs stamp stand start state stay steak steel stem step stereo stick still sting stock stomach stone stool story stove strategy street strike strong struggle student stuff stumble style subject submit subway success such sudden suffer sugar suggest suit summer sun sunny sunset super supply supreme sure surface surge surprise surround survey suspect sustain swallow swamp swap swarm swear sweet swift swim swing switch sword symbol symptom syrup system table tackle tag tail talent talk tank tape target task taste tattoo taxi teach team tell ten tenant tennis tent term test text thank that theme then theory there they thing this thought three thrive throw thumb thunder ticket tide tiger tilt timber time tiny tip tired tissue title toast tobacco today toddler toe together toilet token tomato tomorrow tone tongue tonight tool tooth top topic topple torch tornado tortoise toss total tourist toward tower town toy track trade traffic tragic train transfer trap trash travel tray treat tree trend trial tribe trick trigger trim trip trophy trouble truck true truly trumpet trust truth try tube tuition tumble tuna tunnel turkey turn turtle twelve twenty twice twin twist two type typical ugly umbrella unable unaware uncle uncover under undo unfair unfold unhappy uniform unique unit universe unknown unlock until unusual unveil update upgrade uphold upon upper upset urban urge usage use used useful useless usual utility vacant vacuum vague valid valley valve van vanish vapor various vast vault vehicle velvet vendor venture venue verb verify version very vessel veteran viable vibrant vicious victory video view village vintage violin virtual virus visa visit visual vital vivid vocal voice void volcano volume vote voyage wage wagon wait walk wall walnut want warfare warm warrior wash wasp waste water wave way wealth weapon wear weasel weather web wedding weekend weird welcome west wet whale what wheat wheel when where whip whisper wide width wife wild will win window wine wing wink winner winter wire wisdom wise wish witness wolf woman wonder wood wool word work world worry worth wrap wreck wrestle wrist write wrong yard year yellow you young youth zebra zero zone zoo ================================================ FILE: lib/bip-0039/generate_cpp.sh ================================================ #!/bin/bash printf "#include \n\n" > out.cpp printf "namespace mmx {\n" >> out.cpp printf "namespace mnemonic {\n\n" >> out.cpp printf "const std::vector wordlist_en = {\n" >> out.cpp while read word; do printf "\t\"$word\",\n" >> out.cpp done < $1 printf "};\n}\n}" >> out.cpp ================================================ FILE: lib/make_all.sh ================================================ #!/bin/bash set -e mkdir -p .cache cd secp256k1 SECP_COMMIT=$(git rev-parse HEAD) if [[ -f ../.cache/SECP_BUILD && -f .libs/libsecp256k1.a ]]; then SECP_BUILD=$(cat ../.cache/SECP_BUILD || true) fi if [ "${SECP_COMMIT}" != "${SECP_BUILD}" ] then echo "Compiling secp256k1 ${SECP_COMMIT}" ./autogen.sh > /dev/null CFLAGS=-fPIC ./configure --disable-shared --disable-tests --disable-benchmark --with-pic > /dev/null make clean > /dev/null make -j8 echo -n ${SECP_COMMIT} > ../.cache/SECP_BUILD fi cd .. ================================================ FILE: make_Debug.cmd ================================================ @ECHO OFF TITLE MMX Make Debug Script IF "%VCPKG_ROOT%"=="" ( SET VCPKG_ROOT=C:/dev/vcpkg ) IF "%CMAKE_BUILD_PRESET%"=="" ( SET CMAKE_BUILD_PRESET=windows-default ) cmake --preset %CMAKE_BUILD_PRESET% && ^ cmake --build --preset %CMAKE_BUILD_PRESET% --config Debug ================================================ FILE: make_RelWithDebInfo.cmd ================================================ @ECHO OFF TITLE MMX Make RelWithDebInfo Script IF "%VCPKG_ROOT%"=="" ( SET VCPKG_ROOT=C:/dev/vcpkg ) IF "%CMAKE_BUILD_PRESET%"=="" ( SET CMAKE_BUILD_PRESET=windows-default ) cmake --preset %CMAKE_BUILD_PRESET% && ^ cmake --build --preset %CMAKE_BUILD_PRESET% --config RelWithDebInfo ================================================ FILE: make_Release.cmd ================================================ @ECHO OFF TITLE MMX Make Release Script IF "%VCPKG_ROOT%"=="" ( SET VCPKG_ROOT=C:/dev/vcpkg ) IF "%CMAKE_BUILD_PRESET%"=="" ( SET CMAKE_BUILD_PRESET=windows-default ) cmake --preset %CMAKE_BUILD_PRESET% && ^ cmake --build --preset %CMAKE_BUILD_PRESET% --config Release ================================================ FILE: make_Release_pack.cmd ================================================ @ECHO OFF TITLE MMX Make Release and Pack Script REM Usage REM CMD REM SET MMX_VERSION=v0.9.10 && .\make_release_pack.cmd REM PowerShell REM $env:MMX_VERSION='v0.9.10'; .\make_release_pack.cmd REM SET MMX_VERSION=v0.0.0 SET MMX_WIN_PACK=TRUE SET CMAKE_BUILD_PRESET=windows-default CALL .\make_release.cmd && ^ IF "%MMX_WIN_PACK%"=="TRUE" cpack -C Release --config ./build/%CMAKE_BUILD_PRESET%/CPackConfig.cmake -B ./build/%CMAKE_BUILD_PRESET%/!package ================================================ FILE: make_coverage.sh ================================================ #!/bin/bash mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_COVERAGE=1 -DCMAKE_CXX_FLAGS="-fmax-errors=1" $@ .. make -j8 cd .. ./scripts/reset_coverage.sh ================================================ FILE: make_debian.sh ================================================ #!/bin/bash set -e ./make_release.sh -DNODE_INSTALL_PATH="share/mmx-node" -DVNX_BUILD_TOOLS=OFF -DMMX_BUILD_TESTS=OFF VERSION=$(cat config/default/build.json | jq -r .version | sed 's/^v//') ARCH=${ARCH:-any} DIST=${DIST:-generic} DST=mmx-node-$VERSION-$ARCH-$DIST rm -rf $DST mkdir -m 755 -p $DST/DEBIAN mkdir -m 755 -p $DST/usr echo "Version: $VERSION" >> $DST/DEBIAN/control echo "Architecture: ${ARCH}" >> $DST/DEBIAN/control cat cmake/debian/${DIST}/control >> $DST/DEBIAN/control cp -a build/dist/. $DST/usr/ rm -r $DST/usr/include rm -r $DST/usr/interface rm -r $DST/usr/share/cmake find $DST/usr/ -name "*.a" -delete fakeroot dpkg-deb --build $DST rm -rf $DST ================================================ FILE: make_debug.sh ================================================ #!/bin/bash set -e cd lib ./make_all.sh cd .. mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=Debug -DVNX_ADDONS_BUILD_TESTS=1 -DCMAKE_CXX_FLAGS="-fmax-errors=1" $@ .. make -j $(nproc) ================================================ FILE: make_devel.sh ================================================ #!/bin/bash set -e cd lib ./make_all.sh cd .. mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVNX_ADDONS_BUILD_TESTS=1 -DCMAKE_INSTALL_PREFIX=dist -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer -fmax-errors=1" $@ .. make -j $(nproc) ================================================ FILE: make_release.sh ================================================ #!/bin/bash set -e cd lib ./make_all.sh cd .. mkdir -p build cd build rm -rf dist cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist $@ .. make -j $(nproc) install ================================================ FILE: modules/Farmer.vni ================================================ package mmx; module Farmer { vnx.TopicPtr input_info = "harvester.info"; vnx.TopicPtr input_proofs = "harvester.proof"; vnx.TopicPtr input_partials = "harvester.partials"; vnx.TopicPtr output_proofs = "farmer.proof"; vnx.TopicPtr output_partials = "farmer.partials"; uint harvester_timeout = 60; // [sec] uint difficulty_interval = 300; // [sec] string node_server = "Node"; string wallet_server = "Wallet"; optional reward_addr; // default = first address of first wallet optional partial_diff; // custom partial diff (if pool supports it) optional payout_threshold; // custom payout threshold (if pool supports it) @Permission(permission_e.REMOTE) vnx.Hash64 get_mac_addr() const; @Permission(permission_e.REMOTE) ulong get_partial_diff(addr_t plot_nft) const; @Permission(permission_e.REMOTE) map get_partial_diffs(vector plot_nfts) const; @Permission(permission_e.REMOTE) vector get_farmer_keys() const; FarmInfo* get_farm_info() const; @Permission(permission_e.SIGN_BLOCK) BlockHeader* sign_block(BlockHeader* block) const; @Permission(permission_e.SIGN_BLOCK) signature_t sign_vote(ValidatorVote* vote) const; void handle(FarmInfo sample); void handle(ProofResponse sample); void handle(Partial sample); } ================================================ FILE: modules/Harvester.vni ================================================ package mmx; module Harvester implements vnx.addons.HttpComponent { vnx.TopicPtr input_challenges = "harvester.challenges"; vnx.TopicPtr output_info = "harvester.info"; vnx.TopicPtr output_proofs = "harvester.proof"; vnx.TopicPtr output_lookups = "harvester.lookups"; vnx.TopicPtr output_partials = "harvester.partials"; set plot_dirs; set dir_blacklist; string node_server = "Node"; string farmer_server = "Farmer"; string config_path; string storage_path; string my_name; // custom harvester name int max_queue_ms = 10000; // [ms] int reload_interval = 3600; // (0 to disable) [sec] int nft_query_interval = 60; // [sec] uint num_threads = 32; // for plot lookups uint max_recursion = 4; // for recursive_search bool recursive_search = true; bool farm_virtual_plots = true; void reload(); void add_plot_dir(string path); void rem_plot_dir(string path); FarmInfo* get_farm_info() const; ulong get_total_bytes() const; // [bytes] void handle(Challenge sample); } ================================================ FILE: modules/Node.vni ================================================ package mmx; import mmx.vm.varptr_t; module Node implements vnx.addons.HttpComponent { vnx.TopicPtr input_vdfs = "network.vdfs"; vnx.TopicPtr input_votes = "network.votes"; vnx.TopicPtr input_proof = "network.proof"; vnx.TopicPtr input_blocks = "network.blocks"; vnx.TopicPtr input_transactions = "network.transactions"; vnx.TopicPtr input_timelord_vdfs = "timelord.proof"; vnx.TopicPtr input_harvester_proof = "farmer.proof"; vnx.TopicPtr input_vdf_points = "network.vdf_points"; vnx.TopicPtr output_verified_vdfs = "node.verified_vdfs"; vnx.TopicPtr output_verified_votes = "node.verified_votes"; vnx.TopicPtr output_verified_proof = "node.verified_proof"; vnx.TopicPtr output_verified_blocks = "node.verified_blocks"; vnx.TopicPtr output_verified_transactions = "node.verified_transactions"; vnx.TopicPtr output_committed_blocks = "node.committed_blocks"; vnx.TopicPtr output_transactions = "node.transactions"; vnx.TopicPtr output_interval_request = "timelord.requests"; vnx.TopicPtr output_challenges = "harvester.challenges"; vnx.TopicPtr output_vdf_points = "node.vdf_points"; vnx.TopicPtr output_votes = "node.votes"; int max_queue_ms = 10000; // [ms] int update_interval_ms = 1000; // [ms] int validate_interval_ms = 500; // [ms] int sync_loss_delay = 60; // when to re-sync if stuck [sec] uint max_history = 1000; // max block header history uint max_tx_pool = 100; // number of full blocks uint max_tx_queue = 10000; // pending transactions to verify uint max_sync_jobs = 64; // number of parallel requests uint max_sync_ahead = 1000; // how many blocks to fetch ahead at most uint num_sync_retries = 3; // how often to retry when reaching a peak uint revert_height = -1; // to revert DB on start uint num_threads = 24; uint num_db_threads = 8; uint num_api_threads = 8; uint commit_threshold = 80; // percentage of proofs required uint max_future_sync = 100; // limit syncing into the future [blocks] uint max_vdf_verify_pending = 2; // how many VDFs to verify in parallel when synced int opencl_device = 0; // device to use for VDF verification (-1 to disable) string opencl_device_name; // when specified, opencl_device is a relative index bool do_sync = true; bool show_warnings; bool vdf_slave_mode; bool run_tests; bool exec_debug; // dump memory on exec fail bool exec_profile; // write execution profiles bool exec_trace; // write execution traces string storage_path; string database_path = "db/"; string router_name = "Router"; addr_t mmx_usd_swap_addr; string metalsdev_api_key; @Permission(permission_e.PUBLIC) ChainParams* get_params() const; @Permission(permission_e.PUBLIC) NetworkInfo* get_network_info() const; @Permission(permission_e.PUBLIC) hash_t get_genesis_hash() const; @Permission(permission_e.PUBLIC) uint get_height() const; @Permission(permission_e.PUBLIC) uint get_vdf_height() const; @Permission(permission_e.PUBLIC) optional get_synced_height() const; @Permission(permission_e.PUBLIC) optional get_synced_vdf_height() const; @Permission(permission_e.PUBLIC) hash_t get_vdf_peak() const; @Permission(permission_e.PUBLIC) Block* get_block(hash_t hash) const; @Permission(permission_e.PUBLIC) Block* get_block_at(uint height) const; @Permission(permission_e.PUBLIC) BlockHeader* get_header(hash_t hash) const; @Permission(permission_e.PUBLIC) BlockHeader* get_header_at(uint height) const; @Permission(permission_e.PUBLIC) optional get_block_hash(uint height) const; @Permission(permission_e.PUBLIC) optional> get_block_hash_ex(uint height) const; @Permission(permission_e.PUBLIC) optional get_tx_height(hash_t id) const; @Permission(permission_e.PUBLIC) optional get_tx_info(hash_t id) const; @Permission(permission_e.PUBLIC) optional get_tx_info_for(Transaction* tx) const; @Permission(permission_e.PUBLIC) vector get_tx_ids(uint limit) const; @Permission(permission_e.PUBLIC) vector get_tx_ids_at(uint height) const; @Permission(permission_e.PUBLIC) vector get_tx_ids_since(uint height) const; @Permission(permission_e.PUBLIC) exec_result_t validate(Transaction* tx) const; @Permission(PUBLISH) void add_block(Block* block); @Permission(PUBLISH) void add_transaction(Transaction* tx, bool pre_validate); // TODO: void await_transactions(vector tx_ids, uint min_confirm = 1) const; @Permission(permission_e.PUBLIC) Contract* get_contract(addr_t address) const; @Permission(permission_e.PUBLIC) Contract* get_contract_for(addr_t address) const; @Permission(permission_e.PUBLIC) vector get_contracts(vector addresses) const; @Permission(permission_e.PUBLIC) vector get_contracts_by(vector addresses, optional type_hash) const; @Permission(permission_e.PUBLIC) vector get_contracts_owned_by(vector addresses, optional type_hash) const; @Permission(permission_e.PUBLIC) Transaction* get_transaction(hash_t id, bool pending) const; @Permission(permission_e.PUBLIC) vector get_transactions(vector ids) const; @Permission(permission_e.PUBLIC) vector get_history(vector addresses, query_filter_t filter) const; @Permission(permission_e.PUBLIC) vector get_history_memo(vector addresses, string memo, query_filter_t filter) const; @Permission(permission_e.PUBLIC) uint128 get_balance(addr_t address, addr_t currency) const; @Permission(permission_e.PUBLIC) map get_balances(addr_t address, set whitelist, int limit = 100) const; @Permission(permission_e.PUBLIC) map get_contract_balances(addr_t address, set whitelist, int limit = 100) const; @Permission(permission_e.PUBLIC) uint128 get_total_balance(vector addresses, addr_t currency) const; @Permission(permission_e.PUBLIC) map get_total_balances(vector addresses, set whitelist, int limit = 100) const; @Permission(permission_e.PUBLIC) map, uint128> get_all_balances(vector addresses, set whitelist, int limit = 100) const; @Permission(permission_e.PUBLIC) vector get_exec_history(addr_t address, int limit = 100, bool recent) const; @Permission(permission_e.PUBLIC) map read_storage(addr_t contract, uint height = -1) const; @Permission(permission_e.PUBLIC) map dump_storage(addr_t contract, uint height = -1) const; @Permission(permission_e.PUBLIC) varptr_t read_storage_var(addr_t contract, ulong address, uint height = -1) const; @Permission(permission_e.PUBLIC) varptr_t read_storage_entry_var(addr_t contract, ulong address, ulong key, uint height = -1) const; @Permission(permission_e.PUBLIC) pair read_storage_field(addr_t contract, string name, uint height = -1) const; @Permission(permission_e.PUBLIC) tuple read_storage_entry_addr(addr_t contract, string name, addr_t key, uint height = -1) const; @Permission(permission_e.PUBLIC) tuple read_storage_entry_string(addr_t contract, string name, string key, uint height = -1) const; @Permission(permission_e.PUBLIC) vector read_storage_array(addr_t contract, ulong address, uint height = -1) const; @Permission(permission_e.PUBLIC) map read_storage_map(addr_t contract, ulong address, uint height = -1) const; @Permission(permission_e.PUBLIC) map read_storage_object(addr_t contract, ulong address, uint height = -1) const; @Permission(permission_e.PUBLIC) vnx.Variant call_contract(addr_t address, string method, vector args, optional user, optional> deposit) const; @Permission(permission_e.PUBLIC) optional get_plot_nft_info(addr_t address) const; @Permission(permission_e.PUBLIC) addr_t get_plot_nft_target(addr_t address, optional farmer_addr) const; @Permission(permission_e.PUBLIC) offer_data_t get_offer(addr_t address) const; @Permission(permission_e.PUBLIC) vector get_offers(uint since, bool state) const; @Permission(permission_e.PUBLIC) vector get_offers_by(vector owners, bool state) const; @Permission(permission_e.PUBLIC) vector fetch_offers(vector addresses, bool state, bool closed) const; @Permission(permission_e.PUBLIC) vector get_recent_offers(int limit = 100, bool state = true) const; @Permission(permission_e.PUBLIC) vector get_recent_offers_for(optional bid, optional ask, uint128 min_bid, int limit = 100, bool state = true) const; @Permission(permission_e.PUBLIC) vector get_trade_history(int limit = 100, uint since) const; @Permission(permission_e.PUBLIC) vector get_trade_history_for(optional bid, optional ask, int limit = 100, uint since) const; @Permission(permission_e.PUBLIC) vector get_swaps(uint since, optional token, optional currency, int limit = 100) const; @Permission(permission_e.PUBLIC) swap_info_t get_swap_info(addr_t address) const; @Permission(permission_e.PUBLIC) swap_user_info_t get_swap_user_info(addr_t address, addr_t user) const; @Permission(permission_e.PUBLIC) vector get_swap_history(addr_t address, int limit = 100) const; @Permission(permission_e.PUBLIC) uint128[2] get_swap_trade_estimate(addr_t address, uint i, uint128 amount, int num_iter = 20) const; @Permission(permission_e.PUBLIC) uint128[2] get_swap_fees_earned(addr_t address, addr_t user) const; @Permission(permission_e.PUBLIC) uint128[2] get_swap_equivalent_liquidity(addr_t address, addr_t user) const; @Permission(permission_e.PUBLIC) map[2]> get_swap_liquidity_by(vector addresses) const; @Permission(permission_e.PUBLIC) uint128 get_total_supply(addr_t currency) const; @Permission(permission_e.PUBLIC) vector get_farmed_blocks(vector farmer_keys, bool full_blocks, uint since, int limit = 100) const; @Permission(permission_e.PUBLIC) farmed_block_summary_t get_farmed_block_summary(vector farmer_keys, uint since) const; @Permission(permission_e.PUBLIC) vector> get_farmer_ranking(int limit = -1) const; @Permission(permission_e.PUBLIC) tuple verify_plot_nft_target(addr_t address, addr_t pool_target) const; tuple verify_partial(Partial* partial, optional pool_target) const; void start_sync(bool force); void revert_sync(uint height); void handle(Block value); void handle(Transaction value); void handle(ProofOfTime value); void handle(ProofResponse value); void handle(VDF_Point value); void handle(ValidatorVote value); } ================================================ FILE: modules/ProofServer.vni ================================================ package mmx; module ProofServer { uint num_threads = 32; @Permission(permission_e.REMOTE) vector compute(vector X_values, hash_t id, int ksize, int xbits) const async; } ================================================ FILE: modules/Router.vni ================================================ package mmx; module Router extends vnx.addons.MsgServer implements vnx.addons.HttpComponent { vnx.TopicPtr input_verified_vdfs = "node.verified_vdfs"; vnx.TopicPtr input_verified_votes = "node.verified_votes"; vnx.TopicPtr input_verified_proof = "node.verified_proof"; vnx.TopicPtr input_verified_blocks = "node.verified_blocks"; vnx.TopicPtr input_verified_transactions = "node.verified_transactions"; vnx.TopicPtr input_transactions = "node.transactions"; vnx.TopicPtr input_vdf_points = "node.vdf_points"; vnx.TopicPtr input_vdfs = "timelord.proof"; vnx.TopicPtr output_vdfs = "network.vdfs"; vnx.TopicPtr output_votes = "network.votes"; vnx.TopicPtr output_proof = "network.proof"; vnx.TopicPtr output_blocks = "network.blocks"; vnx.TopicPtr output_transactions = "network.transactions"; vnx.TopicPtr output_vdf_points = "network.vdf_points"; int max_queue_ms = 1000; // [ms] int send_interval_ms = 20; // [ms] int query_interval_ms = 10000; // [ms] int update_interval_ms = 1000; // [ms] int connect_interval_ms = 10000; // [ms] int fetch_timeout_ms = 10000; // for fetching data from peers [ms] int relay_target_ms = 5000; // [ms] uint sync_loss_delay = 60; // when to re-sync [sec] uint discover_interval = 60; // how often to search for new peers [sec] uint disconnect_interval = 0; // when to disconnect peers manually (0 = disable) [sec] uint peer_retry_interval = 360; // how often to try failed peers [min] uint num_peers_out = 8; // maximum outgoing connections to synced peers uint min_sync_peers = 2; // minimum peers needed for syncing uint max_peer_set = 100; // do not ask for more peers than that uint max_sent_cache = 20000; uint max_hash_cache = 100000; uint max_vdf_segments = 65536; // for relay without verify uint node_version = 103; node_type_e mode = FULL_NODE; bool do_relay = true; bool open_port = false; double max_tx_upload = 2; // relative to full block per block interval double max_pending_cost = 0.2; // relative to full block per peer uint priority_queue_size = 262144; // [bytes] set seed_peers; set fixed_peers; set block_peers; set master_nodes; string storage_path; string node_server = "Node"; void discover(); hash_t get_id() const; node_info_t get_info() const; pair sign_msg(hash_t msg) const; vector get_peers(uint max_count = 10) const; vector get_known_peers() const; vector get_connected_peers() const; PeerInfo* get_peer_info() const; void kick_peer(string address); vector get_blocks_at(uint height) const async; Block* fetch_block(hash_t hash, optional address) const async; Block* fetch_block_at(uint height, string address) const async; void handle(Block sample); void handle(Transaction sample); void handle(ProofOfTime sample); void handle(ProofResponse sample); void handle(VDF_Point sample); void handle(ValidatorVote sample); } ================================================ FILE: modules/TimeLord.vni ================================================ package mmx; module TimeLord { vnx.TopicPtr input_request = "timelord.requests"; vnx.TopicPtr output_proofs = "timelord.proof"; uint max_history = 1000000; string node_server = "Node"; string wallet_server = "Wallet"; string storage_path; optional reward_addr; // default = first address of first wallet void stop_vdf(); void handle(IntervalRequest sample); } ================================================ FILE: modules/Wallet.vni ================================================ package mmx; module Wallet implements vnx.addons.HttpComponent { vector key_files; vector accounts; // index starts at max_key_files string config_path; string storage_path; string database_path = "wallet/"; string node_server = "Node"; uint max_key_files = 100; uint num_addresses = 100; uint max_addresses = 10000; uint default_expire = 100; // when transactions expire int lock_timeout_sec = 600; // when to auto-lock after unlock [sec] int cache_timeout_ms = 1000; // how often to update from node [ms] set token_whitelist; @Permission(permission_e.SPENDING) Transaction* send(uint index, uint128 amount, addr_t dst_addr, addr_t currency, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* send_many(uint index, vector> amounts, addr_t currency, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* send_from(uint index, uint128 amount, addr_t dst_addr, addr_t src_addr, addr_t currency, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* deploy(uint index, Contract* contract, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* execute(uint index, addr_t address, string method, vector args, optional user, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* deposit( uint index, addr_t address, string method, vector args, uint128 amount, addr_t currency, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* make_offer(uint index, uint owner, uint128 bid_amount, addr_t bid_currency, uint128 ask_amount, addr_t ask_currency, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* offer_trade(uint index, addr_t address, uint128 amount, uint dst_addr, uint128 price, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* offer_withdraw(uint index, addr_t address, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* accept_offer(uint index, addr_t address, uint dst_addr, uint128 price, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* cancel_offer(uint index, addr_t address, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* swap_trade(uint index, addr_t address, uint128 amount, addr_t currency, optional min_trade, int num_iter = 20, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* swap_add_liquid(uint index, addr_t address, uint128 amount[2], uint pool_idx, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* swap_rem_liquid(uint index, addr_t address, uint128 amount[2], spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* plotnft_exec(addr_t address, string method, vector args, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* plotnft_create(uint index, string name, optional owner, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* complete(uint index, Transaction* tx, spend_options_t options) const; @Permission(permission_e.SPENDING) Transaction* sign_off(uint index, Transaction* tx, spend_options_t options) const; @Permission(permission_e.SPENDING) Solution* sign_msg(uint index, addr_t address, hash_t msg) const; void send_off(uint index, Transaction* tx) const; void mark_spent(uint index, map, uint128> amounts); void reserve(uint index, map, uint128> amounts); void release(uint index, map, uint128> amounts); void release_all(); void reset_cache(uint index); void update_cache(uint index) const; vector get_history(uint index, query_filter_t filter) const; vector get_tx_log(uint index, int limit = 100) const; vector gather_inputs_for(uint index, uint128 amount, addr_t currency, spend_options_t options) const; balance_t get_balance(uint index, addr_t currency) const; map get_balances(uint index, bool with_zero) const; map get_total_balances(vector addresses) const; map get_contract_balances(addr_t address) const; map get_contracts(uint index, optional type_name, optional type_hash) const; map get_contracts_owned(uint index, optional type_name, optional type_hash) const; vector get_offers(uint index, bool state) const; map[2]> get_swap_liquidity(uint index) const; addr_t get_address(uint index, uint offset) const; vector get_all_addresses(int index) const; // (index == -1) -> all wallets int find_wallet_by_addr(addr_t address) const; account_info_t get_account(uint index) const; vector get_all_accounts() const; bool is_locked(uint index) const; void lock(uint index); void unlock(uint index, string passphrase); void add_account(uint index, account_t config, optional passphrase); void create_account(account_t config, optional passphrase); void create_wallet(account_t config, optional words, optional passphrase); void import_wallet(account_t config, KeyFile* key_file, optional passphrase); void remove_account(uint index, uint account); void set_address_count(uint index, uint count); vector get_mnemonic_wordlist(string lang = "en") const; set get_token_list() const; void add_token(addr_t address); void rem_token(addr_t address); @Permission(permission_e.SPENDING) KeyFile* export_wallet(uint index) const; @Permission(permission_e.SPENDING) hash_t get_master_seed(uint index) const; @Permission(permission_e.SPENDING) vector get_mnemonic_seed(uint index) const; @Permission(permission_e.SPENDING) pair get_farmer_keys(uint index) const; @Permission(permission_e.SPENDING) vector> get_all_farmer_keys() const; } ================================================ FILE: modules/WebAPI.vni ================================================ package mmx; module WebAPI implements vnx.addons.HttpComponent { vnx.TopicPtr input_blocks = "node.verified_blocks"; vnx.TopicPtr input_proofs = "harvester.proof"; string node_server = "Node"; string wallet_server = "Wallet"; string farmer_server = "Farmer"; string exchange_server = "ExchClient"; string config_path; uint max_recursion = 100; uint max_log_history = 10000; uint sync_delay = 18; // blocks after sync for public service uint cache_max_age = 0; // 0 = no-cache void shutdown(); void handle(Block sample); void handle(ProofResponse sample); void handle(vnx.LogMsg sample); } ================================================ FILE: run_farmer.sh ================================================ #!/bin/bash source ./activate.sh mmx_farmer -c config/${NETWORK}/ config/farmer/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_gdb_node.sh ================================================ #!/bin/bash source ./activate.sh #./scripts/kill_high_mem.sh mmx_node 8192 & gdb -ex=run --args ./build/mmx_node -c config/${NETWORK}/ config/node/ "${MMX_HOME}config/local/" $@ kill $(jobs -p) ================================================ FILE: run_harvester.sh ================================================ #!/bin/bash source ./activate.sh mmx_harvester -c config/${NETWORK}/ config/farmer/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_node.sh ================================================ #!/bin/bash source ./activate.sh mmx_node -c config/${NETWORK}/ config/node/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_timelord.sh ================================================ #!/bin/bash source ./activate.sh mmx_timelord -c config/${NETWORK}/ config/timelord/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_valgrind_node.sh ================================================ #!/bin/bash source ./activate.sh valgrind ./build/mmx_node -c config/${NETWORK}/ config/node/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_wallet.sh ================================================ #!/bin/bash source ./activate.sh mmx_wallet -c config/${NETWORK}/ config/wallet/ "${MMX_HOME}config/local/" $@ ================================================ FILE: run_wallet_gui.sh ================================================ #!/bin/bash source ./activate.sh NODE=$(cat "${MMX_HOME}config/local/node") NODE=$(zenity --entry --title="Remote Node Address" --text="Node IP or hostname:" --entry-text="$NODE") if [[ -z "${NODE}" ]]; then exit -1 fi echo "$NODE" > "${MMX_HOME}config/local/node" mmx_wallet -c config/${NETWORK}/ config/wallet/ "${MMX_HOME}config/local/" --gui $@ ================================================ FILE: scripts/bench/test_iops.sh ================================================ #!/bin/bash sudo fio --filename=$1 --direct=0 --rw=randread --bs=48 --ioengine=libaio --iodepth=1024 --runtime=30 --numjobs=16 --time_based --group_reporting --name=iops-test-job --eta-newline=1 --readonly ================================================ FILE: scripts/docker/mmx-testnet/README.md ================================================ # Setup To enable farming: - Edit `compose.yml` to add your plot drives - Create folder `~/.mmx_testnet` if not already exists - Copy your `wallet*.dat` to `~/.mmx_testnet/wallet.dat` (the one which has your farmer key) To enable timelord: - Edit `compose.yml` to add `--timelord` to the command line # Update To get the latest image and run it: ``` docker compose pull # for CPU only docker compose -f nvidia.yml pull # for Nvidia GPU docker compose down ``` Then start again, see below. # Run CPU: `docker compose up -d` Nvidia: `docker compose -f compose.yml -f nvidia.yml up -d` Check running: `docker compose ps` Show logs: `docker compose logs -f` Restart: `docker compose restart` Note: Run without `-d` for interactive mode. ================================================ FILE: scripts/docker/mmx-testnet/compose.yml ================================================ services: node: image: ghcr.io/madmax43v3r/mmx-node:edge restart: unless-stopped command: "./run_node.sh --Harvester.plot_dirs /plots/" volumes: - ~/.mmx_testnet:/data #- /mnt/data1/mmx/OG:/plots/1 #- /mnt/data2/mmx/OG:/plots/2 ports: - "12343:12343" # Node p2p port. Forward your router to this port for peers to be able to connect - "127.0.0.1:11381:11380" # API port. Set host to 0.0.0.0 in /data/config/local/HttpServer.json for webUI/API access #- "11333:11333" # Harvester port. Uncomment to allow remote harvesters to connect to the farmer #- "11330:11330" # Farmer port. Uncomment to allow remote farmers to connect to the node environment: MMX_ALLOW_REMOTE: 'false' # Set to true to allow connections from remote harvesters/farmers MMX_FARMER_ENABLED: 'true' # Set to false to disable local farmer MMX_HARVESTER_ENABLED: 'true' # Set to false to disable local harvester MMX_NETWORK_OVERRIDE: 'testnet13' ================================================ FILE: scripts/docker/mmx-testnet/nvidia.yml ================================================ services: node: image: ghcr.io/madmax43v3r/mmx-node:edge-nvidia runtime: nvidia ================================================ FILE: scripts/gen_coverage.sh ================================================ #!/bin/bash lcov --directory build/ --capture --output-file coverage.info genhtml --demangle-cpp -o build/coverage coverage.info ================================================ FILE: scripts/gen_seed_peers.js ================================================ const ref = ["101.207.207.237", "104.157.124.160", "108.12.226.21", "109.206.144.194", "109.248.57.198", "109.63.193.28", "109.67.149.36", "112.193.2.141", "114.224.30.147", "123.112.214.2", "123.185.66.220", "125.229.48.110", "130.0.220.119", "135.131.174.76", "141.135.6.172", "145.255.12.28", "159.2.80.240", "162.198.119.188", "163.58.65.191", "176.106.160.193", "178.141.159.36", "178.205.93.141", "183.166.227.12", "184.155.122.12", "185.219.109.179", "188.134.88.65", "188.241.36.166", "192.168.1.170", "195.14.48.110", "195.239.203.162", "202.131.84.11", "203.118.131.219", "203.129.18.0", "205.250.162.213", "212.15.59.91", "220.133.2.109", "24.35.254.197", "36.62.117.220", "38.15.38.26", "46.65.247.3", "47.253.32.11", "47.34.208.57", "49.231.43.170", "5.12.248.227", "62.0.93.190", "64.254.187.156", "67.172.84.54", "68.5.105.231", "68.6.175.76", "69.127.154.48", "69.197.174.72", "71.166.51.14", "71.183.186.77", "71.227.39.0", "72.80.216.47", "73.196.143.58", "73.204.157.123", "73.205.40.161", "73.51.157.106", "75.100.41.233", "76.232.65.235", "76.76.229.88", "78.107.240.148", "78.82.157.212", "80.235.212.62", "84.215.10.74", "84.215.4.105", "84.215.8.184", "84.244.36.203", "84.52.158.183", "86.30.69.50", "87.152.18.128", "88.69.241.119", "89.45.186.200", "92.221.123.123", "92.234.41.184", "94.27.192.108", "94.61.16.125", "95.105.142.58", "95.22.80.4", "95.52.90.167", "104.157.124.160", "109.198.29.98", "109.206.144.194", "109.67.149.36", "119.6.178.16", "143.177.124.174", "162.118.7.169", "162.198.119.188", "176.106.160.193", "184.146.2.29", "184.71.194.234", "188.97.174.241", "202.131.84.11", "203.118.131.219", "217.198.130.81", "220.133.2.109", "222.77.7.0", "37.78.112.47", "42.3.123.47", "46.189.185.59", "47.253.32.11", "47.34.208.57", "66.231.154.77", "69.197.174.72", "70.19.84.129", "71.227.39.0", "72.69.130.232", "73.51.157.106", "75.100.41.233", "75.172.49.125", "76.128.231.98", "76.76.229.88", "78.107.240.148", "78.180.96.7", "79.104.211.73", "82.37.10.82", "84.215.10.38", "84.215.4.105", "86.103.60.87", "87.118.169.200", "89.116.184.19", "89.242.3.102", "92.55.57.183", "93.43.225.93", "94.19.237.176", "94.253.36.50", "95.105.142.58", "95.22.80.4", "95.31.212.141", "97.90.194.187", "mmx-th-2.mmx.network"]; const list = ["1.10.230.84", "104.157.124.160", "107.137.68.128", "108.12.226.21", "109.198.29.98", "110.164.184.5", "113.250.145.115", "113.53.52.229", "119.6.178.16", "135.131.174.76", "141.135.6.172", "143.177.124.174", "156.47.99.16", "162.118.7.169", "162.198.119.188", "163.58.65.191", "174.166.225.36", "176.77.44.137", "178.141.191.38", "178.34.121.69", "183.166.206.176", "184.146.2.29", "184.71.194.234", "188.97.167.199", "195.239.203.162", "203.129.18.0", "212.15.59.91", "217.168.252.30", "217.198.130.81", "42.3.123.47", "46.142.230.108", "46.142.230.236", "46.189.185.59", "47.253.32.11", "47.34.208.57", "49.231.43.170", "66.231.154.77", "69.197.174.72", "70.187.229.11", "70.19.84.129", "71.227.39.0", "73.225.44.243", "75.172.49.125", "76.128.231.98", "76.232.65.235", "78.107.240.148", "78.180.96.7", "79.104.211.73", "80.235.212.62", "82.37.10.82", "82.76.87.170", "84.215.4.105", "84.90.4.150", "86.103.60.176", "86.103.61.3", "86.30.69.50", "87.118.169.200", "89.242.3.102", "93.43.225.93", "94.19.237.176", "94.253.34.120", "94.27.155.9", "95.105.142.58", "95.22.80.4", "95.31.212.141", "mmx-th-1.mmx.network", "mmx-th-2.mmx.network"]; var out = list.filter(peer => ref.includes(peer)); out = out.filter(peer => !peer.includes("mmx.network")); const seed = ["69.197.174.72", "49.231.43.170", "110.164.184.5", "89.116.184.19"]; for(const peer of seed) { if(!out.includes(peer)) { out.push(peer); } } console.log(JSON.stringify(out, null, 4)); ================================================ FILE: scripts/genesis_setup.sh ================================================ #!/bin/bash set -e mkdir -p config/$1/chain/params ./build/tools/mmx_compile -n $1 -f src/contract/swap.js -t -o data/$1/tx_swap_binary.dat > config/$1/chain/params/swap_binary ./build/tools/mmx_compile -n $1 -f src/contract/offer.js -t -o data/$1/tx_offer_binary.dat > config/$1/chain/params/offer_binary ./build/tools/mmx_compile -n $1 -f src/contract/token.js -t -o data/$1/tx_token_binary.dat > config/$1/chain/params/token_binary ./build/tools/mmx_compile -n $1 -f src/contract/plot_nft.js -t -o data/$1/tx_plot_nft_binary.dat > config/$1/chain/params/plot_nft_binary ./build/tools/mmx_compile -n $1 -f src/contract/nft.js -t -o data/$1/tx_nft_binary.dat > config/$1/chain/params/nft_binary ./build/tools/mmx_compile -n $1 -f src/contract/template.js -t -o data/$1/tx_template_binary.dat > config/$1/chain/params/template_binary ./build/tools/mmx_compile -n $1 -f src/contract/escrow.js -t -o data/$1/tx_escrow_binary.dat > config/$1/chain/params/escrow_binary ./build/tools/mmx_compile -n $1 -f src/contract/time_lock.js -t -o data/$1/tx_time_lock_binary.dat > config/$1/chain/params/time_lock_binary ./build/tools/mmx_compile -n $1 -f src/contract/relay.js -t -o data/$1/tx_relay_binary.dat > config/$1/chain/params/relay_binary echo OK ================================================ FILE: scripts/kill_high_mem.sh ================================================ #!/bin/sh while true; do PID=$(pgrep $1) if [ ! -e $PID ]; then SIZE=$(ps -q $PID -o rss=) SIZEMB=$((SIZE/1024)) if [ $SIZEMB -gt $2 ]; then printf "Maximum memory of $2 MB exceeded: $SIZEMB MB\nTerminating process ..." kill $PID exit 0 fi fi sleep 1 done ================================================ FILE: scripts/move_storage.sh ================================================ #!/bin/bash if [[ -z "$1" ]]; then echo "Usage: move_storage.sh destination_path/" exit fi if pgrep -x "mmx_node" > /dev/null then echo "Please stop MMX node first." exit fi set -e source ./activate.sh CURR="${PWD}" mkdir -p "$1" cd "$1" DST="${PWD}/" cd "${CURR}" echo "SRC=${MMX_NETWORK}" echo "DST=${DST}" echo "Copying files ..." cp -rv "${MMX_NETWORK}" "${DST}" || exit echo "${DST}" > config/local/MMX_DATA echo "Deleting old files ..." rm -r "${MMX_NETWORK}" echo "Done" ================================================ FILE: scripts/reset_coverage.sh ================================================ #!/bin/bash find build/ -name "*.gcda" -delete ================================================ FILE: scripts/show_log_stats.sh ================================================ #!/bin/bash export LC_ALL=en_US.utf-8 cat $1 | grep "Verified VDF" | grep -oP "took [+-]?([0-9]*[.])?[0-9]+" > vdf_verify echo "VDF Average =" $(cat vdf_verify | awk '{ sum += $2 } END { print sum / NR }') sec echo "VDF Verify < 1 sec =" $(cat vdf_verify | awk '{ if ($2 <= 1) sum += 1 } END { print 100 * sum / NR }') % echo "VDF Verify > 1 sec =" $(cat vdf_verify | awk '{ if ($2 > 1) sum += 1 } END { print 100 * sum / NR }') % echo "VDF Verify > 2 sec =" $(cat vdf_verify | awk '{ if ($2 > 2) sum += 1 } END { print 100 * sum / NR }') % echo "VDF Verify > 3 sec =" $(cat vdf_verify | awk '{ if ($2 > 3) sum += 1 } END { print 100 * sum / NR }') % echo "VDF Verify > 5 sec =" $(cat vdf_verify | awk '{ if ($2 > 5) sum += 1 } END { print 100 * sum / NR }') % echo "VDF Verify > 8 sec =" $(cat vdf_verify | awk '{ if ($2 > 8) sum += 1 } END { print 100 * sum / NR }') % cat $1 | grep -v 16384 | grep -oP "delay [+-]?([0-9]*[.])?[0-9]+" > block_delay echo "Block Delay > 2 sec =" $(cat block_delay | awk '{ if ($2 > 2) sum += 1 } END { print 100 * sum / NR }') % echo "Block Delay > 3 sec =" $(cat block_delay | awk '{ if ($2 > 3) sum += 1 } END { print 100 * sum / NR }') % echo "Block Delay > 5 sec =" $(cat block_delay | awk '{ if ($2 > 5) sum += 1 } END { print 100 * sum / NR }') % echo "Block Delay > 6 sec =" $(cat block_delay | awk '{ if ($2 > 6) sum += 1 } END { print 100 * sum / NR }') % echo "Block Delay > 7 sec =" $(cat block_delay | awk '{ if ($2 > 7) sum += 1 } END { print 100 * sum / NR }') % echo "Block Delay > 8 sec =" $(cat block_delay | awk '{ if ($2 > 8) sum += 1 } END { print 100 * sum / NR }') % cat $1 | grep -oP "height [0-9]+ with score [0-9]+, forked at [0-9]+" > forked_at echo "Fork Depth 1 =" $(cat forked_at | awk '{ if ($2 - $8 == 1) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 2 =" $(cat forked_at | awk '{ if ($2 - $8 == 2) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 3 =" $(cat forked_at | awk '{ if ($2 - $8 == 3) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 4 =" $(cat forked_at | awk '{ if ($2 - $8 == 4) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 5 =" $(cat forked_at | awk '{ if ($2 - $8 == 5) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 6 =" $(cat forked_at | awk '{ if ($2 - $8 == 6) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 7 =" $(cat forked_at | awk '{ if ($2 - $8 == 7) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth 8 =" $(cat forked_at | awk '{ if ($2 - $8 == 8) sum += 1 } END { print 100 * sum / NR }') % echo "Fork Depth >8 =" $(cat forked_at | awk '{ if ($2 - $8 > 8) sum += 1 } END { print 100 * sum / NR }') % "(contains false positives from restarting node)" rm forked_at rm vdf_verify rm block_delay ================================================ FILE: scripts/stats/max_space_fork_len.sh ================================================ #!/bin/bash set -e MAX_FORK_LEN=0 HEIGHT=$(mmx node get header | jq .height) for((i = 0; i <= HEIGHT; i++)); do FORK_LEN=$(mmx node get header $i | jq .space_fork_len) if [ $FORK_LEN -gt $MAX_FORK_LEN ]; then MAX_FORK_LEN=$FORK_LEN fi echo "Block $i: $FORK_LEN" done echo "Max space fork length: $MAX_FORK_LEN" ================================================ FILE: scripts/win/activate.cmd ================================================ @ECHO OFF SET "MMX_ENV=%~dp0" SET "MMX_ENV=%MMX_ENV:~0,-1%" SET "PATH=%PATH%;%MMX_ENV%" IF "%MMX_HOME%"=="" ( SET "MMX_HOME=%USERPROFILE%\.mmx" ) SET "MMX_HOME=%MMX_HOME%\" IF "%MMX_DATA%"=="" ( SET "MMX_DATA=%MMX_HOME%" ) SET "NETWORK=mainnet" SET "MMX_NETWORK=%MMX_DATA%%NETWORK%\" ECHO NETWORK=%NETWORK% ECHO MMX_HOME=%MMX_HOME% IF NOT "%MMX_DATA%"=="%MMX_HOME%" ( ECHO MMX_DATA=%MMX_DATA% ) MKDIR "%MMX_HOME%config\local" ROBOCOPY "config\local_init\\" "%MMX_HOME%config\local\\" /NFL /NDL /NJH /NJS /E /XC /XN /XO IF NOT EXIST "%MMX_HOME%PASSWD" ( generate_passwd > "%MMX_HOME%PASSWD" SET /P PASSWD=<"%MMX_HOME%PASSWD" CALL ECHO PASSWD=%%PASSWD%% CALL vnxpasswd -c config\default\ "%MMX_HOME%config\local\\" -u mmx-admin -p %%PASSWD%% ) ================================================ FILE: scripts/win/mmx_cmd.cmd ================================================ @ECHO OFF CALL .\activate.cmd setlocal set PROMPT=[MMX] $P$G start "MMX Environment" cmd.exe /K "mmx_help.cmd" :EXIT endlocal ================================================ FILE: scripts/win/mmx_help.cmd ================================================ @ECHO OFF ECHO mmx wallet create [-f filename] ECHO TODO small help ================================================ FILE: scripts/win/run_farmer.cmd ================================================ @ECHO OFF TITLE MMX Farmer Run Script CALL .\activate.cmd mmx_farmer -c config\%NETWORK%\ config\farmer\ "%MMX_HOME%config\local\\" %* ================================================ FILE: scripts/win/run_harvester.cmd ================================================ @ECHO OFF TITLE MMX Harvester Run Script CALL .\activate.cmd mmx_harvester -c config\%NETWORK%\ config\farmer\ "%MMX_HOME%config\local\\" %* ================================================ FILE: scripts/win/run_node.cmd ================================================ @ECHO OFF TITLE MMX Node Run Script CALL .\activate.cmd mmx_node -c config\%NETWORK%\ config\node\ "%MMX_HOME%config\local\\" %* IF "%~1"=="--PauseOnExit" PAUSE ================================================ FILE: scripts/win/run_timelord.cmd ================================================ @ECHO OFF TITLE MMX Timelord Run Script CALL activate.cmd mmx_timelord -c config\%NETWORK%\ config\timelord\ "%MMX_HOME%config\local\\" %* ================================================ FILE: scripts/win/run_wallet.cmd ================================================ @ECHO OFF TITLE MMX Wallet Run Script CALL .\activate.cmd mmx_wallet -c config\%NETWORK%\ config\wallet\ "%MMX_HOME%config\local\\" %* ================================================ FILE: src/Block.cpp ================================================ /* * Block.cpp * * Created on: Nov 27, 2021 * Author: mad */ #include #include #include #include #include #include namespace mmx { vnx::bool_t Block::is_valid() const { uint64_t static_cost_sum = 0; uint64_t total_cost_sum = 0; uint64_t tx_fees_sum = 0; for(const auto& tx : tx_list) { if(!tx || tx->content_hash != tx->calc_hash(true)) { return false; } if(const auto& res = tx->exec_result) { total_cost_sum += res->total_cost; tx_fees_sum += res->total_fee; } else if(height) { return false; } static_cost_sum += tx->static_cost; } return BlockHeader::is_valid() && static_cost == static_cost_sum && total_cost == total_cost_sum && tx_fees == tx_fees_sum && tx_count == tx_list.size() && tx_hash == calc_tx_hash(); } hash_t Block::calc_tx_hash() const { std::vector tmp; for(const auto& tx : tx_list) { tmp.push_back(tx->content_hash); } return calc_btree_hash(tmp); } void Block::finalize() { static_cost = 0; total_cost = 0; tx_fees = 0; for(const auto& tx : tx_list) { if(const auto& res = tx->exec_result) { total_cost += res->total_cost; tx_fees += res->total_fee; } static_cost += tx->static_cost; } tx_count = tx_list.size(); tx_hash = calc_tx_hash(); hash = calc_hash(); } std::shared_ptr Block::get_header() const { auto header = BlockHeader::create(); header->operator=(*this); return header; } std::vector> Block::get_transactions() const { return tx_list; } std::vector Block::get_inputs(std::shared_ptr params) const { std::vector res; for(const auto& tx : tx_list) { if(tx->exec_result && tx->sender) { txio_t in; in.address = *tx->sender; in.amount = tx->exec_result->total_fee; res.push_back(txio_entry_t::create_ex(tx->id, height, time_stamp, tx_type_e::TXFEE, in)); } if(!tx->exec_result || !tx->exec_result->did_fail) { for(const auto& in : tx->get_inputs()) { res.push_back(txio_entry_t::create_ex(tx->id, height, time_stamp, tx_type_e::SPEND, in)); } } } return res; } std::vector Block::get_outputs(std::shared_ptr params) const { std::vector res; if(vdf_reward_payout) { txio_t out; out.address = *vdf_reward_payout; out.amount = params->vdf_reward; res.push_back(txio_entry_t::create_ex(hash, height, time_stamp, tx_type_e::VDF_REWARD, out)); } if(reward_addr && reward_amount) { txio_t out; out.address = *reward_addr; out.amount = reward_amount; res.push_back(txio_entry_t::create_ex(hash, height, time_stamp, tx_type_e::REWARD, out)); } { txio_t out; out.address = project_addr; out.amount = calc_project_reward(params, tx_fees); if(out.amount) { res.push_back(txio_entry_t::create_ex(hash, height, time_stamp, tx_type_e::PROJECT_REWARD, out)); } } for(const auto& tx : tx_list) { if(!tx->exec_result || !tx->exec_result->did_fail) { for(const auto& out : tx->get_outputs()) { res.push_back(txio_entry_t::create_ex(tx->id, height, time_stamp, tx_type_e::RECEIVE, out)); } } } return res; } } // mmx ================================================ FILE: src/BlockHeader.cpp ================================================ /* * BlockHeader.cpp * * Created on: Nov 30, 2021 * Author: mad */ #include #include #include namespace mmx { vnx::bool_t BlockHeader::is_valid() const { if(height) { if(proof.empty() || !farmer_sig || vdf_count < 1) { return false; } } for(auto p : proof) { if(!p || !p->is_valid()) { return false; } } return version == 0 && (!reward_amount || reward_addr) && vdf_count == vdf_reward_addr.size() && hash == calc_hash() && content_hash == calc_content_hash(); } hash_t BlockHeader::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(64 * 1024); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "support_flags", support_flags); write_field(out, "prev", prev); write_field(out, "height", height); write_field(out, "vdf_height", vdf_height); write_field(out, "nonce", nonce); write_field(out, "time_stamp", time_stamp); write_field(out, "time_diff", time_diff); write_field(out, "space_diff", space_diff); write_field(out, "weight", weight); write_field(out, "total_weight", total_weight); write_field(out, "vdf_count", vdf_count); write_field(out, "vdf_iters", vdf_iters); write_field(out, "vdf_output", vdf_output); write_field(out, "vdf_reward_addr", vdf_reward_addr); write_field(out, "vdf_reward_payout", vdf_reward_payout); { std::vector list; for(auto p : proof) { list.push_back(p->calc_hash()); } write_field(out, "proof", list); } write_field(out, "proof_hash", proof_hash); write_field(out, "challenge", challenge); write_field(out, "is_space_fork", is_space_fork); write_field(out, "space_fork_len", space_fork_len); write_field(out, "space_fork_proofs", space_fork_proofs); write_field(out, "reward_amount", reward_amount); write_field(out, "reward_addr", reward_addr); write_field(out, "reward_contract", reward_contract); write_field(out, "reward_account", reward_account); write_field(out, "reward_vote", reward_vote); write_field(out, "reward_vote_sum", reward_vote_sum); write_field(out, "reward_vote_count", reward_vote_count); write_field(out, "base_reward", base_reward); write_field(out, "project_addr", project_addr); write_field(out, "static_cost", static_cost); write_field(out, "total_cost", total_cost); write_field(out, "tx_count", tx_count); write_field(out, "tx_fees", tx_fees); write_field(out, "txfee_buffer", txfee_buffer); write_field(out, "tx_hash", tx_hash); out.flush(); return hash_t(buffer); } hash_t BlockHeader::calc_content_hash() const { if(farmer_sig) { return hash_t(hash + (*farmer_sig)); } return hash_t(hash.bytes); } void BlockHeader::validate() const { if(!farmer_sig) { throw std::logic_error("missing farmer signature"); } if(!farmer_sig->verify(get_farmer_key(), hash)) { throw std::logic_error("invalid farmer signature"); } } std::shared_ptr BlockHeader::get_header() const { return vnx::clone(*this); } pubkey_t BlockHeader::get_farmer_key() const { if(proof.empty()) { throw std::logic_error("block has no proof"); } return proof[0]->farmer_key; } block_index_t BlockHeader::get_block_index(const int64_t& file_offset) const { block_index_t index; index.hash = hash; index.content_hash = content_hash; index.static_cost = static_cost; index.total_cost = total_cost; index.file_offset = file_offset; return index; } void BlockHeader::set_space_diff(std::shared_ptr params, std::shared_ptr prev) { const auto proof_count = proof.size(); if(is_space_fork) { space_diff = calc_new_space_diff(params, prev); space_fork_len = vdf_count; space_fork_proofs = proof_count; } else { space_diff = prev->space_diff; space_fork_len = prev->space_fork_len + vdf_count; space_fork_proofs = prev->space_fork_proofs + proof_count; } } void BlockHeader::set_base_reward(std::shared_ptr params, std::shared_ptr prev) { if(height % params->reward_adjust_interval == 0) { base_reward = calc_new_base_reward(params, prev); reward_vote_sum = reward_vote; reward_vote_count = (reward_vote ? 1 : 0); } else { base_reward = prev->base_reward; reward_vote_sum = prev->reward_vote_sum + reward_vote; reward_vote_count = prev->reward_vote_count + (reward_vote ? 1 : 0); } } } // mmx ================================================ FILE: src/ChainParams.cpp ================================================ /* * ChainParams.cpp * * Created on: Sep 28, 2024 * Author: mad */ #include namespace mmx { vnx::float64_t ChainParams::get_block_time() const { return block_interval_ms * 1e-3; } } // mmx ================================================ FILE: src/Contract.cpp ================================================ /* * Contract.cpp * * Created on: Nov 27, 2021 * Author: mad */ #include #include namespace mmx { vnx::bool_t Contract::is_valid() const { return version == 0; } hash_t Contract::calc_hash(const vnx::bool_t& full_hash) const { throw std::logic_error("not implemented"); } uint64_t Contract::num_bytes() const { return 16; } uint64_t Contract::calc_cost(std::shared_ptr params) const { return num_bytes() * params->min_txfee_byte; } vnx::optional Contract::get_owner() const { return nullptr; } void Contract::validate(std::shared_ptr solution, const hash_t& txid) const { throw std::logic_error("invalid operation"); } vnx::Variant Contract::read_field(const std::string& name) const { if(name == "__type") { return vnx::Variant(get_type_name()); } return get_field(name); } } // mmx ================================================ FILE: src/DataBase.cpp ================================================ /* * DataBase.cpp * * Created on: Jun 7, 2022 * Author: mad */ #include #include #include namespace mmx { template std::string to_number(const T& value, const size_t n_zero) { const auto tmp = std::to_string(value); return std::string(n_zero - std::min(n_zero, tmp.length()), '0') + tmp; } uint32_t calc_checksum_32(uint32_t version, std::shared_ptr key, std::shared_ptr value) { vnx::CRC64 crc; crc.update(version); crc.update((const char*)key->data, key->size); crc.update((const char*)value->data, value->size); return uint32_t(crc.get()); } void read_key(vnx::TypeInput& in, uint32_t& version, std::shared_ptr& key) { vnx::read(in, version); uint32_t size = 0; vnx::read(in, size); key = std::make_shared(size); in.read(key->data, key->size); } void read_key_at(const vnx::File& file, const int64_t offset, uint32_t& version, std::shared_ptr& key) { vnx::FileSectionInputStream stream(file.get_handle(), offset, -1, 256); vnx::TypeInput in(&stream); read_key(in, version, key); } void read_value(vnx::TypeInput& in, std::shared_ptr& value) { uint32_t size = 0; vnx::read(in, size); value = std::make_shared(size); in.read(value->data, value->size); } void read_value_at(const vnx::File& file, const int64_t offset, std::shared_ptr key, std::shared_ptr& value) { vnx::FileSectionInputStream stream(file.get_handle(), offset + 8 + key->size, -1, 1024); vnx::TypeInput in(&stream); read_value(in, value); } void read_entry(vnx::TypeInput& in, uint32_t& version, std::shared_ptr& key, std::shared_ptr& value) { read_key(in, version, key); read_value(in, value); } void read_entry_sum(vnx::TypeInput& in, uint32_t& version, std::shared_ptr& key, std::shared_ptr& value) { read_entry(in, version, key, value); uint32_t sum = 0; vnx::read(in, sum); if(sum != calc_checksum_32(version, key, value)) { throw std::runtime_error("read_entry(): checksum fail (version = " + std::to_string(version) + ", key = " + std::to_string(key->size) + ", value = " + std::to_string(value->size) + ")"); } } void read_entry_at(const vnx::File& file, const int64_t offset, uint32_t& version, std::shared_ptr& key, std::shared_ptr& value) { vnx::FileSectionInputStream stream(file.get_handle(), offset, -1, 1024); vnx::TypeInput in(&stream); read_key(in, version, key); read_value(in, value); } void write_entry(vnx::TypeOutput& out, uint32_t version, std::shared_ptr key, std::shared_ptr value) { vnx::write(out, version); vnx::write(out, key->size); out.write(key->data, key->size); vnx::write(out, value->size); out.write(value->data, value->size); } void write_entry_sum(vnx::TypeOutput& out, uint32_t version, std::shared_ptr key, std::shared_ptr value) { write_entry(out, version, key, value); vnx::write(out, calc_checksum_32(version, key, value)); } const std::function Table::default_comparator = [](const db_val_t& lhs, const db_val_t& rhs) -> int { if(lhs.size == rhs.size) { return ::memcmp(lhs.data, rhs.data, lhs.size); } return lhs.size < rhs.size ? -1 : 1; }; const Table::options_t Table::default_options; Table::Table(const std::string& root_path, const options_t& options) : options(options), root_path(root_path), mem_index(key_compare_t(this)), mem_block(mem_compare_t(this)) { const auto time_begin = get_time_ms(); vnx::Directory root(root_path); root.create(); debug_log.open(root_path + "/debug.log", std::ios_base::app); std::map block_map; for(const auto& file : root.files()) { if(file->get_extension() == ".tmp") { const auto name = file->get_name(false); const vnx::File new_file(root_path + '/' + name); if(!new_file.exists() && new_file.get_extension() == ".dat") { debug_log << "Renamed " << name << ".tmp to " << name << std::endl; file->rename(new_file.get_path()); } } if(file->get_extension() == ".dat") { vnx::Variant name; vnx::from_string_value(file->get_name(false), name); if(name.is_ulong()) { const auto index = name.to(); block_map[index] = file->get_name(); next_block_id = std::max(next_block_id, index + 1); } } } { std::vector> block_list; for(const auto& entry : block_map) { const auto block = read_block(entry.second); block_list.push_back(block); debug_log << "Loaded " << block->name << " at level " << block->level << " with " << block->index.size() << " / " << block->total_count << " entries, min_version = " << block->min_version << ", max_version = " << block->max_version << std::endl; } std::sort(block_list.begin(), block_list.end(), [](const std::shared_ptr& lhs, const std::shared_ptr& rhs) -> bool { if(lhs->min_version == rhs->min_version) { return lhs->level > rhs->level; } return lhs->min_version < rhs->min_version; }); std::shared_ptr prev; for(const auto& block : block_list) { if(!prev || block->min_version > prev->max_version) { curr_version = block->max_version + 1; blocks.push_back(block); } else { block->file.remove(); debug_log << "Deleted " << block->name << std::endl; } prev = block; } } last_flush = curr_version; write_log.open(root_path + "/write_log.dat", "ab"); write_log.open("rb+"); write_log.lock_exclusive(); { auto& in = write_log.in; auto offset = in.get_input_pos(); bool first_commit = true; const auto min_version = curr_version; std::multimap, std::shared_ptr>> entries; while(true) { try { uint32_t version; std::shared_ptr key; std::shared_ptr value; read_entry_sum(write_log.in, version, key, value); if(version == uint32_t(-1)) { const auto cmd = key->to_string(); if(cmd == "commit" || cmd == "reset") { curr_version = value->to(); if(first_commit) { last_flush = curr_version; first_commit = false; } } else if(cmd == "revert") { const auto height = value->to(); curr_version = height; entries.erase(entries.lower_bound(height), entries.end()); } } else if(version >= min_version) { entries.emplace(version, std::make_pair(key, value)); } offset = in.get_input_pos(); } catch(const std::underflow_error& ex) { break; } catch(const std::exception& ex) { debug_log << "Reading from write_log.dat failed with: " << ex.what() << std::endl; } } write_log.seek_to(offset); for(const auto& entry : entries) { insert_entry(entry.first, entry.second.first, entry.second.second); } debug_log << "Loaded " << mem_index.size() << " / " << mem_block.size() << " entries from write_log.dat" << std::endl; } debug_log << "Loaded table at version " << curr_version << ", took " << (get_time_ms() - time_begin) / 1e3 << " sec" << std::endl; revert(curr_version); check_rewrite(); } std::shared_ptr Table::read_block(const std::string& name) const { // TODO: handle unexpected read errors here auto block = std::make_shared(); block->name = name; block->file.open(root_path + '/' + name, "rb"); block->file.lock_exclusive(); auto& in = block->file.in; uint16_t format = 0; vnx::read(in, format); if(format > 0) { throw std::runtime_error("invalid block format: " + std::to_string(format)); } vnx::read(in, block->level); vnx::read(in, block->min_version); vnx::read(in, block->max_version); vnx::read(in, block->total_count); vnx::read(in, block->index_offset); block->file.seek_to(block->index_offset); uint64_t index_size = 0; vnx::read(in, index_size); block->index.resize(index_size); in.read(block->index.data(), block->index.size() * 8); return block; } void Table::insert(std::shared_ptr key, std::shared_ptr value) { if(!key || !value) { throw std::logic_error("!key || !value"); } std::lock_guard lock(mutex); if(write_lock) { throw std::logic_error("table is write locked"); } write_entry_sum(write_log.out, curr_version, key, value); insert_entry(curr_version, key, value); } void Table::insert_entry(uint32_t version, std::shared_ptr key, std::shared_ptr value) { auto& entry = mem_block[std::make_pair(key, version)]; if(entry) { mem_block_size -= key->size + entry->size; } entry = value; mem_index[key] = std::make_pair(value, version); mem_block_size += key->size + value->size; } std::shared_ptr Table::find(std::shared_ptr key, const uint32_t max_version) const { if(!key) { return nullptr; } { auto iter = mem_index.find(key); if(iter != mem_index.end()) { if(iter->second.second <= max_version) { return iter->second.first; } else { auto iter = mem_block.lower_bound(std::make_pair(key, max_version)); while(iter != mem_block.end() && *iter->first.first == *key) { if(iter->first.second <= max_version) { return iter->second; } else if(iter != mem_block.begin()) { iter--; } else { break; } } } } } for(auto iter = blocks.rbegin(); iter != blocks.rend(); ++iter) { const auto& block = *iter; if(block->min_version <= max_version) { if(auto value = find(block, key, max_version)) { return value; } } } return nullptr; } std::shared_ptr Table::find(std::shared_ptr block, std::shared_ptr key, const uint32_t max_version) const { auto res = key; bool is_match = false; uint32_t version = -1; const auto pos = lower_bound(block, version, res, is_match); std::shared_ptr value; if(is_match) { const auto offset = block->index[pos] + 8 + key->size; if(offset > block->index_offset) { throw std::logic_error("offset > index_offset"); } vnx::FileSectionInputStream stream(block->file.get_handle(), offset, block->index_offset - offset, 1024); vnx::TypeInput in(&stream); read_value(in, value); while(version > max_version) { try { std::shared_ptr key_; read_entry(in, version, key_, value); if(*key_ != *key) { value = nullptr; break; } } catch(const std::underflow_error& ex) { value = nullptr; break; } } } return value; } size_t Table::lower_bound(std::shared_ptr block, uint32_t& version, std::shared_ptr& key, bool& is_match) const { if(!key) { throw std::logic_error("!key"); } const auto end = block->index.size(); // find match or successor size_t L = 0; size_t R = end; while(L < R) { const auto pos = (L + R) / 2; uint32_t version; std::shared_ptr key_i; read_key_at(block->file, block->index[pos], version, key_i); if(options.comparator(*key, *key_i) < 0) { R = pos; } else { L = pos + 1; } } if(R > 0) { std::shared_ptr key_i; read_key_at(block->file, block->index[R - 1], version, key_i); if(*key == *key_i) { is_match = true; return R - 1; } } if(R < end) { read_key_at(block->file, block->index[R], version, key); } else { version = -1; key = nullptr; } is_match = false; return R; } bool Table::commit(const uint32_t new_version, const bool auto_flush) { if(new_version == uint32_t(-1)) { throw std::logic_error("invalid version"); } if(new_version <= curr_version) { throw std::logic_error("commit(): new version <= current version"); } { const std::string cmd = "commit"; write_entry_sum(write_log.out, -1, std::make_shared(cmd.c_str(), cmd.size()), std::make_shared(&new_version, sizeof(new_version))); } write_log.flush(); curr_version = new_version; const bool flag = do_flush(); if(flag && auto_flush) { flush(); return false; } return flag; } bool Table::do_flush() const { const bool normal_flush = (mem_block_size + mem_block.size() * entry_overhead >= options.max_block_size); const bool force_flush = (curr_version > last_flush && curr_version - last_flush >= options.force_flush_threshold); return normal_flush || force_flush; } void Table::revert(const uint32_t new_version) { std::lock_guard lock(mutex); if(write_lock) { throw std::logic_error("table is write locked"); } if(new_version > curr_version) { throw std::logic_error("revert(): new version > current version"); } { const std::string cmd = "revert"; write_entry_sum(write_log.out, -1, std::make_shared(cmd.c_str(), cmd.size()), std::make_shared(&new_version, sizeof(new_version))); } write_log.flush(); std::set deleted_blocks; for(auto iter = blocks.begin(); iter != blocks.end();) { auto& block = *iter; if(block->min_version >= new_version) { block->file.remove(); debug_log << "Deleted " << block->name << std::endl; iter = blocks.erase(iter); continue; } if(block->max_version >= new_version) { const auto time_begin = get_time_ms(); auto new_block = create_block(block->level, block->name + ".tmp"); new_block->min_version = block->min_version; auto& src = block->file; auto& dst = new_block->file; auto& in = src.in; auto& out = dst.out; src.seek_to(block_header_size); dst.seek_to(block_header_size); std::shared_ptr prev; for(uint64_t i = 0; i < block->total_count; ++i) { uint32_t version; std::shared_ptr key; std::shared_ptr value; read_entry(in, version, key, value); if(version < new_version) { if(!prev || *key != *prev) { new_block->index.push_back(out.get_output_pos()); } new_block->max_version = std::max(version, new_block->max_version); new_block->total_count++; write_entry(out, version, key, value); prev = key; } } new_block->index_offset = out.get_output_pos(); finish_block(new_block); block->file.close(); rename(new_block, block->name); debug_log << "Rewrote " << block->name << " with max_version = " << new_block->max_version << ", " << new_block->index.size() << " / " << new_block->total_count << " entries" << ", from " << block->index.size() << " / " << block->total_count << " entries" << ", took " << (get_time_ms() - time_begin) / 1e3 << " sec" << std::endl; block = new_block; } iter++; } for(auto iter = mem_block.begin(); iter != mem_block.end();) { const auto& key = iter->first; if(key.second >= new_version) { mem_block_size -= key.first->size + iter->second->size; iter = mem_block.erase(iter); } else { iter++; } } for(auto iter = mem_index.begin(); iter != mem_index.end();) { const auto& key = iter->first; if(iter->second.second >= new_version) { const auto found = mem_block.lower_bound(std::make_pair(key, -1)); if(found != mem_block.end() && *found->first.first == *key) { iter->second = std::make_pair(found->second, found->first.second); iter++; } else { iter = mem_index.erase(iter); } } else { iter++; } } curr_version = new_version; last_flush = std::min(last_flush, new_version); } void Table::flush() { std::lock_guard lock(mutex); if(write_lock) { throw std::logic_error("table is write locked"); } last_flush = curr_version; if(mem_block.empty()) { write_log.open("wb"); write_log.lock_exclusive(); { const std::string cmd = "reset"; write_entry_sum(write_log.out, -1, std::make_shared(cmd.c_str(), cmd.size()), std::make_shared(&curr_version, sizeof(curr_version))); } debug_log << "Force flushed at version " << curr_version << std::endl; return; } const auto time_begin = get_time_ms(); auto block = create_block(0, "flush.tmp"); block->index.reserve(mem_index.size()); auto& out = block->file.out; block->file.seek_to(block_header_size); std::shared_ptr prev; for(const auto& entry : mem_block) { const auto& version = entry.first.second; const auto& key = entry.first.first; if(!prev || *key != *prev) { block->index.push_back(out.get_output_pos()); } block->total_count++; block->min_version = std::min(version, block->min_version); block->max_version = std::max(version, block->max_version); write_entry(out, version, key, entry.second); prev = key; } block->index_offset = out.get_output_pos(); finish_block(block); rename(block, next_block_id++); mem_index.clear(); mem_block.clear(); blocks.push_back(block); mem_block_size = 0; // clear log after writing block write_log.open("wb"); write_log.lock_exclusive(); debug_log << "Flushed " << block->name << " with " << block->index.size() << " / " << block->total_count << " entries, min_version = " << block->min_version << ", max_version = " << block->max_version << ", took " << (get_time_ms() - time_begin) / 1e3 << " sec" << std::endl; check_rewrite(); } std::shared_ptr Table::rewrite(std::list> blocks, const uint32_t level) const { if(blocks.empty()) { throw std::logic_error("no blocks given"); } size_t total_index_entries = 0; for(const auto& block : blocks) { if(block->level + 1 != level) { throw std::logic_error("level mismatch"); } total_index_entries += block->index.size(); } struct pointer_t { uint64_t offset = 0; std::shared_ptr block; std::shared_ptr value; }; std::map, uint32_t>, pointer_t, mem_compare_t> block_map(mem_compare_t(this)); for(const auto& block : blocks) { if(!block->total_count) { continue; } block->file.seek_to(block_header_size); pointer_t entry; entry.block = block; uint32_t version; std::shared_ptr key; read_entry(block->file.in, version, key, entry.value); block_map[std::make_pair(key, version)] = entry; } auto block = create_block(level, "rewrite.tmp"); block->index.reserve(total_index_entries); auto& out = block->file.out; block->file.seek_to(block_header_size); std::shared_ptr prev; while(!block_map.empty()) { const auto iter = block_map.begin(); const auto& key = iter->first.first; const auto& version = iter->first.second; if(!prev || *key != *prev) { block->index.push_back(out.get_output_pos()); } block->total_count++; block->min_version = std::min(version, block->min_version); block->max_version = std::max(version, block->max_version); write_entry(out, version, key, iter->second.value); prev = key; auto entry = iter->second; if(++entry.offset < entry.block->total_count) { uint32_t version; std::shared_ptr key; read_entry(entry.block->file.in, version, key, entry.value); block_map[std::make_pair(key, version)] = entry; } block_map.erase(iter); } block->index_offset = out.get_output_pos(); finish_block(block); return block; } void Table::check_rewrite() { if(options.level_factor <= 1) { return; } uint32_t level = 0; auto iter_begin = blocks.begin(); auto iter_end = iter_begin; std::list> selected; for(auto iter = blocks.begin(); iter != blocks.end(); ++iter) { const auto& block = *iter; if(selected.empty() || block->level == level) { selected.push_back(block); if(selected.size() > options.level_factor) { iter_end = iter; break; } } else { selected.clear(); selected.push_back(block); iter_begin = iter; } level = block->level; } if(selected.size() <= options.level_factor) { return; } selected.pop_back(); const auto time_begin = get_time_ms(); const auto block = rewrite(selected, level + 1); rename(block, next_block_id++); debug_log << "Wrote " << block->name << " at level " << block->level << " with " << block->index.size() << " / " << block->total_count << " entries, min_version = " << block->min_version << ", max_version = " << block->max_version << ", took " << (get_time_ms() - time_begin) / 1e3 << " sec" << std::endl; for(const auto& block : selected) { block->file.remove(); debug_log << "Deleted " << block->name << std::endl; } blocks.insert(iter_begin, block); blocks.erase(iter_begin, iter_end); check_rewrite(); } void Table::write_block_header(vnx::TypeOutput& out, std::shared_ptr block) const { vnx::write(out, uint16_t(0)); vnx::write(out, block->level); vnx::write(out, block->min_version); vnx::write(out, block->max_version); vnx::write(out, block->total_count); vnx::write(out, block->index_offset); } void Table::write_block_index(vnx::TypeOutput& out, std::shared_ptr block) const { vnx::write(out, uint64_t(block->index.size())); out.write(block->index.data(), block->index.size() * 8); } std::shared_ptr Table::create_block(const uint32_t level, const std::string& name) const { auto block = std::make_shared(); block->level = level; block->name = name; block->file.open(root_path + '/' + block->name, "wb"); block->min_version = -1; return block; } void Table::finish_block(std::shared_ptr block) const { auto& file = block->file; file.seek_begin(); write_block_header(file.out, block); file.seek_to(block->index_offset); write_block_index(file.out, block); file.close(); } void Table::rename(std::shared_ptr block, const uint64_t new_index) const { rename(block, to_number(new_index, 6) + ".dat"); } void Table::rename(std::shared_ptr block, const std::string& new_name) const { block->name = new_name; block->file.rename(root_path + '/' + block->name); block->file.open("rb"); block->file.lock_exclusive(); } Table::Iterator::Iterator(const Table* table) : table(table), block_map(compare_t(this)) { std::lock_guard lock(table->mutex); table->write_lock++; } Table::Iterator::Iterator(std::shared_ptr table) : Iterator(table.get()) { p_table = table; } Table::Iterator::~Iterator() { std::lock_guard lock(table->mutex); table->write_lock--; } bool Table::Iterator::compare_t::operator()( const std::pair, uint32_t>& lhs, const std::pair, uint32_t>& rhs) const { if(!iter->direction) { throw std::logic_error("!direction"); } const auto res = iter->table->options.comparator(*lhs.first, *rhs.first); if(res == 0) { return lhs.second > rhs.second; } return iter->direction > 0 ? res < 0 : res > 0; } bool Table::Iterator::is_valid() const { return !block_map.empty() && direction; } std::map, uint32_t>, Table::Iterator::pointer_t, Table::key_compare_t>::const_iterator Table::Iterator::current() const { if(!is_valid()) { throw std::logic_error("iterator not valid"); } return block_map.begin(); } uint32_t Table::Iterator::version() const { return current()->first.second; } std::shared_ptr Table::Iterator::key() const { return current()->first.first; } std::shared_ptr Table::Iterator::value() const { return current()->second.value; } void Table::Iterator::prev() { if(!is_valid()) { throw std::logic_error("iterator not valid"); } if(direction < 0) { auto iter = block_map.begin(); const auto prev = iter->first.first; // iterate until next key while(iter != block_map.end() && *iter->first.first == *prev) { const auto& entry = iter->second; if(const auto& block = entry.block) { if(entry.pos > 0) { const auto pos = entry.pos - 1; pointer_t next; next.block = block; next.pos = pos; uint32_t version; std::shared_ptr key; read_entry_at(entry.block->file, block->index[pos], version, key, next.value); block_map[std::make_pair(key, version)] = next; } } else { if(entry.iter != table->mem_index.begin()) { auto iter = entry.iter; iter--; pointer_t next; next.iter = iter; next.value = iter->second.first; block_map[std::make_pair(iter->first, iter->second.second)] = next; } } iter = block_map.erase(iter); } } else { seek_prev(key()); } } void Table::Iterator::next() { if(!is_valid()) { throw std::logic_error("iterator not valid"); } if(direction > 0) { auto iter = block_map.begin(); const auto prev = iter->first.first; // iterate until next key while(iter != block_map.end() && *iter->first.first == *prev) { const auto& entry = iter->second; if(const auto& block = entry.block) { const auto pos = entry.pos + 1; if(pos < block->index.size()) { pointer_t next; next.block = block; next.pos = pos; uint32_t version; std::shared_ptr key; read_entry_at(entry.block->file, block->index[pos], version, key, next.value); block_map[std::make_pair(key, version)] = next; } } else { auto iter = entry.iter; iter++; if(iter != table->mem_index.end()) { pointer_t next; next.iter = iter; next.value = iter->second.first; block_map[std::make_pair(iter->first, iter->second.second)] = next; } } iter = block_map.erase(iter); } } else { seek_next(key()); } } void Table::Iterator::seek_begin() { seek(nullptr, 0); } void Table::Iterator::seek_last() { seek(nullptr, -1); } void Table::Iterator::seek(std::shared_ptr key) { seek(key, 0); } void Table::Iterator::seek(std::shared_ptr key, const int mode) { seek(table->blocks, key, mode); const auto& mem_index = table->mem_index; if(!mem_index.empty()) { auto iter = mem_index.begin(); if(key) { iter = mem_index.lower_bound(key); } else if(mode < 0) { iter = mem_index.end(); } if(mode < 0) { if(iter != mem_index.begin()) { iter--; } else { iter = mem_index.end(); } } else if(mode > 0) { if(iter != mem_index.end()) { iter++; } } if(iter != mem_index.end()) { pointer_t entry; entry.iter = iter; entry.value = iter->second.first; block_map[std::make_pair(iter->first, iter->second.second)] = entry; } } } void Table::Iterator::seek(const std::list>& blocks, std::shared_ptr key, const int mode) { block_map.clear(); direction = mode >= 0 ? 1 : -1; for(const auto& block : blocks) { const auto end = block->index.size(); bool is_match = false; uint32_t version = -1; size_t pos = 0; auto res = key; if(res) { pos = table->lower_bound(block, version, res, is_match); } else if(mode == 0) { if(pos < end) { read_key_at(block->file, block->index[pos], version, res); } else { continue; } } else if(mode < 0) { pos = end; } if(mode < 0) { if(pos == 0) { continue; } read_key_at(block->file, block->index[--pos], version, res); } else if(mode > 0) { if(pos + 1 >= end) { continue; } read_key_at(block->file, block->index[++pos], version, res); } if(!res) { continue; } pointer_t entry; entry.block = block; entry.pos = pos; read_value_at(block->file, block->index[pos], res, entry.value); block_map[std::make_pair(res, version)] = entry; } } void Table::Iterator::seek_next(std::shared_ptr key) { seek(key, 1); } void Table::Iterator::seek_prev(std::shared_ptr key) { seek(key, -1); } void Table::Iterator::seek_for_prev(std::shared_ptr key_) { seek(key_); if(is_valid() && *key() != *key_) { prev(); } } DataBase::DataBase(const int num_threads) : threads(num_threads > 0 ? num_threads : std::max(std::thread::hardware_concurrency(), 4u)) { } DataBase::~DataBase() { threads.close(); } void DataBase::add(std::shared_ptr
table) { std::lock_guard lock(mutex); tables.push_back(table); } void DataBase::commit(const uint32_t new_version) { std::lock_guard lock(mutex); for(const auto& table : tables) { if(table->commit(new_version, false)) { threads.add_task([table]() { table->flush(); }); } } threads.sync(); } void DataBase::revert(const uint32_t new_version) { std::lock_guard lock(mutex); for(const auto& table : tables) { threads.add_task([table, new_version]() { table->revert(new_version); }); } threads.sync(); } uint32_t DataBase::version() const { std::lock_guard lock(mutex); if(tables.empty()) { return 0; } return tables[0]->current_version(); } uint32_t DataBase::min_version() const { std::lock_guard lock(mutex); if(tables.empty()) { return 0; } uint32_t min_version = -1; for(const auto& table : tables) { min_version = std::min(table->current_version(), min_version); } return min_version; } uint32_t DataBase::recover() { const auto version = min_version(); revert(version); return version; } } // mmx ================================================ FILE: src/Farmer.cpp ================================================ /* * Farmer.cpp * * Created on: Dec 12, 2021 * Author: mad */ #include #include #include #include namespace mmx { Farmer::Farmer(const std::string& _vnx_name) : FarmerBase(_vnx_name) { } void Farmer::init() { pipe = vnx::open_pipe(vnx_name, this, 1000); pipe->pause(); vnx::open_pipe(vnx_get_id(), this, 1000); subscribe(input_info, 1000); subscribe(input_proofs, 10000); subscribe(input_partials, 10000); } void Farmer::main() { if(reward_addr) { if(*reward_addr == addr_t()) { reward_addr = nullptr; } else { log(INFO) << "Reward address: " << reward_addr->to_string(); } } params = get_params(); http_client = new vnx::addons::HttpClient(vnx_name + ".HttpClient"); http_client->output_response = "farmer.http_response"; http_client.start(); wallet = std::make_shared(wallet_server); http_async = std::make_shared(http_client.get_id()); wallet->vnx_set_non_blocking(true); http_async->vnx_set_non_blocking(true); add_async_client(wallet); add_async_client(http_async); set_timer_millis(60 * 1000, std::bind(&Farmer::update, this)); set_timer_millis(int64_t(difficulty_interval) * 1000, std::bind(&Farmer::update_difficulty, this)); update(); Super::main(); } vnx::Hash64 Farmer::get_mac_addr() const { return vnx_get_id(); } uint64_t Farmer::get_partial_diff(const addr_t& plot_nft) const { auto iter = nft_stats.find(plot_nft); if(iter != nft_stats.end()) { const auto& stats = iter->second; if(stats.partial_diff > 0) { return stats.partial_diff; } } return 0; } std::map Farmer::get_partial_diffs(const std::vector& plot_nfts) const { std::map out; for(const auto& addr : plot_nfts) { if(auto diff = get_partial_diff(addr)) { out[addr] = diff; } } return out; } std::vector Farmer::get_farmer_keys() const { std::vector out; for(const auto& entry : key_map) { out.push_back(entry.first); } return out; } std::shared_ptr Farmer::get_farm_info() const { auto info = FarmInfo::create(); for(const auto& entry : info_map) { if(auto value = std::dynamic_pointer_cast(entry.second->value)) { if(value->harvester) { auto& entry = info->harvester_bytes[*value->harvester]; entry.first += value->total_bytes; entry.second += value->total_bytes_effective; } for(const auto& entry : value->plot_count) { info->plot_count[entry.first] += entry.second; } for(const auto& dir : value->plot_dirs) { info->plot_dirs.push_back((value->harvester ? *value->harvester + ":" : "") + dir); } for(const auto& entry : value->pool_info) { auto& dst = info->pool_info[entry.first]; const auto prev_count = dst.plot_count; dst = entry.second; dst.plot_count += prev_count; } info->total_bytes += value->total_bytes; info->total_bytes_effective += value->total_bytes_effective; info->total_balance += value->total_balance; } } for(auto& entry : info->pool_info) { entry.second.partial_diff = get_partial_diff(entry.first); } info->pool_stats = nft_stats; info->reward_addr = reward_addr; return info; } void Farmer::update() { vnx::open_flow(vnx::get_pipe(node_server), vnx::get_pipe(vnx_get_id())); wallet->get_all_farmer_keys( [this](const std::vector>& list) { for(const auto& keys : list) { if(key_map.emplace(keys.second, keys.first).second) { log(INFO) << "Got Farmer Key: " << keys.second; } } pipe->resume(); }, [this](const vnx::exception& ex) { log(WARN) << "Failed to get keys from wallet: " << ex.what(); }); if(!reward_addr) { wallet->get_all_accounts( [this](const std::vector& accounts) { if(!reward_addr) { for(const auto& entry : accounts) { if(entry.address) { reward_addr = entry.address; break; } } if(reward_addr) { log(INFO) << "Reward address: " << reward_addr->to_string(); } else { log(WARN) << "Failed to get reward address from wallet: no wallet available"; } } }, [this](const vnx::exception& ex) { log(WARN) << "Failed to get reward address from wallet: " << ex.what(); }); } const auto now = get_time_us(); for(auto iter = info_map.begin(); iter != info_map.end();) { if((now - iter->second->recv_time) / 1000000 > harvester_timeout) { iter = info_map.erase(iter); } else { iter++; } } } void Farmer::update_difficulty() { for(const auto& entry : nft_stats) { query_difficulty(entry.first, entry.second.server_url); } } void Farmer::query_difficulty(const addr_t& contract, const std::string& url) { if(url.empty()) { return; } vnx::addons::http_request_options_t opt; if(reward_addr) { opt.query["id"] = reward_addr->to_string(); } http_async->get_json(url + "/difficulty", opt, [this, url, contract](const vnx::Variant& value) { const auto res = value.to_object(); if(auto field = res["difficulty"]) { const auto diff = field.to(); if(diff > 0) { auto& stats = nft_stats[contract]; if(stats.partial_diff <= 0) { log(INFO) << "Got partial difficulty: " << diff << " (" << url << ")"; } stats.partial_diff = diff; } else { log(WARN) << "Got invalid partial difficulty: " << diff << " (" << url << ")"; } } else { log(WARN) << "Failed to query partial difficulty from " << url << ": " << value.to_string(); } }, [this, url](const std::exception& ex) { log(WARN) << "Failed to query partial difficulty from " << url << " due to: " << ex.what(); }); } void Farmer::handle(std::shared_ptr value) { if(auto sample = vnx_sample) { if(value->harvester_id) { info_map[*value->harvester_id] = sample; } else if(value->harvester) { info_map[hash_t(*value->harvester)] = sample; } } for(const auto& entry : value->pool_info) { const auto& info = entry.second; if(auto url = info.server_url) { if(url->size()) { auto& stats = nft_stats[info.contract]; if(stats.server_url != (*url)) { stats.server_url = *url; query_difficulty(info.contract, *url); } } } } } void Farmer::handle(std::shared_ptr value) try { if(!value->is_valid()) { throw std::logic_error("invalid proof"); } const skey_t farmer_sk = get_skey(value->proof->farmer_key); auto out = vnx::clone(value); out->farmer_sig = signature_t::sign(farmer_sk, value->hash); out->content_hash = out->calc_content_hash(); publish(out, output_proofs); } catch(const std::exception& ex) { log(WARN) << "Failed to sign proof from harvester '" << value->harvester << "' due to: " << ex.what(); } void Farmer::handle(std::shared_ptr value) try { if(!value->proof) { return; } auto out = vnx::clone(value); if(reward_addr) { out->account = *reward_addr; } else { log(WARN) << "Using plot NFT owner as fallback payout address: " << out->account.to_string(); } out->hash = out->calc_hash(); const auto farmer_sk = get_skey(value->proof->farmer_key); out->farmer_sig = signature_t::sign(farmer_sk, out->hash); const auto payload = vnx::to_pretty_string(web_render(out)); http_async->post_json(out->pool_url + "/partial", payload, {}, [this, out](std::shared_ptr response) { auto& stats = nft_stats[out->contract]; stats.last_partial = get_time_sec(); bool is_valid = false; bool have_error = false; if(response->is_json()) { const auto value = response->parse_json(); if(value.is_object()) { const auto res = value.to_object(); is_valid = res["valid"].to(); if(is_valid) { const auto points = res["points"].to(); const auto response_ms = res["response_time"].to(); stats.valid_points += (points > 0 ? points : out->proof->difficulty); stats.total_partials++; stats.total_response_time += response_ms; log(INFO) << "Partial accepted: points = " << points << ", response = " << response_ms / 1e3 << " sec [" << out->harvester << "] (" << out->pool_url << ")"; } else { const auto code = res["error_code"].to(); if(code != pooling_error_e::NONE) { have_error = true; const auto message = res["error_message"].to_string_value(); stats.error_count[code]++; log(WARN) << "Partial was rejected due to: " << code.to_string_value() << ": " << (message.empty() ? "???" : message) << " [" << out->harvester << "] (" << out->pool_url << ")"; } } } } if(!is_valid) { if(!have_error) { stats.error_count[pooling_error_e::SERVER_ERROR]++; log(WARN) << "Partial failed due to: unknown error [" << out->harvester << "] (" << out->pool_url << ")"; } stats.failed_points += out->proof->difficulty; } }, [this, out](const std::exception& ex) { auto& stats = nft_stats[out->contract]; stats.failed_points += out->proof->difficulty; stats.error_count[pooling_error_e::SERVER_ERROR]++; log(WARN) << "Failed to send partial to " << out->pool_url << " due to: " << ex.what(); }); publish(out, output_partials); } catch(const std::exception& ex) { log(WARN) << "Failed to process partial from harvester '" << value->harvester << "' due to: " << ex.what(); } skey_t Farmer::get_skey(const pubkey_t& pubkey) const { auto iter = key_map.find(pubkey); if(iter == key_map.end()) { throw std::logic_error("unknown farmer key: " + pubkey.to_string()); } return iter->second; } std::shared_ptr Farmer::sign_block(std::shared_ptr block) const { if(!block) { throw std::logic_error("!block"); } if(block->proof.empty()) { throw std::logic_error("!proof"); } const auto farmer_sk = get_skey(block->get_farmer_key()); auto out = vnx::clone(block); out->nonce = vnx::rand64(); if(!out->reward_addr) { out->reward_addr = reward_addr; } if(out->reward_contract) { out->reward_account = reward_addr; } out->hash = out->calc_hash(); out->farmer_sig = signature_t::sign(farmer_sk, out->hash); out->content_hash = out->calc_content_hash(); return out; } signature_t Farmer::sign_vote(std::shared_ptr vote) const { if(!vote) { throw std::logic_error("!vote"); } const auto farmer_sk = get_skey(vote->farmer_key); const hash_t msg("MMX/validator/vote/" + vote->hash + vote->farmer_key); return signature_t::sign(farmer_sk, msg); } } // mmx ================================================ FILE: src/Harvester.cpp ================================================ /* * Harvester.cpp * * Created on: Dec 11, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include namespace mmx { Harvester::Harvester(const std::string& _vnx_name) : HarvesterBase(_vnx_name) { if(my_name.empty()) { my_name = vnx::get_host_name(); } params = get_params(); harvester_id = hash_t::random(); } void Harvester::init() { vnx::open_pipe(vnx_name, this, max_queue_ms); subscribe(input_challenges, max_queue_ms); } void Harvester::main() { farmer = std::make_shared(farmer_server); farmer_async = std::make_shared(farmer_server); farmer_async->vnx_set_non_blocking(true); node_async = std::make_shared(node_server); node_async->vnx_set_non_blocking(true); http = std::make_shared>(this, vnx_name); add_async_client(http); add_async_client(node_async); add_async_client(farmer_async); threads = std::make_shared(num_threads, num_threads); lookup_timer = add_timer(std::bind(&Harvester::check_queue, this)); set_timer_millis(10000, std::bind(&Harvester::update, this)); set_timer_millis(int64_t(nft_query_interval) * 1000, std::bind(&Harvester::update_nfts, this)); if(reload_interval > 0) { set_timer_millis(int64_t(reload_interval) * 1000, std::bind(&Harvester::reload, this)); } reload(); Super::main(); threads->close(); } void Harvester::send_response( std::shared_ptr request, std::shared_ptr proof, const int64_t time_begin_ms) const { // Note: NEEDS TO BE THREAD SAFE auto out = ProofResponse::create(); out->proof = proof; out->vdf_height = request->vdf_height; out->farmer_addr = farmer_addr; out->harvester = my_name.substr(0, 1024); out->lookup_time_ms = get_time_ms() - time_begin_ms; out->hash = out->calc_hash(); out->content_hash = out->calc_content_hash(); const auto delay_sec = out->lookup_time_ms / 1e3; log(INFO) << "[" << my_name << "] Found proof with score " << proof->score << " for height " << request->vdf_height << ", delay " << delay_sec << " sec"; publish(out, output_proofs); } void Harvester::check_queue() { const auto now_ms = get_time_ms(); for(auto iter = lookup_queue.begin(); iter != lookup_queue.end();) { const auto& entry = iter->second; const auto delay_ms = now_ms - entry.recv_time_ms; if(delay_ms > params->challenge_delay * params->block_interval_ms) { log(WARN) << "[" << my_name << "] Missed deadline for height " << entry.request->vdf_height; iter = lookup_queue.erase(iter); } else { iter++; } } if(!lookup_queue.empty()) { const auto iter = --lookup_queue.end(); const auto& entry = iter->second; lookup_task(entry.request, entry.recv_time_ms); lookup_queue.erase(iter); } } void Harvester::handle(std::shared_ptr value) { if(!is_ready) { return; } if(!already_checked.insert(value->challenge).second) { return; } auto& entry = lookup_queue[value->vdf_height]; const auto prev = entry.request; if(!prev || prev->challenge != value->challenge) { entry.request = value; entry.recv_time_ms = vnx_sample->recv_time / 1000; // trigger first lookup if no new challenge received for 10 ms lookup_timer->set_millis(10); } } std::vector Harvester::fetch_full_proof( std::shared_ptr prover, const uint64_t index) const { // Note: NEEDS TO BE THREAD SAFE try { const auto time_begin = get_time_ms(); const auto data = prover->get_full_proof(index); if(data.valid) { const auto elapsed = (get_time_ms() - time_begin) / 1e3; log(elapsed > 20 ? WARN : DEBUG) << "[" << my_name << "] Fetching full proof took " << elapsed << " sec (" << prover->get_file_path() << ")"; return data.proof; } else { throw std::runtime_error(data.error_msg); } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] Failed to fetch full proof: " << ex.what() << " (" << prover->get_file_path() << ")"; throw; } } void Harvester::lookup_task(std::shared_ptr value, const int64_t recv_time_ms) const { struct pool_conf_t { addr_t owner; uint64_t difficulty = 0; std::string server_url; }; struct lookup_job_t { std::mutex mutex; std::condition_variable signal; size_t total_plots = 0; int64_t slow_time_ms = 0; int64_t time_begin = 0; std::string slow_plot; std::unordered_map pool_config; std::atomic num_left {0}; std::atomic num_passed {0}; std::atomic num_proofs {0}; }; const auto job = std::make_shared(); job->total_plots = id_map.size(); job->num_left = job->total_plots; job->time_begin = get_time_ms(); for(const auto& entry : plot_nfts) { const auto& info = entry.second; if(info.is_locked && info.server_url) { const auto server_url = *info.server_url; const auto iter = partial_diff.find(info.address); if(iter != partial_diff.end() && iter->second > 0) { job->pool_config[info.address] = {info.owner, iter->second, server_url}; } else { log(WARN) << "Waiting on partial difficulty for pool: " + server_url; } } } for(const auto& entry : id_map) { const auto iter = plot_map.find(entry.second); if(iter == plot_map.end()) { job->num_left--; log(WARN) << "Cannot find plot " << entry.first.to_string(); continue; } const auto& plot_id = entry.first; const auto& prover = iter->second; threads->add_task([this, plot_id, prover, value, job, recv_time_ms]() { const auto header = prover->get_header(); const auto time_begin = get_time_ms(); const bool hard_fork = value->vdf_height >= params->hardfork1_height; const bool passed_filter = check_plot_filter(params, value->challenge, plot_id); if(passed_filter) try { const pool_conf_t* pool_config = nullptr; if(auto contract = header->contract) { auto iter = job->pool_config.find(*contract); if(iter != job->pool_config.end()) { pool_config = &iter->second; } } const auto challenge = get_plot_challenge(value->challenge, plot_id); const auto qualities = prover->get_qualities(challenge, params->plot_filter); for(const auto& res : qualities) { try { if(!res.valid) { log(WARN) << "[" << my_name << "] Failed to fetch quality: " << res.error_msg << " (" << prover->get_file_path() << ")"; continue; } if(hard_fork && !pos::check_post_filter(challenge, res.meta, params->post_filter)) { continue; // failed post filter } std::vector proof_xs; if(res.proof.size()) { proof_xs = res.proof; // SSD plot } else if(hard_fork) { proof_xs = fetch_full_proof(prover, res.index); // HDD plot } hash_t quality; if(hard_fork) { quality = calc_proof_hash(challenge, proof_xs); } else { quality = pos::calc_quality(challenge, res.meta); } const auto is_solo_proof = check_proof_threshold(params, header->ksize, quality, value->difficulty, hard_fork); const auto is_partial_proof = pool_config ? check_proof_threshold(params, header->ksize, quality, pool_config->difficulty, hard_fork) : false; uint16_t score = -1; if(is_solo_proof || is_partial_proof) { if(proof_xs.empty()) { proof_xs = fetch_full_proof(prover, res.index); // HDD plot } const auto hash = calc_proof_hash(value->challenge, proof_xs); score = get_proof_score(hash); } if(is_partial_proof) { auto proof = std::make_shared(); proof->seed = header->seed; proof->ksize = header->ksize; proof->plot_id = header->plot_id; proof->challenge = value->challenge; proof->difficulty = pool_config->difficulty; proof->farmer_key = header->farmer_key; proof->contract = *header->contract; proof->score = score; proof->proof_xs = proof_xs; auto out = Partial::create(); out->vdf_height = value->vdf_height; out->contract = *header->contract; out->account = pool_config->owner; out->pool_url = pool_config->server_url; out->proof = proof; out->harvester = my_name; out->lookup_time_ms = get_time_ms() - time_begin; publish(out, output_partials); } if(is_solo_proof) { std::shared_ptr proof; if(header->contract) { auto out = std::make_shared(); out->seed = header->seed; out->ksize = header->ksize; out->contract = *header->contract; out->proof_xs = proof_xs; proof = out; } else { auto out = std::make_shared(); out->seed = header->seed; out->ksize = header->ksize; out->proof_xs = proof_xs; proof = out; } proof->score = score; proof->plot_id = header->plot_id; proof->challenge = value->challenge; proof->difficulty = value->difficulty; proof->farmer_key = header->farmer_key; send_response(value, proof, recv_time_ms); } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] Failed to process quality " << res.index << ": " << ex.what() << " (" << prover->get_file_path() << ")"; } } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] Failed to process plot: " << ex.what() << " (" << prover->get_file_path() << ")"; } const auto time_lookup = get_time_ms() - time_begin; { std::lock_guard lock(job->mutex); if(passed_filter) { if(time_lookup > job->slow_time_ms) { job->slow_time_ms = time_lookup; job->slow_plot = prover->get_file_path(); } job->num_passed++; } job->num_left--; } job->signal.notify_all(); }); } threads->add_task([this, value, job, recv_time_ms]() { std::unique_lock lock(job->mutex); while(job->num_left) { job->signal.wait(lock); } const auto time_end = get_time_ms(); { auto out = LookupInfo::create(); out->id = harvester_id; out->name = my_name; out->vdf_height = value->vdf_height; out->num_total = job->total_plots; out->num_passed = job->num_passed; out->total_time_ms = time_end - job->time_begin; out->total_delay_ms = time_end - recv_time_ms; if(job->num_passed) { out->slow_time_ms = job->slow_time_ms; out->slow_plot = job->slow_plot; } publish(out, output_lookups); } if(job->total_plots) { const auto slow_time = job->slow_time_ms / 1e3; if(job->num_passed) { log(slow_time > 20 ? WARN : DEBUG) << "[" << my_name << "] Slowest plot took " << slow_time << " sec (" << job->slow_plot << ")"; } const auto delay_sec = (time_end - recv_time_ms) / 1e3; log(INFO) << "[" << my_name << "] " << job->num_passed << " of " << job->total_plots << " plots were eligible for height " << value->vdf_height << ", max lookup " << slow_time << " sec, delay " << delay_sec << " sec"; } }); // trigger next lookup right away lookup_timer->set_millis(0); } uint64_t Harvester::get_total_bytes() const { return total_bytes; } std::shared_ptr Harvester::get_farm_info() const { auto out = FarmInfo::create(); out->harvester = my_name; out->harvester_id = harvester_id; out->plot_dirs = std::vector(plot_dirs.begin(), plot_dirs.end()); out->total_bytes = total_bytes; out->total_bytes_effective = total_bytes_effective; for(const auto& entry : plot_map) { if(const auto& prover = entry.second) { out->plot_count[prover->get_ksize()]++; } } for(const auto& entry : plot_nfts) { const auto& nft = entry.second; auto& info = out->pool_info[nft.address]; info.contract = nft.address; info.name = nft.name; info.is_plot_nft = true; if(nft.is_locked) { info.server_url = nft.server_url; info.pool_target = nft.target; } { auto iter = partial_diff.find(nft.address); if(iter != partial_diff.end()) { info.partial_diff = iter->second; } } { auto iter = plot_contract_set.find(nft.address); if(iter != plot_contract_set.end()) { info.plot_count = iter->second; } } } for(const auto& entry : plot_contract_set) { if(!plot_nfts.count(entry.first)) { auto& info = out->pool_info[entry.first]; info.contract = entry.first; info.plot_count = entry.second; } } return out; } void Harvester::find_plot_dirs(const std::set& dirs, std::set& all_dirs, const size_t depth) const { if(depth > max_recursion) { return; } std::set sub_dirs; for(const auto& path : dirs) { vnx::Directory dir(path); try { for(const auto& file : dir.files()) { if(file && file->get_extension() == ".plot") { all_dirs.insert(path); break; } } for(const auto& sub_dir : dir.directories()) { const auto path = sub_dir->get_path(); if(!all_dirs.count(path)) { const auto name = sub_dir->get_name(); if(!dir_blacklist.count(name)) { sub_dirs.insert(sub_dir->get_path()); } } } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] " << ex.what(); } } if(!sub_dirs.empty()) { find_plot_dirs(sub_dirs, all_dirs, depth + 1); } } void Harvester::reload() { const auto time_begin = get_time_ms(); std::set farmer_keys; for(const auto& key : farmer->get_farmer_keys()) { farmer_keys.insert(key); } std::set dir_set; if(recursive_search) { find_plot_dirs(plot_dirs, dir_set, 0); } else { dir_set = plot_dirs; } const std::vector dir_list(dir_set.begin(), dir_set.end()); std::mutex mutex; std::set missing; for(const auto& entry : plot_map) { missing.insert(entry.first); } std::vector plot_files; for(const auto& dir_path : dir_list) { threads->add_task([this, dir_path, &plot_files, &missing, &mutex]() { try { vnx::Directory dir(dir_path); for(const auto& file : dir.files()) { const auto file_name = file->get_path(); { std::lock_guard lock(mutex); missing.erase(file_name); } if(!plot_map.count(file_name) && file->get_extension() == ".plot" && file->get_name().substr(0, 9) == "plot-mmx-") { std::lock_guard lock(mutex); plot_files.push_back(file_name); } } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] " << ex.what(); } }); } threads->sync(); std::vector>> plots; for(const auto& file_path : plot_files) { threads->add_task([this, file_path, &plots, &mutex]() { try { const auto prover = std::make_shared(file_path); const auto ksize = uint32_t(prover->get_ksize()); if(ksize < params->min_ksize || ksize > params->max_ksize) { throw std::logic_error("invalid ksize: " + std::to_string(ksize)); } { std::lock_guard lock(mutex); plots.emplace_back(file_path, prover); } } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] Failed to load plot '" << file_path << "' due to: " << ex.what(); } catch(...) { log(WARN) << "[" << my_name << "] Failed to load plot '" << file_path << "'"; } }); } threads->sync(); // purge missing plots for(const auto& file_name : missing) { plot_map.erase(file_name); } if(missing.size()) { log(INFO) << "[" << my_name << "] Lost " << missing.size() << " plots"; } if(plots.size() && plot_map.size()) { log(INFO) << "[" << my_name << "] Found " << plots.size() << " new plots"; } // validate and add new plots for(const auto& entry : plots) { const auto& plot = entry.second; try { const auto& farmer_key = plot->get_farmer_key(); if(!farmer_keys.count(farmer_key)) { throw std::logic_error("unknown farmer key: " + farmer_key.to_string()); } plot_map.insert(entry); } catch(const std::exception& ex) { log(WARN) << "[" << my_name << "] Invalid plot: " << entry.first << " (" << ex.what() << ")"; } } id_map.clear(); total_bytes = 0; total_bytes_effective = 0; for(const auto& entry : plot_map) { const auto& prover = entry.second; const auto& file_name = entry.first; const auto& plot_id = prover->get_plot_id(); if(!id_map.emplace(plot_id, file_name).second) { log(WARN) << "[" << my_name << "] Duplicate plot: " << entry.first << " (already have: " << id_map[plot_id] << ")"; } total_bytes += vnx::File(file_name).file_size(); total_bytes_effective += get_effective_plot_size(prover->get_ksize()); } // gather plot NFTs plot_contract_set.clear(); for(const auto& entry : plot_map) { if(const auto& addr = entry.second->get_contract()) { plot_contract_set[*addr]++; } } update(); update_nfts(); // check challenges again for new plots if(plots.size()) { is_ready = false; already_checked.clear(); } if(!is_ready) { set_timeout_millis(3000, [this]() { is_ready = true; }); } log(INFO) << "[" << my_name << "] Loaded " << plot_map.size() << " plots, " << total_bytes / pow(1000, 4) << " TB, " << total_bytes_effective / pow(1000, 4) << " TBe" << ", took " << (get_time_ms() - time_begin) / 1e3 << " sec"; } void Harvester::add_plot_dir(const std::string& path) { const std::string cpath = config_path + vnx_name + ".json"; auto object = vnx::read_config_file(cpath); { auto& var = object["plot_dirs"]; auto tmp = var.to>(); tmp.insert(path); var = tmp; vnx::write_config(vnx_name + ".plot_dirs", tmp); } vnx::write_config_file(cpath, object); plot_dirs.insert(path); reload(); } void Harvester::rem_plot_dir(const std::string& path) { const std::string cpath = config_path + vnx_name + ".json"; auto object = vnx::read_config_file(cpath); { auto& var = object["plot_dirs"]; auto tmp = var.to>(); tmp.erase(path); var = tmp; vnx::write_config(vnx_name + ".plot_dirs", tmp); } vnx::write_config_file(cpath, object); plot_dirs.erase(path); reload(); } void Harvester::update() { farmer_async->get_mac_addr( [this](const vnx::Hash64& mac) { farmer_addr = mac; }, [this](const std::exception& ex) { log(WARN) << "Failed to contact farmer: " << ex.what(); }); std::vector pool_nfts; for(const auto& entry : plot_nfts) { if(entry.second.server_url) { pool_nfts.push_back(entry.first); } } farmer_async->get_partial_diffs(pool_nfts, [this](const std::map& new_diff) { for(const auto& entry : new_diff) { if(entry.second != partial_diff[entry.first]) { log(INFO) << "New partial difficulty: " << entry.second << " (" << entry.first << ")"; } } partial_diff = new_diff; }); publish(get_farm_info(), output_info); } void Harvester::update_nfts() { std::set missing; for(const auto& entry : plot_nfts) { missing.insert(entry.first); } auto job = std::make_shared(plot_contract_set.size()); for(const auto& entry : plot_contract_set) { const auto& address = entry.first; node_async->get_plot_nft_info(address, [this, job, address](const vnx::optional& info) { if(info) { if(!plot_nfts.count(address)) { log(INFO) << "Found PlotNFT " << (info->name.empty() ? info->address.to_string() : "'" + info->name + "'") << ": is_locked = " << vnx::to_string(info->is_locked) << ", server_url = " << vnx::to_string(info->server_url); } plot_nfts[address] = *info; } if(--(*job) == 0) { update(); set_timeout_millis(2000, std::bind(&Harvester::update, this)); } }, [this, address](const std::exception& ex) { log(WARN) << "Failed to query PlotNFT " << address.to_string() << " due to: " << ex.what(); }); missing.erase(address); } for(const auto& address : missing) { plot_nfts.erase(address); } } void Harvester::http_request_async( std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const { http->http_request(request, sub_path, request_id, vnx_request->session); } void Harvester::http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const { throw std::logic_error("not implemented"); } } // mmx ================================================ FILE: src/Node.cpp ================================================ /* * Node.cpp * * Created on: Dec 7, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef WITH_JEMALLOC #include #endif namespace mmx { Node::Node(const std::string& _vnx_name) : NodeBase(_vnx_name) { params = mmx::get_params(); } void Node::init() { vnx::open_pipe(vnx_name, this, max_queue_ms); } void Node::main() { vnx::read_config("build.version", node_version); vnx::read_config("build.commit", node_commit); #ifdef WITH_OPENCL cl_context opencl_context = nullptr; try { std::string platform_name; vnx::read_config("opencl.platform", platform_name); const auto platforms = automy::basic_opencl::get_platforms(); struct device_t { int index = 0; std::string name; std::string platform; cl_device_id device_id; cl_platform_id platform_id; }; std::vector list; int listsel = -1; for(const auto idp : platforms) { const auto devices = automy::basic_opencl::get_devices(idp, CL_DEVICE_TYPE_GPU); const auto platform = automy::basic_opencl::get_platform_name(idp); for(const auto idd : devices) { int device_index = 0; const auto name = automy::basic_opencl::get_device_name(idd); for(const auto& device : list) { if(device.name == name) { device_index++; } } list.push_back({device_index, name, platform, idd, idp}); log(INFO) << "Found OpenCL GPU device '" << name << "' [" << device_index << "] (" << platform << ")"; } } std::vector> device_list; for(const auto& device : list) { device_list.emplace_back(device.name, device.index); } vnx::write_config("Node.opencl_device_list", device_list); if(opencl_device >= 0) { if(list.size()) { if(!opencl_device_name.empty()) { for(size_t i = 0; i < list.size() && listsel < 0; ++i) { if(opencl_device_name == list[i].name && opencl_device == list[i].index) { listsel = i; } } } else { if(platform_name.empty()) { platform_name = list[0].platform; } int devidx = -1; for(size_t i = 0; i < list.size() && listsel < 0; ++i) { if(platform_name == list[i].platform) { devidx++; } if(devidx >= opencl_device) { listsel = i; } } } if(listsel >= 0) { const auto& device = list[listsel]; opencl_context = automy::basic_opencl::create_context(device.platform_id, {device.device_id}); // TODO: optimize vdf_verify_max_pending according to GPU size for(uint32_t i = 0; i < max_vdf_verify_pending; ++i) { opencl_vdf.push_back(std::make_shared(opencl_context, device.device_id)); } log(INFO) << "Using OpenCL GPU device '" << device.name << "' [" << device.index << "] (" << device.platform << ")"; } else { log(WARN) << "No such OpenCL GPU device '" << opencl_device_name << "' [" << opencl_device << "]"; } } else { log(INFO) << "No OpenCL devices found"; } } else { log(INFO) << "No OpenCL device used (disabled)"; } vnx::write_config("Node.opencl_device_select", listsel); } catch(const std::exception& ex) { log(WARN) << "Failed to create OpenCL GPU context: " << ex.what(); } #endif if(opencl_vdf.size()) { opencl_vdf_enable = true; } else { max_vdf_verify_pending = 1; } threads = std::make_shared(num_threads); api_threads = std::make_shared(num_api_threads); vdf_threads = std::make_shared(max_vdf_verify_pending); fetch_threads = std::make_shared(2); router = std::make_shared(router_name); http = std::make_shared>(this, vnx_name); add_async_client(router); add_async_client(http); vnx::Directory(storage_path).create(); vnx::Directory(database_path).create(); const auto time_begin = get_time_ms(); { db = std::make_shared(num_db_threads); db->open_async(txio_log, database_path + "txio_log"); db->open_async(exec_log, database_path + "exec_log"); db->open_async(memo_log, database_path + "memo_log"); db->open_async(contract_map, database_path + "contract_map"); db->open_async(contract_log, database_path + "contract_log"); db->open_async(contract_depends, database_path + "contract_depends"); db->open_async(deploy_map, database_path + "deploy_map"); db->open_async(owner_map, database_path + "owner_map"); db->open_async(swap_index, database_path + "swap_index"); db->open_async(offer_index, database_path + "offer_index"); db->open_async(trade_log, database_path + "trade_log"); db->open_async(trade_index, database_path + "trade_index"); db->open_async(swap_liquid_map, database_path + "swap_liquid_map"); db->open_async(tx_log, database_path + "tx_log"); db->open_async(tx_index, database_path + "tx_index"); db->open_async(height_map, database_path + "height_map"); db->open_async(balance_table, database_path + "balance_table"); db->open_async(farmer_block_map, database_path + "farmer_block_map"); db->open_async(total_supply_map, database_path + "total_supply_map"); db->sync(); db->recover(); } { db_blocks = std::make_shared(2); db_blocks->open_async(block_index, database_path + "block_index"); db_blocks->open_async(height_index, database_path + "height_index"); db_blocks->sync(); db_blocks->recover(); } storage = std::make_shared(database_path, db); storage->read_balance = [this](const addr_t& address, const addr_t& currency) -> std::unique_ptr { uint128 value = 0; if(balance_table.find(std::make_pair(address, currency), value)) { return std::make_unique(value); } return nullptr; }; blocks = std::make_shared(database_path + "blocks.dat"); { const auto height = std::min(db->min_version(), revert_height); revert(height); reset(); log(INFO) << "Loaded DB at height " << get_height() << ", " << mmx_address_count << " addresses, " << farmer_ranking.size() << " farmers, took " << (get_time_ms() - time_begin) / 1e3 << " sec"; } if(vdf_slave_mode) { subscribe(input_vdf_points, max_queue_ms); } else { subscribe(input_vdfs, max_queue_ms); } subscribe(input_proof, max_queue_ms); subscribe(input_votes, max_queue_ms); subscribe(input_blocks, max_queue_ms); subscribe(input_transactions, max_queue_ms); subscribe(input_timelord_vdfs, max_queue_ms); subscribe(input_harvester_proof, max_queue_ms); subscribe(output_votes, max_queue_ms); set_timer_millis(60 * 1000, std::bind(&Node::print_stats, this)); set_timer_millis(30 * 1000, std::bind(&Node::purge_tx_pool, this)); set_timer_millis(3600 * 1000, std::bind(&Node::update_control, this)); set_timer_millis(validate_interval_ms, std::bind(&Node::validate_new, this)); update_timer = set_timer_millis(update_interval_ms, std::bind(&Node::update, this)); stuck_timer = set_timer_millis(sync_loss_delay * 1000, std::bind(&Node::on_stuck_timeout, this)); if(run_tests) { is_synced = true; const auto state = state_hash; const auto version = db_blocks->version(); bool failed = false; try { test_all(); } catch(const std::exception& ex) { failed = true; log(WARN) << "Test failed with: " << ex.what(); } db_blocks->revert(version); fork_to(state); if(failed) { return; } reset(); is_synced = false; } vnx::Handle router = new mmx::Router("Router"); router->node_server = vnx_name; router->storage_path = storage_path; router.start(); if(do_sync) { start_sync(true); } else { is_synced = true; } update(); Super::main(); blocks->close(); threads->close(); api_threads->close(); vdf_threads->close(); fetch_threads->close(); opencl_vdf.clear(); #ifdef WITH_OPENCL OCL_VDF::release(); automy::basic_opencl::release_context(opencl_context); #endif } void Node::init_chain() { auto block = Block::create(); block->nonce = params->port; block->time_stamp = params->initial_time_stamp; block->time_diff = params->initial_time_diff * params->time_diff_divider; block->space_diff = params->initial_space_diff; block->vdf_output = hash_t("MMX/" + params->network + "/vdf/0"); block->challenge = hash_t("MMX/" + params->network + "/challenge/0"); const bool is_mainnet = params->network == "mainnet"; if(is_mainnet) { std::shared_ptr tx_rewards; vnx::from_string(read_file("data/" + params->network + "/tx_testnet_rewards.json"), tx_rewards); if(!tx_rewards) { throw std::logic_error("failed to read testnet rewards"); } block->tx_list.push_back(tx_rewards); uint64_t total_rewards = 0; for(const auto& out : tx_rewards->outputs) { total_rewards += out.amount; } log(INFO) << "Total testnet rewards: " << total_rewards / 1000000 << " MMX"; } block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_offer_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_swap_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_token_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_plot_nft_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_nft_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_template_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_escrow_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_time_lock_binary.dat")); block->tx_list.push_back(vnx::read_from_file("data/" + params->network + "/tx_relay_binary.dat")); if(is_mainnet) { if(auto tx = vnx::read_from_file("data/" + params->network + "/tx_project_relay.dat")) { auto exec = std::dynamic_pointer_cast(tx->deploy); if(!tx->is_valid(params) || !tx->sender || tx->expires != 0xFFFFFFFF || !exec || exec->binary != params->relay_binary) { throw std::logic_error("invalid tx_project_relay"); } block->project_addr = tx->id; } else { throw std::logic_error("failed to load tx_project_relay"); } } else { block->project_addr = addr_t("mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"); } for(auto tx : block->tx_list) { if(!tx) { throw std::logic_error("failed to load genesis transaction"); } if(tx->network != params->network) { throw std::logic_error("invalid genesis transaction"); } } block->finalize(); block->content_hash = block->calc_content_hash(); if(!block->is_valid()) { throw std::logic_error("invalid genesis block"); } apply(block, nullptr); commit(block); log(INFO) << "Initialized chain with hash " << block->hash; } void Node::trigger_update() { if(!update_pending) { update_pending = true; add_task(std::bind(&Node::update, this)); } } void Node::add_block(std::shared_ptr block) { try { if(!block->is_valid()) { throw std::logic_error("invalid block"); } // need to verify farmer_sig before adding to fork tree block->validate(); } catch(const std::exception& ex) { log(WARN) << "Pre-validation failed for a block at height " << block->height << ": " << ex.what(); return; } const auto root = get_root(); if(block->height <= root->height) { write_block(block, false); return; } auto fork = std::make_shared(); fork->block = block; add_fork(fork); if(is_synced) { trigger_update(); } } void Node::add_fork(std::shared_ptr fork) { const auto root = get_root(); const auto block = fork->block; if(block->height <= root->height) { return; } if(!fork->recv_time_ms) { fork->recv_time_ms = get_time_ms(); } fork->prev = find_fork(block->prev); if(fork_tree.emplace(block->hash, fork).second) { fork_index.emplace(block->height, fork); } } void Node::add_transaction(std::shared_ptr tx, const vnx::bool_t& pre_validate) { if(tx->exec_result) { auto tmp = vnx::clone(tx); tmp->reset(params); tx = tmp; } if(pre_validate) { if(!is_synced) { throw std::logic_error("not synced"); } const auto res = validate(tx); if(res.did_fail) { throw std::runtime_error(res.get_error_msg()); } } if(tx_queue.size() < max_tx_queue) { // Note: tx->is_valid() already checked by Router tx_queue[tx->content_hash] = tx; } if(!vnx_sample) { publish(tx, output_transactions); } } void Node::handle(std::shared_ptr block) { if(is_synced || sync_peak) { add_block(block); } } void Node::handle(std::shared_ptr tx) { if(is_synced) { add_transaction(tx); } } void Node::handle(std::shared_ptr value) { vdf_queue.emplace_back(value, get_time_ms()); trigger_update(); } void Node::handle(std::shared_ptr value) { if(value->vdf_height > get_vdf_height()) { log(INFO) << "-------------------------------------------------------------------------------"; } if(find_vdf_point(value->input, value->output)) { return; // duplicate } const auto vdf_iters = value->start + value->num_iters; vdf_index.emplace(vdf_iters, value); vdf_tree.emplace(value->output, value); log(INFO) << u8"\U0001F552 Received VDF point for height " << value->vdf_height; trigger_update(); } void Node::handle(std::shared_ptr value) { proof_queue.emplace_back(value, get_time_ms()); } void Node::handle(std::shared_ptr value) { if(!value->is_valid()) { return; } vote_queue.emplace_back(value, get_time_ms()); // verify immediately to speed up relay verify_votes(); } #ifdef WITH_JEMALLOC static void malloc_stats_callback(void* file, const char* data) { fwrite(data, 1, strlen(data), (FILE*)file); } #endif void Node::print_stats() { #ifdef WITH_JEMALLOC static size_t counter = 0; if(counter++ % 3 == 0) { const std::string path = storage_path + "node_malloc_info.txt"; FILE* file = fopen(path.c_str(), "w"); malloc_stats_print(&malloc_stats_callback, file, 0); fclose(file); } #endif { std::ofstream file(storage_path + "timelord_trust.txt", std::ios::trunc); for(const auto& entry : timelord_trust) { file << entry.first << "\t" << entry.second << std::endl; } } log(INFO) << fork_tree.size() << " blocks in memory, " << tx_pool.size() << " tx pool, " << tx_pool_fees.size() << " tx senders"; } void Node::on_stuck_timeout() { if(is_synced) { log(WARN) << "Lost sync due to progress timeout!"; } start_sync(false); } void Node::start_sync(const vnx::bool_t& force) { if((!is_synced || !do_sync) && !force) { return; } { std::unique_lock lock(db_mutex); is_synced = false; } sync_pos = 0; sync_peak = nullptr; sync_retry = 0; sync_more(); } void Node::revert_sync(const uint32_t& height) { if(height <= get_root()->height) { log(WARN) << "Reverting to height " << height << " ..."; revert(height); reset(); } start_sync(true); } void Node::sync_more() { if(is_synced) { return; } const auto root = get_root(); if(!sync_pos) { sync_pos = root->height + 1; sync_start = sync_pos; log(INFO) << "Starting sync at height " << sync_pos; } if(sync_pos > root->height && sync_pos - root->height > params->commit_delay + max_sync_ahead) { return; // limit blocks in memory during sync } const size_t max_pending = sync_retry ? 2 : std::max(std::min(max_sync_pending, max_sync_jobs), 4); while(sync_pending.size() < max_pending && (!sync_peak || sync_pos < *sync_peak)) { sync_height(sync_pos++); } } void Node::sync_height(const uint32_t& height) { sync_pending.insert(height); router->get_blocks_at(height, std::bind(&Node::sync_result, this, height, std::placeholders::_1), [this, height](const vnx::exception& ex) { sync_pos = std::min(sync_pos, height); // reset, try again sync_pending.erase(height); log(WARN) << "get_blocks_at() failed with: " << ex.what(); }); } void Node::sync_result(const uint32_t& height, const std::vector>& result) { sync_pending.erase(height); // filter out blocks too far into the future // prevent extension attack with invalid VDFs during sync const auto max_time_stamp = get_time_ms() + max_future_sync * params->block_interval_ms; std::vector> blocks; for(auto block : result) { if(block->time_stamp < max_time_stamp) { blocks.push_back(block); } else { log(WARN) << "Block at height " << block->height << " is too far in the future: " << vnx::get_date_string(false, block->time_stamp); } } uint64_t total_size = 0; for(auto block : blocks) { add_block(block); total_size += block->static_cost; } if(height == sync_start) { for(auto block : blocks) { if(!find_prev(block)) { if(sync_start > 1) { sync_height(--sync_start); // walk back in case we missed blocks before log(WARN) << "Syncing backwards to height " << sync_start << " ..."; } } else { log(DEBUG) << "Sync connected to our chain at height " << height << ", hash " << block->hash; } } } { const auto value = max_sync_jobs * (1 - std::min(total_size / double(params->max_block_size), 1)); max_sync_pending = value * 0.1 + max_sync_pending * 0.9; } if(!is_synced) { if(blocks.empty()) { if(!sync_peak || height < *sync_peak) { sync_peak = height; } } if((height % max_sync_jobs == 0 || sync_pending.empty()) && !sync_retry) { update(); } else { sync_more(); } } } void Node::fetch_block(const hash_t& hash) { if(!fetch_pending.insert(hash).second) { return; } router->fetch_block(hash, nullptr, std::bind(&Node::fetch_result, this, hash, std::placeholders::_1), [this, hash](const vnx::exception& ex) { log(WARN) << "Fetching block " << hash << " failed with: " << ex.what(); fetch_pending.erase(hash); }); } void Node::fetch_result(const hash_t& hash, std::shared_ptr block) { if(block) { add_block(block); } fetch_pending.erase(hash); } std::shared_ptr Node::fork_to(const hash_t& state) { if(state == state_hash) { return nullptr; } if(auto fork = find_fork(state)) { return fork_to(fork); } const auto root = get_root(); if(state == root->hash) { revert(root->height + 1); return nullptr; } throw std::logic_error("cannot fork to " + state.to_string()); } std::shared_ptr Node::fork_to(std::shared_ptr peak) { const auto prev_state = state_hash; const auto fork_line = get_fork_line(peak); if(fork_line.empty()) { return nullptr; } bool did_fork = false; std::shared_ptr forked_at; const auto root_hash = fork_line[0]->block->prev; if(root_hash != root->hash) { did_fork = true; log(WARN) << "Performing deep fork ..."; const auto time_begin = get_time_ms(); const auto new_root = get_header(root_hash); if(!new_root) { throw std::logic_error("missing alternate root"); } try { forked_at = new_root; std::vector list; while(forked_at) { hash_t hash; if(height_map.find(forked_at->height, hash) && hash == forked_at->hash) { break; } list.push_back(forked_at->hash); forked_at = find_prev(forked_at); } if(!forked_at) { throw std::logic_error("cannot find fork point"); } std::reverse(list.begin(), list.end()); log(WARN) << "Reverting to height " << forked_at->height << " ..."; revert(forked_at->height + 1); for(const auto& hash : list) { if(auto block = get_block(hash)) { try { verify_proof(block); // need to verify proofs again (in case of backwards sync) apply(block, validate(block)); } catch(const std::exception& ex) { log(WARN) << "Block validation failed for height " << block->height << " with: " << ex.what(); throw std::logic_error("validation failed"); } } else { throw std::logic_error("failed to read block"); } } root = new_root; log(INFO) << "Deep fork to new root at height " << root->height << " took " << (get_time_ms() - time_begin) / 1e3 << " sec"; } catch(const std::exception& ex) { log(WARN) << "Failed to apply alternate fork: " << ex.what(); // restore old peak std::vector> blocks; hash_t hash = prev_state; while(auto block = get_block(hash)) { blocks.push_back(block); if(block->prev == state_hash) { break; } hash = block->prev; } std::reverse(blocks.begin(), blocks.end()); for(auto block : blocks) { apply(block, validate(block)); } reset(); // don't try this fork again for(auto fork : fork_line) { if(auto new_fork = find_fork(fork->block->hash)) { new_fork->is_invalid = true; } } if(auto peak = get_peak()) { log(INFO) << "Restored old peak at height " << peak->height; } throw; } } else { // normal in-memory fork std::set main_set; for(const auto& fork : get_fork_line()) { main_set.insert(fork->block->hash); } forked_at = root; for(const auto& fork : fork_line) { const auto& block = fork->block; if(main_set.count(block->hash)) { forked_at = block; } else { break; } } if(forked_at->hash != state_hash) { did_fork = true; revert(forked_at->height + 1); } } // verify and apply for(const auto& fork : fork_line) { const auto& block = fork->block; if(block->prev != state_hash) { // already verified and applied continue; } if(!fork->is_validated) { try { fork->context = validate(block); fork->is_validated = true; } catch(const std::exception& ex) { log(WARN) << "Block validation failed for height " << block->height << " with: " << ex.what(); fork->is_invalid = true; fork_to(prev_state); throw std::logic_error("validation failed"); } if(is_synced) { for(auto point : fork->vdf_points) { publish(point->proof, output_verified_vdfs); } publish(block, output_verified_blocks); } } apply(block, fork->context); } return did_fork ? forked_at : nullptr; } std::shared_ptr Node::find_best_fork() const { const auto root = get_root(); std::shared_ptr best; for(auto iter = fork_index.upper_bound(root->height); iter != fork_index.end(); ++iter) { const auto& fork = iter->second; const auto& block = fork->block; const auto prev = fork->prev.lock(); if(block->height == root->height + 1) { fork->root = find_prev(block); fork->total_votes = fork->votes; fork->is_all_proof_verified = fork->is_proof_verified; } else if(prev) { fork->root = prev->root; fork->is_invalid = prev->is_invalid || fork->is_invalid; fork->total_votes = prev->total_votes + fork->votes; fork->is_all_proof_verified = prev->is_all_proof_verified && fork->is_proof_verified; } else { fork->is_all_proof_verified = false; } if(fork->root && fork->root->hash != root->hash && !sync_pending.empty() && *sync_pending.begin() < root->height) { continue; // wait for backwards sync } if(fork->is_all_proof_verified && fork->root && !fork->is_invalid) { if(!best) { best = fork; } else { const auto is_deep_fork = fork->root->total_weight > best->root->total_weight; const auto is_same_root = fork->root->total_weight >= best->root->total_weight; const auto cond_weight = block->total_weight >= best->block->total_weight; const auto cond_height = block->height > best->block->height ? 1 : (block->height == best->block->height ? 0 : -1); const auto cond_votes = fork->total_votes > best->total_votes ? 1 : (fork->total_votes == best->total_votes ? 0 : -1); if(cond_weight && is_deep_fork) { best = fork; // higher peak and root weight (long range attack recovery) } else if(cond_weight || is_same_root) { // heavier peak or equal root if(cond_votes > 0) { best = fork; // more total votes } else if(cond_votes == 0) { // same total votes if(cond_height > 0) { best = fork; // longer chain (new block without votes) } else if(cond_height == 0) { // same peak height if(block->hash < best->block->hash) { best = fork; // race condition (multiple blocks at same time, votes will make better proof win) } } } } } } } return best; } std::vector> Node::get_fork_line(std::shared_ptr peak) const { const auto root = get_root(); if(!peak && state_hash == root->hash) { return {}; } std::vector> line; auto fork = peak ? peak : find_fork(state_hash); while(fork) { line.push_back(fork); if(fork->block->height == root->height + 1 && find_prev(fork->block)) { std::reverse(line.begin(), line.end()); return line; } fork = fork->prev.lock(); } throw std::logic_error("disconnected fork"); } void Node::vote_for_block(std::shared_ptr fork) { const auto& block = fork->block; for(const auto& entry : fork->validators) { const auto& farmer_key = entry.first; if(auto farmer_mac = find_value(farmer_keys, farmer_key)) { auto vote = ValidatorVote::create(); vote->hash = block->hash; vote->farmer_key = farmer_key; try { vote->farmer_sig = FarmerClient(*farmer_mac).sign_vote(vote); vote->content_hash = vote->calc_content_hash(); publish(vote, output_votes); publish(vote, output_verified_votes); if(voted_blocks.count(block->prev)) { log(INFO) << "Voted again for block at height " << block->height << ": " << vote->hash; } else { log(INFO) << "Voted for block at height " << block->height << ": " << vote->hash; } } catch(const std::exception& ex) { log(WARN) << "Failed to sign vote for height " << block->height << ": " << ex.what(); } voted_blocks[block->prev] = std::make_pair(vote->hash, get_time_ms()); } } } void Node::update_farmer_ranking() { std::sort(farmer_ranking.begin(), farmer_ranking.end(), [](const std::pair& L, const std::pair& R) -> bool { return L.second > R.second; }); } void Node::commit(std::shared_ptr block) { const auto height = block->height; if(height) { const auto root = get_root(); if(block->prev != root->hash) { throw std::logic_error("cannot commit height " + std::to_string(height) + " after " + std::to_string(root->height)); } } const auto fork = find_fork(block->hash); { const auto begin = challenge_map.begin(); const auto end = challenge_map.upper_bound(block->vdf_height); for(auto iter = begin; iter != end; ++iter) { proof_map.erase(iter->second); } challenge_map.erase(begin, end); } { const auto begin = vdf_index.begin(); const auto end = vdf_index.upper_bound(block->vdf_iters); for(auto iter = begin; iter != end; ++iter) { vdf_tree.erase(iter->second->output); } vdf_index.erase(begin, end); } for(auto iter = fork_index.rbegin(); iter != fork_index.rend(); ++iter) { const auto& fork = iter->second; if(auto prev = fork->prev.lock()) { prev->fork_length = std::max(prev->fork_length, fork->fork_length + 1); } } fork_tree.erase(block->hash); const auto range = fork_index.equal_range(height); for(auto iter = range.first; iter != range.second; ++iter) { const auto& fork = iter->second; const auto& block = fork->block; if(fork_tree.erase(block->hash) && fork->is_proof_verified) { write_block(block, false); } } fork_index.erase(height); root = block; // update root at end history[block->hash] = block->get_header(); history_log.emplace(height, block->hash); // purge history for(auto iter = history_log.begin(); iter != history_log.end() && iter->first + max_history < height;) { history.erase(iter->second); iter = history_log.erase(iter); } if(is_synced) { std::string ksize = "N/A"; std::string score = "N/A"; if(height) { if(auto proof = std::dynamic_pointer_cast(block->proof[0])) { ksize = std::to_string(proof->ksize); score = std::to_string(proof->score); } else if(auto proof = std::dynamic_pointer_cast(block->proof[0])) { ksize = std::to_string(proof->ksize); score = std::to_string(proof->score); } } Node::log(INFO) << "Committed height " << height << " with: ntx = " << block->tx_list.size() << ", k = " << ksize << ", score = " << score << ", votes = " << (fork ? fork->votes : 0) << " of " << (fork ? fork->validators.size() : 0) << ", tdiff = " << block->time_diff << ", sdiff = " << block->space_diff; } publish(block, output_committed_blocks, is_synced ? 0 : BLOCKING); } size_t Node::prefetch_balances(const std::set>& keys) const { if(keys.size() < 64) { return 0; } std::atomic total {0}; for(const auto& key : keys) { threads->add_task([this, &key, &total]() { total += balance_table.count(key); }); } threads->sync(); return total; } void Node::apply( std::shared_ptr block, std::shared_ptr context) { if(block->prev != state_hash) { throw std::logic_error("apply(): prev != state_hash"); } try { uint32_t counter = 0; std::vector tx_ids; std::unordered_set tx_set; balance_cache_t balance_cache(&balance_table); const auto block_inputs = block->get_inputs(params); const auto block_outputs = block->get_outputs(params); { std::set> keys; for(const auto& io : block_inputs) { keys.emplace(io.address, io.contract); } for(const auto& io : block_outputs) { keys.emplace(io.address, io.contract); } prefetch_balances(keys); } std::unordered_map supply_delta; for(const auto& out : block_outputs) { if(out.memo) { const auto key = hash_t(out.address + (*out.memo)); memo_log.insert(std::make_tuple(key, block->height, counter), out.address); } txio_log.insert(std::make_tuple(out.address, block->height, counter), out); balance_cache.get(out.address, out.contract) += out.amount; supply_delta[out.contract] += out.amount; counter++; } for(const auto& in : block_inputs) { if(auto balance = balance_cache.find(in.address, in.contract)) { clamped_sub_assign(*balance, in.amount); } if(in.memo) { const auto key = hash_t(in.address + (*in.memo)); memo_log.insert(std::make_tuple(key, block->height, counter), in.address); } txio_log.insert(std::make_tuple(in.address, block->height, counter), in); clamped_sub_assign(supply_delta[in.contract], in.amount); counter++; } for(const auto& tx : block->get_transactions()) { if(tx) { if(!tx->exec_result || !tx->exec_result->did_fail) { apply(block, tx, counter); } tx_pool_erase(tx->id); tx_set.insert(tx->id); tx_ids.push_back(tx->id); } } if(!tx_ids.empty()) { tx_log.insert(block->height, tx_ids); } for(auto iter = tx_queue.begin(); iter != tx_queue.end();) { if(tx_set.count(iter->second->id)) { iter = tx_queue.erase(iter); } else { iter++; } } for(const auto& entry : balance_cache.balance) { balance_table.insert(entry.first, entry.second); } for(const auto& entry : supply_delta) { const auto& currency = entry.first; const auto& delta = entry.second; if(delta) { uint128 prev = 0; total_supply_map.find(currency, prev); total_supply_map.insert(currency, prev + delta); } } if(context) { if(auto storage = context->storage) { storage->commit(); } else { throw std::logic_error("storage == nullptr"); } } if(block->height) { farmed_block_info_t info; info.height = block->height; info.reward = block->reward_amount; info.reward_addr = (block->reward_addr ? *block->reward_addr : addr_t()); const auto& farmer_key = block->get_farmer_key(); farmer_block_map.insert(std::make_pair(farmer_key, block->height), info); bool found = false; for(auto& entry : farmer_ranking) { if(entry.first == farmer_key) { entry.second++; found = true; break; } } if(!found) { farmer_ranking.emplace_back(farmer_key, 1); } update_farmer_ranking(); } write_block(block); height_map.insert(block->height, block->hash); contract_cache.clear(); state_hash = block->hash; db->commit(block->height + 1); } catch(const std::exception& ex) { try { revert(block->height); } catch(const std::exception& ex) { log(ERROR) << "revert() failed with: " << ex.what(); } throw std::runtime_error("apply() failed with: " + std::string(ex.what())); } } void Node::apply( std::shared_ptr block, std::shared_ptr tx, uint32_t& counter) { if(auto contract = tx->deploy) { const auto ticket = counter++; auto type_hash = hash_t(contract->get_type_name()); contract_map.insert(tx->id, contract); contract_log.insert(std::make_tuple(type_hash, block->height, ticket), tx->id); if(auto exec = std::dynamic_pointer_cast(contract)) { type_hash = exec->binary; if(exec->binary == params->offer_binary) { const auto bid_currency = exec->get_arg(1).to(); const auto ask_currency = exec->get_arg(2).to(); offer_index.insert(std::make_tuple(hash_t(ask_currency + "ANY"), block->height, ticket), tx->id); offer_index.insert(std::make_tuple(hash_t("ANY" + bid_currency), block->height, ticket), tx->id); offer_index.insert(std::make_tuple(hash_t(ask_currency + bid_currency), block->height, ticket), tx->id); } if(exec->binary == params->swap_binary) { const auto token = exec->get_arg(0).to(); const auto currency = exec->get_arg(1).to(); swap_index.insert(std::make_tuple(hash_t(token + "ANY"), block->height, ticket), tx->id); swap_index.insert(std::make_tuple(hash_t("ANY" + currency), block->height, ticket), tx->id); swap_index.insert(std::make_tuple(hash_t(token + currency), block->height, ticket), tx->id); } int owner_index = -1; if(exec->binary == params->plot_nft_binary || exec->binary == params->offer_binary || exec->binary == params->time_lock_binary) { owner_index = 0; } else if(exec->binary == params->escrow_binary) { owner_index = 2; } if(owner_index >= 0) { owner_map.insert(std::make_tuple(exec->get_arg(owner_index).to(), block->height, ticket), std::make_pair(tx->id, type_hash)); } { std::set depends; for(const auto& entry : exec->depends) { depends.insert(entry.second); } if(depends.size()) { contract_depends.insert(tx->id, std::vector(depends.begin(), depends.end())); } } contract_log.insert(std::make_tuple(exec->binary, block->height, ticket), tx->id); } if(tx->sender) { deploy_map.insert(std::make_tuple(*tx->sender, block->height, ticket), std::make_pair(tx->id, type_hash)); } if(auto owner = contract->get_owner()) { owner_map.insert(std::make_tuple(*owner, block->height, ticket), std::make_pair(tx->id, type_hash)); } } for(const auto& op : tx->execute) { const auto ticket = counter++; const auto address = (op->address == addr_t() ? addr_t(tx->id) : op->address); const auto contract = (address == tx->id ? tx->deploy : get_contract(address)); if(auto exec = std::dynamic_pointer_cast(op)) { exec_entry_t entry; entry.height = block->height; entry.time_stamp = block->time_stamp; entry.txid = tx->id; entry.method = exec->method; entry.args = exec->args; entry.user = exec->user; auto deposit = std::dynamic_pointer_cast(exec); if(deposit) { entry.deposit = std::make_pair(deposit->currency, deposit->amount); } exec_log.insert(std::make_tuple(address, block->height, ticket), entry); if(auto executable = std::dynamic_pointer_cast(contract)) { if(executable->binary == params->swap_binary) { if(exec->user && entry.args.size() > 0) { const auto key = std::make_pair(*exec->user, op->address); const auto index = entry.args[0].to(); if(index < 2) { std::array balance; swap_liquid_map.find(key, balance); if(exec->method == "add_liquid" && deposit) { balance[index] += deposit->amount; swap_liquid_map.insert(key, balance); } if(exec->method == "rem_liquid" && entry.args.size() > 1) { balance[index] -= entry.args[1].to(); swap_liquid_map.insert(key, balance); } if(exec->method == "rem_all_liquid") { balance = std::array(); swap_liquid_map.insert(key, balance); } } } } if(executable->binary == params->offer_binary) { if((exec->method == "trade" || exec->method == "accept") && deposit) { trade_log_t log; log.time_stamp = block->time_stamp; log.txid = tx->id; log.address = address; log.ask_amount = deposit->amount; exec->get_arg(1).to(log.inv_price); trade_log.insert(std::make_pair(block->height, ticket), log); try { const auto ask_currency = deposit->currency; const auto bid_currency = to_addr(read_storage_field(address, "bid_currency").first); trade_index.insert(std::make_tuple(hash_t(ask_currency + "ANY"), block->height, ticket), true); trade_index.insert(std::make_tuple(hash_t("ANY" + bid_currency), block->height, ticket), true); trade_index.insert(std::make_tuple(hash_t(ask_currency + bid_currency), block->height, ticket), true); } catch(...) { // ignore } } } } } } } void Node::revert(const uint32_t height) { const auto time_begin = get_time_ms(); const bool is_deep = !root || height <= root->height; for(auto block = get_peak(); !is_deep && block && block->height >= height; block = find_prev(block)) { // revert farmer_ranking if(block->height) { const auto& farmer_key = block->get_farmer_key(); for(auto& entry : farmer_ranking) { if(entry.first == farmer_key) { if(entry.second) { entry.second--; } break; } } } // add removed tx back to pool if(is_synced) { if(auto full = std::dynamic_pointer_cast(block)) { for(const auto& tx : full->tx_list) { tx_pool_t entry; auto copy = vnx::clone(tx); copy->reset(params); entry.tx = copy; entry.fee = tx->exec_result->total_fee; entry.cost = tx->exec_result->total_cost; entry.is_valid = true; tx_pool_update(entry, true); } } } } db->revert(height); uint32_t peak = 0; if(!height_map.find_last(peak, state_hash)) { state_hash = hash_t(); } contract_cache.clear(); if(is_deep || farmer_ranking.empty()) { // reset farmer ranking std::map farmer_block_count; farmer_block_map.scan([&farmer_block_count](const std::pair& key, const farmed_block_info_t& info) -> bool { farmer_block_count[key.first]++; return true; }); farmer_ranking.clear(); for(const auto& entry : farmer_block_count) { farmer_ranking.push_back(entry); } } update_farmer_ranking(); const auto elapsed = (get_time_ms() - time_begin) / 1e3; if(elapsed > 1) { log(WARN) << "Reverting to height " << peak << " took " << elapsed << " sec"; } } void Node::reset() { root = nullptr; fork_tree.clear(); fork_index.clear(); history.clear(); history_log.clear(); contract_cache.clear(); uint32_t height = 0; if(height_map.find_last(height, state_hash)) { blocks->open("rb+"); // check consistency while(true) { if(auto block = get_block_at(height)) { if(block->is_valid() && block->height == height) { break; } else { log(WARN) << "Corrupted block at height " << height << ", reverting ..."; } } else { log(WARN) << "Missing block at height " << height << ", reverting ..."; } if(height) { revert(height--); } else { break; } } // get root root = get_header_at(height - std::min(params->commit_delay, height)); if(!root) { throw std::logic_error("failed to load root block"); } // load fork tree std::vector list; height_index.find_range(root->height, height + 1, list); for(const auto& hash : list) { if(auto block = get_block(hash)) { auto fork = std::make_shared(); fork->block = block; fork->is_vdf_verified = true; add_fork(fork); } } // load history for(auto block = root; block && history.size() < max_history; block = find_prev(block)) { history[block->hash] = block; history_log.emplace(block->height, block->hash); } // update address count mmx_address_count = 0; balance_table.scan([this](const std::pair& key, const uint128& value) -> bool { if(value >= 1000000 && key.second == addr_t()) { mmx_address_count++; } return true; }); } else { blocks->open("wb"); blocks->open("rb+"); db_blocks->revert(0); init_chain(); } } std::shared_ptr Node::get_root() const { if(!root) { throw std::logic_error("have no root"); } return root; } std::shared_ptr Node::get_peak() const { return get_header(state_hash); } std::shared_ptr Node::find_fork(const hash_t& hash) const { auto iter = fork_tree.find(hash); if(iter != fork_tree.end()) { return iter->second; } return nullptr; } std::shared_ptr Node::find_prev_fork(std::shared_ptr fork, const size_t distance) const { for(size_t i = 0; fork && i < distance; ++i) { fork = fork->prev.lock(); } return fork; } std::shared_ptr Node::find_prev( std::shared_ptr block, const size_t distance, bool clamped) const { for(size_t i = 0; block && i < distance && (block->height || !clamped); ++i) { block = get_header(block->prev); } return block; } bool Node::find_challenge(std::shared_ptr block, const uint32_t offset, hash_t& challenge, uint64_t& space_diff) const { if(offset > params->challenge_delay) { const auto advance = offset - params->challenge_delay; if(advance > params->max_vdf_count) { return false; } hash_t tmp = block->challenge; for(uint32_t i = 0; i < advance; ++i) { tmp = hash_t(std::string("next_challenge") + tmp); } challenge = tmp; space_diff = block->space_diff; return true; } const uint32_t target = params->challenge_delay - offset; std::vector> chain = {block}; { std::shared_ptr iter = block; for(uint32_t i = 0; i < target; ++i) { if(auto block = find_prev(iter)) { chain.push_back(block); iter = block; } else if(iter->height) { return false; } else { break; } } } std::reverse(chain.begin(), chain.end()); std::vector> list; std::shared_ptr prev; for(auto block : chain) { if(prev) { auto tmp = prev->challenge; for(uint32_t i = 1; i < block->vdf_count; ++i) { tmp = hash_t(std::string("next_challenge") + tmp); list.emplace_back(tmp, prev->space_diff); } } list.emplace_back(block->challenge, block->space_diff); prev = block; } std::reverse(list.begin(), list.end()); while(target >= list.size()) { // generate challenges for "before" genesis const auto prev = list.back(); list.emplace_back(hash_t(std::string("prev_challenge") + prev.first), prev.second); } const auto& out = list[target]; challenge = out.first; space_diff = out.second; return true; } bool Node::find_challenge(const uint32_t vdf_height, hash_t& challenge, uint64_t& space_diff) const { auto block = get_peak(); if(block) { if(vdf_height > block->vdf_height) { if(vdf_height - block->vdf_height > params->max_vdf_count) { return false; } } else if(block->vdf_height - vdf_height > max_history) { return false; } } while(block && block->vdf_height > vdf_height) { block = find_prev(block); } if(!block) { return false; } return find_challenge(block, vdf_height - block->vdf_height, challenge, space_diff); } hash_t Node::get_challenge(std::shared_ptr block, const uint32_t offset, uint64_t& space_diff) const { hash_t challenge; if(!find_challenge(block, offset, challenge, space_diff)) { throw std::logic_error("cannot find challenge"); } return challenge; } uint64_t Node::get_time_diff(std::shared_ptr infused) const { if(auto prev = find_prev(infused, params->commit_delay, true)) { return prev->time_diff; } throw std::logic_error("cannot get time difficulty"); } bool Node::find_infusion(std::shared_ptr block, const uint32_t offset, hash_t& value, uint64_t& num_iters) const { if(offset < params->infuse_delay) { const uint32_t delta = params->infuse_delay - offset; const uint32_t target = block->vdf_height > delta ? block->vdf_height - delta : 0; while(block && block->vdf_height > target) { block = find_prev(block); } } if(block) { num_iters = get_block_iters(params, get_time_diff(block)); value = block->hash; return true; } return false; } hash_t Node::get_infusion(std::shared_ptr block, const uint32_t offset, uint64_t& num_iters) const { hash_t value; if(!find_infusion(block, offset, value, num_iters)) { throw std::logic_error("cannot find infusion"); } return value; } std::pair Node::get_vdf_peak_ex() const { if(auto peak = get_peak()) { const auto points = find_next_vdf_points(peak); if(points.empty()) { return std::make_pair(peak->vdf_height, peak->vdf_output); } else { return std::make_pair(peak->vdf_height + points.size(), points.back()->output); } } return std::make_pair(0, hash_t()); // should never happen } std::shared_ptr Node::find_vdf_point(const hash_t& input, const hash_t& output) const { const auto range = vdf_tree.equal_range(output); for(auto iter = range.first; iter != range.second; ++iter) { const auto& point = iter->second; if(point->input == input && point->output == output) { return point; } } return nullptr; } std::vector> Node::find_vdf_points(std::shared_ptr block) const { const auto prev = find_prev(block); if(!prev) { return {}; } std::vector> out; auto output = block->vdf_output; auto vdf_iters = prev->vdf_iters; while(out.size() < block->vdf_count) { hash_t infuse; uint64_t num_iters = 0; const auto offset = block->vdf_count - out.size() - 1; if(!find_infusion(prev, offset, infuse, num_iters)) { return {}; } bool found = false; const auto range = vdf_tree.equal_range(output); for(auto iter = range.first; iter != range.second; ++iter) { const auto& point = iter->second; if(point->output == output && point->prev == infuse && point->num_iters == num_iters) { output = point->input; vdf_iters += num_iters; out.push_back(point); found = true; break; } } if(!found) { return {}; } } if(output != prev->vdf_output) { return {}; } std::reverse(out.begin(), out.end()); return out; } std::vector> Node::find_next_vdf_points(std::shared_ptr block) const { std::vector> peaks; std::unordered_map> fork_map; fork_map[block->vdf_output] = nullptr; auto vdf_iters = block->vdf_iters; for(uint32_t i = 0; i < params->max_vdf_count; ++i) { uint64_t num_iters = 0; const auto infuse = get_infusion(block, i, num_iters); vdf_iters += num_iters; std::vector> new_peaks; const auto range = vdf_index.equal_range(vdf_iters); for(auto iter = range.first; iter != range.second; ++iter) { const auto& point = iter->second; if(fork_map.count(point->input) && point->prev == infuse && point->num_iters == num_iters) { fork_map[point->output] = point; new_peaks.push_back(point); } } if(new_peaks.size()) { peaks = std::move(new_peaks); } else { break; } } if(peaks.empty()) { return {}; } std::sort(peaks.begin(), peaks.end(), []( const std::shared_ptr& L, const std::shared_ptr& R) -> bool { return L->recv_time < R->recv_time; }); std::vector> out; for(auto point = peaks[0]; point; point = fork_map[point->input]) { out.push_back(point); } std::reverse(out.begin(), out.end()); return out; } std::set Node::get_validators(std::shared_ptr block) const { block = find_prev(block, params->commit_delay); std::set set; for(uint32_t k = 0; block && k < max_history && set.size() < params->max_validators; ++k) { if(block->proof.size()) { set.insert(block->proof[0]->farmer_key); } block = find_prev(block); } return set; } std::vector Node::get_all_depends(std::shared_ptr exec) const { std::set out; for(const auto& entry : exec->depends) { out.insert(entry.second); } if(out.size() > params->max_rcall_width) { throw std::logic_error("remote call width overflow"); } for(const auto& address : std::vector(out.begin(), out.end())) { const auto tmp = get_all_depends(address, 2); out.insert(tmp.begin(), tmp.end()); } if(out.size() > params->max_rcall_width) { throw std::logic_error("remote call width overflow"); } return std::vector(out.begin(), out.end()); } std::vector Node::get_all_depends(const addr_t& address, const uint32_t depth) const { std::set out; std::vector list; if(contract_depends.find(address, list)) { for(const auto& address : list) { const auto tmp = get_all_depends(address, depth + 1); out.insert(tmp.begin(), tmp.end()); } out.insert(list.begin(), list.end()); } if(out.size() && depth > params->max_rcall_depth) { throw std::logic_error("remote call depth overflow"); } if(out.size() > params->max_rcall_width) { throw std::logic_error("remote call width overflow"); } return std::vector(out.begin(), out.end()); } vnx::optional Node::find_best_proof(const hash_t& challenge) const { const auto iter = proof_map.find(challenge); if(iter != proof_map.end()) { const auto& list = iter->second; if(list.size()) { return list.front(); } } return nullptr; } uint64_t Node::calc_block_reward(std::shared_ptr block, const uint64_t total_fees) const { if(block->proof.empty()) { return 0; } if(block->height < params->reward_activation) { return 0; } uint64_t base_reward = 0; uint64_t reward_deduction = 0; if(auto prev = find_prev(block)) { base_reward = prev->base_reward; reward_deduction = calc_min_reward_deduction(params, prev->txfee_buffer); } uint64_t reward = base_reward; if(params->min_reward > reward_deduction) { reward += params->min_reward - reward_deduction; } return mmx::calc_final_block_reward(params, reward, total_fees); } vnx::optional Node::get_vdf_reward_winner(std::shared_ptr block) const { std::map win_map; for(uint32_t i = 0; i < params->vdf_reward_interval; ++i) { if(auto prev = find_prev(block)) { for(const auto& addr : prev->vdf_reward_addr) { win_map[addr]++; } block = prev; } else { break; } } hash_t max_hash; uint32_t max_count = 0; vnx::optional out; for(const auto& entry : win_map) { const auto& address = entry.first; const auto& count = entry.second; const hash_t hash(address + block->proof_hash); if(count > max_count || (count == max_count && hash < max_hash)) { out = address; max_count = count; max_hash = hash; } } return out; } std::shared_ptr Node::read_block( vnx::File& file, bool full_block, std::vector* tx_offsets) const { // THREAD SAFE (for concurrent reads) auto& in = file.in; if(tx_offsets) { tx_offsets->clear(); } try { if(auto header = std::dynamic_pointer_cast(vnx::read(in))) { if(full_block) { auto block = Block::create(); block->BlockHeader::operator=(*header); while(true) { const auto offset = in.get_input_pos(); if(auto value = vnx::read(in)) { if(auto tx = std::dynamic_pointer_cast(value)) { if(tx_offsets) { tx_offsets->push_back(offset); } block->tx_list.push_back(tx); } else { throw std::logic_error("expected transaction"); } } else { break; } } header = block; } return header; } } catch(const std::exception& ex) { log(WARN) << "Failed to read block: " << ex.what(); } return nullptr; } void Node::write_block(std::shared_ptr block, const bool is_main) { try { block_index_t index; if(block_index.find(block->hash, index)) { blocks->seek_to(index.file_offset); std::vector tx_offsets; if(auto block = read_block(*blocks, true, &tx_offsets)) { if(!block->is_valid()) { throw std::logic_error("invalid block"); } } else { throw std::logic_error("failed to read block"); } if(tx_offsets.size() != block->tx_count) { throw std::logic_error("tx count mismatch"); } if(block->tx_list.size() != block->tx_count) { throw std::logic_error("tx count mismatch"); } if(is_main) { for(uint32_t i = 0; i < block->tx_count; ++i) { const auto& tx = block->tx_list[i]; tx_index.insert(tx->id, tx->get_tx_index(params, block, tx_offsets[i])); } } return; } } catch(const std::exception& ex) { log(WARN) << "Stored block at height " << block->height << " is corrupted: " << ex.what(); } blocks->seek_end(); auto& out = blocks->out; const auto offset = out.get_output_pos(); vnx::write(out, block->get_header()); std::vector> tx_list; for(const auto& tx : block->tx_list) { if(is_main) { tx_list.emplace_back(tx->id, tx->get_tx_index(params, block, out.get_output_pos())); } vnx::write(out, tx); } for(const auto& entry : tx_list) { tx_index.insert(entry.first, entry.second); } vnx::write(out, nullptr); // end of block blocks->flush(); block_index.insert(block->hash, block->get_block_index(offset)); { std::vector list; height_index.find(block->height, list); if(std::find(list.begin(), list.end(), block->hash) == list.end()) { height_index.insert(block->height, block->hash); } } db_blocks->commit(db_blocks->version() + 1); } } // mmx ================================================ FILE: src/Node_api.cpp ================================================ /* * Node_api.cpp * * Created on: Jun 30, 2024 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { std::shared_ptr Node::get_params() const { return params; } std::shared_ptr Node::get_network_info() const { if(const auto peak = get_peak()) { if(!network || peak->height != network->height || is_synced != network->is_synced) { auto info = NetworkInfo::create(); info->is_synced = is_synced; info->height = peak->height; info->vdf_height = peak->vdf_height; info->time_stamp = peak->time_stamp; info->synced_since = synced_since; info->name = params->network; info->node_version = node_version; info->node_commit = node_commit; info->time_diff = peak->time_diff; info->space_diff = peak->space_diff; info->vdf_speed = get_vdf_speed(params, peak->time_diff) / 1e6; const auto avg_txfee = calc_min_reward_deduction(params, peak->txfee_buffer); info->block_reward = (peak->height >= params->reward_activation ? (peak->base_reward + std::max(params->min_reward - avg_txfee, 0)) : 0); info->total_space = calc_total_netspace(params, peak->space_diff) / 1000 / 1000 / 1000; info->total_supply = get_total_supply(addr_t()); info->address_count = mmx_address_count; info->genesis_hash = get_genesis_hash(); info->average_txfee = avg_txfee; { size_t num_blocks = 0; for(const auto& fork : get_fork_line()) { if(fork->block->farmer_sig) { info->block_size += fork->block->static_cost / double(params->max_block_size); num_blocks++; } } if(num_blocks) { info->block_size /= num_blocks; } } network = info; } } return network; } hash_t Node::get_genesis_hash() const { if(auto block = get_header_at(0)) { return block->hash; } throw std::logic_error("have no genesis"); } uint32_t Node::get_height() const { if(auto block = get_peak()) { return block->height; } throw std::logic_error("have no peak"); } vnx::optional Node::get_synced_height() const { if(is_synced) { return get_height(); } return nullptr; } vnx::optional Node::get_synced_vdf_height() const { if(is_synced) { return get_vdf_height(); } return nullptr; } std::shared_ptr Node::get_block(const hash_t& hash) const { return std::dynamic_pointer_cast(get_block_ex(hash, true)); } std::shared_ptr Node::get_block_ex(const hash_t& hash, bool full_block) const { // THREAD SAFE (for concurrent reads) auto iter = fork_tree.find(hash); if(iter != fork_tree.end()) { return iter->second->block; } if(!full_block) { auto iter = history.find(hash); if(iter != history.end()) { return iter->second; } } block_index_t entry; if(block_index.find(hash, entry)) { vnx::File file(blocks->get_path()); file.open("rb"); file.seek_to(entry.file_offset); return read_block(file, full_block); } return nullptr; } std::shared_ptr Node::get_block_at(const uint32_t& height) const { return std::dynamic_pointer_cast(get_block_at_ex(height, true)); } std::shared_ptr Node::get_block_at_ex(const uint32_t& height, bool full_block) const { if(auto hash = get_block_hash(height)) { return get_block_ex(*hash, full_block); } return nullptr; } std::shared_ptr Node::get_header(const hash_t& hash) const { return get_block_ex(hash, false); } std::shared_ptr Node::get_header_at(const uint32_t& height) const { return get_block_at_ex(height, false); } vnx::optional Node::get_block_hash(const uint32_t& height) const { hash_t hash; if(height_map.find(height, hash)) { return hash; } return nullptr; } vnx::optional> Node::get_block_hash_ex(const uint32_t& height) const { if(auto hash = get_block_hash(height)) { block_index_t entry; if(block_index.find(*hash, entry)) { return std::make_pair(*hash, entry.content_hash); } } return nullptr; } std::vector Node::get_tx_ids(const uint32_t& limit) const { std::vector out; tx_log.reverse_scan([&out, limit](const uint32_t&, const std::vector& list) -> bool { for(const auto& id : list) { if(out.size() < limit) { out.push_back(id); } else { return false; } } return out.size() < limit; }); return out; } std::vector Node::get_tx_ids_at(const uint32_t& height) const { std::vector list; tx_log.find(height, list); return list; } std::vector Node::get_tx_ids_since(const uint32_t& height) const { std::vector> list; tx_log.find_greater_equal(height, list); std::vector out; for(const auto& entry : list) { out.insert(out.end(), entry.begin(), entry.end()); } return out; } vnx::optional Node::get_tx_height(const hash_t& id) const { tx_index_t entry; if(tx_index.find(id, entry)) { return entry.height; } return nullptr; } vnx::optional Node::get_tx_info(const hash_t& id) const { if(auto tx = get_transaction(id, true)) { return get_tx_info_for(tx); } return nullptr; } vnx::optional Node::get_tx_info_for(std::shared_ptr tx) const { if(!tx) { return nullptr; } tx_info_t info; info.id = tx->id; info.expires = tx->expires; { tx_index_t entry; if(tx_index.find(tx->id, entry)) { info.height = entry.height; info.time_stamp = entry.time_stamp; info.block = get_block_hash(entry.height); } } if(tx->exec_result) { info.fee = tx->exec_result->total_fee; info.cost = tx->exec_result->total_cost; info.did_fail = tx->exec_result->did_fail; info.message = tx->exec_result->get_error_msg(); } else { info.cost = tx->static_cost; } info.note = tx->note; info.sender = tx->sender; info.inputs = tx->get_inputs(); info.outputs = tx->get_outputs(); info.operations = tx->get_operations(); info.deployed = tx->deploy; std::set contracts; for(const auto& in : info.inputs) { contracts.insert(in.contract); info.input_amounts[in.contract] += in.amount; } for(const auto& out : info.outputs) { contracts.insert(out.contract); info.output_amounts[out.contract] += out.amount; } for(const auto& op : tx->execute) { if(op) { contracts.insert(op->address); } } for(const auto& addr : contracts) { if(auto contract = get_contract(addr)) { info.contracts[addr] = contract; } } return info; } std::shared_ptr Node::get_transaction(const hash_t& id, const bool& pending) const { if(pending) { auto iter = tx_pool.find(id); if(iter != tx_pool.end()) { return iter->second.tx; } for(const auto& entry : tx_queue) { if(const auto& tx = entry.second) { if(tx->id == id) { return tx; } } } } tx_index_t entry; if(tx_index.find(id, entry)) { vnx::File file(blocks->get_path()); file.open("rb"); file.seek_to(entry.file_offset); const auto value = vnx::read(file.in); if(auto tx = std::dynamic_pointer_cast(value)) { return tx; } } return nullptr; } std::vector> Node::get_transactions(const std::vector& ids) const { std::vector> list; for(const auto& id : ids) { std::shared_ptr tx; try { tx = get_transaction(id); } catch(...) { // ignore } list.push_back(tx); } return list; } inline bool filter_txio(const txio_entry_t& entry, const query_filter_t& filter) { if(filter.type && entry.type != *filter.type) { return false; } if(!filter.currency.empty() && !filter.currency.count(entry.contract)) { return false; } return true; } std::vector Node::get_history(const std::vector& addresses, const query_filter_t& filter) const { if(const auto& memo = filter.memo) { return get_history_memo(addresses, *memo, filter); } if(filter.limit == 0) { return {}; } std::map count_map; std::map> state_map; const std::set address_set(addresses.begin(), addresses.end()); for(const auto& address : address_set) { state_map[address] = std::make_tuple(address, filter.until, -1); } const uint32_t chunk_size = 100; const uint64_t max_search = filter.max_search ? filter.max_search : -1; uint64_t num_search = 0; std::vector res; while(!state_map.empty() && num_search < max_search) { std::vector done; for(auto& entry : state_map) { const auto& address = entry.first; std::vector, txio_entry_t>> entries; num_search += txio_log.find_last_range( std::make_tuple(address, filter.since, 0), entry.second, entries, chunk_size); auto& count = count_map[address]; for(const auto& entry : entries) { if(filter_txio(entry.second, filter)) { res.push_back(tx_entry_t::create_ex(entry.second)); count++; } } if(entries.size()) { entry.second = entries.back().first; } if(entries.size() < chunk_size || count >= uint32_t(filter.limit)) { done.push_back(address); } } for(const auto& address : done) { // add remaining entries for last block auto end = state_map[address]; auto begin = end; std::get<2>(begin) = 0; std::vector more; num_search += txio_log.find_last_range(begin, end, more, -1); for(const auto& entry : more) { if(filter_txio(entry, filter)) { res.push_back(tx_entry_t::create_ex(entry)); } } state_map.erase(address); } } if(filter.with_pending) { std::lock_guard lock(mutex); for(const auto& address : address_set) { const auto begin = tx_pool_index.lower_bound(std::make_pair(address, hash_t())); const auto end = tx_pool_index.upper_bound(std::make_pair(address, hash_t::ones())); for(auto iter = begin; iter != end; ++iter) { if(auto tx = iter->second) { for(const auto& in : tx->get_inputs()) { if(address_set.count(in.address)) { tx_entry_t entry; entry.txio_t::operator=(in); entry.type = tx_type_e::SPEND; entry.txid = tx->id; entry.height = -1; entry.is_pending = true; res.push_back(entry); } } for(const auto& out : tx->get_outputs()) { if(address_set.count(out.address)) { tx_entry_t entry; entry.txio_t::operator=(out); entry.type = tx_type_e::RECEIVE; entry.txid = tx->id; entry.height = -1; entry.is_pending = true; res.push_back(entry); } } } } } } std::sort(res.begin(), res.end(), [](const tx_entry_t& L, const tx_entry_t& R) -> bool { return std::make_tuple(L.height, L.txid, L.type, L.contract, L.address, L.memo, L.amount) > std::make_tuple(R.height, R.txid, R.type, R.contract, R.address, R.memo, R.amount); }); if(filter.limit > 0 && res.size() > size_t(filter.limit)) { size_t i = filter.limit - 1; for(const auto cutoff = res[i].height; i < res.size() && res[i].height == cutoff; ++i); res.resize(i); } return res; } std::vector Node::get_history_memo(const std::vector& addresses, const std::string& memo, const query_filter_t& filter) const { if(filter.limit == 0) { return {}; } std::map count_map; std::map> state_map; const std::set address_set(addresses.begin(), addresses.end()); for(const auto& address : address_set) { state_map[address] = std::make_tuple(hash_t(address + memo), filter.until, -1); } const uint32_t chunk_size = 100; const uint64_t max_search = filter.max_search ? filter.max_search : -1; uint64_t num_search = 0; std::vector res; while(!state_map.empty() && num_search < max_search) { std::vector done; for(auto& entry : state_map) { const auto& address = entry.first; const auto& key = std::get<0>(entry.second); std::vector, addr_t>> entries; num_search += memo_log.find_last_range(std::make_tuple(key, filter.since, 0), entry.second, entries, chunk_size); auto& count = count_map[address]; for(const auto& index : entries) { txio_entry_t entry; if(txio_log.find(std::make_tuple(index.second, std::get<1>(index.first), std::get<2>(index.first)), entry)) { if(filter_txio(entry, filter)) { res.push_back(tx_entry_t::create_ex(entry)); count++; } } } if(entries.size()) { entry.second = entries.back().first; } if(entries.size() < chunk_size || count >= uint32_t(filter.limit)) { done.push_back(address); } } for(const auto& address : done) { state_map.erase(address); } } if(filter.with_pending) { std::lock_guard lock(mutex); for(const auto& address : address_set) { const hash_t key(address + memo); const auto begin = tx_pool_index.lower_bound(std::make_pair(key, hash_t())); const auto end = tx_pool_index.upper_bound(std::make_pair(key, hash_t::ones())); for(auto iter = begin; iter != end; ++iter) { if(auto tx = iter->second) { for(const auto& out : tx->get_outputs()) { if(address_set.count(out.address) && out.memo && (*out.memo) == memo) { tx_entry_t entry; entry.txio_t::operator=(out); entry.type = tx_type_e::RECEIVE; entry.txid = tx->id; entry.height = -1; entry.is_pending = true; res.push_back(entry); } } } } } } std::sort(res.begin(), res.end(), [](const tx_entry_t& L, const tx_entry_t& R) -> bool { return std::make_tuple(L.height, L.txid, L.type, L.contract, L.address, L.memo, L.amount) > std::make_tuple(R.height, R.txid, R.type, R.contract, R.address, R.memo, R.amount); }); if(filter.limit > 0 && res.size() > size_t(filter.limit)) { size_t i = filter.limit - 1; for(const auto cutoff = res[i].height; i < res.size() && res[i].height == cutoff; ++i); res.resize(i); } return res; } std::shared_ptr Node::get_contract(const addr_t& address) const { return get_contract_ex(address); } std::shared_ptr Node::get_contract_ex(const addr_t& address, uint64_t* read_cost, const uint64_t gas_limit) const { if(read_cost) { tx_index_t index; tx_index.find(address, index); const auto cost = params->min_txfee_read + index.contract_read_cost; if(*read_cost + cost > gas_limit) { throw std::runtime_error("not enough gas to read contract"); } *read_cost += cost; } std::shared_ptr contract; { std::lock_guard lock(mutex); contract = find_value(contract_cache, address, nullptr); } if(!contract) { contract_map.find(address, contract); if(std::dynamic_pointer_cast(contract)) { std::lock_guard lock(mutex); if((contract_cache.size() + 1) >> 16) { contract_cache.clear(); } contract_cache[address] = contract; } } return contract; } std::shared_ptr Node::get_contract_for(const addr_t& address) const { return get_contract_for_ex(address); } std::shared_ptr Node::get_contract_for_ex(const addr_t& address, uint64_t* read_cost, const uint64_t gas_limit) const { if(auto contract = get_contract_ex(address, read_cost, gas_limit)) { return contract; } auto pubkey = contract::PubKey::create(); pubkey->address = address; return pubkey; } std::vector> Node::get_contracts(const std::vector& addresses) const { std::vector> res; for(const auto& addr : addresses) { res.push_back(get_contract(addr)); } return res; } std::vector Node::get_contracts_by(const std::vector& addresses, const vnx::optional& type_hash) const { std::vector result; for(const auto& address : addresses) { std::vector> list; deploy_map.find_range(std::make_tuple(address, 0, 0), std::make_tuple(address, -1, -1), list); for(const auto& entry : list) { if(!type_hash || entry.second == *type_hash) { result.push_back(entry.first); } } } return result; } std::vector Node::get_contracts_owned_by(const std::vector& addresses, const vnx::optional& type_hash) const { std::vector result; for(const auto& address : addresses) { std::vector> list; owner_map.find_range(std::make_tuple(address, 0, 0), std::make_tuple(address, -1, -1), list); for(const auto& entry : list) { if(!type_hash || entry.second == *type_hash) { result.push_back(entry.first); } } } return result; } uint128 Node::get_balance(const addr_t& address, const addr_t& currency) const { uint128 value = 0; balance_table.find(std::make_pair(address, currency), value); return value; } uint128 Node::get_total_balance(const std::vector& addresses, const addr_t& currency) const { uint128 total = 0; for(const auto& address : std::set(addresses.begin(), addresses.end())) { total += get_balance(address, currency); } return total; } std::map Node::get_balances(const addr_t& address, const std::set& whitelist, const int32_t& limit) const { return get_total_balances({address}, whitelist, limit); } std::map Node::get_contract_balances( const addr_t& address, const std::set& whitelist, const int32_t& limit) const { bool is_locked = false; if(auto exec = get_contract_as(address)) { if(auto bin = get_contract_as(exec->binary)) { const std::string method = "is_locked"; if(vm::find_method(bin, method)) { is_locked = call_contract(address, method, {}).to(); } } } std::map out; for(const auto& entry : get_total_balances({address}, whitelist, limit)) { const auto& amount = entry.second; auto& balance = out[entry.first]; if(is_locked) { balance.locked = amount; } else { balance.spendable = amount; } balance.total = amount; balance.is_validated = !whitelist.empty(); } return out; } std::map Node::get_total_balances( const std::vector& addresses, const std::set& whitelist, const int32_t& limit) const { std::map totals; for(const auto& address : std::set(addresses.begin(), addresses.end())) { if(whitelist.empty()) { std::vector, uint128>> result; balance_table.find_range(std::make_pair(address, addr_t()), std::make_pair(address, addr_t::ones()), result, limit); for(const auto& entry : result) { if(entry.second) { totals[entry.first.second] += entry.second; } } } else { for(const auto& currency : whitelist) { uint128 balance; balance_table.find(std::make_pair(address, currency), balance); if(balance) { totals[currency] += balance; } } } } return totals; } std::map, uint128> Node::get_all_balances( const std::vector& addresses, const std::set& whitelist, const int32_t& limit) const { std::map, uint128> totals; for(const auto& address : std::set(addresses.begin(), addresses.end())) { if(whitelist.empty()) { std::vector, uint128>> result; balance_table.find_range(std::make_pair(address, addr_t()), std::make_pair(address, addr_t::ones()), result, limit); for(const auto& entry : result) { if(entry.second) { totals[entry.first] += entry.second; } } } else { for(const auto& currency : whitelist) { uint128 balance; balance_table.find(std::make_pair(address, currency), balance); if(balance) { totals[std::make_pair(address, currency)] += balance; } } } } return totals; } std::vector Node::get_exec_history(const addr_t& address, const int32_t& limit, const vnx::bool_t& recent) const { std::vector entries; if(recent) { exec_log.find_last_range(std::make_tuple(address, 0, 0), std::make_tuple(address, -1, -1), entries, limit); } else { exec_log.find_range(std::make_tuple(address, 0, 0), std::make_tuple(address, -1, -1), entries, limit); } return entries; } std::map Node::read_storage(const addr_t& contract, const uint32_t& height) const { std::map out; if(auto exec = std::dynamic_pointer_cast(get_contract(contract))) { if(auto bin = std::dynamic_pointer_cast(get_contract(exec->binary))) { for(const auto& entry : bin->fields) { if(auto var = storage->read(contract, entry.second)) { out[entry.first] = std::move(var); } } } } return out; } std::map Node::dump_storage(const addr_t& contract, const uint32_t& height) const { const auto entries = storage->find_range(contract, vm::MEM_STATIC, -1, height); return std::map(entries.begin(), entries.end()); } vm::varptr_t Node::read_storage_var(const addr_t& contract, const uint64_t& address, const uint32_t& height) const { return storage->read_ex(contract, address, height); } vm::varptr_t Node::read_storage_entry_var(const addr_t& contract, const uint64_t& address, const uint64_t& key, const uint32_t& height) const { return storage->read_ex(contract, address, key, height); } std::pair Node::read_storage_field(const addr_t& contract, const std::string& name, const uint32_t& height) const { if(auto exec = get_contract_as(contract)) { if(auto bin = get_contract_as(exec->binary)) { if(auto addr = bin->find_field(name)) { return std::make_pair(read_storage_var(contract, *addr, height), *addr); } } } return {}; } std::tuple Node::read_storage_entry_var(const addr_t& contract, const std::string& name, const vm::varptr_t& key, const uint32_t& height) const { const auto field = read_storage_field(contract, name, height); if(auto var = field.first) { uint64_t address = field.second; if(var->type == vm::TYPE_REF) { address = vm::to_ref(var); } if(auto entry = storage->lookup(contract, key)) { return std::make_tuple(read_storage_entry_var(contract, address, entry, height), address, entry); } } return {}; } std::tuple Node::read_storage_entry_addr(const addr_t& contract, const std::string& name, const addr_t& key, const uint32_t& height) const { return read_storage_entry_var(contract, name, vm::to_binary(key), height); } std::tuple Node::read_storage_entry_string(const addr_t& contract, const std::string& name, const std::string& key, const uint32_t& height) const { return read_storage_entry_var(contract, name, vm::to_binary(key), height); } std::vector Node::read_storage_array(const addr_t& contract, const uint64_t& address, const uint32_t& height) const { return storage->read_array(contract, address, height); } std::map Node::read_storage_map(const addr_t& contract, const uint64_t& address, const uint32_t& height) const { std::map out; if(auto exec = std::dynamic_pointer_cast(get_contract(contract))) { if(auto bin = std::dynamic_pointer_cast(get_contract(exec->binary))) { auto engine = std::make_shared(contract, storage, true); engine->gas_limit = params->max_tx_cost; vm::load(engine, bin); for(const auto& entry : storage->find_entries(contract, address, height)) { // need to use engine to support constant keys if(auto key = engine->read(entry.first)) { out[vm::clone(key)] = entry.second; } } } } return out; } std::map Node::read_storage_object(const addr_t& contract, const uint64_t& address, const uint32_t& height) const { std::map out; for(const auto& entry : read_storage_map(contract, address, height)) { out[to_string_value(entry.first)] = entry.second; } return out; } vnx::Variant Node::call_contract( const addr_t& address, const std::string& method, const std::vector& args, const vnx::optional& user, const vnx::optional>& deposit) const { // Note: consensus relevant if(auto exec = get_contract_as(address)) { if(auto bin = get_contract_as(exec->binary)) { auto func = vm::find_method(bin, method); if(!func) { throw std::runtime_error("no such method: " + method); } auto engine = std::make_shared(address, storage, func->is_const); engine->gas_limit = params->max_tx_cost; vm::load(engine, bin); engine->write(vm::MEM_EXTERN + vm::EXTERN_TXID, vm::var_t()); engine->write(vm::MEM_EXTERN + vm::EXTERN_HEIGHT, vm::uint_t(get_height())); engine->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(address)); engine->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(params->network)); if(user) { engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::to_binary(*user)); } else { engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::var_t()); } if(deposit) { vm::set_deposit(engine, deposit->first, deposit->second); } vm::set_args(engine, args); try { vm::execute(engine, *func, false); } catch(const std::exception& ex) { if(auto line = bin->find_line(engine->error_addr)) { throw std::runtime_error("exception at 0x" + vnx::to_hex_string(engine->error_addr) + ", line " + std::to_string(*line) + ": " + ex.what()); } else { throw std::runtime_error("exception at 0x" + vnx::to_hex_string(engine->error_addr) + ": " + ex.what()); } } return vm::read(engine, vm::MEM_STACK); } throw std::runtime_error("no such binary"); } throw std::runtime_error("no such contract"); } uint128 Node::get_total_supply(const addr_t& currency) const { uint128 total = 0; total_supply_map.find(currency, total); return clamped_sub(total, get_balance(addr_t(), currency)); } vnx::optional Node::get_plot_nft_info(const addr_t& address) const { if(auto exec = get_contract_as(address)) { if(exec->binary == params->plot_nft_binary) { auto data = read_storage(address); plot_nft_info_t info; info.name = exec->name; info.owner = to_addr(data["owner"]); info.address = address; const auto& unlock_height = data["unlock_height"]; if(unlock_height && unlock_height->type == vm::TYPE_UINT) { const uint32_t unlock_at = to_uint(unlock_height); info.unlock_height = unlock_at; info.is_locked = get_height() < unlock_at; } else { info.is_locked = true; } if(info.is_locked) { info.target = to_addr(data["target"]); } const auto server_url = data["server_url"]; if(server_url && server_url->type == vm::TYPE_STRING) { info.server_url = to_string_value(server_url); } return info; } } return nullptr; } addr_t Node::get_plot_nft_target(const addr_t& address, const vnx::optional& farmer_addr) const { // Note: consensus relevant if(auto exec = get_contract_as(address)) try { if(auto bin = get_contract_as(exec->binary)) { const std::string method = "mmx_reward_target"; if(vm::find_method(bin, method)) { vnx::Variant arg0; if(farmer_addr) { arg0 = farmer_addr->to_string(); } return call_contract(address, method, {arg0}).to(); } } } catch(const std::exception& ex) { throw std::logic_error("mmx_reward_target() failed with: " + std::string(ex.what())); } return address; } offer_data_t Node::get_offer(const addr_t& address) const { auto data = read_storage(address); if(data.empty()) { throw std::runtime_error("no such offer: " + address.to_string()); } offer_data_t out; out.address = address; { tx_index_t entry; if(tx_index.find(address, entry)) { out.height = entry.height; out.time_stamp = entry.time_stamp; } } if(auto partner = data["partner"]) { if(partner->type != vm::TYPE_NIL) { out.partner = to_addr(partner); } } out.owner = to_addr(data["owner"]); out.bid_currency = to_addr(data["bid_currency"]); out.ask_currency = to_addr(data["ask_currency"]); out.bid_balance = get_balance(address, out.bid_currency); out.ask_balance = get_balance(address, out.ask_currency); out.inv_price = to_uint(data["inv_price"]); out.last_update = to_uint(data["last_update"]); out.price = out.get_price(); out.ask_amount = out.get_ask_amount(out.bid_balance); return out; } int Node::get_offer_state(const addr_t& address) const { if(get_balance(address, to_addr(read_storage_field(address, "bid_currency").first))) { return 1; } if(get_balance(address, to_addr(read_storage_field(address, "ask_currency").first))) { return 2; } return 0; } std::vector Node::fetch_offers(const std::vector& addresses, const vnx::bool_t& state, const vnx::bool_t& closed) const { std::vector out; for(const auto& address : addresses) { const int offer_state = state ? get_offer_state(address) : -1; if(!state || offer_state == 1 || (closed && offer_state == 2)) { const auto data = get_offer(address); if(!data.partner && !data.is_scam()) { out.push_back(data); } } } return out; } std::vector Node::get_offers(const uint32_t& since, const vnx::bool_t& state) const { std::vector entries; contract_log.find_range(std::make_tuple(params->offer_binary, since, 0), std::make_tuple(params->offer_binary, -1, -1), entries); return fetch_offers(entries, state); } std::vector Node::get_offers_by(const std::vector& owners, const vnx::bool_t& state) const { return fetch_offers(get_contracts_owned_by(owners, params->offer_binary), state, true); } std::vector Node::get_recent_offers(const int32_t& limit, const vnx::bool_t& state) const { std::vector result; std::tuple offer_log_end(params->offer_binary, -1, -1); std::tuple offer_log_begin(params->offer_binary, 0, 0); while(result.size() < size_t(limit)) { std::vector, addr_t>> entries; if(!contract_log.find_last_range(offer_log_begin, offer_log_end, entries, std::max(limit, 100))) { break; } offer_log_end = entries.back().first; std::vector list; for(const auto& entry : entries) { list.push_back(entry.second); } const auto tmp = fetch_offers(list, state); result.insert(result.end(), tmp.begin(), tmp.end()); } result.resize(std::min(result.size(), size_t(limit))); return result; } std::vector Node::get_recent_offers_for( const vnx::optional& bid, const vnx::optional& ask, const uint128& min_bid, const int32_t& limit, const vnx::bool_t& state) const { std::vector result; if(!bid && !ask) { result = get_recent_offers(limit, state); } else { hash_t key; if(bid && ask) { key = hash_t(*ask + *bid); } else if(bid) { key = hash_t("ANY" + *bid); } else if(ask) { key = hash_t(*ask + "ANY"); } std::tuple search_end(key, -1, -1); while(result.size() < size_t(limit)) { std::vector, addr_t>> list; if(!offer_index.find_last_range(std::make_tuple(key, 0, 0), search_end, list, limit)) { break; } std::vector addresses; for(const auto& entry : list) { addresses.push_back(entry.second); } for(const auto& entry : fetch_offers(addresses, state)) { if(entry.bid_balance >= min_bid) { result.push_back(entry); } } search_end = list.back().first; } } std::sort(result.begin(), result.end(), [](const offer_data_t& L, const offer_data_t& R) -> bool { return std::make_pair(L.height, L.address) > std::make_pair(R.height, R.address); }); result.resize(std::min(result.size(), size_t(limit))); return result; } trade_entry_t Node::make_trade_entry(const uint32_t& height, const trade_log_t& log) const { trade_entry_t out; out.height = height; out.time_stamp = log.time_stamp; out.address = log.address; out.txid = log.txid; out.ask_amount = log.ask_amount; out.bid_amount = log.get_bid_amount(); out.price = log.get_price(); out.bid_currency = to_addr(read_storage_field(log.address, "bid_currency").first); out.ask_currency = to_addr(read_storage_field(log.address, "ask_currency").first); return out; } std::vector Node::get_trade_history(const int32_t& limit, const uint32_t& since) const { std::vector, trade_log_t>> entries; trade_log.find_last_range(std::make_pair(since, 0), std::make_pair(-1, -1), entries, limit); std::vector result; for(const auto& entry : entries) { result.push_back(make_trade_entry(entry.first.first, entry.second)); } return result; } std::vector Node::get_trade_history_for( const vnx::optional& bid, const vnx::optional& ask, const int32_t& limit, const uint32_t& since) const { if(!bid && !ask) { return get_trade_history(limit, since); } hash_t key; if(bid && ask) { key = hash_t((*ask) + (*bid)); } else if(bid) { key = hash_t("ANY" + (*bid)); } else if(ask) { key = hash_t((*ask) + "ANY"); } std::vector, bool>> entries; trade_index.find_last_range(std::make_tuple(key, since, 0), std::make_tuple(key, -1, -1), entries, limit); std::vector result; for(const auto& entry : entries) { const auto& height = std::get<1>(entry.first); const auto& counter = std::get<2>(entry.first); trade_log_t log; if(trade_log.find(std::make_pair(height, counter), log)) { result.push_back(make_trade_entry(height, log)); } } return result; } std::vector Node::get_swaps( const uint32_t& since, const vnx::optional& token, const vnx::optional& currency, const int32_t& limit) const { std::vector list; if(!token && !currency) { contract_log.find_range(std::make_tuple(params->swap_binary, since, 0), std::make_tuple(params->swap_binary, -1, -1), list, limit); } else { hash_t key; if(token && currency) { key = hash_t(*token + *currency); } else if(token) { key = hash_t(*token + "ANY"); } else if(currency) { key = hash_t("ANY" + *currency); } swap_index.find_range(std::make_tuple(key, since, 0), std::make_tuple(key, -1, -1), list, limit); } std::vector result; for(const auto& address : list) { result.push_back(get_swap_info(address)); } if(token) { std::sort(result.begin(), result.end(), [](const swap_info_t& L, const swap_info_t& R) -> bool { return L.balance[0] > R.balance[0]; }); } else if(currency) { std::sort(result.begin(), result.end(), [](const swap_info_t& L, const swap_info_t& R) -> bool { return L.balance[1] > R.balance[1]; }); } else { std::sort(result.begin(), result.end(), [](const swap_info_t& L, const swap_info_t& R) -> bool { if(!L.user_total[0] || !L.user_total[1]) { return false; } if(!R.user_total[0] || !R.user_total[1]) { return true; } return (L.avg_apy_7d[0] + L.avg_apy_7d[1]) > (R.avg_apy_7d[0] + R.avg_apy_7d[1]); }); } return result; } swap_info_t Node::get_swap_info(const addr_t& address) const { auto swap = get_contract_as(address); if(!swap) { throw std::runtime_error("no such swap: " + address.to_string()); } const auto height = get_height(); swap_info_t out; out.name = swap->name; out.address = address; auto data = read_storage(address); const auto ref_volume = to_ref(data["volume"]); const auto tokens = read_storage_array(address, to_ref(data["tokens"])); const auto volume = read_storage_array(address, ref_volume); for(size_t i = 0; i < 2 && i < tokens.size(); ++i) { out.tokens[i] = to_addr(tokens[i]); out.volume[i] = to_uint(volume[i]); out.wallet[i] = get_balance(address, out.tokens[i]); } const auto fee_rates = read_storage_array(address, to_ref(data["fee_rates"])); for(const auto& value : fee_rates) { out.fee_rates.push_back(uint128(to_uint(value)).to_double() / pow(2, 64)); } const auto state = read_storage_array(address, to_ref(data["state"])); uint256_t prev_fees_paid_1d[2] = {}; uint256_t prev_fees_paid_7d[2] = {}; for(const auto& entry : state) { auto obj = read_storage_object(address, to_ref(entry)); const auto balance = read_storage_array(address, to_ref(obj["balance"])); const auto fees_paid = read_storage_array(address, to_ref(obj["fees_paid"])); const auto fees_claimed = read_storage_array(address, to_ref(obj["fees_claimed"])); const auto user_total = read_storage_array(address, to_ref(obj["user_total"])); swap_pool_info_t pool; for(size_t i = 0; i < 2 && i < balance.size(); ++i) { pool.balance[i] = to_uint(balance[i]); } for(size_t i = 0; i < 2 && i < fees_paid.size(); ++i) { pool.fees_paid[i] = to_uint(fees_paid[i]); } for(size_t i = 0; i < 2 && i < fees_claimed.size(); ++i) { pool.fees_claimed[i] = to_uint(fees_claimed[i]); } for(size_t i = 0; i < 2 && i < user_total.size(); ++i) { pool.user_total[i] = to_uint(user_total[i]); } for(size_t i = 0; i < 2; ++i) { out.balance[i] += pool.balance[i]; out.fees_paid[i] += pool.fees_paid[i]; out.fees_claimed[i] += pool.fees_claimed[i]; out.user_total[i] += pool.user_total[i]; } const auto ref_fees_paid = to_ref(obj["fees_paid"]); { const auto prev_fees_paid = read_storage_array(address, ref_fees_paid, height - std::min(8640u, height)); for(size_t i = 0; i < 2 && i < prev_fees_paid.size(); ++i) { prev_fees_paid_1d[i] += to_uint(prev_fees_paid[i]); } } { const auto prev_fees_paid = read_storage_array(address, ref_fees_paid, height - std::min(60480u, height)); for(size_t i = 0; i < 2 && i < prev_fees_paid.size(); ++i) { prev_fees_paid_7d[i] += to_uint(prev_fees_paid[i]); } } out.pools.push_back(pool); } out.volume_1d = out.volume; out.volume_7d = out.volume; { const auto prev_volume = read_storage_array(address, ref_volume, height - std::min(8640u, height)); for(size_t i = 0; i < 2 && i < prev_volume.size(); ++i) { out.volume_1d[i] = out.volume[i] - to_uint(prev_volume[i]); } } { const auto prev_volume = read_storage_array(address, ref_volume, height - std::min(60480u, height)); for(size_t i = 0; i < 2 && i < prev_volume.size(); ++i) { out.volume_7d[i] = out.volume[i] - to_uint(prev_volume[i]); } } for(size_t i = 0; i < 2; ++i) { out.avg_apy_1d[i] = uint128(365 * (out.fees_paid[i] - prev_fees_paid_1d[i])).to_double() / out.user_total[i].to_double(); } for(size_t i = 0; i < 2; ++i) { out.avg_apy_7d[i] = uint128(52 * (out.fees_paid[i] - prev_fees_paid_7d[i])).to_double() / out.user_total[i].to_double(); } return out; } swap_user_info_t Node::get_swap_user_info(const addr_t& address, const addr_t& user) const { swap_user_info_t out; const auto key = storage->lookup(address, vm::to_binary(user)); const auto users = read_storage_field(address, "users"); const auto user_ref = storage->read(address, to_ref(users.first), key); if(!user_ref) { return out; } auto data = read_storage_object(address, to_ref(user_ref.get())); out.pool_idx = to_uint(data["pool_idx"]).lower().lower(); out.unlock_height = to_uint(data["unlock_height"]); const auto balance = read_storage_array(address, to_ref(data["balance"])); const auto last_user_total = read_storage_array(address, to_ref(data["last_user_total"])); const auto last_fees_paid = read_storage_array(address, to_ref(data["last_fees_paid"])); for(size_t i = 0; i < 2 && i < balance.size(); ++i) { out.balance[i] = to_uint(balance[i]); } for(size_t i = 0; i < 2 && i < last_user_total.size(); ++i) { out.last_user_total[i] = to_uint(last_user_total[i]); } for(size_t i = 0; i < 2 && i < last_fees_paid.size(); ++i) { out.last_fees_paid[i] = to_uint(last_fees_paid[i]); } out.fees_earned = get_swap_fees_earned(address, user); out.equivalent_liquidity = get_swap_equivalent_liquidity(address, user); return out; } std::vector Node::get_swap_history(const addr_t& address, const int32_t& limit) const { const auto info = get_swap_info(address); std::array, 2> tokens; for(int i = 0; i < 2; ++i) { tokens[i] = get_contract_as(info.tokens[i]); } std::vector result; for(const auto& entry : get_exec_history(address, limit, true)) { swap_entry_t out; out.height = entry.height; out.time_stamp = entry.time_stamp; out.txid = entry.txid; out.user = entry.user; out.index = -1; if(entry.method == "trade") { if(entry.deposit && entry.args.size() >= 2) { const auto index = entry.args[0].to(); out.type = (index ? "BUY" : "SELL"); out.index = index; out.amount = entry.deposit->second; out.user = entry.args[1].to(); } } else if(entry.method == "add_liquid" || entry.method == "rem_liquid") { out.type = (entry.method == "add_liquid") ? "ADD" : "REMOVE"; if(entry.args.size() >= 1) { out.index = entry.args[0].to(); if(entry.deposit) { out.amount = entry.deposit->second; } else if(entry.args.size() >= 2) { out.amount = entry.args[1].to(); } } } else if(entry.method == "rem_all_liquid") { out.type = "REMOVE_ALL"; } else if(entry.method == "payout") { out.type = "PAYOUT"; } else if(entry.method == "switch_pool") { out.type = "SWITCH"; } if(out.index < 2) { if(auto token = tokens[out.index]) { out.value = to_value(out.amount, token->decimals); out.symbol = token->symbol; } else if(info.tokens[out.index] == addr_t()) { out.value = to_value(out.amount, params->decimals); out.symbol = "MMX"; } } result.push_back(out); } return result; } std::array Node::get_swap_trade_estimate(const addr_t& address, const uint32_t& i, const uint128& amount, const int32_t& num_iter) const { const auto info = get_swap_info(address); std::vector args; args.emplace_back(i); args.emplace_back(address.to_string()); args.emplace_back(nullptr); args.emplace_back(num_iter); const auto ret = call_contract(address, "trade", args, nullptr, std::make_pair(info.tokens[i], amount)).to>(); return {ret[0] - ret[1], ret[1]}; } std::array Node::get_swap_fees_earned(const addr_t& address, const addr_t& user) const { return call_contract(address, "get_earned_fees", {vnx::Variant(user.to_string())}).to>(); } std::array Node::get_swap_equivalent_liquidity(const addr_t& address, const addr_t& user) const { return call_contract(address, "rem_all_liquid", {vnx::Variant(true)}, user).to>(); } std::map, 2>> Node::get_swap_liquidity_by(const std::vector& addresses) const { std::map> swaps; for(const auto& address : addresses) { std::vector, std::array>> entries; swap_liquid_map.find_range(std::make_pair(address, addr_t()), std::make_pair(address, addr_t::ones()), entries); for(const auto& entry : entries) { auto& out = swaps[entry.first.second]; for(int i = 0; i < 2; ++i) { out[i] += entry.second[i]; } } } std::map, 2>> result; for(const auto& entry : swaps) { auto& out = result[entry.first]; const auto info = get_swap_info(entry.first); for(int i = 0; i < 2; ++i) { out[i] = std::make_pair(info.tokens[i], entry.second[i]); } } return result; } std::vector> Node::get_farmed_blocks( const std::vector& farmer_keys, const vnx::bool_t& full_blocks, const uint32_t& since, const int32_t& limit) const { std::vector entries; for(const auto& key : farmer_keys) { std::vector tmp; farmer_block_map.find_last_range(std::make_pair(key, since), std::make_pair(key, -1), tmp, size_t(limit)); entries.insert(entries.end(), tmp.begin(), tmp.end()); } // need to sort in case multiple keys std::sort(entries.begin(), entries.end(), [](const farmed_block_info_t& L, const farmed_block_info_t& R) -> bool { return L.height > R.height; }); if(limit >= 0) { if(entries.size() > size_t(limit)) { entries.resize(limit); } } else { std::reverse(entries.begin(), entries.end()); } std::vector> out; for(const auto& entry : entries) { out.push_back(get_block_at_ex(entry.height, full_blocks)); } return out; } farmed_block_summary_t Node::get_farmed_block_summary(const std::vector& farmer_keys, const uint32_t& since) const { farmed_block_summary_t out; for(const auto& key : farmer_keys) { std::vector tmp; farmer_block_map.find_range(std::make_pair(key, since), std::make_pair(key, -1), tmp); for(const auto& entry : tmp) { out.num_blocks++; out.last_height = std::max(entry.height, out.last_height); out.total_rewards += entry.reward; out.reward_map[entry.reward_addr] += entry.reward; } } return out; } std::vector> Node::get_farmer_ranking(const int32_t& limit) const { if(limit < 0) { return farmer_ranking; } std::vector> out; for(const auto& entry : farmer_ranking) { if(out.size() < size_t(limit)) { out.push_back(entry); } else { break; } } return out; } std::tuple Node::verify_plot_nft_target(const addr_t& address, const addr_t& pool_target) const { if(!is_synced) { throw std::logic_error("out of sync"); } try { const auto exec = get_contract_as(address); if(!exec || exec->binary != params->plot_nft_binary) { return {pooling_error_e::INVALID_CONTRACT, "Not a Plot NFT contract: " + address.to_string()}; } const auto target = get_plot_nft_target(address); if(target != pool_target) { return {pooling_error_e::INVALID_CONTRACT, "Plot NFT not pointing at expected pool target: " + target.to_string()}; } } catch(const std::exception& ex) { return {pooling_error_e::INVALID_CONTRACT, "Plot NFT target resolution failed with: " + std::string(ex.what())}; } return {pooling_error_e::NONE, ""}; } std::tuple Node::verify_partial( std::shared_ptr partial, const vnx::optional& pool_target) const { if(!is_synced) { throw std::logic_error("out of sync"); } if(!partial) { throw std::logic_error("partial == null"); } if(!partial->proof) { return {pooling_error_e::INVALID_PROOF, "Partial has no proof"}; } if(partial->hash != partial->calc_hash()) { return {pooling_error_e::INVALID_SIGNATURE, "Message hash mismatch"}; } if(!partial->farmer_sig) { return {pooling_error_e::INVALID_SIGNATURE, "Missing signature"}; } if(!partial->farmer_sig->verify(partial->proof->farmer_key, partial->hash)) { return {pooling_error_e::INVALID_SIGNATURE, "Signature verification failed"}; } if(partial->vdf_height > get_vdf_height()) { return {pooling_error_e::CHALLENGE_NOT_CONFIRMED, "Partial height not reached yet"}; } hash_t challenge; uint64_t space_diff = 0; if(!find_challenge(partial->vdf_height, challenge, space_diff)) { return {pooling_error_e::CHALLENGE_NOT_FOUND, "Could not find challenge"}; } if(partial->proof->challenge != challenge) { return {pooling_error_e::CHALLENGE_REVERTED, "Challenge mismatch, expected " + challenge.to_string()}; } try { verify_proof(partial->proof, challenge, partial->proof->difficulty, partial->vdf_height); } catch(const std::exception& ex) { return {pooling_error_e::INVALID_PROOF, "Invalid proof: " + std::string(ex.what())}; } if(pool_target) { if(auto nft = std::dynamic_pointer_cast(partial->proof)) { if(partial->contract != nft->contract) { return {pooling_error_e::INVALID_CONTRACT, "Partial 'contract' does not match proof of space"}; } const auto ret = verify_plot_nft_target(nft->contract, *pool_target); if(std::get<0>(ret) != pooling_error_e::NONE) { return ret; } } else { return {pooling_error_e::INVALID_CONTRACT, "Invalid proof type: " + partial->proof->get_type_name()}; } } return {pooling_error_e::NONE, ""}; } uint32_t Node::get_vdf_height() const { return get_vdf_peak_ex().first; } hash_t Node::get_vdf_peak() const { return get_vdf_peak_ex().second; } void Node::http_request_async( std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const { http->http_request(request, sub_path, request_id, vnx_request->session); } void Node::http_request_chunk_async(std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const { throw std::logic_error("not implemented"); } void Node::async_api_call(std::shared_ptr method, const vnx::request_id_t& request_id) { try { std::shared_ptr ret; { std::shared_lock lock(db_mutex); ret = NodeBase::vnx_call_switch(method, request_id); } vnx_async_return(request_id, ret); } catch(const std::exception& ex) { vnx_async_return_ex(request_id, ex); } catch(...) { vnx_async_return(request_id, vnx::InternalError::create()); } } std::shared_ptr Node::vnx_call_switch(std::shared_ptr method, const vnx::request_id_t& request_id) { switch(method->get_type_hash()) { // Note: NOT thread-safe: // - http_request() // - get_network_info() case Node_get_block::VNX_TYPE_ID: case Node_get_block_at::VNX_TYPE_ID: case Node_get_header::VNX_TYPE_ID: case Node_get_header_at::VNX_TYPE_ID: case Node_get_tx_ids::VNX_TYPE_ID: case Node_get_tx_ids_at::VNX_TYPE_ID: case Node_get_tx_ids_since::VNX_TYPE_ID: case Node_get_tx_height::VNX_TYPE_ID: case Node_get_tx_info::VNX_TYPE_ID: case Node_get_tx_info_for::VNX_TYPE_ID: case Node_get_transaction::VNX_TYPE_ID: case Node_get_transactions::VNX_TYPE_ID: case Node_get_history::VNX_TYPE_ID: case Node_get_history_memo::VNX_TYPE_ID: case Node_get_contract::VNX_TYPE_ID: case Node_get_contract_for::VNX_TYPE_ID: case Node_get_contracts::VNX_TYPE_ID: case Node_get_contracts_by::VNX_TYPE_ID: case Node_get_contracts_owned_by::VNX_TYPE_ID: case Node_get_balance::VNX_TYPE_ID: case Node_get_total_balance::VNX_TYPE_ID: case Node_get_balances::VNX_TYPE_ID: case Node_get_contract_balances::VNX_TYPE_ID: case Node_get_total_balances::VNX_TYPE_ID: case Node_get_all_balances::VNX_TYPE_ID: case Node_get_exec_history::VNX_TYPE_ID: case Node_read_storage::VNX_TYPE_ID: case Node_dump_storage::VNX_TYPE_ID: case Node_read_storage_var::VNX_TYPE_ID: case Node_read_storage_entry_var::VNX_TYPE_ID: case Node_read_storage_field::VNX_TYPE_ID: case Node_read_storage_entry_addr::VNX_TYPE_ID: case Node_read_storage_entry_string::VNX_TYPE_ID: case Node_read_storage_array::VNX_TYPE_ID: case Node_read_storage_map::VNX_TYPE_ID: case Node_read_storage_object::VNX_TYPE_ID: case Node_call_contract::VNX_TYPE_ID: case Node_get_total_supply::VNX_TYPE_ID: case Node_get_offer::VNX_TYPE_ID: case Node_fetch_offers::VNX_TYPE_ID: case Node_get_offers::VNX_TYPE_ID: case Node_get_offers_by::VNX_TYPE_ID: case Node_get_recent_offers::VNX_TYPE_ID: case Node_get_recent_offers_for::VNX_TYPE_ID: case Node_get_trade_history::VNX_TYPE_ID: case Node_get_trade_history_for::VNX_TYPE_ID: case Node_get_swaps::VNX_TYPE_ID: case Node_get_swap_info::VNX_TYPE_ID: case Node_get_swap_user_info::VNX_TYPE_ID: case Node_get_swap_history::VNX_TYPE_ID: case Node_get_swap_trade_estimate::VNX_TYPE_ID: case Node_get_swap_fees_earned::VNX_TYPE_ID: case Node_get_swap_equivalent_liquidity::VNX_TYPE_ID: case Node_get_swap_liquidity_by::VNX_TYPE_ID: case Node_get_farmed_blocks::VNX_TYPE_ID: case Node_get_farmer_ranking::VNX_TYPE_ID: case Node_get_farmed_block_summary::VNX_TYPE_ID: case Node_get_plot_nft_info::VNX_TYPE_ID: case Node_get_plot_nft_target::VNX_TYPE_ID: case Node_validate::VNX_TYPE_ID: case Node_verify_plot_nft_target::VNX_TYPE_ID: case Node_verify_partial::VNX_TYPE_ID: case Node_get_vdf_peak::VNX_TYPE_ID: case Node_get_vdf_height::VNX_TYPE_ID: api_threads->add_task(std::bind(&Node::async_api_call, this, method, request_id)); return nullptr; default: return NodeBase::vnx_call_switch(method, request_id); } } } // mmx ================================================ FILE: src/Node_control.cpp ================================================ /* * Node_control.cpp * * Created on: May 6, 2024 * Author: mad */ #include #include #include #include #include static bool is_expired(const std::string& file_path, const int64_t max_age_sec = 3600 * 24) { vnx::File file(file_path); return !file.exists() || file.last_write_time() + max_age_sec < mmx::get_time_sec(); } namespace mmx { void Node::update_control() { const auto fetch_func = [this](const std::string& url, const std::string& file_path, const std::string& key, const std::string& options = "") { try { http_request_file(url, file_path, options); if(vnx::do_run()) { add_task(std::bind(&Node::update_control, this)); } } catch(const std::exception& ex) { log(WARN) << "Failed to fetch " << Url::Url(url).setQuery({}).str(); } if(vnx::do_run()) { std::lock_guard lock(fetch_mutex); pending_fetch.erase(key); } }; std::lock_guard lock(fetch_mutex); bool try_again = false; vnx::optional metalsdev_price; { const std::string file_path = storage_path + "metalsdev_xau_usd.json"; if(is_expired(file_path)) { const std::string key = "api.metals.dev"; if(pending_fetch.insert(key).second) { std::string param; if(metalsdev_api_key.empty()) { const auto tmp = vnx::from_hex_string("6170695f6b65793d554a4f4f584b43364756575739484e4a494b594e3537394e4a494b594e"); param = std::string((const char*)tmp.data(), tmp.size()); } else { param = "api_key=" + metalsdev_api_key; } fetch_threads->add_task(std::bind( fetch_func, "https://api.metals.dev/v1/metal/spot?" + param + "&metal=gold¤cy=USD", file_path, key)); } try_again = true; } else { try { std::ifstream stream(file_path); const auto json = vnx::read_json(stream, true); if(!json) { throw std::logic_error("empty file"); } const auto object = json->to_object(); if(object["status"].to_string_value() != "success") { throw std::logic_error("bad status: " + object["status"].to_string_value()); } if(object["metal"].to_string_value() != "gold") { throw std::logic_error("expected gold"); } if(object["unit"].to_string_value() != "toz") { throw std::logic_error("expected unit toz"); } if(object["currency"].to_string_value() != "USD") { throw std::logic_error("expected currency USD"); } const auto rate = object["rate"].to_object(); const auto price = rate["price"].to(); if(price <= 0) { throw std::logic_error("invalid price: " + std::to_string(price)); } metalsdev_price = price; log(INFO) << "Got metals.dev XAU price: " << price << " USD"; } catch(const std::exception& ex) { log(WARN) << "Failed to parse " << file_path << ": " << ex.what(); } } } vnx::optional swissquote_price; { const std::string file_path = storage_path + "swissquote_xau_usd.json"; if(is_expired(file_path)) { const std::string key = "forex-data-feed.swissquote.com"; if(pending_fetch.insert(key).second) { fetch_threads->add_task(std::bind( fetch_func, "https://forex-data-feed.swissquote.com/public-quotes/bboquotes/instrument/XAU/USD", file_path, key)); } try_again = true; } else { try { std::ifstream stream(file_path); const auto json = vnx::read_json(stream, true); if(!json) { throw std::logic_error("empty file"); } const auto array = std::dynamic_pointer_cast(json); if(!array) { throw std::logic_error("top level not an array"); } const auto list = array->get_values(); if(list.empty()) { throw std::logic_error("empty list"); } const auto MT5 = list[0]->to_object(); const auto profiles = MT5["spreadProfilePrices"].to>(); if(profiles.empty()) { throw std::logic_error("found no MT5 profiles"); } const auto prime = profiles[0].to_object(); const auto bid = prime["bid"].to(); const auto ask = prime["ask"].to(); if(bid <= 0 || ask <= 0 || bid / ask > 1.1) { throw std::logic_error("invalid bid or ask price: " + std::to_string(bid) + " / " + std::to_string(ask)); } const auto price = (bid + ask) / 2; swissquote_price = price; log(INFO) << "Got swissquote.com XAU price: " << price << " USD"; } catch(const std::exception& ex) { log(WARN) << "Failed to parse " << file_path << ": " << ex.what(); } } } double gold_price_usd = 0; if(metalsdev_price) { gold_price_usd = *metalsdev_price; } else if(swissquote_price) { gold_price_usd = *swissquote_price; } else { if(!try_again) { reward_vote = 0; log(WARN) << "Failed to query XAU price information!"; } return; } std::vector mmx_price_inputs_usd; if(mmx_usd_swap_addr != addr_t()) try { const auto swap_info = get_swap_info(mmx_usd_swap_addr); const auto usd_contract_addr = swap_info.tokens[1]; const auto usd_contract = get_contract_as(usd_contract_addr); if(!usd_contract) { throw std::runtime_error("could not find USD contract: " + usd_contract_addr.to_string()); } if(!swap_info.balance[0] || !swap_info.balance[1]) { throw std::runtime_error("missing swap liquidity"); } const auto price = to_value(swap_info.balance[1], usd_contract->decimals) / to_value(swap_info.balance[0], params->decimals); mmx_price_inputs_usd.push_back(price); } catch(const std::exception& ex) { log(WARN) << "Failed to get MMX swap price: " << ex.what(); } { const std::string file_path = storage_path + "safetrade_mmx_usdt.json"; if(is_expired(file_path)) { const std::string key = "safetrade.com"; if(pending_fetch.insert(key).second) { const auto tmp = vnx::from_hex_string("2d482022757365722d6167656e743a204d4d582d4e6f64652d313133333722"); const std::string options((const char*)tmp.data(), tmp.size()); fetch_threads->add_task(std::bind( fetch_func, "https://safe.trade/api/v2/trade/public/currencies/mmx", file_path, key, options)); } try_again = true; } else { try { std::ifstream stream(file_path); const auto json = vnx::read_json(stream, true); if(!json) { throw std::logic_error("empty file"); } const auto object = json->to_object(); if(object["status"].to_string_value() != "enabled") { throw std::logic_error("bad status: " + object["status"].to_string_value()); } if(object["id"].to_string_value() != "mmx") { throw std::logic_error("expected MMX"); } const auto price = std::stod(object["price"].to_string_value()); if(price <= 0) { throw std::logic_error("invalid price: " + std::to_string(price)); } mmx_price_inputs_usd.push_back(price); log(INFO) << "Got safetrade.com MMX price: " << price << " USD"; } catch(const std::exception& ex) { log(WARN) << "Failed to parse " << file_path << ": " << ex.what(); } } } if(mmx_price_inputs_usd.empty()) { if(!try_again) { reward_vote = 0; log(INFO) << "Reward voting is disabled due to lack of MMX swap / exchange"; } return; } std::sort(mmx_price_inputs_usd.begin(), mmx_price_inputs_usd.end()); double mmx_price_usd = 0; if(mmx_price_inputs_usd.size() % 2) { mmx_price_usd = mmx_price_inputs_usd[mmx_price_inputs_usd.size() / 2]; } else { const auto low = mmx_price_inputs_usd.size() / 2; mmx_price_usd = (mmx_price_inputs_usd[low] + mmx_price_inputs_usd[low + 1]) / 2; } const auto current = gold_price_usd / mmx_price_usd; if(current > params->target_mmx_gold_price * 1.01) { reward_vote = -1; } else if(current < params->target_mmx_gold_price / 1.01) { reward_vote = 1; } else { reward_vote = 0; } log(INFO) << u8"\U0001F4B5 MMX price = " << mmx_price_usd << " USD, XAU price = " << gold_price_usd << " USD, MMX per ounce = " << current << " MMX (target " << params->target_mmx_gold_price << "), reward vote = " << reward_vote; } } // mmx ================================================ FILE: src/Node_tests.cpp ================================================ /* * Node_tests.cpp * * Created on: Jan 5, 2025 * Author: mad */ #include #include #include namespace mmx { std::shared_ptr Node::create_test_block(std::shared_ptr prev, const bool valid) { const skey_t farmer_sk(hash_t("test")); const pubkey_t farmer_key(farmer_sk); const auto proof = ProofOfSpaceOG::create(); proof->ksize = 32; proof->score = 256; proof->farmer_key = farmer_key; proof->challenge = hash_t::random(); get_challenge(prev, 1, proof->difficulty); proof->proof_xs.resize(256); std::generate(proof->proof_xs.begin(), proof->proof_xs.end(), []() { return vnx::rand64(); }); proof_data_t proof_data; proof_data.hash = proof->calc_proof_hash(); proof_data.proof = proof; auto& proofs = proof_map[proof->challenge]; proofs.clear(); for(uint32_t i = 0; i < params->max_proof_count; ++i) { proofs.push_back(proof_data); } auto point = VDF_Point::create(); point->vdf_height = prev->vdf_height + 1; point->start = prev->vdf_iters; point->input = prev->vdf_output; point->output = hash_t::random(); point->prev = get_infusion(prev, 0, point->num_iters); point->content_hash = point->calc_hash(); vdf_tree.emplace(point->output, point); vdf_index.emplace(point->start + point->num_iters, point); const auto prev_state = state_hash; try { auto out = vnx::clone(make_block(prev, {point}, proof->challenge)); out->nonce = 1337; out->reward_addr = hash_t("test"); if(!valid) { out->reward_vote = 2; } out->hash = out->calc_hash(); out->farmer_sig = signature_t::sign(farmer_sk, out->hash); out->content_hash = out->calc_content_hash(); fork_to(prev_state); return out; } catch(...) { fork_to(prev_state); throw; } } std::shared_ptr Node::create_test_fork(std::shared_ptr prev, const bool valid) { auto fork = std::make_shared(); fork->block = create_test_block(prev, valid); fork->is_vdf_verified = true; fork->is_proof_verified = true; return fork; } void Node::test_all() { const auto old_peak = get_peak(); const auto old_root = get_root(); const auto version = db_blocks->version(); log(INFO) << "Running tests ..."; log(INFO) << "Root is at height " << old_root->height << " hash " << old_root->hash; log(INFO) << "Peak is at height " << old_peak->height << " hash " << old_peak->hash; // simple revert { const int length = 5; std::shared_ptr start; auto block = old_peak; for(int i = 0; i < length; ++i) { auto fork = create_test_fork(block); if(!start) { start = fork; } add_fork(fork); block = fork->block; } log(INFO) << "Extended peak to height " << block->height << " hash " << block->hash; update(); if(get_peak()->hash != block->hash) { throw std::logic_error("extending chain failed"); } start->is_invalid = true; update(); if(get_peak()->hash != old_peak->hash) { throw std::logic_error("revert failed"); } log(INFO) << "(1/5) passed"; } db_blocks->revert(version); fork_to(old_peak->hash); reset(); // normal forking { const int depth = 5; const int length = 10; auto block = old_peak; for(int i = 0; i < depth && block && block->height > root->height; ++i) { block = find_prev(block); } if(!block) { throw std::logic_error("cannot walk back from peak"); } log(INFO) << "Starting new fork at height " << block->height << " hash " << block->hash; std::shared_ptr start; for(int i = 0; i < length; ++i) { auto fork = create_test_fork(block); if(!start) { start = fork; } add_fork(fork); block = fork->block; } log(INFO) << "Created new fork at peak height " << block->height << " hash " << block->hash; update(); if(get_peak()->hash != block->hash) { throw std::logic_error("normal forking failed"); } start->is_invalid = true; update(); if(get_peak()->hash != old_peak->hash) { throw std::logic_error("failed to revert invalid fork"); } log(INFO) << "(2/5) passed"; } db_blocks->revert(version); fork_to(old_peak->hash); reset(); // failed normal forking { const int depth = 4; const int length = 6; auto block = old_peak; for(int i = 0; i < depth && block && block->height > root->height; ++i) { block = find_prev(block); } if(!block) { throw std::logic_error("cannot walk back from peak"); } log(INFO) << "Starting new fork at height " << block->height << " hash " << block->hash; std::shared_ptr start; for(int i = 0; i < length; ++i) { auto fork = create_test_fork(block, i > 0); fork->is_validated = true; if(!start) { start = fork; } add_fork(fork); block = fork->block; } log(INFO) << "Created new fork at peak height " << block->height << " hash " << block->hash; start->is_validated = false; update(); if(get_peak()->hash != old_peak->hash) { throw std::logic_error("normal forking did not fail"); } log(INFO) << "(3/5) passed"; } db_blocks->revert(version); fork_to(old_peak->hash); reset(); // deep forking { const int depth = params->commit_delay; const int length = 30; auto block = old_peak; for(int i = 0; i < depth && block && block->height > root->height; ++i) { block = find_prev(block); } if(!block) { throw std::logic_error("cannot walk back from peak"); } log(INFO) << "Starting new fork at height " << block->height << " hash " << block->hash; for(int i = 0; i < length; ++i) { auto fork = create_test_fork(block); add_fork(fork); block = fork->block; } log(INFO) << "Created new fork at peak height " << block->height << " hash " << block->hash; update(); if(get_peak()->hash != block->hash) { throw std::logic_error("advancing failed"); } for(auto fork : get_fork_line()) { fork->is_invalid = true; } update(); log(INFO) << "New peak is at height " << get_peak()->height << ", is_invalid = " << find_fork(state_hash)->is_invalid; if(get_peak()->hash != old_peak->hash) { log(INFO) << get_peak()->hash << " != " << old_peak->hash; throw std::logic_error("deep forking failed"); } log(INFO) << "(4/5) passed"; } db_blocks->revert(version); fork_to(old_peak->hash); reset(); // failed deep forking { const int length = 10; auto block = root; log(INFO) << "Starting new fork at height " << block->height << " hash " << block->hash; std::shared_ptr trap; for(int i = 0; i < length; ++i) { auto fork = create_test_fork(block, false); fork->is_validated = true; add_fork(fork); block = fork->block; trap = fork; } log(INFO) << "Created new fork at peak height " << block->height << " hash " << block->hash; block = get_peak(); for(int i = 0; i < length / 2; ++i) { auto fork = create_test_fork(block); add_fork(fork); block = fork->block; } update(); auto new_peak = block; log(INFO) << "Extended peak to height " << block->height << " hash " << block->hash; trap->is_validated = false; bool did_fail = true; try { fork_to(trap); did_fail = false; } catch(const std::exception& ex) { log(INFO) << "Failed as expected with: " << ex.what(); } if(!did_fail) { throw std::logic_error("expected deep fork to fail"); } if(get_peak()->hash != new_peak->hash) { throw std::logic_error("old peak was not restored"); } log(INFO) << "(5/5) passed"; } db_blocks->revert(version); fork_to(old_peak->hash); reset(); auto peak = get_peak(); log(INFO) << "Peak is at height " << peak->height << " hash " << peak->hash; } } // mmx ================================================ FILE: src/Node_update.cpp ================================================ /* * Node_update.cpp * * Created on: Jan 20, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { void Node::verify_vdfs() { if(vdf_queue.empty() || vdf_verify_pending.size() >= max_vdf_verify_pending) { return; } const auto time_now = get_time_ms(); const auto vdf_timeout = 10 * params->block_interval_ms; const auto root = get_root(); struct vdf_fork_t { uint32_t height = 0; int64_t trust = 0; int64_t recv_time = 0; std::shared_ptr proof; }; std::vector> try_now; std::vector, int64_t>> try_again; std::unordered_map height_map; // [output => vdf_height] based on verified proofs and VDFs only for(const auto& entry : fork_index) { const auto& fork = entry.second; if(fork->is_all_proof_verified) { height_map[fork->block->vdf_output] = fork->block->vdf_height; } } height_map[root->vdf_output] = root->vdf_height; for(const auto& entry : vdf_index) { const auto& point = entry.second; if(auto height = find_value(height_map, point->input)) { height_map[point->output] = (*height) + 1; } } for(const auto& entry : vdf_queue) { const auto& proof = entry.first; if(proof->start < root->vdf_iters) { continue; // too old } if(time_now - entry.second > vdf_timeout) { continue; // timeout } if(find_vdf_point(proof->input, proof->get_output())) { continue; // already verified } if(!get_header(proof->prev) || !height_map.count(proof->input)) { try_again.push_back(entry); // wait for previous block / VDF continue; } auto out = std::make_shared(); out->height = find_value(height_map, proof->input, 0); out->trust = find_value(timelord_trust, proof->timelord_key, 0); out->recv_time = entry.second; out->proof = proof; try_now.emplace_back(out); } std::sort(try_now.begin(), try_now.end(), []( const std::shared_ptr& L, const std::shared_ptr& R) -> bool { return std::make_pair(L->height, L->trust) > std::make_pair(R->height, R->trust); }); for(const auto& fork : try_now) { const auto& proof = fork->proof; if(vdf_verify_pending.count(proof->hash)) { continue; // duplicate } if(vdf_verify_pending.size() >= max_vdf_verify_pending) { try_again.emplace_back(proof, fork->recv_time); continue; } try { verify_vdf(proof, fork->recv_time); } catch(const std::exception& ex) { log(WARN) << "VDF static verification for height " << proof->vdf_height << " failed with: " << ex.what(); } } vdf_queue = std::move(try_again); } void Node::verify_votes() { const auto time_now = get_time_ms(); const auto vote_timeout = 3 * params->block_interval_ms; std::vector, int64_t>> try_again; for(const auto& entry : vote_queue) { if(time_now - entry.second > vote_timeout) { continue; // timeout } const auto& vote = entry.first; // Note: is_valid() already checked in handle() try { if(auto fork = find_fork(vote->hash)) { if(fork->is_proof_verified) { const auto& block = fork->block; const auto best_proof = find_best_proof(block->proof[0]->challenge); if(!best_proof || block->proof_hash != best_proof->hash) { throw std::logic_error("block has weaker proof"); } auto iter = fork->validators.find(vote->farmer_key); if(iter != fork->validators.end()) { if(!iter->second) { iter->second = true; fork->votes++; publish(vote, output_verified_votes); if(is_synced) { const auto delay_ms = entry.second - fork->recv_time_ms; if(fork->votes == params->max_validators / 2 + 1) { log(INFO) << "\xF0\x9F\x97\xB3\xEF\xB8\x8F Received majority vote for block at height " << fork->block->height << ", delay " << delay_ms / 1e3 << " sec"; } log(DEBUG) << "Received vote for block at height " << fork->block->height << ", total is now " << fork->votes << ", delay " << delay_ms / 1e3 << " sec"; } } continue; } else { throw std::logic_error("farmer is not a validator for this block"); } } } try_again.push_back(entry); } catch(const std::exception& ex) { log(DEBUG) << "Got invalid vote for block " << vote->hash << ": " << ex.what(); } } vote_queue = std::move(try_again); } void Node::verify_proofs() { const auto time_now = get_time_ms(); const auto proof_timeout = 10 * params->block_interval_ms; const auto vdf_height = get_vdf_height(); std::mutex mutex; std::vector, int64_t>> try_again; for(const auto& entry : proof_queue) { const auto& res = entry.first; if(time_now - entry.second > proof_timeout) { continue; // timeout } if(res->vdf_height >= vdf_height + params->challenge_delay) { try_again.push_back(entry); // wait for challenge to confirm continue; } threads->add_task([this, res, &mutex, &try_again]() { try { verify(res); std::lock_guard lock(mutex); add_proof(res->proof, res->vdf_height, res->farmer_addr); log(DEBUG) << "Got proof for VDF height " << res->vdf_height << " with score " << res->proof->score; } catch(const std::exception& ex) { log(WARN) << "Got invalid proof for VDF height " << res->vdf_height << ": " << ex.what(); } }); } threads->sync(); proof_queue = std::move(try_again); } void Node::verify_block_proofs() { std::mutex mutex; const auto root = get_root(); for(const auto& entry : fork_index) { const auto& fork = entry.second; const auto& block = fork->block; if(block->height == root->height + 1) { if(!fork->is_connected) { fork->is_connected = (find_prev(block, params->commit_delay + params->infuse_delay, true) != nullptr); } } else { if(!fork->prev.lock()) { fork->prev = find_fork(block->prev); } if(auto prev = fork->prev.lock()) { if(prev->is_invalid) { fork->is_invalid = true; } fork->is_connected = prev->is_connected; } else { fork->is_connected = false; } } if(!fork->is_connected || fork->is_invalid || fork->is_proof_verified) { continue; } if(!fork->is_vdf_verified) { const auto vdf_points = find_vdf_points(block); if(vdf_points.size()) { fork->vdf_points = vdf_points; fork->is_vdf_verified = true; } else if(!is_synced) { // we don't verify VDFs during sync // the voting system will revert any invalid extension after one block // just need to make sure not to commit too far with low proof counts fork->is_vdf_verified = true; } } if(fork->is_vdf_verified) { threads->add_task([this, fork, &mutex]() { const auto& block = fork->block; try { verify_proof(block); fork->is_proof_verified = true; if(auto proof = block->proof[0]) { std::lock_guard lock(mutex); add_proof(proof, block->vdf_height, vnx::Hash64()); } for(auto key : get_validators(block)) { fork->validators[key] = false; } } catch(const std::exception& ex) { fork->is_invalid = true; log(WARN) << "Proof verification failed for a block at height " << block->height << ": " << ex.what(); } }); } } threads->sync(); } void Node::update() { std::unique_lock lock(db_mutex); const auto time_begin = get_time_ms(); update_pending = false; verify_proofs(); verify_block_proofs(); verify_votes(); // after block proofs const auto prev_peak = get_peak(); std::shared_ptr forked_at; // choose best fork while(vnx::do_run()) { forked_at = nullptr; const auto best_fork = find_best_fork(); if(!best_fork || best_fork->block->hash == state_hash) { break; // no change } // verify and apply new fork try { forked_at = fork_to(best_fork); } catch(const std::exception& ex) { best_fork->is_invalid = true; log(WARN) << "Forking to height " << best_fork->block->height << " failed with: " << ex.what(); continue; // try again } break; } verify_vdfs(); // after peak update const auto peak = get_peak(); if(!peak) { log(WARN) << "Have no peak!"; return; } uint32_t fork_weight = 0; const auto fork = find_fork(peak->hash); // commit to disk if(root && peak->height > root->height) { const auto fork_line = get_fork_line(fork); uint64_t total_proofs = 0; for(const auto& fork : fork_line) { total_proofs += fork->block->proof.size(); } const auto vdf_delta = peak->vdf_height - root->vdf_height; fork_weight = (total_proofs * 100) / (vdf_delta * params->avg_proof_count); // make sure not to commit "weak" forks // prevent extension attack without valid VDF during sync const auto commit_delay = fork_weight >= commit_threshold ? params->commit_delay : 3 * max_future_sync; for(const auto& fork : fork_line) { const auto& block = fork->block; if(block->height + commit_delay <= peak->height && !sync_pending.count(block->height) && (is_synced || block->height < sync_pos)) { commit(block); } else { break; } } } const auto root = get_root(); const auto now_ms = get_time_ms(); const auto elapsed = (now_ms - time_begin) / 1e3; const auto fork_line = get_fork_line(fork); if(!prev_peak || peak->hash != prev_peak->hash) { if(fork) { std::stringstream msg; msg << u8"\U0001F4BE New peak at height " << peak->height << " / " << peak->vdf_height << " with score "; if(peak->proof.size()) { msg << peak->proof[0]->score; } else { msg << "N/A"; } msg << ", weight " << fork_weight; if(is_synced) { msg << ", vote " << fork->total_votes; if(forked_at) { msg << ", forked at " << forked_at->height; } if(fork->vdf_points.size()) { msg << ", delay " << (fork->recv_time_ms - fork->vdf_points.back()->recv_time) / 1e3 << " sec"; } } else { msg << ", " << sync_pending.size() << " pending"; } msg << ", took " << elapsed << " sec"; log(INFO) << msg.str(); } if(forked_at && prev_peak) { const auto depth = prev_peak->height - forked_at->height; if(depth > 1) { log(WARN) << "Forked " << depth << " blocks deep, down to height " << forked_at->height; } } stuck_timer->reset(); } if(!is_synced && sync_peak && sync_pending.empty()) { if(sync_retry < num_sync_retries) { if(now_ms - sync_finish_ms > params->block_interval_ms / 2) { sync_pos = *sync_peak - 1; sync_peak = nullptr; sync_finish_ms = now_ms; sync_retry++; log(INFO) << "Reached sync peak at height " << sync_pos; } } else { is_synced = true; on_sync_done(peak->height); } } if(!is_synced) { sync_more(); update_timer->reset(); return; } { const auto vdf_points = find_next_vdf_points(peak); const auto vdf_output = vdf_points.empty() ? peak->vdf_output : vdf_points.back()->output; const auto vdf_advance = std::min( vdf_points.size() + params->infuse_delay, params->max_vdf_count); // request next VDF proofs auto vdf_iters = peak->vdf_iters; for(uint32_t i = 0; i <= vdf_advance; ++i) { uint64_t num_iters = 0; const auto infuse = get_infusion(peak, i, num_iters); auto req = IntervalRequest::create(); req->vdf_height = peak->vdf_height + i + 1; req->start = vdf_iters; req->end = vdf_iters + num_iters; req->infuse = infuse; if(i == vdf_points.size()) { req->input = vdf_output; // for start or restart } publish(req, output_interval_request); vdf_iters += num_iters; } const auto challenge_advance = std::min( vdf_points.size() + params->challenge_delay - 1, params->max_vdf_count); // publish challenges for(uint32_t i = 1; i <= challenge_advance; ++i) { uint64_t space_diff = 0; const auto challenge = get_challenge(peak, i, space_diff); auto value = Challenge::create(); value->vdf_height = peak->vdf_height + i; value->challenge = challenge; value->difficulty = space_diff; publish(value, output_challenges); } } // vote for new peak if(fork && peak->height && voted_blocks.count(peak->prev) == 0) { // make sure peak is from best proof seen const auto proof = find_best_proof(peak->proof[0]->challenge); if(proof && peak->proof_hash == proof->hash) { vote_for_block(fork); } } // check for orphaned votes for(const auto& fork : fork_line) { const auto& block = fork->block; if(auto vote = find_value(voted_blocks, block->prev)) { if(vote->first != block->hash) { // our voted for block was orphaned // vote again for new block if more than one block interval has elapsed // this prevents vote fragmentation in case of double signing if(now_ms - vote->second > params->block_interval_ms) { vote_for_block(fork); } } } } // try to replace current peak // in case another farmer made a block when they shouldn't if(peak->height) { const auto challenge = peak->proof[0]->challenge; if(auto proof = find_best_proof(challenge)) { if(vnx::get_pipe(proof->farmer_mac)) { if(!created_blocks.count(proof->hash)) { if(auto prev = find_prev(peak)) { const auto vdf_points = find_next_vdf_points(prev); if(vdf_points.size()) { try { if(auto block = make_block(prev, vdf_points, challenge)) { add_block(block); } } catch(const std::exception& ex) { log(WARN) << "Failed to create block at height " << peak->height << ": " << ex.what(); } fork_to(peak->hash); } } } } } } // try to extend peak { const auto vdf_points = find_next_vdf_points(peak); if(vdf_points.size()) { hash_t challenge; uint64_t space_diff = 0; if(find_challenge(peak, vdf_points.size(), challenge, space_diff)) { if(auto proof = find_best_proof(challenge)) { if(vnx::get_pipe(proof->farmer_mac)) { if(!created_blocks.count(proof->hash)) { try { if(auto block = make_block(peak, vdf_points, challenge)) { add_block(block); } } catch(const std::exception& ex) { log(WARN) << "Failed to create block at height " << peak->height + 1 << ": " << ex.what(); } fork_to(peak->hash); } } } } } } } void Node::on_sync_done(const uint32_t height) { log(INFO) << "Finished sync at height " << height; synced_since = height; update_control(); } bool Node::tx_pool_update(const tx_pool_t& entry, const bool force_add) { if(entry.is_skipped) { throw std::logic_error("tx_pool_update(): entry is_skipped"); } if(const auto& tx = entry.tx) { if(tx->sender) { const auto& sender = *tx->sender; const auto iter = tx_pool.find(tx->id); const auto fees = tx_pool_fees.find(sender); auto new_total = (fees != tx_pool_fees.end()) ? fees->second : 0; if(iter != tx_pool.end()) { new_total -= iter->second.fee; } new_total += entry.fee; if(!force_add && new_total > get_balance(sender, addr_t())) { return false; } if(fees != tx_pool_fees.end()) { fees->second = new_total; } else { tx_pool_fees[sender] = new_total; } if(iter != tx_pool.end()) { iter->second = entry; } else { std::lock_guard lock(mutex); for(const auto& in : tx->get_inputs()) { tx_pool_index.emplace(std::make_pair(in.address, tx->id), tx); } for(const auto& out : tx->get_outputs()) { tx_pool_index.emplace(std::make_pair(out.address, tx->id), tx); if(out.memo) { tx_pool_index.emplace(std::make_pair(hash_t(out.address + (*out.memo)), tx->id), tx); } } tx_pool[tx->id] = entry; } return true; } } return false; } void Node::tx_pool_erase(const hash_t& txid) { const auto iter = tx_pool.find(txid); if(iter != tx_pool.end()) { if(const auto& tx = iter->second.tx) { if(const auto& sender = tx->sender) { const auto iter2 = tx_pool_fees.find(*sender); if(iter2 != tx_pool_fees.end()) { if((iter2->second -= iter->second.fee) == 0) { tx_pool_fees.erase(iter2); } } } std::lock_guard lock(mutex); for(const auto& in : tx->get_inputs()) { tx_pool_index.erase(std::make_pair(in.address, tx->id)); } for(const auto& out : tx->get_outputs()) { tx_pool_index.erase(std::make_pair(out.address, tx->id)); if(out.memo) { tx_pool_index.erase(std::make_pair(hash_t(out.address + (*out.memo)), tx->id)); } } } tx_pool.erase(iter); } } void Node::purge_tx_pool() { const auto time_begin = get_time_ms(); std::vector all_tx; all_tx.reserve(tx_pool.size()); for(const auto& entry : tx_pool) { all_tx.push_back(entry.second); } // sort transactions by fee ratio std::sort(all_tx.begin(), all_tx.end(), [](const tx_pool_t& lhs, const tx_pool_t& rhs) -> bool { const auto L = lhs.tx->fee_ratio; const auto R = rhs.tx->fee_ratio; return (L == R) ? lhs.luck < rhs.luck : L > R; }); size_t num_purged = 0; uint64_t total_pool_size = 0; std::unordered_map> sender_map; // [sender => [balance, total fee]] const uint64_t max_pool_size = uint64_t(max_tx_pool) * params->max_block_size; // purge transactions from pool if overflowing for(const auto& entry : all_tx) { const auto& tx = entry.tx; bool fee_overspend = false; if(tx->sender) { const auto sender = *tx->sender; const auto iter = sender_map.emplace(sender, std::make_pair(0, 0)); auto& balance = iter.first->second.first; auto& total_fee = iter.first->second.second; if(iter.second) { balance = get_balance(sender, addr_t()); } total_fee += entry.fee; fee_overspend = total_fee > balance; } if(!fee_overspend) { total_pool_size += tx->static_cost; } if(total_pool_size > max_pool_size || fee_overspend) { tx_pool_erase(tx->id); num_purged++; } else { min_pool_fee_ratio = tx->fee_ratio; } } if(total_pool_size < 9 * max_pool_size / 10) { min_pool_fee_ratio = 0; } if(total_pool_size || num_purged) { log(INFO) << uint64_t((total_pool_size * 10000) / max_pool_size) / 100. << " % mem pool, " << min_pool_fee_ratio / 1024. << " min fee ratio, " << num_purged << " purged, took " << (get_time_ms() - time_begin) / 1e3 << " sec"; } } void Node::validate_new() { const auto peak = get_peak(); if(!peak || !is_synced) { return; } const auto deadline_ms = get_time_ms() + validate_interval_ms / 2; // limit to 50% CPU std::default_random_engine luck_gen(vnx::rand64()); // select non-overlapping set std::vector tx_list; std::unordered_set tx_set; tx_list.reserve(max_tx_queue); tx_set.reserve(max_tx_queue); for(const auto& entry : tx_queue) { if(const auto& tx = entry.second) { if(tx_set.insert(tx->id).second) { tx_pool_t tmp; tmp.tx = tx; tmp.luck = luck_gen(); tx_list.push_back(tmp); } } } auto context = new_exec_context(peak->height + 1); // prepare synchronization for(auto& entry : tx_list) { try { entry.is_valid = true; prepare_context(context, entry.tx); } catch(...) { entry.is_valid = false; } } // verify transactions in parallel for(auto& entry : tx_list) { if(!entry.is_valid) { continue; } threads->add_task([this, &entry, context, deadline_ms]() { if(get_time_ms() > deadline_ms) { entry.is_skipped = true; return; } entry.is_valid = false; auto& tx = entry.tx; if(tx->exec_result) { auto tmp = vnx::clone(tx); tmp->reset(params); tx = tmp; } context->wait(tx->id); try { if(auto result = validate(tx, context)) { entry.cost = result->total_cost; entry.fee = result->total_fee; entry.is_valid = true; } } catch(const std::exception& ex) { if(show_warnings) { log(WARN) << "TX validation failed with: " << ex.what() << " (" << tx->id << ")"; } } catch(...) { // ignore } context->signal(tx->id); }); } threads->sync(); // update tx pool for(const auto& entry : tx_list) { if(!entry.is_skipped) { const auto& tx = entry.tx; if(entry.is_valid) { if(tx_pool_update(entry)) { publish(tx, output_verified_transactions); } } tx_queue.erase(tx->content_hash); } } } std::vector Node::validate_for_block(const int64_t deadline_ms) { const auto peak = get_peak(); const auto context = new_exec_context(peak->height + 1); std::vector all_tx; all_tx.reserve(tx_pool.size()); for(const auto& entry : tx_pool) { all_tx.push_back(entry.second); } // sort transactions by fee ratio std::sort(all_tx.begin(), all_tx.end(), [](const tx_pool_t& lhs, const tx_pool_t& rhs) -> bool { return lhs.tx->fee_ratio > rhs.tx->fee_ratio; }); std::vector tx_list; uint64_t total_verify_cost = 0; // select transactions to verify for(const auto& entry : all_tx) { if(total_verify_cost + entry.cost <= params->max_block_cost) { tx_list.push_back(entry); total_verify_cost += entry.cost; } } // prepare synchronization for(auto& entry : tx_list) { try { entry.is_valid = true; prepare_context(context, entry.tx); } catch(...) { entry.is_valid = false; } } // verify transactions in parallel for(auto& entry : tx_list) { if(!entry.is_valid) { continue; } threads->add_task([this, &entry, context, deadline_ms]() { if(get_time_ms() > deadline_ms) { entry.is_skipped = true; return; } entry.is_valid = false; auto& tx = entry.tx; if(tx->exec_result) { auto tmp = vnx::clone(tx); tmp->reset(params); tx = tmp; } context->wait(tx->id); try { auto result = validate(tx, context); if(!result) { throw std::logic_error("!result"); } auto tmp = vnx::clone(tx); tmp->update(*result, params); tx = tmp; entry.cost = result->total_cost; entry.fee = result->total_fee; entry.is_valid = true; } catch(const std::exception& ex) { if(show_warnings) { log(WARN) << "TX validation failed with: " << ex.what() << " (" << tx->id << ")"; } } catch(...) { // ignore } context->signal(tx->id); }); } threads->sync(); uint32_t num_skipped = 0; uint64_t total_cost = 0; uint64_t static_cost = 0; std::vector result; balance_cache_t balance_cache(&balance_table); // select final set of transactions for(auto& entry : tx_list) { if(entry.is_skipped) { num_skipped++; continue; } if(!entry.is_valid) { tx_pool_erase(entry.tx->id); continue; } const auto tx = entry.tx; if(static_cost + tx->static_cost > params->max_block_size || total_cost + entry.cost > params->max_block_cost) { continue; } bool passed = true; balance_cache_t tmp_cache(&balance_cache); { const auto balance = tmp_cache.find(*tx->sender, addr_t()); if(balance && entry.fee <= *balance) { *balance -= entry.fee; } else { passed = false; } } if(!tx->exec_result->did_fail) { for(const auto& in : tx->inputs) { const auto balance = tmp_cache.find(in.address, in.contract); if(balance && in.amount <= *balance) { *balance -= in.amount; } else { passed = false; } } } if(!passed) { continue; } balance_cache.apply(tmp_cache); total_cost += entry.cost; static_cost += tx->static_cost; result.push_back(entry); } if(num_skipped) { log(WARN) << "Skipped " << num_skipped << " transactions due to block creation deadline"; } const uint32_t N = params->min_fee_ratio.size(); if(N == 0) { return result; } std::vector band_avail(N); for(uint64_t i = 0; i < N; ++i) { band_avail[i] = ((i + 1) * params->max_block_size) / N - (i * params->max_block_size) / N; } uint32_t i = N - 1; std::vector out; for(const auto& entry : result) { const auto& tx = entry.tx; while(i && (!band_avail[i] || tx->fee_ratio < params->min_fee_ratio[i] * 1024)) { i--; } if(tx->static_cost > band_avail[i]) { if(i) { // we assume band size is always >= max_tx_cost (so band_avail never goes negative here) band_avail[i - 1] -= tx->static_cost - band_avail[i]; band_avail[i] = 0; } else { continue; // no room left for this tx } } else { band_avail[i] -= tx->static_cost; } out.push_back(entry); } return out; } std::shared_ptr Node::make_block( std::shared_ptr prev, std::vector> vdf_points, const hash_t& challenge) { if(vdf_points.empty()) { return nullptr; } const auto proof = find_value(proof_map, challenge, std::vector()); if(proof.empty()) { return nullptr; } const auto time_begin = get_time_ms(); // reset state to previous block fork_to(prev->hash); auto block = Block::create(); block->prev = prev->hash; block->height = prev->height + 1; block->time_diff = prev->time_diff; block->vdf_count = vdf_points.size(); block->vdf_height = prev->vdf_height + block->vdf_count; block->reward_vote = reward_vote; block->project_addr = prev->project_addr; block->txfee_buffer = calc_new_txfee_buffer(params, prev); block->support_flags |= Block::SUPPORT_HARDFORK1; block->vdf_iters = prev->vdf_iters; for(auto point : vdf_points) { block->vdf_iters += point->num_iters; block->vdf_output = point->output; block->vdf_reward_addr.push_back(point->reward_addr); } for(size_t i = 0; i < proof.size() && i < params->max_proof_count; ++i) { block->proof.push_back(proof[i].proof); } block->proof_hash = proof[0].hash; block->challenge = calc_next_challenge(params, prev->challenge, block->vdf_count, block->proof_hash, block->is_space_fork); if(block->height % params->vdf_reward_interval == 0) { block->vdf_reward_payout = get_vdf_reward_winner(block); } if(auto nft = std::dynamic_pointer_cast(block->proof[0])) { block->reward_contract = nft->contract; } if(auto contract = block->reward_contract) { const addr_t any = hash_t::random(); const auto address = get_plot_nft_target(*contract, any); if(address != any) { block->reward_addr = address; } } if(auto ref = find_prev(prev, 100)) { // set new time diff const auto delta_ms = prev->time_stamp - ref->time_stamp; const auto delta_blocks = prev->height - ref->height; const auto factor = double(params->block_interval_ms * delta_blocks) / delta_ms; const auto delay = params->commit_delay + params->infuse_delay; const auto begin = find_prev(ref, delay, true); const auto end = find_prev(prev, delay, true); if(begin && end) { const auto avg_diff = (begin->time_diff + end->time_diff) / 2; block->time_diff = std::max(avg_diff * factor + 0.5, params->time_diff_divider); } // limit time diff update const auto max_update = std::max(prev->time_diff >> params->max_diff_adjust, 1); if(prev->time_diff > max_update) { block->time_diff = std::max(block->time_diff, prev->time_diff - max_update); } block->time_diff = std::min(block->time_diff, prev->time_diff + max_update); } { // set time stamp auto delta_ms = time_begin - prev->time_stamp; delta_ms = std::min(delta_ms, block->vdf_count * params->block_interval_ms * 2); delta_ms = std::max(delta_ms, block->vdf_count * params->block_interval_ms / 2); block->time_stamp = prev->time_stamp + delta_ms; } uint64_t total_fees = 0; if(block->height >= params->transaction_activation) { try { const auto deadline = get_time_ms() + params->block_interval_ms / 2; const auto tx_list = validate_for_block(deadline); // select transactions for(const auto& entry : tx_list) { block->tx_list.push_back(entry.tx); total_fees += entry.fee; } } catch(const std::exception& ex) { log(WARN) << "Making empty block due to: " << ex.what(); } } block->weight = calc_block_weight(params, block, prev); block->total_weight = prev->total_weight + block->weight; block->reward_amount = calc_block_reward(block, total_fees); block->set_space_diff(params, prev); block->set_base_reward(params, prev); block->finalize(); if(auto farmer_mac = proof[0].farmer_mac) { const auto result = FarmerClient(farmer_mac).sign_block(block); if(!result) { log(WARN) << "Farmer refused to sign block at height " << block->height; return nullptr; } block->BlockHeader::operator=(*result); } created_blocks[block->proof_hash] = block->hash; const auto elapsed = (get_time_ms() - time_begin) / 1e3; log(INFO) << u8"\U0001F911 Created block at height " << block->height << " with: ntx = " << block->tx_count << ", score = " << block->proof[0]->score << ", reward = " << to_value(block->reward_amount, params) << " MMX" << ", fees = " << to_value(total_fees, params) << " MMX" << ", took " << elapsed << " sec"; return block; } } // mmx ================================================ FILE: src/Node_validate.cpp ================================================ /* * Node_validate.cpp * * Created on: Jan 20, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { void Node::execution_context_t::wait(const hash_t& txid) const { auto iter = wait_map.find(txid); if(iter != wait_map.end()) { for(const auto& prev : iter->second) { auto iter = signal_map.find(prev); if(iter != signal_map.end()) { auto& entry = iter->second; { std::unique_lock lock(entry->mutex); while(entry->do_wait) { entry->signal.wait(lock); } } } } } } void Node::execution_context_t::signal(const hash_t& txid) const { auto iter = signal_map.find(txid); if(iter != signal_map.end()) { auto& entry = iter->second; { std::lock_guard lock(entry->mutex); entry->do_wait = false; } entry->signal.notify_all(); } } void Node::execution_context_t::setup_wait(const hash_t& txid, const addr_t& address) { const auto& list = mutate_map[address]; if(!list.empty()) { wait_map[txid].insert(list.back()); } } std::shared_ptr Node::new_exec_context(const uint32_t height) const { auto context = std::make_shared(); context->height = height; context->storage = std::make_shared(storage); return context; } void Node::prepare_context(std::shared_ptr context, std::shared_ptr tx) const { std::set mutate_set; if(tx->deploy) { mutate_set.insert(tx->id); } for(const auto& op : tx->get_operations()) { mutate_set.insert(op->address == addr_t() ? tx->id : op->address); } for(const auto& address : std::vector(mutate_set.begin(), mutate_set.end())) { std::vector depends; if(address == tx->id) { if(auto exec = std::dynamic_pointer_cast(tx->deploy)) { depends = get_all_depends(exec); } } else { depends = get_all_depends(address, 1); } mutate_set.insert(depends.begin(), depends.end()); } for(const auto& address : mutate_set) { context->setup_wait(tx->id, address); context->mutate_map[address].push_back(tx->id); } if(!mutate_set.empty()) { context->signal_map.emplace(tx->id, std::make_shared()); } } std::shared_ptr Node::validate(std::shared_ptr block) const { /* * The following fields have already been verified in `Node::verify_proof()` or see note: * - vdf_height * - vdf_count (Node::find_vdf_points() + Node::verify_proof()) * - vdf_iters * - vdf_output (Node::find_vdf_points()) * - vdf_reward_addr (Node::find_vdf_points()) * - proof * - proof_hash * - challenge * - is_space_fork * - time_diff * - space_diff * - proof_score_sum * - proof_score_count * - weight * - total_weight */ if(!block->is_valid()) { throw std::logic_error("static validation failed"); } block->validate(); const auto prev = find_prev(block); if(!prev) { throw std::logic_error("missing prev"); } if(prev->hash != state_hash) { throw std::logic_error("state mismatch"); } if(block->version != 0) { throw std::logic_error("invalid version"); } if(block->height != prev->height + 1) { throw std::logic_error("invalid height"); } if(block->space_fork_len > params->challenge_interval * 100) { throw std::logic_error("space fork too long"); } if(block->time_stamp - prev->time_stamp > block->vdf_count * params->block_interval_ms * 2) { throw std::logic_error("time stamp delta too high"); } if(block->time_stamp - prev->time_stamp < block->vdf_count * params->block_interval_ms / 2) { throw std::logic_error("time stamp delta too low"); } if(block->time_diff < params->time_diff_divider || block->space_diff == 0) { throw std::logic_error("invalid difficulty"); } if(block->static_cost > params->max_block_size) { throw std::logic_error("block size too high: " + std::to_string(block->static_cost)); } if(block->total_cost > params->max_block_cost) { throw std::logic_error("block cost too high: " + std::to_string(block->total_cost)); } const auto txfee_buffer = calc_new_txfee_buffer(params, prev); if(block->txfee_buffer != txfee_buffer) { throw std::logic_error("invalid txfee_buffer: " + std::to_string(block->txfee_buffer) + " != " + std::to_string(txfee_buffer)); } if(block->reward_vote > 1 || block->reward_vote < -1) { throw std::logic_error("invalid reward_vote: " + std::to_string(block->reward_vote)); } vnx::optional reward_contract; if(block->reward_addr) { if(auto proof = std::dynamic_pointer_cast(block->proof[0])) { reward_contract = proof->contract; } } if(block->reward_contract != reward_contract) { throw std::logic_error("invalid reward_contract"); } if(reward_contract) { addr_t target; try { target = get_plot_nft_target(*reward_contract, block->reward_account); } catch(const std::exception& ex) { throw std::logic_error("reward_addr resolution failed with: " + std::string(ex.what())); } if(!block->reward_addr || (*block->reward_addr) != target) { throw std::logic_error("invalid reward_addr for reward_contract: expected " + target.to_string()); } } if(block->height % params->vdf_reward_interval == 0) { const auto address = get_vdf_reward_winner(block); if(block->vdf_reward_payout != address) { throw std::logic_error("invalid vdf_reward_payout"); } } else { if(block->vdf_reward_payout) { throw std::logic_error("invalid vdf_reward_payout (must be null)"); } } if(block->height % params->reward_adjust_interval == 0) { const auto base_reward = calc_new_base_reward(params, prev); if(block->base_reward != base_reward) { throw std::logic_error("invalid base_reward: " + std::to_string(block->base_reward) + " != " + std::to_string(base_reward)); } if(block->reward_vote_sum != block->reward_vote) { throw std::logic_error("invalid reward_vote_sum"); } if(block->reward_vote_count != (block->reward_vote ? 1 : 0)) { throw std::logic_error("invalid reward_vote_count"); } } else { if(block->base_reward != prev->base_reward) { throw std::logic_error("invalid base_reward"); } if(block->reward_vote_sum != prev->reward_vote_sum + block->reward_vote) { throw std::logic_error("invalid reward_vote_sum"); } if(block->reward_vote_count != prev->reward_vote_count + (block->reward_vote ? 1 : 0)) { throw std::logic_error("invalid reward_vote_count"); } } if(block->height < params->transaction_activation && block->tx_count) { throw std::logic_error("transactions not activated yet"); } if(block->project_addr != prev->project_addr) { throw std::logic_error("invalid project_addr"); } { std::set> keys; for(const auto& tx : block->tx_list) { if(tx->sender) { keys.emplace(*tx->sender, addr_t()); } for(const auto& in : tx->inputs) { keys.emplace(in.address, in.contract); } } prefetch_balances(keys); } auto context = new_exec_context(block->height); { std::unordered_set tx_set; tx_set.reserve(block->tx_count); balance_cache_t balance_cache(&balance_table); std::shared_ptr prev; for(const auto& tx : block->tx_list) { if(!tx) { throw std::logic_error("null transaction"); } if(!tx->sender) { throw std::logic_error("transaction missing sender"); } if(!tx->exec_result) { throw std::logic_error("transaction missing exec_result"); } if(!tx_set.insert(tx->id).second) { throw std::logic_error("duplicate transaction in same block"); } if(prev) { if(tx->fee_ratio > prev->fee_ratio) { throw std::logic_error("invalid tx order (fee_ratio)"); } } { // subtract tx fee const auto balance = balance_cache.find(*tx->sender, addr_t()); const auto total_fee = tx->exec_result->total_fee; if(!balance || total_fee > *balance) { throw std::logic_error("insufficient funds to cover transaction fee"); } *balance -= total_fee; } if(!tx->exec_result->did_fail) { // Note: exec_inputs are checked during tx validation for(const auto& in : tx->inputs) { const auto balance = balance_cache.find(in.address, in.contract); if(!balance || in.amount > *balance) { throw std::logic_error("insufficient funds to cover input"); } *balance -= in.amount; } } prepare_context(context, tx); prev = tx; } } // minimum fee_ratio depending on block size { const uint32_t N = params->min_fee_ratio.size(); if(N) { uint64_t i = 0; uint64_t total_size = 0; for(auto iter = block->tx_list.rbegin(); iter != block->tx_list.rend(); ++iter) { const auto& tx = *iter; // tx == nullptr already checked above total_size += tx->static_cost; while(total_size > ((i + 1) * params->max_block_size) / N) { i++; } if(i >= N) { throw std::logic_error("block size overflow"); } const auto min_ratio = params->min_fee_ratio[i] * 1024; if(tx->fee_ratio < min_ratio) { throw std::logic_error("transaction fee_ratio too small: " + std::to_string(tx->fee_ratio) + " < " + std::to_string(min_ratio)); } } } } hash_t failed_tx; std::mutex mutex; std::exception_ptr failed_ex; for(const auto& tx : block->tx_list) { threads->add_task([this, tx, context, &mutex, &failed_tx, &failed_ex]() { context->wait(tx->id); try { if(validate(tx, context)) { throw std::logic_error("missing exec_result"); } } catch(...) { std::lock_guard lock(mutex); failed_tx = tx->id; failed_ex = std::current_exception(); } context->signal(tx->id); }); } threads->sync(); if(failed_ex) { try { std::rethrow_exception(failed_ex); } catch(const std::exception& ex) { throw std::logic_error(std::string(ex.what()) + " (" + failed_tx.to_string() + ")"); } } if(block->reward_addr) { const auto amount = calc_block_reward(block, block->tx_fees); if(block->reward_amount != amount) { throw std::logic_error("invalid reward_amount: " + std::to_string(block->reward_amount) + " != " + std::to_string(amount)); } } else { if(block->reward_amount) { throw std::logic_error("invalid reward_amount"); } } return context; } exec_result_t Node::validate(std::shared_ptr tx) const { if(tx->exec_result) { throw std::logic_error("exec_result not null"); } const auto height = get_height() + 1; if(height < params->transaction_activation) { throw std::logic_error("transactions not live yet"); } auto context = new_exec_context(height); context->do_profile = exec_profile; context->do_trace = exec_trace; prepare_context(context, tx); const auto result = validate(tx, context); if(!result) { throw std::logic_error("!result"); } return *result; } void Node::execute( std::shared_ptr tx, std::shared_ptr context, std::shared_ptr op, std::shared_ptr contract, const addr_t& address, std::vector& exec_outputs, std::map, uint128>& exec_spend_map, std::shared_ptr storage_cache, uint64_t& tx_cost, exec_error_t& error, const bool is_init) const { auto executable = std::dynamic_pointer_cast(contract); if(!executable) { throw std::logic_error("not an executable: " + address.to_string()); } auto engine = std::make_shared(address, storage_cache, false); engine->do_profile = context->do_profile; engine->do_trace = context->do_trace; { const auto avail_gas = fee_to_cost(tx->max_fee_amount, tx->fee_ratio); engine->gas_limit = std::min(avail_gas - std::min(tx_cost, avail_gas), params->max_tx_cost); } if(op->user) { const auto contract = get_contract_for_ex(*op->user, &engine->gas_used, engine->gas_limit); contract->validate(tx->get_solution(op->solution), tx->id); engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::to_binary(*op->user)); } else { engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::var_t()); } engine->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(address)); engine->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(params->network)); if(auto deposit = std::dynamic_pointer_cast(op)) { { uint128 amount = deposit->amount; if(auto value = storage_cache->get_balance(address, deposit->currency)) { amount += *value; } storage_cache->set_balance(address, deposit->currency, amount); } vm::set_deposit(engine, deposit->currency, deposit->amount); } vm::set_args(engine, op->args); std::exception_ptr failed_ex; try { execute(tx, context, executable, exec_outputs, exec_spend_map, storage_cache, engine, op->method, error, is_init); } catch(...) { failed_ex = std::current_exception(); } // decouple gas checking from consensus by clamping cost to limit tx_cost += std::min(engine->gas_used, engine->gas_limit); if(engine->do_profile) { std::ofstream out("profile_" + executable->binary.to_string() + "_" + op->method + "_" + std::to_string(get_time_us()) + ".json"); out << vnx::to_pretty_string(engine->cost_map); } if(engine->do_trace) { std::ofstream out("trace_" + executable->binary.to_string() + "_" + op->method + "_" + std::to_string(get_time_us()) + ".json"); for(const auto& t : engine->storage->trace) { out << t.type << "\taddr = 0x" << vnx::to_hex_string(t.addr) << "\tkey = 0x" << vnx::to_hex_string(t.key) << "\tvalue = " << to_string(t.value) << std::endl; } } if(failed_ex) { std::rethrow_exception(failed_ex); } } void Node::execute( std::shared_ptr tx, std::shared_ptr context, std::shared_ptr executable, std::vector& exec_outputs, std::map, uint128>& exec_spend_map, std::shared_ptr storage_cache, std::shared_ptr engine, const std::string& method_name, exec_error_t& error, const bool is_init) const { { auto iter = context->mutate_map.find(engine->contract); if(iter == context->mutate_map.end()) { throw std::logic_error("contract not locked"); } const auto& list = iter->second; if(std::find(list.begin(), list.end(), tx->id) == list.end()) { throw std::logic_error("transaction did not lock contract: " + engine->contract.to_string()); } } const auto binary = get_contract_as(executable->binary, &engine->gas_used, engine->gas_limit); if(!binary) { throw std::logic_error("no such binary: " + executable->binary.to_string()); } auto method = vm::find_method(binary, method_name); if(!method) { throw std::logic_error("no such method: " + method_name); } if(is_init) { if(!method->is_init) { throw std::logic_error("not a constructor: " + method_name); } } else { if(!method->is_public) { throw std::logic_error("method is not public: " + method_name); } } vm::load(engine, binary); std::map> contract_cache; contract_cache[tx->id] = tx->deploy; engine->remote_call = [this, tx, context, executable, storage_cache, &engine, &contract_cache, &exec_outputs, &exec_spend_map, &error] (const std::string& name, const std::string& method, const uint32_t nargs) { const auto address = executable->get_external(name); auto& fetch = contract_cache[address]; if(!fetch) { fetch = get_contract_ex(address, &engine->gas_used, engine->gas_limit); } const auto contract = std::dynamic_pointer_cast(fetch); if(!contract) { throw std::logic_error("not an executable: " + address.to_string()); } engine->gas_used += params->min_txfee_exec; engine->check_gas(); const auto child = std::make_shared(address, storage_cache, false); child->gas_limit = engine->gas_limit - std::min(engine->gas_used, engine->gas_limit); const auto stack_ptr = engine->get_stack_ptr(); for(uint32_t i = 0; i < nargs; ++i) { vm::copy(child, engine, vm::MEM_STACK + 1 + i, stack_ptr + 1 + i); } child->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::to_binary(engine->contract)); child->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(address)); child->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(params->network)); execute(tx, context, contract, exec_outputs, exec_spend_map, storage_cache, child, method, error, false); vm::copy(engine, child, stack_ptr, vm::MEM_STACK); engine->gas_used += child->gas_used; engine->check_gas(); }; engine->read_contract = [this, tx, executable, &engine, &contract_cache] (const addr_t& address, const std::string& field, const uint64_t dst) { auto& contract = contract_cache[address]; if(!contract) { contract = get_contract_ex(address, &engine->gas_used, engine->gas_limit); } if(!contract) { throw std::logic_error("no such contract: " + address.to_string()); } vm::assign(engine, dst, contract->read_field(field)); engine->check_gas(); }; engine->write(vm::MEM_EXTERN + vm::EXTERN_HEIGHT, vm::uint_t(context->height)); engine->write(vm::MEM_EXTERN + vm::EXTERN_TXID, vm::to_binary(tx->id)); try { vm::execute(engine, *method, true); } catch(...) { error.code = engine->error_code; error.address = engine->error_addr; if(auto line = binary->find_line(error.address)) { error.line = *line; } if(exec_debug) { engine->dump_memory(); } throw; } for(const auto& out : engine->outputs) { { auto amount = storage_cache->get_balance(engine->contract, out.contract); if(!amount || out.amount > *amount) { throw std::logic_error("contract over-spend"); } *amount -= out.amount; storage_cache->set_balance(engine->contract, out.contract, *amount); } exec_outputs.push_back(out); exec_spend_map[std::make_pair(engine->contract, out.contract)] += out.amount; } exec_outputs.insert(exec_outputs.end(), engine->mint_outputs.begin(), engine->mint_outputs.end()); } std::shared_ptr Node::validate( std::shared_ptr tx, std::shared_ptr context) const { if(!tx->is_valid(params)) { throw mmx::static_failure("invalid tx"); } if(tx->static_cost > params->max_tx_cost) { throw mmx::static_failure("static_cost > max_tx_cost"); } if(uint64_t(tx->max_fee_amount) >> 32) { throw mmx::static_failure("max fee amount >= 2^32"); } if(tx_index.count(tx->id)) { throw mmx::static_failure("duplicate tx"); } const uint64_t gas_limit = std::min( fee_to_cost(tx->max_fee_amount, tx->fee_ratio), params->max_tx_cost); const uint64_t static_fee = cost_to_fee(tx->static_cost, tx->fee_ratio); uint64_t tx_cost = tx->static_cost; std::vector exec_inputs; std::vector exec_outputs; balance_cache_t balance_cache(&balance_table); auto storage_cache = std::make_shared(context->storage); std::unordered_map amounts; std::map, uint128> deposit_map; std::map, uint128> exec_spend_map; std::exception_ptr failed_ex; exec_error_t error; if(static_fee > tx->max_fee_amount) { throw mmx::static_failure("static transaction fee > max_fee_amount: " + std::to_string(static_fee) + " > " + std::to_string(tx->max_fee_amount)); } if(!tx->sender) { throw mmx::static_failure("missing transaction sender"); } if(tx->solutions.empty()) { throw mmx::static_failure("missing sender signature"); } { // validate tx sender auto pubkey = contract::PubKey::create(); pubkey->address = *tx->sender; pubkey->validate(tx->solutions[0], tx->id); } const auto balance = balance_cache.find(*tx->sender, addr_t()); if(!balance || static_fee > *balance) { error.code = error_code_e::INSUFFICIENT_FUNDS_TXFEE; throw mmx::static_failure("insufficient funds for transaction fee: " + std::to_string(static_fee) + " > " + (balance ? balance->str(10) : "0")); } *balance -= static_fee; try { if(tx->expires < context->height) { error.code = error_code_e::TX_EXPIRED; throw std::logic_error("transaction expired at height " + std::to_string(tx->expires)); } error.address = 0; for(const auto& in : tx->inputs) { const auto balance = balance_cache.find(in.address, in.contract); if(!balance || in.amount > *balance) { error.code = error_code_e::INSUFFICIENT_FUNDS; throw std::logic_error("insufficient funds for " + in.address.to_string()); } const auto solution = tx->get_solution(in.solution); if(!solution) { throw mmx::invalid_solution("missing solution"); } std::shared_ptr contract; if(in.flags & txin_t::IS_EXEC) { contract = get_contract_ex(in.address, &tx_cost, gas_limit); } else { auto pubkey = contract::PubKey::create(); pubkey->address = in.address; contract = pubkey; } if(!contract) { throw std::logic_error("no such contract: " + in.address.to_string()); } contract->validate(solution, tx->id); *balance -= in.amount; amounts[in.contract] += in.amount; error.address++; } error.address = 0; for(const auto& out : tx->outputs) { if(out.amount == 0) { throw std::logic_error("zero amount output"); } auto& value = amounts[out.contract]; if(out.amount > value) { throw std::logic_error("transaction over-spend"); } value -= out.amount; error.address++; } error.address = -1; if(tx->deploy) { if(!tx->deploy->is_valid()) { error.code = error_code_e::INVALID_CONTRACT; throw std::logic_error("invalid contract"); } if(auto exec = std::dynamic_pointer_cast(tx->deploy)) { // make sure all dependencies exist (prevent limit bypass) for(const auto& entry : exec->depends) { if(!tx_index.count(entry.second)) { error.code = error_code_e::INVALID_CONTRACT; throw std::logic_error("missing dependency: " + entry.first); } } auto op = operation::Execute::create(); op->method = exec->init_method; op->args = exec->init_args; execute(tx, context, op, exec, tx->id, exec_outputs, exec_spend_map, storage_cache, tx_cost, error, true); } } error.operation = 0; for(const auto& op : tx->get_operations()) { if(!op || !op->is_valid()) { error.code = error_code_e::INVALID_OPERATION; throw std::logic_error("invalid operation"); } const auto address = (op->address == addr_t() ? addr_t(tx->id) : op->address); const auto contract = (address == tx->id ? tx->deploy : get_contract_ex(address, &tx_cost, gas_limit)); if(!contract) { throw std::logic_error("no such contract: " + address.to_string()); } if(auto deposit = std::dynamic_pointer_cast(op)) { auto& value = amounts[deposit->currency]; if(deposit->amount > value) { throw std::logic_error("deposit over-spend"); } value -= deposit->amount; deposit_map[std::make_pair(address, deposit->currency)] += deposit->amount; } if(auto exec = std::dynamic_pointer_cast(op)) { const auto solution = tx->get_solution(op->solution); execute(tx, context, exec, contract, address, exec_outputs, exec_spend_map, storage_cache, tx_cost, error, false); } error.operation++; } error.operation = -1; // create exec inputs for(const auto& entry : exec_spend_map) { auto amount_left = entry.second; { // use deposit amounts first auto& deposit = deposit_map[entry.first]; const auto amount = std::min(deposit, amount_left); deposit -= amount; amount_left -= amount; } if(amount_left) { txin_t in; in.address = entry.first.first; in.contract = entry.first.second; in.amount = amount_left; exec_inputs.push_back(in); } } // create deposit outputs for(const auto& entry : deposit_map) { if(const auto& amount = entry.second) { txout_t out; out.address = entry.first.first; out.contract = entry.first.second; out.amount = amount; exec_outputs.push_back(out); } } // check for left-over amounts for(const auto& entry : amounts) { if(entry.second) { if(!tx->deploy) { throw std::logic_error("implicit deposit without deploy"); } if(const auto& amount = entry.second) { txout_t out; out.address = tx->id; out.contract = entry.first; out.amount = amount; exec_outputs.push_back(out); } } } if(!tx->exec_result) { for(const auto& in: exec_inputs) { tx_cost += in.calc_cost(params); } for(const auto& out: exec_outputs) { tx_cost += out.calc_cost(params); } } if(tx_cost > params->max_tx_cost) { throw mmx::static_failure("transaction cost > max_tx_cost"); } if(tx_cost >> 32) { throw mmx::static_failure("transaction cost >= 2^32"); } } catch(const mmx::static_failure& ex) { throw; } catch(...) { failed_ex = std::current_exception(); } uint64_t tx_fee = 0; try { const auto total_fee = cost_to_fee(tx_cost, tx->fee_ratio); tx_fee = std::min(total_fee, tx->max_fee_amount); const auto dynamic_fee = tx_fee - static_fee; const auto balance = balance_cache.find(*tx->sender, addr_t()); if(!balance || dynamic_fee > *balance) { error.code = error_code_e::INSUFFICIENT_FUNDS_TXFEE; throw mmx::static_failure("insufficient funds for transaction fee: " + std::to_string(dynamic_fee) + " > " + (balance ? balance->str(10) : "0")); } *balance -= dynamic_fee; if(total_fee > tx->max_fee_amount && !failed_ex) { error.code = error_code_e::TXFEE_OVERRUN; throw std::logic_error("transaction fee > max_fee_amount: " + std::to_string(total_fee) + " > " + std::to_string(tx->max_fee_amount)); } } catch(const mmx::static_failure& ex) { throw; } catch(...) { failed_ex = std::current_exception(); } std::shared_ptr out; if(auto result = tx->exec_result) { if(!result->did_fail && failed_ex) { try { std::rethrow_exception(failed_ex); } catch(const std::exception& ex) { throw std::logic_error("unexpected execution failure: " + std::string(ex.what())); } catch(...) { throw std::logic_error("unexpected execution failure"); } } if(result->did_fail && !failed_ex) { if(result->error) { throw std::logic_error("expected execution failure: " + result->error->message); } else { throw std::logic_error("expected execution failure"); } } if(result->total_cost != tx_cost) { throw std::logic_error("transaction cost mismatch: " + std::to_string(result->total_cost) + " != " + std::to_string(tx_cost)); } if(result->total_fee != tx_fee) { throw std::logic_error("transaction fee mismatch: " + std::to_string(result->total_fee) + " != " + std::to_string(tx_fee)); } if(result->did_fail) { if(result->inputs.size() || result->outputs.size()) { throw std::logic_error("failed transaction cannot have execution inputs / outputs"); } } else { if(result->inputs.size() != exec_inputs.size()) { throw std::logic_error("execution input count mismatch: " + std::to_string(result->inputs.size()) + " != " + std::to_string(exec_inputs.size())); } if(result->outputs.size() != exec_outputs.size()) { throw std::logic_error("execution output count mismatch: " + std::to_string(result->outputs.size()) + " != " + std::to_string(exec_outputs.size())); } for(size_t i = 0; i < exec_inputs.size(); ++i) { const auto& lhs = exec_inputs[i]; const auto& rhs = result->inputs[i]; if(lhs.contract != rhs.contract || lhs.address != rhs.address || lhs.amount != rhs.amount || lhs.memo != rhs.memo || lhs.flags != rhs.flags) { throw std::logic_error("execution input mismatch at index " + std::to_string(i)); } } for(size_t i = 0; i < exec_outputs.size(); ++i) { const auto& lhs = exec_outputs[i]; const auto& rhs = result->outputs[i]; if(lhs.contract != rhs.contract || lhs.address != rhs.address || lhs.amount != rhs.amount || lhs.memo != rhs.memo) { throw std::logic_error("execution output mismatch at index " + std::to_string(i)); } } } if(result->error) { if(result->error->code != error.code) { throw std::logic_error("error code mismatch"); } if(result->error->address != error.address) { throw std::logic_error("error address mismatch"); } if(result->error->operation != error.operation) { throw std::logic_error("error operation mismatch"); } // Note: error line and message are not enforced by consensus // Note: message length already checked in is_valid() } else if(result->did_fail) { throw std::logic_error("missing error information"); } } else { out = std::make_shared(); out->total_cost = tx_cost; out->total_fee = tx_fee; if(failed_ex) { try { std::rethrow_exception(failed_ex); } catch(const std::exception& ex) { std::string msg = ex.what(); msg.resize(std::min(msg.size(), exec_error_t::MAX_MESSAGE_LENGTH)); error.message = msg; } out->error = error; out->did_fail = true; } else { out->inputs = exec_inputs; out->outputs = exec_outputs; } } if(!failed_ex) { storage_cache->commit(); } return out; } void Node::validate_diff_adjust(const uint64_t& block, const uint64_t& prev) const { const auto max_update = std::max(prev >> params->max_diff_adjust, 1); if(block > prev && block - prev > max_update) { throw std::logic_error("invalid difficulty adjustment upwards"); } if(prev > block && prev - block > max_update) { throw std::logic_error("invalid difficulty adjustment downwards"); } } } // mmx ================================================ FILE: src/Node_verify.cpp ================================================ /* * Node_verify.cpp * * Created on: Jan 20, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include namespace mmx { void Node::add_proof(std::shared_ptr proof, const uint32_t vdf_height, const vnx::Hash64 farmer_mac) { auto& list = proof_map[proof->challenge]; const auto hash = proof->calc_proof_hash(); for(const auto& entry : list) { if(hash == entry.hash) { return; // prevent replay attack } } if(list.empty()) { challenge_map.emplace(vdf_height, proof->challenge); } if(vnx::get_pipe(farmer_mac)) { farmer_keys[proof->farmer_key] = farmer_mac; } proof_data_t data; data.hash = hash; data.proof = proof; data.farmer_mac = farmer_mac; list.push_back(data); std::sort(list.begin(), list.end(), [](const proof_data_t& L, const proof_data_t& R) -> bool { return L.hash < R.hash; }); } void Node::verify(std::shared_ptr value) const { if(!value->is_valid()) { throw std::logic_error("invalid response"); } value->validate(); if(auto root = get_root()) { if(value->vdf_height <= root->vdf_height) { throw std::logic_error("proof too old"); } } hash_t challenge; uint64_t space_diff = 0; if(!find_challenge(value->vdf_height, challenge, space_diff)) { throw std::logic_error("cannot find challenge"); } verify_proof(value->proof, challenge, space_diff, value->vdf_height); publish(value, output_verified_proof); } void Node::verify_proof(std::shared_ptr block) const { // NOTE: NEEDS TO BE THREAD SAFE const auto prev = find_prev(block); if(!prev) { throw std::logic_error("cannot verify"); } if(block->vdf_count > params->max_vdf_count) { throw std::logic_error("invalid vdf_count"); } if(block->vdf_height != prev->vdf_height + block->vdf_count) { throw std::logic_error("invalid vdf_height"); } const auto proof_count = block->proof.size(); if(proof_count == 0) { throw std::logic_error("missing proof"); } if(proof_count > params->max_proof_count) { throw std::logic_error("too many proofs"); } { hash_t prev; std::set set; for(auto proof : block->proof) { const auto hash = proof->calc_proof_hash(); if(hash < prev) { throw std::logic_error("invalid proof order"); } if(set.empty() && block->proof_hash != hash) { throw std::logic_error("invalid proof_hash"); } if(!set.insert(hash).second) { throw std::logic_error("duplicate proof"); } prev = hash; } } uint64_t expected_iters = prev->vdf_iters; for(uint32_t i = 0; i < block->vdf_count; ++i) { uint64_t num_iters = 0; get_infusion(prev, i, num_iters); expected_iters += num_iters; } if(block->vdf_iters != expected_iters) { throw std::logic_error("invalid vdf_iters: " + std::to_string(block->vdf_iters) + " != " + std::to_string(expected_iters)); } if(block->time_diff < params->time_diff_divider) { throw std::logic_error("time_diff too low"); } validate_diff_adjust(block->time_diff, prev->time_diff); // need to check here to avoid VDF verify attack // need to verify challenge and space_diff update here bool is_space_fork = false; const auto next_challenge = calc_next_challenge(params, prev->challenge, block->vdf_count, block->proof_hash, is_space_fork); if(block->challenge != next_challenge) { throw std::logic_error("invalid challenge"); } if(block->is_space_fork != is_space_fork) { throw std::logic_error("invalid is_space_fork"); } if(is_space_fork) { const auto space_diff = calc_new_space_diff(params, prev); if(block->space_diff != space_diff) { throw std::logic_error("invalid space_diff: " + std::to_string(block->space_diff) + " != " + std::to_string(space_diff)); } if(block->space_fork_len != block->vdf_count) { throw std::logic_error("invalid space_fork_len at space fork"); } if(block->space_fork_proofs != proof_count) { throw std::logic_error("invalid space_fork_proofs at space fork"); } } else { if(block->space_diff != prev->space_diff) { throw std::logic_error("invalid space_diff change"); } if(block->space_fork_len != prev->space_fork_len + block->vdf_count) { throw std::logic_error("invalid space_fork_len"); } if(block->space_fork_proofs != prev->space_fork_proofs + proof_count) { throw std::logic_error("invalid space_fork_proofs"); } } const auto weight = calc_block_weight(params, block, prev); const auto total_weight = prev->total_weight + block->weight; if(block->weight != weight) { throw std::logic_error("invalid block weight: " + block->weight.str(10) + " != " + weight.str(10)); } if(block->total_weight != total_weight) { throw std::logic_error("invalid total weight: " + block->total_weight.str(10) + " != " + total_weight.str(10)); } uint64_t space_diff = 0; const auto challenge = get_challenge(block, 0, space_diff); for(auto proof : block->proof) { verify_proof(proof, challenge, space_diff, block->vdf_height); } } template void Node::verify_proof_impl( std::shared_ptr proof, const hash_t& challenge, const uint64_t space_diff, const uint32_t& vdf_height) const { if(proof->ksize < params->min_ksize) { throw std::logic_error("ksize too low"); } if(proof->ksize > params->max_ksize) { throw std::logic_error("ksize too high"); } const bool hard_fork = vdf_height >= params->hardfork1_height; const auto plot_challenge = get_plot_challenge(challenge, proof->plot_id); const auto quality = pos::verify( proof->proof_xs, plot_challenge, proof->plot_id, params->plot_filter, params->post_filter, proof->ksize, hard_fork); if(!check_proof_threshold(params, proof->ksize, quality, space_diff, hard_fork)) { throw std::logic_error("not good enough"); } } void Node::verify_proof(std::shared_ptr proof, const hash_t& challenge, const uint64_t space_diff, const uint32_t& vdf_height) const { if(space_diff <= 0) { throw std::logic_error("difficulty zero"); } if(!proof || !proof->is_valid()) { throw std::logic_error("invalid proof"); } if(proof->challenge != challenge) { throw std::logic_error("invalid challenge"); } if(proof->difficulty != space_diff) { throw std::logic_error("invalid difficulty"); } proof->validate(); if(!check_plot_filter(params, challenge, proof->plot_id)) { throw std::logic_error("plot filter failed"); } const auto og_proof = std::dynamic_pointer_cast(proof); const auto nft_proof = std::dynamic_pointer_cast(proof); if(og_proof) { verify_proof_impl(og_proof, challenge, space_diff, vdf_height); } else if(nft_proof) { verify_proof_impl(nft_proof, challenge, space_diff, vdf_height); } else { throw std::logic_error("invalid proof type: " + proof->get_type_name()); } const auto score = get_proof_score(proof->calc_proof_hash()); if(score != proof->score) { throw std::logic_error("proof score mismatch: expected " + std::to_string(proof->score) + " but got " + std::to_string(score)); } } void Node::verify_vdf(std::shared_ptr proof, const int64_t recv_time) { if(!proof->is_valid()) { throw std::logic_error("static validation failed"); } proof->validate(); const auto prev = get_header(proof->prev); if(!prev) { throw std::logic_error("could not find infused block"); } const auto num_iters = get_block_iters(params, get_time_diff(prev)); if(proof->num_iters != num_iters) { throw std::logic_error("invalid num_iters: " + std::to_string(proof->num_iters)); } if(proof->segment_size != params->vdf_segment_size) { throw std::logic_error("invalid segment size: " + std::to_string(proof->segment_size)); } if(proof->segments.size() * proof->segment_size != num_iters) { throw std::logic_error("invalid segment count: " + std::to_string(proof->segments.size())); } vdf_threads->add_task(std::bind(&Node::verify_vdf_task, this, proof, recv_time)); vdf_verify_pending.insert(proof->hash); timelord_trust[proof->timelord_key]--; } void Node::verify_vdf_cpu(std::shared_ptr proof) const { static bool have_sha_ni = sha256_ni_available(); static bool have_sha_arm = sha256_arm_available(); const auto& segments = proof->segments; bool is_valid = !segments.empty(); size_t invalid_segment = -1; constexpr uint32_t batch_size = 16; const uint32_t num_iters = proof->segment_size; const uint32_t num_chunks = (segments.size() + batch_size - 1) / batch_size; #pragma omp parallel for for(int chunk = 0; chunk < int(num_chunks); ++chunk) { if(!is_valid) { continue; } const auto num_lanes = std::min(batch_size, segments.size() - chunk * batch_size); hash_t point[batch_size]; uint8_t hash[batch_size][32]; uint8_t input[batch_size][64]; for(uint32_t j = 0; j < num_lanes; ++j) { const uint32_t i = chunk * batch_size + j; if(i > 0) { point[j] = segments[i - 1]; } else { point[j] = hash_t(proof->input + proof->prev); point[j] = hash_t(point[j] + proof->reward_addr); } } if(have_sha_ni || have_sha_arm) { // Note: `num_lanes` is always a multiple of 2 (based on chain params) for(uint32_t j = 0; j < num_lanes; j += 2) { uint8_t hashx2[32 * 2]; ::memcpy(hashx2, point[j].data(), 32); ::memcpy(hashx2 + 32, point[j + 1].data(), 32); if(have_sha_ni) { recursive_sha256_ni_x2(hashx2, num_iters); } else if(have_sha_arm) { recursive_sha256_arm_x2(hashx2, num_iters); } else { throw std::logic_error("invalid feature state"); } ::memcpy(point[j].data(), hashx2, 32); ::memcpy(point[j + 1].data(), hashx2 + 32, 32); } } else { for(uint32_t k = 0; k < num_iters; ++k) { for(uint32_t j = 0; j < num_lanes; ++j) { ::memcpy(input[j], point[j].data(), 32); } sha256_64_x8(hash[0], input[0], 32); sha256_64_x8(hash[8], input[8], 32); for(uint32_t j = 0; j < num_lanes; ++j) { ::memcpy(point[j].data(), hash[j], 32); } } } for(uint32_t j = 0; j < num_lanes; ++j) { const uint32_t i = chunk * batch_size + j; if(point[j] != segments[i]) { is_valid = false; invalid_segment = i; } } } if(!is_valid) { throw std::logic_error("invalid output on segment " + std::to_string(invalid_segment)); } } void Node::verify_vdf_success(std::shared_ptr point, const int64_t took_ms) { const auto peak = get_peak(); const auto proof = point->proof; const auto chain = find_next_vdf_points(peak); bool is_advance = false; if(chain.empty()) { is_advance = point->input == peak->vdf_output; } else { const auto prev = chain.back(); is_advance = point->input == prev->output; } if(is_advance) { if(chain.size() >= params->max_vdf_count) { log(WARN) << "VDF chain reached maximum length, discarded VDF for height " << point->vdf_height; return; } if(is_synced) { log(INFO) << "-------------------------------------------------------------------------------"; } stuck_timer->reset(); // make sure we keep sync status timelord_trust[proof->timelord_key] += 2; publish(proof, output_verified_vdfs); } const auto vdf_iters = point->start + point->num_iters; vdf_tree.emplace(point->output, point); vdf_index.emplace(vdf_iters, point); vdf_verify_pending.erase(proof->hash); publish(point, output_vdf_points); if(took_ms > params->block_interval_ms) { log(WARN) << "VDF verification took longer than block interval, unable to keep sync!"; } else if(took_ms > params->block_interval_ms / 2) { log(WARN) << "VDF verification took longer than recommended: " << took_ms / 1e3 << " sec"; } std::shared_ptr prev; { const auto iter = vdf_tree.find(point->input); if(iter != vdf_tree.end()) { prev = iter->second; } } std::stringstream ss_delta; if(prev) { ss_delta << ", delta = " << (point->recv_time - prev->recv_time) / 1e3 << " sec" ; } const char* clocks[] = { u8"\U0001F550", u8"\U0001F551", u8"\U0001F552", u8"\U0001F553", u8"\U0001F554", u8"\U0001F555", u8"\U0001F556", u8"\U0001F557", u8"\U0001F558", u8"\U0001F559", u8"\U0001F55A", u8"\U0001F55B" }; log(INFO) << clocks[point->vdf_height % 12] << " Verified VDF for height " << point->vdf_height << ss_delta.str() << ", took " << took_ms / 1e3 << " sec"; trigger_update(); } void Node::verify_vdf_task(std::shared_ptr proof, const int64_t recv_time) noexcept { std::shared_ptr engine; try { if(opencl_vdf_enable) { std::unique_lock lock(vdf_mutex); while(opencl_vdf.empty()) { vdf_signal.wait(lock); } engine = opencl_vdf.back(); opencl_vdf.pop_back(); } const auto begin = get_time_ms(); if(engine) { engine->compute(proof); engine->verify(proof); } else { verify_vdf_cpu(proof); } const auto took_ms = get_time_ms() - begin; auto point = VDF_Point::create(); point->vdf_height = proof->vdf_height; point->start = proof->start; point->num_iters = proof->num_iters; point->input = proof->input; point->output = proof->get_output(); point->prev = proof->prev; point->reward_addr = proof->reward_addr; point->recv_time = recv_time; point->proof = proof; point->content_hash = point->calc_hash(); add_task(std::bind(&Node::verify_vdf_success, this, point, took_ms)); } catch(const std::exception& ex) { add_task([this, proof]() { auto& trust = timelord_trust[proof->timelord_key]; trust = std::min(trust, 0) - 100; vdf_verify_pending.erase(proof->hash); trigger_update(); }); log(WARN) << "VDF verification for height " << proof->vdf_height << " failed with: " << ex.what(); } if(engine) { std::unique_lock lock(vdf_mutex); opencl_vdf.push_back(engine); } vdf_signal.notify_all(); } } // mmx ================================================ FILE: src/OCL_VDF.cpp ================================================ /* * OCL_VDF.cpp * * Created on: Dec 23, 2021 * Author: mad */ #include #include namespace mmx { #ifdef WITH_OPENCL std::mutex OCL_VDF::g_mutex; std::shared_ptr OCL_VDF::g_program; OCL_VDF::OCL_VDF(cl_context context, cl_device_id device) : context(context) { std::lock_guard lock(g_mutex); if(!g_program) { std::string kernel_path = "kernel/"; vnx::read_config("opencl.kernel_path", kernel_path); auto program = Program::create(context); program->add_include_path(kernel_path); program->add_source("sha256.cl"); program->add_source("rsha256.cl"); program->create_from_source(); if(!program->build({device})) { std::string text; for(const auto& line : program->build_log) { text += line + "\n"; } vnx::log_error() << "OCL_VDF: build failed with:" << std::endl << text; throw std::runtime_error("build failed"); } g_program = program; } kernel = g_program->create_kernel("rsha256_kernel"); if(!kernel) { throw std::runtime_error("rsha256 missing"); } queue = automy::basic_opencl::create_command_queue(context, device); } void OCL_VDF::compute(std::shared_ptr proof) { const size_t local = 64; const size_t width = proof->segments.size() + (local - (proof->segments.size() % local)) % local; if(!width) { throw std::logic_error("no segments"); } hash.resize(width * 32); { auto input = proof->input; input = hash_t(input + proof->prev); input = hash_t(input + proof->reward_addr); for(size_t i = 0; i < proof->segments.size(); ++i) { ::memcpy(hash.data() + i * 32, input.data(), input.size()); input = proof->segments[i]; } } num_iters.resize(width); for(size_t i = 0; i < proof->segments.size(); ++i) { num_iters[i] = proof->segment_size; } hash_buf.alloc_min(context, width * 32); num_iters_buf.alloc_min(context, width); hash_buf.upload(queue, hash, false); num_iters_buf.upload(queue, num_iters, false); const uint32_t max_iters = 2500; kernel->set("hash", hash_buf); kernel->set("num_iters", num_iters_buf); kernel->set("max_iters", max_iters); for(uint32_t k = 0; k < proof->segment_size; k += max_iters) { kernel->enqueue(queue, width, local); } queue->flush(); } void OCL_VDF::verify(std::shared_ptr proof) { hash_buf.download(queue, hash.data(), true); for(size_t i = 0; i < proof->segments.size(); ++i) { if(::memcmp(hash.data() + i * 32, proof->segments[i].data(), 32)) { throw std::logic_error("invalid output at segment " + std::to_string(i)); } } } void OCL_VDF::release() { std::lock_guard lock(g_mutex); g_program = nullptr; } #else OCL_VDF::OCL_VDF(cl_context context, cl_device_id device) { throw std::logic_error("did not compile with OpenCL support"); } void OCL_VDF::compute(std::shared_ptr proof) {} void OCL_VDF::verify(std::shared_ptr proof) {} void OCL_VDF::release() {} #endif // WITH_OPENCL } // mmx ================================================ FILE: src/Operation.cpp ================================================ /* * Operation.cpp * * Created on: Nov 27, 2021 * Author: mad */ #include #include namespace mmx { vnx::bool_t Operation::is_valid() const { return version == 0; } hash_t Operation::calc_hash(const vnx::bool_t& full_hash) const { throw std::logic_error("not implemented"); } uint64_t Operation::calc_cost(std::shared_ptr params) const { return 0; } } // mmx ================================================ FILE: src/Partial.cpp ================================================ /* * Partial.cpp * * Created on: Sep 18, 2024 * Author: mad */ #include #include #include namespace mmx { hash_t Partial::calc_hash() const { std::string tmp = get_type_name() + "/"; tmp += "vdf_height:" + std::to_string(vdf_height); tmp += "contract:" + contract.to_string(); tmp += "account:" + account.to_string(); tmp += "pool_url:" + pool_url; tmp += "harvester:" + harvester; tmp += "lookup_time_ms:" + std::to_string(lookup_time_ms); tmp += "proof:"; if(proof) { tmp += proof->get_type_name() + "/"; tmp += "score:" + std::to_string(proof->score); tmp += "plot_id:" + proof->plot_id.to_string(); tmp += "challenge:" + proof->challenge.to_string(); tmp += "difficulty:" + std::to_string(proof->difficulty); tmp += "farmer_key:" + proof->farmer_key.to_string(); } if(auto nft = std::dynamic_pointer_cast(proof)) { tmp += "ksize:" + std::to_string(nft->ksize); tmp += "seed:" + nft->seed.to_string(); tmp += "proof_xs:"; for(const auto& x : nft->proof_xs) { tmp += std::to_string(x) + ","; } tmp += "contract:" + nft->contract.to_string(); } return hash_t(tmp); } } // mmx ================================================ FILE: src/ProofOfSpace.cpp ================================================ /* * ProofOfSpace.cpp * * Created on: Apr 13, 2022 * Author: mad */ #include #include namespace mmx { vnx::bool_t ProofOfSpace::is_valid() const { return true; } mmx::hash_t ProofOfSpace::calc_hash() const { throw std::logic_error("not implemented"); } mmx::hash_t ProofOfSpace::calc_proof_hash() const { throw std::logic_error("not implemented"); } void ProofOfSpace::validate() const { throw std::logic_error("not implemented"); } } // mmx ================================================ FILE: src/ProofOfSpaceNFT.cpp ================================================ /* * ProofOfSpaceNFT.cpp * * Created on: Apr 13, 2022 * Author: mad */ #include #include #include namespace mmx { vnx::bool_t ProofOfSpaceNFT::is_valid() const { return Super::is_valid() && ksize > 0 && proof_xs.size() <= 256; } mmx::hash_t ProofOfSpaceNFT::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(4 * 1024); write_bytes(out, get_type_hash()); write_field(out, "score", score); write_field(out, "plot_id", plot_id); write_field(out, "challenge", challenge); write_field(out, "difficulty", difficulty); write_field(out, "farmer_key", farmer_key); write_field(out, "ksize", ksize); write_field(out, "seed", seed); write_field(out, "proof_xs", proof_xs); write_field(out, "contract", contract); out.flush(); return hash_t(buffer); } mmx::hash_t ProofOfSpaceNFT::calc_proof_hash() const { return mmx::calc_proof_hash(challenge, proof_xs); } void ProofOfSpaceNFT::validate() const { const hash_t id(std::string("MMX/PLOTID/NFT") + bytes_t<1>(&ksize, 1) + seed + farmer_key + contract); if(id != plot_id) { throw std::logic_error("invalid plot id"); } } } // mmx ================================================ FILE: src/ProofOfSpaceOG.cpp ================================================ /* * ProofOfSpaceOG.cpp * * Created on: Nov 30, 2021 * Author: mad */ #include #include #include namespace mmx { vnx::bool_t ProofOfSpaceOG::is_valid() const { return Super::is_valid() && ksize > 0 && proof_xs.size() <= 256; } mmx::hash_t ProofOfSpaceOG::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(4 * 1024); write_bytes(out, get_type_hash()); write_field(out, "score", score); write_field(out, "plot_id", plot_id); write_field(out, "challenge", challenge); write_field(out, "difficulty", difficulty); write_field(out, "farmer_key", farmer_key); write_field(out, "ksize", ksize); write_field(out, "seed", seed); write_field(out, "proof_xs", proof_xs); out.flush(); return hash_t(buffer); } mmx::hash_t ProofOfSpaceOG::calc_proof_hash() const { return mmx::calc_proof_hash(challenge, proof_xs); } void ProofOfSpaceOG::validate() const { const hash_t id(std::string("MMX/PLOTID/OG") + bytes_t<1>(&ksize, 1) + seed + farmer_key); if(id != plot_id) { throw std::logic_error("invalid plot id"); } } } // mmx ================================================ FILE: src/ProofOfTime.cpp ================================================ /* * ProofOfTime.cpp * * Created on: Nov 30, 2021 * Author: mad */ #include #include namespace mmx { bool ProofOfTime::is_valid() const { return version == 0 && vdf_height && num_iters && segments.size() && hash == calc_hash() && content_hash == calc_content_hash(); } hash_t ProofOfTime::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(64 * 1024); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "vdf_height", vdf_height); write_field(out, "start", start); write_field(out, "num_iters", num_iters); write_field(out, "segment_size", segment_size); write_field(out, "input", input); write_field(out, "prev", prev); write_field(out, "reward_addr", reward_addr); write_field(out, "segments", segments); out.flush(); return hash_t(buffer); } hash_t ProofOfTime::calc_content_hash() const { return hash_t(hash + timelord_key + timelord_sig); } hash_t ProofOfTime::get_output() const { if(segments.empty()) { return hash_t(); } return segments.back(); } uint64_t ProofOfTime::get_vdf_iters() const { return start + num_iters; } void ProofOfTime::validate() const { if(!timelord_sig.verify(timelord_key, hash)) { throw std::logic_error("invalid timelord signature"); } } } // mmx ================================================ FILE: src/ProofResponse.cpp ================================================ /* * ProofResponse.cpp * * Created on: Apr 1, 2022 * Author: mad */ #include #include namespace mmx { bool ProofResponse::is_valid() const { return proof && proof->is_valid() && harvester.size() < 1024 && hash == calc_hash() && content_hash == calc_content_hash(); } hash_t ProofResponse::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); // Note: farmer_addr, harvester and lookup_time_ms are not hashed (local info only) write_bytes(out, get_type_hash()); write_field(out, "vdf_height", vdf_height); write_field(out, "proof", proof ? proof->calc_hash() : hash_t()); out.flush(); return hash_t(buffer); } hash_t ProofResponse::calc_content_hash() const { return hash_t(hash + farmer_sig); } void ProofResponse::validate() const { if(!proof) { throw std::logic_error("missing proof"); } proof->validate(); if(!farmer_sig.verify(proof->farmer_key, hash)) { throw std::logic_error("invalid farmer signature"); } } } // mmx ================================================ FILE: src/ProofServer.cpp ================================================ /* * ProofServer.cpp * * Created on: May 13, 2025 * Author: mad */ #include #include namespace mmx { ProofServer::ProofServer(const std::string& _vnx_name) : ProofServerBase(_vnx_name) { } void ProofServer::init() { vnx::open_pipe(vnx_name, this, 20000); } void ProofServer::main() { threads = std::make_shared(num_threads, 100); set_timer_millis(60 * 1000, [this]() { if(num_requests) { std::stringstream ss; for(const auto& entry : request_map) { ss << ", " << entry.second << " k" << entry.first.first << "-C" << entry.first.second; } log(INFO) << num_requests << " requests/min" << ss.str(); } num_requests = 0; request_map.clear(); }); Super::main(); threads->close(); } void ProofServer::compute_async( const std::vector& X_values, const hash_t& id, const int32_t& ksize, const int32_t& xbits, const vnx::request_id_t& request_id) const { threads->add_task([=]() { try { std::vector X_out; const auto res = pos::compute(X_values, &X_out, id, ksize, xbits); std::vector out; if(res.size()) { const auto x_count = X_out.size() / res.size(); for(size_t i = 0; i < res.size(); ++i) { table_entry_t tmp; tmp.y = res[i].first; tmp.meta = res[i].second.bytes; for(size_t k = 0; k < x_count; ++k) { tmp.x_values.push_back(X_out[i * x_count + k]); } out.push_back(tmp); } } compute_async_return(request_id, out); } catch(const std::exception& ex) { vnx_async_return_ex(request_id, ex); } }); num_requests++; request_map[std::make_pair(ksize, xbits)]++; } } // mmx ================================================ FILE: src/Qt_GUI.cpp ================================================ /* * Qt_GUI.cpp * * Created on: Jan 22, 2025 * Author: mad */ #include #include #ifdef WITH_QT #include #include #include #include #include #include #include #include #include class RequestInterceptor : public QWebEngineUrlRequestInterceptor { public: std::string api_host; std::string api_token; std::string api_token_header; explicit RequestInterceptor(QObject* parent = nullptr) : QWebEngineUrlRequestInterceptor(parent) {} virtual ~RequestInterceptor() = default; void interceptRequest(QWebEngineUrlRequestInfo& info) override { const auto host = info.requestUrl().host().toStdString() + ":" + std::to_string(info.requestUrl().port()); if(host == api_host) { info.setHttpHeader(QByteArray::fromStdString(api_token_header), QByteArray::fromStdString(api_token)); } } }; void qt_log_func(QtMsgType type, const QMessageLogContext &context, const QString &msg) { vnx::log_debug() << "QT: " << msg.toStdString() << " (" << context.file << ":" << context.line << ")"; } void qt_gui_exec(char** argv, std::string host, std::string api_token, std::string api_token_header) { qInstallMessageHandler(qt_log_func); std::string version; vnx::read_config("build.version", version); const auto full_url = "http://" + host + "/gui/"; int argc = 1; QApplication app(argc, argv); const auto interceptor = new RequestInterceptor(); interceptor->api_host = host; interceptor->api_token = api_token; interceptor->api_token_header = api_token_header; QWebEngineScript script; script.setSourceCode("window.mmx_qtgui = true;"); script.setInjectionPoint(QWebEngineScript::DocumentCreation); script.setWorldId(QWebEngineScript::MainWorld); QWebEngineView view; view.page()->profile()->setRequestInterceptor(interceptor); view.page()->settings()->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, true); view.page()->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true); view.page()->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true); view.page()->scripts().insert(script); view.setUrl(QUrl(QString::fromStdString(full_url))); view.setWindowTitle(QString::fromStdString("MMX - " + version)); view.setWindowIcon(QIcon("www/web-gui/public/assets/img/logo_circle_color_cy256.png")); view.resize(1300, 1000); view.show(); app.exec(); } #endif // WITH_QT ================================================ FILE: src/Router.cpp ================================================ /* * Router.cpp * * Created on: Dec 17, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { Router::Router(const std::string& _vnx_name) : RouterBase(_vnx_name), rand_engine(get_time_us()) { params = get_params(); port = params->port; } void Router::init() { Super::init(); vnx::open_pipe(vnx_name, this, max_queue_ms); } void Router::main() { if(num_peers_out < 1) { throw std::logic_error("num_peers_out < 1"); } if(min_sync_peers < 1) { throw std::logic_error("min_sync_peers < 1"); } min_sync_peers = std::min(min_sync_peers, num_peers_out); if(max_connections >= 0) { if(num_peers_out > uint32_t(max_connections)) { throw std::logic_error("num_peers_out > max_connections"); } if(min_sync_peers > uint32_t(max_connections)) { throw std::logic_error("min_sync_peers > max_connections"); } } fixed_peers.insert(master_nodes.begin(), master_nodes.end()); { const auto max_block_size = to_value(params->max_block_size, params); tx_upload_bandwidth = max_tx_upload * max_block_size / params->get_block_time(); max_pending_cost_value = max_pending_cost * max_block_size; } log(INFO) << "Global TX upload limit: " << tx_upload_bandwidth << " MMX/s"; log(INFO) << "Peer TX pending limit: " << max_pending_cost_value << " MMX"; subscribe(input_verified_vdfs, max_queue_ms); subscribe(input_verified_votes, max_queue_ms); subscribe(input_verified_proof, max_queue_ms); subscribe(input_verified_blocks, max_queue_ms); subscribe(input_verified_transactions, max_queue_ms); subscribe(input_transactions, max_queue_ms); subscribe(input_vdf_points, max_queue_ms); subscribe(input_vdfs, max_queue_ms); node_skey = skey_t(hash_t::random()); node_key = pubkey_t(node_skey); node_id = node_key.get_addr(); { vnx::File file(storage_path + "known_peers.dat"); if(file.exists()) { std::vector peers; try { file.open("rb"); vnx::read_generic(file.in, peers); file.close(); } catch(const std::exception& ex) { log(WARN) << "Failed to read peers from file: " << ex.what(); } peer_set.insert(peers.begin(), peers.end()); } } log(INFO) << "Node ID: " << node_id; log(INFO) << "Loaded " << peer_set.size() << " known peers"; node = std::make_shared(node_server); node->vnx_set_non_blocking(true); add_async_client(node); http = std::make_shared>(this, vnx_name); add_async_client(http); if(open_port) { upnp_mapper = upnp_start_mapping(port, "MMX Node"); log(upnp_mapper ? INFO : WARN) << "UPnP supported: " << (upnp_mapper ? "yes" : "no"); } set_timer_millis(send_interval_ms, std::bind(&Router::send, this)); set_timer_millis(query_interval_ms, std::bind(&Router::query, this)); set_timer_millis(update_interval_ms, std::bind(&Router::update, this)); set_timer_millis(connect_interval_ms, std::bind(&Router::connect, this)); set_timer_millis(discover_interval * 1000, std::bind(&Router::discover, this)); set_timer_millis(5 * 60 * 1000, std::bind(&Router::save_data, this)); connect(); Super::main(); save_data(); if(upnp_mapper) { upnp_mapper->stop(); } } hash_t Router::get_id() const { return node_id; } node_info_t Router::get_info() const { node_info_t info; info.id = node_id; info.version = node_version; info.type = mode; return info; } std::pair Router::sign_msg(const hash_t& msg) const { return std::make_pair(node_key, signature_t::sign(node_skey, msg)); } static bool is_valid_address(const std::string& addr) { if(addr.empty() || addr.substr(0, 4) == "127." || addr == "0.0.0.0") { return false; } return true; } static bool is_public_address(const std::string& addr) { if(!is_valid_address(addr) || addr.substr(0, 3) == "10." || addr.substr(0, 8) == "192.168.") { return false; } return true; } template std::vector get_subset(const std::set& candidates, const size_t max_count, R& engine) { std::vector result(candidates.begin(), candidates.end()); if(max_count < result.size()) { std::shuffle(result.begin(), result.end(), engine); result.resize(max_count); } return result; } std::vector Router::get_peers(const uint32_t& max_count) const { auto peers = get_known_peers(); const auto connected = get_connected_peers(); peers.insert(peers.end(), connected.begin(), connected.end()); std::set valid; for(const auto& addr : peers) { if(is_public_address(addr)) { valid.insert(addr); } } return get_subset(valid, max_count, rand_engine); } std::vector Router::get_known_peers() const { return std::vector(peer_set.begin(), peer_set.end()); } std::vector Router::get_connected_peers() const { std::vector res; for(const auto& entry : peer_map) { res.push_back(entry.second->address); } return res; } std::shared_ptr Router::get_peer_info() const { const auto now_ms = get_time_ms(); auto info = PeerInfo::create(); for(const auto& entry : peer_map) { const auto& state = entry.second; peer_info_t peer; peer.id = entry.first; peer.type = state->info.type; peer.address = state->address; peer.height = state->height; peer.version = state->info.version; peer.ping_ms = state->ping_ms; peer.bytes_send = state->bytes_send; peer.bytes_recv = state->bytes_recv; peer.pending_cost = state->pending_cost; peer.compression_ratio = state->bytes_send_raw / double(state->bytes_send); peer.is_synced = state->is_synced; peer.is_paused = state->is_paused; peer.is_blocked = state->is_blocked; peer.is_outbound = state->is_outbound; peer.recv_timeout_ms = now_ms - state->last_receive_ms; peer.connect_time_ms = now_ms - state->connected_since_ms; info->peers.push_back(peer); } std::sort(info->peers.begin(), info->peers.end(), [](const peer_info_t& lhs, const peer_info_t& rhs) -> bool { return lhs.connect_time_ms > rhs.connect_time_ms; }); return info; } void Router::kick_peer(const std::string& address) { for(auto peer : find_peers(address)) { ban_peer(peer->client, "kicked manually"); } } void Router::get_blocks_at_async(const uint32_t& height, const vnx::request_id_t& request_id) const { auto job = std::make_shared(); job->height = height; job->start_time_ms = get_time_ms(); sync_jobs[request_id] = job; ((Router*)this)->process(); } void Router::fetch_block_async(const hash_t& hash, const vnx::optional& address, const vnx::request_id_t& request_id) const { auto job = std::make_shared(); job->hash = hash; job->from_peer = address; job->callback = std::bind(&Router::fetch_block_async_return, this, request_id, std::placeholders::_1); job->start_time_ms = get_time_ms(); fetch_jobs[request_id] = job; ((Router*)this)->process(); } void Router::fetch_block_at_async(const uint32_t& height, const std::string& address, const vnx::request_id_t& request_id) const { auto job = std::make_shared(); job->height = height; job->from_peer = address; job->callback = std::bind(&Router::fetch_block_at_async_return, this, request_id, std::placeholders::_1); job->start_time_ms = get_time_ms(); fetch_jobs[request_id] = job; ((Router*)this)->process(); } void Router::handle(std::shared_ptr block) { const auto& hash = block->content_hash; const auto is_ours = !hash_info.count(hash); // block does not give any credits (to avoid denial of service attack by farmer) if(relay_msg_hash(hash)) { if(is_ours) { log(INFO) << "Broadcasting block for height " << block->height; } broadcast(block, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, is_ours); block_counter++; } // don't erase current height, to prevent lesser block erasing better proof credit vdf_history.erase(vdf_history.begin(), vdf_history.upper_bound(verified_vdf_height)); farmer_credit.erase(farmer_credit.begin(), farmer_credit.upper_bound(verified_vdf_height)); verified_vdf_height = block->vdf_height; verified_peak_height = block->height; } void Router::handle(std::shared_ptr tx) { const auto& hash = tx->content_hash; if(relay_msg_hash(hash)) { if(vnx_sample->topic == input_transactions) { broadcast(tx, hash, {node_type_e::FULL_NODE}, true, true); } else { relay(tx, hash, {node_type_e::FULL_NODE}); } tx_counter++; } } void Router::handle(std::shared_ptr value) { if(vnx_sample && vnx_sample->topic == input_vdfs) { if(our_timelords.insert(value->timelord_key).second) { log(INFO) << "Our Timelord: " << value->timelord_key; } if(value->vdf_height <= verified_vdf_height) { return; // too slow } } const bool is_ours = our_timelords.count(value->timelord_key); const auto& hash = value->content_hash; if(relay_msg_hash(hash)) { if(is_ours) { log(INFO) << u8"\U0000231B Broadcasting VDF for height " << value->vdf_height; } broadcast(value, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, is_ours); vdf_history.emplace(value->vdf_height, value); vdf_counter++; } timelord_credit[value->timelord_key] = 1; verified_vdf_height = std::max(verified_vdf_height, value->vdf_height); } void Router::handle(std::shared_ptr value) { if(value->proof) { auto tmp = vnx::clone(value); tmp->proof = nullptr; value = tmp; } const auto& hash = value->content_hash; if(relay_msg_hash(hash)) { broadcast(value, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, true); } } void Router::handle(std::shared_ptr value) { if(!value->proof) { return; } const auto is_ours = bool(vnx::get_pipe(value->farmer_addr)); const auto& hash = value->content_hash; if(relay_msg_hash(hash)) { if(is_ours) { log(DEBUG) << "Broadcasting proof for height " << value->vdf_height << " with score " << value->proof->score; } auto copy = vnx::clone(value); copy->harvester.clear(); // clear local information copy->farmer_addr = vnx::Hash64(); // clear local information broadcast(copy, hash, {node_type_e::FULL_NODE}, is_ours); farmer_credit[value->vdf_height].insert(value->proof->farmer_key); proof_counter++; } } void Router::handle(std::shared_ptr value) { const auto& hash = value->content_hash; if(relay_msg_hash(hash)) { broadcast(value, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, false); vote_counter++; } } uint32_t Router::send_request(std::shared_ptr peer, std::shared_ptr method, bool reliable) { auto req = Request::create(); req->id = next_request_id++; req->method = method; send_to(peer, req, reliable); return req->id; } uint32_t Router::send_request(uint64_t client, std::shared_ptr method, bool reliable) { auto req = Request::create(); req->id = next_request_id++; req->method = method; send_to(client, req, reliable); return req->id; } void Router::update() { const auto now_ms = get_time_ms(); for(const auto& entry : peer_map) { const auto& peer = entry.second; peer->pending_cost = std::max(peer->pending_cost, 0) * 0.999; // clear old hashes while(peer->hash_queue.size() > max_sent_cache) { peer->sent_hashes.erase(peer->hash_queue.front()); peer->hash_queue.pop(); } // check for timeout if(connection_timeout_ms > 0 && now_ms - std::max(peer->last_receive_ms, peer->connected_since_ms) > connection_timeout_ms) { log(INFO) << "Peer " << peer->address << " timed out"; disconnect(entry.first); } // check for manual disconnect if(disconnect_interval && !peer->is_outbound && (now_ms - peer->connected_since_ms) / 1000 > disconnect_interval) { log(INFO) << "Disconnecting peer " << peer->address << " due to interval exceeded"; disconnect(entry.first); } } // clear seen hashes while(hash_queue.size() > max_hash_cache) { hash_info.erase(hash_queue.front()); hash_queue.pop(); } // check if we lost sync due to response timeout { size_t num_peers = 0; for(const auto& entry : peer_map) { const auto& peer = entry.second; if(peer->is_synced && now_ms - peer->last_receive_ms < sync_loss_delay * 1000) { num_peers++; } } if(num_peers < min_sync_peers) { node->get_synced_height([this](const vnx::optional& height) { if(is_connected && height) { log(WARN) << "Lost sync with network due to loss of synced peers or timeout!"; is_connected = false; node->start_sync(); } }); } else { is_connected = true; } } if(synced_peers.size() >= min_sync_peers) { // check for sync job timeouts for(auto& entry : sync_jobs) { auto& job = entry.second; if(now_ms - std::max(job->start_time_ms, job->last_recv_ms) > fetch_timeout_ms) { for(auto client : job->pending) { synced_peers.erase(client); } { const auto height = job->height; job = std::make_shared(); job->height = height; } job->start_time_ms = now_ms; log(WARN) << "Timeout on sync job for height " << job->height << ": " << job->got_hash.size() << " reply, " << job->num_fetch << " fetch, " << job->failed.size() << " failed, " << job->pending.size() << " pending, " << job->succeeded.size() << " succeeded"; } } } // check for fetch job timeouts for(auto iter = fetch_jobs.begin(); iter != fetch_jobs.end();) { const auto job = iter->second; if(now_ms - std::max(job->start_time_ms, job->last_recv_ms) > fetch_timeout_ms) { vnx_async_return_ex_what(iter->first, "fetch timeout"); iter = fetch_jobs.erase(iter); } else { iter++; } } process(); } bool Router::process(std::shared_ptr ret) { const auto now_ms = get_time_ms(); bool did_consume = false; for(auto& entry : sync_jobs) { const auto& request_id = entry.first; auto& job = entry.second; const auto elapsed_ms = now_ms - job->start_time_ms; if(ret) { // check for any returns auto iter = job->request_map.find(ret->id); if(iter != job->request_map.end()) { const auto client = iter->second; if(auto result = std::dynamic_pointer_cast(ret->result)) { if(auto hash = result->_ret_0) { if(job->blocks.count(hash->second)) { job->succeeded.insert(client); } job->got_hash[client] = *hash; } else { job->failed.insert(client); } } else if(auto result = std::dynamic_pointer_cast(ret->result)) { if(auto block = result->_ret_0) { const auto& hash = block->content_hash; if(block->is_valid()) { for(const auto& entry : job->got_hash) { if(entry.second.second == hash) { job->succeeded.insert(entry.first); } } job->succeeded.insert(client); job->blocks[hash] = block; } else { ban_peer(client, "they sent us an invalid block"); } job->pending_blocks.erase(hash); } if(!job->succeeded.count(client)) { job->failed.insert(client); } } else if(auto result = std::dynamic_pointer_cast(ret->result)) { auto got_hash = job->got_hash.find(client); if(got_hash != job->got_hash.end()) { job->pending_blocks.erase(got_hash->second.second); } } job->pending.erase(client); job->request_map.erase(iter); job->last_recv_ms = now_ms; did_consume = true; } else { continue; } } // check for disconnects for(auto iter = job->pending.begin(); iter != job->pending.end();) { const auto client = *iter; if(synced_peers.count(client)) { iter++; } else { auto iter2 = job->got_hash.find(client); if(iter2 != job->got_hash.end()) { job->pending_blocks.erase(iter2->second.second); job->got_hash.erase(iter2); } iter = job->pending.erase(iter); } } const auto num_returns = job->failed.size() + job->succeeded.size(); if(num_returns < min_sync_peers) { // fetch block hashes const auto max_pending = min_sync_peers + 3; const auto num_pending = job->pending.size() + job->got_hash.size(); if(num_pending < max_pending) { std::set clients; for(auto client : synced_peers) { if(!job->failed.count(client) && !job->pending.count(client) && !job->succeeded.count(client) && !job->got_hash.count(client)) { clients.insert(client); } } for(const auto client : get_subset(clients, max_pending - num_pending, rand_engine)) { auto req = Node_get_block_hash_ex::create(); req->height = job->height; const auto id = send_request(client, req); job->request_map[id] = client; job->pending.insert(client); } } // fetch blocks std::set>> clients; for(const auto& entry : job->got_hash) { const auto& hash = entry.second; if(!job->blocks.count(hash.second)) { const auto client = entry.first; if(!job->failed.count(client) && !job->pending.count(client) && !job->succeeded.count(client)) { clients.emplace(client, hash); } } } for(const auto& entry : get_subset(clients, clients.size(), rand_engine)) { const auto client = entry.first; const auto& hash = entry.second; auto pending = job->pending_blocks.find(hash.second); if(pending == job->pending_blocks.end() || now_ms > pending->second) { auto req = Node_get_block::create(); req->hash = hash.first; const auto id = send_request(client, req); job->request_map[id] = client; job->pending.insert(client); job->pending_blocks[hash.second] = now_ms + fetch_timeout_ms / 8; job->num_fetch++; } } } else { uint64_t max_block_size = 0; for(const auto& entry : job->blocks) { max_block_size = std::max(entry.second->static_cost, max_block_size); } log(DEBUG) << "Got " << job->blocks.size() << " blocks for height " << job->height << " by fetching " << job->num_fetch << " times, " << job->got_hash.size() << " reply, " << job->failed.size() << " failed" << ", size = " << to_value(max_block_size, params) << " MMX" << ", took " << elapsed_ms / 1e3 << " sec"; // we are done with the job std::vector> blocks; for(const auto& entry : job->blocks) { blocks.push_back(entry.second); } job->is_done = true; get_blocks_at_async_return(request_id, blocks); } } for(auto iter = sync_jobs.begin(); iter != sync_jobs.end();) { if(iter->second->is_done) { iter = sync_jobs.erase(iter); } else { iter++; } } for(const auto& entry : fetch_jobs) { const auto& request_id = entry.first; const auto& job = entry.second; if(ret) { // check for any returns auto iter = job->request_map.find(ret->id); if(iter != job->request_map.end()) { const auto client = iter->second; if(auto result = std::dynamic_pointer_cast(ret->result)) { if(job->height) { job->is_done = true; job->callback(result->_ret_0); } } else if(auto result = std::dynamic_pointer_cast(ret->result)) { if(job->hash) { if(result->_ret_0 || job->from_peer) { job->is_done = true; job->callback(result->_ret_0); log(DEBUG) << "Got block " << *job->hash << " by fetching " << job->pending.size() + job->failed.size() << " times, " << job->failed.size() << " failed, took" << (now_ms - job->start_time_ms) / 1e3 << " sec"; } else { job->failed.insert(client); } } } else if(job->from_peer) { job->is_done = true; vnx_async_return_ex_what(request_id, "request failed"); } else { job->failed.insert(client); } job->pending.erase(client); job->request_map.erase(iter); job->last_recv_ms = now_ms; did_consume = true; } else { continue; } } if(job->is_done) { continue; } // check for disconnects for(auto iter = job->pending.begin(); iter != job->pending.end();) { if(synced_peers.count(*iter)) { iter++; } else { iter = job->pending.erase(iter); } } if(auto address = job->from_peer) { if(job->request_map.empty()) { std::shared_ptr peer; { const auto peers = find_peers(*address); if(!peers.empty()) { peer = peers[0]; } } if(!peer) { job->is_done = true; vnx_async_return_ex_what(request_id, "no such peer"); continue; } if(auto hash = job->hash) { auto req = Node_get_block::create(); req->hash = *hash; const auto id = send_request(peer, req); job->request_map[id] = peer->client; } if(auto height = job->height) { auto req = Node_get_block_at::create(); req->height = *height; const auto id = send_request(peer, req); job->request_map[id] = peer->client; } } } else if(auto hash = job->hash) { auto clients = synced_peers; for(auto id : job->failed) { clients.erase(id); } for(auto id : job->pending) { clients.erase(id); } if(clients.empty() && job->pending.empty()) { job->is_done = true; job->callback(nullptr); continue; } if(job->pending.size() < min_sync_peers) { for(auto client : get_subset(clients, min_sync_peers - job->pending.size(), rand_engine)) { auto req = Node_get_block::create(); req->hash = *hash; const auto id = send_request(client, req); job->request_map[id] = client; job->pending.insert(client); } } } else { job->is_done = true; vnx_async_return_ex_what(request_id, "invalid request"); } } for(auto iter = fetch_jobs.begin(); iter != fetch_jobs.end();) { if(iter->second->is_done) { iter = fetch_jobs.erase(iter); } else { iter++; } } return did_consume; } std::string Router::resolve(const std::string& host_name) { if(auto address = find_value(host_map, host_name)) { return *address; } try { return host_map[host_name] = vnx::resolve_host(host_name); } catch(const std::exception& ex) { log(DEBUG) << ex.what(); } return std::string(); } void Router::connect_to(const std::string& host_name) { if(connect_tasks.count(host_name)) { return; } log(DEBUG) << "Trying to connect to " << host_name; try { const auto address = vnx::resolve_host(host_name); if(address != host_name) { log(INFO) << "Peer host " << host_name << " resolves to " << address; } host_map[host_name] = address; vnx::TcpEndpoint peer; peer.host_name = host_name; peer.port = params->port; const auto client = connect_client(peer); connect_tasks[host_name] = client; } catch(const std::exception& ex) { if(show_warnings) { log(WARN) << "Connecting to peer " << host_name << " failed with: " << ex.what(); } } } void Router::connect() { const auto now_ms = get_time_ms(); const auto now_sec = now_ms / 1000; // connect to fixed peers for(const auto& host_name : fixed_peers) { if(!peer_addr_map.count(resolve(host_name))) { connect_to(host_name); } } std::set> outbound_synced; std::set> outbound_not_synced; for(const auto& entry : peer_map) { const auto& peer = entry.second; if(peer->is_outbound && !fixed_peers.count(peer->host_name)) { if(peer->is_synced) { outbound_synced.insert(peer); } else if(now_ms - peer->connected_since_ms > connection_timeout_ms) { outbound_not_synced.insert(peer); } } } // connect to new peers { std::set try_peers; std::set all_peers = peer_set; for(const auto& entry : peer_retry_map) { all_peers.insert(entry.first); } all_peers.insert(seed_peers.begin(), seed_peers.end()); for(const auto& host_name : all_peers) { const auto address = resolve(host_name); if(!is_valid_address(address)) { continue; } if(outbound_synced.size() >= num_peers_out) { auto iter = peer_retry_map.find(address); if(iter != peer_retry_map.end()) { if(now_sec < iter->second) { continue; // wait before trying again } } else { // randomize re-checking peer_retry_map[address] = now_sec + vnx::rand64() % (peer_retry_interval * 60); continue; } } if(!peer_addr_map.count(address) && !connect_tasks.count(host_name) && !block_peers.count(address) && !block_peers.count(host_name)) { try_peers.insert(address); } } for(const auto& address : get_subset(try_peers, num_peers_out, rand_engine)) { if(connect_tasks.size() >= 2 * num_peers_out) { break; } connect_to(address); peer_retry_map.erase(address); } } // disconnect if we have too many outbound synced peers { size_t num_disconnect = 0; if(outbound_synced.size() > num_peers_out + 1) { num_disconnect = outbound_synced.size() - num_peers_out; } for(const auto& peer : get_subset(outbound_synced, num_disconnect, rand_engine)) { log(DEBUG) << "Disconnecting from " << peer->address << " to reduce connections to synced peers"; disconnect(peer->client); } } // disconnect if we have too many outbound non-synced peers { size_t num_disconnect = 0; if(outbound_not_synced.size() > num_peers_out) { num_disconnect = outbound_not_synced.size() - num_peers_out; } for(const auto& peer : get_subset(outbound_not_synced, num_disconnect, rand_engine)) { log(DEBUG) << "Disconnecting from " << peer->address << " to reduce connections to non-synced peers"; disconnect(peer->client); } } } void Router::query() { const auto now_ms = get_time_ms(); { auto req = Request::create(); req->id = next_request_id++; req->method = Node_get_synced_height::create(); send_all(req, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, false); } last_query_ms = now_ms; } void Router::discover() { if(peer_set.size() < max_peer_set) { auto req = Request::create(); req->id = next_request_id++; req->method = Router_get_peers::create(); send_all(req, {node_type_e::FULL_NODE}, false); } // check peers and disconnect forks node->get_synced_height( [this](const vnx::optional& sync_height) { if(sync_height) { auto method = Node_get_block_hash::create(); method->height = *sync_height - 2 * params->commit_delay; node->get_block_hash(method->height, [this, method](const vnx::optional& hash) { if(hash) { auto req = Request::create(); req->id = next_request_id++; req->method = method; send_all(req, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}, false); peer_check.height = method->height; peer_check.our_hash = *hash; peer_check.request_id = req->id; } }); } }); } void Router::save_data() { { vnx::File file(storage_path + "known_peers.dat"); try { file.open("wb"); const auto peers = get_known_peers(); vnx::write_generic(file.out, std::set(peers.begin(), peers.end())); file.close(); } catch(const std::exception& ex) { log(WARN) << "Failed to write peers to file: " << ex.what(); } } { std::ofstream file(storage_path + "timelord_credit.txt", std::ios::trunc); for(const auto& entry : timelord_credit) { file << entry.first << "\t" << entry.second << std::endl; } } } void Router::print_stats() { log(INFO) << float(tx_counter * 1000) / stats_interval_ms << " tx/s, " << float(vdf_counter * 1000) / stats_interval_ms << " vdf/s, " << float(proof_counter * 1000) / stats_interval_ms << " proof/s, " << float(block_counter * 1000) / stats_interval_ms << " block/s, " << float(vote_counter * 1000) / stats_interval_ms << " votes/s, " << synced_peers.size() << " / " << peer_map.size() << " / " << peer_set.size() << " peers, " << timelord_credit.size() << " timelords, " << float(tx_upload_sum * 1000) / stats_interval_ms << " MMX/s tx upload, " << tx_drop_counter << " / " << vdf_drop_counter << " / " << proof_drop_counter << " / " << block_drop_counter << " dropped"; tx_counter = 0; tx_upload_sum = 0; vdf_counter = 0; vote_counter = 0; proof_counter = 0; block_counter = 0; upload_counter = 0; tx_drop_counter = 0; vdf_drop_counter = 0; proof_drop_counter = 0; block_drop_counter = 0; } void Router::ban_peer(uint64_t client, const std::string& reason) { if(block_peers.size() >= 1000000) { log(WARN) << "block_peers overflow"; block_peers.erase(block_peers.begin()); } if(auto peer = find_peer(client)) { block_peers.insert(peer->address); disconnect(client); log(WARN) << "Banned peer " << peer->address << " because: " << reason; } } void Router::on_vdf(uint64_t client, std::shared_ptr value) { if(value->vdf_height + params->commit_delay < verified_vdf_height) { return; // prevent replay attack of old signed data } if(!value->is_valid()) { disconnect(client); return; } const auto& hash = value->content_hash; if(receive_msg_hash(hash, client)) { try { value->validate(); } catch(const std::exception& ex) { disconnect(client); return; } if(value->segments.size() < max_vdf_segments) { auto iter = timelord_credit.find(value->timelord_key); if(iter != timelord_credit.end() && iter->second > 0) { if(relay_msg_hash(hash)) { iter->second--; relay(value, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}); vdf_counter++; } } else { log(DEBUG) << "Timelord " << value->timelord_key << " has no credit to relay VDF for height " << value->vdf_height << ", verifying first."; } } publish(value, output_vdfs); } } void Router::on_block(uint64_t client, std::shared_ptr block) { if(block->height + params->commit_delay < verified_peak_height) { return; // prevent replay attack of old signed data } if(!block->is_valid()) { disconnect(client); return; } const auto& hash = block->content_hash; if(receive_msg_hash(hash, client)) { try { block->validate(); } catch(const std::exception& ex) { disconnect(client); return; } const auto farmer_key = block->proof[0]->farmer_key; auto iter = farmer_credit.find(block->vdf_height); if(iter != farmer_credit.end() && iter->second.erase(farmer_key)) { if(relay_msg_hash(hash)) { relay(block, hash, {node_type_e::FULL_NODE, node_type_e::LIGHT_NODE}); block_counter++; } } else { log(DEBUG) << "Farmer " << farmer_key << " has no credit to relay block for height " << block->height << ", verifying first."; } publish(block, output_blocks); } } void Router::on_vote(uint64_t client, std::shared_ptr value) { if(!value->is_valid()) { disconnect(client); return; } if(receive_msg_hash(value->content_hash, client)) { publish(value, output_votes); } } void Router::on_proof(uint64_t client, std::shared_ptr value) { if(!value->is_valid()) { disconnect(client); return; } if(receive_msg_hash(value->content_hash, client)) { publish(value, output_proof); } } void Router::on_vdf_point(uint64_t client, std::shared_ptr value) { if(auto peer = find_peer(client)) { if(master_nodes.count(peer->host_name)) { if(value->is_valid()) { if(receive_msg_hash(value->content_hash, client)) { auto copy = vnx::clone(value); copy->recv_time = get_time_ms(); publish(copy, output_vdf_points); } } } } } void Router::on_transaction(uint64_t client, std::shared_ptr tx) { if(!tx->is_valid(params) || tx->exec_result) { disconnect(client); return; } if(receive_msg_hash(tx->content_hash, client)) { publish(tx, output_transactions); } } void Router::on_recv_note(uint64_t client, std::shared_ptr note) { if(auto peer = find_peer(client)) { if(peer->sent_hashes.insert(note->hash).second) { peer->hash_queue.push(note->hash); } auto iter = peer->pending_map.find(note->hash); if(iter != peer->pending_map.end()) { peer->pending_cost = std::max(peer->pending_cost - iter->second, 0); peer->pending_map.erase(iter); } } } void Router::recv_notify(const hash_t& msg_hash) { auto note = ReceiveNote::create(); note->time = get_time_us(); note->hash = msg_hash; for(const auto& entry : peer_map) { send_to(entry.second, note, true); } } void Router::send() { const auto now = get_time_us(); tx_upload_credits += tx_upload_bandwidth * send_interval_ms / 1000; tx_upload_credits = std::min(tx_upload_credits, tx_upload_bandwidth); for(const auto& entry : peer_map) { const auto& peer = entry.second; for(auto iter = peer->send_queue.begin(); iter != peer->send_queue.end() && iter->first < now;) { const auto& item = iter->second; if(!peer->sent_hashes.count(item.hash)) { if(send_to(peer, item.value, item.reliable)) { if(peer->sent_hashes.insert(item.hash).second) { peer->hash_queue.push(item.hash); } } } iter = peer->send_queue.erase(iter); } } } void Router::send_to( std::vector> peers, std::shared_ptr msg, const hash_t& msg_hash, bool reliable) { std::shuffle(peers.begin(), peers.end(), rand_engine); const auto now = get_time_us(); const auto interval = (relay_target_ms * 1000) / (1 + peers.size()); for(size_t i = 0; i < peers.size(); ++i) { send_item_t item; item.hash = msg_hash; item.value = msg; item.reliable = reliable; peers[i]->send_queue.emplace(now + interval * i, item); } } void Router::relay(std::shared_ptr msg, const hash_t& msg_hash, const std::set& filter) { if(do_relay) { broadcast(msg, msg_hash, filter, false); } } void Router::broadcast( std::shared_ptr msg, const hash_t& msg_hash, const std::set& filter, bool reliable, bool synced_only) { std::vector> peers; for(const auto& entry : peer_map) { const auto& peer = entry.second; if(!synced_only || peer->is_synced) { if(filter.empty() || filter.count(peer->info.type)) { peers.push_back(peer); } } } send_to(peers, msg, msg_hash, reliable); } bool Router::send_to(uint64_t client, std::shared_ptr msg, bool reliable) { if(auto peer = find_peer(client)) { return send_to(peer, msg, reliable); } return false; } bool Router::send_to(std::shared_ptr peer, std::shared_ptr msg, bool reliable) { if(!peer->is_valid) { return false; } if(!reliable && peer->is_blocked) { bool drop = true; switch(msg->get_type_hash()) { case Block::VNX_TYPE_ID: case ProofOfTime::VNX_TYPE_ID: case ProofResponse::VNX_TYPE_ID: if(peer->write_queue_size < priority_queue_size) { drop = false; } } if(drop) { switch(msg->get_type_hash()) { case Block::VNX_TYPE_ID: block_drop_counter++; break; case Transaction::VNX_TYPE_ID: tx_drop_counter++; break; case ProofOfTime::VNX_TYPE_ID: vdf_drop_counter++; break; case ProofResponse::VNX_TYPE_ID: proof_drop_counter++; break; default: if(auto req = std::dynamic_pointer_cast(msg)) { auto ret = Return::create(); ret->id = req->id; ret->result = vnx::OverflowException::create(); add_task(std::bind(&Router::on_return, this, peer->client, ret)); } } return false; } } if(!reliable) { if(auto tx = std::dynamic_pointer_cast(msg)) { if(peer->pending_cost >= max_pending_cost_value) { tx_drop_counter++; return false; } std::uniform_real_distribution dist(0, 1); if(dist(rand_engine) > tx_upload_credits / tx_upload_bandwidth) { tx_drop_counter++; return false; } const auto cost = to_value(tx->static_cost, params); if(peer->pending_map.emplace(tx->content_hash, cost).second) { peer->pending_cost += cost; } tx_upload_credits = std::max(tx_upload_credits - cost, 0.); tx_upload_sum += cost; } } return Super::send_to(peer, msg); } void Router::send_all(std::shared_ptr msg, const std::set& filter, bool reliable) { for(const auto& entry : peer_map) { const auto& peer = entry.second; if(filter.empty() || filter.count(peer->info.type)) { send_to(peer, msg, reliable); } } } template void Router::send_result(uint64_t client, uint32_t id, const T& value) { auto ret = Return::create(); ret->id = id; auto result = R::create(); result->_ret_0 = value; ret->result = result; send_to(client, ret); } void Router::on_error(uint64_t client, uint32_t id, const vnx::exception& ex) { auto ret = Return::create(); ret->id = id; ret->result = ex.value(); send_to(client, ret); } void Router::on_request(uint64_t client, std::shared_ptr msg) { const auto method = msg->method; if(!method) { return; } if(auto peer = find_peer(client)) { if(peer->is_blocked) { auto ret = Return::create(); ret->id = msg->id; ret->result = vnx::OverflowException::create(); send_to(client, ret); peer->is_paused = true; return; } } switch(method->get_type_hash()) { case Router_get_id::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { send_result(client, msg->id, get_id()); } break; case Router_get_info::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { send_result(client, msg->id, get_info()); } break; case Router_sign_msg::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { send_result(client, msg->id, sign_msg(value->msg)); } break; case Router_get_peers::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { send_result(client, msg->id, get_peers(value->max_count)); } break; case Node_get_height::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_height( [=](const uint32_t& height) { send_result(client, msg->id, height); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_synced_height::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_synced_height( [=](const vnx::optional& height) { send_result(client, msg->id, height); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_block::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_block(value->hash, [=](std::shared_ptr block) { upload_counter++; send_result(client, msg->id, block); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_block_at::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_block_at(value->height, [=](std::shared_ptr block) { upload_counter++; send_result(client, msg->id, block); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_block_hash::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_block_hash(value->height, [=](const vnx::optional& hash) { send_result(client, msg->id, hash); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_block_hash_ex::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_block_hash_ex(value->height, [=](const vnx::optional>& hash) { send_result(client, msg->id, hash); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_header::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_header(value->hash, [=](std::shared_ptr block) { send_result(client, msg->id, block); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_header_at::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_header_at(value->height, [=](std::shared_ptr block) { send_result(client, msg->id, block); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; case Node_get_tx_ids_at::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(method)) { node->get_tx_ids_at(value->height, [=](const std::vector& ids) { send_result(client, msg->id, ids); }, std::bind(&Router::on_error, this, client, msg->id, std::placeholders::_1)); } break; default: { auto ret = Return::create(); ret->id = msg->id; ret->result = vnx::NoSuchMethod::create(); send_to(client, ret); } } } void Router::on_return(uint64_t client, std::shared_ptr msg) { if(process(msg)) { return; } const auto result = msg->result; if(!result) { return; } switch(result->get_type_hash()) { case Router_get_id_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { const auto& id = value->_ret_0; if(id == get_id()) { if(auto peer = find_peer(client)) { log(INFO) << "Discovered our own address: " << peer->address; self_addrs.insert(peer->address); block_peers.insert(peer->address); } disconnect(client); } } break; case Router_get_info_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { if(auto peer = find_peer(client)) { const auto& info = value->_ret_0; if(info.version >= 103) { auto req = Router_sign_msg::create(); req->msg = peer->challenge; send_request(peer, req); } peer->info = info; } } break; case Router_sign_msg_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { if(auto peer = find_peer(client)) { const auto& key = value->_ret_0.first; const auto& sig = value->_ret_0.second; const auto id = key.get_addr(); if(id == peer->info.id && sig.verify(key, peer->challenge)) { for(const auto& entry : peer_map) { const auto& existing = entry.second; if(existing->node_id && id == *existing->node_id) { log(INFO) << "Replacing connection to " << existing->address << " with new address " << peer->address; disconnect(existing->client); } } peer->node_id = id; } else { log(WARN) << "Node ID verification for peer " << peer->address << " failed!"; disconnect(client); } } } break; case Router_get_peers_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { size_t i = 0; for(const auto& address : value->_ret_0) { if(is_valid_address(address) && vnx::is_valid_ip_addr(address)) { peer_retry_map.emplace(address, 0); } if(++i >= 10) { break; } } } break; case Node_get_height_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { if(auto peer = find_peer(client)) { peer->height = value->_ret_0; } } break; case Node_get_synced_height_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { if(auto peer = find_peer(client)) { if(last_query_ms) { peer->ping_ms = get_time_ms() - last_query_ms; } if(auto height = value->_ret_0) { if(!peer->is_synced) { log(INFO) << "Peer " << peer->address << " is synced at height " << *height; } peer->height = *height; peer->is_synced = true; if(peer->info.type == node_type_e::FULL_NODE) { synced_peers.insert(client); } } else { if(peer->is_synced) { log(INFO) << "Peer " << peer->address << " is not synced"; } peer->is_synced = false; synced_peers.erase(client); // check their height send_request(client, Node_get_height::create()); } } } break; case Node_get_block_hash_return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(result)) { if(msg->id == peer_check.request_id) { const auto hash = value->_ret_0; if(!hash || *hash != peer_check.our_hash) { if(auto peer = find_peer(client)) { if(peer->is_synced) { log(INFO) << "Peer " << peer->address << " is on different chain at height " << peer_check.height; disconnect(client); } } } } } break; } } void Router::on_msg(uint64_t client, std::shared_ptr msg) { if(auto peer = find_peer(client)) { peer->last_receive_ms = get_time_ms(); } switch(msg->get_type_hash()) { case ProofOfTime::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_vdf(client, value); } break; case VDF_Point::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_vdf_point(client, value); } break; case ProofResponse::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_proof(client, value); } break; case Block::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_block(client, value); } break; case ValidatorVote::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_vote(client, value); } break; case Transaction::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_transaction(client, value); } break; case Request::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_request(client, value); } break; case Return::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_return(client, value); } break; case ReceiveNote::VNX_TYPE_ID: if(auto value = std::dynamic_pointer_cast(msg)) { on_recv_note(client, value); } break; } } void Router::on_pause(uint64_t client) { if(auto peer = find_peer(client)) { peer->is_blocked = true; } } void Router::on_resume(uint64_t client) { if(auto peer = find_peer(client)) { if(peer->is_paused) { resume(client); // continue receiving as well again peer->is_paused = false; } peer->is_blocked = false; } } void Router::on_connect(uint64_t client, const std::string& host_name) { const auto address = resolve(host_name); if(block_peers.count(address)) { disconnect(client); return; } auto peer = std::make_shared(); peer->client = client; peer->address = address; peer->host_name = host_name; peer->challenge = hash_t::random(); peer->info.type = node_type_e::FULL_NODE; // assume full node peer->connected_since_ms = get_time_ms(); { const auto it = connect_tasks.find(host_name); if(it != connect_tasks.end() && it->second == client) { // we connected to them peer->is_outbound = true; peer_set.insert(address); connect_tasks.erase(it); } } peer_map[client] = peer; peer_addr_map.emplace(address, peer); send_request(peer, Router_get_id::create()); send_request(peer, Router_get_info::create()); send_request(peer, Node_get_synced_height::create()); if(peer_set.size() < max_peer_set) { send_request(peer, Router_get_peers::create()); } for(const auto& entry : vdf_history) { send_to(peer, entry.second); // make sure peer has all needed VDFs for next block } log(DEBUG) << "Connected to peer " << peer->address; } void Router::on_disconnect(uint64_t client, const std::string& host_name) { if(auto peer = find_peer(client)) { peer->is_valid = false; } // async processing to allow for() loops over peer_map, etc add_task([this, client, host_name]() { if(auto peer = find_peer(client)) { const auto range = peer_addr_map.equal_range(peer->address); for(auto iter = range.first; iter != range.second; ++iter) { if(iter->second == peer) { peer_addr_map.erase(iter); break; } } log(DEBUG) << "Peer " << host_name << " disconnected"; } const auto address = resolve(host_name); { const auto it = connect_tasks.find(host_name); if(it != connect_tasks.end() && it->second == client) { log(DEBUG) << "Failed to connect to " << host_name; peer_set.erase(host_name); peer_set.erase(address); connect_tasks.erase(it); } } peer_map.erase(client); synced_peers.erase(client); peer_retry_map[address] = get_time_sec() + peer_retry_interval * 60; }); } std::shared_ptr Router::get_peer_base(uint64_t client) const { return get_peer(client); } std::shared_ptr Router::get_peer(uint64_t client) const { if(auto peer = find_peer(client)) { return peer; } throw std::logic_error("no such peer"); } std::shared_ptr Router::find_peer(uint64_t client) const { auto iter = peer_map.find(client); if(iter != peer_map.end()) { return iter->second; } return nullptr; } std::vector> Router::find_peers(const std::string& address) const { std::vector> out; const auto range = peer_addr_map.equal_range(address); for(auto iter = range.first; iter != range.second; ++iter) { out.push_back(iter->second); } return out; } bool Router::relay_msg_hash(const hash_t& hash) { const auto ret = hash_info.emplace(hash, hash_info_t()); if(ret.second) { recv_notify(hash); hash_queue.push(hash); } auto& did_relay = ret.first->second.did_relay; if(!did_relay) { did_relay = true; return true; } return false; } bool Router::receive_msg_hash(const hash_t& hash, uint64_t client) { const auto ret = hash_info.emplace(hash, hash_info_t()); if(ret.second) { recv_notify(hash); hash_queue.push(hash); } if(auto peer = find_peer(client)) { if(peer->sent_hashes.insert(hash).second) { peer->hash_queue.push(hash); } } return ret.second; } void Router::http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const { http->http_request(request, sub_path, request_id, vnx_request->session); } void Router::http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const { throw std::logic_error("not implemented"); } } // mmx ================================================ FILE: src/Solution.cpp ================================================ /* * Solution.cpp * * Created on: Jan 15, 2022 * Author: mad */ #include namespace mmx { vnx::bool_t Solution::is_valid() const { return version == 0; } hash_t Solution::calc_hash() const { throw std::logic_error("not implemented"); } uint64_t Solution::calc_cost(std::shared_ptr params) const { throw std::logic_error("not implemented"); } } // mmx ================================================ FILE: src/TimeLord.cpp ================================================ /* * TimeLord.cpp * * Created on: Dec 6, 2021 * Author: mad */ #include #include #include #include #include #include #include #include namespace mmx { TimeLord::TimeLord(const std::string& _vnx_name) : TimeLordBase(_vnx_name) { segment_iters = get_params()->vdf_segment_size; } void TimeLord::init() { subscribe(input_request, 1000); vnx::open_pipe(vnx_name, this, 1000); } void TimeLord::main() { if(!reward_addr) { try { WalletClient wallet(wallet_server); for(const auto& entry : wallet.get_all_accounts()) { if(entry.address) { reward_addr = entry.address; break; } } if(!reward_addr) { throw std::logic_error("no wallet available"); } } catch(const std::exception& ex) { log(WARN) << "Failed to get reward address from wallet: " << ex.what(); } } if(reward_addr) { log(INFO) << "Reward address: " << reward_addr->to_string(); } else { log(WARN) << "Reward is disabled!"; } { vnx::File file(storage_path + "timelord_sk.dat"); if(file.exists()) { try { file.open("rb"); vnx::read_generic(file.in, timelord_sk); file.close(); } catch(const std::exception& ex) { log(WARN) << "Failed to read key from file: " << ex.what(); } } if(timelord_sk == skey_t()) { timelord_sk = skey_t(hash_t::random()); try { file.open("wb"); vnx::write_generic(file.out, timelord_sk); file.close(); } catch(const std::exception& ex) { log(WARN) << "Failed to write key to file: " << ex.what(); } } timelord_key = pubkey_t(timelord_sk); log(INFO) << "Timelord Key: " << timelord_key; } set_timer_millis(10000, std::bind(&TimeLord::print_info, this)); set_timer_millis(2000, [this]() { peak_iters = 0; // force new output }); log(DEBUG) << "vdf_segment_size = " << segment_iters; vdf_thread = std::thread(&TimeLord::vdf_loop, this); Super::main(); vdf_signal.notify_all(); vdf_thread.join(); } void TimeLord::start_vdf(vdf_point_t begin) { if(!do_run) { do_run = true; is_reset = true; peak = std::make_shared(begin); log(INFO) << "Started VDF at " << begin.num_iters; vdf_signal.notify_all(); } } void TimeLord::stop_vdf() { std::lock_guard lock(mutex); do_run = false; peak = nullptr; peak_iters = 0; history.clear(); infuse.clear(); } void TimeLord::handle(std::shared_ptr req) { std::lock_guard lock(mutex); const auto start = req->start; const auto end = req->end; // clear obsolete requests + infusions in-between infuse.erase( infuse.upper_bound(start), infuse.lower_bound(end)); pending.erase(pending.upper_bound(start), pending.lower_bound(end)); { const bool passed = peak && start <= peak->num_iters; bool is_fork = false; auto iter = infuse.find(start); if(iter != infuse.end()) { if(passed && req->infuse != iter->second) { is_fork = true; log(WARN) << "Infusion value at " << start << " changed, restarting ..."; } } else { if(passed) { is_fork = true; log(WARN) << "Missed infusion at " << start << " iterations, restarting ..."; } log(DEBUG) << "Infusing at " << start << " iterations: " << req->infuse; } infuse[start] = req->infuse; if(is_fork) { vdf_point_t begin; begin.output = history[start]; begin.num_iters = start; peak = std::make_shared(begin); is_reset = true; } } if(auto input = req->input) { vdf_point_t begin; begin.output = *input; begin.num_iters = start; if(do_run) { const bool is_fork = peak && find_value(history, start) != input && (!is_reset || start > peak->num_iters); if(is_fork) { if(start >= peak->num_iters) { if(!is_reset) { log(DEBUG) << "Another Timelord was faster, restarting ..."; } } else { log(INFO) << "Our VDF forked from the network, restarting ..."; } } if(!peak || is_fork || begin.num_iters > peak->num_iters) { // another timelord is faster peak = std::make_shared(begin); is_reset = true; } } else { start_vdf(begin); } } if(is_reset) { peak_iters = 0; } if(req->end > peak_iters) { pending[end] = req; } if(peak && peak->num_iters >= end) { add_task(std::bind(&TimeLord::update, this)); } } void TimeLord::update() { std::unique_lock lock(mutex); // clear old requests first if(!history.empty()) { const auto begin = history.begin()->first; pending.erase(pending.begin(), pending.lower_bound(begin)); } std::vector> out; for(auto iter = pending.begin(); iter != pending.end();) { const auto req = iter->second; auto end = history.find(req->end); if(end != history.end()) { auto begin = history.find(req->start); if(begin != history.end()) { auto proof = ProofOfTime::create(); proof->vdf_height = req->vdf_height; proof->start = req->start; proof->num_iters = req->end - req->start; proof->segment_size = segment_iters; proof->input = begin->second; proof->prev = req->infuse; proof->reward_addr = reward_addr ? *reward_addr : addr_t(); proof->timelord_key = timelord_key; proof->segments.reserve(1024); end++; begin++; for(auto iter = begin; iter != end; ++iter) { proof->segments.push_back(iter->second); } out.push_back(proof); peak_iters = req->end; } iter = pending.erase(iter); } else { break; } } while(infuse.size() > 1000) { infuse.erase(infuse.begin()); } while(history.size() > max_history) { history.erase(history.begin()); } lock.unlock(); // -------------------------------------------------------------------------------------------- for(auto proof : out) { proof->hash = proof->calc_hash(); proof->timelord_sig = signature_t::sign(timelord_sk, proof->hash); proof->content_hash = proof->calc_content_hash(); publish(proof, output_proofs); log(DEBUG) << "Created VDF for height " << proof->vdf_height << " with " << proof->segments.size() << " segments"; } } void TimeLord::vdf_loop() { vdf_point_t point; bool is_running = false; while(vnx_do_run()) { { std::unique_lock lock(mutex); while(vnx_do_run() && !do_run) { if(is_running) { is_running = false; log(INFO) << "Stopped VDF"; } vdf_signal.wait(lock); } is_running = true; if(is_reset) { point = *peak; history.clear(); is_reset = false; log(DEBUG) << "Restarted VDF at " << point.num_iters; } else { if(!peak) { peak = std::make_shared(); } *peak = point; } history[point.num_iters] = point.output; if(pending.count(point.num_iters)) { add_task(std::bind(&TimeLord::update, this)); } // apply infusion auto iter = infuse.find(point.num_iters); if(iter != infuse.end()) { point.output = hash_t(point.output + iter->second); point.output = hash_t(point.output + (reward_addr ? *reward_addr : addr_t())); } } const auto time_begin = get_time_us(); point.output = compute(point.output, segment_iters); point.num_iters += segment_iters; // update estimated speed const auto time_end = get_time_us(); if(time_end > time_begin) { const auto speed = (segment_iters * 1000000) / (time_end - time_begin); avg_iters_per_sec = (avg_iters_per_sec * 1023 + speed) / 1024; } } } hash_t TimeLord::compute(const hash_t& input, const uint64_t num_iters) { static bool have_sha_ni = sha256_ni_available(); static bool have_sha_arm = sha256_arm_available(); hash_t hash = input; if(have_sha_ni) { recursive_sha256_ni(hash.data(), num_iters); } else if(have_sha_arm) { recursive_sha256_arm(hash.data(), num_iters); } else { for(uint64_t i = 0; i < num_iters; ++i) { hash = hash_t(hash.bytes); } } return hash; } void TimeLord::print_info() { if(do_run) { log(INFO) << double(avg_iters_per_sec) / 1e6 << " MH/s"; } } } // mmx ================================================ FILE: src/Transaction.cpp ================================================ /* * Transaction.cpp * * Created on: Nov 27, 2021 * Author: mad */ #include #include #include #include #include namespace mmx { hash_t TransactionBase::calc_hash(const vnx::bool_t& full_hash) const { return id; } uint64_t TransactionBase::calc_cost(std::shared_ptr params) const { return 0; } std::shared_ptr TransactionBase::create_ex(const hash_t& id) { auto tx = TransactionBase::create(); tx->id = id; return tx; } void Transaction::reset(std::shared_ptr params) { exec_result = nullptr; static_cost = calc_cost(params); content_hash = calc_hash(true); } void Transaction::update(const exec_result_t& result, std::shared_ptr params) { exec_result = result; static_cost = calc_cost(params); content_hash = calc_hash(true); } void Transaction::finalize() { while(!nonce) { nonce = vnx::rand64(); } id = calc_hash(); } vnx::bool_t Transaction::is_valid(std::shared_ptr params) const { if(!params) { throw std::logic_error("!params"); } for(const auto& in : inputs) { if(in.memo && in.memo->size() > txio_t::MAX_MEMO_SIZE) { return false; } } for(const auto& out : outputs) { if(out.memo && out.memo->size() > txio_t::MAX_MEMO_SIZE) { return false; } } for(const auto& op : execute) { if(!op || !op->is_valid()) { return false; } } for(const auto& sol : solutions) { if(!sol || !sol->is_valid()) { return false; } } return version == 0 && nonce && fee_ratio >= 1024 && network == params->network && solutions.size() <= MAX_SOLUTIONS && (!exec_result || exec_result->is_valid()) && static_cost == calc_cost(params) && id == calc_hash() && content_hash == calc_hash(true); } vnx::bool_t Transaction::did_fail() const { if(!exec_result) { throw std::logic_error("tx not executed yet"); } return exec_result->did_fail; } std::vector Transaction::hash_serialize(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(4 * 1024); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "expires", expires); write_field(out, "fee_ratio", fee_ratio); write_field(out, "max_fee_amount", max_fee_amount); write_field(out, "note", note); write_field(out, "nonce", nonce); write_field(out, "network", network); write_field(out, "sender", sender); write_field(out, "inputs", inputs, full_hash); write_field(out, "outputs", outputs); write_field(out, "execute"); write_bytes(out, uint32_t(execute.size())); for(const auto& op : execute) { write_bytes(out, op ? op->calc_hash(full_hash) : hash_t()); } write_field(out, "deploy", deploy ? deploy->calc_hash(full_hash) : hash_t()); if(full_hash) { write_field(out, "static_cost", static_cost); write_field(out, "solutions"); write_bytes(out, uint32_t(solutions.size())); for(const auto& sol : solutions) { write_bytes(out, sol ? sol->calc_hash() : hash_t()); } write_field(out, "exec_result", exec_result ? exec_result->calc_hash() : hash_t()); } out.flush(); return buffer; } hash_t Transaction::calc_hash(const vnx::bool_t& full_hash) const { return hash_t(hash_serialize(full_hash)); } void Transaction::add_input(const addr_t& currency, const addr_t& address, const uint128& amount) { txin_t in; in.address = address; in.contract = currency; in.amount = amount; inputs.push_back(in); } void Transaction::add_output(const addr_t& currency, const addr_t& address, const uint128& amount, const vnx::optional& memo) { if(memo && memo->size() > txio_t::MAX_MEMO_SIZE) { throw std::logic_error("memo too long"); } txout_t out; out.address = address; out.contract = currency; out.amount = amount; out.memo = memo; outputs.push_back(out); } std::shared_ptr Transaction::get_solution(const uint32_t& index) const { if(index < solutions.size()) { return solutions[index]; } return nullptr; } std::vector Transaction::get_inputs() const { auto res = inputs; if(exec_result) { res.insert(res.end(), exec_result->inputs.begin(), exec_result->inputs.end()); } return res; } std::vector Transaction::get_outputs() const { auto res = outputs; if(exec_result) { res.insert(res.end(), exec_result->outputs.begin(), exec_result->outputs.end()); } return res; } std::vector> Transaction::get_operations() const { return execute; } uint64_t Transaction::calc_cost(std::shared_ptr params) const { if(!params) { throw std::logic_error("!params"); } uint128_t cost = params->min_txfee; cost += execute.size() * params->min_txfee_exec; if(exec_result) { cost += exec_result->calc_cost(params); } for(const auto& in : inputs) { cost += in.calc_cost(params); } for(const auto& out : outputs) { cost += out.calc_cost(params); } for(const auto& op : execute) { if(op) { cost += op->calc_cost(params); } } for(const auto& sol : solutions) { if(sol) { cost += sol->calc_cost(params); } } if(deploy) { cost += params->min_txfee_deploy + deploy->calc_cost(params); } if(cost >> 64) { throw std::logic_error("tx cost amount overflow"); } return cost; } void Transaction::merge_sign(std::shared_ptr tx) { std::unordered_map import_map; for(size_t i = 0; i < inputs.size() && i < tx->inputs.size(); ++i) { auto& our = inputs[i]; const auto& other = tx->inputs[i]; if(other.solution < tx->solutions.size() && our.solution >= solutions.size()) { auto iter = import_map.find(other.solution); if(iter != import_map.end()) { our.solution = iter->second; } else { our.solution = solutions.size(); import_map[other.solution] = our.solution; solutions.push_back(tx->solutions[other.solution]); } } } } vnx::bool_t Transaction::is_signed() const { for(const auto& in : inputs) { if(in.solution >= solutions.size()) { return false; } // TODO: handle multi-sig } return true; } std::map> Transaction::get_balance() const { std::map> balance; for(const auto& in : get_inputs()) { balance[in.contract].first += in.amount; } for(const auto& out : get_outputs()) { balance[out.contract].second += out.amount; } return balance; } tx_index_t Transaction::get_tx_index(std::shared_ptr params, std::shared_ptr block, const int64_t& file_offset) const { tx_index_t index; index.height = block->height; index.time_stamp = block->time_stamp; index.file_offset = file_offset; index.static_cost = static_cost; if(deploy) { index.contract_read_cost = (deploy->num_bytes() * params->min_txfee_read_kbyte) / 1000; } return index; } } // mmx ================================================ FILE: src/VDF_Point.cpp ================================================ /* * VDF_Point.cpp * * Created on: Jul 7, 2024 * Author: mad */ #include #include namespace mmx { vnx::bool_t VDF_Point::is_valid() const { return content_hash == calc_hash(); } hash_t VDF_Point::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); buffer.reserve(4 * 1024); write_bytes(out, get_type_hash()); write_field(out, "vdf_height", vdf_height); write_field(out, "start", start); write_field(out, "num_iters", num_iters); write_field(out, "input", input); write_field(out, "output", output); write_field(out, "prev", prev); write_field(out, "reward_addr", reward_addr); out.flush(); return hash_t(buffer); } } // mmx ================================================ FILE: src/ValidatorVote.cpp ================================================ /* * ValidatorVote.cpp * * Created on: Dec 29, 2024 * Author: mad */ #include namespace mmx { bool ValidatorVote::is_valid() const { return content_hash == calc_content_hash() && farmer_sig.verify(farmer_key, hash_t("MMX/validator/vote/" + hash + farmer_key)); } hash_t ValidatorVote::calc_content_hash() const { return hash_t(hash + farmer_key + farmer_sig); } } // mmx ================================================ FILE: src/Wallet.cpp ================================================ /* * Wallet.cpp * * Created on: Dec 11, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { static std::string get_info_file_name(const account_t& config) { const auto suffix = config.index ? "_" + std::to_string(config.index) : ""; return "info_" + config.finger_print + suffix + ".dat"; } Wallet::Wallet(const std::string& _vnx_name) : WalletBase(_vnx_name) { } void Wallet::init() { vnx::open_pipe(vnx_name, this, 1000); } void Wallet::main() { if(num_addresses > max_addresses) { throw std::logic_error("num_addresses > max_addresses"); } if(vnx::File(storage_path + "wallet.dat").exists()) { if(key_files.empty()) { key_files.push_back("wallet.dat"); } } else if(key_files.size() == 1 && key_files[0] == "wallet.dat") { key_files.clear(); } if(key_files.size() > max_key_files) { throw std::logic_error("too many key files"); } params = get_params(); token_whitelist.insert(addr_t()); vnx::Directory(config_path).create(); vnx::Directory(storage_path).create(); vnx::Directory(database_path).create(); tx_log.open(database_path + "tx_log"); node = std::make_shared(node_server); http = std::make_shared>(this, vnx_name); add_async_client(http); for(size_t i = 0; i < key_files.size(); ++i) { account_t config; config.key_file = key_files[i]; config.num_addresses = num_addresses; try { add_account(i, config, nullptr); } catch(const std::exception& ex) { log(WARN) << ex.what(); } } for(size_t i = 0; i < accounts.size(); ++i) { try { if(!accounts[i].is_hidden) { add_account(max_key_files + i, accounts[i], nullptr); } } catch(const std::exception& ex) { log(WARN) << ex.what(); } } Super::main(); } std::shared_ptr Wallet::get_wallet(const uint32_t& index) const { if(index >= wallets.size()) { throw std::logic_error("invalid wallet index: " + std::to_string(index)); } if(auto wallet = wallets[index]) { return wallet; } throw std::logic_error("no such wallet"); } std::shared_ptr Wallet::send( const uint32_t& index, const uint128& amount, const addr_t& dst_addr, const addr_t& currency, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); if(amount == 0) { throw std::logic_error("amount cannot be zero"); } if(dst_addr == addr_t()) { throw std::logic_error("dst_addr cannot be zero"); } auto tx = Transaction::create(); tx->note = tx_note_e::TRANSFER; tx->add_output(currency, dst_addr, amount, options.memo); wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Sent " << amount << " with cost " << tx->static_cost << " to " << dst_addr << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::send_many( const uint32_t& index, const std::vector>& amounts, const addr_t& currency, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto tx = Transaction::create(); tx->note = tx_note_e::TRANSFER; for(const auto& entry : amounts) { if(entry.first == addr_t()) { throw std::logic_error("address cannot be zero"); } if(entry.second == 0) { throw std::logic_error("amount cannot be zero"); } tx->add_output(currency, entry.first, entry.second, options.memo); } wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Sent many with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::send_from( const uint32_t& index, const uint128& amount, const addr_t& dst_addr, const addr_t& src_addr, const addr_t& currency, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto options_ = options; if(auto contract = node->get_contract(src_addr)) { if(auto owner = contract->get_owner()) { options_.owner_map.emplace(src_addr, *owner); } else { // TODO: handle MultiSig throw std::logic_error("contract has no owner"); } } if(amount == 0) { throw std::logic_error("amount cannot be zero"); } if(dst_addr == addr_t()) { throw std::logic_error("dst_addr cannot be zero"); } auto tx = Transaction::create(); tx->note = tx_note_e::WITHDRAW; tx->add_input(currency, src_addr, amount); tx->add_output(currency, dst_addr, amount, options.memo); wallet->complete(tx, options_); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Sent " << amount << " with cost " << tx->static_cost << " to " << dst_addr << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::deploy(const uint32_t& index, std::shared_ptr contract, const spend_options_t& options) const { if(!contract) { throw std::logic_error("contract cannot be null"); } const auto wallet = get_wallet(index); update_cache(index); if(!contract || !contract->is_valid()) { throw std::logic_error("invalid contract"); } auto tx = Transaction::create(); tx->note = tx_note_e::DEPLOY; tx->deploy = contract; wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Deployed " << contract->get_type_name() << " with cost " << tx->static_cost << " as " << addr_t(tx->id) << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::execute( const uint32_t& index, const addr_t& address, const std::string& method, const std::vector& args, const vnx::optional& user, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto op = operation::Execute::create(); op->address = address; op->method = method; op->args = args; op->user = user ? wallet->get_address(*user) : options.user; auto tx = Transaction::create(); tx->note = tx_note_e::EXECUTE; tx->execute.push_back(op); wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Executed " << method << "() on [" << address << "] with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::deposit( const uint32_t& index, const addr_t& address, const std::string& method, const std::vector& args, const uint128& amount, const addr_t& currency, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto op = operation::Deposit::create(); op->address = address; op->method = method; op->args = args; op->amount = amount; op->currency = currency; op->user = options.user; auto tx = Transaction::create(); tx->note = tx_note_e::DEPOSIT; tx->execute.push_back(op); wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Executed " << method << "() on [" << address << "] with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::make_offer( const uint32_t& index, const uint32_t& owner, const uint128& bid_amount, const addr_t& bid_currency, const uint128& ask_amount, const addr_t& ask_currency, const spend_options_t& options) const { if(bid_amount == 0 || ask_amount == 0) { throw std::logic_error("amount cannot be zero"); } const auto inv_price = (uint256_t(bid_amount) << 64) / ask_amount; if(inv_price >> 128) { throw std::logic_error("price out of range"); } const auto wallet = get_wallet(index); update_cache(index); const auto owner_addr = wallet->get_address(owner); auto offer = contract::Executable::create(); offer->binary = params->offer_binary; offer->init_method = "init"; offer->init_args.emplace_back(owner_addr.to_string()); offer->init_args.emplace_back(bid_currency.to_string()); offer->init_args.emplace_back(ask_currency.to_string()); offer->init_args.emplace_back(uint128(inv_price).to_hex_string()); offer->init_args.emplace_back(); auto tx = Transaction::create(); tx->note = tx_note_e::OFFER; tx->deploy = offer; std::vector> deposit; deposit.emplace_back(bid_currency, bid_amount); wallet->complete(tx, options, deposit); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Offering " << bid_amount << " [" << bid_currency << "] for " << ask_amount << " [" << ask_currency << "] with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::offer_trade( const uint32_t& index, const addr_t& address, const uint128& amount, const uint32_t& dst_addr, const uint128& price, const spend_options_t& options) const { const auto wallet = get_wallet(index); const auto offer = node->get_offer(address); std::vector args; args.emplace_back(wallet->get_address(dst_addr).to_string()); args.emplace_back(price.to_hex_string()); auto options_ = options; options_.note = tx_note_e::TRADE; return deposit(index, address, "trade", args, amount, offer.ask_currency, options_); } std::shared_ptr Wallet::accept_offer( const uint32_t& index, const addr_t& address, const uint32_t& dst_addr, const uint128& price, const spend_options_t& options) const { const auto wallet = get_wallet(index); const auto offer = node->get_offer(address); std::vector args; args.emplace_back(wallet->get_address(dst_addr).to_string()); args.emplace_back(price.to_hex_string()); auto options_ = options; options_.note = tx_note_e::TRADE; return deposit(index, address, "accept", args, offer.ask_amount, offer.ask_currency, options_); } std::shared_ptr Wallet::cancel_offer( const uint32_t& index, const addr_t& address, const spend_options_t& options) const { const auto offer = node->get_offer(address); auto options_ = options; options_.user = offer.owner; return execute(index, address, "cancel", {}, nullptr, options_); } std::shared_ptr Wallet::offer_withdraw( const uint32_t& index, const addr_t& address, const spend_options_t& options) const { const auto offer = node->get_offer(address); auto options_ = options; options_.user = offer.owner; return execute(index, address, "withdraw", {}, nullptr, options_); } std::shared_ptr Wallet::swap_trade( const uint32_t& index, const addr_t& address, const uint128& amount, const addr_t& currency, const vnx::optional& min_trade, const int32_t& num_iter, const spend_options_t& options) const { const auto wallet = get_wallet(index); const auto info = node->get_swap_info(address); int token = -1; for(int i = 0; i < 2; ++i) { if(currency == info.tokens[i]) { token = i; } } if(token < 0) { throw std::logic_error("invalid currency for swap"); } std::vector args; args.emplace_back(token); args.emplace_back(wallet->get_address(0).to_string()); args.emplace_back(min_trade ? min_trade->to_var_arg() : vnx::Variant()); args.emplace_back(num_iter); auto options_ = options; options_.note = tx_note_e::TRADE; return deposit(index, address, "trade", args, amount, currency, options_); } std::shared_ptr Wallet::swap_add_liquid( const uint32_t& index, const addr_t& address, const std::array& amount, const uint32_t& pool_idx, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto tx = Transaction::create(); tx->note = tx_note_e::DEPOSIT; const auto info = node->get_swap_info(address); for(size_t i = 0; i < 2; ++i) { if(amount[i]) { auto op = operation::Deposit::create(); op->address = address; op->method = "add_liquid"; op->args = {vnx::Variant(i), vnx::Variant(pool_idx)}; op->amount = amount[i]; op->currency = info.tokens[i]; op->user = wallet->get_address(0); tx->execute.push_back(op); } } wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Added liquidity to [" << address << "] with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::swap_rem_liquid( const uint32_t& index, const addr_t& address, const std::array& amount, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto tx = Transaction::create(); tx->note = tx_note_e::WITHDRAW; { auto op = operation::Execute::create(); op->address = address; op->method = "payout"; op->user = wallet->get_address(0); tx->execute.push_back(op); } for(size_t i = 0; i < 2; ++i) { if(amount[i]) { auto op = operation::Execute::create(); op->address = address; op->method = "rem_liquid"; op->args = {vnx::Variant(i), amount[i].to_var_arg(), vnx::Variant(false)}; op->user = wallet->get_address(0); tx->execute.push_back(op); } } wallet->complete(tx, options); if(tx->is_signed()) { if(options.auto_send) { send_off(index, tx); log(INFO) << "Removed liquidity from [" << address << "] with cost " << tx->static_cost << " (" << tx->id << ")"; } else { tx->exec_result = node->validate(tx); } } if(options.mark_spent) { wallet->update_from(tx); } return tx; } std::shared_ptr Wallet::plotnft_exec( const addr_t& address, const std::string& method, const std::vector& args, const spend_options_t& options_) const { const auto owner = get_plotnft_owner(address); const auto index = find_wallet_by_addr(owner); auto options = options_; options.user = owner; return execute(index, address, method, args, nullptr, options); } std::shared_ptr Wallet::plotnft_create( const uint32_t& index, const std::string& name, const vnx::optional& owner, const spend_options_t& options) const { const auto wallet = get_wallet(index); auto nft = contract::Executable::create(); nft->name = name; nft->binary = params->plot_nft_binary; nft->init_args.emplace_back(wallet->get_address(owner ? *owner : 0).to_string()); return deploy(index, nft, options); } std::shared_ptr Wallet::complete( const uint32_t& index, std::shared_ptr tx, const spend_options_t& options) const { if(!tx) { return nullptr; } const auto wallet = get_wallet(index); update_cache(index); auto copy = vnx::clone(tx); wallet->complete(copy, options); return copy; } std::shared_ptr Wallet::sign_off( const uint32_t& index, std::shared_ptr tx, const spend_options_t& options) const { if(!tx) { return nullptr; } const auto wallet = get_wallet(index); update_cache(index); auto copy = vnx::clone(tx); wallet->sign_off(copy, options); return copy; } std::shared_ptr Wallet::sign_msg(const uint32_t& index, const addr_t& address, const hash_t& msg) const { const auto wallet = get_wallet(index); return wallet->sign_msg(address, msg); } void Wallet::send_off(const uint32_t& index, std::shared_ptr tx) const { if(!tx) { return; } { auto iter = lock_timers.find(index); if(iter != lock_timers.end()) { if(auto timer = iter->second.lock()) { timer->reset(); // reset auto-lock timer } } } const auto wallet = get_wallet(index); node->add_transaction(tx, true); wallet->update_from(tx); { tx_log_entry_t entry; entry.time = get_time_ms(); entry.tx = tx; tx_log.insert(wallet->get_address(0), entry); tx_log.commit(); } } void Wallet::mark_spent(const uint32_t& index, const std::map, uint128>& amounts) { const auto wallet = get_wallet(index); // TODO } void Wallet::reserve(const uint32_t& index, const std::map, uint128>& amounts) { const auto wallet = get_wallet(index); // TODO } void Wallet::release(const uint32_t& index, const std::map, uint128>& amounts) { const auto wallet = get_wallet(index); // TODO } void Wallet::release_all() { for(auto wallet : wallets) { if(wallet) { wallet->reserved_map.clear(); } } } void Wallet::reset_cache(const uint32_t& index) { const auto wallet = get_wallet(index); wallet->reset_cache(); update_cache(index); } void Wallet::update_cache(const uint32_t& index) const { const auto wallet = get_wallet(index); const auto now = get_time_ms(); if(now - wallet->last_update > cache_timeout_ms) { const auto height = node->get_height(); const auto addresses = wallet->get_all_addresses(); const auto balances = node->get_all_balances(addresses, token_whitelist); const auto contracts = node->get_contracts_owned_by(addresses); const auto liquidity = node->get_swap_liquidity_by(addresses); const auto history = wallet->pending_tx.empty() ? std::vector() : node->get_tx_ids_since(wallet->height - std::min(params->commit_delay, wallet->height)); wallet->external_balance_map.clear(); for(const auto& entry : node->get_total_balances(contracts, token_whitelist)) { wallet->external_balance_map[entry.first] += entry.second; } for(const auto& entry: liquidity) { for(const auto& entry2 : entry.second) { wallet->external_balance_map[entry2.first] += entry2.second; } } wallet->update_cache(balances, history, height); wallet->last_update = now; } } std::vector Wallet::gather_inputs_for( const uint32_t& index, const uint128& amount, const addr_t& currency, const spend_options_t& options) const { const auto wallet = get_wallet(index); update_cache(index); auto tx = Transaction::create(); std::map, uint128_t> spent_map; wallet->gather_inputs(tx, spent_map, amount, currency, options); return tx->inputs; } std::vector Wallet::get_history(const uint32_t& index, const query_filter_t& filter_) const { const auto wallet = get_wallet(index); auto filter = filter_; if(filter.white_list) { filter.currency = token_whitelist; } std::vector result; for(auto& entry : node->get_history(wallet->get_all_addresses(), filter)) { entry.is_validated = filter.white_list || token_whitelist.count(entry.contract); result.push_back(entry); } return result; } std::vector Wallet::get_tx_log(const uint32_t& index, const int32_t& limit) const { const auto wallet = get_wallet(index); std::vector res; tx_log.find_last(wallet->get_address(0), res, limit); return res; } balance_t Wallet::get_balance(const uint32_t& index, const addr_t& currency) const { const auto balances = get_balances(index); auto iter = balances.find(currency); if(iter != balances.end()) { return iter->second; } return balance_t(); } std::map Wallet::get_balances( const uint32_t& index, const vnx::bool_t& with_zero) const { const auto wallet = get_wallet(index); update_cache(index); std::map amounts; if(with_zero) { for(const auto& currency : token_whitelist) { amounts[currency] = balance_t(); } } for(const auto& entry : wallet->balance_map) { amounts[entry.first.second].spendable += entry.second; } for(const auto& entry : wallet->reserved_map) { amounts[entry.first.second].reserved += entry.second; } for(const auto& entry : wallet->pending_map) { for(const auto& entry2 : entry.second) { amounts[entry2.first.second].reserved += entry2.second; } } for(const auto& entry : wallet->external_balance_map) { amounts[entry.first].locked += entry.second; } for(auto& entry : amounts) { entry.second.total = entry.second.spendable + entry.second.reserved + entry.second.locked; entry.second.is_validated = token_whitelist.count(entry.first); } return amounts; } std::map Wallet::get_total_balances(const std::vector& addresses) const { std::map amounts; for(const auto& entry : node->get_total_balances(addresses, token_whitelist)) { auto& balance = amounts[entry.first]; balance.total = entry.second; balance.spendable = balance.total; balance.is_validated = true; } return amounts; } std::map Wallet::get_contract_balances(const addr_t& address) const { return node->get_contract_balances(address, token_whitelist); } std::map> Wallet::get_contracts( const uint32_t& index, const vnx::optional& type_name, const vnx::optional& type_hash) const { const auto wallet = get_wallet(index); const auto addresses = node->get_contracts_by(wallet->get_all_addresses(), type_hash); const auto contracts = node->get_contracts(addresses); std::map> result; for(size_t i = 0; i < addresses.size() && i < contracts.size(); ++i) { if(auto contract = contracts[i]) { if(!type_name || contract->get_type_name() == *type_name) { result[addresses[i]] = contract; } } } return result; } std::map> Wallet::get_contracts_owned( const uint32_t& index, const vnx::optional& type_name, const vnx::optional& type_hash) const { const auto wallet = get_wallet(index); const auto addresses = node->get_contracts_owned_by(wallet->get_all_addresses(), type_hash); const auto contracts = node->get_contracts(addresses); std::map> result; for(size_t i = 0; i < addresses.size() && i < contracts.size(); ++i) { if(auto contract = contracts[i]) { if(!type_name || contract->get_type_name() == *type_name) { result[addresses[i]] = contract; } } } return result; } std::vector Wallet::get_offers(const uint32_t& index, const vnx::bool_t& state) const { const auto wallet = get_wallet(index); return node->get_offers_by(wallet->get_all_addresses(), state); } std::map, 2>> Wallet::get_swap_liquidity(const uint32_t& index) const { const auto wallet = get_wallet(index); return node->get_swap_liquidity_by(wallet->get_all_addresses()); } addr_t Wallet::get_address(const uint32_t& index, const uint32_t& offset) const { const auto wallet = get_wallet(index); return wallet->get_address(offset); } std::vector Wallet::get_all_addresses(const int32_t& index) const { if(index >= 0) { return get_wallet(index)->get_all_addresses(); } std::vector list; for(const auto& wallet : wallets) { if(wallet) { const auto set = wallet->get_all_addresses(); list.insert(list.end(), set.begin(), set.end()); } } return list; } int32_t Wallet::find_wallet_by_addr(const addr_t& address) const { for(size_t i = 0; i < wallets.size(); ++i) { if(auto wallet = wallets[i]) { if(wallet->find_address(address) >= 0) { return i; } } } throw std::logic_error("wallet for address not found: " + address.to_string()); } std::pair Wallet::get_farmer_keys(const uint32_t& index) const { if(auto wallet = wallets.at(index)) { return wallet->get_farmer_key(); } throw std::logic_error("invalid wallet"); } std::vector> Wallet::get_all_farmer_keys() const { std::vector> res; for(auto wallet : wallets) { if(wallet) { res.push_back(wallet->get_farmer_key()); } } return res; } account_info_t Wallet::get_account(const uint32_t& index) const { const auto wallet = get_wallet(index); return account_info_t::make(index, wallet->find_address(0), wallet->config); } std::vector Wallet::get_all_accounts() const { std::vector res; for(size_t i = 0; i < wallets.size(); ++i) { if(auto wallet = wallets[i]) { res.push_back(account_info_t::make(i, wallet->find_address(0), wallet->config)); } } return res; } bool Wallet::is_locked(const uint32_t& index) const { return get_wallet(index)->is_locked(); } void Wallet::lock(const uint32_t& index) { get_wallet(index)->lock(); } void Wallet::unlock(const uint32_t& index, const std::string& passphrase) { const auto wallet = get_wallet(index); wallet->unlock(passphrase); if(wallet->config.with_passphrase) { if(lock_timeout_sec > 0) { auto& timer = lock_timers[index]; if(auto t = timer.lock()) { t->stop(); } timer = set_timeout_millis(int64_t(lock_timeout_sec) * 1000, [this, index, wallet]() { wallet->lock(); lock_timers.erase(index); }); } try { auto info = WalletFile::create(); info->addresses = wallet->get_all_addresses(); vnx::write_to_file(database_path + get_info_file_name(wallet->config), info); } catch(const std::exception& ex) { log(ERROR) << "Failed to store wallet info: " << ex.what(); } } } void Wallet::add_account(const uint32_t& index, const account_t& config, const vnx::optional& passphrase) { if(index >= wallets.size()) { wallets.resize(index + 1); } else if(wallets[index]) { throw std::logic_error("account already exists: " + std::to_string(index)); } const auto key_path = storage_path + config.key_file; if(auto key_file = vnx::read_from_file(key_path)) { std::shared_ptr wallet; if(config.with_passphrase && !passphrase) { const auto info_path = database_path + get_info_file_name(config); const auto info = vnx::read_from_file(info_path); if(!info) { log(WARN) << "Missing info file: " << info_path; } wallet = std::make_shared( key_file->seed_value, (info ? info->addresses : std::vector()), config, params); wallets[index] = wallet; } else { auto config_ = config; if(config_.finger_print.empty()) { config_.finger_print = get_finger_print(key_file->seed_value, passphrase); } wallet = std::make_shared(key_file->seed_value, config_, params); wallets[index] = wallet; if(passphrase) { unlock(index, *passphrase); wallet->lock(); } else { unlock(index, ""); } } wallet->default_expire = default_expire; } else { throw std::runtime_error("failed to read key file: " + key_path); } std::filesystem::permissions(key_path, std::filesystem::perms::owner_read | std::filesystem::perms::owner_write); } void Wallet::create_account(const account_t& config, const vnx::optional& passphrase) { if(config.num_addresses < 1) { throw std::logic_error("num_addresses < 1"); } if(config.num_addresses > max_addresses) { throw std::logic_error("num_addresses > max_addresses"); } const auto index = std::max(max_key_files, wallets.size()); add_account(index, config, passphrase); accounts.push_back(config); const std::string path = config_path + vnx_name + ".json"; { auto object = vnx::read_config_file(path); object["accounts+"] = accounts; vnx::write_config_file(path, object); } } void Wallet::create_wallet(const account_t& config, const vnx::optional& words, const vnx::optional& passphrase) { auto key_file = KeyFile::create(); if(words) { key_file->seed_value = mnemonic::words_to_seed(mnemonic::string_to_words(*words)); } else { key_file->seed_value = hash_t::secure_random(); } if(passphrase) { key_file->finger_print = get_finger_print(key_file->seed_value, passphrase); } import_wallet(config, key_file, passphrase); } void Wallet::import_wallet(const account_t& config_, std::shared_ptr key_file, const vnx::optional& passphrase) { if(!key_file) { throw std::logic_error("!key_file"); } const auto finger_print = get_finger_print(key_file->seed_value, passphrase); if(key_file->finger_print) { if(finger_print != *key_file->finger_print) { throw std::logic_error(passphrase ? "wrong passphrase" : "passphrase needed"); } } auto config = config_; if(!config.num_addresses) { config.num_addresses = num_addresses; } config.with_passphrase = passphrase; config.finger_print = finger_print; if(config.key_file.empty()) { config.key_file = "wallet_" + config.finger_print + ".dat"; } const auto key_path = storage_path + config.key_file; const auto existing = vnx::read_from_file(key_path); if(existing) { if(existing->seed_value != key_file->seed_value) { throw std::logic_error("key file already exists"); } } vnx::write_to_file(key_path, key_file); try { create_account(config, passphrase); } catch(...) { if(!existing) { vnx::File(key_path).remove(); } throw; } std::filesystem::permissions(key_path, std::filesystem::perms::owner_read | std::filesystem::perms::owner_write); } std::shared_ptr Wallet::export_wallet(const uint32_t& index) const { const auto wallet = get_wallet(index); if(auto key_file = vnx::read_from_file(storage_path + wallet->config.key_file)) { return key_file; } throw std::logic_error("failed to read key file"); } void Wallet::remove_account(const uint32_t& index, const uint32_t& account) { if(index < max_key_files) { throw std::logic_error("cannot remove wallet"); } const auto wallet = get_wallet(index); const std::string path = config_path + vnx_name + ".json"; { auto config = vnx::read_config_file(path); const auto offset = index - max_key_files; if(offset < accounts.size()) { accounts[offset].is_hidden = true; } else { throw std::logic_error("cannot remove wallet"); } config["accounts+"] = accounts; vnx::write_config_file(path, config); } wallets[index] = nullptr; } void Wallet::set_address_count(const uint32_t& index, const uint32_t& count) { if(count < 1 || count > max_addresses) { throw std::logic_error("invalid address count"); } const std::string path = config_path + vnx_name + ".json"; { auto config = vnx::read_config_file(path); if(index >= max_key_files) { const auto offset = index - max_key_files; if(offset < accounts.size()) { accounts[offset].num_addresses = count; } else { throw std::logic_error("cannot find wallet"); } config["accounts+"] = accounts; wallets[index] = nullptr; add_account(index, accounts[offset], nullptr); } else { num_addresses = count; config["num_addresses"] = count; wallets.clear(); add_task(std::bind(&Wallet::vnx_restart, this)); } vnx::write_config_file(path, config); } } std::set Wallet::get_token_list() const { const std::vector addresses(token_whitelist.begin(), token_whitelist.end()); const auto list = node->get_contracts(addresses); std::set out {addr_t()}; for(size_t i = 0; i < list.size(); ++i) { if(std::dynamic_pointer_cast(list[i])) { out.insert(addresses[i]); } } return out; } void Wallet::add_token(const addr_t& address) { const std::string path = config_path + vnx_name + ".json"; auto object = vnx::read_config_file(path); { auto& whitelist = object["token_whitelist+"]; std::set tmp; for(const auto& token : whitelist.to>()) { tmp.insert(token.to_string()); } tmp.insert(address.to_string()); whitelist = tmp; } vnx::write_config_file(path, object); token_whitelist.insert(address); } void Wallet::rem_token(const addr_t& address) { const std::string path = config_path + vnx_name + ".json"; auto object = vnx::read_config_file(path); { auto& whitelist = object["token_whitelist+"]; std::set tmp; for(const auto& token : whitelist.to>()) { tmp.insert(token.to_string()); } if(!tmp.erase(address.to_string())) { throw std::logic_error("cannot remove token: " + address.to_string()); } whitelist = tmp; } vnx::write_config_file(path, object); if(address != addr_t()) { token_whitelist.erase(address); } } hash_t Wallet::get_master_seed(const uint32_t& index) const { return export_wallet(index)->seed_value; } std::vector Wallet::get_mnemonic_seed(const uint32_t& index) const { return mnemonic::seed_to_words(export_wallet(index)->seed_value); } std::vector Wallet::get_mnemonic_wordlist(const std::string& lang) const { if(lang == "en") { return mnemonic::wordlist_en; } throw std::logic_error("unknown language"); } addr_t Wallet::get_plotnft_owner(const addr_t& address) const { if(auto info = node->get_plot_nft_info(address)) { return info->owner; } throw std::logic_error("not a plot NFT: " + address.to_string()); } void Wallet::http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const { http->http_request(request, sub_path, request_id, vnx_request->session); } void Wallet::http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const { throw std::logic_error("not implemented"); } } // mmx ================================================ FILE: src/WebAPI.cpp ================================================ /* * WebAPI.cpp * * Created on: Jan 25, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace mmx { struct currency_t { bool is_nft = false; int decimals = 0; std::string name; std::string symbol; }; class RenderContext { public: RenderContext(std::shared_ptr params) : params(params) { auto& currency = currency_map[addr_t()]; currency.decimals = params->decimals; currency.symbol = "MMX"; } bool have_contract(const addr_t& address) const { return currency_map.count(address); } const currency_t* find_currency(const addr_t& address) const { auto iter = currency_map.find(address); if(iter != currency_map.end()) { return &iter->second; } return nullptr; } const currency_t* get_currency(const addr_t& address) const { if(auto out = find_currency(address)) { return out; } throw std::logic_error("invalid currency"); } void add_contract(const addr_t& address, std::shared_ptr contract) { if(auto token = std::dynamic_pointer_cast(contract)) { auto& currency = currency_map[address]; currency.decimals = token->decimals; currency.symbol = token->symbol; currency.name = token->name; } if(auto exe = std::dynamic_pointer_cast(contract)) { if(exe->binary == params->nft_binary) { auto& currency = currency_map[address]; currency.is_nft = true; currency.symbol = "NFT"; } } } bool hide_proof = false; uint32_t curr_height = 0; std::shared_ptr params; std::unordered_map currency_map; }; std::mutex WebAPI::g_config_mutex; WebAPI::WebAPI(const std::string& _vnx_name) : WebAPIBase(_vnx_name) { params = mmx::get_params(); } void WebAPI::init() { vnx::open_pipe(vnx_name, this, 3000); vnx::open_pipe(vnx_get_id(), this, 3000); subscribe(vnx::log_out, 10000); } void WebAPI::main() { subscribe(input_blocks, 10000); subscribe(input_proofs, 10000); node = std::make_shared(node_server); wallet = std::make_shared(wallet_server); farmer = std::make_shared(farmer_server); add_async_client(node); add_async_client(wallet); add_async_client(farmer); set_timer_millis(1000, std::bind(&WebAPI::update, this)); update(); Super::main(); } void WebAPI::update() { node->get_height( [this](const uint32_t& height) { curr_height = height; }); node->get_synced_height( [this](const vnx::optional& height) { if(!is_synced && height) { synced_since = *height; } is_synced = height; }); } void WebAPI::handle(std::shared_ptr block) { } void WebAPI::handle(std::shared_ptr value) { proof_history.emplace_back(value, proof_counter++); while(proof_history.size() > max_log_history) { proof_history.pop_front(); } } void WebAPI::handle(std::shared_ptr value) { log_history.emplace_back(value, log_counter++); while(log_history.size() > max_log_history) { log_history.pop_front(); } } static vnx::Object to_amount_object(const uint128& amount, const int decimals) { vnx::Object res; res["value"] = to_value(amount, decimals); res["amount"] = amount.to_string(); return res; } static vnx::Object to_amount_object_str(const uint128& amount, const int decimals) { vnx::Object res; res["value"] = fixed128(amount, decimals).to_string(); res["amount"] = amount.to_string(); return res; } static uint64_t parse_uint64(const vnx::Variant& value) { uint64_t tmp = 0; vnx::from_string(value.to_string_value(), tmp); return tmp; } static std::shared_ptr parse_tx(const vnx::Object& obj) { auto tx = Transaction::create(); tx->from_object(obj); tx->nonce = parse_uint64(obj["nonce"]); return tx; } template vnx::Object render(const T& value, std::shared_ptr context = nullptr); template vnx::Variant render(std::shared_ptr value, std::shared_ptr context = nullptr); class Render { public: vnx::Object object; vnx::Variant result; Render() = default; Render(std::shared_ptr context) : context(context) {} template void type_begin(int num_fields) { if(auto type_code = T::static_get_type_code()) { object["__type"] = type_code->name; } } template void type_end(int num_fields) { result = vnx::Variant(object); } void type_field(const std::string& name, const size_t index) { p_value = &object[name]; } template void set(const T& value) { *p_value = value; } template void accept(const T& value) { if constexpr(vnx::is_object()) { set(render(value, context)); } else { set(value); } } template void accept(const bytes_t& value) { set(value.to_string()); } void accept(const uint64_t& value) { if(value >> 53) { set(std::to_string(value)); } else { set(value); } } void accept(const uint128& value) { set(value.to_string()); } void accept(const fixed128& value) { set(value.to_string()); } void accept(const hash_t& value) { set(value.to_string()); } void accept(const addr_t& value) { set(value.to_string()); } void accept(const pubkey_t& value) { set(value.to_string()); } void accept(const signature_t& value) { set(value.to_string()); } template void accept(const vnx::optional& value) { if(value) { accept(*value); } else { set(nullptr); } } template void accept(const std::pair& value) { const auto prev = p_value; std::array tmp; p_value = &tmp[0]; accept(value.first); p_value = &tmp[1]; accept(value.second); p_value = prev; set(tmp); } template void accept(const std::array& value) { accept_range(value.begin(), value.end()); } template void accept(const std::vector& value) { accept_range(value.begin(), value.end()); } template void accept(const std::set& value) { accept_range(value.begin(), value.end()); } template void accept(const std::map& value) { accept_range(value.begin(), value.end()); } template void accept_range(const T& begin, const T& end) { const auto prev = p_value; std::list tmp; for(T iter = begin; iter != end; ++iter) { tmp.emplace_back(); p_value = &tmp.back(); accept(*iter); } p_value = prev; set(tmp); } void accept(const std::vector& value) { set(vnx::to_hex_string(value.data(), value.size())); } template void accept(std::shared_ptr value) { set(render(value, context)); } vnx::Object augment(vnx::Object out, const addr_t& contract, const uint128_t& amount) { if(context) { if(auto info = context->find_currency(contract)) { if(info->is_nft) { out["is_nft"] = true; } else { out["symbol"] = info->symbol; out["value"] = to_value(amount, info->decimals); out["decimals"] = info->decimals; } } out["is_native"] = contract == addr_t(); } return out; } void accept(const txio_t& value) { set(augment(render(value), value.contract, value.amount)); } void accept(const txin_t& value) { set(augment(render(value), value.contract, value.amount)); } void accept(const txout_t& value) { set(augment(render(value), value.contract, value.amount)); } vnx::Object to_output(const addr_t& contract, const uint128_t amount) { vnx::Object tmp; tmp["amount"] = amount.str(10); tmp["contract"] = contract.to_string(); if(contract == addr_t()) { tmp["is_native"] = true; } return augment(tmp, contract, amount); } void accept(const tx_info_t& value) { auto tmp = render(value, context); if(context) { tmp["fee"] = to_amount_object(value.fee, context->params->decimals); tmp["cost"] = to_amount_object(value.cost, context->params->decimals); if(value.time_stamp) { tmp["time"] = (*value.time_stamp) / 1e3; } if(auto height = value.height) { tmp["confirm"] = context->curr_height >= *height ? 1 + context->curr_height - *height : 0; } } { std::vector rows; for(const auto& entry : value.input_amounts) { rows.push_back(to_output(entry.first, entry.second)); } tmp["input_amounts"] = rows; } { std::vector rows; for(const auto& entry : value.output_amounts) { rows.push_back(to_output(entry.first, entry.second)); } tmp["output_amounts"] = rows; } if(value.deployed) { tmp["address"] = addr_t(value.id).to_string(); } tmp.erase("contracts"); set(tmp); } void accept(const tx_type_e& value) { set(value.to_string_value()); } void accept(const tx_entry_t& value) { auto tmp = augment(render(value, context), value.contract, value.amount); tmp["time"] = value.time_stamp / 1e3; set(tmp); } void accept(const exec_result_t& value) { auto tmp = render(value, context); if(context) { tmp["total_fee_value"] = to_value(value.total_fee, context->params->decimals); } set(tmp); } void accept(const offer_data_t& value) { auto tmp = render(value, context); if(context) { const auto bid_currency = context->find_currency(value.bid_currency); const auto ask_currency = context->find_currency(value.ask_currency); if(bid_currency) { tmp["bid_balance_value"] = to_value(value.bid_balance, bid_currency->decimals); tmp["bid_symbol"] = bid_currency->symbol; tmp["bid_decimals"] = bid_currency->decimals; } if(ask_currency) { tmp["ask_balance_value"] = to_value(value.ask_balance, ask_currency->decimals); tmp["ask_symbol"] = ask_currency->symbol; tmp["ask_decimals"] = ask_currency->decimals; tmp["ask_value"] = to_value(value.ask_amount, ask_currency->decimals); } if(bid_currency && ask_currency) { tmp["display_price"] = value.price * pow(10, bid_currency->decimals - ask_currency->decimals); } tmp["time"] = value.time_stamp / 1e3; } set(tmp); } void accept(const trade_entry_t& value) { auto tmp = render(value, context); if(context) { const auto bid_currency = context->find_currency(value.bid_currency); const auto ask_currency = context->find_currency(value.ask_currency); if(bid_currency) { tmp["bid_value"] = to_value(value.bid_amount, bid_currency->decimals); tmp["bid_symbol"] = bid_currency->symbol; } if(ask_currency) { tmp["ask_value"] = to_value(value.ask_amount, ask_currency->decimals); tmp["ask_symbol"] = ask_currency->symbol; } if(bid_currency && ask_currency) { tmp["display_price"] = value.price * pow(10, bid_currency->decimals - ask_currency->decimals); } tmp["time"] = value.time_stamp / 1e3; } set(tmp); } void accept(const swap_info_t& value) { auto tmp = render(value, context); const std::vector empty = {to_amount_object(0, 0), to_amount_object(0, 0)}; std::vector decimals(2); std::vector symbols(2); std::vector wallet(empty); std::vector balance(empty); std::vector fees_paid(empty); std::vector fees_claimed(empty); std::vector user_total(empty); std::vector volume_1d(empty); std::vector volume_7d(empty); std::vector pools; if(context) { for(int i = 0; i < 2; ++i) { if(auto token = context->find_currency(value.tokens[i])) { symbols[i] = token->symbol; decimals[i] = token->decimals; wallet[i] = to_amount_object(value.wallet[i], token->decimals); balance[i] = to_amount_object(value.balance[i], token->decimals); fees_paid[i] = to_amount_object(value.fees_paid[i], token->decimals); fees_claimed[i] = to_amount_object(value.fees_claimed[i], token->decimals); user_total[i] = to_amount_object(value.user_total[i], token->decimals); volume_1d[i] = to_amount_object(value.volume_1d[i], token->decimals); volume_7d[i] = to_amount_object(value.volume_7d[i], token->decimals); } } for(const auto& info : value.pools) { vnx::Object tmp; std::vector balance(empty); std::vector fees_paid(empty); std::vector fees_claimed(empty); std::vector user_total(empty); for(int i = 0; i < 2; ++i) { if(auto token = context->find_currency(value.tokens[i])) { balance[i] = to_amount_object(info.balance[i], token->decimals); fees_paid[i] = to_amount_object(info.fees_paid[i], token->decimals); fees_claimed[i] = to_amount_object(info.fees_claimed[i], token->decimals); user_total[i] = to_amount_object(info.user_total[i], token->decimals); } } tmp["price"] = to_value(info.balance[1], decimals[1]) / to_value(info.balance[0], decimals[0]); tmp["balance"] = balance; tmp["fees_paid"] = fees_paid; tmp["fees_claimed"] = fees_claimed; tmp["user_total"] = user_total; pools.push_back(tmp); } } tmp["symbols"] = symbols; tmp["decimals"] = decimals; tmp["wallet"] = wallet; tmp["balance"] = balance; tmp["fees_paid"] = fees_paid; tmp["fees_claimed"] = fees_claimed; tmp["user_total"] = user_total; tmp["volume_1d"] = volume_1d; tmp["volume_7d"] = volume_7d; tmp["pools"] = pools; tmp["price"] = to_value(value.balance[1], decimals[1]) / to_value(value.balance[0], decimals[0]); set(tmp); } void accept(const swap_entry_t& value) { auto tmp = render(value, context); if(context) { tmp["time"] = value.time_stamp / 1e3; } set(tmp); } void accept(const exec_entry_t& value) { auto tmp = render(value, context); if(context) { if(value.deposit) { vnx::Object deposit; const auto currency = value.deposit->first; deposit["currency"] = currency.to_string(); if(auto token = context->find_currency(currency)) { deposit["amount"] = to_amount_object(value.deposit->second, token->decimals); } tmp["deposit"] = deposit; } tmp["time"] = value.time_stamp / 1e3; } set(tmp); } // void accept(std::shared_ptr value) { // set(render(value, context)); // } // void accept(std::shared_ptr base) { // if(auto value = std::dynamic_pointer_cast(base)) { // set(render(value, context)); // } else { // set(base); // } // } void accept(std::shared_ptr base) { if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else { set(base); } } void accept(std::shared_ptr base) { if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else { set(base); } } void accept(std::shared_ptr base) { if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else if(auto value = std::dynamic_pointer_cast(base)) { set(render(value, context)); } else { set(base); } } void accept(std::shared_ptr value) { if(value) { auto tmp = render(value, context).to_object(); if(context && context->hide_proof) { tmp.erase("proof_xs"); } set(tmp); } else { set(render(value, context)); } } void augment_block_header(vnx::Object& tmp, std::shared_ptr value) { if(context) { tmp["tx_fees"] = to_amount_object(value->tx_fees, context->params->decimals); tmp["total_cost"] = to_amount_object(value->total_cost, context->params->decimals); tmp["static_cost"] = to_amount_object(value->static_cost, context->params->decimals); tmp["reward_amount"] = to_amount_object(value->reward_amount, context->params->decimals); tmp["base_reward"] = to_amount_object(value->base_reward, context->params->decimals); tmp["vdf_reward"] = to_amount_object(value->vdf_reward_payout ? context->params->vdf_reward : 0, context->params->decimals); tmp["project_reward"] = to_amount_object(calc_project_reward(context->params, value->tx_fees), context->params->decimals); tmp["txfee_buffer"] = to_amount_object(value->txfee_buffer, context->params->decimals); tmp["average_txfee"] = to_amount_object(calc_min_reward_deduction(context->params, value->txfee_buffer), context->params->decimals); tmp["static_cost_ratio"] = double(value->static_cost) / context->params->max_block_size; tmp["total_cost_ratio"] = double(value->total_cost) / context->params->max_block_cost; } if(value->proof.size()) { const auto& proof = value->proof[0]; tmp["score"] = proof->score; tmp["ksize"] = proof->get_field("ksize"); tmp["farmer_key"] = proof->farmer_key.to_string(); } tmp["time"] = value->time_stamp / 1e3; } void accept(std::shared_ptr value) { if(auto block = std::dynamic_pointer_cast(value)) { accept(block); } else if(value) { auto tmp = render(*value, context); augment_block_header(tmp, value); set(tmp); } else { set(render(value)); } } void accept(std::shared_ptr value) { if(value) { auto tmp = render(*value, context); augment_block_header(tmp, value); set(tmp); } else { set(render(value)); } } std::shared_ptr context; private: vnx::Variant* p_value = &result; }; template vnx::Object render(const T& value, std::shared_ptr context) { Render visitor(context); value.accept_generic(visitor); return std::move(visitor.object); } template vnx::Variant render(std::shared_ptr value, std::shared_ptr context) { Render visitor(context); vnx::accept_generic(visitor, value); return std::move(visitor.result); } template vnx::Variant render_value(const T& value, std::shared_ptr context = nullptr) { Render visitor(context); visitor.accept(value); return std::move(visitor.result); } template vnx::Object render_object(const T& value, std::shared_ptr context = nullptr) { return render_value(value, context).to_object(); } std::shared_ptr WebAPI::get_context() const { auto context = std::make_shared(params); context->curr_height = curr_height; return context; } void WebAPI::render_header(const vnx::request_id_t& request_id, std::shared_ptr block) const { if(!block) { respond_status(request_id, 204); return; } respond(request_id, render_value(block, get_context())); } void WebAPI::render_headers(const vnx::request_id_t& request_id, size_t limit, const size_t offset) const { limit = std::min(limit, offset); struct job_t { size_t num_left = 0; vnx::request_id_t request_id; std::vector result; }; auto job = std::make_shared(); job->num_left = limit; job->request_id = request_id; job->result.resize(limit); if(!job->num_left) { respond(request_id, render_value(job->result)); return; } const auto context = get_context(); context->hide_proof = true; for(size_t i = 0; i < limit; ++i) { node->get_header_at(offset - i, [this, job, context, i](std::shared_ptr block) { job->result[i] = render_value(block, context); if(--job->num_left == 0) { respond(job->request_id, render_value(job->result)); } }); } } void WebAPI::render_block_graph(const vnx::request_id_t& request_id, size_t limit, const size_t step, const uint32_t height) const { limit = std::min(limit, (height + step - 1) / step); struct job_t { size_t num_left = 0; vnx::request_id_t request_id; std::vector result; }; auto job = std::make_shared(); job->num_left = limit; job->request_id = request_id; job->result.resize(limit); if(!job->num_left) { respond(request_id, render_value(job->result)); return; } for(size_t i = 0; i < limit; ++i) { node->get_header_at(height - i * step, [this, job, i](std::shared_ptr block) { if(block) { auto& out = job->result[i]; out["height"] = block->height; out["tx_count"] = block->tx_count; out["netspace"] = double(uint64_t(calc_total_netspace(params, block->space_diff) / 1000 / 1000 / 1000)) * pow(1000, -2); out["vdf_speed"] = get_vdf_speed(params, block->time_diff) / 1e6; if(block->proof.size()) { out["score"] = block->proof[0]->score; } else { out["score"] = nullptr; } out["reward"] = to_value(block->reward_amount, params->decimals); out["tx_fees"] = to_value(block->tx_fees, params->decimals); out["base_reward"] = to_value(block->base_reward, params->decimals); } if(--job->num_left == 0) { respond(job->request_id, render_value(job->result)); } }); } } void WebAPI::render_block(const vnx::request_id_t& request_id, std::shared_ptr block) const { if(!block) { respond_status(request_id, 204); return; } std::unordered_set addr_set; for(const auto& base : block->tx_list) { if(auto tx = std::dynamic_pointer_cast(base)) { for(const auto& in : tx->get_inputs()) { addr_set.insert(in.contract); } for(const auto& out : tx->get_outputs()) { addr_set.insert(out.contract); } for(const auto& op : tx->execute) { if(op) { addr_set.insert(op->address); } if(auto deposit = std::dynamic_pointer_cast(op)) { addr_set.insert(deposit->currency); } } } } get_context(addr_set, request_id, [this, request_id, block](std::shared_ptr context) { respond(request_id, render_value(block, context)); }); } void WebAPI::render_blocks(const vnx::request_id_t& request_id, size_t limit, const size_t offset) const { limit = std::min(limit, offset); struct job_t { size_t num_left = 0; vnx::request_id_t request_id; std::vector result; }; auto job = std::make_shared(); job->num_left = limit; job->request_id = request_id; job->result.resize(limit); if(!job->num_left) { respond(request_id, render_value(job->result)); return; } for(size_t i = 0; i < limit; ++i) { node->get_block_at(offset - i, [this, job, i](std::shared_ptr block) { job->result[i] = render_value(block, get_context()); if(--job->num_left == 0) { respond(job->request_id, render_value(job->result)); } }); } } void WebAPI::render_transaction(const vnx::request_id_t& request_id, const vnx::optional& info) const { if(!info) { respond_status(request_id, 204); return; } auto context = get_context(); for(const auto& entry : info->contracts) { context->add_contract(entry.first, entry.second); } respond(request_id, render_value(info, context)); } void WebAPI::render_transactions( const vnx::request_id_t& request_id, size_t limit, const size_t offset, const std::vector& tx_ids) const { limit = std::min(limit, tx_ids.size() - std::min(offset, tx_ids.size())); struct job_t { size_t num_left = 0; vnx::request_id_t request_id; std::vector result; }; auto job = std::make_shared(); job->num_left = limit; job->request_id = request_id; job->result.resize(limit); if(!job->num_left) { respond(request_id, render_value(job->result)); return; } for(size_t i = 0; i < limit; ++i) { const auto txid = tx_ids[offset + i]; node->get_tx_info(txid, [this, job, txid, i](const vnx::optional& info) { if(info && info->id == txid) { auto context = get_context(); for(const auto& entry : info->contracts) { context->add_contract(entry.first, entry.second); } job->result[i] = render_value(info, context); } if(--job->num_left == 0) { std::vector out; for(auto& entry : job->result) { if(!entry.empty()) { out.push_back(std::move(entry)); } } respond(job->request_id, render_value(out)); } }); } } void WebAPI::render_address(const vnx::request_id_t& request_id, const addr_t& address, const std::map& balances) const { std::unordered_set addr_set; for(const auto& entry : balances) { addr_set.insert(entry.first); } get_context(addr_set, request_id, [this, request_id, address, balances](std::shared_ptr context) { Render visitor(context); std::vector rows; for(const auto& entry : balances) { rows.push_back(visitor.to_output(entry.first, entry.second)); } node->get_contract(address, [this, request_id, rows](std::shared_ptr contract) { vnx::Object out; out["balances"] = rows; out["contract"] = render_value(contract); respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }); } void WebAPI::render_balances(const vnx::request_id_t& request_id, const vnx::optional& currency, const std::map& balances) const { std::unordered_set addr_set; for(const auto& entry : balances) { addr_set.insert(entry.first); } get_context(addr_set, request_id, [this, request_id, currency, balances](std::shared_ptr context) { Render visitor(context); std::vector rows; std::vector nfts; for(const auto& entry : balances) { if(currency && entry.first != *currency) { continue; } if(auto currency = context->find_currency(entry.first)) { if(currency->is_nft) { nfts.push_back(entry.first); } else { const auto& balance = entry.second; vnx::Object row; row["total"] = to_value(balance.total, currency->decimals); row["spendable"] = to_value(balance.spendable, currency->decimals); row["reserved"] = to_value(balance.reserved, currency->decimals); row["locked"] = to_value(balance.locked, currency->decimals); row["symbol"] = currency->symbol; row["decimals"] = currency->decimals; row["contract"] = entry.first.to_string(); if(entry.first == addr_t()) { row["is_native"] = true; } row["is_validated"] = balance.is_validated; rows.push_back(row); } } } if(currency) { if(rows.empty()) { if(nfts.empty()) { respond(request_id, vnx::Variant()); } else { respond(request_id, vnx::Variant(true)); } } else { respond(request_id, rows[0]); } } else { vnx::Object out; out["nfts"] = render_value(nfts); out["balances"] = rows; respond(request_id, out); } }); } void WebAPI::render_history(const vnx::request_id_t& request_id, std::vector history) const { std::unordered_set addr_set; for(const auto& entry : history) { addr_set.insert(entry.contract); } get_context(addr_set, request_id, [this, request_id, history](std::shared_ptr context) { respond(request_id, render_value(history, context)); }); } void WebAPI::render_tx_history(const vnx::request_id_t& request_id, const std::vector& history) const { struct job_t { size_t num_left = 0; vnx::request_id_t request_id; std::vector result; }; auto job = std::make_shared(); job->num_left = history.size(); job->request_id = request_id; job->result.resize(history.size()); if(!job->num_left) { respond(request_id, render_value(job->result)); return; } const auto context = get_context(); for(size_t i = 0; i < history.size(); ++i) { const auto& entry = history[i]; const auto& tx = entry.tx; node->get_tx_info(tx->id, [this, context, job, entry, tx, i](const vnx::optional& info) { auto& out = job->result[i]; if(info) { out = render_object(*info, context); if(auto height = info->height) { out["confirm"] = curr_height >= *height ? curr_height - *height + 1 : 0; } else { out["confirm"] = 0; } if(info->did_fail) { out["state"] = "failed"; } else if(!info->height) { if(curr_height > tx->expires) { out["state"] = "expired"; } else { out["state"] = "pending"; } } else { out["state"] = "confirmed"; } } else if(curr_height > tx->expires) { out["state"] = "expired"; } else { out["state"] = "pending"; } out["time"] = entry.time; out["id"] = tx->id.to_string(); out["note"] = tx->note.to_string_value(); if(--job->num_left == 0) { respond(job->request_id, render_value(job->result)); } }); } } void WebAPI::shutdown() { ((WebAPI*)this)->set_timeout_millis(1000, []() { vnx::ProcessClient client("vnx.process"); client.trigger_shutdown_async(); }); } template void require(std::shared_ptr session, const T& perm) { if(!session->has_permission(perm.to_string_value_full())) { throw vnx::permission_denied(perm); } } template T get_param(const std::map& map, const std::string& name, const T& def = T()) { auto iter = map.find(name); if(iter != map.end()) { return vnx::from_string_value(iter->second); } return def; } void WebAPI::http_request_async(std::shared_ptr request, const std::string& sub_path, const vnx::request_id_t& request_id) const { auto session = request->session; if(!session) { throw std::logic_error("not logged in"); } auto vnx_session = vnx::get_session(session->vsid); if(!vnx_session) { throw std::logic_error("invalid session"); } if(request->method != "HEAD" && request->method != "GET" && request->method != "POST") { throw std::logic_error("invalid method: " + request->method); } const bool is_private = vnx_session->has_permission("vnx.permission_e.CONST_REQUEST"); const bool is_public = !is_private; if(is_public) { if(!is_synced || curr_height - synced_since < sync_delay) { respond_status(request_id, 503, "lost sync with network"); return; } if( sub_path.rfind("/wallet/", 0) == 0 || sub_path.rfind("/farm/", 0) == 0) { throw vnx::permission_denied(); } } const auto& query = request->query_params; bool have_args = false; vnx::Object args; if(request->content_type.find("application/json") == 0 || request->content_type.find("text/plain") == 0) { have_args = true; vnx::from_string(request->payload.as_string(), args); } if(sub_path == "/config/get") { require(vnx_session, vnx::permission_e::READ_CONFIG); std::lock_guard lock(g_config_mutex); const auto key = get_param(query, "key"); if(key.size()) { respond(request_id, vnx::get_config(key, true)); } else { vnx::Object object; const auto config = vnx::get_all_configs(true); object.field = std::map(config.begin(), config.end()); respond(request_id, object); } } else if(sub_path == "/config/set") { require(vnx_session, vnx::permission_e::WRITE_CONFIG); std::lock_guard lock(g_config_mutex); const auto iter_key = args.field.find("key"); const auto iter_value = args.field.find("value"); if(iter_key != args.field.end() && iter_value != args.field.end()) { const auto key = iter_key->second.to_string_value(); const auto value = iter_value->second; if(vnx::is_config_protected(key)) { throw std::logic_error("config is protected"); } vnx::set_config(key, value); const bool tmp_only = args["tmp_only"]; if(!tmp_only) { std::string file; vnx::optional field; { const auto pos = key.find('.'); if(pos == std::string::npos) { file = key; } else { file = key.substr(0, pos) + ".json"; field = key.substr(pos + 1); } } if(field) { const auto path = config_path + file; auto object = vnx::read_config_file(path); object[*field] = value; vnx::write_config_file(path, object); log(INFO) << "Updated '" << *field << "'" << ": " << value << " (in " << path << ")"; } else { const auto path = config_path + file; std::ofstream(path) << value << std::endl; log(INFO) << "Updated " << path << ": " << value; } } respond_status(request_id, 200); } else { respond_status(request_id, 400, "POST config/set {key, value, [tmp_only]}"); } } else if(sub_path == "/exit" || sub_path == "/node/exit") { require(vnx_session, vnx::permission_e::SHUTDOWN); ((WebAPI*)this)->shutdown(); respond_status(request_id, 200); } else if(sub_path == "/chain/info") { respond(request_id, render(params)); } else if(sub_path == "/node/info") { node->get_network_info( [this, request_id](std::shared_ptr info) { vnx::Object res; if(info) { auto context = get_context(); res = render(*info); res["time"] = info->time_stamp / 1e3; res["block_reward"] = to_amount_object(info->block_reward, params->decimals); res["average_txfee"] = to_amount_object(info->average_txfee, params->decimals); } respond(request_id, res); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/node/log") { require(vnx_session, vnx::permission_e::VIEW); const auto iter_limit = query.find("limit"); const auto iter_level = query.find("level"); const auto iter_module = query.find("module"); const int level = iter_level != query.end() ? vnx::from_string(iter_level->second) : 3; const size_t limit = iter_limit != query.end() ? std::max(vnx::from_string(iter_limit->second), 0) : 100; std::vector res; for(auto iter = log_history.rbegin(); iter != log_history.rend(); ++iter) { if(res.size() >= limit) { break; } const auto& msg = iter->first; if(msg->level <= level) { if(iter_module == query.end() || msg->module == iter_module->second) { auto tmp = msg->to_object(); tmp["id"] = iter->second; res.push_back(tmp); } } } respond(request_id, render_value(res)); } else if(sub_path == "/node/graph/blocks") { const auto iter_limit = query.find("limit"); const auto iter_step = query.find("step"); const uint32_t limit = iter_limit != query.end() ? std::max(vnx::from_string(iter_limit->second), 0) : 1000; const uint32_t step = iter_step != query.end() ? std::max(vnx::from_string(iter_step->second), 0) : 90; if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_height( [this, request_id, limit, step](const uint32_t& height) { render_block_graph(request_id, limit, step, height); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/header") { const auto iter_hash = query.find("hash"); const auto iter_height = query.find("height"); if(iter_hash != query.end()) { node->get_header(vnx::from_string_value(iter_hash->second), std::bind(&WebAPI::render_header, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(iter_height != query.end()) { node->get_header_at(vnx::from_string_value(iter_height->second), std::bind(&WebAPI::render_header, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "header?hash|height"); } } else if(sub_path == "/headers") { auto limit = get_param(query, "limit"); if(limit > 1000) { throw std::logic_error("limit > 1000"); } if(is_public && limit > 100) { throw std::logic_error("limit > 100"); } const auto offset = get_param(query, "offset"); if(offset && limit) { render_headers(request_id, limit, offset); } else if(!offset) { if(!limit) { limit = 20; } node->get_height( [this, request_id, limit](const uint32_t& height) { render_headers(request_id, limit, height); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "headers?limit|offset"); } } else if(sub_path == "/block") { const auto iter_hash = query.find("hash"); const auto iter_height = query.find("height"); if(iter_hash != query.end()) { node->get_block(vnx::from_string_value(iter_hash->second), std::bind(&WebAPI::render_block, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(iter_height != query.end()) { node->get_block_at(vnx::from_string_value(iter_height->second), std::bind(&WebAPI::render_block, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "block?hash|height"); } } else if(sub_path == "/blocks") { if(is_public) { throw vnx::permission_denied(); } const auto iter_limit = query.find("limit"); const auto iter_offset = query.find("offset"); if(iter_limit != query.end() && iter_offset != query.end()) { const size_t limit = std::max(vnx::from_string(iter_limit->second), 0); const size_t offset = vnx::from_string(iter_offset->second); render_blocks(request_id, limit, offset); } else if(iter_offset == query.end()) { const uint32_t limit = iter_limit != query.end() ? std::max(vnx::from_string(iter_limit->second), 0) : 20; node->get_height( [this, request_id, limit](const uint32_t& height) { render_blocks(request_id, limit, height); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "blocks?limit|offset"); } } else if(sub_path == "/transaction") { const auto iter_id = query.find("id"); if(iter_id != query.end()) { node->get_tx_info(vnx::from_string_value(iter_id->second), std::bind(&WebAPI::render_transaction, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "transaction?id"); } } else if(sub_path == "/transactions") { const auto height = get_param>(query, "height"); const auto offset = get_param(query, "offset"); auto limit = get_param(query, "limit"); if(height) { if(!limit) { limit = (is_public ? 100 : -1); } if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_tx_ids_at(*height, std::bind(&WebAPI::render_transactions, this, request_id, limit, offset, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { if(!limit) { limit = 100; } if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_tx_ids(limit, std::bind(&WebAPI::render_transactions, this, request_id, limit, 0, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } } else if(sub_path == "/address") { const auto address = get_param>(query, "id"); if(address) { const auto limit = get_param(query, "limit", 100); if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_total_balances({*address}, {}, limit, std::bind(&WebAPI::render_address, this, request_id, *address, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "address?id|limit"); } } else if(sub_path == "/balance") { const auto address = get_param>(query, "id"); if(address) { const auto limit = get_param(query, "limit", 100); const auto currency = get_param>(query, "currency"); if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } std::set whitelist; if(currency) { whitelist.insert(*currency); } node->get_contract_balances(*address, whitelist, limit, [this, currency, request_id](const std::map& balances) { render_balances(request_id, currency, balances); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "balance?id|currency|limit"); } } else if(sub_path == "/supply") { const auto currency = get_param(query, "id"); get_context({currency}, request_id, [this, request_id, currency](std::shared_ptr context) { node->get_total_supply(currency, [this, currency, context, request_id](const mmx::uint128& supply) { respond(request_id, render(to_amount_object(supply, context->get_currency(currency)->decimals))); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }); } else if(sub_path == "/contract") { const auto iter = query.find("id"); if(iter != query.end()) { const auto address = vnx::from_string_value(iter->second); node->get_contract(address, [this, request_id](std::shared_ptr contract) { respond(request_id, render_value(contract)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "contract?id"); } } else if(sub_path == "/plotnft") { const auto id = get_param(query, "id"); if(!id.is_zero()) { node->get_plot_nft_info(id, [this, request_id](const vnx::optional& info) { if(info) { respond(request_id, render_value(info)); } else { respond_status(request_id, 204); } }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "plotnft?id"); } } else if(sub_path == "/swap/list") { const auto token = get_param>(query, "token"); const auto currency = get_param>(query, "currency"); const auto since = get_param(query, "since"); const uint32_t limit = get_param(query, "limit", 50); if(is_public && limit > 100) { throw std::logic_error("limit > 100"); } node->get_swaps(since, token, currency, limit, [this, request_id](const std::vector& list) { std::unordered_set token_set; for(const auto& entry : list) { token_set.insert(entry.tokens[0]); token_set.insert(entry.tokens[1]); } get_context(token_set, request_id, [this, request_id, list](std::shared_ptr context) { respond(request_id, render_value(list, context)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/swap/info") { const auto iter = query.find("id"); if(iter != query.end()) { const auto address = vnx::from_string_value(iter->second); node->get_swap_info(address, [this, request_id](const swap_info_t& info) { get_context({info.tokens[0], info.tokens[1]}, request_id, [this, request_id, info](std::shared_ptr context) { auto out = render_object(info, context); std::vector decimals(2); std::vector symbols(2); for(int i = 0; i < 2; ++i) { if(auto token = context->find_currency(info.tokens[i])) { decimals[i] = token->decimals; symbols[i] = token->symbol; } } out["symbols"] = symbols; out["decimals"] = decimals; respond(request_id, out); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "swap/info?id"); } } else if(sub_path == "/swap/user_info") { const auto iter_id = query.find("id"); const auto iter_user = query.find("user"); if(iter_id != query.end() && iter_user != query.end()) { const auto address = vnx::from_string_value(iter_id->second); const auto user = vnx::from_string_value(iter_user->second); node->get_swap_info(address, [this, request_id, address, user](const swap_info_t& info) { get_context({info.tokens[0], info.tokens[1]}, request_id, [this, request_id, address, info, user](std::shared_ptr context) { node->get_swap_user_info(address, user, [this, request_id, info, context](const swap_user_info_t& user_info) { vnx::Object out; const std::vector empty = {to_amount_object(0, 0), to_amount_object(0, 0)}; std::vector symbols(2); std::vector balance(empty); std::vector fees_earned(empty); std::vector equivalent_liquidity(empty); for(int i = 0; i < 2; ++i) { if(auto token = context->find_currency(info.tokens[i])) { symbols[i] = token->symbol; balance[i] = to_amount_object(user_info.balance[i], token->decimals); fees_earned[i] = to_amount_object(user_info.fees_earned[i], token->decimals); equivalent_liquidity[i] = to_amount_object(user_info.equivalent_liquidity[i], token->decimals); } } out["pool_idx"] = user_info.pool_idx; out["tokens"] = render_value(info.tokens); out["symbols"] = symbols; out["balance"] = balance; out["fees_earned"] = fees_earned; out["equivalent_liquidity"] = equivalent_liquidity; out["unlock_height"] = user_info.unlock_height; out["swap"] = render_value(info, context); respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "swap/user_info?id|user"); } } else if(sub_path == "/swap/history") { if(const auto address = get_param>(query, "id")) { const auto limit = get_param(query, "limit", 100); if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_swap_history(*address, limit, [this, request_id](const std::vector& history) { respond(request_id, render_value(history, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "swap/history?id|limit"); } } else if(sub_path == "/swap/trade_estimate") { const auto iter_id = query.find("id"); const auto iter_index = query.find("index"); const auto iter_amount = query.find("amount"); const auto iter_iters = query.find("iters"); if(iter_id != query.end() && iter_index != query.end() && iter_amount != query.end()) { const auto address = vnx::from_string_value(iter_id->second); const auto index = vnx::from_string_value(iter_index->second); const auto value = vnx::from_string_value(iter_amount->second); const auto num_iter = iter_iters != query.end() ? vnx::from_string_value(iter_iters->second) : 20; node->get_swap_info(address, [this, request_id, index, value, num_iter](const swap_info_t& info) { get_context({info.tokens[0], info.tokens[1]}, request_id, [this, request_id, index, info, value, num_iter](std::shared_ptr context) { const auto token_i = context->find_currency(info.tokens[index]); const auto token_k = context->find_currency(info.tokens[(index + 1) % 2]); if(token_i && token_k) { const auto decimals_k = token_k->decimals; const auto amount = to_amount(value, token_i->decimals); node->get_swap_trade_estimate(info.address, index, amount, num_iter, [this, request_id, value, decimals_k](const std::array& ret) { vnx::Object out; out["trade"] = to_amount_object_str(ret[0], decimals_k); out["fee"] = to_amount_object_str(ret[1], decimals_k); const auto fee_value = to_value(ret[1], decimals_k); const auto trade_value = to_value(ret[0], decimals_k); out["fee_percent"] = (100 * fee_value) / (trade_value + fee_value); out["avg_price"] = trade_value / value.to_value(); respond(request_id, render_value(out)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { throw std::logic_error("unknown token"); } }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "swap/trade_estimate?id|index|amount|iters"); } } else if(sub_path == "/offer/trade_estimate") { const auto iter_id = query.find("id"); const auto iter_amount = query.find("amount"); if(iter_id != query.end() && iter_amount != query.end()) { const auto address = vnx::from_string_value(iter_id->second); const auto value = vnx::from_string_value(iter_amount->second); node->get_offer(address, [this, request_id, value](const offer_data_t& info) { get_context({info.bid_currency, info.ask_currency}, request_id, [this, request_id, info, value](std::shared_ptr context) { vnx::Object out; const auto bid_currency = context->find_currency(info.bid_currency); const auto ask_currency = context->find_currency(info.ask_currency); if(bid_currency && ask_currency) { const auto amount = to_amount(value, ask_currency->decimals); const auto bid_amount = info.get_bid_amount(amount); out["input"] = to_amount_object_str(amount, ask_currency->decimals); out["trade"] = to_amount_object_str(bid_amount, bid_currency->decimals); const auto ask_amount = info.get_ask_amount(bid_amount + 1); if(!amount || uint128(bid_amount + 1).to_double() / ask_amount.to_double() > bid_amount.to_double() / amount.to_double()) { out["next_input"] = to_amount_object_str(ask_amount, ask_currency->decimals); } else { out["next_input"] = to_amount_object_str(amount + 1, ask_currency->decimals); } } out["inv_price"] = info.inv_price.to_string(); respond(request_id, render_value(out)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "offer/trade_estimate?id|amount"); } } else if(sub_path == "/farmers") { const auto limit = get_param(query, "limit", 100); if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_farmer_ranking(limit, [this, request_id](const std::vector>& result) { std::vector out; for(const auto& entry : result) { vnx::Object tmp; tmp["farmer_key"] = entry.first.to_string(); tmp["block_count"] = entry.second; out.push_back(tmp); } respond(request_id, render_value(out)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/farmer") { const auto farmer_key = get_param(query, "id"); if(!farmer_key.is_zero()) { const auto since = get_param(query, "since"); node->get_farmed_block_summary({farmer_key}, since, [this, request_id, farmer_key](const farmed_block_summary_t& summary) { vnx::Object out; out["farmer_key"] = farmer_key.to_string(); out["block_count"] = summary.num_blocks; out["total_reward"] = summary.total_rewards; out["total_reward_value"] = to_value(summary.total_rewards, params->decimals); { std::vector rewards; for(const auto& entry : summary.reward_map) { vnx::Object tmp; tmp["address"] = entry.first.to_string(); tmp["amount"] = entry.second; tmp["value"] = to_value(entry.second, params->decimals); rewards.push_back(tmp); } out["rewards"] = rewards; } respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "farmer?id|since"); } } else if(sub_path == "/farmer/blocks") { const auto farmer_key = get_param(query, "id"); if(!farmer_key.is_zero()) { const auto since = get_param(query, "since"); const auto limit = get_param(query, "limit", 50); if(is_public) { if(limit > 100) { throw std::logic_error("limit > 100"); } } node->get_farmed_blocks({farmer_key}, false, since, limit, [this, request_id, farmer_key](const std::vector>& blocks) { respond(request_id, render_value(blocks, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "farmer/blocks?id|since"); } } else if(sub_path == "/address/history") { if(const auto address = get_param>(query, "id")) { query_filter_t filter; filter.limit = get_param(query, "limit", 100); filter.since = get_param(query, "since", 0); filter.until = get_param(query, "until", -1); filter.type = get_param>(query, "type"); filter.memo = get_param>(query, "memo"); if(auto currency = get_param>(query, "currency")) { filter.currency.insert(*currency); } if(is_public) { if(filter.limit > 1000 || filter.limit < 0) { throw std::logic_error("limit > 1000"); } filter.max_search = 10000; } else { filter.max_search = 1000000; } node->get_history({*address}, filter, std::bind(&WebAPI::render_history, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "address/history?id|limit|since|until|type|memo|currency"); } } else if(sub_path == "/contract/exec_history") { if(const auto address = get_param>(query, "id")) { const auto limit = get_param(query, "limit", 100); if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_exec_history(*address, limit, true, [this, request_id](const std::vector& history) { std::unordered_set token_set; for(const auto& entry : history) { if(entry.deposit) { token_set.insert(entry.deposit->first); } } get_context(token_set, request_id, [this, request_id, history](std::shared_ptr context) { respond(request_id, render_value(history, context)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "contract/exec_history?id|limit"); } } else if(sub_path == "/wallet/keys") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_index = query.find("index"); if(iter_index != query.end()) { const uint32_t index = vnx::from_string(iter_index->second); wallet->get_farmer_keys(index, [this, request_id](const std::pair& keys) { vnx::Object out; out["farmer_public_key"] = keys.second.to_string(); respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/keys?index"); } } else if(sub_path == "/wallet/seed") { require(vnx_session, mmx::permission_e::SPENDING); const auto iter_index = query.find("index"); if(iter_index != query.end()) { const uint32_t index = vnx::from_string(iter_index->second); wallet->get_mnemonic_seed(index, [this, request_id](const std::vector& words) { vnx::Object out; out["words"] = words; out["string"] = mnemonic::words_to_string(words); respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/seed?index"); } } else if(sub_path == "/wallet/accounts") { require(vnx_session, vnx::permission_e::CONST_REQUEST); wallet->get_all_accounts( [this, request_id](const std::vector& list) { respond(request_id, render_value(list)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/wallet/account") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_index = query.find("index"); if(iter_index != query.end()) { const uint32_t index = vnx::from_string(iter_index->second); wallet->get_account(index, [this, request_id](const account_info_t& info) { respond(request_id, render(info)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/account?index"); } } else if(sub_path == "/wallet/balance") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_index = query.find("index"); const auto iter_currency = query.find("currency"); const auto iter_with_zero = query.find("with_zero"); if(iter_index != query.end()) { const uint32_t index = vnx::from_string(iter_index->second); const bool with_zero = iter_with_zero != query.end() ? vnx::from_string(iter_with_zero->second) : false; vnx::optional currency; if(iter_currency != query.end()) { currency = vnx::from_string(iter_currency->second); } wallet->get_balances(index, with_zero, std::bind(&WebAPI::render_balances, this, request_id, currency, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/balance?index|confirm|currency"); } } else if(sub_path == "/wallet/contracts") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto index = get_param(query, "index", -1); if(index >= 0) { const auto type_name = get_param>(query, "type"); vnx::optional type_hash; if(auto tmp = get_param>(query, "type_hash")) { type_hash = *tmp; } const auto callback = [this, request_id](const std::map>& map) { auto context = get_context(); std::vector res; for(const auto& entry : map) { if(auto contract = entry.second) { auto tmp = render_object(contract, context); tmp["address"] = entry.first.to_string(); res.push_back(tmp); } } respond(request_id, vnx::Variant(res)); }; if(get_param(query, "owned")) { wallet->get_contracts_owned(index, type_name, type_hash, callback, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { wallet->get_contracts(index, type_name, type_hash, callback, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } } else { respond_status(request_id, 400, "wallet/contracts?index"); } } else if(sub_path == "/wallet/address") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto index = get_param(query, "index", -1); if(index >= 0) { const auto limit = get_param(query, "limit", 1); if(limit <= 1) { const auto offset = get_param(query, "offset"); wallet->get_address(index, offset, [this, request_id](const addr_t& address) { respond(request_id, vnx::Variant(address.to_string())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { wallet->get_all_addresses(index, [this, request_id, limit](const std::vector& list) { std::vector res; for(size_t i = 0; i < list.size() && i < limit; ++i) { res.push_back(list[i].to_string()); } respond(request_id, vnx::Variant(res)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } } else { respond_status(request_id, 400, "wallet/address?index|limit|offset"); } } else if(sub_path == "/wallet/tokens") { require(vnx_session, vnx::permission_e::CONST_REQUEST); wallet->get_token_list( [this, request_id](const std::set& tokens) { get_context(std::unordered_set(tokens.begin(), tokens.end()), request_id, [this, request_id, tokens](std::shared_ptr context) { std::vector res; for(const auto& addr : tokens) { vnx::Object tmp; tmp["currency"] = addr.to_string(); if(auto token = context->find_currency(addr)) { tmp["name"] = token->name; tmp["symbol"] = token->symbol; tmp["decimals"] = token->decimals; tmp["is_nft"] = token->is_nft; tmp["is_native"] = addr == addr_t(); } res.push_back(tmp); } respond(request_id, vnx::Variant(res)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/wallet/history") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto index = get_param(query, "index", -1); if(index >= 0) { query_filter_t filter; filter.max_search = 1000000; filter.with_pending = true; filter.limit = get_param(query, "limit", 100); filter.since = get_param(query, "since", 0); filter.until = get_param(query, "until", -1); filter.type = get_param>(query, "type"); filter.memo = get_param>(query, "memo"); if(auto currency = get_param>(query, "currency")) { filter.currency.insert(*currency); } wallet->get_history(index, filter, std::bind(&WebAPI::render_history, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/history?index|limit|since|until|type|memo|currency"); } } else if(sub_path == "/wallet/tx_history") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto index = get_param(query, "index", -1); if(index >= 0) { const auto limit = get_param(query, "limit", 100); wallet->get_tx_log(index, limit, std::bind(&WebAPI::render_tx_history, this, request_id, std::placeholders::_1), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/tx_history?index|limit"); } } else if(sub_path == "/wallet/offers") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_index = query.find("index"); if(iter_index != query.end()) { const auto iter_state = query.find("state"); const uint32_t index = vnx::from_string_value(iter_index->second); const bool state = iter_state != query.end() ? vnx::from_string_value(iter_state->second) : false; wallet->get_offers(index, state, [this, request_id](const std::vector& offers) { std::unordered_set addr_set; for(const auto& entry : offers) { addr_set.insert(entry.bid_currency); addr_set.insert(entry.ask_currency); } get_context(addr_set, request_id, [this, request_id, offers](std::shared_ptr context) { std::vector res; for(const auto& entry : offers) { res.push_back(render_value(entry, context)); } respond(request_id, render_value(res)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/offers?index"); } } else if(sub_path == "/wallet/send") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto currency = args["currency"].to(); get_context({currency}, request_id, [this, request_id, args, currency](std::shared_ptr context) { try { uint128 amount = 0; if(args["raw_mode"].to()) { args["amount"].to(amount); } else { if(auto token = context->find_currency(currency)) { amount = to_amount(args["amount"].to(), token->decimals); } else { throw std::logic_error("invalid currency"); } } const auto index = args["index"].to(); const auto dst_addr = args["dst_addr"].to(); const auto options = args["options"].to(); if(args.field.count("src_addr")) { const auto src_addr = args["src_addr"].to(); wallet->send_from(index, amount, dst_addr, src_addr, currency, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { wallet->send(index, amount, dst_addr, currency, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } } catch(std::exception& ex) { respond_ex(request_id, ex); } }); } else { respond_status(request_id, 400, "POST wallet/send {index, amount, currency, dst_addr, [src_addr], [raw_mode]}"); } } else if(sub_path == "/wallet/send_many") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto currency = args["currency"].to(); get_context({currency}, request_id, [this, request_id, args, currency](std::shared_ptr context) { try { std::vector> amounts; if(args["raw_mode"].to()) { args["amounts"].to(amounts); } else { if(auto token = context->find_currency(currency)) { for(const auto& entry : args["amounts"].to>>()) { amounts.emplace_back(entry.first, to_amount(entry.second, token->decimals)); } } else { throw std::logic_error("invalid currency"); } } const auto index = args["index"].to(); const auto options = args["options"].to(); wallet->send_many(index, amounts, currency, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } catch(std::exception& ex) { respond_ex(request_id, ex); } }); } else { respond_status(request_id, 400, "POST wallet/send_many {index, amounts, currency, options, [raw_mode]}"); } } else if(sub_path == "/wallet/send_off") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto tx = parse_tx(args["tx"].to_object()); wallet->send_off(index, tx, [this, request_id]() { respond_status(request_id, 200); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/send_off {index, tx}"); } } else if(sub_path == "/wallet/deploy") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto payload = args["payload"].to>(); const auto options = args["options"].to(); wallet->deploy(index, payload, options, [this, request_id](std::shared_ptr tx) { respond(request_id, vnx::Variant(addr_t(tx->id).to_string())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/deploy {...}"); } } else if(sub_path == "/wallet/execute") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto address = args["address"].to(); const auto method = args["method"].to(); const auto params = args["args"].to>(); const auto user = args["user"].to>(); const auto options = args["options"].to(); wallet->execute(index, address, method, params, user, options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/execute {...}"); } } else if(sub_path == "/wallet/make_offer") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto bid_currency = args["bid_currency"].to(); const auto ask_currency = args["ask_currency"].to(); get_context({bid_currency, ask_currency}, request_id, [this, request_id, args, bid_currency, ask_currency](std::shared_ptr context) { try { const auto bid = context->get_currency(bid_currency); const auto ask = context->get_currency(ask_currency); const auto price = args["price"].to(); const auto bid_value = args["bid"].to(); const auto bid_amount = to_amount(bid_value, bid->decimals); const auto ask_amount = to_amount(bid_value.to_value() / price.to_value(), ask->decimals); const auto index = args["index"].to(); const auto options = args["options"].to(); wallet->make_offer(index, 0, bid_amount, bid_currency, ask_amount, ask_currency, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } catch(std::exception& ex) { respond_ex(request_id, ex); } }); } else { respond_status(request_id, 400, "POST wallet/make_offer {...}"); } } else if(sub_path == "/wallet/cancel_offer") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto address = args["address"].to(); const auto options = args["options"].to(); wallet->cancel_offer(index, address, options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/cancel_offer {...}"); } } else if(sub_path == "/wallet/offer_withdraw") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto address = args["address"].to(); const auto options = args["options"].to(); wallet->offer_withdraw(index, address, options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/offer_withdraw {...}"); } } else if(sub_path == "/wallet/offer_trade") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto address = args["address"].to(); node->get_offer(address, [this, request_id, address, args](const offer_data_t& offer) { get_context({offer.ask_currency}, request_id, [this, request_id, address, args, offer](std::shared_ptr context) { const auto token = context->find_currency(offer.ask_currency); if(!token) { throw std::logic_error("invalid currency"); } const auto index = args["index"].to(); const auto value = args["amount"].to(); const auto price = args["price"].to(); const auto options = args["options"].to(); const auto amount = to_amount(value, token->decimals); wallet->offer_trade(index, address, amount, 0, price, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/offer_trade {...}"); } } else if(sub_path == "/wallet/accept_offer") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto address = args["address"].to(); node->get_offer(address, [this, request_id, address, args](const offer_data_t& offer) { const auto index = args["index"].to(); const auto price = args["price"].to(); const auto options = args["options"].to(); wallet->accept_offer(index, address, 0, price, options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/accept_offer {...}"); } } else if(sub_path == "/wallet/swap/liquid") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto index = get_param(query, "index", -1); if(index >= 0) { wallet->get_swap_liquidity(index, [this, request_id](const std::map, 2>>& balance) { std::unordered_set token_set; for(const auto& entry : balance) { for(const auto& entry2 : entry.second) { token_set.insert(entry2.first); } } get_context(token_set, request_id, [this, request_id, balance](std::shared_ptr context) { std::vector out; for(const auto& entry : balance) { uint32_t i = 0; for(const auto& entry2 : entry.second) { if(entry2.second) { vnx::Object tmp; tmp["address"] = entry.first.to_string(); tmp["currency"] = entry2.first.to_string(); if(auto token = context->find_currency(entry2.first)) { tmp["balance"] = to_amount_object(entry2.second, token->decimals); tmp["symbol"] = token->symbol; } tmp["index"] = i; out.push_back(tmp); } i++; } } respond(request_id, render_value(out)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "wallet/swap/liquid?index"); } } else if(sub_path == "/wallet/swap/trade") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto address = args["address"].to(); node->get_swap_info(address, [this, request_id, address, args](const swap_info_t& info) { get_context({info.tokens[0], info.tokens[1]}, request_id, [this, request_id, address, args, info](std::shared_ptr context) { const auto wallet_i = args["wallet"].to(); const auto index = args["index"].to(); const auto value = args["amount"].to(); const auto min_value = args["min_trade"].to>(); const auto num_iter = args["num_iter"].to(); const auto options = args["options"].to(); const auto token_i = context->find_currency(info.tokens[index % 2]); const auto token_k = context->find_currency(info.tokens[(index + 1) % 2]); if(!token_i || !token_k) { throw std::logic_error("invalid token or currency"); } const auto amount = to_amount(value, token_i->decimals); vnx::optional min_trade; if(min_value) { min_trade = to_amount(*min_value, token_k->decimals); } wallet->swap_trade(wallet_i, address, amount, info.tokens[index % 2], min_trade, num_iter > 0 ? num_iter : 20, options, [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/swap/trade {...}"); } } else if(sub_path == "/wallet/swap/add_liquid" || sub_path == "/wallet/swap/rem_liquid") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto address = args["address"].to(); const auto mode = (sub_path == "/wallet/swap/add_liquid"); node->get_swap_info(address, [this, request_id, mode, address, args](const swap_info_t& info) { get_context({info.tokens[0], info.tokens[1]}, request_id, [this, request_id, mode, address, args, info](std::shared_ptr context) { const auto index = args["index"].to(); const auto value = args["amount"].to>(); const auto pool_idx = args["pool_idx"].to(); const auto options = args["options"].to(); std::array amount = {}; for(int i = 0; i < 2; ++i) { if(const auto token = context->find_currency(info.tokens[i])) { amount[i] = to_amount(value[i], token->decimals); } } const auto callback = [this, request_id, context](std::shared_ptr tx) { respond(request_id, render(tx, context)); }; if(mode) { wallet->swap_add_liquid(index, address, amount, pool_idx, options, callback, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { wallet->swap_rem_liquid(index, address, amount, options, callback, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/swap/[add/rem]_liquid {...}"); } } else if(sub_path == "/wallet/swap/payout") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto address = args["address"].to(); const auto options = args["options"].to(); wallet->execute(index, address, "payout", {}, uint32_t(0), options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/swap/payout {...}"); } } else if(sub_path == "/wallet/swap/switch_pool") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto pool_idx = args["pool_idx"].to(); const auto address = args["address"].to(); const auto options = args["options"].to(); wallet->execute(index, address, "switch_pool", {vnx::Variant(pool_idx)}, uint32_t(0), options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/swap/switch_pool {...}"); } } else if(sub_path == "/wallet/swap/rem_all_liquid") { require(vnx_session, mmx::permission_e::SPENDING); if(have_args) { const auto index = args["index"].to(); const auto address = args["address"].to(); const auto options = args["options"].to(); wallet->execute(index, address, "rem_all_liquid", {vnx::Variant(false)}, uint32_t(0), options, [this, request_id](std::shared_ptr tx) { respond(request_id, render(tx, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST wallet/swap/rem_all_liquid {...}"); } } else if(sub_path == "/farm/info") { require(vnx_session, vnx::permission_e::CONST_REQUEST); farmer->get_farm_info( [this, request_id](std::shared_ptr info) { vnx::Object out; if(info) { out = render(*info); } respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/farm/blocks") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_limit = query.find("limit"); const auto iter_since = query.find("since"); const int32_t limit = iter_limit != query.end() ? vnx::from_string(iter_limit->second) : -1; const uint32_t since = iter_since != query.end() ? vnx::from_string(iter_since->second) : 0; farmer->get_farmer_keys( [this, request_id, limit, since](const std::vector& farmer_keys) { node->get_farmed_blocks(farmer_keys, false, since, limit, [this, request_id](const std::vector> blocks) { respond(request_id, render_value(blocks, get_context())); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/farm/blocks/summary") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_since = query.find("since"); const uint32_t since = iter_since != query.end() ? vnx::from_string(iter_since->second) : 0; farmer->get_farmer_keys( [this, request_id, since](const std::vector& farmer_keys) { node->get_farmed_block_summary(farmer_keys, since, [this, request_id](const farmed_block_summary_t& summary) { vnx::Object out; out["num_blocks"] = summary.num_blocks; out["last_height"] = summary.last_height; out["total_rewards"] = summary.total_rewards; out["total_rewards_value"] = to_value(summary.total_rewards, params->decimals); { std::vector rewards; for(const auto& entry : summary.reward_map) { vnx::Object tmp; tmp["address"] = entry.first.to_string(); tmp["amount"] = entry.second; tmp["value"] = to_value(entry.second, params->decimals); rewards.push_back(tmp); } out["rewards"] = rewards; } respond(request_id, out); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/farm/proofs") { require(vnx_session, vnx::permission_e::CONST_REQUEST); const auto iter_limit = query.find("limit"); const size_t limit = iter_limit != query.end() ? vnx::from_string(iter_limit->second) : -1; std::vector res; for(auto iter = proof_history.rbegin(); iter != proof_history.rend(); ++iter) { if(res.size() >= limit) { break; } const auto& value = iter->first; auto tmp = render(*value); if(value->proof) { tmp["proof"] = render(*value->proof); } tmp["id"] = iter->second; tmp["harvester"] = value->harvester; tmp["lookup_time_ms"] = value->lookup_time_ms; res.push_back(tmp); } respond(request_id, render_value(res)); } else if(sub_path == "/offers") { vnx::optional bid; vnx::optional ask; const auto iter_bid = query.find("bid"); const auto iter_ask = query.find("ask"); const auto iter_min_bid = query.find("min_bid"); const auto iter_limit = query.find("limit"); const auto iter_state = query.find("state"); if(iter_bid != query.end()) { bid = vnx::from_string_value(iter_bid->second); } if(iter_ask != query.end()) { ask = vnx::from_string_value(iter_ask->second); } const uint128 min_bid = iter_min_bid != query.end() ? vnx::from_string(iter_min_bid->second) : uint128(); const uint32_t limit = iter_limit != query.end() ? vnx::from_string(iter_limit->second) : 100; const bool state = iter_state != query.end() ? vnx::from_string(iter_state->second) : true; if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_recent_offers_for(bid, ask, min_bid, limit, state, [this, request_id, bid, ask](const std::vector& offers) { std::unordered_set addr_set; std::vector> result; for(const auto& entry : offers) { result.emplace_back(entry, entry.price); addr_set.insert(entry.bid_currency); addr_set.insert(entry.ask_currency); } if(bid && ask) { std::sort(result.begin(), result.end(), [](const std::pair& lhs, const std::pair& rhs) -> bool { return lhs.second < rhs.second; }); } get_context(addr_set, request_id, [this, request_id, result](std::shared_ptr context) { std::vector res; for(const auto& entry : result) { res.push_back(render_value(entry.first, context)); } respond(request_id, render_value(res)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/offer") { const auto iter_address = query.find("id"); if(iter_address != query.end()) { const auto address = vnx::from_string_value(iter_address->second); node->get_offer(address, [this, request_id](const offer_data_t& offer) { get_context({offer.bid_currency, offer.ask_currency}, request_id, [this, request_id, offer](std::shared_ptr context) { respond(request_id, render_value(offer, context)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "offer?id"); } } else if(sub_path == "/trade_history") { vnx::optional bid; vnx::optional ask; const auto iter_bid = query.find("bid"); const auto iter_ask = query.find("ask"); const auto iter_limit = query.find("limit"); const auto iter_since = query.find("since"); if(iter_bid != query.end()) { bid = vnx::from_string_value(iter_bid->second); } if(iter_ask != query.end()) { ask = vnx::from_string_value(iter_ask->second); } const uint32_t limit = iter_limit != query.end() ? vnx::from_string(iter_limit->second) : 100; const uint32_t since = iter_since != query.end() ? vnx::from_string(iter_since->second) : 0; if(is_public && limit > 1000) { throw std::logic_error("limit > 1000"); } node->get_trade_history_for(bid, ask, limit, since, [this, request_id, bid, ask](const std::vector& result) { std::unordered_set addr_set; for(const auto& entry : result) { addr_set.insert(entry.bid_currency); addr_set.insert(entry.ask_currency); } get_context(addr_set, request_id, [this, request_id, result](std::shared_ptr context) { std::vector res; for(const auto& entry : result) { res.push_back(render_value(entry, context)); } respond(request_id, render_value(res)); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(sub_path == "/contract/storage") { const auto iter_address = query.find("id"); if(iter_address != query.end()) { const auto contract = vnx::from_string_value(iter_address->second); node->read_storage(contract, -1, [this, request_id, contract](const std::map& ret) { struct job_t { size_t k = 0; vnx::Object out; }; const auto count = ret.size(); auto job = std::make_shared(); for(const auto& entry : ret) { const auto key = entry.first; resolve_vm_varptr(contract, entry.second, request_id, 0, [this, request_id, job, count, key](const vnx::Variant& value) { job->out[key] = value; if(++(job->k) == count) { respond(request_id, job->out); } }); } if(count == 0) { respond(request_id, job->out); } }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "contract/storage?id"); } } else if(sub_path == "/contract/storage/field") { const auto iter_address = query.find("id"); const auto iter_name = query.find("name"); if(iter_address != query.end() && iter_name != query.end()) { const auto contract = vnx::from_string_value(iter_address->second); const auto name = vnx::from_string_value(iter_name->second); node->read_storage_field(contract, name, -1, [this, request_id, contract](const std::pair& ret) { const auto addr = ret.second; resolve_vm_varptr(contract, ret.first, request_id, 0, [this, request_id, addr](const vnx::Variant& value) { vnx::Object out; out["address"] = addr; out["value"] = value; respond(request_id, out); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "contract/storage/field?id|name"); } } else if(sub_path == "/contract/storage/entry") { const auto iter_address = query.find("id"); const auto iter_name = query.find("name"); const auto iter_addr = query.find("addr"); const auto iter_key = query.find("key"); if(iter_address != query.end() && iter_name != query.end() && (iter_addr != query.end() || iter_key != query.end())) { const auto contract = vnx::from_string_value(iter_address->second); const auto name = vnx::from_string_value(iter_name->second); if(iter_addr != query.end()) { const auto key = vnx::from_string_value(iter_addr->second); node->read_storage_entry_addr(contract, name, key, -1, [this, request_id, contract](const std::tuple& ret) { const auto addr = std::get<1>(ret); const auto key = std::get<2>(ret); resolve_vm_varptr(contract, std::get<0>(ret), request_id, 0, [this, request_id, addr, key](const vnx::Variant& value) { vnx::Object out; out["address"] = addr; out["key"] = key; out["value"] = value; respond(request_id, out); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else if(iter_key != query.end()) { const auto key = vnx::from_string_value(iter_key->second); node->read_storage_entry_string(contract, name, key, -1, [this, request_id, contract](const std::tuple& ret) { const auto addr = std::get<1>(ret); const auto key = std::get<2>(ret); resolve_vm_varptr(contract, std::get<0>(ret), request_id, 0, [this, request_id, addr, key](const vnx::Variant& value) { vnx::Object out; out["address"] = addr; out["key"] = key; out["value"] = value; respond(request_id, out); }); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } } else { respond_status(request_id, 400, "contract/storage/entry?id|name|addr|key"); } } else if(sub_path == "/contract/call") { const auto address = get_param(query, "id"); const auto method = get_param(query, "method"); const auto user = get_param>(query, "user"); const auto params = args["args"].to>(); const auto deposit = args["deposit"].to>>(); if(address != addr_t() && method.size()) { node->call_contract(address, method, params, user, deposit, [this, request_id](const vnx::Variant& result) { respond(request_id, render_value(result)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "GET/POST contract/call?id|method {args: [...]}"); } } else if(sub_path == "/transaction/validate") { if(have_args) { const auto tx = parse_tx(args); node->validate(tx, [this, request_id](const exec_result_t& result) { respond(request_id, render(result)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST transaction/validate {...}"); } } else if(sub_path == "/transaction/broadcast") { if(have_args) { const auto tx = parse_tx(args); node->validate(tx, [this, request_id, tx](const exec_result_t& result) { node->add_transaction(tx, false, std::bind(&WebAPI::respond_status, this, request_id, 200, ""), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } else { respond_status(request_id, 400, "POST transaction/broadcast {...}"); } } else if(sub_path == "/passphrase/validate") { if(is_public) { throw vnx::permission_denied(); } if(have_args) { hash_t seed = args["seed"].to(); if(args.field.count("words")) { seed = mnemonic::words_to_seed(mnemonic::string_to_words(args["words"].to_string_value())); } const std::string finger_print = args["finger_print"].to_string_value(); const std::string passphrase = args["passphrase"].to_string_value(); if(get_finger_print(seed, passphrase) == finger_print) { respond_status(request_id, 200, "true"); } else { respond_status(request_id, 400, "false"); } } else { respond_status(request_id, 400, "POST passphrase/validate {...}"); } } else { std::vector options = { "config/get", "config/set", "farmers", "farmer", "farmer/blocks", "chain/info", "node/info", "node/log", "header", "headers", "block", "blocks", "transaction", "transactions", "address", "contract", "plotnft" "address/history", "wallet/balance", "wallet/contracts", "wallet/address" "wallet/history", "wallet/send", "wallet/send_many", "wallet/send_off", "wallet/make_offer", "wallet/cancel_offer", "wallet/accept_offer", "wallet/offer_withdraw", "wallet/offer_trade", "wallet/swap/liquid", "wallet/swap/trade", "wallet/swap/add_liquid", "wallet/swap/rem_liquid", "wallet/swap/payout", "wallet/swap/switch_pool", "wallet/swap/rem_all_liquid", "wallet/accounts", "wallet/account", "swap/list", "swap/info", "swap/user_info", "swap/trade_estimate", "farm/info", "farm/blocks", "farm/blocks/summary", "farm/proofs", "offers", "offer", "trade_history", "contract/storage", "contract/storage/field", "contract/storage/entry", "transaction/validate", "transaction/broadcast", "passphrase/validate" }; respond_status(request_id, 404, vnx::to_string(options)); } } void WebAPI::http_request_chunk_async( std::shared_ptr request, const std::string& sub_path, const int64_t& offset, const int64_t& max_bytes, const vnx::request_id_t& request_id) const { throw std::logic_error("not implemented"); } void WebAPI::get_context( const std::unordered_set& addr_set, const vnx::request_id_t& request_id, const std::function)>& callback) const { const std::vector list(addr_set.begin(), addr_set.end()); node->get_contracts(list, [this, list, request_id, callback](const std::vector> values) { auto context = get_context(); for(size_t i = 0; i < list.size() && i < values.size(); ++i) { context->add_contract(list[i], values[i]); } try { callback(context); } catch(const std::exception& ex) { respond_ex(request_id, ex); } }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); } void WebAPI::resolve_vm_varptr( const addr_t& contract, const vm::varptr_t& var, const vnx::request_id_t& request_id, const uint32_t call_depth, const std::function& callback) const { if(!var) { callback(vnx::Variant()); return; } if(call_depth > max_recursion) { vnx::Object err; err["__type"] = "mmx.Exception"; err["message"] = "Maximum recursion limit reached: " + std::to_string(max_recursion); callback(vnx::Variant(err)); return; } switch(var->type) { case vm::TYPE_REF: { node->read_storage_var(contract, vm::to_ref(var), -1, std::bind(&WebAPI::resolve_vm_varptr, this, contract, std::placeholders::_1, request_id, call_depth + 1, callback), std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); break; } case vm::TYPE_ARRAY: node->read_storage_array(contract, vm::to_ref(var), -1, [this, contract, request_id, callback, call_depth](const std::vector& ret) { struct job_t { size_t k = 0; std::vector out; }; const auto count = ret.size(); auto job = std::make_shared(); job->out.resize(count); for(size_t i = 0; i < count; ++i) { resolve_vm_varptr(contract, ret[i], request_id, call_depth + 1, [job, callback, count, i](const vnx::Variant& value) { job->out[i] = value; if(++(job->k) == count) { callback(vnx::Variant(job->out)); } }); } if(count == 0) { callback(vnx::Variant(job->out)); } }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); break; case vm::TYPE_MAP: node->read_storage_map(contract, vm::to_ref(var), -1, [this, contract, request_id, callback, call_depth](const std::map& ret) { struct job_t { size_t k = 0; vnx::Object out; }; const auto count = ret.size(); auto job = std::make_shared(); for(const auto& entry : ret) { std::string key; vnx::optional key_addr; if(auto var = entry.first) { switch(var->type) { case vm::TYPE_UINT: key = vm::to_uint(var).str(10); break; case vm::TYPE_STRING: key = vm::to_string_value(var); break; case vm::TYPE_BINARY: key = vm::to_string_value_hex(var); if(vm::get_size(var) == 32) { key_addr = vm::to_addr(var); } break; default: key = vm::to_string(var); } } resolve_vm_varptr(contract, entry.second, request_id, call_depth + 1, [job, callback, count, key, key_addr](const vnx::Variant& value) { job->out[key] = value; if(key_addr) { job->out[key_addr->to_string()] = value; } if(++(job->k) == count) { callback(vnx::Variant(job->out)); } }); } if(count == 0) { callback(vnx::Variant(job->out)); } }, std::bind(&WebAPI::respond_ex, this, request_id, std::placeholders::_1)); break; case vm::TYPE_UINT: { const auto value = vm::to_uint(var); if(value >> 64) { callback(vnx::Variant(value.str(10))); } else { callback(vnx::Variant(uint64_t(value))); } break; } case vm::TYPE_STRING: callback(vnx::Variant(vm::to_string_value(var))); break; case vm::TYPE_BINARY: { const auto hex = vm::to_string_value_hex(var); vnx::Object out; out["hex"] = hex; if(hex.size() == 64) { out["hash"] = vm::to_hash(var).to_string(); out["address"] = vm::to_addr(var).to_string(); } callback(vnx::Variant(out)); break; } case vm::TYPE_TRUE: callback(vnx::Variant(true)); break; case vm::TYPE_FALSE: callback(vnx::Variant(false)); break; case vm::TYPE_NIL: callback(vnx::Variant()); break; default: callback(vnx::Variant(vm::to_string(var))); } } void WebAPI::respond(const vnx::request_id_t& request_id, std::shared_ptr response) const { auto tmp = vnx::clone(response); if(cache_max_age > 0) { tmp->headers.emplace_back("Cache-Control", "max-age=" + std::to_string(cache_max_age) + ", no-store"); } else { tmp->headers.emplace_back("Cache-Control", "no-cache, no-store"); } http_request_async_return(request_id, tmp); } void WebAPI::respond(const vnx::request_id_t& request_id, const vnx::Variant& value) const { respond(request_id, vnx::addons::HttpResponse::from_variant_json(value)); } void WebAPI::respond(const vnx::request_id_t& request_id, const vnx::Object& value) const { respond(request_id, vnx::addons::HttpResponse::from_object_json(value)); } void WebAPI::respond_ex(const vnx::request_id_t& request_id, const std::exception& ex) const { respond(request_id, vnx::addons::HttpResponse::from_text_ex(ex.what(), 400)); } void WebAPI::respond_status(const vnx::request_id_t& request_id, const int32_t& status, const std::string& text) const { if(text.empty()) { respond(request_id, vnx::addons::HttpResponse::from_status(status)); } else { respond(request_id, vnx::addons::HttpResponse::from_text_ex(text, status)); } } } // mmx ================================================ FILE: src/account_info_t.cpp ================================================ /* * account_info_t.cpp * * Created on: Jun 28, 2024 * Author: mad */ #include namespace mmx { account_info_t account_info_t::make(const uint32_t& account, const vnx::optional& address, const account_t& config) { account_info_t out; static_cast(out) = config; out.account = account; out.address = address; return out; } } // mmx ================================================ FILE: src/addr_t.cpp ================================================ /* * addr_t.cpp * * Created on: Apr 30, 2022 * Author: mad */ #include #include #include namespace mmx { std::string addr_t::to_string() const { // Note: this function is consensus critical auto bits = to_uint256(); std::vector dp(52); dp[51] = (bits & 1) << 4; bits >>= 1; for(int i = 0; i < 51; ++i) { dp[50 - i] = bits & 0x1F; bits >>= 5; } return bech32::encode("mmx", dp); } void addr_t::from_string(const std::string& addr) { // Note: this function is consensus critical if(addr == "MMX") { *this = addr_t(); return; } const auto res = bech32::decode(addr); if(res.encoding != bech32::Bech32m) { throw std::logic_error("invalid address: " + addr); } if(res.dp.size() != 52) { throw std::logic_error("invalid address (size != 52): " + addr); } uint256_t bits = 0; for(int i = 0; i < 50; ++i) { bits |= res.dp[i] & 0x1F; bits <<= 5; } bits |= res.dp[50] & 0x1F; bits <<= 1; bits |= (res.dp[51] >> 4) & 1; from_uint(bits); } } // mmx namespace vnx { void read(vnx::TypeInput& in, mmx::addr_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { switch(code[0]) { case CODE_STRING: case CODE_ALT_STRING: { std::string tmp; vnx::read(in, tmp, type_code, code); try { value.from_string(tmp); } catch(...) { value = mmx::addr_t(); } break; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: { vnx::Variant tmp; vnx::read(in, tmp, type_code, code); value = tmp.to(); break; } default: vnx::read(in, value.bytes, type_code, code); } } } // vnx ================================================ FILE: src/contract/Binary.cpp ================================================ /* * Binary.cpp * * Created on: Sep 7, 2022 * Author: mad */ #include #include #include #include #include namespace mmx { namespace contract { bool Binary::is_valid() const { for(const auto& entry : methods) { const auto& method = entry.second; if(method.is_payable && method.is_const) { return false; } if(method.is_init && (method.is_const || method.is_public || method.is_payable)) { return false; } } return Super::is_valid(); } hash_t Binary::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "name", name); write_field(out, "fields", fields); write_field(out, "methods", methods); write_field(out, "constant", constant); write_field(out, "binary", binary); write_field(out, "line_info", line_info); write_field(out, "source", source); write_field(out, "compiler", compiler); write_field(out, "build_flags", build_flags); out.flush(); return hash_t(buffer); } uint64_t Binary::num_bytes() const { uint64_t sum = Super::num_bytes() + fields.size() * 4 + line_info.size() * 8; for(const auto& entry : fields) { sum += entry.first.size(); } for(const auto& entry : methods) { sum += entry.first.size() + entry.second.num_bytes(); } sum += name.size() + constant.size() + binary.size() + source.size() + compiler.size(); return sum; } vnx::optional Binary::find_field(const std::string& name) const { auto iter = fields.find(name); if(iter != fields.end()) { return iter->second; } return nullptr; } vnx::optional Binary::find_method(const std::string& name) const { auto iter = methods.find(name); if(iter != methods.end()) { return iter->second; } return nullptr; } vnx::optional Binary::find_line(const uint32_t& address) const { auto iter = line_info.upper_bound(address); if(iter != line_info.begin()) { return (--iter)->second; } return nullptr; } } // contract } // mmx ================================================ FILE: src/contract/Data.cpp ================================================ /* * Data.cpp * * Created on: Jan 19, 2022 * Author: mad */ #include #include #include namespace mmx { namespace contract { vnx::bool_t Data::is_valid() const { return Super::is_valid() && is_json(value); } hash_t Data::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "value", value); out.flush(); return hash_t(buffer); } uint64_t Data::num_bytes() const { return Super::num_bytes() + get_num_bytes(value); } } // contract } // mmx ================================================ FILE: src/contract/Executable.cpp ================================================ /* * Executable.cpp * * Created on: May 10, 2022 * Author: mad */ #include #include #include #include #include namespace mmx { namespace contract { bool Executable::is_valid() const { for(const auto& arg : init_args) { if(!is_json(arg)) { return false; } } for(const auto& entry : depends) { if(entry.first.size() > 64) { return false; } } return Super::is_valid() && binary != addr_t(); } addr_t Executable::get_external(const std::string& name) const { auto iter = depends.find(name); if(iter == depends.end()) { throw std::runtime_error("no such external contract: " + name); } return iter->second; } hash_t Executable::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "name", name); write_field(out, "symbol", symbol); write_field(out, "decimals", decimals); write_field(out, "meta_data", meta_data); write_field(out, "binary", binary); write_field(out, "init_method", init_method); write_field(out, "init_args", init_args); write_field(out, "depends", depends); out.flush(); return hash_t(buffer); } uint64_t Executable::calc_cost(std::shared_ptr params) const { return Super::calc_cost(params) + depends.size() * params->min_txfee_depend; } uint64_t Executable::num_bytes() const { uint64_t sum = Super::num_bytes() + 32 + init_method.size() + depends.size() * 32; for(const auto& arg : init_args) { sum += get_num_bytes(arg); } for(const auto& entry : depends) { sum += entry.first.size(); } return sum; } vnx::Variant Executable::read_field(const std::string& name) const { return Super::read_field(name); } vnx::Variant Executable::get_arg(const uint32_t& index) const { if(index < init_args.size()) { return init_args[index]; } return vnx::Variant(); } } // contract } // mmx ================================================ FILE: src/contract/MultiSig.cpp ================================================ /* * MultiSig.cpp * * Created on: Jan 15, 2022 * Author: mad */ #include #include #include #include #include #include namespace mmx { namespace contract { vnx::bool_t MultiSig::is_valid() const { return Super::is_valid() && num_required > 0 && owners.size() >= num_required; } hash_t MultiSig::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "num_required", num_required); write_field(out, "owners", owners); out.flush(); return hash_t(buffer); } uint64_t MultiSig::num_bytes() const { return Super::num_bytes() + owners.size() * 32; } void MultiSig::validate(std::shared_ptr solution, const hash_t& txid) const { if(auto sol = std::dynamic_pointer_cast(solution)) { if(num_required != 1) { throw mmx::invalid_solution("num_required != 1"); } const auto sol_address = sol->pubkey.get_addr(); if(owners.count(sol_address)) { if(!sol->signature.verify(sol->pubkey, txid)) { throw mmx::invalid_solution("invalid signature"); } return; } throw mmx::invalid_solution("no such owner: " + sol_address.to_string()); } if(auto sol = std::dynamic_pointer_cast(solution)) { size_t count = 0; for(const auto& entry : sol->solutions) { const auto& owner = entry.first; if(owners.count(owner)) { if(auto sol = std::dynamic_pointer_cast(entry.second)) { if(sol->pubkey.get_addr() != owner) { throw mmx::invalid_solution("wrong public key for " + owner.to_string()); } if(!sol->signature.verify(sol->pubkey, txid)) { throw mmx::invalid_solution("invalid signature for " + owner.to_string()); } count++; } } } if(count < num_required) { throw mmx::invalid_solution("insufficient signatures: " + std::to_string(count) + " < " + std::to_string(num_required)); } return; } if(solution) { throw mmx::invalid_solution("invalid type"); } else { throw mmx::invalid_solution("missing"); } } vnx::Variant MultiSig::read_field(const std::string& name) const { if(name == "owners") { std::vector tmp; for(const auto& entry : owners) { tmp.push_back(entry.to_string()); } return vnx::Variant(tmp); } return Super::read_field(name); } } // contract } // mmx ================================================ FILE: src/contract/PubKey.cpp ================================================ /* * PubKey.cpp * * Created on: Dec 10, 2021 * Author: mad */ #include #include #include #include #include namespace mmx { namespace contract { vnx::bool_t PubKey::is_valid() const { return Super::is_valid() && address != addr_t(); } hash_t PubKey::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "address", address); out.flush(); return hash_t(buffer); } uint64_t PubKey::num_bytes() const { return Super::num_bytes() + 32; } vnx::optional PubKey::get_owner() const { return address; } void PubKey::validate(std::shared_ptr solution, const hash_t& txid) const { if(auto sol = std::dynamic_pointer_cast(solution)) { const auto sol_address = sol->pubkey.get_addr(); if(sol_address != address) { throw mmx::invalid_solution("wrong public key: " + sol_address.to_string() + " != " + address.to_string()); } if(!sol->signature.verify(sol->pubkey, txid)) { throw mmx::invalid_solution("invalid signature for " + address.to_string()); } return; } if(solution) { throw mmx::invalid_solution("invalid type"); } else { throw mmx::invalid_solution("missing"); } } vnx::Variant PubKey::read_field(const std::string& name) const { if(name == "address") { return vnx::Variant(address.to_string()); } return Super::read_field(name); } } // contract } // mmx ================================================ FILE: src/contract/TokenBase.cpp ================================================ /* * TokenBase.cpp * * Created on: Apr 25, 2022 * Author: mad */ #include #include #include namespace mmx { namespace contract { vnx::bool_t TokenBase::is_valid() const { return Super::is_valid() && name.size() <= 64 && symbol.size() <= 6 && symbol != "MMX" && symbol.find_first_of(" \n\t\r\b\f") == std::string::npos && decimals >= 0 && decimals <= 18 && is_json(meta_data); } hash_t TokenBase::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "name", name); write_field(out, "symbol", symbol); write_field(out, "decimals", decimals); write_field(out, "meta_data", meta_data); out.flush(); return hash_t(buffer); } uint64_t TokenBase::num_bytes() const { return Super::num_bytes() + name.size() + symbol.size() + get_num_bytes(meta_data); } } // contract } // mmx ================================================ FILE: src/contract/WebData.cpp ================================================ /* * WebData.cpp * * Created on: Jan 19, 2022 * Author: mad */ #include #include #include namespace mmx { namespace contract { vnx::bool_t WebData::is_valid() const { return Super::is_valid() && mime_type.size() <= 256; } hash_t WebData::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "mime_type", mime_type); write_field(out, "payload", payload); out.flush(); return hash_t(buffer); } uint64_t WebData::num_bytes() const { return Super::num_bytes() + mime_type.size() + payload.size(); } vnx::Variant WebData::read_field(const std::string& name) const { if(name == "payload") { return vnx::Variant(vnx::to_hex_string(payload.data(), payload.size(), false, false)); } return Super::read_field(name); } } // contract } // mmx ================================================ FILE: src/contract/crypto_horse_race.js ================================================ const FRACT_BITS = 64; const PRICE_ITERS = 20; const TRANSFER_EXPIRE = 360; // blocks var currency; var PRECISION = 1; // price increment var TOKEN_SCALE = 1; var activation_height; var wallets = {}; // user token balances var balance = []; // currency per horse function init(num_horses, currency_, precision, decimals, activation_height_) { for(var i = 0; i < num_horses; ++i) { push(balance, 0); } currency = bech32(currency_); activation_height = uint(activation_height_); for(var i = 0; i < precision; ++i) { PRECISION *= 10; } for(var i = 0; i < decimals; ++i) { TOKEN_SCALE *= 10; } } function calc_price(x) const public { x /= PRECISION; var y = x; for(var i = 0; i < PRICE_ITERS && y > 0; ++i) { y = ((y << FRACT_BITS) + (x << FRACT_BITS) / y) >> (FRACT_BITS + 1); } return y * PRECISION; } function get_price(index) const public { return calc_price(balance[index]); } function get_buy_price(index, amount) const public { return calc_price(balance[index] + uint(amount)); } function get_sell_price(index, amount) const public { return calc_price(balance[index] - ((uint(amount) * get_price(index)) / TOKEN_SCALE)); } function get_wallet(user) { assert(user, "invalid user"); var wallet = wallets[user]; if(!wallet) { wallet = {}; wallets[user] = wallet; } return wallet; } function get_wallet_balance(wallet, index) { var balance = wallet[index]; if(!balance) { balance = 0; } return balance; } function buy_horse(index) public payable { assert(index < size(balance), "no such horse"); assert(this.height >= activation_height, "not active yet"); assert(this.deposit.currency == currency, "wrong currency"); const price = get_buy_price(index, this.deposit.amount); const token_amount = (this.deposit.amount * TOKEN_SCALE) / price; const wallet = get_wallet(this.user); wallet[index] = get_wallet_balance(wallet, index) + token_amount; balance[index] += this.deposit.amount; } function sell_horse(index, amount) public { amount = uint(amount); assert(amount > 0); assert(index < size(balance), "no such horse"); const wallet = get_wallet(this.user); const wallet_balance = get_wallet_balance(wallet, index); assert(amount <= wallet_balance, "insufficient balance"); const price = get_sell_price(index, amount); const ret_amount = (amount * price) / TOKEN_SCALE; wallet[index] = wallet_balance - amount; balance[index] -= ret_amount; send(this.user, ret_amount, currency); } function transfer(target, amount, index) public { target = bech32(target); amount = uint(amount); assert(amount > 0); assert(index < size(balance), "no such horse"); const wallet = get_wallet(this.user); const wallet_balance = get_wallet_balance(wallet, index); assert(amount <= wallet_balance, "insufficient balance"); const target_wallet = get_wallet(target); assert(target_wallet, "no such wallet"); wallet[index] -= amount; target_wallet[index] = get_wallet_balance(target_wallet, index) + amount; } ================================================ FILE: src/contract/escrow.js ================================================ var source; var target; var agent; function init(source_, agent_, target_) { source = bech32(source_); target = bech32(target_); agent = bech32(agent_); } function deposit() public {} function unlock(currency) public { assert(this.user == agent, "invalid user"); if(!currency) { currency = bech32(); } else { currency = bech32(currency); } send(target, balance(currency), currency, "mmx_escrow_unlock"); } function cancel(currency) public { assert(this.user == agent, "invalid user"); if(!currency) { currency = bech32(); } else { currency = bech32(currency); } send(source, balance(currency), currency, "mmx_escrow_revoke"); } ================================================ FILE: src/contract/fixed_price_liquid_token.js ================================================ const FRACT_BITS = 64; const RATIO_DIVIDER = 1000; var owner; var price; var ratio; // withdraw ratio (0 to 1000) var currency; var owner_balance = 0; function init(owner_, price_, currency_, ratio_) { owner = bech32(owner_); price = uint(price_); ratio = uint(ratio_); currency = bech32(currency_); assert(price > 0); assert(ratio < RATIO_DIVIDER); } function check_owner() { assert(this.user == owner, "user not owner", 1); } function buy() public payable { assert(this.deposit.currency == currency, "wrong currency", 2); owner_balance += (this.deposit.amount * ratio) / RATIO_DIVIDER; mint(this.user, (this.deposit.amount * price) >> FRACT_BITS); } function sell() public payable { assert(this.deposit.currency == this.address, "wrong token", 2); var ask_amount = (this.deposit.amount << FRACT_BITS) / price; ask_amount = (ask_amount * (RATIO_DIVIDER - ratio)) / RATIO_DIVIDER; send(this.user, ask_amount, currency); send(bech32(), this.deposit.amount, this.address); } function withdraw(amount) public { check_owner(); if(!amount) { amount = owner_balance; } else { amount = uint(amount); } assert(amount <= owner_balance); owner_balance -= amount; send(owner, amount, currency); } function recover(amount, currency) public { check_owner(); send(owner, uint(amount), bech32(currency), "mmx_token_recover"); } function transfer(owner_) public { check_owner(); owner = bech32(owner_); } ================================================ FILE: src/contract/fixed_price_token.js ================================================ const FRACT_BITS = 64; var owner; var price; var currency; function init(owner_, price_, currency_) { owner = bech32(owner_); price = uint(price_); currency = bech32(currency_); } function check_owner() { assert(this.user == owner, "user not owner", 1); } function buy() public payable { assert(this.deposit.currency == currency, "wrong currency", 2); mint(this.user, (this.deposit.amount * price) >> FRACT_BITS); } function withdraw(amount) public { check_owner(); if(!amount) { amount = balance(currency); } else { amount = uint(amount); } send(owner, amount, currency); } function recover(amount, currency) public { check_owner(); send(owner, uint(amount), bech32(currency), "mmx_token_recover"); } function transfer(owner_) public { check_owner(); owner = bech32(owner_); } ================================================ FILE: src/contract/method_t.cpp ================================================ /* * method_t.cpp * * Created on: May 15, 2022 * Author: mad */ #include namespace mmx { namespace contract { uint64_t method_t::num_bytes() const { uint64_t payload = 3 + 4 + 4 * 3 + name.size() + info.size() + args.size() * 4; for(const auto& entry : args) { payload += entry.size(); } return payload; } } // contract } // mmx ================================================ FILE: src/contract/nft.js ================================================ var serial; var creator; var mint_height; interface template; function init(creator_) { assert(read("decimals") == 0, "decimals not zero"); creator = bech32(creator_); } function init_n(creator_key, serial_, signature) static { assert(read("decimals") == 0, "decimals not zero"); creator_key = binary_hex(creator_key); serial = uint(serial_); creator = sha256(creator_key); template.add(serial, creator_key, binary_hex(signature)); } function mint_to(address, memo) public { assert(this.user == creator, "invalid user", 1); assert(!is_minted(), "already minted", 2); mint_height = this.height; if(memo == null) { memo = "mmx_nft_mint"; } else if(memo == false) { memo = null; } mint(bech32(address), 1, memo); } function get_creator() const public { return creator; } function is_minted() const public { return mint_height != null; } function get_mint_height() const public { return mint_height; } ================================================ FILE: src/contract/nft_offer.js ================================================ const FRACT_BITS = 64; const UPDATE_INTERVAL = 1080; var owner; var partner; // optional var nft_contract; var ask_currency; var price; var last_update; // height function init(owner_, nft_contract_, ask_currency_, price_, partner_) { owner = bech32(owner_); nft_contract = bech32(nft_contract_); ask_currency = bech32(ask_currency_); price = uint(price_); assert(price > 0); assert(nft_contract != ask_currency); if(partner_) { partner = bech32(partner_); } last_update = this.height; } function check_owner() { assert(this.user == owner, "user not owner", 1); } function check_partner() { if(partner) { assert(this.user == partner, "user not partner", 2); } } function deposit() public { check_owner(); } function cancel() public { check_owner(); send(owner, balance(nft_contract), nft_contract, "mmx_offer_cancel"); } function recover(amount, currency) public { check_owner(); send(owner, uint(amount), bech32(currency), "mmx_offer_recover"); } function set_price(new_price) public { check_owner(); assert(this.height - last_update >= UPDATE_INTERVAL, "update too soon", 7); new_price = uint(new_price); assert(new_price > 0); if(new_price != price) { price = new_price; last_update = this.height; } } function accept(dst_addr, price_) public payable { check_partner(); assert(uint(price_) == price, "price changed", 6); assert(balance(nft_contract) >= 1, "empty offer", 5); assert(this.deposit.currency == ask_currency, "currency mismatch", 3); assert(this.deposit.amount == price, "invalid bid amount", 4); send(owner, price, ask_currency, "mmx_offer_proceeds"); send(bech32(dst_addr), 1, nft_contract, "mmx_offer_accept"); } ================================================ FILE: src/contract/offer.js ================================================ const FRACT_BITS = 64; const UPDATE_INTERVAL = 1080; var owner; var partner; // optional var bid_currency; var ask_currency; var inv_price; // [bid / ask] var last_update; // height function init(owner_, bid_currency_, ask_currency_, inv_price_, partner_) { owner = bech32(owner_); bid_currency = bech32(bid_currency_); ask_currency = bech32(ask_currency_); inv_price = uint(inv_price_); assert(inv_price > 0); assert(bid_currency != ask_currency); if(partner_) { partner = bech32(partner_); } last_update = this.height; } function check_owner() { assert(this.user == owner, "user not owner", 1); } function check_partner() { if(partner) { assert(this.user == partner, "user not partner", 2); } } function deposit() public { check_owner(); } function cancel() public { check_owner(); send(owner, balance(bid_currency), bid_currency, "mmx_offer_cancel"); } function withdraw() public { check_owner(); send(owner, balance(ask_currency), ask_currency, "mmx_offer_withdraw"); } function recover(amount, currency) public { check_owner(); send(owner, uint(amount), bech32(currency), "mmx_offer_recover"); } function set_price(new_price) public { check_owner(); assert(this.height - last_update >= UPDATE_INTERVAL, "update too soon", 7); new_price = uint(new_price); assert(new_price > 0); if(new_price != inv_price) { inv_price = new_price; last_update = this.height; } } function trade(dst_addr, price) public payable { check_partner(); assert(uint(price) == inv_price, "price changed", 6); assert(this.deposit.currency == ask_currency, "currency mismatch", 3); const bid_amount = (this.deposit.amount * inv_price) >> FRACT_BITS; assert(bid_amount > 0, "empty trade", 4); send(bech32(dst_addr), bid_amount, bid_currency, "mmx_offer_trade"); } function accept(dst_addr, price) public payable { check_partner(); assert(uint(price) == inv_price, "price changed", 6); assert(this.deposit.currency == ask_currency, "currency mismatch", 3); // take whatever is left in case another trade happened before const bid_amount = min((this.deposit.amount * inv_price) >> FRACT_BITS, balance(bid_currency)); assert(bid_amount > 0, "empty offer", 5); const ask_amount = ((bid_amount << FRACT_BITS) + inv_price - 1) / inv_price; // round up const ret_amount = this.deposit.amount - ask_amount; // will fail on underflow dst_addr = bech32(dst_addr); send(dst_addr, bid_amount, bid_currency, "mmx_offer_accept"); send(dst_addr, ret_amount, ask_currency, "mmx_offer_accept_return"); } ================================================ FILE: src/contract/plot_nft.js ================================================ const UNLOCK_DELAY = 256; var owner; var target; var unlock_height = 0; var server_url; function init(owner_) { owner = bech32(owner_); } function check_owner() const { assert(this.user == owner, "user not owner", 1); } function is_locked() const public { var res = (unlock_height == null); if(!res) { res = (this.height < unlock_height); } return res; } function mmx_reward_target(farmer) const public { var addr = owner; if(is_locked()) { addr = target; } else if(farmer) { addr = bech32(farmer); } return string_bech32(addr); } function lock(target_, server_url_) public { check_owner(); assert(!is_locked(), "contract still locked", 2); target = bech32(target_); server_url = server_url_; unlock_height = null; } function unlock() public { check_owner(); if(unlock_height == null) { unlock_height = this.height + UNLOCK_DELAY; } } function claim_all(currency) public { if(is_locked()) { assert(this.user == target, "user not target", 3); } else { check_owner(); } if(currency) { currency = bech32(currency); } else { currency = bech32(); } send(this.user, balance(currency), currency, "mmx_plot_nft_claim"); } function transfer(owner_) public { check_owner(); owner = bech32(owner_); } function set_server_url(server_url_) public { check_owner(); server_url = server_url_; } ================================================ FILE: src/contract/poker.js ================================================ import {equals, sort, reverse, compare} from "std"; // Poker Hand Ranking: // 0 - High Card // 1 - One Pair // 2 - Two Pair // 3 - Three of a Kind // 4 - Ace Low Straight // 5 - Straight // 6 - Flush // 7 - Full House // 8 - Four of a Kind // 9 - Ace Low Straight Flush // 10 - Straight Flush // Poker Suits: // H - Hearts // D - Diamonds // C - Clubs // S - Spades var currency; var blind_bet; var bet_limit; var max_players; var timeout_interval; var num_reveals = 0; var num_actions = 0; var deadline = null; var round = 0; var state = 0; // 0 - waiting for players, 1 - revealing, 2 - betting, 3 - showdown, 4 - finished var sequence = 1; var bet_amount = 0; var is_raise = false; var player_map = {}; var player_list = []; var board = null; var final_pot = null; var global_seed = null; var winning_hand = null; var winning_players = null; function init(currency_, blind_bet_, bet_limit_, max_players_, timeout_) { currency = bech32(currency_); blind_bet = uint(blind_bet_); bet_limit = uint(bet_limit_) * blind_bet; max_players = uint(max_players_); timeout_interval = uint(timeout_); assert(max_players >= 2); assert(timeout_interval >= 6); } function join(name, commit, private_commit) public payable { assert(state == 0, "game already started"); assert(!is_timeout(), "too late"); const num_players = size(player_list); assert(num_players < max_players, "table full"); assert(this.user, "missing user"); assert(this.deposit.currency == currency, "invalid currency"); assert(this.deposit.amount == blind_bet, "invalid deposit amount"); commit = binary_hex(commit); private_commit = binary_hex(private_commit); assert(size(commit) == 32, "invalid commit"); assert(size(private_commit) == 32, "invalid private commit"); assert(is_string(name) && size(name) > 1 && size(name) <= 24, "invalid name"); assert(!player_map[this.user], "already joined"); const player = { name: name, address: this.user, step: 0, bet: blind_bet, seed: [], commit: commit, private_commit: private_commit, }; if(num_players == 1) { extend_deadline(3); } player_map[this.user] = num_players; push(player_list, player); check_start(); } function check_start() { if(state == 0) { const num_players = size(player_list); if(num_players > 1) { if(num_players >= max_players || is_timeout()) { state = 1; // revealing extend_deadline(); } } } } function reveal(seed, next_commit) public { check_start(); check_action(); assert(state == 1, "wrong state"); assert(!is_timeout(), "too late"); assert(size(seed) == 32, "invalid seed length"); const player = get_player(this.user, true); assert(size(player.seed) == round, "already revealed"); assert(sha256(seed) == player.commit, "invalid seed"); if(round < 4) { next_commit = binary_hex(next_commit); assert(size(next_commit) == 32, "invalid commit"); player.commit = next_commit; } else { player.commit = null; } push(player.seed, seed); num_reveals++; check_reveal(); } function bet() public { check_reveal(); assert(state == 2, "wrong state"); assert(!is_timeout(), "too late"); assert(this.deposit.currency == currency, "invalid currency"); const player = get_player(this.user, true); assert(sequence > player.step, "duplicate action"); player.bet += this.deposit.amount; assert(player.bet <= bet_limit, "bet limit exceeded"); if(player.bet > bet_amount) { is_raise = true; bet_amount = player.bet; } player.step = sequence; num_actions++; check_action(); } function check(auto_fold) public { check_reveal(); assert(state == 2, "wrong state"); assert(!is_timeout(), "too late"); const player = get_player(this.user, true); assert(sequence > player.step, "duplicate action"); if(is_raise && auto_fold) { player.fold = true; } player.step = sequence; num_actions++; check_action(); } function fold() public { check_reveal(); assert(state == 2, "wrong state"); assert(!is_timeout(), "too late"); const player = get_player(this.user, true); assert(sequence > player.step, "duplicate action"); player.fold = true; player.step = sequence; num_actions++; check_action(); } function show(hand, private_seed) public { check_action(); assert(state == 3, "wrong state"); assert(!is_timeout(), "too late"); assert(size(hand) == 5, "invalid hand"); assert(size(private_seed) == 32, "invalid seed length"); const player = get_player(this.user, true); assert(!player.private_seed, "already shown"); assert(sha256(private_seed) == player.private_commit, "invalid private seed"); player.private_seed = private_seed; const source = sha256(concat(global_seed, private_seed)); const pocket = [ get_card(memcpy(source, 8, 0)), get_card(memcpy(source, 8, 8)) ]; const all_cards = concat(board, pocket); const cards = []; for(const i of hand) { assert(i < 7, "invalid card index"); push(cards, all_cards[i]); } const rank = get_rank(cards); if(winning_hand) { const res = check_win(rank, winning_hand); if(res == "GT") { winning_hand = rank; winning_players = [player]; } else if(res == "EQ") { push(winning_players, player); } } else { winning_hand = rank; winning_players = [player]; } num_reveals++; } function claim() public { check_start(); // handle total timeout check_finish(); assert(state == 4, "wrong state"); var user = null; var amount = 0; if(winning_players) { for(const player of winning_players) { if(this.user == player.address) { user = player; } } amount = final_pot / size(winning_players); } else { const active = get_active(); const num_active = size(active); if(num_active > 0) { // nobody showed their hand, split the pot among remaining players for(const player of active) { if(this.user == player.address) { user = player; } } amount = final_pot / num_active; } else { // everybody folded or timed out, return bets to each player user = get_player(this.user); amount = user.bet; } } assert(user, "cannot claim"); assert(!user.claim, "already claimed"); send(this.user, amount, currency, "poker_win"); user.claim = true; } function is_timeout() const public { if(deadline) { return this.height >= deadline; } return false; } function extend_deadline(factor = 1) { deadline = this.height + factor * timeout_interval; } function get_player(address, active_only = false) const public { const index = player_map[address]; assert(index != null, "not a player"); const player = player_list[index]; if(active_only) { assert(is_active(player), "player folded or timed out"); } return player; } function is_active(player) const public { if(player.fold) { return false; } var curr_round = round; if(state == 1 && is_timeout()) { curr_round++; } return size(player.seed) >= curr_round; } function get_active() const public { const active = []; for(const player of player_list) { if(is_active(player)) { push(active, player); } } return active; } function get_num_active() const public { var count = 0; for(const player of player_list) { if(is_active(player)) { count++; } } return count; } function check_reveal() { if(state == 1) { if(num_reveals == get_num_active() || is_timeout()) { round++; state = 2; // betting num_reveals = 0; extend_deadline(); } } } function check_action() { if(state == 2) { if(num_actions == get_num_active() || is_timeout()) { var done = true; if(bet_amount) { for(const player of get_active()) { if(player.bet < bet_amount) { if(is_raise) { done = false; } else { player.fold = true; } } } } if(done) { bet_amount = 0; if(round < 4) { state = 1; // revealing } else { state = 3; // showdown compute(); } } is_raise = false; sequence++; num_actions = 0; extend_deadline(); } } } function check_finish() { if(state == 0 || final_pot) { return; } const num_active = get_num_active(); if(state == 3 || num_active == 0) { if(num_reveals == num_active || is_timeout()) { final_pot = balance(currency); state = 4; // finished } } } // Function to leave the table if nobody else joined function leave() public { assert(state == 0, "game already started"); assert(is_timeout(), "too early"); assert(size(player_list) == 1, "cannot leave table"); const player = get_player(this.user); send(this.user, player.bet, currency); player_map = {}; player_list = []; } // Function to get the rank of a poker hand (5 cards) // @param hand - array of array representing the poker hand // @return - array with the rank and sorted values of the hand // // Example: // hand = [["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"], ["6", "H"]] // return => [5, [4, 3, 2, 1, 0]] function get_rank(hand) const public { assert(size(hand) == 5, "hand must be 5 cards"); const RANK_MAP = { "2": 0, "3": 1, "4": 2, "5": 3, "6": 4, "7": 5, "8": 6, "9": 7, "10": 8, "T": 8, "J": 9, "Q": 10, "K": 11, "A": 12 }; var values = []; var suit_map = {"H": 0, "D": 0, "C": 0, "S": 0}; for(const card of hand) { const rank = RANK_MAP[card[0]]; assert(rank != null, "invalid card number"); assert(suit_map[card[1]] != null, "invalid card suit"); push(values, rank); suit_map[card[1]]++; } values = reverse(sort(values)); var unique_values = []; // sorted as well (DSC) { var prev = null; for(const v of values) { if(v != prev) { push(unique_values, v); prev = v; } } } var straight = false; if(size(unique_values) == 5) { straight = (unique_values[0] - unique_values[4] == 4); } const low_straight = equals(unique_values, [12, 3, 2, 1, 0]); var flush = false; for(const suit of ["H", "D", "C", "S"]) { if(suit_map[suit] == 5) { flush = true; } } var count = []; for(var i = 0; i <= 12; i++) { push(count, 0); } for(const v of values) { count[v]++; } var pairs = 0; var threes = 0; var fours = 0; for(const v of unique_values) { if(count[v] == 2) pairs++; if(count[v] == 3) threes++; if(count[v] == 4) fours++; } if(flush && straight) return [10, values]; // Straight Flush if(flush && low_straight) return [9, values]; // Ace Low Straight Flush if(fours) return [8, values]; // Four of a kind if(threes && pairs) return [7, values]; // Full House if(flush) return [6, values]; // Flush if(straight) return [5, values]; // Straight if(low_straight) return [4, values]; // Ace Low Straight if(threes) return [3, values]; // Three of a kind if(pairs == 2) return [2, values]; // Two Pair if(pairs == 1) return [1, values]; // One Pair return [0, values]; // High Card } // Function to compare two poker hands // @param hand - first poker hand (array of array) // @param other - second poker hand (array of array) // @return - "GT" if hand wins, "LT" if other wins, "EQ" if tie function check_win(hand, other) const public { const L = get_rank(hand); const R = get_rank(other); const res = compare(L[0], R[0]); if(res == "EQ") { return compare(L[1], R[1]); } return res; } // Returns a random card based on a seed integer // @return - array with rank and suit of the card function get_card(seed) const public { seed = uint(seed); const RANK_MAP = ["2", "3", "4", "5", "6", "7", "8", "9", "T", "J", "Q", "K", "A"]; const SUIT_MAP = ["H", "D", "C", "S"]; return [RANK_MAP[seed % 13], SUIT_MAP[(seed / 13) % 4]]; } function compute() public { if(board) { return board; } assert(state == 3, "wrong state"); const seed_list = ["", "", "", ""]; for(const player of player_list) { for(var i = 0; i < size(player.seed) && i < 4; i++) { seed_list[i] = concat(seed_list[i], player.seed[i]); } } const source = []; for(var i = 0; i < 4; i++) { var hash = sha256(seed_list[i]); if(i > 0) { hash = sha256(concat(source[i - 1], hash)); } push(source, hash); } global_seed = source[0]; board = [ get_card(memcpy(source[1], 8, 0)), get_card(memcpy(source[1], 8, 8)), get_card(memcpy(source[1], 8, 16)), get_card(memcpy(source[2], 8, 0)), get_card(memcpy(source[3], 8, 0)) ]; } ================================================ FILE: src/contract/relay.js ================================================ var owner; var transfer_target; function init(owner_) { owner = bech32(owner_); } function claim_all(currency) public { assert(this.user == owner, "user not owner", 1); if(!currency) { currency = bech32(); } else { currency = bech32(currency); } send(owner, balance(currency), currency); } function transfer(new_owner) public { assert(this.user == owner, "user not owner", 1); transfer_target = bech32(new_owner); } function complete() public { assert(transfer_target, "no pending transfer"); assert(this.user == transfer_target, "user not target"); owner = transfer_target; transfer_target = null; } ================================================ FILE: src/contract/smart_wallet.js ================================================ var owner; var plans = {}; function init(owner_) { owner = bech32(owner_); } function check_owner() { assert(this.user == owner, "user not owner", 1); } function transfer(address, amount, currency, memo) public { check_owner(); send(bech32(address), uint(amount), bech32(currency), memo); } function add_plan(name, amount, currency, target, memo, interval, start) public { check_owner(); const prev = plans[name]; if(prev) { assert(!prev.active, "plan already exists", 2); } if(memo != null) { memo = to_string(memo); } if(start == null) { start = this.height; } plans[name] = { amount: amount, currency: bech32(currency), target: bech32(target), memo: memo, interval: interval, next_pay: start, active: true }; } function cancel_plan(name) public { check_owner(); const plan = plans[name]; assert(plan, "no such plan", 3); plan.active = false; } function plan_payment(name) public { const plan = plans[name]; assert(plan, "no such plan", 3); assert(plan.active, "plan has been canceled", 4); assert(this.height >= plan.next_pay, "payment too soon", 5); plan.next_pay += plan.interval; send(plan.target, plan.amount, plan.currency, plan.memo); } ================================================ FILE: src/contract/swap.js ================================================ const FRACT_BITS = 64; const LOCK_DURATION = 8640; // 24 hours const fee_rates = [ 9223372036854776, // 0.0005 46116860184273879, // 0.0025 184467440737095516, // 0.01 922337203685477581, // 0.05 ]; var tokens; var state = []; var volume = [0, 0]; var users = {}; // common variables: // `i`: index of deposited token, 0 = token, 1 = currency // `k`: index of token to be traded for, the opposite of `i` ((i == 0 && k == 1) || (i == 1 && k == 0)) function init(token, currency) { tokens = [bech32(token), bech32(currency)]; assert(tokens[0] != tokens[1]); for(const fee_rate of fee_rates) { var out = {}; out.balance = [0, 0]; out.user_total = [0, 0]; out.fee_rate = fee_rate; out.fees_paid = [0, 0]; out.fees_claimed = [0, 0]; push(state, out); } } function _get_earned_fees(user) const { const entry = state[user.pool_idx]; const user_share = [0, 0]; for(var i = 0; i < 2; ++i) { if(user.balance[i] > 0) { const total_fees = entry.fees_paid[i] - user.last_fees_paid[i]; if(total_fees > 0) { user_share[i] = min( (2 * total_fees * user.balance[i]) / (entry.user_total[i] + user.last_user_total[i]), entry.fees_paid[i] - entry.fees_claimed[i]); } } } return user_share; } function get_earned_fees(address) const public { const user = users[bech32(address)]; assert(user); return _get_earned_fees(user); } function _payout(user) { const entry = state[user.pool_idx]; const user_share = _get_earned_fees(user); for(var i = 0; i < 2; ++i) { const amount = user_share[i]; if(amount > 0) { entry.fees_claimed[i] += amount; send(this.user, amount, tokens[i], "mmx_swap_payout"); } user.last_fees_paid[i] = entry.fees_paid[i]; user.last_user_total[i] = entry.user_total[i]; } return user_share; } function payout() public { const user = users[this.user]; assert(user); return _payout(user); } function _add_liquid(i, pool_idx, amount) { assert(i < 2); assert(pool_idx < size(state)); const entry = state[pool_idx]; var user = users[this.user]; if(user == null) { user = {}; user.pool_idx = pool_idx; user.balance = [0, 0]; user.last_fees_paid = [0, 0]; user.last_user_total = [0, 0]; users[this.user] = user; } else { if(user.balance[0] > 0 || user.balance[1] > 0) { assert(pool_idx == user.pool_idx, "pool_idx mismatch"); // need to payout now, to avoid fee stealing _payout(user); } user.pool_idx = pool_idx; } entry.balance[i] += amount; entry.user_total[i] += amount; for(var k = 0; k < 2; ++k) { user.last_fees_paid[k] = entry.fees_paid[k]; user.last_user_total[k] = entry.user_total[k]; } user.balance[i] += amount; user.unlock_height = this.height + LOCK_DURATION; } function add_liquid(i, pool_idx) public payable { assert(i < 2); assert(this.deposit.currency == tokens[i]); _add_liquid(i, pool_idx, this.deposit.amount); } function _rem_liquid(user, i, amount, do_send = true) { assert(i < 2); const k = (i + 1) % 2; const entry = state[user.pool_idx]; const balance = entry.balance; const user_total = entry.user_total; var ret_amount = (balance[i] * amount) / user_total[i]; var trade_amount = 0; if(balance[i] < user_total[i]) { if(balance[k] > user_total[k]) { // token k was bought trade_amount = ((balance[k] - user_total[k]) * amount) / user_total[i]; } } else if(balance[k] < user_total[k]) { // no trade happened ret_amount = amount; } if(ret_amount > 0) { if(do_send) { send(this.user, ret_amount, tokens[i], "mmx_swap_rem_liquid"); } balance[i] -= ret_amount; } if(trade_amount > 0) { if(do_send) { send(this.user, trade_amount, tokens[k], "mmx_swap_rem_liquid_trade"); } balance[k] -= trade_amount; } user.balance[i] -= amount; user_total[i] -= amount; const out = [0, 0]; out[i] = ret_amount; out[k] = trade_amount; return out; } function rem_liquid(i, amount, dry_run = false) public { assert(i < 2); amount = uint(amount); assert(amount); const user = users[this.user]; assert(user); if(!dry_run) { assert(this.height >= user.unlock_height, "liquidity still locked", 3); } assert(amount <= user.balance[i], "amount > user balance", 4); return _rem_liquid(user, i, amount, !dry_run); } function rem_all_liquid(dry_run = false) public { const user = users[this.user]; assert(user); _payout(user); const out = [0, 0]; for(var i = 0; i < 2; ++i) { const amount = user.balance[i]; if(amount > 0) { const ret = rem_liquid(i, amount, dry_run); for(var k = 0; k < 2; ++k) { out[k] += ret[k]; } } } return out; } function switch_pool(pool_idx) public { assert(pool_idx < size(state)); const user = users[this.user]; assert(user); assert(this.height >= user.unlock_height, "liquidity still locked", 3); _payout(user); const new_amount = [0, 0]; for(var i = 0; i < 2; ++i) { const amount = user.balance[i]; if(amount > 0) { const ret = _rem_liquid(user, i, amount, false); new_amount[0] += ret[0]; new_amount[1] += ret[1]; } } for(var i = 0; i < 2; ++i) { if(new_amount[i] > 0) { _add_liquid(i, pool_idx, new_amount[i]); } } return new_amount; } function get_total_balance() public const { const total = [0, 0]; for(const entry of state) { total[0] += entry.balance[0]; total[1] += entry.balance[1]; } return total; } function trade(i, address, min_trade, num_iter) public payable { assert(i < 2); assert(num_iter > 0); assert(this.deposit.currency == tokens[i]); const k = (i + 1) % 2; const amount = this.deposit.amount; const chunk_size = (amount + num_iter - 1) / num_iter; const out = [0, 0]; var amount_left = amount; var total_actual_amount = 0; for(var iter = 0; iter < num_iter && amount_left > 0; ++iter) { const amount_i = min(chunk_size, amount_left); var entry; var fee_amount_i = 0; var trade_amount_i = 0; var actual_amount_i = 0; for(const entry_j of state) { const balance = entry_j.balance; if(balance[k] > 0) { const trade_amount = balance[k] - (balance[i] * balance[k]) / (balance[i] + amount_i); const fee_amount = min(((trade_amount * entry_j.fee_rate) >> FRACT_BITS) + 1, trade_amount); const actual_amount = trade_amount - fee_amount; if(actual_amount > actual_amount_i) { entry = entry_j; fee_amount_i = fee_amount; trade_amount_i = trade_amount; actual_amount_i = actual_amount; } } } if(entry) { total_actual_amount += actual_amount_i; out[0] += trade_amount_i; out[1] += fee_amount_i; volume[k] += trade_amount_i; entry.balance[i] += amount_i; entry.balance[k] -= trade_amount_i; entry.fees_paid[k] += fee_amount_i; amount_left -= amount_i; } } assert(amount_left == 0); if(min_trade) { assert(total_actual_amount >= uint(min_trade), "minimum trade amount not reached", 7); } assert(total_actual_amount > 0, "empty trade", 7); send(bech32(address), total_actual_amount, tokens[k], "mmx_swap_trade"); return out; } ================================================ FILE: src/contract/template.js ================================================ var creator; var nfts = {}; function init(creator_) { creator = bech32(creator_); } function add(serial, creator_key, signature) public { assert(this.user); assert(is_uint(serial)); assert(serial > 0); assert(nfts[serial] == null, "already minted", 2); assert(sha256(creator_key) == creator, "invalid creator", 3); const msg = concat(string_bech32(this.address), "/", string(serial)); assert(ecdsa_verify(sha256(msg), creator_key, signature), "invalid signature", 4); nfts[serial] = this.user; } ================================================ FILE: src/contract/time_lock.js ================================================ var owner; var unlock_height; function init(owner_, unlock_height_) { owner = bech32(owner_); unlock_height = uint(unlock_height_); } function check_owner() const { assert(this.user == owner, "user not owner", 1); } function is_locked() const public { return this.height < unlock_height; } function deposit() public {} function withdraw(address, amount, currency) public { check_owner(); assert(!is_locked(), "still locked", 2); send(bech32(address), amount, bech32(currency)); } function set_unlock_height(height) public { check_owner(); assert(height >= unlock_height, "invalid height", 3); unlock_height = height; } ================================================ FILE: src/contract/token.js ================================================ var owner; function init(owner_) { owner = bech32(owner_); } function check_owner() { assert(this.user == owner, "user not owner", 1); } function mint_to(address, amount, memo) public { check_owner(); if(memo == null) { memo = "mmx_token_mint"; } else if(memo == false) { memo = null; } mint(bech32(address), uint(amount), memo); } function transfer(owner_) public { check_owner(); owner = bech32(owner_); } function recover(amount, currency) public { check_owner(); send(owner, uint(amount), bech32(currency), "mmx_token_recover"); } ================================================ FILE: src/contract/transfer.js ================================================ var source; var target; function init(source_, target_) { source = bech32(source_); target = bech32(target_); } function receive(currency) public { assert(this.user == target, "user not target", 1); currency = bech32(currency); send(target, balance(currency), currency); } function cancel(currency) public { assert(this.user == source, "user not source", 2); currency = bech32(currency); send(source, balance(currency), currency); } ================================================ FILE: src/contract/virtual_plot.js ================================================ const WITHDRAW_FACTOR = 90; var owner; function init(owner_) { owner = bech32(owner_); } function deposit() public {} function withdraw(amount, currency) public { if(this.user != owner) { fail("user != owner", 1); } amount = uint(amount); currency = bech32(currency); var ret_amount = amount; if(currency == bech32()) { ret_amount = (amount * WITHDRAW_FACTOR) / 100; } send(owner, ret_amount, currency, "mmx_virtual_plot_withdraw"); send(bech32(), amount - ret_amount, currency, "mmx_virtual_plot_burn"); } ================================================ FILE: src/exec_error_t.cpp ================================================ /* * exec_error_t.cpp * * Created on: Mar 22, 2023 * Author: mad */ #include #include namespace mmx { vnx::bool_t exec_error_t::is_valid() const { return message.size() <= MAX_MESSAGE_LENGTH; } hash_t exec_error_t::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "code", code); write_field(out, "address", address); write_field(out, "operation", operation); write_field(out, "line", line); write_field(out, "message", message); out.flush(); return hash_t(buffer); } } // mmx ================================================ FILE: src/exec_result_t.cpp ================================================ /* * exec_result_t.cpp * * Created on: Aug 23, 2022 * Author: mad */ #include #include #include namespace mmx { vnx::bool_t exec_result_t::is_valid() const { for(const auto& in : inputs) { if(in.memo && in.memo->size() > txio_t::MAX_MEMO_SIZE) { return false; } } for(const auto& out : outputs) { if(out.memo && out.memo->size() > txio_t::MAX_MEMO_SIZE) { return false; } } return !error || error->is_valid(); } hash_t exec_result_t::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "did_fail", did_fail); write_field(out, "total_cost", total_cost); write_field(out, "total_fee", total_fee); write_field(out, "inputs", inputs); write_field(out, "outputs", outputs); write_field(out, "error", error ? error->calc_hash() : hash_t()); out.flush(); return hash_t(buffer); } uint64_t exec_result_t::calc_cost(std::shared_ptr params) const { uint64_t cost = 0; for(const auto& in : inputs) { cost += in.calc_cost(params); } for(const auto& out : outputs) { cost += out.calc_cost(params); } return cost; } std::string exec_result_t::get_error_msg() const { if(did_fail) { if(error) { std::string code; if(error->code) { const auto name = error_code_e(error_code_e::enum_t(error->code)).to_string_value(); if(name != std::to_string(error->code)) { code = " (" + name + ")"; } else { code = " (code " + name + ")"; } } if(error->operation != 0xFFFFFFFF) { std::string location; if(error->address != 0xFFFFFFFF) { location = "exception at 0x" + vnx::to_hex_string(error->address); if(error->line) { location += ", line " + std::to_string(*error->line); } location += ": "; } return location + error->message + code + " (op " + std::to_string(error->operation) + ")"; } else { return error->message + code; } } return "tx failed"; } return std::string(); } } // mmx ================================================ FILE: src/fixed128.cpp ================================================ /* * fixed128.cpp * * Created on: Dec 15, 2022 * Author: mad */ #include #include #include #include namespace mmx { static uint64_t calc_divider(const int decimals) { uint64_t res = 1; for(int i = 0; i < decimals; ++i) { res *= 10; } return res; } const uint64_t fixed128::divider = calc_divider(fixed128::decimals); fixed128::fixed128(const double& v) { fixed = mmx::to_amount(v, decimals); } fixed128::fixed128(const uint128_t& value, const int decimals) { auto tmp = uint256_t(value) * divider; for(int i = 0; i < decimals; ++i) { tmp /= 10; } if(tmp.upper()) { throw std::logic_error("fixed128 overflow"); } fixed = tmp; } fixed128::fixed128(const std::string& str) { if(str.empty() || str.find_first_not_of("0123456789.,eE-") != std::string::npos) { throw std::logic_error("string is not a number: '" + str + "'"); } const auto dec_pos = str.find_first_of(".,"); const auto exp_pos = str.find_first_of("eE"); if(dec_pos != std::string::npos || exp_pos != std::string::npos) { const auto integer = str.substr(0, std::min(dec_pos, exp_pos)); if(integer.empty() || integer.find_first_not_of("0123456789") != std::string::npos) { throw std::logic_error("invalid integer part: '" + integer + "'"); } fixed = uint128_t(integer, 10); fixed *= divider; std::string fract; if(dec_pos != std::string::npos) { if(exp_pos != std::string::npos && exp_pos > dec_pos) { fract = str.substr(dec_pos + 1, exp_pos - dec_pos - 1); } else { fract = str.substr(dec_pos + 1); } fract.resize(std::min(fract.size(), decimals)); if(auto lower = uint128_t(fract, 10)) { for(int i = fract.size(); i < decimals; ++i) { lower *= 10; } fixed += lower; } } if(exp_pos != std::string::npos) { const auto exp_10 = vnx::from_string(str.substr(exp_pos + 1)); if(std::abs(exp_10) > decimals - int(fract.size())) { throw std::logic_error("out of range exponent: " + str.substr(exp_pos)); } if(exp_10 >= 0) { for(int i = 0; i < exp_10; ++i) { fixed *= 10; } } else { for(int i = exp_10; i < 0; ++i) { fixed /= 10; } } } } else { fixed = uint128_t(str, 10) * divider; } } std::string fixed128::to_string() const { auto str = uint().str(10); if(auto lower = fractional()) { str += '.'; auto fract = std::to_string(lower); for(int i = fract.size(); i < decimals; ++i) { str += '0'; } while(fract.size() && fract.back() == '0') { fract.pop_back(); } str += fract; } return str; } double fixed128::to_value() const { return uint().to_double() + double(fractional()) * pow(10, -decimals); } uint128 fixed128::to_amount(const int decimals) const { uint128 amount = fixed; if(decimals < fixed128::decimals) { for(int i = decimals; i < fixed128::decimals; ++i) { amount /= 10; } } else { for(int i = fixed128::decimals; i < decimals; ++i) { amount *= 10; } } return amount; } } // mmx namespace vnx { void read(vnx::TypeInput& in, mmx::fixed128& value, const vnx::TypeCode* type_code, const uint16_t* code) { switch(code[0]) { case CODE_STRING: case CODE_ALT_STRING: { std::string str; vnx::read(in, str, type_code, code); try { value = mmx::fixed128(str); } catch(...) { value = mmx::fixed128(); } break; } case CODE_UINT8: case CODE_UINT16: case CODE_UINT32: case CODE_UINT64: case CODE_ALT_UINT8: case CODE_ALT_UINT16: case CODE_ALT_UINT32: case CODE_ALT_UINT64: { uint64_t tmp = 0; vnx::read(in, tmp, type_code, code); value = mmx::fixed128(tmp); break; } case CODE_FLOAT: case CODE_DOUBLE: case CODE_ALT_FLOAT: case CODE_ALT_DOUBLE: { double tmp = 0; vnx::read(in, tmp, type_code, code); value = mmx::fixed128(tmp); break; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: { vnx::Variant tmp; vnx::read(in, tmp, type_code, code); value = tmp.to(); break; } default: vnx::read(in, value.fixed, type_code, code); } } } // vnx ================================================ FILE: src/hash_512_t.cpp ================================================ /* * hash_512_t.cpp * * Created on: Nov 13, 2023 * Author: mad */ #include #include #include namespace mmx { hash_512_t::hash_512_t(const void* data, const size_t num_bytes) { SHA512 hash; hash.Write((const uint8_t*)data, num_bytes); hash.Finalize(this->data()); } hash_512_t hash_512_t::random() { std::vector seed(4096); vnx::secure_random_bytes(seed.data(), seed.size()); return hash_512_t(seed); } } // mmx ================================================ FILE: src/hash_t.cpp ================================================ /* * hash_t.cpp * * Created on: Jan 6, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include namespace mmx { static const bytes_t<32> empty_hash("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); hash_t::hash_t(const void* data, const size_t num_bytes) { static const bool have_sha_ni = sha256_ni_available(); static const bool have_sha_arm = sha256_arm_available(); if(num_bytes == 0) { bytes = empty_hash.bytes; } else if(have_sha_ni) { sha256_ni(bytes.data(), (const uint8_t*)data, num_bytes); } else if(have_sha_arm) { sha256_arm(bytes.data(), (const uint8_t*)data, num_bytes); } else { vnx::SHA256 ctx; ctx.update((const uint8_t*)data, num_bytes); ctx.finalize(bytes.data()); } } hash_t hash_t::random() { hash_t out; vnx::secure_random_bytes(out.data(), out.size()); return out; } hash_t hash_t::secure_random() { uint256_t entropy = 0; static constexpr int BITS_PER_ITER = 4; for(int i = 0; i < 256 / BITS_PER_ITER; ++i) { entropy <<= BITS_PER_ITER; std::atomic_bool trigger {false}; std::thread timer([&trigger]() { std::this_thread::sleep_for(std::chrono::microseconds(10)); trigger = true; }); while(!trigger) { entropy++; } timer.join(); } const bytes_t<32> entropy_bytes(&entropy, sizeof(entropy)); bytes_t<128> rand_bytes; vnx::secure_random_bytes(rand_bytes.data(), rand_bytes.size()); return hash_t(entropy_bytes + rand_bytes); } } // mmx ================================================ FILE: src/hmac_sha512.cpp ================================================ // Copyright (c) 2014-2018 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include HMAC_SHA512::HMAC_SHA512(const unsigned char* key, size_t keylen) { unsigned char rkey[128]; if (keylen <= 128) { memcpy(rkey, key, keylen); memset(rkey + keylen, 0, 128 - keylen); } else { SHA512().Write(key, keylen).Finalize(rkey); memset(rkey + 64, 0, 64); } for (int n = 0; n < 128; n++) rkey[n] ^= 0x5c; outer.Write(rkey, 128); for (int n = 0; n < 128; n++) rkey[n] ^= 0x5c ^ 0x36; inner.Write(rkey, 128); } void HMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) { unsigned char temp[64]; inner.Finalize(temp); outer.Write(temp, 64).Finalize(hash); } ================================================ FILE: src/http_request.cpp ================================================ /* * http_request.cpp * * Created on: May 6, 2024 * Author: mad */ #include #include #include #include namespace mmx { void http_request_file(const std::string& url, const std::string& file_path, const std::string& options) { std::string curl_path; vnx::read_config("curl.path", curl_path); const std::string cmd = curl_path + "curl -s -m 100 " + options + " \"" + url + "\" -o \"" + file_path + "\""; if(std::system(cmd.c_str())) { throw std::runtime_error("curl request failed"); } } } // mmx ================================================ FILE: src/mmx.cpp ================================================ /* * mmx.cpp * * Created on: Dec 21, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include std::unordered_map> contract_cache; std::shared_ptr get_contract(mmx::NodeClient& node, const mmx::addr_t& address) { auto iter = contract_cache.find(address); if(iter == contract_cache.end()) { iter = contract_cache.emplace(address, node.get_contract(address)).first; } return iter->second; } std::shared_ptr get_token(mmx::NodeClient& node, const mmx::addr_t& address, bool fail = true) { auto token = std::dynamic_pointer_cast(get_contract(node, address)); if(!token && fail) { throw std::logic_error("no such token: " + address.to_string()); } return token; } void show_history(std::vector history, mmx::NodeClient& node, std::shared_ptr params) { std::reverse(history.begin(), history.end()); for(const auto& entry : history) { if(entry.is_pending) { std::cout << "[pending] "; } else { std::cout << "[" << entry.height << "] "; } std::string arrow = "->"; switch(entry.type) { case mmx::tx_type_e::SPEND: std::cout << "SPEND - "; arrow = "<-"; break; case mmx::tx_type_e::TXFEE: std::cout << "TXFEE - "; arrow = "<-"; break; case mmx::tx_type_e::RECEIVE: std::cout << "RECEIVE + "; break; case mmx::tx_type_e::REWARD: std::cout << "REWARD + "; break; case mmx::tx_type_e::VDF_REWARD: std::cout << "VDF_REWARD + "; break; case mmx::tx_type_e::PROJECT_REWARD: std::cout << "PROJECT_REWARD + "; break; default: std::cout << "???? "; break; } const auto currency = entry.contract; const auto contract = get_contract(node, currency); if(auto exe = std::dynamic_pointer_cast(contract)) { if(exe->binary == params->nft_binary) { std::cout << currency << " " << arrow << " " << entry.address << " (" << entry.txid << ")" << std::endl; continue; } } const auto token = std::dynamic_pointer_cast(contract); const auto decimals = token ? token->decimals : currency == mmx::addr_t() ? params->decimals : 0; const auto symbol = token ? token->symbol : currency == mmx::addr_t() ? std::string("MMX") : std::string("???"); std::cout << mmx::to_value(entry.amount, decimals) << " " << symbol << " (" << entry.amount << ") " << arrow << " " << entry.address << " TX(" << entry.txid << ")"; if(entry.memo) { std::cout << " M(" << *entry.memo << ")"; } std::cout << std::endl; } } void show_history_csv(std::vector history, mmx::NodeClient& node, std::shared_ptr params) { std::reverse(history.begin(), history.end()); std::cout << "Height,Type,Amount,Symbol,AmountRaw,InOut,Address,TX,UnixTS,DateTime,Memo" << std::endl; for(const auto& entry : history) { const auto currency = entry.contract; const auto contract = get_contract(node, currency); if(auto exe = std::dynamic_pointer_cast(contract)) { if(exe->binary == params->nft_binary) { continue; // ignore NFTs } } const auto token = std::dynamic_pointer_cast(contract); int decimals = 0; std::string symbol; if(token) { symbol = token->symbol; decimals = token->decimals; } else { if(currency == mmx::addr_t()) { symbol = "MMX"; decimals = params->decimals; } else { continue; // ignore non-tokens } } std::string in_out = "IN"; switch(entry.type) { case mmx::tx_type_e::SPEND: case mmx::tx_type_e::TXFEE: in_out = "OUT"; break; default: break; } if(entry.is_pending) { continue; } else { std::cout << entry.height; } std::cout << "," << entry.type.to_string_value() << ",\"" << mmx::to_value(entry.amount, decimals) << "\"" << "," << symbol << "," << entry.amount << "," << in_out << "," << entry.address << "," << entry.txid << "," << entry.time_stamp / 1000 << "," << vnx::get_date_string_ex("%Y-%m-%dT%H:%M", false, entry.time_stamp / 1000); std::cout << ",\"" << (entry.memo ? vnx::string_subs(*entry.memo, "\"", "\"\"") : "") << "\""; std::cout << std::endl; } } void print_tx(std::shared_ptr tx, mmx::NodeClient& node, std::shared_ptr params) { std::cout << "TX ID: " << tx->id << std::endl; std::cout << "Note: " << vnx::to_string_value(tx->note) << std::endl; std::cout << "Network: " << tx->network << std::endl; std::cout << "Expires: at height " << tx->expires << std::endl; std::cout << "Fee Ratio: " << tx->fee_ratio / 1024. << std::endl; std::cout << "Max Fee Amount: " << mmx::to_value(tx->max_fee_amount, params) << " MMX" << std::endl; std::cout << "Sender: " << vnx::to_string_value(tx->sender) << std::endl; { int i = 0; for(const auto& in : tx->inputs) { const auto token = get_token(node, in.contract); const auto decimals = token ? token->decimals : in.contract == mmx::addr_t() ? params->decimals : 0; const auto symbol = token ? token->symbol : in.contract == mmx::addr_t() ? std::string("MMX") : std::string("???"); std::cout << "Input[" << i++ << "]: " << mmx::to_value(in.amount, decimals) << " " << symbol << " [" << in.contract << "] from " << in.address << std::endl; if(in.memo) { std::cout << " Memo: " << vnx::to_string(in.memo) << std::endl; } } } { int i = 0; for(const auto& out : tx->outputs) { const auto token = get_token(node, out.contract); const auto decimals = token ? token->decimals : out.contract == mmx::addr_t() ? params->decimals : 0; const auto symbol = token ? token->symbol : out.contract == mmx::addr_t() ? std::string("MMX") : std::string("???"); std::cout << "Output[" << i++ << "]: " << mmx::to_value(out.amount, decimals) << " " << symbol << " [" << out.contract << "] to " << out.address << std::endl; if(out.memo) { std::cout << " Memo: " << vnx::to_string(out.memo) << std::endl; } } } { int i = 0; for(const auto& op : tx->execute) { std::cout << "Operation[" << i++ << "]: "; const auto exec = std::dynamic_pointer_cast(op); const auto deposit = std::dynamic_pointer_cast(op); if(deposit) { std::cout << "Deposit via " << deposit->method << "()" << std::endl; } else if(exec) { std::cout << "Execute " << exec->method << "()" << std::endl; } else { std::cout << "null" << std::endl; continue; } if(deposit) { const auto token = get_token(node, deposit->currency); const auto decimals = token ? token->decimals : deposit->currency == mmx::addr_t() ? params->decimals : 0; const auto symbol = token ? token->symbol : deposit->currency == mmx::addr_t() ? std::string("MMX") : std::string("???"); std::cout << " Amount: " << mmx::to_value(deposit->amount, decimals) << " " << symbol << " [" << deposit->currency << "]" << std::endl; } std::cout << " Contract: " << (op->address != mmx::addr_t() ? op->address.to_string() : std::string("")) << std::endl; std::cout << " User: " << vnx::to_string(exec->user) << std::endl; int k = 0; for(const auto& arg : exec->args) { std::cout << " Argument[" << k++ << "]: " << vnx::to_string(arg) << std::endl; } } } if(auto contract = tx->deploy) { std::cout << "Deploy: (see below)" << std::endl; vnx::PrettyPrinter print(std::cout); vnx::accept(print, contract); std::cout << std::endl; } } bool accept_prompt() { std::cout << "Accept (y): "; std::string input; std::getline(std::cin, input); if(input == "y") { return true; } std::cout << "Aborted" << std::endl; return false; } int main(int argc, char** argv) { mmx::secp256k1_init(); std::string mmx_home; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; } else if(auto path = ::getenv("HOME")) { mmx_home = path; mmx_home += "/.mmx/"; } std::map options; options["n"] = "node"; options["f"] = "file"; options["j"] = "index"; options["k"] = "offset"; options["a"] = "amount"; options["b"] = "ask-amount"; options["m"] = "memo"; options["s"] = "source"; options["t"] = "target"; options["x"] = "contract"; options["z"] = "ask-currency"; options["y"] = "yes"; options["r"] = "fee-ratio"; options["l"] = "gas-limit"; options["N"] = "limit"; options["v"] = "verbose"; options["o"] = "output"; options["node"] = "address"; options["file"] = "path"; options["index"] = "0..?"; options["offset"] = "0..?"; options["amount"] = "123.456"; options["source"] = "address"; options["target"] = "address"; options["contract"] = "address"; options["ask-currency"] = "address"; options["fee-ratio"] = "1"; options["gas-limit"] = "MMX"; options["min-amount"] = "0..1"; options["user"] = "mmx-admin"; options["passwd"] = "PASSWD"; options["mnemonic"] = "words"; options["output"] = "file name"; options["nonce"] = "value > 0"; vnx::write_config("log_level", 2); vnx::init("mmx", argc, argv, options); std::string module; std::string command; std::string file_name; std::string source_addr; std::string target_addr; std::string contract_addr; std::string ask_currency_addr; std::string user = "mmx-admin"; std::string passwd; vnx::optional memo; vnx::optional output; vnx::optional nonce; int64_t index = 0; int64_t offset = 0; int32_t limit = -1; mmx::fixed128 amount; mmx::fixed128 ask_amount; double fee_ratio = 1; double gas_limit = 5; double min_amount = 0.95; int verbose = 0; bool pre_accept = false; vnx::read_config("$1", module); vnx::read_config("$2", command); vnx::read_config("yes", pre_accept); vnx::read_config("file", file_name); vnx::read_config("index", index); vnx::read_config("offset", offset); const auto have_amount = vnx::read_config("amount", amount); const auto have_ask_amount = vnx::read_config("ask-amount", ask_amount); vnx::read_config("source", source_addr); vnx::read_config("target", target_addr); vnx::read_config("contract", contract_addr); vnx::read_config("ask-currency", ask_currency_addr); vnx::read_config("fee-ratio", fee_ratio); vnx::read_config("gas-limit", gas_limit); vnx::read_config("min-amount", min_amount); vnx::read_config("user", user); vnx::read_config("passwd", passwd); vnx::read_config("memo", memo); vnx::read_config("limit", limit); vnx::read_config("verbose", verbose); vnx::read_config("output", output); vnx::read_config("nonce", nonce); vnx::write_config("Proxy.no_retry", true); // exit on connect fail bool did_fail = false; auto params = mmx::get_params(); { auto token = mmx::contract::TokenBase::create(); token->decimals = params->decimals; token->symbol = "MMX"; contract_cache[mmx::addr_t()] = token; } if(passwd.empty()) { std::ifstream stream(mmx_home + "PASSWD"); stream >> passwd; } mmx::spend_options_t spend_options; spend_options.fee_ratio = fee_ratio * 1024; spend_options.gas_limit = mmx::to_amount(gas_limit, params); spend_options.memo = memo; spend_options.nonce = nonce; if(output) { spend_options.auto_send = false; spend_options.expire_at = -1; } mmx::NodeClient node("Node"); { vnx::Handle module = new vnx::addons::HttpClient("HttpClient"); module->connection_timeout_ms = 5000; module.start_detached(); } vnx::addons::HttpClientClient http("HttpClient"); mmx::addr_t source; mmx::addr_t target; mmx::addr_t contract; mmx::addr_t ask_currency; try { if(!source_addr.empty()) { source.from_string(source_addr); } } catch(std::exception& ex) { vnx::log_error() << "Invalid address: " << ex.what(); goto failed; } try { if(!target_addr.empty()) { target.from_string(target_addr); } } catch(std::exception& ex) { vnx::log_error() << "Invalid address: " << ex.what(); goto failed; } try { if(!contract_addr.empty()) { contract.from_string(contract_addr); } } catch(std::exception& ex) { vnx::log_error() << "Invalid address: " << ex.what(); goto failed; } try { if(!ask_currency_addr.empty()) { ask_currency.from_string(ask_currency_addr); } } catch(std::exception& ex) { vnx::log_error() << "Invalid address: " << ex.what(); goto failed; } try { if(module == "wallet") { std::string node_url = ":11335"; vnx::read_config("node", node_url); mmx::WalletClient wallet("Wallet"); std::shared_ptr tx; if(command != "create") { vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); proxy->forward_list = {"Wallet", "Node"}; proxy.start_detached(); { vnx::ProxyClient client(proxy.get_name()); client.login(user, passwd); } try { params = node.get_params(); } catch(...) { // ignore } if(index == 0) { const auto accounts = wallet.get_all_accounts(); if(!accounts.empty()) { index = accounts[0].account; } } } if(command == "show") { std::string subject; vnx::read_config("$3", subject); const auto config = wallet.get_account(index); if(config.with_passphrase) { std::cout << "Locked: " << (wallet.is_locked(index) ? "Yes" : "No") << std::endl; } if(subject.empty() || subject == "balance") { bool is_empty = true; std::vector nfts; for(const auto& entry : wallet.get_balances(index)) { const auto& balance = entry.second; const auto contract = get_contract(node, entry.first); if(auto exec = std::dynamic_pointer_cast(contract)) { if(exec->binary == params->nft_binary) { nfts.push_back(entry.first); continue; } } if(auto token = std::dynamic_pointer_cast(contract)) { std::cout << "Balance: " << mmx::to_value(balance.total, token->decimals) << " " << token->symbol << (balance.is_validated ? "" : "?") << " (Spendable: " << mmx::to_value(balance.spendable, token->decimals) << " " << token->symbol << (balance.is_validated ? "" : "?") << ")"; if(entry.first != mmx::addr_t()) { std::cout << " [" << entry.first << "]"; } std::cout << std::endl; is_empty = false; } } if(is_empty) { std::cout << "Balance: 0 MMX" << std::endl; } for(const auto& addr : nfts) { std::cout << "NFT: " << addr << std::endl; } } if(subject.empty() || subject == "contracts" || subject == "offers") { for(const auto& entry : wallet.get_contracts(index)) { const auto& address = entry.first; const auto& contract = entry.second; vnx::optional offer; if(auto exec = std::dynamic_pointer_cast(contract)) { if(exec->binary == params->offer_binary) { offer = node.get_offer(address); if(subject.empty() && offer && !offer->is_open()) { continue; } } else if(subject == "offers") { continue; } } else if(subject == "offers") { continue; } std::cout << "Contract: " << address << " (" << contract->get_type_name(); if(auto token = std::dynamic_pointer_cast(contract)) { if(!token->symbol.empty()) { std::cout << ", " << token->symbol; } if(!token->name.empty()) { std::cout << ", " << token->name; } } if(auto exec = std::dynamic_pointer_cast(contract)) { if(offer) { if(offer->is_open()) { std::cout << ", open offer"; } else { std::cout << ", closed offer"; } } } std::cout << ")" << std::endl; for(const auto& entry : wallet.get_total_balances({address})) { const auto& balance = entry.second; if(auto token = get_token(node, entry.first, false)) { std::cout << " Balance: " << to_value(balance.total, token->decimals) << " " << token->symbol << (balance.is_validated ? "" : "?") << " (" << balance.total << ")"; if(entry.first != mmx::addr_t()) { std::cout << " [" << entry.first << "]"; } std::cout << std::endl; } } if(offer && (offer->is_open() || subject == "offers")) { if(auto bid_token = get_token(node, offer->bid_currency, false)) { if(auto ask_token = get_token(node, offer->ask_currency, false)) { std::cout << " Price: " << offer->price << " " << ask_token->symbol << " / " << bid_token->symbol << std::endl; } } } } } for(int i = 0; i < 1; ++i) { std::cout << "Address[" << i << "]: " << wallet.get_address(index, i) << std::endl; } if(subject.empty()) { std::cout << "Help: mmx wallet show [balance | contracts | offers]" << std::endl; } } else if(command == "accounts") { for(const auto& entry : wallet.get_all_accounts()) { std::cout << "[" << entry.account << "] " << vnx::to_string_value(entry.address) << ": " << "name = '" << entry.name << "', index = " << entry.index << ", passphrase = " << (entry.with_passphrase ? "yes" : "no") << ", finger_print = " << entry.finger_print << ", num_addresses = " << entry.num_addresses << ", key_file = " << entry.key_file << std::endl; } } else if(command == "keys") { const auto keys = wallet.get_farmer_keys(index); std::cout << "Farmer Public Key: " << keys.second << std::endl; } else if(command == "get") { std::string subject; vnx::read_config("$3", subject); if(subject == "address") { int64_t offset = 0; vnx::read_config("$4", offset); std::cout << wallet.get_address(index, offset) << std::endl; } else if(subject == "amount") { std::cout << wallet.get_balance(index, contract).total << std::endl; } else if(subject == "balance") { const auto token = get_token(node, contract); std::cout << mmx::to_value(wallet.get_balance(index, contract).total, token ? token->decimals : params->decimals) << std::endl; } else if(subject == "contracts") { for(const auto& entry : wallet.get_contracts(index)) { std::cout << entry.first << std::endl; } } else if(subject == "seed") { std::cout << mmx::mnemonic::words_to_string(wallet.get_mnemonic_seed(index)) << std::endl; } else { std::cerr << "Help: mmx wallet get [address | balance | amount | contracts | seed]" << std::endl; } } else if(command == "send") { const auto token = get_token(node, contract); const auto mojo = mmx::to_amount(amount, token->decimals); if(!mojo) { vnx::log_error() << "Invalid amount: " << amount << " (-a | --amount)"; goto failed; } if(target == mmx::addr_t()) { vnx::log_error() << "Missing destination address argument: -t | --target"; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.send(index, mojo, target, contract, spend_options); std::cout << "Sent " << mmx::to_value(mojo, token->decimals) << " " << token->symbol << " (" << mojo << ") to " << target << std::endl; } else if(command == "send_from") { const auto token = get_token(node, contract); const auto mojo = mmx::to_amount(amount, token->decimals); if(!mojo) { vnx::log_error() << "Invalid amount: " << amount << " (-a | --amount)"; goto failed; } if(source == mmx::addr_t()) { vnx::log_error() << "Missing source address argument: -s | --source"; goto failed; } if(target == mmx::addr_t()) { vnx::log_error() << "Missing destination address argument: -t | --target"; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.send_from(index, mojo, target, source, contract, spend_options); std::cout << "Sent " << mmx::to_value(mojo, token->decimals) << " " << token->symbol << " (" << mojo << ") to " << target << std::endl; } else if(command == "transfer") { if(target == mmx::addr_t()) { vnx::log_error() << "Missing destination address argument: -t | --target"; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.send(index, 1, target, contract, spend_options); std::cout << "Sent " << contract << " to " << target << std::endl; } else if(command == "mint") { const auto token = get_token(node, contract); const auto mojo = mmx::to_amount(amount, token->decimals); if(!mojo) { vnx::log_error() << "Invalid amount: " << amount << " (-a | --amount)"; goto failed; } if(target == mmx::addr_t()) { vnx::log_error() << "Missing destination address argument: -t | --target"; goto failed; } if(!spend_options.user) { spend_options.user = to_addr(node.read_storage_field(contract, "owner").first); } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.execute(index, contract, "mint_to", {vnx::Variant(target.to_string()), mojo.to_var_arg(), vnx::Variant(memo)}, nullptr, spend_options); std::cout << "Minted " << mmx::to_value(mojo, token->decimals) << " (" << mojo << ") " << token->symbol << " to " << target << std::endl; } else if(command == "deploy") { std::string file_path; std::vector init_args; vnx::read_config("$3", file_path); vnx::read_config("$4", init_args); std::shared_ptr payload; if(contract_addr.empty()) { payload = vnx::read_from_file(file_path); if(!payload) { vnx::log_error() << "Failed to read contract from file: " << file_path; goto failed; } } else { auto exec = mmx::contract::Executable::create(); exec->binary = mmx::addr_t(contract_addr); exec->init_method = file_path; exec->init_args = init_args; payload = exec; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.deploy(index, payload, spend_options); std::cout << "Deployed " << payload->get_type_name() << " as [" << mmx::addr_t(tx->id) << "]" << std::endl; } else if(command == "exec" || command == "deposit") { std::string method; std::vector args; vnx::read_config("$3", method); { vnx::Variant tmp; for(int i = 4; vnx::read_config("$" + std::to_string(i), tmp); ++i) { args.push_back(tmp); } } if(auto exec = std::dynamic_pointer_cast(node.get_contract(contract))) { if(auto bin = std::dynamic_pointer_cast(node.get_contract(exec->binary))) { if(auto meth = bin->find_method(method)) { args.resize(meth->args.size()); } } } if(!spend_options.user && offset >= 0) { spend_options.user = wallet.get_address(index, offset); } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } if(command == "exec") { tx = wallet.execute(index, contract, method, args, nullptr, spend_options); std::cout << "Executed " << method << "() with "; } else { if(method.empty()) { method = "deposit"; } const auto token = get_token(node, contract); const auto mojo = mmx::to_amount(amount, token->decimals); tx = wallet.deposit(index, target, method, args, mojo, contract, spend_options); std::cout << "Deposited " << mmx::to_value(mojo, token->decimals) << " " << token->symbol << " via " << method << "() with "; } vnx::PrettyPrinter printer(std::cout); vnx::accept(printer, args); std::cout << std::endl; } else if(command == "offer") { std::string subject; if(!vnx::read_config("$3", subject)) { const auto bid = contract; const auto ask = ask_currency; if(bid == ask) { vnx::log_error() << "Ask == Bid!"; goto failed; } const auto bid_token = get_token(node, bid); const auto ask_token = get_token(node, ask); const auto bid_symbol = bid_token->symbol; const uint64_t bid_value = mmx::to_amount(amount, bid_token->decimals); const uint64_t ask_value = mmx::to_amount(ask_amount, ask_token->decimals); if(bid_value == 0 || ask_value == 0) { vnx::log_error() << "Invalid amount! (-a | -b)"; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } std::cout << "Offering " << amount << " " << bid_token->symbol << " for " << ask_amount << " " << ask_token->symbol << std::endl; tx = wallet.make_offer(index, offset, bid_value, bid, ask_value, ask, spend_options); if(tx) { std::cout << "Contract: " << mmx::addr_t(tx->id) << std::endl; } } else if(subject == "cancel") { mmx::addr_t address; vnx::read_config("$4", address); auto offer = std::dynamic_pointer_cast(node.get_contract(address)); if(!offer || offer->binary != params->offer_binary) { vnx::log_error() << "No such offer: " << address; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.cancel_offer(index, address, spend_options); } else if(subject == "withdraw") { mmx::addr_t address; vnx::read_config("$4", address); auto offer = std::dynamic_pointer_cast(node.get_contract(address)); if(!offer || offer->binary != params->offer_binary) { vnx::log_error() << "No such offer: " << address; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.offer_withdraw(index, address, spend_options); } else { std::cerr << "mmx wallet offer [cancel | withdraw]" << std::endl; } } else if(command == "trade") { mmx::addr_t address; vnx::read_config("$3", address); const auto height = node.get_height(); const auto data = node.get_offer(address); const auto bid_token = get_token(node, data.bid_currency); const auto ask_token = get_token(node, data.ask_currency); const uint64_t ask_amount = mmx::to_amount(amount, ask_token->decimals); const uint64_t bid_amount = data.get_bid_amount(ask_amount); std::cout << "You send: " << mmx::to_value(ask_amount, ask_token->decimals) << " " << ask_token->symbol << " [" << data.ask_currency << "]" << std::endl; std::cout << "You receive: " << mmx::to_value(bid_amount, bid_token->decimals) << " " << bid_token->symbol << " [" << data.bid_currency << "]" << std::endl; if(data.last_update > height || height - data.last_update < 100) { pre_accept = false; std::cout << "WARNING: Offer price has changed recently!" << std::endl; } if(pre_accept || accept_prompt()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.offer_trade(index, address, ask_amount, offset, data.inv_price, spend_options); } } else if(command == "accept") { mmx::addr_t address; vnx::read_config("$3", address); const auto height = node.get_height(); const auto data = node.get_offer(address); const auto bid_token = get_token(node, data.bid_currency); const auto ask_token = get_token(node, data.ask_currency); std::cout << "You send: " << mmx::to_value(data.ask_amount, ask_token->decimals) << " " << ask_token->symbol << " [" << data.ask_currency << "]" << std::endl; std::cout << "You receive: " << mmx::to_value(data.bid_balance, bid_token->decimals) << " " << bid_token->symbol << " [" << data.bid_currency << "]" << std::endl; if(data.last_update > height || height - data.last_update < 100) { pre_accept = false; std::cout << "WARNING: Offer price has changed recently!" << std::endl; } if(pre_accept || accept_prompt()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.accept_offer(index, address, offset, data.inv_price, spend_options); } } else if(command == "buy" || command == "sell") { if(min_amount < 0 || min_amount > 1) { std::cerr << "Invalid min amount: " << min_amount << " (needs to be between 0 and 1, ie. between 0% and 100%)" << std::endl; goto failed; } const auto i = (command == "sell" ? 0 : 1); const auto k = (i + 1) % 2; const auto info = node.get_swap_info(contract); const auto token_i = get_token(node, info.tokens[i]); const auto token_k = get_token(node, info.tokens[k]); const auto deposit_amount = mmx::to_amount(amount, token_i->decimals); const auto trade_estimate = node.get_swap_trade_estimate(contract, i, deposit_amount); const auto expected_amount = trade_estimate[0]; const mmx::uint128 min_trade_amount = mmx::to_amount(expected_amount.to_double() * min_amount, 0); std::cout << "You send: " << mmx::to_value(deposit_amount, token_i->decimals) << " " << token_i->symbol << std::endl; std::cout << "You receive at least: " << mmx::to_value(min_trade_amount, token_k->decimals) << " " << token_k->symbol << std::endl; std::cout << "You expect to receive: " << mmx::to_value(expected_amount, token_k->decimals) << " " << token_k->symbol << " (estimated)" << std::endl; std::cout << "Fee: " << mmx::to_value(trade_estimate[1], token_k->decimals) << " " << token_k->symbol << std::endl; std::cout << "Price: " << (command == "sell" ? expected_amount.to_double() / deposit_amount.to_double() : deposit_amount.to_double() / expected_amount.to_double()) << " " << (command == "sell" ? token_k : token_i)->symbol << " / " << (command == "sell" ? token_i : token_k)->symbol << std::endl; if(pre_accept || accept_prompt()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.swap_trade(index, contract, deposit_amount, info.tokens[i], min_trade_amount, 20, spend_options); } } else if(command == "swap") { std::string action; vnx::read_config("$3", action); if(action == "add") { const auto usage = "mmx wallet swap add -a -b -x "; std::array add_amount = {}; const auto info = node.get_swap_info(contract); const auto token_0 = get_token(node, info.tokens[0]); const auto token_1 = get_token(node, info.tokens[1]); if(offset < 0 || size_t(offset) >= info.fee_rates.size()) { std::cerr << "invalid pool offset: " << offset << std::endl; goto failed; } if(have_amount) { add_amount[0] = mmx::to_amount(amount, token_0->decimals); } else { if(!have_ask_amount) { std::cerr << usage << std::endl; goto failed; } if(info.balance[1]) { add_amount[0] = (uint256_t(mmx::to_amount(ask_amount, token_1->decimals)) * info.balance[0]) / info.balance[1]; } } if(have_ask_amount) { add_amount[1] = mmx::to_amount(ask_amount, token_1->decimals); } else { if(!have_amount) { std::cerr << usage << std::endl; goto failed; } if(info.balance[0]) { add_amount[1] = (uint256_t(mmx::to_amount(amount, token_0->decimals)) * info.balance[1]) / info.balance[0]; } } if(add_amount[0]) { std::cout << "You deposit: " << mmx::to_value(add_amount[0], token_0->decimals) << " " << token_0->symbol; if(!add_amount[1]) { std::cout << " (sell order)"; } std::cout << std::endl; } if(add_amount[1]) { std::cout << "You deposit: " << mmx::to_value(add_amount[1], token_1->decimals) << " " << token_1->symbol; if(!add_amount[0]) { std::cout << " (buy order)"; } std::cout << std::endl; } std::cout << "Pool Fee: " << info.fee_rates[offset] * 100 << " %" << std::endl; if(!add_amount[0] && !add_amount[1]) { std::cerr << usage << std::endl; goto failed; } if(pre_accept || accept_prompt()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.swap_add_liquid(index, contract, add_amount, offset, spend_options); } } else if(action == "remove") { std::array rem_amount = {}; const auto info = node.get_swap_info(contract); const auto user_info = node.get_swap_user_info(contract, wallet.get_address(index, offset)); const auto token_0 = get_token(node, info.tokens[0]); const auto token_1 = get_token(node, info.tokens[1]); if(have_amount) { rem_amount[0] = mmx::to_amount(amount, token_0->decimals); } if(have_ask_amount) { rem_amount[1] = mmx::to_amount(ask_amount, token_1->decimals); } if(!have_amount && !have_ask_amount) { for(int i = 0; i < 2; ++i) { rem_amount[i] = user_info.balance[i]; } } for(int i = 0; i < 2; ++i) { rem_amount[i] = std::min(rem_amount[i], user_info.balance[i]); } if(!rem_amount[0] && !rem_amount[1]) { std::cerr << "Nothing to remove." << std::endl; goto failed; } for(int i = 0; i < 2; ++i) { const auto token = i ? token_1 : token_0; if(rem_amount[i]) { std::cout << "You remove: " << mmx::to_value(rem_amount[i], token->decimals) << " " << token->symbol << std::endl; } } for(int i = 0; i < 2; ++i) { const auto token = i ? token_1 : token_0; if(user_info.equivalent_liquidity[i]) { std::cout << "You receive: " << mmx::to_value(user_info.equivalent_liquidity[i], token->decimals) << " " << token->symbol << " (approximate)" << std::endl; } } if(pre_accept || accept_prompt()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.swap_rem_liquid(index, contract, rem_amount, spend_options); } } else if(action == "payout") { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } spend_options.user = wallet.get_address(index, offset); tx = wallet.execute(index, contract, "payout", {}, nullptr, spend_options); } else if(action == "info") { const auto info = node.get_swap_info(contract); const auto user_info = node.get_swap_user_info(contract, wallet.get_address(index, offset)); const auto token_0 = get_token(node, info.tokens[0]); const auto token_1 = get_token(node, info.tokens[1]); for(int i = 0; i < 2; ++i) { const auto token = i ? token_1 : token_0; std::cout << "Balance: " << mmx::to_value(user_info.balance[i], token->decimals) << " " << token->symbol << std::endl; } for(int i = 0; i < 2; ++i) { const auto token = i ? token_1 : token_0; if(user_info.balance[i]) { std::cout << "Earned fees: " << mmx::to_value(user_info.fees_earned[i], token->decimals) << " " << token->symbol << " (approximate)" << std::endl; } } std::cout << "Unlock height: " << user_info.unlock_height << std::endl; } else { std::cerr << "mmx wallet swap [info | add | remove | payout] [-a ] [-b ] -x " << std::endl; } } else if(command == "log" || command == "log_csv") { mmx::query_filter_t filter; filter.limit = limit; filter.with_pending = true; vnx::read_config("$3", filter.since); const auto data = wallet.get_history(index, filter); if(command == "log_csv") { show_history_csv(data, node, params); } else { show_history(data, node, params); } } else if(command == "lock") { wallet.lock(index); } else if(command == "unlock") { wallet.unlock(index, vnx::input_password("Passphrase: ")); } else if(command == "create") { if(file_name.empty()) { file_name = "wallet.dat"; } file_name = mmx_home + file_name; if(vnx::File(file_name).exists()) { vnx::log_error() << "Wallet file '" << file_name << "' already exists!"; goto failed; } bool with_seed = false; bool with_mnemonic = false; bool with_passphrase = false; vnx::read_config("with-seed", with_seed); vnx::read_config("with-mnemonic", with_mnemonic); vnx::read_config("with-passphrase", with_passphrase); mmx::KeyFile key; if(with_seed) { std::string seed_str; std::cout << "Seed: "; std::getline(std::cin, seed_str); if(seed_str.size() != 64) { throw std::logic_error("invalid seed"); } key.seed_value.from_string(seed_str); } else if(with_mnemonic) { std::string seed_words; std::cout << "Mnemonic: "; std::getline(std::cin, seed_words); key.seed_value = mmx::mnemonic::words_to_seed(mmx::mnemonic::string_to_words(seed_words)); } else { key.seed_value = mmx::hash_t::secure_random(); } vnx::optional passphrase; if(with_passphrase) { passphrase = vnx::input_password("Passphrase: "); const auto check = vnx::input_password("Passphrase (again): "); if(check != *passphrase) { vnx::log_error() << "Passphrase mismatch!"; goto failed; } } key.finger_print = get_finger_print(key.seed_value, passphrase); vnx::write_to_file(file_name, key); std::filesystem::permissions(file_name, std::filesystem::perms::owner_read | std::filesystem::perms::owner_write); std::cout << "Created wallet '" << file_name << "'" << std::endl; std::cout << " Mnemonic: " << mmx::mnemonic::words_to_string(mmx::mnemonic::seed_to_words(key.seed_value)) << std::endl; mmx::account_t config; config.num_addresses = 1; config.finger_print = *key.finger_print; config.with_passphrase = with_passphrase; mmx::ECDSA_Wallet wallet(key.seed_value, config, params); wallet.unlock(passphrase ? *passphrase : std::string()); std::cout << " Address: " << wallet.get_address(0) << std::endl; } else if(command == "new") { bool with_mnemonic = false; bool with_passphrase = false; vnx::read_config("with-mnemonic", with_mnemonic); vnx::read_config("with-passphrase", with_passphrase); vnx::optional passphrase; if(with_passphrase) { passphrase = vnx::input_password("Passphrase: "); const auto check = vnx::input_password("Passphrase (again): "); if(check != *passphrase) { vnx::log_error() << "Passphrase mismatch!"; goto failed; } } mmx::account_t config; config.num_addresses = 0; // use default vnx::read_config("$3", config.name); vnx::read_config("limit", config.num_addresses); vnx::optional words; if(with_mnemonic) { std::string tmp; std::cout << "Mnemonic: "; std::getline(std::cin, tmp); words = tmp; } wallet.create_wallet(config, words, passphrase); } else if(command == "import") { vnx::read_config("$3", file_name); if(file_name.empty()) { std::cerr << "Usage: mmx wallet import path/to/wallet*.dat" << std::endl; goto failed; } auto key_file = vnx::read_from_file(file_name); if(!key_file) { vnx::log_error() << "Failed to read wallet file '" << file_name << "'"; goto failed; } vnx::optional passphrase; if(key_file->finger_print) { passphrase = vnx::input_password("Passphrase: "); } mmx::account_t config; config.num_addresses = 0; // use default wallet.import_wallet(config, key_file, passphrase); } else if(command == "remove") { if(index < 100) { vnx::log_error() << "Wallet removal not supported for indices below 100!"; goto failed; } wallet.remove_account(index, offset); } else if(command == "plotnft") { vnx::read_config("$3", command); try { if(command != "create") { index = wallet.find_wallet_by_addr(contract); } } catch(...) { // ignore } if(command == "join") { std::string url; vnx::read_config("$4", url); if(url.size() && !contract.is_zero()) { const auto info = http.get_json(url + "/pool/info", {}).to_object(); std::cout << "[" << url << "]" << std::endl; std::cout << "Name: " << info["name"].to_string_value() << std::endl; std::cout << "Description: " << info["description"].to_string_value() << std::endl; std::cout << "Pool Fee: " << info["fee"].to() * 100 << " %" << std::endl; std::cout << "Minimum difficulty: " << info["min_difficulty"] << std::endl; const auto target = info["pool_target"].to(); if(target.is_zero()) { throw std::logic_error("pool returned invalid target address"); } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } if(pre_accept || accept_prompt()) { tx = wallet.plotnft_exec(contract, "lock", {vnx::Variant(target.to_string()), vnx::Variant(url)}, spend_options); } } else { std::cerr << "Usage: mmx wallet plotnft join -x " << std::endl; goto failed; } } else if(command == "lock") { std::string target; vnx::read_config("$4", target); if(target.size() && !contract.is_zero()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.plotnft_exec(contract, "lock", {vnx::Variant(target), vnx::Variant()}, spend_options); } else { std::cerr << "Usage: mmx wallet plotnft lock -x " << std::endl; goto failed; } } else if(command == "unlock") { if(contract.is_zero()) { std::cerr << "Usage: mmx wallet plotnft unlock -x " << std::endl; goto failed; } if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.plotnft_exec(contract, "unlock", {}, spend_options); } else if(command == "create") { std::string name; vnx::read_config("$4", name); if(name.size()) { if(wallet.is_locked(index)) { spend_options.passphrase = vnx::input_password("Passphrase: "); } tx = wallet.plotnft_create(index, name, offset, spend_options); } else { std::cerr << "Usage: mmx wallet plotnft create " << std::endl; goto failed; } } else if(command == "show") { std::map> list; if(contract.is_zero()) { list = wallet.get_contracts_owned(index, nullptr, params->plot_nft_binary); } else { if(auto exec = std::dynamic_pointer_cast(node.get_contract(contract))) { if(exec->binary == params->plot_nft_binary) { list[contract] = exec; } } } for(const auto& entry : list) { std::cout << "[" << entry.first.to_string() << "]" << std::endl; if(auto info = node.get_plot_nft_info(entry.first)) { std::cout << " Name: " << info->name << std::endl; std::cout << " Locked: " << vnx::to_string(info->is_locked) << std::endl; if(info->is_locked && info->unlock_height) { std::cout << " Unlock Height: " << *info->unlock_height << std::endl; } std::cout << " Server URL: " << (info->server_url ? *info->server_url : std::string("N/A (solo farming)")) << std::endl; if(verbose) { std::cout << " Pool Target: " << (info->target ? info->target->to_string() : std::string("N/A")) << std::endl; std::cout << " Owner: " << info->owner.to_string() << std::endl; } } } if(list.empty()) { std::cout << "No Plot NFTs found!" << std::endl; } } else { std::cerr << "Usage: mmx wallet plotnft [show | join | lock | unlock | create]" << std::endl; goto failed; } } else { std::cerr << "Help: mmx wallet [show | get | log | send | send_from | offer | trade | accept | buy | sell | swap | mint | deploy | exec | transfer | create | new | import | remove | accounts | keys | lock | unlock | plotnft | log_csv]" << std::endl; } if(tx) { std::cout << "Transaction ID: " << tx->id << std::endl; } if(output) { auto out = vnx::clone(tx); out->reset(params); vnx::write_to_file(*output, out); } } else if(module == "node") { std::string node_url = ":11330"; vnx::read_config("node", node_url); vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); proxy->forward_list = {"Router", "Node"}; proxy.start_detached(); { vnx::ProxyClient client(proxy.get_name()); client.login(user, passwd); } try { params = node.get_params(); } catch(...) { // ignore } mmx::RouterClient router("Router"); if(command == "balance") { mmx::addr_t address; if(!vnx::read_config("$3", address)) { vnx::log_error() << "Missing address argument! (node balances
)"; goto failed; } for(const auto& entry : node.get_total_balances({address})) { auto contract = get_contract(node, entry.first); auto exe = std::dynamic_pointer_cast(contract); if(!exe || exe->binary != params->nft_binary) { const auto token = std::dynamic_pointer_cast(contract); const auto decimals = token ? token->decimals : params->decimals; std::cout << "Balance: " << mmx::to_value(entry.second, decimals) << " " << (token ? token->symbol : "MMX") << " (" << entry.second << ")" << std::endl; } } } else if(command == "info") { const auto info = node.get_network_info(); std::cout << "Synced: " << (node.get_synced_height() ? "Yes" : "No") << std::endl; std::cout << "Height: " << info->height << std::endl; std::cout << "Netspace: " << info->total_space / pow(1000, 2) << " PB" << std::endl; std::cout << "VDF Speed: " << info->vdf_speed << " MH/s" << std::endl; std::cout << "Reward: " << mmx::to_value(info->block_reward, params) << " MMX" << std::endl; std::cout << "Supply: " << mmx::to_value(info->total_supply, params) << " MMX" << std::endl; std::cout << "Block Size: " << info->block_size * 100 << " %" << std::endl; std::cout << "N(Address): " << info->address_count << std::endl; for(uint32_t i = 0; i < 10 && i < info->height; ++i) { const auto hash = node.get_block_hash(info->height - i); std::cout << "Block[" << (info->height - i) << "] " << (hash ? *hash : mmx::hash_t()) << std::endl; } } else if(command == "history" || command == "history_csv") { mmx::addr_t address; if(!vnx::read_config("$3", address)) { vnx::log_error() << "Missing address argument! (node " << command << "
[since])"; goto failed; } mmx::query_filter_t filter; filter.limit = limit; vnx::read_config("$4", filter.since); const auto data = node.get_history({address}, filter); if(command == "history_csv") { show_history_csv(data, node, params); } else { show_history(data, node, params); } } else if(command == "peers") { auto info = router.get_peer_info(); size_t max_length = 0; uint32_t max_height = 0; for(const auto& peer : info->peers) { max_length = std::max(max_length, peer.address.size()); max_height = std::max(max_height, peer.height); } for(const auto& peer : info->peers) { std::cout << "[" << peer.address << "]"; for(size_t i = peer.address.size(); i < max_length + 1; ++i) { std::cout << " "; } std::cout << " height = "; const auto height = std::to_string(peer.height); for(size_t i = height.size(); i < std::to_string(max_height).size(); ++i) { std::cout << " "; } if(peer.is_synced) { std::cout << " "; } else { std::cout << "!"; } std::cout << height; std::cout << ", " << vnx::to_string_value(peer.type) << " (" << peer.version / 100 << "." << peer.version % 100 << ")"; std::cout << ", " << peer.bytes_recv / 1024 / 1024 << " MB recv"; std::cout << ", " << peer.bytes_send / 1024 / 1024 << " MB sent (" << float(peer.compression_ratio) << ")"; std::cout << ", since " << (peer.connect_time_ms / 60000) << " min"; std::cout << ", " << peer.ping_ms << " ms ping"; std::cout << ", " << int64_t(1e3 * peer.pending_cost) / 1e3 << " pending"; std::cout << ", " << (peer.recv_timeout_ms / 100) / 10. << " sec timeout"; if(peer.is_outbound) { std::cout << ", outbound"; } if(peer.is_blocked) { std::cout << ", blocked"; } if(peer.is_paused) { std::cout << ", paused"; } std::cout << std::endl; } } else if(command == "sync") { node.start_sync(true); std::cout << "Started sync ..." << std::endl; while(true) { if(auto height = node.get_synced_height()) { std::cout << "Finished sync at height: " << *height << std::endl; break; } std::cout << node.get_height() << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(2000)); } } else if(command == "revert") { uint32_t height = 0; if(!vnx::read_config("$3", height)) { std::cout << "mmx node revert " << std::endl; goto failed; } std::cout << "Reverting to height " << height << " ..." << std::endl; node.revert_sync(height); } else if(command == "discover") { router.discover(); std::this_thread::sleep_for(std::chrono::milliseconds(2000)); const auto peers = router.get_known_peers(); std::cout << "Got " << peers.size() << " known peers" << std::endl; } else if(command == "send") { std::string file_name; vnx::read_config("$3", file_name); if(auto tx = vnx::read_from_file(file_name)) { node.add_transaction(tx, true); std::cout << "Transaction ID: " << tx->id.to_string() << std::endl; } else { std::cout << "Failed to read transaction '" << file_name << "'" << std::endl; goto failed; } } else if(command == "tx") { mmx::hash_t txid; vnx::read_config("$3", txid); const auto tx = node.get_transaction(txid, true); if(!tx) { vnx::log_error() << "No such transaction: " << txid; goto failed; } const auto height = node.get_height(); const auto tx_height = node.get_tx_height(txid); if(tx_height) { std::cout << "Confirmations: " << height - (*tx_height) + 1 << std::endl; } else { std::cout << "Confirmations: none yet" << std::endl; } size_t i = 0; for(const auto& in : tx->get_inputs()) { std::cout << "Input[" << i++ << "]: "; if(auto token = get_token(node, in.contract, false)) { std::cout << mmx::to_value(in.amount, token->decimals) << " " << token->symbol << " (" << in.amount << ") <- " << in.address << std::endl; } else { std::cout << in.amount << " [" << in.contract << "]" << std::endl; } } i = 0; for(const auto& out : tx->get_outputs()) { std::cout << "Output[" << i++ << "]: "; if(auto token = get_token(node, out.contract, false)) { std::cout << mmx::to_value(out.amount, token->decimals) << " " << token->symbol << " (" << out.amount << ") -> " << out.address << std::endl; } else { std::cout << out.amount << " [" << out.contract << "]" << std::endl; } } } else if(command == "get") { std::string subject; vnx::read_config("$3", subject); if(subject == "balance") { mmx::addr_t address; vnx::read_config("$4", address); const auto token = get_token(node, contract); std::cout << mmx::to_value(node.get_balance(address, contract), token->decimals) << std::endl; } else if(subject == "amount") { mmx::addr_t address; vnx::read_config("$4", address); std::cout << node.get_balance(address, contract) << std::endl; } else if(subject == "height") { std::cout << node.get_height() << std::endl; } else if(subject == "block") { std::string arg; vnx::read_config("$4", arg); std::shared_ptr block; if(arg.size() == 64) { mmx::hash_t hash; hash.from_string(arg); block = node.get_block(hash); } else { const auto height = arg.size() ? vnx::from_string(arg) : node.get_height(); block = node.get_block_at(height); } vnx::PrettyPrinter printer(std::cout); vnx::accept(printer, block); std::cout << std::endl; } else if(subject == "header") { std::string arg; vnx::read_config("$4", arg); std::shared_ptr block; if(arg.size() == 64) { mmx::hash_t hash; hash.from_string(arg); block = node.get_header(hash); } else { const auto height = arg.size() ? vnx::from_string(arg) : node.get_height(); block = node.get_header_at(height); } vnx::PrettyPrinter printer(std::cout); vnx::accept(printer, block); std::cout << std::endl; } else if(subject == "tx") { mmx::hash_t txid; std::string format = "json"; vnx::read_config("$4", txid); vnx::read_config("$5", format); const auto tx = node.get_transaction(txid, true); if(format == "json") { std::cout << vnx::to_pretty_string(tx); } else if(format == "compact") { std::cout << vnx::to_string(tx) << std::endl; } else if(format == "hash") { const auto tmp = tx->hash_serialize(false); std::cout << vnx::to_hex_string(tmp.data(), tmp.size()) << std::endl; } else if(format == "full_hash") { const auto tmp = tx->hash_serialize(true); std::cout << vnx::to_hex_string(tmp.data(), tmp.size()) << std::endl; } else { vnx::log_error() << "invalid format: " << format << std::endl; goto failed; } } else if(subject == "contract") { mmx::addr_t address; vnx::read_config("$4", address); const auto contract = node.get_contract(address); { std::stringstream ss; vnx::PrettyPrinter printer(ss); vnx::accept(printer, contract); std::cout << ss.str() << std::endl; } } else if(subject == "peers") { int64_t max_count = 10; vnx::read_config("$4", max_count); for(const auto& peer : router.get_connected_peers()) { std::cout << peer << std::endl; } } else if(subject == "netspace") { const auto height = node.get_height(); const auto peak = node.get_header_at(height); std::cout << mmx::calc_total_netspace(params, peak ? peak->space_diff : 0) << std::endl; } else if(subject == "supply") { std::cout << node.get_total_supply(contract) << std::endl; } else { std::cerr << "Help: mmx node get [height | tx | contract | balance | amount | block | header | peers | netspace | supply]" << std::endl; } } else if(command == "read") { std::string address; vnx::read_config("$3", address); if(address.empty()) { std::cout << "{" << std::endl; for(const auto& entry : node.read_storage(contract)) { std::cout << " \"" << entry.first << "\": " << to_string(entry.second) << "," << std::endl; } std::cout << "}" << std::endl; } else { vnx::Variant tmp; vnx::from_string(address, tmp); uint64_t addr = 0; mmx::vm::varptr_t var; if(tmp.is_string()) { const auto res = node.read_storage_field(contract, address); var = res.first; addr = res.second; } else { addr = tmp.to(); var = node.read_storage_var(contract, addr); } if(var) { switch(var->type) { case mmx::vm::TYPE_ARRAY: { std::cout << '['; int i = 0; for(const auto& entry : node.read_storage_array(contract, addr)) { if(i++) { std::cout << ", "; } std::cout << to_string(entry); } std::cout << ']' << std::endl; break; } case mmx::vm::TYPE_MAP: std::cout << '{' << std::endl; for(const auto& entry : node.read_storage_map(contract, addr)) { std::cout << " " << to_string(entry.first) << ": " << to_string(entry.second) << ',' << std::endl; } std::cout << '}' << std::endl; break; default: std::cout << to_string(var) << std::endl; } } else { std::cout << to_string(var) << std::endl; } } } else if(command == "dump") { for(const auto& entry : node.dump_storage(contract)) { std::cout << "[0x" << std::hex << entry.first << std::dec << "] " << to_string(entry.second) << std::endl; } } else if(command == "call") { std::string method; std::vector args; vnx::read_config("$3", method); vnx::read_config("$4", args); const auto res = node.call_contract(contract, method, args); vnx::PrettyPrinter printer(std::cout); vnx::accept(printer, res); std::cout << std::endl; } else if(command == "dump_code") { std::string method; vnx::read_config("$3", method); auto value = node.get_contract(contract); auto bin = std::dynamic_pointer_cast(value); if(!bin) { if(auto exec = std::dynamic_pointer_cast(value)) { bin = std::dynamic_pointer_cast(node.get_contract(exec->binary)); if(!bin) { vnx::log_error() << "No such binary: " << exec->binary; goto failed; } } else { vnx::log_error() << "No such executable: " << contract; goto failed; } } if(bin) { mmx::vm::dump_code(std::cout, bin, method.empty() ? vnx::optional() : method); } } else if(command == "fetch") { std::string subject; vnx::read_config("$3", subject); if(subject == "block" || subject == "header") { int64_t height = 0; std::string from_peer; vnx::read_config("$4", from_peer); vnx::read_config("$5", height); if(from_peer.empty()) { vnx::log_error() << "Missing peer argument: node fetch [block | header] "; goto failed; } if(height < 0) { vnx::log_error() << "Invalid height: " << height; goto failed; } const auto block = router.fetch_block_at(height, from_peer); { std::stringstream ss; vnx::PrettyPrinter printer(ss); if(subject == "header") { vnx::accept(printer, block ? block->get_header() : nullptr); } else { vnx::accept(printer, block); } std::cout << ss.str() << std::endl; } } else { std::cerr << "Help: mmx node fetch [block | header]" << std::endl; } } else if(command == "offers") { std::string filter; vnx::read_config("$3", filter); for(const auto& data : node.get_offers()) { if(data.is_open()) { if(!filter.empty() && filter != "open") { continue; } std::cout << "OPEN"; } else { if(!filter.empty() && filter != "closed") { continue; } std::cout << "CLOSED"; } std::cout << " [" << data.address << "] [" << data.height << "] " << std::endl; std::cout << " They offer: "; const auto bid_token = get_token(node, data.bid_currency); if(bid_token) { std::cout << mmx::to_value(data.bid_balance, bid_token->decimals) << " " << bid_token->symbol << " [" << data.bid_currency << "]"; } else { std::cout << data.bid_balance << " [" << data.bid_currency << "]"; } std::cout << std::endl; std::cout << " They ask for: "; const auto ask_token = get_token(node, data.ask_currency); const uint64_t ask_amount = (uint256_t(data.bid_balance) * data.inv_price) >> 64; if(ask_token) { std::cout << mmx::to_value(ask_amount, ask_token->decimals) << " " << ask_token->symbol << " [" << data.ask_currency << "]"; } else { std::cout << ask_amount << " [" << data.ask_currency << "]"; } std::cout << std::endl; if(bid_token && ask_token) { std::cout << " Price: " << data.price << " " << ask_token->symbol << " / " << bid_token->symbol << std::endl; } } } else if(command == "swaps") { vnx::optional token; vnx::optional currency; vnx::read_config("$3", token); vnx::read_config("$4", currency); for(const auto& data : node.get_swaps(offset, token, currency, limit)) { std::cout << "[" << data.address << "] "; std::array decimals; std::array symbols; for(int i = 0; i < 2; ++i) { if(auto token = get_token(node, data.tokens[i], false)) { decimals[i] = token->decimals; symbols[i] = token->symbol; std::cout << mmx::to_value(data.balance[i], token->decimals) << " " << token->symbol << (i == 0 ? " / " : ""); } } const auto price = mmx::to_value(data.balance[1], decimals[1]) / mmx::to_value(data.balance[0], decimals[0]); std::cout << " (" << price << " " << symbols[1] << " / " << symbols[0] << ")" << std::endl; } } else if(command == "swap") { mmx::addr_t address; if(!vnx::read_config("$3", address)) { std::cerr << "node swap
" << std::endl; goto failed; } const auto data = node.get_swap_info(address); std::array decimals; std::array symbols; for(int i = 0; i < 2; ++i) { if(auto token = get_token(node, data.tokens[i])) { decimals[i] = token->decimals; symbols[i] = token->symbol; std::cout << (i ? "Currency" : "Token") << ": " << data.tokens[i] << std::endl; std::cout << " Pool Balance: " << mmx::to_value(data.balance[i], token->decimals) << " " << token->symbol << std::endl; std::cout << " User Balance: " << mmx::to_value(data.user_total[i], token->decimals) << " " << token->symbol << std::endl; std::cout << " Wallet Balance: " << mmx::to_value(data.wallet[i], token->decimals) << " " << token->symbol << std::endl; std::cout << " Total Fees: " << mmx::to_value(data.fees_paid[i], token->decimals) << " " << token->symbol << std::endl; } } const auto price = mmx::to_value(data.balance[1], decimals[1]) / mmx::to_value(data.balance[0], decimals[0]); std::cout << "Price: " << price << " " << symbols[1] << " / " << symbols[0] << std::endl; } else { std::cerr << "Help: mmx node [info | peers | tx | get | fetch | balance | history | offers | swaps | swap | sync | revert | call | send | read | dump | dump_code | history_csv]" << std::endl; } } else if(module == "farm" || module == "harvester") { std::string node_url = ":11333"; vnx::read_config("node", node_url); vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); proxy->forward_list = {"Farmer", "Harvester", "Node"}; proxy.start_detached(); { vnx::ProxyClient client(proxy.get_name()); client.login(user, passwd); } try { params = node.get_params(); } catch(...) { // ignore } mmx::FarmerClient farmer("Farmer"); mmx::HarvesterClient harvester("Harvester"); std::shared_ptr info; if(module == "farm") { info = farmer.get_farm_info(); } else if(module == "harvester") { info = harvester.get_farm_info(); } if(!info) { goto failed; } if(command == "info") { if(module == "farm") { const auto info = node.get_farmed_block_summary(farmer.get_farmer_keys(), params->reward_activation); std::cout << "Farmed Blocks: " << info.num_blocks << std::endl; std::cout << "Total Rewards: " << mmx::to_value(info.total_rewards, params->decimals) << " MMX" << std::endl; } if(info->harvester) { std::cout << "[" << *info->harvester << "]" << std::endl; } std::cout << "Physical Size: " << info->total_bytes / pow(1000, 4) << " TB" << std::endl; std::cout << "Effective Size: " << info->total_bytes_effective / pow(1000, 4) << " TBe" << std::endl; std::cout << "Plots:" << std::endl; uint64_t total_plots = 0; for(const auto& entry : info->plot_count) { total_plots += entry.second; std::cout << " K" << int(entry.first) << ": " << entry.second << std::endl; } std::cout << " Total: " << total_plots << std::endl; if(!info->harvester_bytes.empty()) { std::cout << "Harvesters:" << std::endl; } for(const auto& entry : info->harvester_bytes) { std::cout << " [" << entry.first << "] " << entry.second.first / pow(1000, 4) << " TB, " << entry.second.second / pow(1000, 4) << " TBe" << std::endl; } if(info->reward_addr) { std::cout << "Reward Address: " << info->reward_addr->to_string() << std::endl; } for(const auto& entry : info->pool_info) { const auto& data = entry.second; std::cout << std::endl << "Plot " << (data.is_plot_nft ? "NFT" : "Contract") << " [" << entry.first.to_string() << "]" << std::endl; if(data.name) { std::cout << " Name: " << (*data.name) << std::endl; } std::cout << " Server URL: " << (data.server_url ? *data.server_url : std::string("N/A (solo farming)")) << std::endl; std::string target = "N/A"; if(data.pool_target) { target = data.pool_target->to_string(); } else { if(data.is_plot_nft && info->reward_addr) { target = info->reward_addr->to_string(); } } std::cout << " Target Address: " << target << std::endl; std::cout << " Plot Count: " << data.plot_count << std::endl; const auto iter = info->pool_stats.find(entry.first); if(iter != info->pool_stats.end()) { const auto& stats = iter->second; std::cout << " Points: " << stats.valid_points << " OK / " << stats.failed_points << " FAIL" << std::endl; std::cout << " Difficulty: " << stats.partial_diff << std::endl; if(stats.total_partials) { std::cout << " Avg. Response: " << double(stats.total_response_time) / stats.total_partials / 1e3 << " sec" << std::endl; } if(stats.last_partial) { std::cout << " Last Partial: " << vnx::get_date_string_ex("%Y-%m-%d %H:%M:%S", false, stats.last_partial) << std::endl; } for(const auto& entry : stats.error_count) { std::cout << " Error[" << entry.first.to_string_value() << "]: " << entry.second << std::endl; } } } } else if(command == "reload") { harvester.reload(); } else if(command == "get") { std::string subject; vnx::read_config("$3", subject); if(subject == "space") { std::cout << info->total_bytes << std::endl; } else if(subject == "dirs") { for(const auto& entry : info->plot_dirs) { std::cout << entry << std::endl; } } else { std::cerr << "Help: mmx farm get [space | dirs]" << std::endl; } } else if(command == "add") { std::string path; if(vnx::read_config("$3", path)) { harvester.add_plot_dir(path); } else { std::cout << "mmx farm add " << std::endl; } } else if(command == "remove") { std::string path; if(vnx::read_config("$3", path)) { harvester.rem_plot_dir(path); } else { std::cout << "mmx farm remove " << std::endl; } } else { std::cerr << "Help: mmx " << module << " [info | get | add | remove | reload]" << std::endl; } } else if(module == "pool") { std::string node_url = ":11333"; vnx::read_config("node", node_url); vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); proxy->forward_list = {"Farmer", "Node"}; proxy.start_detached(); { vnx::ProxyClient client(proxy.get_name()); client.login(user, passwd); } try { params = node.get_params(); } catch(...) { // ignore } mmx::FarmerClient farmer("Farmer"); const auto info = farmer.get_farm_info(); if(!info || !info->reward_addr) { std::cerr << "No reward address to query!" << std::endl; goto failed; } if(command == "info") { std::set urls; for(const auto& entry : info->pool_info) { const auto& pool = entry.second; if(auto url = pool.server_url) { urls.insert(*url); } } for(const auto& url : urls) { std::cout << "Pool [" << url << "]" << std::endl; try { vnx::addons::http_request_options_t opt; opt.query["id"] = info->reward_addr->to_string(); const auto data = http.get_json(url + "/account/info", opt).to_object(); std::cout << " Balance: " << data["balance"].to() << " MMX" << std::endl; std::cout << " Total Paid: " << data["total_paid"].to() << " MMX" << std::endl; std::cout << " Difficulty: " << data["difficulty"].to() << std::endl; std::cout << " Pool Share: " << data["pool_share"].to() * 100 << " %" << std::endl; std::cout << " Partial Rate: " << data["partial_rate"].to() << " per hour" << std::endl; std::cout << " Blocks Found: " << data["blocks_found"].to() << std::endl; std::cout << " Estimated Space: " << data["estimated_space"].to() << " TBe" << std::endl; } catch(const std::exception& ex) { std::cout << "Failed with: " << ex.what() << std::endl; } } } else { std::cerr << "Help: mmx " << module << " [info]" << std::endl; } } else { std::cerr << "Help: mmx [node | wallet | farm | pool | harvester]" << std::endl; } } catch(const std::exception& ex) { vnx::log_error() << "Failed with: " << ex.what(); goto failed; } goto exit; failed: did_fail = true; exit: vnx::close(); mmx::secp256k1_free(); return did_fail ? -1 : 0; } ================================================ FILE: src/mmx_farmer.cpp ================================================ /* * mmx_farmer.cpp * * Created on: Jan 7, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #ifdef WITH_CUDA #include #endif int main(int argc, char** argv) { mmx::secp256k1_init(); std::string mmx_home; std::string mmx_network; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; std::cerr << "MMX_HOME = " << mmx_home << std::endl; } if(auto path = ::getenv("MMX_NETWORK")) { mmx_network = path; std::cerr << "MMX_NETWORK = " << mmx_network << std::endl; } vnx::Directory(mmx_network).create(); vnx::write_config("mmx_farmer.log_file_path", mmx_network + "logs/"); std::map options; options["n"] = "node"; options["node"] = "address"; vnx::init("mmx_farmer", argc, argv, options); { std::string version; std::string commit; vnx::read_config("build.version", version); vnx::read_config("build.commit", commit); vnx::log_info() << "Build version: " << version; vnx::log_info() << "Build commit: " << commit; } std::string node_url = ":11330"; std::string endpoint = "0.0.0.0"; // requires allow_remote bool with_wallet = true; bool with_harvester = true; bool allow_remote = false; vnx::read_config("node", node_url); vnx::read_config("endpoint", endpoint); vnx::read_config("wallet", with_wallet); vnx::read_config("harvester", with_harvester); vnx::read_config("allow_remote", allow_remote); #ifdef WITH_CUDA vnx::log_info() << "CUDA available: yes"; mmx::pos::cuda_recompute_init(); #else vnx::log_info() << "CUDA available: no"; #endif if(!allow_remote) { endpoint = "localhost"; } vnx::log_info() << "Remote service access is: " << (allow_remote ? "enabled on " + endpoint : "disabled"); auto node = vnx::Endpoint::from_url(node_url); if(auto tcp = std::dynamic_pointer_cast(node)) { if(!tcp->port || tcp->port == vnx::TcpEndpoint::default_port) { auto tmp = vnx::clone(tcp); tmp->port = 11330; node = tmp; } } vnx::Handle proxy = new vnx::Proxy("Proxy", node); proxy->default_access = "NODE"; // allow Node to call Farmer without login proxy->forward_list = {"Node", "Router"}; { vnx::Handle module = new vnx::Server("Server", vnx::Endpoint::from_url(endpoint + ":11333")); module->use_authentication = true; module->default_access = "REMOTE"; module.start_detached(); } { vnx::Handle module = new vnx::Terminal("Terminal"); module.start_detached(); } if(with_wallet) { vnx::Handle module = new mmx::Wallet("Wallet"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_home + module->storage_path; module->database_path = mmx_network + module->database_path; module.start_detached(); { vnx::Handle module = new vnx::Server("Server5", vnx::Endpoint::from_url("localhost:11335")); module->use_authentication = true; module->default_access = "USER"; module.start_detached(); } } else { proxy->forward_list.push_back("Wallet"); } { vnx::Handle module = new mmx::Farmer("Farmer"); proxy->export_list.push_back(module->output_proofs); module.start_detached(); } { vnx::Handle module = new mmx::ProofServer("ProofServer"); module.start_detached(); } if(with_harvester) { vnx::Handle module = new mmx::Harvester("Harvester"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_network + module->storage_path; proxy->import_list.push_back(module->input_challenges); module.start_detached(); } else { proxy->import_list.push_back("harvester.challenges"); } proxy.start(); vnx::wait(); #ifdef WITH_CUDA mmx::pos::cuda_recompute_shutdown(); #endif mmx::secp256k1_free(); return 0; } ================================================ FILE: src/mmx_harvester.cpp ================================================ /* * mmx_harvester.cpp * * Created on: Jan 7, 2022 * Author: mad */ #include #include #include #include #include #include #include #ifdef WITH_CUDA #include #endif int main(int argc, char** argv) { std::string mmx_home; std::string mmx_network; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; std::cerr << "MMX_HOME = " << mmx_home << std::endl; } if(auto path = ::getenv("MMX_NETWORK")) { mmx_network = path; std::cerr << "MMX_NETWORK = " << mmx_network << std::endl; } vnx::Directory(mmx_network).create(); vnx::write_config("mmx_harvester.log_file_path", mmx_network + "logs/"); std::map options; options["n"] = "node"; options["node"] = "address"; vnx::init("mmx_harvester", argc, argv, options); { std::string version; std::string commit; vnx::read_config("build.version", version); vnx::read_config("build.commit", commit); vnx::log_info() << "Build version: " << version; vnx::log_info() << "Build commit: " << commit; } std::string node_url = ":11333"; std::string endpoint = "0.0.0.0"; // requires allow_remote bool allow_remote = false; bool remote_compute = false; vnx::read_config("node", node_url); vnx::read_config("endpoint", endpoint); vnx::read_config("allow_remote", allow_remote); vnx::read_config("remote_compute", remote_compute); #ifdef WITH_CUDA vnx::log_info() << "CUDA available: yes"; mmx::pos::cuda_recompute_init(); #else vnx::log_info() << "CUDA available: no"; #endif if(!allow_remote) { endpoint = "localhost"; } vnx::log_info() << "Remote service access is: " << (allow_remote ? "enabled on " + endpoint : "disabled"); vnx::write_config("mmx_pos.remote_compute", remote_compute); vnx::log_info() << "Remote compute is: " << (remote_compute ? "enabled" : "disabled"); auto node = vnx::Endpoint::from_url(node_url); if(auto tcp = std::dynamic_pointer_cast(node)) { if(!tcp->port || tcp->port == vnx::TcpEndpoint::default_port) { auto tmp = vnx::clone(tcp); tmp->port = 11333; node = tmp; } } vnx::Handle proxy = new vnx::Proxy("Proxy", node); proxy->forward_list = {"Node", "Farmer", "ProofServer"}; { vnx::Handle module = new vnx::Server("Server", vnx::Endpoint::from_url(endpoint + ":11333")); module->use_authentication = true; module->default_access = "REMOTE"; module.start_detached(); } { vnx::Handle module = new vnx::Terminal("Terminal"); module.start_detached(); } { vnx::Handle module = new mmx::Harvester("Harvester"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_network + module->storage_path; proxy->import_list.push_back(module->input_challenges); proxy->export_list.push_back(module->output_info); proxy->export_list.push_back(module->output_proofs); proxy->export_list.push_back(module->output_lookups); proxy->export_list.push_back(module->output_partials); module.start_detached(); } proxy.start(); vnx::wait(); #ifdef WITH_CUDA mmx::pos::cuda_recompute_shutdown(); #endif return 0; } ================================================ FILE: src/mmx_node.cpp ================================================ /* * mmx_node.cpp * * Created on: Dec 10, 2021 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef WITH_CUDA #include #endif int main(int argc, char** argv) { mmx::secp256k1_init(); std::string mmx_home; std::string mmx_network; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; std::cerr << "MMX_HOME = " << mmx_home << std::endl; } if(auto path = ::getenv("MMX_NETWORK")) { mmx_network = path; std::cerr << "MMX_NETWORK = " << mmx_network << std::endl; } vnx::Directory(mmx_network).create(); vnx::write_config("mmx_node.log_file_path", mmx_network + "logs/"); std::map options; options["t"] = "timelord"; vnx::init("mmx_node", argc, argv, options); { std::string version; std::string commit; vnx::read_config("build.version", version); vnx::read_config("build.commit", commit); vnx::log_info() << "Build version: " << version; vnx::log_info() << "Build commit: " << commit; } if(!vnx::is_config_protected("passwd")) { throw std::logic_error("missing config protection"); } const auto params = mmx::get_params(); const auto api_token = mmx::hash_t::random().to_string(); bool with_gui = false; bool with_farmer = true; bool with_wallet = true; bool with_timelord = true; bool with_harvester = true; bool allow_remote = false; uint32_t wapi_threads = 1; std::string endpoint = "0.0.0.0"; // requires allow_remote vnx::read_config("gui", with_gui); vnx::read_config("wallet", with_wallet); vnx::read_config("farmer", with_farmer); vnx::read_config("timelord", with_timelord); vnx::read_config("harvester", with_harvester); vnx::read_config("allow_remote", allow_remote); vnx::read_config("wapi_threads", wapi_threads); vnx::read_config("endpoint", endpoint); if(!allow_remote) { endpoint = "localhost"; } wapi_threads = std::max(std::min(wapi_threads, 256u), 1u); vnx::log_info() << "AVX2 support: " << (avx2_available() ? "yes" : "no"); vnx::log_info() << "SHA-NI support: " << (sha256_ni_available() ? "yes" : "no"); #ifdef __aarch64__ vnx::log_info() << "ARM-SHA2 support: " << (sha256_arm_available() ? "yes" : "no"); #endif // __aarch64__ #ifdef WITH_CUDA vnx::log_info() << "CUDA available: yes"; mmx::pos::cuda_recompute_init(); #else vnx::log_info() << "CUDA available: no"; #endif vnx::log_info() << "Remote service access is: " << (allow_remote ? "enabled on " + endpoint : "disabled"); if(!with_wallet) { with_farmer = false; } if(!with_farmer) { with_harvester = false; } vnx::write_config("farmer", with_farmer); vnx::write_config("harvester", with_harvester); mmx::sync_type_codes(mmx_network + "type_codes"); { vnx::Handle module = new vnx::Terminal("Terminal"); module.start_detached(); } std::vector wapi_instances; for(uint32_t i = 0; i < wapi_threads; ++i) { vnx::Handle module = new mmx::WebAPI("WebAPI" + std::string(wapi_threads > 1 ? "_" + std::to_string(i) : "")); vnx::read_config("WebAPI.config_path", module->config_path); vnx::read_config("WebAPI.cache_max_age", module->cache_max_age); module->config_path = mmx_home + module->config_path; wapi_instances.push_back(module->vnx_get_id()); module.start_detached(); } if(wapi_instances.size() > 1) { vnx::Handle module = new vnx::addons::HttpBalancer("WebAPI"); module->backend = wapi_instances; module.start_detached(); } { // for remote farmer / timelord vnx::Handle module = new vnx::Server("Server0", vnx::Endpoint::from_url(endpoint + ":11330")); module->use_authentication = true; module->default_access = "REMOTE"; module.start_detached(); } if(with_wallet) { { vnx::Handle module = new mmx::Wallet("Wallet"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_home + module->storage_path; module->database_path = mmx_network + module->database_path; module.start_detached(); } { vnx::Handle module = new vnx::Server("Server5", vnx::Endpoint::from_url("localhost:11335")); module->use_authentication = true; module->default_access = "USER"; module.start_detached(); } } { vnx::Handle module = new vnx::addons::FileServer("FileServer_1"); module->www_root = "www/web-gui/public/"; module->directory_files.push_back("index.html"); module.start_detached(); } int http_port = 0; std::string api_token_header; { vnx::Handle module = new vnx::addons::HttpServer("HttpServer"); module->default_access = "NETWORK"; module->components["/server/"] = "HttpServer"; module->components["/wapi/"] = "WebAPI"; module->components["/api/node/"] = "Node"; module->components["/api/wallet/"] = "Wallet"; module->components["/api/farmer/"] = "Farmer"; module->components["/api/router/"] = "Router"; module->components["/api/harvester/"] = "Harvester"; module->components["/gui/"] = "FileServer_1"; if(with_gui) { http_port = module->port; api_token_header = module->token_header_name; module->token_map[api_token] = "ADMIN"; } module.start_detached(); } if(with_timelord) { { vnx::Handle module = new mmx::TimeLord("TimeLord"); module->storage_path = mmx_network + module->storage_path; module.start_detached(); } } if(with_farmer) { { vnx::Handle module = new mmx::Farmer("Farmer"); module.start_detached(); } { vnx::Handle module = new mmx::ProofServer("ProofServer"); module.start_detached(); } { // for remote harvesters vnx::Handle module = new vnx::Server("Server3", vnx::Endpoint::from_url(endpoint + ":11333")); module->use_authentication = true; module->default_access = "REMOTE"; module.start_detached(); } } if(with_harvester) { vnx::Handle module = new mmx::Harvester("Harvester"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_network + module->storage_path; module.start_detached(); } { vnx::Handle module = new mmx::Node("Node"); module->storage_path = mmx_network + module->storage_path; module->database_path = mmx_network + module->database_path; module.start_detached(); } if(with_gui) { const auto host = "localhost:" + std::to_string(http_port); #ifdef WITH_QT qt_gui_exec(argv, host, api_token, api_token_header); #else vnx::log_warn() << "No GUI available"; vnx::wait(); #endif } else { vnx::wait(); } vnx::close(); #ifdef WITH_CUDA mmx::pos::cuda_recompute_shutdown(); #endif mmx::secp256k1_free(); return 0; } ================================================ FILE: src/mmx_timelord.cpp ================================================ /* * mmx_timelord.cpp * * Created on: Dec 6, 2021 * Author: mad */ #include #include #include #include #include #include #include #include int main(int argc, char** argv) { mmx::secp256k1_init(); std::string mmx_home; std::string mmx_network; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; std::cerr << "MMX_HOME = " << mmx_home << std::endl; } if(auto path = ::getenv("MMX_NETWORK")) { mmx_network = path; std::cerr << "MMX_NETWORK = " << mmx_network << std::endl; } vnx::Directory(mmx_network).create(); std::map options; options["n"] = "node"; options["node"] = "address"; vnx::init("mmx_timelord", argc, argv, options); { std::string version; std::string commit; vnx::read_config("build.version", version); vnx::read_config("build.commit", commit); vnx::log_info() << "Build version: " << version; vnx::log_info() << "Build commit: " << commit; } std::string node_url = ":11330"; vnx::read_config("node", node_url); vnx::log_info() << "SHA-NI support: " << (sha256_ni_available() ? "yes" : "no"); #ifdef __aarch64__ vnx::log_info() << "ARM-SHA2 support: " << (sha256_arm_available() ? "yes" : "no"); #endif // __aarch64__ auto node = vnx::Endpoint::from_url(node_url); if(auto tcp = std::dynamic_pointer_cast(node)) { if(!tcp->port || tcp->port == vnx::TcpEndpoint::default_port) { auto tmp = vnx::clone(tcp); tmp->port = 11330; node = tmp; } } vnx::Handle proxy = new vnx::Proxy("Proxy", node); proxy->forward_list = {"Node", "Wallet"}; { vnx::Handle module = new vnx::Server("Server", vnx::Endpoint::from_url("localhost:11332")); module->use_authentication = true; module->default_access = "REMOTE"; module.start_detached(); } { vnx::Handle module = new vnx::Terminal("Terminal"); module.start_detached(); } { vnx::Handle module = new mmx::TimeLord("TimeLord"); module->storage_path = mmx_network + module->storage_path; proxy->import_list.push_back(module->input_request); proxy->export_list.push_back(module->output_proofs); module.start_detached(); } proxy.start(); vnx::wait(); mmx::secp256k1_free(); return 0; } ================================================ FILE: src/mmx_wallet.cpp ================================================ /* * mmx_wallet.cpp * * Created on: Jan 7, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include int main(int argc, char** argv) { mmx::secp256k1_init(); std::string mmx_home; std::string mmx_network; if(auto path = ::getenv("MMX_HOME")) { mmx_home = path; std::cerr << "MMX_HOME = " << mmx_home << std::endl; } if(auto path = ::getenv("MMX_NETWORK")) { mmx_network = path; std::cerr << "MMX_NETWORK = " << mmx_network << std::endl; } vnx::Directory(mmx_network).create(); std::map options; options["n"] = "node"; options["node"] = "address"; vnx::init("mmx_wallet", argc, argv, options); { std::string version; std::string commit; vnx::read_config("build.version", version); vnx::read_config("build.commit", commit); vnx::log_info() << "Build version: " << version; vnx::log_info() << "Build commit: " << commit; } bool with_gui = false; std::string node_url = ":11330"; vnx::read_config("gui", with_gui); vnx::read_config("node", node_url); vnx::write_config("farmer", false); vnx::write_config("local_node", false); const auto api_token = mmx::hash_t::random().to_string(); mmx::sync_type_codes(mmx_network + "wallet/type_codes"); auto node = vnx::Endpoint::from_url(node_url); if(auto tcp = std::dynamic_pointer_cast(node)) { if(!tcp->port || tcp->port == vnx::TcpEndpoint::default_port) { auto tmp = vnx::clone(tcp); tmp->port = 11330; node = tmp; } } vnx::Handle proxy = new vnx::Proxy("Proxy", node); proxy->forward_list = {"Node", "Router"}; { vnx::Handle module = new vnx::Server("Server", vnx::Endpoint::from_url("localhost:11335")); module->use_authentication = true; module->default_access = "USER"; module.start_detached(); } { vnx::Handle module = new vnx::Terminal("Terminal"); module.start_detached(); } { vnx::Handle module = new mmx::WebAPI("WebAPI"); module->config_path = mmx_home + module->config_path; module.start_detached(); } { vnx::Handle module = new mmx::Wallet("Wallet"); module->config_path = mmx_home + module->config_path; module->storage_path = mmx_home + module->storage_path; module->database_path = mmx_network + module->database_path; module.start_detached(); } { vnx::Handle module = new vnx::addons::FileServer("FileServer_1"); module->www_root = "www/web-gui/public/"; module->directory_files.push_back("index.html"); module.start_detached(); } int http_port = 0; std::string api_token_header; { vnx::Handle module = new vnx::addons::HttpServer("HttpServer"); module->default_access = "NETWORK"; module->components["/server/"] = "HttpServer"; module->components["/wapi/"] = "WebAPI"; module->components["/api/node/"] = "Node"; module->components["/api/wallet/"] = "Wallet"; module->components["/api/router/"] = "Router"; module->components["/gui/"] = "FileServer_1"; if(with_gui) { http_port = module->port; api_token_header = module->token_header_name; module->token_map[api_token] = "ADMIN"; } module.start_detached(); } proxy.start(); if(with_gui) { const auto host = "localhost:" + std::to_string(http_port); #ifdef WITH_QT qt_gui_exec(argv, host, api_token, api_token_header); #else vnx::log_warn() << "No GUI available"; vnx::wait(); #endif } else { vnx::wait(); } vnx::close(); mmx::secp256k1_free(); return 0; } ================================================ FILE: src/mnemonic.cpp ================================================ /* * mnemonic.cpp * * Created on: Sep 12, 2022 * Author: mad */ #include #include #include namespace mmx { namespace mnemonic { std::vector seed_to_words(const hash_t& seed, const std::vector& wordlist) { if(wordlist.size() != 2048) { throw std::logic_error("wordlist.size() != 2048"); } auto bits = seed.to_uint256(); const auto checksum = hash_t(bytes_t<32>().from_uint(bits, true))[0]; std::vector words; for(int i = 0; i < 24; ++i) { uint16_t index = 0; if(i == 0) { index = (bits & 0x7) << 8; index |= (checksum & 0xFF); bits >>= 3; } else { index = (bits & 0x7FF); bits >>= 11; } words.push_back(wordlist[index]); } std::reverse(words.begin(), words.end()); return words; } hash_t words_to_seed(const std::vector& words, const std::vector& wordlist) { if(words.size() != 24) { throw std::logic_error("words.size() != 24"); } if(wordlist.size() != 2048) { throw std::logic_error("wordlist.size() != 2048"); } std::unordered_map word_map; for(size_t i = 0; i < wordlist.size(); ++i) { word_map[wordlist[i]] = i; } uint256_t seed = 0; uint8_t checksum = 0; for(int i = 0; i < 24; ++i) { const auto iter = word_map.find(words[i]); if(iter == word_map.end()) { throw std::runtime_error("invalid mnemonic word: '" + words[i] + "'"); } if(i < 23) { seed <<= 11; seed |= iter->second; } else { seed <<= 3; seed |= (iter->second >> 8); checksum = (iter->second & 0xFF); } } const auto expect_le = hash_t(bytes_t<32>().from_uint(seed, false))[0]; const auto expect_be = hash_t(bytes_t<32>().from_uint(seed, true))[0]; if(checksum != expect_le && checksum != expect_be) { throw std::runtime_error("mnemonic checksum failed"); } hash_t out; out.from_uint(seed); return out; } std::string words_to_string(const std::vector& words) { std::string out; for(size_t i = 0; i < words.size(); ++i) { if(i) { out += " "; } out += words[i]; } return out; } std::vector string_to_words(const std::string& phrase) { return vnx::string_split(phrase, ' ', true); } } // mnemonic } // mmx ================================================ FILE: src/offer_data_t.cpp ================================================ /* * offer_data_t.cpp * * Created on: Oct 12, 2022 * Author: mad */ #include #include #include #include static double get_price(const mmx::uint128& inv_price) { return pow(2, 64) / inv_price.to_double(); } static mmx::uint128 get_bid_amount(const mmx::uint128& ask_amount, const mmx::uint128& inv_price) { const auto bid_amount = (uint256_t(ask_amount) * inv_price) >> 64; if(bid_amount.upper()) { throw std::logic_error("get_bid_amount(): bid amount overflow"); } return bid_amount; } static mmx::uint128 get_ask_amount(const mmx::uint128& bid_amount, const mmx::uint128& inv_price) { const auto ask_amount = ((uint256_t(bid_amount) << 64) + inv_price - 1) / inv_price; if(ask_amount.upper()) { throw std::logic_error("get_ask_amount(): ask amount overflow"); } return ask_amount; } namespace mmx { vnx::bool_t offer_data_t::is_scam() const { return bid_currency == ask_currency && inv_price < (uint128_t(1) << 64); } vnx::bool_t offer_data_t::is_open() const { return bid_balance > 0; } vnx::float64_t offer_data_t::get_price() const { return ::get_price(inv_price); } uint128 offer_data_t::get_bid_amount(const uint128& ask_amount) const { return ::get_bid_amount(ask_amount, inv_price); } uint128 offer_data_t::get_ask_amount(const uint128& bid_amount) const { return ::get_ask_amount(bid_amount, inv_price); } uint128 trade_log_t::get_bid_amount() const { return ::get_bid_amount(ask_amount, inv_price); } vnx::float64_t trade_log_t::get_price() const { return ::get_price(inv_price); } } // mmx ================================================ FILE: src/operation/Deposit.cpp ================================================ /* * Deposit.cpp * * Created on: Apr 26, 2022 * Author: mad */ #include #include namespace mmx { namespace operation { vnx::bool_t Deposit::is_valid() const { return Super::is_valid() && amount > 0; } hash_t Deposit::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "address", address); write_field(out, "method", method); write_field(out, "args", args); write_field(out, "user", user); write_field(out, "currency", currency); write_field(out, "amount", amount); if(full_hash) { write_field(out, "solution", solution); } out.flush(); return hash_t(buffer); } } // operation } // mmx ================================================ FILE: src/operation/Execute.cpp ================================================ /* * Execute.cpp * * Created on: May 9, 2022 * Author: mad */ #include #include #include namespace mmx { namespace operation { vnx::bool_t Execute::is_valid() const { for(const auto& arg : args) { if(!is_json(arg)) { return false; } } return Super::is_valid() && !method.empty(); } hash_t Execute::calc_hash(const vnx::bool_t& full_hash) const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "address", address); write_field(out, "method", method); write_field(out, "args", args); write_field(out, "user", user); if(full_hash) { write_field(out, "solution", solution); } out.flush(); return hash_t(buffer); } uint64_t Execute::calc_cost(std::shared_ptr params) const { uint64_t payload = method.size(); for(const auto& arg : args) { payload += get_num_bytes(arg); } return Super::calc_cost(params) + payload * params->min_txfee_byte; } vnx::Variant Execute::get_arg(const uint32_t& index) const { if(index < args.size()) { return args[index]; } return vnx::Variant(); } } // operation } // mmx ================================================ FILE: src/pos/Prover.cpp ================================================ /* * Prover.cpp * * Created on: Feb 6, 2024 * Author: mad */ #include #include #include #include namespace mmx { namespace pos { Prover::Prover(const std::string& file_path) : file_path(file_path) { if(!vnx::File(file_path).exists()) { throw std::logic_error("no such file"); } header = vnx::read_from_file(file_path); if(!header) { throw std::logic_error("invalid plot header"); } } std::vector Prover::get_qualities(const hash_t& challenge, const int plot_filter) const { std::ifstream file(file_path, std::ios_base::binary); if(!file.good()) { throw std::runtime_error("failed to open file"); } const uint32_t kmask = ((uint64_t(1) << header->ksize) - 1); const uint32_t Y_begin = bytes_t<4>(challenge.data(), 4).to_uint() & kmask; const uint64_t Y_end = uint64_t(Y_begin) + (1 << plot_filter); if(debug) { std::cout << "get_qualities(" << challenge.to_string() << ", " << plot_filter << ")" << std::endl; std::cout << "Y_begin = " << Y_begin << ", Y_end = " << Y_end << std::endl; } std::vector final_entries; { const int32_t num_parks_y = cdiv(header->num_entries_y, header->park_size_y); const uint32_t Y_try_first = std::max(int64_t(Y_begin) + initial_y_shift, 0); int32_t park_index = ((uint64_t(Y_try_first >> 1) * header->num_entries_y) >> (header->ksize - 1)) / header->park_size_y; park_index = std::min(park_index, num_parks_y - 1); std::vector bit_stream(cdiv(header->park_bytes_y - 4, 8)); bool have_begin = false; for(size_t i = 0; park_index >= 0 && park_index < num_parks_y; i++) { if(i > 100) { throw std::runtime_error("failed to find Y park"); } file.seekg(header->table_offset_y + uint64_t(park_index) * header->park_bytes_y); uint32_t Y_i = 0; { uint64_t tmp = 0; file.read((char*)&tmp, 4); Y_i = read_bits(&tmp, 0, header->ksize); } if(!file.good()) { throw std::runtime_error("failed to read Y park header " + std::to_string(park_index)); } if(debug) { std::cout << "park_index = " << park_index << ", Y = " << Y_i << std::endl; } if(Y_i >= Y_end) { if(have_begin || park_index == 0) { break; } if(debug) { std::cout << "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; } park_index = std::max(park_index - cdiv(Y_i - Y_begin, header->park_size_y) - 1, 0); continue; } have_begin = true; file.read((char*)bit_stream.data(), header->park_bytes_y - 4); if(!file.good()) { throw std::runtime_error("failed to read Y park " + std::to_string(park_index)); } const auto deltas = decode(bit_stream, header->park_size_y - 1); std::vector Y_list; Y_list.reserve(header->park_size_y); Y_list.push_back(Y_i); for(const auto delta : deltas) { Y_i += delta; Y_list.push_back(Y_i); } bool is_end = false; for(size_t i = 0; i < Y_list.size(); ++i) { const auto& Y = Y_list[i]; if(Y >= Y_end) { is_end = true; break; } if(Y >= Y_begin) { const uint64_t index = uint64_t(park_index) * header->park_size_y + i; if(index < header->num_entries_y) { final_entries.push_back(index); if(debug) { std::cout << "Y = " << Y << ", index = " << index << std::endl; } } } } if(is_end) { break; } park_index++; } } std::vector result; std::vector meta_park; if(header->has_meta) { meta_park.resize(cdiv(header->park_bytes_meta, 8)); } else { file.close(); } for(const auto final_index : final_entries) { proof_data_t out; if(header->has_meta) { const uint64_t park_index = final_index / header->park_size_meta; const uint32_t park_offset = final_index % header->park_size_meta; file.seekg(header->table_offset_meta + park_index * header->park_bytes_meta); file.read((char*)meta_park.data(), header->park_bytes_meta); if(!file.good()) { throw std::runtime_error("failed to read meta park " + std::to_string(park_index)); } uint32_t meta[N_META_OUT] = {}; for(int i = 0; i < N_META_OUT; ++i) { meta[i] = read_bits(meta_park.data(), (park_offset * N_META_OUT + i) * header->ksize, header->ksize); } out.valid = true; out.index = final_index; out.meta = bytes_t(meta, META_BYTES_OUT); } else { try { out = get_full_proof(final_index); } catch(const std::exception& ex) { out.error_msg = ex.what(); } } result.push_back(out); } return result; } proof_data_t Prover::get_full_proof(const uint64_t final_index) const { std::ifstream file(file_path, std::ios_base::binary); if(!file.good()) { throw std::runtime_error("failed to open file"); } std::vector X_values; std::vector pointers; pointers.push_back(final_index); std::vector pd_park(cdiv(header->park_bytes_pd, 8)); int table = N_TABLE; for(const auto pd_offset : header->table_offset_pd) { std::vector new_pointers; for(const auto index : pointers) { const uint64_t park_index = index / header->park_size_pd; const uint32_t park_offset = index % header->park_size_pd; file.seekg(pd_offset + park_index * header->park_bytes_pd); file.read((char*)pd_park.data(), header->park_bytes_pd); if(!file.good()) { throw std::runtime_error("failed to read PD park " + std::to_string(park_index) + " at table " + std::to_string(table)); } const uint64_t position = read_bits(pd_park.data(), park_offset * header->ksize, header->ksize); new_pointers.push_back(position); const auto offsets = decode(pd_park, park_offset + 1, header->park_size_pd * header->ksize); new_pointers.push_back(position + offsets.back()); } if(debug) { std::cout << "T" << (table - 1) << " pointers: "; for(auto ptr : new_pointers) { std::cout << ptr << " "; } std::cout << std::endl; } pointers = new_pointers; table--; } proof_data_t out; out.index = final_index; std::vector x_park(cdiv(header->park_bytes_x, 8)); for(const auto index : pointers) { const uint64_t park_index = index / header->park_size_x; const uint32_t park_offset = index % header->park_size_x; file.seekg(header->table_offset_x + park_index * header->park_bytes_x); file.read((char*)x_park.data(), header->park_bytes_x); if(!file.good()) { throw std::runtime_error("failed to read X park " + std::to_string(park_index)); } const uint64_t line_point = read_bits(x_park.data(), park_offset * header->entry_bits_x, header->entry_bits_x); if(table == 2) { const auto pair = (header->xbits < header->ksize) ? LinePointToSquare2(line_point) : LinePointToSquare(line_point); X_values.push_back(pair.first); X_values.push_back(pair.second); } else { throw std::logic_error("X table " + std::to_string(table) + " not supported"); } } if(debug) { std::cout << "X_values = "; for(auto X : X_values) { std::cout << X << " "; } std::cout << std::endl; } std::vector X_out; const auto res = compute(X_values, &X_out, header->plot_id, header->ksize, header->ksize - header->xbits); if(res.empty()) { throw std::logic_error("found no valid proof"); } if(res.size() > 1) { throw std::logic_error("got more than one proof"); } out.valid = true; out.proof = X_out; out.meta = res[0].second; return out; } } // pos } // mmx ================================================ FILE: src/pos/cuda_recompute.cu ================================================ /* * mem_hash.cu * * Created on: Feb 2, 2025 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include __device__ inline uint32_t cuda_rotl_32(const uint32_t w, const uint32_t c) { return __funnelshift_l(w, w, c); } #define MMXPOS_HASHROUND(a, b, c, d) \ a = a + b; \ d = cuda_rotl_32(d ^ a, 16); \ c = c + d; \ b = cuda_rotl_32(b ^ c, 12); \ a = a + b; \ d = cuda_rotl_32(d ^ a, 8); \ c = c + d; \ b = cuda_rotl_32(b ^ c, 7); __device__ static const uint32_t MEM_HASH_INIT[16] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174 }; __global__ void cuda_gen_mem_array(uint4* mem_out, uint4* key_out, uint32_t* X_out, const uint32_t* X_in, const uint32_t* ID_in, const int xbits, const uint32_t y_0) { const uint32_t x = threadIdx.x; const uint32_t y = blockIdx.x; const uint32_t z = blockIdx.y; const uint32_t out = ((z * gridDim.x + y) * blockDim.x) + x; const uint32_t num_entries = gridDim.y * gridDim.x * blockDim.x; const uint32_t X_i = (X_in[z * blockDim.x + x] << xbits) | (y_0 + y); X_out[out] = X_i; __align__(8) uint32_t msg[32] = {}; msg[0] = X_i; for(int i = 0; i < 8; ++i) { msg[1 + i] = ID_in[z * 8 + i]; } __align__(8) uint32_t key[16] = {}; cuda_sha512((uint64_t*)msg, 4 + 32, (uint64_t*)key); for(int i = 0; i < 4; ++i) { key_out[out * 4 + i] = make_uint4(key[i * 4 + 0], key[i * 4 + 1], key[i * 4 + 2], key[i * 4 + 3]); } uint32_t state[32]; for(int i = 0; i < 16; ++i) { state[i] = key[i]; } for(int i = 0; i < 16; ++i) { state[16 + i] = MEM_HASH_INIT[i]; } uint32_t b = 0; uint32_t c = 0; for(uint32_t i = 0; i < 32; ++i) { for(int j = 0; j < 4; ++j) { #pragma unroll for(int k = 0; k < 16; ++k) { MMXPOS_HASHROUND(state[k], b, c, state[16 + k]); } } #pragma unroll for(int k = 0; k < 8; ++k) { mem_out[(uint64_t(i) * num_entries + out) * 8 + k] = make_uint4(state[k * 4 + 0], state[k * 4 + 1], state[k * 4 + 2], state[k * 4 + 3]); } } } __global__ void cuda_calc_mem_hash(uint32_t* mem, uint32_t* hash, const int num_iter) { const uint32_t x = threadIdx.x; const uint32_t k = threadIdx.y; const uint32_t y = (blockIdx.z * gridDim.y + blockIdx.y) * blockDim.y + threadIdx.y; const uint32_t num_entries = (gridDim.z * blockDim.z) * (gridDim.y * blockDim.y); static constexpr int N = 32; __shared__ uint32_t lmem[4][N*N]; for(int i = 0; i < N; ++i) { lmem[k][i * N + x] = mem[(uint64_t(i) * num_entries + y) * N + x]; } __syncwarp(); uint32_t state = lmem[k][(N - 1) * N + x]; __syncwarp(); for(int iter = 0; iter < num_iter; ++iter) { uint32_t sum = cuda_rotl_32(state, x % 32); for(int offset = 16; offset > 0; offset /= 2) { sum += __shfl_down_sync(0xFFFFFFFF, sum, offset); } uint32_t dir = 0; if(x == 0) { dir = sum + (sum << 11) + (sum << 22); } sum = __shfl_sync(0xFFFFFFFF, sum, 0); dir = __shfl_sync(0xFFFFFFFF, dir, 0); const uint32_t bits = (dir >> 22) % 32u; const uint32_t offset = (dir >> 27); state += cuda_rotl_32(lmem[k][offset * N + (iter + x) % N], bits) ^ sum; __syncwarp(); atomicXor(&lmem[k][offset * N + x], state); __syncwarp(); } hash[y * N + x] = state; } __global__ void cuda_final_mem_hash(uint4* hash_out, uint32_t* Y_out, const uint4* mem_hash, const uint4* key_in, const uint32_t KMASK) { const uint32_t x = blockIdx.x * blockDim.x + threadIdx.x; __align__(8) uint32_t msg[64] = {}; for(int i = 0; i < 4; ++i) { const auto tmp = key_in[x * 4 + i]; msg[i * 4 + 0] = tmp.x; msg[i * 4 + 1] = tmp.y; msg[i * 4 + 2] = tmp.z; msg[i * 4 + 3] = tmp.w; } for(int i = 0; i < 8; ++i) { const auto tmp = mem_hash[x * 8 + i]; msg[16 + i * 4 + 0] = tmp.x; msg[16 + i * 4 + 1] = tmp.y; msg[16 + i * 4 + 2] = tmp.z; msg[16 + i * 4 + 3] = tmp.w; } __align__(8) uint32_t hash[16] = {}; cuda_sha512((uint64_t*)msg, 64 + 128, (uint64_t*)hash); uint32_t Y_i = 0; for(int i = 0; i < mmx::pos::N_META; ++i) { Y_i = Y_i ^ hash[i]; hash[i] = hash[i] & KMASK; } for(int i = mmx::pos::N_META; i < 16; ++i) { hash[i] = 0; } Y_i &= KMASK; for(int i = 0; i < 4; ++i) { hash_out[x * 4 + i] = make_uint4(hash[i * 4 + 0], hash[i * 4 + 1], hash[i * 4 + 2], hash[i * 4 + 3]); } Y_out[x] = Y_i; } namespace mmx { namespace pos { struct device_t { int index = -1; bool failed = false; uint64_t buffer_size = 0; uint32_t* X_buf = nullptr; // 4 bytes uint32_t* ID_buf = nullptr; // 32 bytes uint32_t* X_dev = nullptr; // 4 bytes uint32_t* X_out = nullptr; // 4 bytes uint32_t* ID_dev = nullptr; // 32 bytes uint32_t* key_dev = nullptr; // 64 bytes uint32_t* mem_dev = nullptr; // 4096 bytes uint32_t* hash_dev = nullptr; // 128 bytes uint32_t* M_dev = nullptr; // 64 bytes uint32_t* Y_dev = nullptr; // 4 bytes uint32_t* Y_buf = nullptr; // 4 bytes uint32_t* M_buf = nullptr; // 64 bytes std::thread thread; }; struct request_t { uint64_t id = 0; int ksize = 0; int xbits = 0; hash_t plot_id; std::vector x_values; std::vector X_tmp; std::vector Y_tmp; std::vector> M_tmp; }; class hardware_error_t : public std::runtime_error { public: hardware_error_t(const std::string& msg) : runtime_error(msg) {} }; static std::mutex g_mutex; static std::condition_variable g_result_signal; static std::condition_variable g_request_signal; static std::atomic do_run {true}; static std::atomic have_init {false}; static std::atomic have_cuda {0}; static std::vector g_device_list; static std::vector> g_devices; static std::atomic next_request_id {1}; static std::deque> g_order_queue; static std::unordered_map> g_result_map; static std::map, std::queue>> g_wait_map; static std::shared_ptr g_cpu_threads; inline void cuda_check(const cudaError_t& code) { if(code != cudaSuccess) { throw hardware_error_t(std::string(cudaGetErrorString(code))); } } bool have_cuda_recompute() { return do_run && have_cuda > 0; } std::vector get_cuda_devices() { int num_devices = 0; cudaGetDeviceCount(&num_devices); std::vector list; for(int i = 0; i < num_devices; ++i) { cudaDeviceProp info; cudaGetDeviceProperties(&info, i); if(info.major >= 5) { cuda_device_t dev; dev.index = i; dev.name = info.name; dev.max_resident = info.multiProcessorCount * info.maxThreadsPerMultiProcessor; list.push_back(dev); } } return list; } std::vector get_cuda_devices_used() { if(!have_init) { cuda_recompute_init(); } std::lock_guard lock(g_mutex); return g_device_list; } static void cuda_recompute_loop(std::shared_ptr dev); void cuda_recompute_init(bool enable, std::vector device_list) { std::lock_guard lock(g_mutex); if(have_init) { return; } have_init = true; if(device_list.empty()) { vnx::read_config("cuda.devices", device_list); } vnx::read_config("cuda.enable", enable); if(!enable) { vnx::log_info() << "CUDA compute is disabled"; return; } auto list = get_cuda_devices(); if(device_list.empty()) { g_device_list = list; } else { for(size_t i : device_list) { if(i < list.size()) { g_device_list.push_back(list[i]); } } } const auto num_threads = std::max(std::thread::hardware_concurrency(), 4u); g_cpu_threads = std::make_shared(num_threads, num_threads); vnx::log_info() << "Using " << num_threads << " CPU threads for CUDA recompute"; for(auto& info : g_device_list) { info.buffer_size = 256; while(info.buffer_size < info.max_resident) { info.buffer_size <<= 1; } info.buffer_size /= 2; const int num_threads = (info.max_resident * 3 + info.buffer_size - 1) / info.buffer_size; for(int i = 0; i < num_threads; ++i) { auto dev = std::make_shared(); dev->index = info.index; dev->buffer_size = info.buffer_size; dev->thread = std::thread(&cuda_recompute_loop, dev); g_devices.push_back(dev); } vnx::log_info() << "Using CUDA device [" << info.index << "] '" << info.name << "' with threads " << info.max_resident << ", buffer " << info.buffer_size << "x" << num_threads; } have_cuda = g_devices.size(); if(!have_cuda) { if(list.empty()) { vnx::log_info() << "No CUDA devices found!"; } else { vnx::log_info() << "No CUDA devices enabled!"; } } } void cuda_recompute_shutdown() { { std::lock_guard lock(g_mutex); do_run = false; } g_request_signal.notify_all(); for(auto dev : g_devices) { dev->thread.join(); } g_devices.clear(); g_device_list.clear(); } uint64_t cuda_recompute(const int ksize, const int xbits, const hash_t& plot_id, const std::vector& x_values) { if(ksize < 8 || ksize > 32) { throw std::logic_error("invalid ksize"); } if(xbits < 0 || xbits > 20 || xbits + 8 >= ksize) { throw std::logic_error("invalid xbits"); } if(x_values.size() != 256) { throw std::logic_error("invalid x_values"); } if(!have_init) { cuda_recompute_init(); } const std::tuple type(ksize, xbits); auto req = std::make_shared(); req->id = next_request_id++; req->ksize = ksize; req->xbits = xbits; req->plot_id = plot_id; req->x_values = x_values; { std::lock_guard lock(g_mutex); if(!do_run || have_cuda <= 0) { throw std::logic_error("no CUDA devices available"); } if(std::find(g_order_queue.begin(), g_order_queue.end(), type) == g_order_queue.end()) { g_order_queue.push_back(type); } g_wait_map[type].push(req); } g_request_signal.notify_all(); return req->id; } std::shared_ptr cuda_recompute_poll(const std::set& jobs) { while(true) { std::unique_lock lock(g_mutex); if(!g_result_map.empty()) { for(const auto id : jobs) { const auto iter = g_result_map.find(id); if(iter != g_result_map.end()) { const auto res = iter->second; g_result_map.erase(iter); return res; } } } if(!do_run) { throw std::logic_error("shutdown"); } g_result_signal.wait(lock); } } static void cuda_finish_cpu(std::shared_ptr req) { auto res = std::make_shared(); res->id = req->id; try { std::vector X_out; const auto entries = compute_full(req->X_tmp, req->Y_tmp, req->M_tmp, &X_out, req->plot_id, req->ksize); res->X = std::move(X_out); res->entries = entries; } catch(const std::exception& ex) { res->failed = true; res->error = ex.what(); } { std::lock_guard lock(g_mutex); g_result_map[res->id] = res; } g_result_signal.notify_all(); } static void cuda_recompute_loop(std::shared_ptr dev) { cudaStream_t stream; try { cuda_check(cudaSetDevice(dev->index)); cuda_check(cudaDeviceSynchronize()); cuda_check(cudaSetDeviceFlags(cudaDeviceScheduleBlockingSync)); cuda_check(cudaStreamCreate(&stream)); cuda_check(cudaMallocHost(&dev->X_buf, dev->buffer_size * 4)); cuda_check(cudaMallocHost(&dev->Y_buf, dev->buffer_size * 4)); cuda_check(cudaMallocHost(&dev->ID_buf, dev->buffer_size / 256 * 32)); cuda_check(cudaMallocHost(&dev->M_buf, dev->buffer_size * 64)); cuda_check(cudaMalloc(&dev->X_dev, dev->buffer_size * 4)); cuda_check(cudaMalloc(&dev->X_out, dev->buffer_size * 4)); cuda_check(cudaMalloc(&dev->ID_dev, dev->buffer_size / 256 * 32)); cuda_check(cudaMalloc(&dev->key_dev, dev->buffer_size * 64)); cuda_check(cudaMalloc(&dev->mem_dev, dev->buffer_size * 4096)); cuda_check(cudaMalloc(&dev->hash_dev, dev->buffer_size * 128)); cuda_check(cudaMalloc(&dev->M_dev, dev->buffer_size * 64)); cuda_check(cudaMalloc(&dev->Y_dev, dev->buffer_size * 4)); } catch(const std::exception& ex) { dev->failed = true; vnx::log_error() << "CUDA: failed to allocate memory for device " << dev->index << ": " << ex.what(); goto failed; } while(do_run) { std::unique_lock lock(g_mutex); while(do_run && g_order_queue.empty()) { g_request_signal.wait(lock); } if(!do_run) { break; } const auto type = g_order_queue.front(); g_order_queue.pop_front(); const auto ksize = std::get<0>(type); const auto xbits = std::get<1>(type); const auto req_size = uint64_t(256) << xbits; uint64_t alloc_sum = 0; std::vector> req_list; req_list.reserve(dev->buffer_size / req_size); { auto& req_queue = g_wait_map[type]; while(!req_queue.empty()) { if(!alloc_sum || alloc_sum + req_size <= dev->buffer_size) { req_list.push_back(req_queue.front()); alloc_sum += req_size; req_queue.pop(); } else { break; } } if(!req_queue.empty()) { g_order_queue.push_back(type); } } lock.unlock(); uint32_t num_iter = 1; while(req_size / num_iter > dev->buffer_size) { num_iter <<= 1; } const uint64_t N = (1u << xbits) / num_iter; const uint64_t M = req_list.size(); const uint64_t grid_size = uint64_t(256) * N * M; const uint32_t KMASK = (uint64_t(1) << ksize) - 1; std::unordered_set x_set; for(uint64_t i = 0; i < M; ++i) { const auto& req = req_list[i]; req->X_tmp.resize(req_size); req->Y_tmp.resize(req_size); req->M_tmp.resize(req_size); for(auto& x : req->x_values) { while(!x_set.insert(x).second) { x++; // avoid duplicate inputs } } ::memcpy(dev->X_buf + i * 256, req->x_values.data(), 256 * 4); ::memcpy(dev->ID_buf + i * 8, req->plot_id.data(), 32); x_set.clear(); } cudaMemcpyAsync(dev->X_dev, dev->X_buf, M * 256 * 4, cudaMemcpyHostToDevice, stream); cudaMemcpyAsync(dev->ID_dev, dev->ID_buf, M * 32, cudaMemcpyHostToDevice, stream); for(uint32_t iter = 0; iter < num_iter; ++iter) { const uint64_t y_0 = iter * N; { dim3 block(256, 1); dim3 grid(N, M); cuda_gen_mem_array<<>>( (uint4*)dev->mem_dev, (uint4*)dev->key_dev, dev->X_out, dev->X_dev, dev->ID_dev, xbits, y_0); } { dim3 block(32, 4); dim3 grid(1, grid_size / block.y / 64, 64); cuda_calc_mem_hash<<>>( dev->mem_dev, dev->hash_dev, MEM_HASH_ITER); } { dim3 block(256, 1); dim3 grid(N * M, 1); cuda_final_mem_hash<<>>( (uint4*)dev->M_dev, dev->Y_dev, (uint4*)dev->hash_dev, (uint4*)dev->key_dev, KMASK); } cudaMemcpyAsync(dev->X_buf, dev->X_out, grid_size * 4, cudaMemcpyDeviceToHost, stream); cudaMemcpyAsync(dev->Y_buf, dev->Y_dev, grid_size * 4, cudaMemcpyDeviceToHost, stream); cudaMemcpyAsync(dev->M_buf, dev->M_dev, grid_size * 64, cudaMemcpyDeviceToHost, stream); const auto err = cudaStreamSynchronize(stream); if(err != cudaSuccess) { std::lock_guard lock(g_mutex); for(const auto& req : req_list) { auto res = std::make_shared(); res->id = req->id; res->failed = true; res->error = "CUDA error"; g_result_map[res->id] = res; } g_result_signal.notify_all(); dev->failed = true; vnx::log_error() << "CUDA: error " << err << ": " << cudaGetErrorString(err); goto failed; } for(uint64_t i = 0; i < M; ++i) { const auto& req = req_list[i]; const uint64_t count = 256 * N; ::memcpy(req->X_tmp.data() + iter * count, dev->X_buf + i * count, count * 4); ::memcpy(req->Y_tmp.data() + iter * count, dev->Y_buf + i * count, count * 4); for(uint64_t k = 0; k < count; ++k) { ::memcpy(req->M_tmp.data() + iter * count + k, dev->M_buf + (i * count + k) * 16, N_META * 4); } } } for(const auto& req : req_list) { g_cpu_threads->add_task(std::bind(&cuda_finish_cpu, req)); } } failed: have_cuda--; } } // pos } // mmx ================================================ FILE: src/pos/encoding.cpp ================================================ /* * encoding.cpp * * Created on: Nov 20, 2023 * Author: mad */ #include namespace mmx { namespace pos { std::pair encode_symbol(const uint8_t sym) { switch(sym) { case 0: return std::make_pair(0, 2); case 1: return std::make_pair(1, 2); case 2: return std::make_pair(2, 2); } const uint32_t index = sym / 3; const uint32_t mod = sym % 3; if(index > 15) { throw std::logic_error("symbol out of range"); } uint32_t out = uint32_t(-1) >> (32 - 2 * index); out |= mod << (2 * index); return std::make_pair(out, 2 * index + 2); } std::pair decode_symbol(const uint32_t bits) { switch(bits & 3) { case 0: return std::make_pair(0, 2); case 1: return std::make_pair(1, 2); case 2: return std::make_pair(2, 2); } uint32_t shift = bits; for(uint32_t index = 0; index < 16; ++index) { const auto mod = shift & 3; if(mod == 3) { shift >>= 2; } else { return std::make_pair(3 * index + mod, 2 * index + 2); } } return std::make_pair(48, 32); } std::vector encode(const std::vector& symbols, uint64_t& total_bits) { std::vector out; total_bits = 0; uint32_t offset = 0; uint64_t buffer = 0; for(const auto sym : symbols) { const auto bits = encode_symbol(sym); buffer |= uint64_t(bits.first) << offset; const auto end = offset + bits.second; if(end >= 64) { out.push_back(buffer); buffer = 0; } if(end > 64) { buffer = bits.first >> (64 - offset); } offset = end % 64; total_bits += bits.second; } if(offset) { out.push_back(buffer); } return out; } std::vector decode(const std::vector& bit_stream, const uint64_t num_symbols, const uint64_t bit_offset) { std::vector out; out.reserve(num_symbols); uint32_t bits = 0; uint64_t offset = bit_offset; uint64_t buffer = 0; while(out.size() < num_symbols) { if(bits < 32) { const auto index = offset / 64; if(index < bit_stream.size()) { const uint32_t count = std::min(64 - (offset % 64), 64 - bits); buffer |= (bit_stream[index] >> (offset % 64)) << bits; offset += count; bits += count; } else if(bits == 0) { throw std::logic_error("bit stream underflow"); } } const auto sym = decode_symbol(buffer); out.push_back(sym.first); if(sym.second > bits) { throw std::logic_error("symbol decode error"); } buffer >>= sym.second; bits -= sym.second; } return out; } } // pos } // mmx ================================================ FILE: src/pos/mem_hash.cpp ================================================ /* * mem_hash.cpp * * Created on: Oct 30, 2023 * Author: mad */ #include #include #include #include #include namespace mmx { namespace pos { static const uint32_t MEM_HASH_INIT[16] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174 }; void gen_mem_array(uint32_t* mem, const uint8_t* key, const uint32_t mem_size) { if(mem_size % 32) { throw std::logic_error("mem_size % 32 != 0"); } uint32_t state[32] = {}; for(int i = 0; i < 16; ++i) { ::memcpy(&state[i], key + i * 4, 4); } for(int i = 0; i < 16; ++i) { state[16 + i] = MEM_HASH_INIT[i]; } uint32_t b = 0; uint32_t c = 0; for(uint32_t i = 0; i < mem_size; i += 32) { for(int j = 0; j < 4; ++j) { for(int k = 0; k < 16; ++k) { MMXPOS_HASHROUND(state[k], b, c, state[16 + k]); } } for(int k = 0; k < 32; ++k) { mem[i + k] = state[k]; } } } void calc_mem_hash(uint32_t* mem, uint8_t* hash, const int num_iter) { static constexpr int N = 32; uint32_t state[N]; for(int i = 0; i < N; ++i) { state[i] = mem[(N - 1) * N + i]; } for(int iter = 0; iter < num_iter; ++iter) { uint32_t sum = 0; for(int i = 0; i < N; ++i) { sum += rotl_32(state[i], i % 32); } const uint32_t dir = sum + (sum << 11) + (sum << 22); const uint32_t bits = (dir >> 22) % 32u; const uint32_t offset = (dir >> 27); for(int i = 0; i < N; ++i) { state[i] += rotl_32(mem[offset * N + (iter + i) % N], bits) ^ sum; } for(int i = 0; i < N; ++i) { mem[offset * N + i] ^= state[i]; } } ::memcpy(hash, state, N * 4); } } // pos } // mmx ================================================ FILE: src/pos/verify.cpp ================================================ /* * verify.cpp * * Created on: Nov 5, 2023 * Author: mad */ #include #include #include #include #ifdef WITH_CUDA #include #endif #include #include #include #include #include #include namespace mmx { namespace pos { static constexpr uint32_t MEM_SIZE = 32 * 32; static std::mutex g_mutex; static std::shared_ptr g_threads; static bool have_init = false; static bool remote_compute = false; void set_remote_compute(bool enable) { remote_compute = enable; } void compute_f1(std::vector* X_out, std::vector& Y_out, std::vector>& M_out, std::mutex& mutex, const uint32_t X, const hash_t& id, const int ksize, const int xbits) { const uint32_t kmask = ((uint64_t(1) << ksize) - 1); std::vector mem_buf(MEM_SIZE); for(uint32_t x_i = 0; x_i < (uint64_t(1) << xbits); ++x_i) { const uint32_t X_i = (X << xbits) | x_i; uint32_t msg[9] = {}; msg[0] = X_i; ::memcpy(msg + 1, id.data(), id.size()); const hash_512_t key(&msg, sizeof(msg)); gen_mem_array(mem_buf.data(), key.data(), MEM_SIZE); uint8_t mem_hash[64 + 128] = {}; ::memcpy(mem_hash, key.data(), key.size()); calc_mem_hash(mem_buf.data(), mem_hash + 64, MEM_HASH_ITER); const hash_512_t mem_hash_hash(mem_hash, sizeof(mem_hash)); uint32_t hash[16] = {}; ::memcpy(hash, mem_hash_hash.data(), mem_hash_hash.size()); uint32_t Y_i = 0; std::array meta = {}; for(int i = 0; i < N_META; ++i) { Y_i = Y_i ^ hash[i]; meta[i] = hash[i] & kmask; } Y_i &= kmask; std::lock_guard lock(mutex); if(X_out) { X_out->push_back(X_i); } Y_out.push_back(Y_i); M_out.push_back(meta); } } std::vector>> compute(const std::vector& X_values, std::vector* X_out, const hash_t& id, const int ksize, const int xbits) { if(ksize < 8 || ksize > 32) { throw std::logic_error("invalid ksize"); } if(xbits < 0 || xbits > ksize) { throw std::logic_error("invalid xbits"); } if(!have_init) { std::lock_guard lock(g_mutex); if(!have_init) { have_init = true; vnx::read_config("mmx_pos.remote_compute", remote_compute); } } if(remote_compute) { static thread_local std::unique_ptr server; if(!server) { server = std::make_unique("ProofServer"); } if(X_out) { X_out->clear(); } std::vector>> out; try { const auto res = server->compute(X_values, id, ksize, xbits); for(const auto& entry : res) { if(X_out) { X_out->insert(X_out->end(), entry.x_values.begin(), entry.x_values.end()); } out.emplace_back(entry.y, entry.meta); } } catch(const std::exception& ex) { throw std::runtime_error("remote compute failed with: " + std::string(ex.what())); } return out; } #ifdef WITH_CUDA if(have_cuda_recompute() && X_values.size() == 256) { const auto job = cuda_recompute(ksize, xbits, id, X_values); const auto res = cuda_recompute_poll({job}); if(res) { if(res->failed) { throw std::runtime_error("CUDA failed with: " + res->error); } if(X_out) { *X_out = res->X; } return res->entries; } } #endif const bool use_threads = (xbits >= 5); if(use_threads) { std::lock_guard lock(g_mutex); if(!g_threads) { const auto cpu_threads = std::thread::hardware_concurrency(); const auto num_threads = cpu_threads > 0 ? cpu_threads : 16; g_threads = std::make_shared(num_threads, 1024); vnx::log_info() << "Using " << num_threads << " CPU threads for proof recompute"; } } const auto X_set = std::set(X_values.begin(), X_values.end()); const uint64_t num_entries_1 = X_set.size() << xbits; std::mutex mutex; std::vector jobs; std::vector X_tmp; std::vector Y_tmp; std::vector mem_buf(MEM_SIZE); std::vector> M_tmp; // const auto t1_begin = get_time_ms(); if(X_out) { X_tmp.reserve(num_entries_1); } Y_tmp.reserve(num_entries_1); M_tmp.reserve(num_entries_1); for(const auto X : X_set) { if(use_threads) { const auto job = g_threads->add_task( [X_out, &X_tmp, &Y_tmp, &M_tmp, &mutex, X, id, ksize, xbits]() { compute_f1(X_out ? &X_tmp : nullptr, Y_tmp, M_tmp, mutex, X, id, ksize, xbits); }); jobs.push_back(job); } else { compute_f1(X_out ? &X_tmp : nullptr, Y_tmp, M_tmp, mutex, X, id, ksize, xbits); } } if(use_threads) { g_threads->sync(jobs); jobs.clear(); } // std::cout << "Table 1 took " << (get_time_ms() - t1_begin) << " ms" << std::endl; return compute_full(X_tmp, Y_tmp, M_tmp, X_out, id, ksize); } hash_t calc_quality(const hash_t& challenge, const bytes_t& meta) { // proof output needs to be hashed after challenge, otherwise compression to 256-bit is possible return hash_t(std::string("proof_quality") + challenge + meta); } bool check_post_filter(const hash_t& challenge, const bytes_t& meta, const int post_filter) { // proof output needs to be hashed after challenge, otherwise compression to 256-bit is possible const hash_t hash(std::string("post_filter") + challenge + meta); return (hash.to_uint256() >> (256 - post_filter)) == 0; } hash_t verify( const std::vector& X_values, const hash_t& challenge, const hash_t& id, const int plot_filter, const int post_filter, const int ksize, const bool hard_fork) { if(X_values.size() != (1 << (N_TABLE - 1))) { throw std::logic_error("invalid proof size"); } std::vector X_out; const auto entries = compute(X_values, &X_out, id, ksize, 0); if(entries.empty()) { throw std::logic_error("invalid proof"); } if(entries.size() > 1) { throw std::logic_error("more than one proof found"); } const auto& result = entries[0]; const auto& Y = result.first; const uint32_t kmask = ((uint64_t(1) << ksize) - 1); const uint32_t Y_0 = bytes_t<4>(challenge.data(), 4).to_uint() & kmask; const uint64_t Y_end = uint64_t(Y_0) + (1 << plot_filter); if((Y < Y_0) || (Y >= Y_end)) { throw std::logic_error("invalid Y value"); } if(X_out != X_values) { throw std::logic_error("invalid proof order"); } if(hard_fork) { if(!check_post_filter(challenge, result.second, post_filter)) { throw std::logic_error("post filter failed"); } return calc_proof_hash(challenge, X_out); } else { return calc_quality(challenge, result.second); } } } // pos } // mmx ================================================ FILE: src/pos/verify_full.cpp ================================================ /* * verify_full.cpp * * Created on: Feb 5, 2025 * Author: mad */ #include #include #include namespace mmx { namespace pos { std::vector>> compute_full( const std::vector& X_in, const std::vector& Y_in, std::vector>& M_in, std::vector* X_out, const hash_t& id, const int ksize) { if(M_in.size() != Y_in.size()) { throw std::logic_error("input length mismatch"); } const uint32_t kmask = ((uint64_t(1) << ksize) - 1); std::vector> M_tmp = std::move(M_in); std::vector> entries; std::vector>> LR_tmp(N_TABLE + 1); entries.reserve(Y_in.size()); for(size_t i = 0; i < Y_in.size(); ++i) { entries.emplace_back(Y_in[i], i); } // sort function for proof ordering (enforce unique proofs) const auto sort_func = [&M_tmp](const std::pair& L, const std::pair& R) -> bool { if(L.first == R.first) { return M_tmp[L.second] < M_tmp[R.second]; } return L < R; }; for(int t = 2; t <= N_TABLE; ++t) { // const auto time_begin = get_time_ms(); std::vector> M_next; std::vector> matches; std::sort(entries.begin(), entries.end(), sort_func); // std::cout << "Table " << t << " sort took " << (get_time_ms() - time_begin) << " ms" << std::endl; for(size_t x = 0; x < entries.size(); ++x) { const auto YL = entries[x].first; for(size_t y = x + 1; y < entries.size(); ++y) { const auto YR = entries[y].first; if(YR == YL + 1) { const auto PL = entries[x].second; const auto PR = entries[y].second; const auto& L_meta = M_tmp[PL]; const auto& R_meta = M_tmp[PR]; uint32_t hash[16] = {}; { uint32_t msg[N_META * 2] = {}; for(int i = 0; i < N_META; ++i) { msg[i] = L_meta[i]; msg[N_META + i] = R_meta[i]; } const hash_512_t tmp(&msg, sizeof(msg)); ::memcpy(hash, tmp.data(), tmp.size()); } uint32_t Y_i = 0; std::array meta = {}; for(int i = 0; i < N_META; ++i) { Y_i = Y_i ^ hash[i]; meta[i] = hash[i] & kmask; } Y_i &= kmask; matches.emplace_back(Y_i, M_next.size()); if(X_out) { LR_tmp[t].emplace_back(PL, PR); } M_next.push_back(meta); } else if(YR > YL) { break; } } } if(matches.empty()) { throw std::logic_error("zero matches at table " + std::to_string(t)); } M_tmp = std::move(M_next); entries = std::move(matches); // std::cout << "Table " << t << " took " << (get_time_ms() - time_begin) << " ms, " << entries.size() << " entries" << std::endl; } if(X_out) { X_out->clear(); } std::sort(entries.begin(), entries.end(), sort_func); std::set> M_set; std::vector>> out; for(const auto& entry : entries) { const auto& meta = M_tmp[entry.second]; if(!M_set.insert(meta).second) { continue; } out.emplace_back(entry.first, bytes_t(meta.data(), META_BYTES_OUT)); if(X_out && X_in.size() == Y_in.size()) { std::vector I_tmp; I_tmp.push_back(std::get<1>(entry)); for(int t = N_TABLE; t >= 2; --t) { std::vector I_next; for(const auto i : I_tmp) { I_next.push_back(LR_tmp[t][i].first); I_next.push_back(LR_tmp[t][i].second); } I_tmp = std::move(I_next); } for(const auto i : I_tmp) { X_out->push_back(X_in[i]); } } } return out; } } // pos } // mmx ================================================ FILE: src/pubkey_t.cpp ================================================ /* * pubkey_t.cpp * * Created on: Mar 30, 2023 * Author: mad */ #include #include namespace mmx { pubkey_t::pubkey_t(const skey_t& key) { secp256k1_pubkey pubkey; if(!secp256k1_ec_pubkey_create(g_secp256k1, &pubkey, key.data())) { throw std::logic_error("secp256k1_ec_pubkey_create() failed"); } *this = pubkey_t(pubkey); } pubkey_t::pubkey_t(const secp256k1_pubkey& key) { size_t len = size(); secp256k1_ec_pubkey_serialize(g_secp256k1, data(), &len, &key, SECP256K1_EC_COMPRESSED); if(len != 33) { throw std::logic_error("secp256k1_ec_pubkey_serialize(): length != 33"); } } secp256k1_pubkey pubkey_t::to_secp256k1() const { secp256k1_pubkey res; if(!secp256k1_ec_pubkey_parse(g_secp256k1, &res, data(), size())) { throw std::logic_error("secp256k1_ec_pubkey_parse() failed"); } return res; } } // mmx ================================================ FILE: src/secp256k1.cpp ================================================ /* * secp256k1.cpp * * Created on: Nov 28, 2021 * Author: mad */ #include namespace mmx { const secp256k1_context* g_secp256k1 = nullptr; static secp256k1_context* g_secp256k1_priv = nullptr; void secp256k1_init() { g_secp256k1_priv = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY); g_secp256k1 = g_secp256k1_priv; } void secp256k1_free() { g_secp256k1 = nullptr; secp256k1_context_destroy(g_secp256k1_priv); g_secp256k1_priv = nullptr; } } // mmx ================================================ FILE: src/sha256_64_x8.cpp ================================================ /* * sha256_64_x8.cpp * * Created on: Oct 17, 2022 * Author: mad */ #include #include #include #include void sha256_64_x8(uint8_t* out, uint8_t* in, const uint64_t length) { static bool have_avx2 = avx2_available(); static bool have_sha_ni = sha256_ni_available(); static bool have_sha_arm = sha256_arm_available(); if(length > 64 - 9) { throw std::logic_error("sha256_64_x8(): length too large"); } if(have_sha_ni) { for(int i = 0; i < 8; ++i) { sha256_ni(out + i * 32, in + i * 64, length); } } else if(have_sha_arm) { for(int i = 0; i < 8; ++i) { sha256_arm(out + i * 32, in + i * 64, length); } } else if(have_avx2) { sha256_avx2_64_x8(out, in, length); } else { for(int i = 0; i < 8; ++i) { const mmx::hash_t hash(in + i * 64, length); ::memcpy(out + i * 32, hash.data(), 32); } } } ================================================ FILE: src/sha256_arm.cpp ================================================ /* * sha256_arm.cpp * * Created on: Feb 21, 2024 * Author: mad, voidxno */ #include #include #include #if defined(__aarch64__) #include #include static const uint32_t K64[] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, }; inline uint32_t bswap_32(const uint32_t val) { return ((val & 0xFF) << 24) | ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8) | ((val & 0xFF000000) >> 24); } inline uint64_t bswap_64(const uint64_t val) { return (uint64_t(bswap_32(val)) << 32) | bswap_32(val >> 32); } static void compress_digest(uint32_t* state, const uint8_t* input, size_t blocks) { const uint8_t* input_mm = input; // Load initial values uint32x4_t STATE0 = vld1q_u32(&state[0]); uint32x4_t STATE1 = vld1q_u32(&state[4]); while(blocks > 0) { // Save current state const uint32x4_t ABCD_SAVE = STATE0; const uint32x4_t EFGH_SAVE = STATE1; uint32x4_t MSGV; uint32x4_t STATEV; uint32x4_t MSGTMP0 = vld1q_u32((const uint32_t*)(&input_mm[0])); uint32x4_t MSGTMP1 = vld1q_u32((const uint32_t*)(&input_mm[16])); uint32x4_t MSGTMP2 = vld1q_u32((const uint32_t*)(&input_mm[32])); uint32x4_t MSGTMP3 = vld1q_u32((const uint32_t*)(&input_mm[48])); MSGTMP0 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSGTMP0))); MSGTMP1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSGTMP1))); MSGTMP2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSGTMP2))); MSGTMP3 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(MSGTMP3))); // Rounds 0-3 MSGV = vaddq_u32(MSGTMP0, vld1q_u32(&K64[0])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP0 = vsha256su0q_u32(MSGTMP0, MSGTMP1); // Rounds 4-7 MSGV = vaddq_u32(MSGTMP1, vld1q_u32(&K64[4])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP0 = vsha256su1q_u32(MSGTMP0, MSGTMP2, MSGTMP3); MSGTMP1 = vsha256su0q_u32(MSGTMP1, MSGTMP2); // Rounds 8-11 MSGV = vaddq_u32(MSGTMP2, vld1q_u32(&K64[8])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP1 = vsha256su1q_u32(MSGTMP1, MSGTMP3, MSGTMP0); MSGTMP2 = vsha256su0q_u32(MSGTMP2, MSGTMP3); // Rounds 12-15 MSGV = vaddq_u32(MSGTMP3, vld1q_u32(&K64[12])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP2 = vsha256su1q_u32(MSGTMP2, MSGTMP0, MSGTMP1); MSGTMP3 = vsha256su0q_u32(MSGTMP3, MSGTMP0); // Rounds 16-19 MSGV = vaddq_u32(MSGTMP0, vld1q_u32(&K64[16])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP3 = vsha256su1q_u32(MSGTMP3, MSGTMP1, MSGTMP2); MSGTMP0 = vsha256su0q_u32(MSGTMP0, MSGTMP1); // Rounds 20-23 MSGV = vaddq_u32(MSGTMP1, vld1q_u32(&K64[20])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP0 = vsha256su1q_u32(MSGTMP0, MSGTMP2, MSGTMP3); MSGTMP1 = vsha256su0q_u32(MSGTMP1, MSGTMP2); // Rounds 24-27 MSGV = vaddq_u32(MSGTMP2, vld1q_u32(&K64[24])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP1 = vsha256su1q_u32(MSGTMP1, MSGTMP3, MSGTMP0); MSGTMP2 = vsha256su0q_u32(MSGTMP2, MSGTMP3); // Rounds 28-31 MSGV = vaddq_u32(MSGTMP3, vld1q_u32(&K64[28])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP2 = vsha256su1q_u32(MSGTMP2, MSGTMP0, MSGTMP1); MSGTMP3 = vsha256su0q_u32(MSGTMP3, MSGTMP0); // Rounds 32-35 MSGV = vaddq_u32(MSGTMP0, vld1q_u32(&K64[32])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP3 = vsha256su1q_u32(MSGTMP3, MSGTMP1, MSGTMP2); MSGTMP0 = vsha256su0q_u32(MSGTMP0, MSGTMP1); // Rounds 36-39 MSGV = vaddq_u32(MSGTMP1, vld1q_u32(&K64[36])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP0 = vsha256su1q_u32(MSGTMP0, MSGTMP2, MSGTMP3); MSGTMP1 = vsha256su0q_u32(MSGTMP1, MSGTMP2); // Rounds 40-43 MSGV = vaddq_u32(MSGTMP2, vld1q_u32(&K64[40])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP1 = vsha256su1q_u32(MSGTMP1, MSGTMP3, MSGTMP0); MSGTMP2 = vsha256su0q_u32(MSGTMP2, MSGTMP3); // Rounds 44-47 MSGV = vaddq_u32(MSGTMP3, vld1q_u32(&K64[44])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP2 = vsha256su1q_u32(MSGTMP2, MSGTMP0, MSGTMP1); MSGTMP3 = vsha256su0q_u32(MSGTMP3, MSGTMP0); // Rounds 48-51 MSGV = vaddq_u32(MSGTMP0, vld1q_u32(&K64[48])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); MSGTMP3 = vsha256su1q_u32(MSGTMP3, MSGTMP1, MSGTMP2); // Rounds 52-55 MSGV = vaddq_u32(MSGTMP1, vld1q_u32(&K64[52])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); // Rounds 56-59 MSGV = vaddq_u32(MSGTMP2, vld1q_u32(&K64[56])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); // Rounds 60-63 MSGV = vaddq_u32(MSGTMP3, vld1q_u32(&K64[60])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0, STATE1, MSGV); STATE1 = vsha256h2q_u32(STATE1, STATEV, MSGV); // Add values back to state STATE0 = vaddq_u32(STATE0, ABCD_SAVE); STATE1 = vaddq_u32(STATE1, EFGH_SAVE); input_mm = &input_mm[64]; blocks--; } // Save state vst1q_u32(&state[0], STATE0); vst1q_u32(&state[4], STATE1); } void sha256_arm(uint8_t* out, const uint8_t* in, const uint64_t length) { uint32_t state[] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; const auto num_blocks = length / 64; if(num_blocks) { compress_digest(state, in, num_blocks); } const auto remain = length % 64; const auto final_blocks = (remain + 9 + 63) / 64; const uint64_t num_bits = bswap_64(length * 8); const uint8_t end_bit = 0x80; uint8_t last[128] = {}; ::memcpy(last, in + num_blocks * 64, remain); ::memset(last + remain, 0, sizeof(last) - remain); ::memcpy(last + remain, &end_bit, 1); ::memcpy(last + final_blocks * 64 - 8, &num_bits, 8); compress_digest(state, last, final_blocks); for(int k = 0; k < 8; ++k) { state[k] = bswap_32(state[k]); } ::memcpy(out, state, 32); } bool sha256_arm_available() { // ARM Cryptography Extensions (SHA256 feature) // ID_AA64ISAR0_EL1 feature register, bits 15-12 (SHA2) // user space detect through getauxval() return (getauxval(AT_HWCAP) & HWCAP_SHA2) ? true : false; } #else // __aarch64__ void sha256_arm(uint8_t* out, const uint8_t* in, const uint64_t length) { throw std::logic_error("sha256_arm() not available"); } bool sha256_arm_available() { return false; } #endif // __aarch64__ ================================================ FILE: src/sha256_arm_rec.cpp ================================================ /* * sha256_arm_rec.cpp * * Created on: Feb 21, 2024 * Author: mad, voidxno */ // prerequisite: length is 32 bytes (recursive sha256) // prerequisite: length is 64 bytes, 2x 32bytes (_x2) // optimization: https://github.com/voidxno/fast-recursive-sha256 #include #include #include #if defined(__aarch64__) #include void recursive_sha256_arm(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // init values static const uint32_t abcdinit[4] = {0x6A09E667,0xBB67AE85,0x3C6EF372,0xA54FF53A}; static const uint32_t efghinit[4] = {0x510E527F,0x9B05688C,0x1F83D9AB,0x5BE0CD19}; const uint32x4_t ABCD_INIT = vld1q_u32(&abcdinit[0]); const uint32x4_t EFGH_INIT = vld1q_u32(&efghinit[0]); // pre-calc/cache padding static const uint32_t hpad0cache[4] = {0x80000000,0x00000000,0x00000000,0x00000000}; static const uint32_t hpad1cache[4] = {0x00000000,0x00000000,0x00000000,0x00000100}; const uint32x4_t HPAD0_CACHE = vld1q_u32(&hpad0cache[0]); const uint32x4_t HPAD1_CACHE = vld1q_u32(&hpad1cache[0]); uint32x4_t STATE0; uint32x4_t STATE1; uint32x4_t STATEV; uint32x4_t MSGV; uint32x4_t MSGTMP0; uint32x4_t MSGTMP1; uint32x4_t MSGTMP2; uint32x4_t MSGTMP3; // init/shuffle hash uint32x4_t HASH0_SAVE = vld1q_u32((const uint32_t*)(&hash[0])); uint32x4_t HASH1_SAVE = vld1q_u32((const uint32_t*)(&hash[16])); HASH0_SAVE = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE))); HASH1_SAVE = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE))); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0 = ABCD_INIT; STATE1 = EFGH_INIT; // rounds 0-3 MSGV = vaddq_u32(HASH0_SAVE,vld1q_u32(&K64[0])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); MSGTMP0 = vsha256su0q_u32(HASH0_SAVE,HASH1_SAVE); // rounds 4-7 MSGV = vaddq_u32(HASH1_SAVE,vld1q_u32(&K64[4])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); MSGTMP0 = vsha256su1q_u32(MSGTMP0,HPAD0_CACHE,HPAD1_CACHE); MSGTMP1 = vsha256su0q_u32(HASH1_SAVE,HPAD0_CACHE); // rounds 8-11 MSGV = vaddq_u32(HPAD0_CACHE,vld1q_u32(&K64[8])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); MSGTMP1 = vsha256su1q_u32(MSGTMP1,HPAD1_CACHE,MSGTMP0); MSGTMP2 = HPAD0_CACHE; // rounds 12-15 MSGV = vaddq_u32(HPAD1_CACHE,vld1q_u32(&K64[12])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); MSGTMP2 = vsha256su1q_u32(MSGTMP2,MSGTMP0,MSGTMP1); MSGTMP3 = vsha256su0q_u32(HPAD1_CACHE,MSGTMP0); #define SHA256ROUND( \ msgv, msgtmp0, msgtmp1, msgtmp2, msgtmp3, statev, state0, state1, kvalue) \ msgv = vaddq_u32(msgtmp0,vld1q_u32(kvalue)); \ statev = state0; \ state0 = vsha256hq_u32(state0,state1,msgv); \ state1 = vsha256h2q_u32(state1,statev,msgv); \ msgtmp3 = vsha256su1q_u32(msgtmp3,msgtmp1,msgtmp2); \ msgtmp0 = vsha256su0q_u32(msgtmp0,msgtmp1); // rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND(MSGV,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATEV,STATE0,STATE1,&K64[16]); SHA256ROUND(MSGV,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATEV,STATE0,STATE1,&K64[20]); SHA256ROUND(MSGV,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATEV,STATE0,STATE1,&K64[24]); SHA256ROUND(MSGV,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATEV,STATE0,STATE1,&K64[28]); // rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND(MSGV,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATEV,STATE0,STATE1,&K64[32]); SHA256ROUND(MSGV,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATEV,STATE0,STATE1,&K64[36]); SHA256ROUND(MSGV,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATEV,STATE0,STATE1,&K64[40]); SHA256ROUND(MSGV,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATEV,STATE0,STATE1,&K64[44]); // rounds 48-51 MSGV = vaddq_u32(MSGTMP0,vld1q_u32(&K64[48])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); MSGTMP3 = vsha256su1q_u32(MSGTMP3,MSGTMP1,MSGTMP2); // rounds 52-55 MSGV = vaddq_u32(MSGTMP1,vld1q_u32(&K64[52])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); // rounds 56-59 MSGV = vaddq_u32(MSGTMP2,vld1q_u32(&K64[56])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); // rounds 60-63 MSGV = vaddq_u32(MSGTMP3,vld1q_u32(&K64[60])); STATEV = STATE0; STATE0 = vsha256hq_u32(STATE0,STATE1,MSGV); STATE1 = vsha256h2q_u32(STATE1,STATEV,MSGV); // add to state HASH0_SAVE = vaddq_u32(STATE0,ABCD_INIT); HASH1_SAVE = vaddq_u32(STATE1,EFGH_INIT); } // shuffle/return hash HASH0_SAVE = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE))); HASH1_SAVE = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE))); vst1q_u32((uint32_t*)(&hash[0]),HASH0_SAVE); vst1q_u32((uint32_t*)(&hash[16]),HASH1_SAVE); } void recursive_sha256_arm_x2(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // init values static const uint32_t abcdinit[4] = {0x6A09E667,0xBB67AE85,0x3C6EF372,0xA54FF53A}; static const uint32_t efghinit[4] = {0x510E527F,0x9B05688C,0x1F83D9AB,0x5BE0CD19}; const uint32x4_t ABCD_INIT = vld1q_u32(&abcdinit[0]); const uint32x4_t EFGH_INIT = vld1q_u32(&efghinit[0]); // pre-calc/cache padding static const uint32_t hpad0cache[4] = {0x80000000,0x00000000,0x00000000,0x00000000}; static const uint32_t hpad1cache[4] = {0x00000000,0x00000000,0x00000000,0x00000100}; const uint32x4_t HPAD0_CACHE = vld1q_u32(&hpad0cache[0]); const uint32x4_t HPAD1_CACHE = vld1q_u32(&hpad1cache[0]); uint32x4_t STATE0_P1; uint32x4_t STATE1_P1; uint32x4_t STATEV_P1; uint32x4_t MSGV_P1; uint32x4_t MSGTMP0_P1; uint32x4_t MSGTMP1_P1; uint32x4_t MSGTMP2_P1; uint32x4_t MSGTMP3_P1; uint32x4_t STATE0_P2; uint32x4_t STATE1_P2; uint32x4_t STATEV_P2; uint32x4_t MSGV_P2; uint32x4_t MSGTMP0_P2; uint32x4_t MSGTMP1_P2; uint32x4_t MSGTMP2_P2; uint32x4_t MSGTMP3_P2; // init/shuffle hash uint32x4_t HASH0_SAVE_P1 = vld1q_u32((const uint32_t*)(&hash[0])); uint32x4_t HASH1_SAVE_P1 = vld1q_u32((const uint32_t*)(&hash[16])); uint32x4_t HASH0_SAVE_P2 = vld1q_u32((const uint32_t*)(&hash[32])); uint32x4_t HASH1_SAVE_P2 = vld1q_u32((const uint32_t*)(&hash[48])); HASH0_SAVE_P1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE_P1))); HASH1_SAVE_P1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE_P1))); HASH0_SAVE_P2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE_P2))); HASH1_SAVE_P2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE_P2))); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0_P1 = ABCD_INIT; STATE0_P2 = ABCD_INIT; STATE1_P1 = EFGH_INIT; STATE1_P2 = EFGH_INIT; // rounds 0-3 MSGV_P1 = vaddq_u32(HASH0_SAVE_P1,vld1q_u32(&K64[0])); MSGV_P2 = vaddq_u32(HASH0_SAVE_P2,vld1q_u32(&K64[0])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); MSGTMP0_P1 = vsha256su0q_u32(HASH0_SAVE_P1,HASH1_SAVE_P1); MSGTMP0_P2 = vsha256su0q_u32(HASH0_SAVE_P2,HASH1_SAVE_P2); // rounds 4-7 MSGV_P1 = vaddq_u32(HASH1_SAVE_P1,vld1q_u32(&K64[4])); MSGV_P2 = vaddq_u32(HASH1_SAVE_P2,vld1q_u32(&K64[4])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); MSGTMP0_P1 = vsha256su1q_u32(MSGTMP0_P1,HPAD0_CACHE,HPAD1_CACHE); MSGTMP0_P2 = vsha256su1q_u32(MSGTMP0_P2,HPAD0_CACHE,HPAD1_CACHE); MSGTMP1_P1 = vsha256su0q_u32(HASH1_SAVE_P1,HPAD0_CACHE); MSGTMP1_P2 = vsha256su0q_u32(HASH1_SAVE_P2,HPAD0_CACHE); // rounds 8-11 MSGV_P1 = vaddq_u32(HPAD0_CACHE,vld1q_u32(&K64[8])); MSGV_P2 = vaddq_u32(HPAD0_CACHE,vld1q_u32(&K64[8])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); MSGTMP1_P1 = vsha256su1q_u32(MSGTMP1_P1,HPAD1_CACHE,MSGTMP0_P1); MSGTMP1_P2 = vsha256su1q_u32(MSGTMP1_P2,HPAD1_CACHE,MSGTMP0_P2); MSGTMP2_P1 = HPAD0_CACHE; MSGTMP2_P2 = HPAD0_CACHE; // rounds 12-15 MSGV_P1 = vaddq_u32(HPAD1_CACHE,vld1q_u32(&K64[12])); MSGV_P2 = vaddq_u32(HPAD1_CACHE,vld1q_u32(&K64[12])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); MSGTMP2_P1 = vsha256su1q_u32(MSGTMP2_P1,MSGTMP0_P1,MSGTMP1_P1); MSGTMP2_P2 = vsha256su1q_u32(MSGTMP2_P2,MSGTMP0_P2,MSGTMP1_P2); MSGTMP3_P1 = vsha256su0q_u32(HPAD1_CACHE,MSGTMP0_P1); MSGTMP3_P2 = vsha256su0q_u32(HPAD1_CACHE,MSGTMP0_P2); #define SHA256ROUND_X2( \ msgv_p1, msgtmp0_p1, msgtmp1_p1, msgtmp2_p1, msgtmp3_p1, statev_p1, state0_p1, state1_p1, \ msgv_p2, msgtmp0_p2, msgtmp1_p2, msgtmp2_p2, msgtmp3_p2, statev_p2, state0_p2, state1_p2, kvalue) \ msgv_p1 = vaddq_u32(msgtmp0_p1,vld1q_u32(kvalue)); \ msgv_p2 = vaddq_u32(msgtmp0_p2,vld1q_u32(kvalue)); \ statev_p1 = state0_p1; \ statev_p2 = state0_p2; \ state0_p1 = vsha256hq_u32(state0_p1,state1_p1,msgv_p1); \ state0_p2 = vsha256hq_u32(state0_p2,state1_p2,msgv_p2); \ state1_p1 = vsha256h2q_u32(state1_p1,statev_p1,msgv_p1); \ state1_p2 = vsha256h2q_u32(state1_p2,statev_p2,msgv_p2); \ msgtmp3_p1 = vsha256su1q_u32(msgtmp3_p1,msgtmp1_p1,msgtmp2_p1); \ msgtmp3_p2 = vsha256su1q_u32(msgtmp3_p2,msgtmp1_p2,msgtmp2_p2); \ msgtmp0_p1 = vsha256su0q_u32(msgtmp0_p1,msgtmp1_p1); \ msgtmp0_p2 = vsha256su0q_u32(msgtmp0_p2,msgtmp1_p2); // rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND_X2(MSGV_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[16]); SHA256ROUND_X2(MSGV_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[20]); SHA256ROUND_X2(MSGV_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[24]); SHA256ROUND_X2(MSGV_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[28]); // rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND_X2(MSGV_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[32]); SHA256ROUND_X2(MSGV_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[36]); SHA256ROUND_X2(MSGV_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[40]); SHA256ROUND_X2(MSGV_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATEV_P1,STATE0_P1,STATE1_P1,MSGV_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATEV_P2,STATE0_P2,STATE1_P2,&K64[44]); // rounds 48-51 MSGV_P1 = vaddq_u32(MSGTMP0_P1,vld1q_u32(&K64[48])); MSGV_P2 = vaddq_u32(MSGTMP0_P2,vld1q_u32(&K64[48])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); MSGTMP3_P1 = vsha256su1q_u32(MSGTMP3_P1,MSGTMP1_P1,MSGTMP2_P1); MSGTMP3_P2 = vsha256su1q_u32(MSGTMP3_P2,MSGTMP1_P2,MSGTMP2_P2); // rounds 52-55 MSGV_P1 = vaddq_u32(MSGTMP1_P1,vld1q_u32(&K64[52])); MSGV_P2 = vaddq_u32(MSGTMP1_P2,vld1q_u32(&K64[52])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); // rounds 56-59 MSGV_P1 = vaddq_u32(MSGTMP2_P1,vld1q_u32(&K64[56])); MSGV_P2 = vaddq_u32(MSGTMP2_P2,vld1q_u32(&K64[56])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); // rounds 60-63 MSGV_P1 = vaddq_u32(MSGTMP3_P1,vld1q_u32(&K64[60])); MSGV_P2 = vaddq_u32(MSGTMP3_P2,vld1q_u32(&K64[60])); STATEV_P1 = STATE0_P1; STATEV_P2 = STATE0_P2; STATE0_P1 = vsha256hq_u32(STATE0_P1,STATE1_P1,MSGV_P1); STATE0_P2 = vsha256hq_u32(STATE0_P2,STATE1_P2,MSGV_P2); STATE1_P1 = vsha256h2q_u32(STATE1_P1,STATEV_P1,MSGV_P1); STATE1_P2 = vsha256h2q_u32(STATE1_P2,STATEV_P2,MSGV_P2); // add to state HASH0_SAVE_P1 = vaddq_u32(STATE0_P1,ABCD_INIT); HASH0_SAVE_P2 = vaddq_u32(STATE0_P2,ABCD_INIT); HASH1_SAVE_P1 = vaddq_u32(STATE1_P1,EFGH_INIT); HASH1_SAVE_P2 = vaddq_u32(STATE1_P2,EFGH_INIT); } // shuffle/return hash HASH0_SAVE_P1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE_P1))); HASH1_SAVE_P1 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE_P1))); HASH0_SAVE_P2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH0_SAVE_P2))); HASH1_SAVE_P2 = vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(HASH1_SAVE_P2))); vst1q_u32((uint32_t*)(&hash[0]),HASH0_SAVE_P1); vst1q_u32((uint32_t*)(&hash[16]),HASH1_SAVE_P1); vst1q_u32((uint32_t*)(&hash[32]),HASH0_SAVE_P2); vst1q_u32((uint32_t*)(&hash[48]),HASH1_SAVE_P2); } #else // __aarch64__ void recursive_sha256_arm(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_arm() not available"); } void recursive_sha256_arm_x2(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_arm_x2() not available"); } #endif // __aarch64__ ================================================ FILE: src/sha256_avx2.cpp ================================================ /* * sha256_avx2.cpp * * Created on: Jul 19, 2022 * Author: mad */ #include #include #include #include #include #include #if defined(__AVX2__) || defined(_WIN32) #include #ifdef _WIN32 #include #define cpuid(info, x) __cpuidex(info, x, 0) #else #include inline void cpuid(int info[4], int InfoType) { __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); } #endif static uint64_t xgetbv() { #if defined(_MSC_VER) return _xgetbv(0); #else uint32_t eax = 0, edx = 0; __asm__ __volatile__("xgetbv\n" : "=a"(eax), "=d"(edx) : "c"(0)); return ((uint64_t)edx << 32) | eax; #endif } #define u32 uint32_t #define u256 __m256i static const u32 RC[] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; #define XOR _mm256_xor_si256 #define OR _mm256_or_si256 #define AND _mm256_and_si256 #define ADD32 _mm256_add_epi32 #define NOT(x) _mm256_xor_si256(x, _mm256_set_epi32(-1, -1, -1, -1, -1, -1, -1, -1)) #define LOAD(src) _mm256_loadu_si256((__m256i *)(src)) #define STORE(dest,src) _mm256_storeu_si256((__m256i *)(dest),src) #define SHIFTR32(x, y) _mm256_srli_epi32(x, y) #define SHIFTL32(x, y) _mm256_slli_epi32(x, y) #define ROTR32(x, y) OR(SHIFTR32(x, y), SHIFTL32(x, 32 - y)) #define ROTL32(x, y) OR(SHIFTL32(x, y), SHIFTR32(x, 32 - y)) #define XOR3(a, b, c) XOR(XOR(a, b), c) #define ADD3_32(a, b, c) ADD32(ADD32(a, b), c) #define ADD4_32(a, b, c, d) ADD32(ADD32(ADD32(a, b), c), d) #define ADD5_32(a, b, c, d, e) ADD32(ADD32(ADD32(ADD32(a, b), c), d), e) #define MAJ_AVX(a, b, c) XOR3(AND(a, b), AND(a, c), AND(b, c)) #define CH_AVX(a, b, c) XOR(AND(a, b), AND(NOT(a), c)) #define SIGMA1_AVX(x) XOR3(ROTR32(x, 6), ROTR32(x, 11), ROTR32(x, 25)) #define SIGMA0_AVX(x) XOR3(ROTR32(x, 2), ROTR32(x, 13), ROTR32(x, 22)) #define WSIGMA1_AVX(x) XOR3(ROTR32(x, 17), ROTR32(x, 19), SHIFTR32(x, 10)) #define WSIGMA0_AVX(x) XOR3(ROTR32(x, 7), ROTR32(x, 18), SHIFTR32(x, 3)) #define SHA256ROUND_AVX(a, b, c, d, e, f, g, h, rc, w) \ T0 = ADD5_32(h, SIGMA1_AVX(e), CH_AVX(e, f, g), _mm256_set1_epi32(RC[rc]), w); \ d = ADD32(d, T0); \ T1 = ADD32(SIGMA0_AVX(a), MAJ_AVX(a, b, c)); \ h = ADD32(T0, T1); inline uint32_t bswap_32(const uint32_t val) { return ((val & 0xFF) << 24) | ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8) | ((val & 0xFF000000) >> 24); } inline uint64_t bswap_64(const uint64_t val) { return (uint64_t(bswap_32(val)) << 32) | bswap_32(val >> 32); } // Transpose 8 vectors containing 32-bit values inline void transpose(u256 s[8]) { u256 tmp0[8]; u256 tmp1[8]; tmp0[0] = _mm256_unpacklo_epi32(s[0], s[1]); tmp0[1] = _mm256_unpackhi_epi32(s[0], s[1]); tmp0[2] = _mm256_unpacklo_epi32(s[2], s[3]); tmp0[3] = _mm256_unpackhi_epi32(s[2], s[3]); tmp0[4] = _mm256_unpacklo_epi32(s[4], s[5]); tmp0[5] = _mm256_unpackhi_epi32(s[4], s[5]); tmp0[6] = _mm256_unpacklo_epi32(s[6], s[7]); tmp0[7] = _mm256_unpackhi_epi32(s[6], s[7]); tmp1[0] = _mm256_unpacklo_epi64(tmp0[0], tmp0[2]); tmp1[1] = _mm256_unpackhi_epi64(tmp0[0], tmp0[2]); tmp1[2] = _mm256_unpacklo_epi64(tmp0[1], tmp0[3]); tmp1[3] = _mm256_unpackhi_epi64(tmp0[1], tmp0[3]); tmp1[4] = _mm256_unpacklo_epi64(tmp0[4], tmp0[6]); tmp1[5] = _mm256_unpackhi_epi64(tmp0[4], tmp0[6]); tmp1[6] = _mm256_unpacklo_epi64(tmp0[5], tmp0[7]); tmp1[7] = _mm256_unpackhi_epi64(tmp0[5], tmp0[7]); s[0] = _mm256_permute2x128_si256(tmp1[0], tmp1[4], 0x20); s[1] = _mm256_permute2x128_si256(tmp1[1], tmp1[5], 0x20); s[2] = _mm256_permute2x128_si256(tmp1[2], tmp1[6], 0x20); s[3] = _mm256_permute2x128_si256(tmp1[3], tmp1[7], 0x20); s[4] = _mm256_permute2x128_si256(tmp1[0], tmp1[4], 0x31); s[5] = _mm256_permute2x128_si256(tmp1[1], tmp1[5], 0x31); s[6] = _mm256_permute2x128_si256(tmp1[2], tmp1[6], 0x31); s[7] = _mm256_permute2x128_si256(tmp1[3], tmp1[7], 0x31); } void sha256_avx2_64_x8(uint8_t* out, uint8_t* in, const uint64_t length) { if(length >= 56) { throw std::logic_error("length >= 56"); } const uint8_t end_bit = 0x80; const uint64_t num_bits = bswap_64(length * 8); const __m128i MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b, 0x0405060700010203); for(int i = 0; i < 8; ++i) { ::memset(in + i * 64 + length, 0, 64 - length); ::memcpy(in + i * 64 + length, &end_bit, 1); ::memcpy(in + i * 64 + 56, &num_bits, 8); __m128i* input_mm = reinterpret_cast<__m128i*>(in + i * 64); for(int k = 0; k < 4; ++k) { input_mm[k] = _mm_shuffle_epi8(input_mm[k], MASK); } } u256 s[8], w[64], T0, T1; // Load words and transform data correctly for(int i = 0; i < 8; i++) { w[i] = LOAD(in + 64*i); w[i + 8] = LOAD(in + 32 + 64*i); } transpose(w); transpose(w + 8); // Initial State s[0] = _mm256_set_epi32(0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667); s[1] = _mm256_set_epi32(0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85); s[2] = _mm256_set_epi32(0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372); s[3] = _mm256_set_epi32(0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a); s[4] = _mm256_set_epi32(0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f); s[5] = _mm256_set_epi32(0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c); s[6] = _mm256_set_epi32(0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab); s[7] = _mm256_set_epi32(0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 0, w[0]); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 1, w[1]); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 2, w[2]); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 3, w[3]); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 4, w[4]); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 5, w[5]); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 6, w[6]); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 7, w[7]); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 8, w[8]); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 9, w[9]); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 10, w[10]); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 11, w[11]); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 12, w[12]); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 13, w[13]); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 14, w[14]); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 15, w[15]); w[16] = ADD4_32(WSIGMA1_AVX(w[14]), w[0], w[9], WSIGMA0_AVX(w[1])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 16, w[16]); w[17] = ADD4_32(WSIGMA1_AVX(w[15]), w[1], w[10], WSIGMA0_AVX(w[2])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 17, w[17]); w[18] = ADD4_32(WSIGMA1_AVX(w[16]), w[2], w[11], WSIGMA0_AVX(w[3])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 18, w[18]); w[19] = ADD4_32(WSIGMA1_AVX(w[17]), w[3], w[12], WSIGMA0_AVX(w[4])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 19, w[19]); w[20] = ADD4_32(WSIGMA1_AVX(w[18]), w[4], w[13], WSIGMA0_AVX(w[5])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 20, w[20]); w[21] = ADD4_32(WSIGMA1_AVX(w[19]), w[5], w[14], WSIGMA0_AVX(w[6])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 21, w[21]); w[22] = ADD4_32(WSIGMA1_AVX(w[20]), w[6], w[15], WSIGMA0_AVX(w[7])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 22, w[22]); w[23] = ADD4_32(WSIGMA1_AVX(w[21]), w[7], w[16], WSIGMA0_AVX(w[8])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 23, w[23]); w[24] = ADD4_32(WSIGMA1_AVX(w[22]), w[8], w[17], WSIGMA0_AVX(w[9])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 24, w[24]); w[25] = ADD4_32(WSIGMA1_AVX(w[23]), w[9], w[18], WSIGMA0_AVX(w[10])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 25, w[25]); w[26] = ADD4_32(WSIGMA1_AVX(w[24]), w[10], w[19], WSIGMA0_AVX(w[11])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 26, w[26]); w[27] = ADD4_32(WSIGMA1_AVX(w[25]), w[11], w[20], WSIGMA0_AVX(w[12])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 27, w[27]); w[28] = ADD4_32(WSIGMA1_AVX(w[26]), w[12], w[21], WSIGMA0_AVX(w[13])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 28, w[28]); w[29] = ADD4_32(WSIGMA1_AVX(w[27]), w[13], w[22], WSIGMA0_AVX(w[14])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 29, w[29]); w[30] = ADD4_32(WSIGMA1_AVX(w[28]), w[14], w[23], WSIGMA0_AVX(w[15])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 30, w[30]); w[31] = ADD4_32(WSIGMA1_AVX(w[29]), w[15], w[24], WSIGMA0_AVX(w[16])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 31, w[31]); w[32] = ADD4_32(WSIGMA1_AVX(w[30]), w[16], w[25], WSIGMA0_AVX(w[17])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 32, w[32]); w[33] = ADD4_32(WSIGMA1_AVX(w[31]), w[17], w[26], WSIGMA0_AVX(w[18])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 33, w[33]); w[34] = ADD4_32(WSIGMA1_AVX(w[32]), w[18], w[27], WSIGMA0_AVX(w[19])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 34, w[34]); w[35] = ADD4_32(WSIGMA1_AVX(w[33]), w[19], w[28], WSIGMA0_AVX(w[20])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 35, w[35]); w[36] = ADD4_32(WSIGMA1_AVX(w[34]), w[20], w[29], WSIGMA0_AVX(w[21])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 36, w[36]); w[37] = ADD4_32(WSIGMA1_AVX(w[35]), w[21], w[30], WSIGMA0_AVX(w[22])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 37, w[37]); w[38] = ADD4_32(WSIGMA1_AVX(w[36]), w[22], w[31], WSIGMA0_AVX(w[23])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 38, w[38]); w[39] = ADD4_32(WSIGMA1_AVX(w[37]), w[23], w[32], WSIGMA0_AVX(w[24])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 39, w[39]); w[40] = ADD4_32(WSIGMA1_AVX(w[38]), w[24], w[33], WSIGMA0_AVX(w[25])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 40, w[40]); w[41] = ADD4_32(WSIGMA1_AVX(w[39]), w[25], w[34], WSIGMA0_AVX(w[26])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 41, w[41]); w[42] = ADD4_32(WSIGMA1_AVX(w[40]), w[26], w[35], WSIGMA0_AVX(w[27])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 42, w[42]); w[43] = ADD4_32(WSIGMA1_AVX(w[41]), w[27], w[36], WSIGMA0_AVX(w[28])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 43, w[43]); w[44] = ADD4_32(WSIGMA1_AVX(w[42]), w[28], w[37], WSIGMA0_AVX(w[29])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 44, w[44]); w[45] = ADD4_32(WSIGMA1_AVX(w[43]), w[29], w[38], WSIGMA0_AVX(w[30])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 45, w[45]); w[46] = ADD4_32(WSIGMA1_AVX(w[44]), w[30], w[39], WSIGMA0_AVX(w[31])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 46, w[46]); w[47] = ADD4_32(WSIGMA1_AVX(w[45]), w[31], w[40], WSIGMA0_AVX(w[32])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 47, w[47]); w[48] = ADD4_32(WSIGMA1_AVX(w[46]), w[32], w[41], WSIGMA0_AVX(w[33])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 48, w[48]); w[49] = ADD4_32(WSIGMA1_AVX(w[47]), w[33], w[42], WSIGMA0_AVX(w[34])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 49, w[49]); w[50] = ADD4_32(WSIGMA1_AVX(w[48]), w[34], w[43], WSIGMA0_AVX(w[35])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 50, w[50]); w[51] = ADD4_32(WSIGMA1_AVX(w[49]), w[35], w[44], WSIGMA0_AVX(w[36])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 51, w[51]); w[52] = ADD4_32(WSIGMA1_AVX(w[50]), w[36], w[45], WSIGMA0_AVX(w[37])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 52, w[52]); w[53] = ADD4_32(WSIGMA1_AVX(w[51]), w[37], w[46], WSIGMA0_AVX(w[38])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 53, w[53]); w[54] = ADD4_32(WSIGMA1_AVX(w[52]), w[38], w[47], WSIGMA0_AVX(w[39])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 54, w[54]); w[55] = ADD4_32(WSIGMA1_AVX(w[53]), w[39], w[48], WSIGMA0_AVX(w[40])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 55, w[55]); w[56] = ADD4_32(WSIGMA1_AVX(w[54]), w[40], w[49], WSIGMA0_AVX(w[41])); SHA256ROUND_AVX(s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], 56, w[56]); w[57] = ADD4_32(WSIGMA1_AVX(w[55]), w[41], w[50], WSIGMA0_AVX(w[42])); SHA256ROUND_AVX(s[7], s[0], s[1], s[2], s[3], s[4], s[5], s[6], 57, w[57]); w[58] = ADD4_32(WSIGMA1_AVX(w[56]), w[42], w[51], WSIGMA0_AVX(w[43])); SHA256ROUND_AVX(s[6], s[7], s[0], s[1], s[2], s[3], s[4], s[5], 58, w[58]); w[59] = ADD4_32(WSIGMA1_AVX(w[57]), w[43], w[52], WSIGMA0_AVX(w[44])); SHA256ROUND_AVX(s[5], s[6], s[7], s[0], s[1], s[2], s[3], s[4], 59, w[59]); w[60] = ADD4_32(WSIGMA1_AVX(w[58]), w[44], w[53], WSIGMA0_AVX(w[45])); SHA256ROUND_AVX(s[4], s[5], s[6], s[7], s[0], s[1], s[2], s[3], 60, w[60]); w[61] = ADD4_32(WSIGMA1_AVX(w[59]), w[45], w[54], WSIGMA0_AVX(w[46])); SHA256ROUND_AVX(s[3], s[4], s[5], s[6], s[7], s[0], s[1], s[2], 61, w[61]); w[62] = ADD4_32(WSIGMA1_AVX(w[60]), w[46], w[55], WSIGMA0_AVX(w[47])); SHA256ROUND_AVX(s[2], s[3], s[4], s[5], s[6], s[7], s[0], s[1], 62, w[62]); w[63] = ADD4_32(WSIGMA1_AVX(w[61]), w[47], w[56], WSIGMA0_AVX(w[48])); SHA256ROUND_AVX(s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[0], 63, w[63]); // Feed Forward s[0] = ADD32(s[0], _mm256_set_epi32(0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667,0x6a09e667)); s[1] = ADD32(s[1], _mm256_set_epi32(0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85,0xbb67ae85)); s[2] = ADD32(s[2], _mm256_set_epi32(0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372,0x3c6ef372)); s[3] = ADD32(s[3], _mm256_set_epi32(0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a,0xa54ff53a)); s[4] = ADD32(s[4], _mm256_set_epi32(0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f,0x510e527f)); s[5] = ADD32(s[5], _mm256_set_epi32(0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c,0x9b05688c)); s[6] = ADD32(s[6], _mm256_set_epi32(0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab,0x1f83d9ab)); s[7] = ADD32(s[7], _mm256_set_epi32(0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19,0x5be0cd19)); // Transpose data again to get correct output transpose(s); // Store Hash value for(int i = 0; i < 8; i++) { STORE(out + 32*i, s[i]); } for(int i = 0; i < 8; ++i) { for(int k = 0; k < 8; ++k) { auto& val = ((uint32_t*)out)[i * 8 + k]; val = bswap_32(val); } } } bool avx2_available() { bool HW_AVX2 = false; int info[4]; cpuid(info, 0); const int nIds = info[0]; cpuid(info, 1); if(info[2] & (1UL << 27)) { // OSXSAVE const uint64_t mask = xgetbv(); if((mask & 6) == 6) { // SSE and AVX states if(nIds >= 7) { cpuid(info, 7); HW_AVX2 = (info[1] & ((int)1 << 5)) != 0; } } } return HW_AVX2; } #else void sha256_avx2_64_x8(uint8_t* out, uint8_t* in, const uint64_t length) { throw std::logic_error("sha256_avx2() not available"); } bool avx2_available() { return false; } #endif // __AVX2__ ================================================ FILE: src/sha256_ni.cpp ================================================ /* * sha256_ni.cpp * * Created on: Jul 19, 2022 * Author: mad */ #include #include #include #if defined(__SHA__) || defined(_WIN32) #include #ifdef _WIN32 #include #define cpuid(info, x) __cpuidex(info, x, 0) #else #include inline void cpuid(int info[4], int InfoType) { __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]); } #endif alignas(64) static const uint32_t K[] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2, }; inline uint32_t bswap_32(const uint32_t val) { return ((val & 0xFF) << 24) | ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8) | ((val & 0xFF000000) >> 24); } inline uint64_t bswap_64(const uint64_t val) { return (uint64_t(bswap_32(val)) << 32) | bswap_32(val >> 32); } static void compress_digest(uint32_t* state, const uint8_t* input, size_t blocks) { const __m128i* K_mm = reinterpret_cast(K); const __m128i* input_mm = reinterpret_cast(input); const __m128i MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b, 0x0405060700010203); // Load initial values __m128i STATE0 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&state[0])); __m128i STATE1 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&state[4])); STATE0 = _mm_shuffle_epi32(STATE0, 0xB1); // CDAB STATE1 = _mm_shuffle_epi32(STATE1, 0x1B); // EFGH __m128i TMP = _mm_alignr_epi8(STATE0, STATE1, 8); // ABEF STATE1 = _mm_blend_epi16(STATE1, STATE0, 0xF0); // CDGH STATE0 = TMP; while(blocks > 0) { // Save current state const __m128i ABEF_SAVE = STATE0; const __m128i CDGH_SAVE = STATE1; __m128i MSG; __m128i TMSG0 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm), MASK); __m128i TMSG1 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 1), MASK); __m128i TMSG2 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 2), MASK); __m128i TMSG3 = _mm_shuffle_epi8(_mm_loadu_si128(input_mm + 3), MASK); // Rounds 0-3 MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); // Rounds 4-7 MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 1)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); // Rounds 8-11 MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 2)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); // Rounds 12-15 MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 3)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); // Rounds 16-19 MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 4)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); // Rounds 20-23 MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 5)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); // Rounds 24-27 MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 6)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); // Rounds 28-31 MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 7)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); // Rounds 32-35 MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 8)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); // Rounds 36-39 MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 9)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); TMSG0 = _mm_sha256msg1_epu32(TMSG0, TMSG1); // Rounds 40-43 MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 10)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); TMSG1 = _mm_sha256msg1_epu32(TMSG1, TMSG2); // Rounds 44-47 MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 11)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG0 = _mm_add_epi32(TMSG0, _mm_alignr_epi8(TMSG3, TMSG2, 4)); TMSG0 = _mm_sha256msg2_epu32(TMSG0, TMSG3); TMSG2 = _mm_sha256msg1_epu32(TMSG2, TMSG3); // Rounds 48-51 MSG = _mm_add_epi32(TMSG0, _mm_load_si128(K_mm + 12)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG1 = _mm_add_epi32(TMSG1, _mm_alignr_epi8(TMSG0, TMSG3, 4)); TMSG1 = _mm_sha256msg2_epu32(TMSG1, TMSG0); TMSG3 = _mm_sha256msg1_epu32(TMSG3, TMSG0); // Rounds 52-55 MSG = _mm_add_epi32(TMSG1, _mm_load_si128(K_mm + 13)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG2 = _mm_add_epi32(TMSG2, _mm_alignr_epi8(TMSG1, TMSG0, 4)); TMSG2 = _mm_sha256msg2_epu32(TMSG2, TMSG1); // Rounds 56-59 MSG = _mm_add_epi32(TMSG2, _mm_load_si128(K_mm + 14)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); TMSG3 = _mm_add_epi32(TMSG3, _mm_alignr_epi8(TMSG2, TMSG1, 4)); TMSG3 = _mm_sha256msg2_epu32(TMSG3, TMSG2); // Rounds 60-63 MSG = _mm_add_epi32(TMSG3, _mm_load_si128(K_mm + 15)); STATE1 = _mm_sha256rnds2_epu32(STATE1, STATE0, MSG); STATE0 = _mm_sha256rnds2_epu32(STATE0, STATE1, _mm_shuffle_epi32(MSG, 0x0E)); // Add values back to state STATE0 = _mm_add_epi32(STATE0, ABEF_SAVE); STATE1 = _mm_add_epi32(STATE1, CDGH_SAVE); input_mm += 4; blocks--; } STATE0 = _mm_shuffle_epi32(STATE0, 0x1B); // FEBA STATE1 = _mm_shuffle_epi32(STATE1, 0xB1); // DCHG // Save state _mm_storeu_si128(reinterpret_cast<__m128i*>(&state[0]), _mm_blend_epi16(STATE0, STATE1, 0xF0)); // DCBA _mm_storeu_si128(reinterpret_cast<__m128i*>(&state[4]), _mm_alignr_epi8(STATE1, STATE0, 8)); // ABEF } void sha256_ni(uint8_t* out, const uint8_t* in, const uint64_t length) { uint32_t state[] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; const auto num_blocks = length / 64; if(num_blocks) { compress_digest(state, in, num_blocks); } const auto remain = length % 64; const auto final_blocks = (remain + 9 + 63) / 64; const uint64_t num_bits = bswap_64(length * 8); const uint8_t end_bit = 0x80; uint8_t last[128] = {}; ::memcpy(last, in + num_blocks * 64, remain); ::memset(last + remain, 0, sizeof(last) - remain); ::memcpy(last + remain, &end_bit, 1); ::memcpy(last + final_blocks * 64 - 8, &num_bits, 8); compress_digest(state, last, final_blocks); for(int k = 0; k < 8; ++k) { state[k] = bswap_32(state[k]); } ::memcpy(out, state, 32); } bool sha256_ni_available() { // int a, b, c, d; // // // Look for CPUID.7.0.EBX[29] // // EAX = 7, ECX = 0 // a = 7; // c = 0; // // asm volatile ("cpuid" // :"=a"(a), "=b"(b), "=c"(c), "=d"(d) // :"a"(a), "c"(c) // ); int info[4]; cpuid(info, 0); const int nIds = info[0]; if(nIds < 7) { return false; } cpuid(info, 7); // Intel® SHA Extensions feature bit is EBX[29] return ((info[1] >> 29) & 1); } #else // __SHA__ void sha256_ni(uint8_t* out, const uint8_t* in, const uint64_t length) { throw std::logic_error("sha256_ni() not available"); } bool sha256_ni_available() { return false; } #endif // __SHA__ ================================================ FILE: src/sha256_ni_rec.cpp ================================================ /* * sha256_ni_rec.cpp * * Created on: May 29, 2023 * Author: mad, voidxno */ // prerequisite: length is 32 bytes (recursive sha256) // prerequisite: length is 64 bytes, 2x 32bytes (_x2) // optimization: https://github.com/voidxno/fast-recursive-sha256 #include #include #include #if defined(__SHA__) || defined(_WIN32) #include #ifdef _WIN32 #include #endif void recursive_sha256_ni(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } alignas(64) static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // shuffle mask const __m128i SHUF_MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b,0x0405060700010203); // init values const __m128i ABEF_INIT = _mm_set_epi64x(0x6a09e667bb67ae85,0x510e527f9b05688c); const __m128i CDGH_INIT = _mm_set_epi64x(0x3c6ef372a54ff53a,0x1f83d9ab5be0cd19); // pre-calc/cache padding const __m128i HPAD0_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000080000000); const __m128i HPAD1_CACHE = _mm_set_epi64x(0x0000010000000000,0x0000000000000000); __m128i STATE0; __m128i STATE1; __m128i MSG; __m128i MSGTMP0; __m128i MSGTMP1; __m128i MSGTMP2; __m128i MSGTMP3; // init/shuffle hash __m128i HASH0_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[0])); __m128i HASH1_SAVE = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[16])); HASH0_SAVE = _mm_shuffle_epi8(HASH0_SAVE,SHUF_MASK); HASH1_SAVE = _mm_shuffle_epi8(HASH1_SAVE,SHUF_MASK); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0 = ABEF_INIT; STATE1 = CDGH_INIT; // rounds 0-3 MSG = HASH0_SAVE; MSGTMP0 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[0]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 4-7 MSG = HASH1_SAVE; MSGTMP1 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[4]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP0 = _mm_sha256msg1_epu32(MSGTMP0,MSGTMP1); // rounds 8-11 MSG = HPAD0_CACHE; MSGTMP2 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[8]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP1 = _mm_sha256msg1_epu32(MSGTMP1,MSGTMP2); // rounds 12-15 MSG = HPAD1_CACHE; MSGTMP3 = MSG; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[12]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP0 = _mm_add_epi32(MSGTMP0,_mm_alignr_epi8(MSGTMP3,MSGTMP2,4)); MSGTMP0 = _mm_sha256msg2_epu32(MSGTMP0,MSGTMP3); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); MSGTMP2 = _mm_sha256msg1_epu32(MSGTMP2,MSGTMP3); #define SHA256ROUND( \ msg, msgtmp0, msgtmp1, msgtmp2, msgtmp3, state0, state1, kvalue) \ msg = msgtmp0; \ msg = _mm_add_epi32(msg,_mm_load_si128(reinterpret_cast(kvalue))); \ state1 = _mm_sha256rnds2_epu32(state1,state0,msg); \ msgtmp1 = _mm_add_epi32(msgtmp1,_mm_alignr_epi8(msgtmp0,msgtmp3,4)); \ msgtmp1 = _mm_sha256msg2_epu32(msgtmp1,msgtmp0); \ msg = _mm_shuffle_epi32(msg,0x0E); \ state0 = _mm_sha256rnds2_epu32(state0,state1,msg); \ msgtmp3 = _mm_sha256msg1_epu32(msgtmp3,msgtmp0); //-- rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[16]); SHA256ROUND(MSG,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATE0,STATE1,&K64[20]); SHA256ROUND(MSG,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATE0,STATE1,&K64[24]); SHA256ROUND(MSG,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATE0,STATE1,&K64[28]); //-- rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[32]); SHA256ROUND(MSG,MSGTMP1,MSGTMP2,MSGTMP3,MSGTMP0,STATE0,STATE1,&K64[36]); SHA256ROUND(MSG,MSGTMP2,MSGTMP3,MSGTMP0,MSGTMP1,STATE0,STATE1,&K64[40]); SHA256ROUND(MSG,MSGTMP3,MSGTMP0,MSGTMP1,MSGTMP2,STATE0,STATE1,&K64[44]); //-- rounds 48-51 SHA256ROUND(MSG,MSGTMP0,MSGTMP1,MSGTMP2,MSGTMP3,STATE0,STATE1,&K64[48]); // rounds 52-55 MSG = MSGTMP1; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[52]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP2 = _mm_add_epi32(MSGTMP2,_mm_alignr_epi8(MSGTMP1,MSGTMP0,4)); MSGTMP2 = _mm_sha256msg2_epu32(MSGTMP2,MSGTMP1); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 56-59 MSG = MSGTMP2; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[56]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSGTMP3 = _mm_add_epi32(MSGTMP3,_mm_alignr_epi8(MSGTMP2,MSGTMP1,4)); MSGTMP3 = _mm_sha256msg2_epu32(MSGTMP3,MSGTMP2); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // rounds 60-63 MSG = MSGTMP3; MSG = _mm_add_epi32(MSG,_mm_load_si128(reinterpret_cast(&K64[60]))); STATE1 = _mm_sha256rnds2_epu32(STATE1,STATE0,MSG); MSG = _mm_shuffle_epi32(MSG,0x0E); STATE0 = _mm_sha256rnds2_epu32(STATE0,STATE1,MSG); // add to state STATE0 = _mm_add_epi32(STATE0,ABEF_INIT); STATE1 = _mm_add_epi32(STATE1,CDGH_INIT); // reorder hash STATE0 = _mm_shuffle_epi32(STATE0,0x1B); // FEBA STATE1 = _mm_shuffle_epi32(STATE1,0xB1); // DCHG HASH0_SAVE = _mm_blend_epi16(STATE0,STATE1,0xF0); // DCBA HASH1_SAVE = _mm_alignr_epi8(STATE1,STATE0,8); // HGFE } // shuffle/return hash HASH0_SAVE = _mm_shuffle_epi8(HASH0_SAVE,SHUF_MASK); HASH1_SAVE = _mm_shuffle_epi8(HASH1_SAVE,SHUF_MASK); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[0]),HASH0_SAVE); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[16]),HASH1_SAVE); } void recursive_sha256_ni_x2(uint8_t* hash, const uint64_t num_iters) { if(num_iters <= 0) { return; } alignas(64) static const uint32_t K64[64] = { 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 }; // shuffle mask const __m128i SHUF_MASK = _mm_set_epi64x(0x0c0d0e0f08090a0b,0x0405060700010203); // init values const __m128i ABEF_INIT = _mm_set_epi64x(0x6a09e667bb67ae85,0x510e527f9b05688c); const __m128i CDGH_INIT = _mm_set_epi64x(0x3c6ef372a54ff53a,0x1f83d9ab5be0cd19); // pre-calc/cache padding const __m128i HPAD0_CACHE = _mm_set_epi64x(0x0000000000000000,0x0000000080000000); const __m128i HPAD1_CACHE = _mm_set_epi64x(0x0000010000000000,0x0000000000000000); __m128i STATE0_P1; __m128i STATE1_P1; __m128i MSG_P1; __m128i MSGTMP0_P1; __m128i MSGTMP1_P1; __m128i MSGTMP2_P1; __m128i MSGTMP3_P1; __m128i STATE0_P2; __m128i STATE1_P2; __m128i MSG_P2; __m128i MSGTMP0_P2; __m128i MSGTMP1_P2; __m128i MSGTMP2_P2; __m128i MSGTMP3_P2; // init/shuffle hash __m128i HASH0_SAVE_P1 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[0])); __m128i HASH1_SAVE_P1 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[16])); __m128i HASH0_SAVE_P2 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[32])); __m128i HASH1_SAVE_P2 = _mm_loadu_si128(reinterpret_cast<__m128i*>(&hash[48])); HASH0_SAVE_P1 = _mm_shuffle_epi8(HASH0_SAVE_P1,SHUF_MASK); HASH1_SAVE_P1 = _mm_shuffle_epi8(HASH1_SAVE_P1,SHUF_MASK); HASH0_SAVE_P2 = _mm_shuffle_epi8(HASH0_SAVE_P2,SHUF_MASK); HASH1_SAVE_P2 = _mm_shuffle_epi8(HASH1_SAVE_P2,SHUF_MASK); for(uint64_t i = 0; i < num_iters; ++i) { // init state STATE0_P1 = ABEF_INIT; STATE1_P1 = CDGH_INIT; STATE0_P2 = ABEF_INIT; STATE1_P2 = CDGH_INIT; // rounds 0-3 MSG_P1 = HASH0_SAVE_P1; MSG_P2 = HASH0_SAVE_P2; MSGTMP0_P1 = MSG_P1; MSGTMP0_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[0]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[0]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 4-7 MSG_P1 = HASH1_SAVE_P1; MSG_P2 = HASH1_SAVE_P2; MSGTMP1_P1 = MSG_P1; MSGTMP1_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[4]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[4]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP0_P1 = _mm_sha256msg1_epu32(MSGTMP0_P1,MSGTMP1_P1); MSGTMP0_P2 = _mm_sha256msg1_epu32(MSGTMP0_P2,MSGTMP1_P2); // rounds 8-11 MSG_P1 = HPAD0_CACHE; MSG_P2 = HPAD0_CACHE; MSGTMP2_P1 = MSG_P1; MSGTMP2_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[8]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[8]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP1_P1 = _mm_sha256msg1_epu32(MSGTMP1_P1,MSGTMP2_P1); MSGTMP1_P2 = _mm_sha256msg1_epu32(MSGTMP1_P2,MSGTMP2_P2); // rounds 12-15 MSG_P1 = HPAD1_CACHE; MSG_P2 = HPAD1_CACHE; MSGTMP3_P1 = MSG_P1; MSGTMP3_P2 = MSG_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[12]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[12]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP0_P1 = _mm_add_epi32(MSGTMP0_P1,_mm_alignr_epi8(MSGTMP3_P1,MSGTMP2_P1,4)); MSGTMP0_P2 = _mm_add_epi32(MSGTMP0_P2,_mm_alignr_epi8(MSGTMP3_P2,MSGTMP2_P2,4)); MSGTMP0_P1 = _mm_sha256msg2_epu32(MSGTMP0_P1,MSGTMP3_P1); MSGTMP0_P2 = _mm_sha256msg2_epu32(MSGTMP0_P2,MSGTMP3_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); MSGTMP2_P1 = _mm_sha256msg1_epu32(MSGTMP2_P1,MSGTMP3_P1); MSGTMP2_P2 = _mm_sha256msg1_epu32(MSGTMP2_P2,MSGTMP3_P2); #define SHA256ROUND_X2( \ msg_p1, msgtmp0_p1, msgtmp1_p1, msgtmp2_p1, msgtmp3_p1, state0_p1, state1_p1, \ msg_p2, msgtmp0_p2, msgtmp1_p2, msgtmp2_p2, msgtmp3_p2, state0_p2, state1_p2, kvalue) \ msg_p1 = msgtmp0_p1; \ msg_p2 = msgtmp0_p2; \ msg_p1 = _mm_add_epi32(msg_p1,_mm_load_si128(reinterpret_cast(kvalue))); \ msg_p2 = _mm_add_epi32(msg_p2,_mm_load_si128(reinterpret_cast(kvalue))); \ state1_p1 = _mm_sha256rnds2_epu32(state1_p1,state0_p1,msg_p1); \ state1_p2 = _mm_sha256rnds2_epu32(state1_p2,state0_p2,msg_p2); \ msgtmp1_p1 = _mm_add_epi32(msgtmp1_p1,_mm_alignr_epi8(msgtmp0_p1,msgtmp3_p1,4)); \ msgtmp1_p2 = _mm_add_epi32(msgtmp1_p2,_mm_alignr_epi8(msgtmp0_p2,msgtmp3_p2,4)); \ msgtmp1_p1 = _mm_sha256msg2_epu32(msgtmp1_p1,msgtmp0_p1); \ msgtmp1_p2 = _mm_sha256msg2_epu32(msgtmp1_p2,msgtmp0_p2); \ msg_p1 = _mm_shuffle_epi32(msg_p1,0x0E); \ msg_p2 = _mm_shuffle_epi32(msg_p2,0x0E); \ state0_p1 = _mm_sha256rnds2_epu32(state0_p1,state1_p1,msg_p1); \ state0_p2 = _mm_sha256rnds2_epu32(state0_p2,state1_p2,msg_p2); \ msgtmp3_p1 = _mm_sha256msg1_epu32(msgtmp3_p1,msgtmp0_p1); \ msgtmp3_p2 = _mm_sha256msg1_epu32(msgtmp3_p2,msgtmp0_p2); //-- rounds 16-19, 20-23, 24-27, 28-31 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[16]); SHA256ROUND_X2(MSG_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATE0_P2,STATE1_P2,&K64[20]); SHA256ROUND_X2(MSG_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATE0_P2,STATE1_P2,&K64[24]); SHA256ROUND_X2(MSG_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATE0_P2,STATE1_P2,&K64[28]); //-- rounds 32-35, 36-39, 40-43, 44-47 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[32]); SHA256ROUND_X2(MSG_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,STATE0_P2,STATE1_P2,&K64[36]); SHA256ROUND_X2(MSG_P1,MSGTMP2_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP2_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,STATE0_P2,STATE1_P2,&K64[40]); SHA256ROUND_X2(MSG_P1,MSGTMP3_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP3_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,STATE0_P2,STATE1_P2,&K64[44]); //-- rounds 48-51 SHA256ROUND_X2(MSG_P1,MSGTMP0_P1,MSGTMP1_P1,MSGTMP2_P1,MSGTMP3_P1,STATE0_P1,STATE1_P1,MSG_P2,MSGTMP0_P2,MSGTMP1_P2,MSGTMP2_P2,MSGTMP3_P2,STATE0_P2,STATE1_P2,&K64[48]); // rounds 52-55 MSG_P1 = MSGTMP1_P1; MSG_P2 = MSGTMP1_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[52]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[52]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP2_P1 = _mm_add_epi32(MSGTMP2_P1,_mm_alignr_epi8(MSGTMP1_P1,MSGTMP0_P1,4)); MSGTMP2_P2 = _mm_add_epi32(MSGTMP2_P2,_mm_alignr_epi8(MSGTMP1_P2,MSGTMP0_P2,4)); MSGTMP2_P1 = _mm_sha256msg2_epu32(MSGTMP2_P1,MSGTMP1_P1); MSGTMP2_P2 = _mm_sha256msg2_epu32(MSGTMP2_P2,MSGTMP1_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 56-59 MSG_P1 = MSGTMP2_P1; MSG_P2 = MSGTMP2_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[56]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[56]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSGTMP3_P1 = _mm_add_epi32(MSGTMP3_P1,_mm_alignr_epi8(MSGTMP2_P1,MSGTMP1_P1,4)); MSGTMP3_P2 = _mm_add_epi32(MSGTMP3_P2,_mm_alignr_epi8(MSGTMP2_P2,MSGTMP1_P2,4)); MSGTMP3_P1 = _mm_sha256msg2_epu32(MSGTMP3_P1,MSGTMP2_P1); MSGTMP3_P2 = _mm_sha256msg2_epu32(MSGTMP3_P2,MSGTMP2_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // rounds 60-63 MSG_P1 = MSGTMP3_P1; MSG_P2 = MSGTMP3_P2; MSG_P1 = _mm_add_epi32(MSG_P1,_mm_load_si128(reinterpret_cast(&K64[60]))); MSG_P2 = _mm_add_epi32(MSG_P2,_mm_load_si128(reinterpret_cast(&K64[60]))); STATE1_P1 = _mm_sha256rnds2_epu32(STATE1_P1,STATE0_P1,MSG_P1); STATE1_P2 = _mm_sha256rnds2_epu32(STATE1_P2,STATE0_P2,MSG_P2); MSG_P1 = _mm_shuffle_epi32(MSG_P1,0x0E); MSG_P2 = _mm_shuffle_epi32(MSG_P2,0x0E); STATE0_P1 = _mm_sha256rnds2_epu32(STATE0_P1,STATE1_P1,MSG_P1); STATE0_P2 = _mm_sha256rnds2_epu32(STATE0_P2,STATE1_P2,MSG_P2); // add to state STATE0_P1 = _mm_add_epi32(STATE0_P1,ABEF_INIT); STATE0_P2 = _mm_add_epi32(STATE0_P2,ABEF_INIT); STATE1_P1 = _mm_add_epi32(STATE1_P1,CDGH_INIT); STATE1_P2 = _mm_add_epi32(STATE1_P2,CDGH_INIT); // reorder hash STATE0_P1 = _mm_shuffle_epi32(STATE0_P1,0x1B); // FEBA STATE1_P1 = _mm_shuffle_epi32(STATE1_P1,0xB1); // DCHG STATE0_P2 = _mm_shuffle_epi32(STATE0_P2,0x1B); // FEBA STATE1_P2 = _mm_shuffle_epi32(STATE1_P2,0xB1); // DCHG HASH0_SAVE_P1 = _mm_blend_epi16(STATE0_P1,STATE1_P1,0xF0); // DCBA HASH1_SAVE_P1 = _mm_alignr_epi8(STATE1_P1,STATE0_P1,8); // HGFE HASH0_SAVE_P2 = _mm_blend_epi16(STATE0_P2,STATE1_P2,0xF0); // DCBA HASH1_SAVE_P2 = _mm_alignr_epi8(STATE1_P2,STATE0_P2,8); // HGFE } // shuffle/return hash HASH0_SAVE_P1 = _mm_shuffle_epi8(HASH0_SAVE_P1,SHUF_MASK); HASH1_SAVE_P1 = _mm_shuffle_epi8(HASH1_SAVE_P1,SHUF_MASK); HASH0_SAVE_P2 = _mm_shuffle_epi8(HASH0_SAVE_P2,SHUF_MASK); HASH1_SAVE_P2 = _mm_shuffle_epi8(HASH1_SAVE_P2,SHUF_MASK); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[0]),HASH0_SAVE_P1); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[16]),HASH1_SAVE_P1); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[32]),HASH0_SAVE_P2); _mm_storeu_si128(reinterpret_cast<__m128i*>(&hash[48]),HASH1_SAVE_P2); } #else // __SHA__ void recursive_sha256_ni(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_ni() not available"); } void recursive_sha256_ni_x2(uint8_t* hash, const uint64_t num_iters) { throw std::logic_error("recursive_sha256_ni_x2() not available"); } #endif // __SHA__ ================================================ FILE: src/sha512.cpp ================================================ // Copyright (c) 2014-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include inline uint32_t bswap_32(const uint32_t val) { return ((val & 0xFF) << 24) | ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8) | ((val & 0xFF000000) >> 24); } inline uint64_t bswap_64(const uint64_t val) { return (uint64_t(bswap_32(val)) << 32) | bswap_32(val >> 32); } uint64_t inline ReadBE64(const unsigned char* ptr) { uint64_t x; memcpy((char*)&x, ptr, 8); return bswap_64(x); } void inline WriteBE64(unsigned char* ptr, uint64_t x) { uint64_t v = bswap_64(x); memcpy(ptr, (char*)&v, 8); } /// Internal SHA-512 implementation. namespace sha512 { uint64_t inline Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); } uint64_t inline Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); } uint64_t inline Sigma0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); } uint64_t inline Sigma1(uint64_t x) { return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); } uint64_t inline sigma0(uint64_t x) { return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); } uint64_t inline sigma1(uint64_t x) { return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); } /** One round of SHA-512. */ void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t& d, uint64_t e, uint64_t f, uint64_t g, uint64_t& h, uint64_t k, uint64_t w) { uint64_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w; uint64_t t2 = Sigma0(a) + Maj(a, b, c); d += t1; h = t1 + t2; } /** Initialize SHA-256 state. */ void inline Initialize(uint64_t* s) { s[0] = 0x6a09e667f3bcc908ull; s[1] = 0xbb67ae8584caa73bull; s[2] = 0x3c6ef372fe94f82bull; s[3] = 0xa54ff53a5f1d36f1ull; s[4] = 0x510e527fade682d1ull; s[5] = 0x9b05688c2b3e6c1full; s[6] = 0x1f83d9abfb41bd6bull; s[7] = 0x5be0cd19137e2179ull; } /** Perform one SHA-512 transformation, processing a 128-byte chunk. */ static void Transform(uint64_t* s, const unsigned char* chunk) { uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15; Round(a, b, c, d, e, f, g, h, 0x428a2f98d728ae22ull, w0 = ReadBE64(chunk + 0)); Round(h, a, b, c, d, e, f, g, 0x7137449123ef65cdull, w1 = ReadBE64(chunk + 8)); Round(g, h, a, b, c, d, e, f, 0xb5c0fbcfec4d3b2full, w2 = ReadBE64(chunk + 16)); Round(f, g, h, a, b, c, d, e, 0xe9b5dba58189dbbcull, w3 = ReadBE64(chunk + 24)); Round(e, f, g, h, a, b, c, d, 0x3956c25bf348b538ull, w4 = ReadBE64(chunk + 32)); Round(d, e, f, g, h, a, b, c, 0x59f111f1b605d019ull, w5 = ReadBE64(chunk + 40)); Round(c, d, e, f, g, h, a, b, 0x923f82a4af194f9bull, w6 = ReadBE64(chunk + 48)); Round(b, c, d, e, f, g, h, a, 0xab1c5ed5da6d8118ull, w7 = ReadBE64(chunk + 56)); Round(a, b, c, d, e, f, g, h, 0xd807aa98a3030242ull, w8 = ReadBE64(chunk + 64)); Round(h, a, b, c, d, e, f, g, 0x12835b0145706fbeull, w9 = ReadBE64(chunk + 72)); Round(g, h, a, b, c, d, e, f, 0x243185be4ee4b28cull, w10 = ReadBE64(chunk + 80)); Round(f, g, h, a, b, c, d, e, 0x550c7dc3d5ffb4e2ull, w11 = ReadBE64(chunk + 88)); Round(e, f, g, h, a, b, c, d, 0x72be5d74f27b896full, w12 = ReadBE64(chunk + 96)); Round(d, e, f, g, h, a, b, c, 0x80deb1fe3b1696b1ull, w13 = ReadBE64(chunk + 104)); Round(c, d, e, f, g, h, a, b, 0x9bdc06a725c71235ull, w14 = ReadBE64(chunk + 112)); Round(b, c, d, e, f, g, h, a, 0xc19bf174cf692694ull, w15 = ReadBE64(chunk + 120)); Round(a, b, c, d, e, f, g, h, 0xe49b69c19ef14ad2ull, w0 += sigma1(w14) + w9 + sigma0(w1)); Round(h, a, b, c, d, e, f, g, 0xefbe4786384f25e3ull, w1 += sigma1(w15) + w10 + sigma0(w2)); Round(g, h, a, b, c, d, e, f, 0x0fc19dc68b8cd5b5ull, w2 += sigma1(w0) + w11 + sigma0(w3)); Round(f, g, h, a, b, c, d, e, 0x240ca1cc77ac9c65ull, w3 += sigma1(w1) + w12 + sigma0(w4)); Round(e, f, g, h, a, b, c, d, 0x2de92c6f592b0275ull, w4 += sigma1(w2) + w13 + sigma0(w5)); Round(d, e, f, g, h, a, b, c, 0x4a7484aa6ea6e483ull, w5 += sigma1(w3) + w14 + sigma0(w6)); Round(c, d, e, f, g, h, a, b, 0x5cb0a9dcbd41fbd4ull, w6 += sigma1(w4) + w15 + sigma0(w7)); Round(b, c, d, e, f, g, h, a, 0x76f988da831153b5ull, w7 += sigma1(w5) + w0 + sigma0(w8)); Round(a, b, c, d, e, f, g, h, 0x983e5152ee66dfabull, w8 += sigma1(w6) + w1 + sigma0(w9)); Round(h, a, b, c, d, e, f, g, 0xa831c66d2db43210ull, w9 += sigma1(w7) + w2 + sigma0(w10)); Round(g, h, a, b, c, d, e, f, 0xb00327c898fb213full, w10 += sigma1(w8) + w3 + sigma0(w11)); Round(f, g, h, a, b, c, d, e, 0xbf597fc7beef0ee4ull, w11 += sigma1(w9) + w4 + sigma0(w12)); Round(e, f, g, h, a, b, c, d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) + w5 + sigma0(w13)); Round(d, e, f, g, h, a, b, c, 0xd5a79147930aa725ull, w13 += sigma1(w11) + w6 + sigma0(w14)); Round(c, d, e, f, g, h, a, b, 0x06ca6351e003826full, w14 += sigma1(w12) + w7 + sigma0(w15)); Round(b, c, d, e, f, g, h, a, 0x142929670a0e6e70ull, w15 += sigma1(w13) + w8 + sigma0(w0)); Round(a, b, c, d, e, f, g, h, 0x27b70a8546d22ffcull, w0 += sigma1(w14) + w9 + sigma0(w1)); Round(h, a, b, c, d, e, f, g, 0x2e1b21385c26c926ull, w1 += sigma1(w15) + w10 + sigma0(w2)); Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc5ac42aedull, w2 += sigma1(w0) + w11 + sigma0(w3)); Round(f, g, h, a, b, c, d, e, 0x53380d139d95b3dfull, w3 += sigma1(w1) + w12 + sigma0(w4)); Round(e, f, g, h, a, b, c, d, 0x650a73548baf63deull, w4 += sigma1(w2) + w13 + sigma0(w5)); Round(d, e, f, g, h, a, b, c, 0x766a0abb3c77b2a8ull, w5 += sigma1(w3) + w14 + sigma0(w6)); Round(c, d, e, f, g, h, a, b, 0x81c2c92e47edaee6ull, w6 += sigma1(w4) + w15 + sigma0(w7)); Round(b, c, d, e, f, g, h, a, 0x92722c851482353bull, w7 += sigma1(w5) + w0 + sigma0(w8)); Round(a, b, c, d, e, f, g, h, 0xa2bfe8a14cf10364ull, w8 += sigma1(w6) + w1 + sigma0(w9)); Round(h, a, b, c, d, e, f, g, 0xa81a664bbc423001ull, w9 += sigma1(w7) + w2 + sigma0(w10)); Round(g, h, a, b, c, d, e, f, 0xc24b8b70d0f89791ull, w10 += sigma1(w8) + w3 + sigma0(w11)); Round(f, g, h, a, b, c, d, e, 0xc76c51a30654be30ull, w11 += sigma1(w9) + w4 + sigma0(w12)); Round(e, f, g, h, a, b, c, d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) + w5 + sigma0(w13)); Round(d, e, f, g, h, a, b, c, 0xd69906245565a910ull, w13 += sigma1(w11) + w6 + sigma0(w14)); Round(c, d, e, f, g, h, a, b, 0xf40e35855771202aull, w14 += sigma1(w12) + w7 + sigma0(w15)); Round(b, c, d, e, f, g, h, a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) + w8 + sigma0(w0)); Round(a, b, c, d, e, f, g, h, 0x19a4c116b8d2d0c8ull, w0 += sigma1(w14) + w9 + sigma0(w1)); Round(h, a, b, c, d, e, f, g, 0x1e376c085141ab53ull, w1 += sigma1(w15) + w10 + sigma0(w2)); Round(g, h, a, b, c, d, e, f, 0x2748774cdf8eeb99ull, w2 += sigma1(w0) + w11 + sigma0(w3)); Round(f, g, h, a, b, c, d, e, 0x34b0bcb5e19b48a8ull, w3 += sigma1(w1) + w12 + sigma0(w4)); Round(e, f, g, h, a, b, c, d, 0x391c0cb3c5c95a63ull, w4 += sigma1(w2) + w13 + sigma0(w5)); Round(d, e, f, g, h, a, b, c, 0x4ed8aa4ae3418acbull, w5 += sigma1(w3) + w14 + sigma0(w6)); Round(c, d, e, f, g, h, a, b, 0x5b9cca4f7763e373ull, w6 += sigma1(w4) + w15 + sigma0(w7)); Round(b, c, d, e, f, g, h, a, 0x682e6ff3d6b2b8a3ull, w7 += sigma1(w5) + w0 + sigma0(w8)); Round(a, b, c, d, e, f, g, h, 0x748f82ee5defb2fcull, w8 += sigma1(w6) + w1 + sigma0(w9)); Round(h, a, b, c, d, e, f, g, 0x78a5636f43172f60ull, w9 += sigma1(w7) + w2 + sigma0(w10)); Round(g, h, a, b, c, d, e, f, 0x84c87814a1f0ab72ull, w10 += sigma1(w8) + w3 + sigma0(w11)); Round(f, g, h, a, b, c, d, e, 0x8cc702081a6439ecull, w11 += sigma1(w9) + w4 + sigma0(w12)); Round(e, f, g, h, a, b, c, d, 0x90befffa23631e28ull, w12 += sigma1(w10) + w5 + sigma0(w13)); Round(d, e, f, g, h, a, b, c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) + w6 + sigma0(w14)); Round(c, d, e, f, g, h, a, b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) + w7 + sigma0(w15)); Round(b, c, d, e, f, g, h, a, 0xc67178f2e372532bull, w15 += sigma1(w13) + w8 + sigma0(w0)); Round(a, b, c, d, e, f, g, h, 0xca273eceea26619cull, w0 += sigma1(w14) + w9 + sigma0(w1)); Round(h, a, b, c, d, e, f, g, 0xd186b8c721c0c207ull, w1 += sigma1(w15) + w10 + sigma0(w2)); Round(g, h, a, b, c, d, e, f, 0xeada7dd6cde0eb1eull, w2 += sigma1(w0) + w11 + sigma0(w3)); Round(f, g, h, a, b, c, d, e, 0xf57d4f7fee6ed178ull, w3 += sigma1(w1) + w12 + sigma0(w4)); Round(e, f, g, h, a, b, c, d, 0x06f067aa72176fbaull, w4 += sigma1(w2) + w13 + sigma0(w5)); Round(d, e, f, g, h, a, b, c, 0x0a637dc5a2c898a6ull, w5 += sigma1(w3) + w14 + sigma0(w6)); Round(c, d, e, f, g, h, a, b, 0x113f9804bef90daeull, w6 += sigma1(w4) + w15 + sigma0(w7)); Round(b, c, d, e, f, g, h, a, 0x1b710b35131c471bull, w7 += sigma1(w5) + w0 + sigma0(w8)); Round(a, b, c, d, e, f, g, h, 0x28db77f523047d84ull, w8 += sigma1(w6) + w1 + sigma0(w9)); Round(h, a, b, c, d, e, f, g, 0x32caab7b40c72493ull, w9 += sigma1(w7) + w2 + sigma0(w10)); Round(g, h, a, b, c, d, e, f, 0x3c9ebe0a15c9bebcull, w10 += sigma1(w8) + w3 + sigma0(w11)); Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12)); Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13)); Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14)); Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 + sigma1(w12) + w7 + sigma0(w15)); Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 + sigma1(w13) + w8 + sigma0(w0)); s[0] += a; s[1] += b; s[2] += c; s[3] += d; s[4] += e; s[5] += f; s[6] += g; s[7] += h; } } // namespace sha512 ////// SHA-512 SHA512::SHA512() : bytes(0) { sha512::Initialize(s); } SHA512& SHA512::Write(const unsigned char* data, size_t len) { const unsigned char* end = data + len; size_t bufsize = bytes % 128; if (bufsize && bufsize + len >= 128) { // Fill the buffer, and process it. memcpy(buf + bufsize, data, 128 - bufsize); bytes += 128 - bufsize; data += 128 - bufsize; sha512::Transform(s, buf); bufsize = 0; } while (end - data >= 128) { // Process full chunks directly from the source. sha512::Transform(s, data); data += 128; bytes += 128; } if (end > data) { // Fill the buffer with what remains. memcpy(buf + bufsize, data, end - data); bytes += end - data; } return *this; } void SHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) { static const unsigned char pad[128] = {0x80}; unsigned char sizedesc[16] = {0x00}; WriteBE64(sizedesc + 8, bytes << 3); Write(pad, 1 + ((239 - (bytes % 128)) % 128)); Write(sizedesc, 16); WriteBE64(hash, s[0]); WriteBE64(hash + 8, s[1]); WriteBE64(hash + 16, s[2]); WriteBE64(hash + 24, s[3]); WriteBE64(hash + 32, s[4]); WriteBE64(hash + 40, s[5]); WriteBE64(hash + 48, s[6]); WriteBE64(hash + 56, s[7]); } SHA512& SHA512::Reset() { bytes = 0; sha512::Initialize(s); return *this; } ================================================ FILE: src/signature_t.cpp ================================================ /* * signature_t.cpp * * Created on: Apr 6, 2022 * Author: mad */ #include #include namespace mmx { std::mutex g_mutex; // prevent attacker from generating cache collisions on every node const auto hash_salt = vnx::Hash64::rand(); std::array, 16384> g_sig_cache; signature_t::signature_t(const secp256k1_ecdsa_signature& sig) { secp256k1_ecdsa_signature_serialize_compact(g_secp256k1, data(), &sig); } secp256k1_ecdsa_signature signature_t::to_secp256k1() const { secp256k1_ecdsa_signature res; if(!secp256k1_ecdsa_signature_parse_compact(g_secp256k1, &res, data())) { throw std::logic_error("secp256k1_ecdsa_signature_parse_compact() failed"); } return res; } signature_t signature_t::sign(const skey_t& skey, const hash_t& hash) { secp256k1_ecdsa_signature sig; if(!secp256k1_ecdsa_sign(g_secp256k1, &sig, hash.data(), skey.data(), NULL, NULL)) { throw std::logic_error("secp256k1_ecdsa_sign() failed"); } return signature_t(sig); } signature_t signature_t::normalized() const { secp256k1_ecdsa_signature out; const auto sig = to_secp256k1(); secp256k1_ecdsa_signature_normalize(g_secp256k1, &out, &sig); return signature_t(out); } bool signature_t::verify(const pubkey_t& pubkey, const hash_t& hash) const { const size_t sig_hash = vnx::Hash64(crc64(), hash_salt); const auto entry = std::make_tuple(hash, pubkey, *this); auto& cache = g_sig_cache[sig_hash % g_sig_cache.size()]; { std::lock_guard lock(g_mutex); if(entry == cache) { return true; } } const auto sig = to_secp256k1(); const auto key = pubkey.to_secp256k1(); const bool res = secp256k1_ecdsa_verify(g_secp256k1, &sig, hash.data(), &key); if(res) { std::lock_guard lock(g_mutex); cache = entry; } return res; } } // mmx ================================================ FILE: src/solution/MultiSig.cpp ================================================ /* * MultiSig.cpp * * Created on: Jan 15, 2022 * Author: mad */ #include #include namespace mmx { namespace solution { vnx::bool_t MultiSig::is_valid() const { for(const auto& entry : solutions) { if(!entry.second || !entry.second->is_valid()) { return false; } } return Super::is_valid(); } hash_t MultiSig::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "solutions"); write_bytes(out, uint32_t(solutions.size())); for(const auto& entry : solutions) { write_bytes_cstr(out, "pair<>"); write_bytes(out, entry.first); write_bytes(out, entry.second ? entry.second->calc_hash() : hash_t()); } write_field(out, "num_required", num_required); out.flush(); return hash_t(buffer); } uint64_t MultiSig::calc_cost(std::shared_ptr params) const { uint64_t cost = params->min_txfee_sign; for(const auto& entry : solutions) { if(auto sol = entry.second) { cost += sol->calc_cost(params); } } return cost; } } // solution } // mmx ================================================ FILE: src/solution/PubKey.cpp ================================================ /* * PubKey.cpp * * Created on: Jan 15, 2022 * Author: mad */ #include #include namespace mmx { namespace solution { hash_t PubKey::calc_hash() const { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_bytes(out, get_type_hash()); write_field(out, "version", version); write_field(out, "pubkey", pubkey); write_field(out, "signature", signature); out.flush(); return hash_t(buffer); } uint64_t PubKey::calc_cost(std::shared_ptr params) const { return params->min_txfee_sign; } } // solution } // mmx ================================================ FILE: src/table.cpp ================================================ /* * table.cpp * * Created on: Sep 11, 2022 * Author: mad */ #include #include namespace mmx { void sync_type_codes(const std::string& file_path) { uint_table table(file_path, false); table.scan([](const uint64_t& code_hash, const vnx::TypeCode& type_code) -> bool { auto copy = std::make_shared(type_code); copy->build(); vnx::register_type_code(copy); return true; }); size_t num_insert = 0; for(auto type_code : vnx::get_all_type_codes()) { bool found = true; try { vnx::TypeCode tmp; found = table.find(type_code->code_hash, tmp); } catch(...) { // not found } if(!found) { table.insert(type_code->code_hash, *type_code); num_insert++; } } if(num_insert) { table.commit(); } } } // mmx ================================================ FILE: src/uint128.cpp ================================================ /* * uint128.cpp * * Created on: May 1, 2022 * Author: mad */ #include #include #include namespace mmx { uint128::uint128(const std::string& str) { uint256_t tmp; if(str.substr(0, 2) == "0x") { tmp = uint256_t(str.substr(2), 16); } else { tmp = uint256_t(str, 10); } if(tmp >> 128) { throw std::logic_error("uint128(std::string) overflow"); } *this = tmp.lower(); } } // mmx namespace vnx { void read(vnx::TypeInput& in, mmx::uint128& value, const vnx::TypeCode* type_code, const uint16_t* code) { switch(code[0]) { case CODE_STRING: case CODE_ALT_STRING: { std::string str; vnx::read(in, str, type_code, code); try { value = mmx::uint128(str); } catch(...) { value = uint128_0; } break; } case CODE_UINT8: case CODE_UINT16: case CODE_UINT32: case CODE_UINT64: case CODE_ALT_UINT8: case CODE_ALT_UINT16: case CODE_ALT_UINT32: case CODE_ALT_UINT64: { uint64_t tmp = 0; vnx::read(in, tmp, type_code, code); value = uint128_t(tmp); break; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: { vnx::Variant tmp; vnx::read(in, tmp, type_code, code); value = tmp.to(); break; } default: { mmx::bytes_t<16> tmp; vnx::read(in, tmp, type_code, code); value = tmp.to_uint(); } } } void write(vnx::TypeOutput& out, const mmx::uint128& value, const vnx::TypeCode* type_code, const uint16_t* code) { mmx::bytes_t<16> tmp; tmp.from_uint(value); vnx::write(out, tmp, type_code, code); } } // vnx ================================================ FILE: src/upnp_mapper.cpp ================================================ /* * upnp.cpp * * Created on: Oct 22, 2022 * Author: mad */ #include #include #include #ifdef WITH_MINIUPNPC #include #include #include // The minimum supported miniUPnPc API version is set to 10. This keeps compatibility // with Ubuntu 16.04 LTS and Debian 8 libminiupnpc-dev packages. static_assert(MINIUPNPC_API_VERSION >= 10, "miniUPnPc API version >= 10 assumed"); class UPNP_MapperMini : public UPNP_Mapper { public: const int listen_port; const std::string app_name; UPNP_MapperMini(const int port, const std::string& app_name) : listen_port(port), app_name(app_name) { thread = std::thread(&UPNP_MapperMini::run_loop, this); } ~UPNP_MapperMini() { stop(); } void run_loop() { std::unique_lock lock(mutex); bool first_delete = false; bool only_permanent = false; const auto port = std::to_string(listen_port); while(do_run) { const char* multicastif = nullptr; const char* minissdpdpath = nullptr; struct UPNPDev* devlist = nullptr; char lanaddr[64] = {}; #if MINIUPNPC_API_VERSION >= 18 char wanaddr[64] = {}; #endif int error = 0; #if MINIUPNPC_API_VERSION < 14 devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error); #else devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error); #endif struct UPNPUrls urls; struct IGDdatas data; const int ret = UPNP_GetValidIGD(devlist, &urls, &data, lanaddr, sizeof(lanaddr) #if MINIUPNPC_API_VERSION >= 18 , wanaddr, sizeof(wanaddr) #endif ); freeUPNPDevlist(devlist); devlist = nullptr; if(ret > 0) { bool is_mapped = false; while(do_run) { if(!first_delete && only_permanent) { first_delete = true; UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0); } const int ret = UPNP_AddPortMapping(urls.controlURL, data.first.servicetype, port.c_str(), port.c_str(), lanaddr, app_name.c_str(), "TCP", 0, only_permanent ? "0" : "3600"); if(ret == 725) { // OnlyPermanentLeasesSupported const auto prev = only_permanent; only_permanent = true; if(!prev) { continue; } } else if(ret != UPNPCOMMAND_SUCCESS) { is_mapped = false; vnx::log_info() << "UPNP_AddPortMapping(" << port << ", " << port<< ", " << lanaddr << ") failed with code " << ret << " (" << strupnperror(ret) << ")"; } else { is_mapped = true; vnx::log_info() << "UPnP port mapping successful on " << listen_port << " (" << app_name << ")"; } signal.wait_for(lock, PORT_MAPPING_REANNOUNCE_PERIOD); if(!is_mapped) { break; // re-try everything } } if(is_mapped) { const int ret = UPNP_DeletePortMapping(urls.controlURL, data.first.servicetype, port.c_str(), "TCP", 0); if(ret != UPNPCOMMAND_SUCCESS) { vnx::log_info() << "UPNP_DeletePortMapping() failed with code " << ret << " (" << strupnperror(ret) << ")"; } else { vnx::log_info() << "UPNP_DeletePortMapping() successful"; } } } else { vnx::log_info() << "UPNP_GetValidIGD() found no UPnP IGDs"; signal.wait_for(lock, PORT_MAPPING_REANNOUNCE_PERIOD); } if(ret != 0) { FreeUPNPUrls(&urls); } } } void stop() override { { std::lock_guard lock(mutex); do_run = false; signal.notify_all(); } if(thread.joinable()) { thread.join(); } } private: bool do_run = true; std::mutex mutex; std::thread thread; std::condition_variable signal; static constexpr auto PORT_MAPPING_REANNOUNCE_PERIOD = std::chrono::seconds(1800); }; std::shared_ptr upnp_start_mapping(const int port, const std::string& app_name) { return std::make_shared(port, app_name); } #else std::shared_ptr upnp_start_mapping(const int port, const std::string& app_name) { return nullptr; } #endif // WITH_MINIUPNPC ================================================ FILE: src/utils.cpp ================================================ /* * utils.cpp * * Created on: Oct 24, 2024 * Author: mad */ #include #include namespace mmx { static bool validate_json(vnx::TypeInput& in, const uint16_t* code, const size_t max_recursion, size_t call_depth) { if(++call_depth > max_recursion) { return false; } switch(code[0]) { case vnx::CODE_NULL: case vnx::CODE_BOOL: case vnx::CODE_UINT8: case vnx::CODE_UINT16: case vnx::CODE_UINT32: case vnx::CODE_UINT64: case vnx::CODE_INT8: case vnx::CODE_INT16: case vnx::CODE_INT32: case vnx::CODE_INT64: case vnx::CODE_STRING: case vnx::CODE_ALT_BOOL: case vnx::CODE_ALT_UINT8: case vnx::CODE_ALT_UINT16: case vnx::CODE_ALT_UINT32: case vnx::CODE_ALT_UINT64: case vnx::CODE_ALT_INT8: case vnx::CODE_ALT_INT16: case vnx::CODE_ALT_INT32: case vnx::CODE_ALT_INT64: case vnx::CODE_ALT_STRING: vnx::skip(in, nullptr, code); return true; case vnx::CODE_LIST: case vnx::CODE_ALT_LIST: { switch(code[1]) { case vnx::CODE_DYNAMIC: case vnx::CODE_ALT_DYNAMIC: break; default: return false; } uint32_t size; read(in, size); if(code[0] == vnx::CODE_ALT_LIST) { size = vnx::flip_bytes(size); } for(uint32_t i = 0; i < size; ++i) { if(!validate_json(in, code + 1, max_recursion, call_depth)) { return false; } } return true; } case vnx::CODE_OBJECT: case vnx::CODE_ALT_OBJECT: { uint32_t size; read(in, size); if(code[0] == vnx::CODE_ALT_OBJECT) { size = vnx::flip_bytes(size); } for(uint32_t i = 0; i < size; ++i) { const uint16_t key_code = (code[0] == vnx::CODE_OBJECT ? vnx::CODE_STRING : vnx::CODE_ALT_STRING); const uint16_t value_code = (code[0] == vnx::CODE_OBJECT ? vnx::CODE_DYNAMIC : vnx::CODE_ALT_DYNAMIC); vnx::skip(in, nullptr, &key_code); if(!validate_json(in, &value_code, max_recursion, call_depth)) { return false; } } return true; } case vnx::CODE_DYNAMIC: case vnx::CODE_ALT_DYNAMIC: { uint16_t byte_code[VNX_MAX_BYTE_CODE_SIZE]; vnx::read_byte_code(in, byte_code); return validate_json(in, byte_code, max_recursion, call_depth); } } return false; } bool is_json(const vnx::Variant& var) { if(var.empty()) { return true; } vnx::VectorInputStream stream(&var.data); vnx::TypeInput in(&stream); const uint16_t code = vnx::CODE_DYNAMIC; return validate_json(in, &code, 100, 0); } uint64_t get_num_bytes(const vnx::Variant& var) { if(var.is_null() || var.is_bool()) { return 1; } else if(var.is_long() || var.is_ulong()) { return 8; } else if(var.is_string()) { return 4 + var.to().size(); } else if(var.is_array()) { uint64_t total = 4; for(const auto& entry : var.to>()) { total += get_num_bytes(entry); } return total; } else if(var.is_object()) { uint64_t total = 4; const auto obj = var.to_object(); for(const auto& entry : obj.get_fields()) { total += entry.first.size() + get_num_bytes(entry.second); } return total; } return var.size(); } } // mmx ================================================ FILE: src/vm/Compiler.cpp ================================================ /* * Compiler.cpp * * Created on: Dec 10, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "std/embedded.h" namespace mmx { namespace vm { namespace lang { namespace dsl = lexy::dsl; struct source; struct statement; struct expression; static constexpr auto ws = dsl::whitespace(dsl::ascii::space); static constexpr auto kw_id = dsl::identifier(dsl::ascii::alpha_underscore, dsl::ascii::alpha_digit_underscore); static constexpr auto kw_if = LEXY_KEYWORD("if", kw_id); static constexpr auto kw_do = LEXY_KEYWORD("do", kw_id); static constexpr auto kw_in = LEXY_KEYWORD("in", kw_id); static constexpr auto kw_of = LEXY_KEYWORD("of", kw_id); static constexpr auto kw_this = LEXY_KEYWORD("this", kw_id); static constexpr auto kw_for = LEXY_KEYWORD("for", kw_id); static constexpr auto kw_else = LEXY_KEYWORD("else", kw_id); static constexpr auto kw_while = LEXY_KEYWORD("while", kw_id); static constexpr auto kw_var = LEXY_KEYWORD("var", kw_id); static constexpr auto kw_let = LEXY_KEYWORD("let", kw_id); static constexpr auto kw_null = LEXY_KEYWORD("null", kw_id); static constexpr auto kw_true = LEXY_KEYWORD("true", kw_id); static constexpr auto kw_false = LEXY_KEYWORD("false", kw_id); static constexpr auto kw_const = LEXY_KEYWORD("const", kw_id); static constexpr auto kw_public = LEXY_KEYWORD("public", kw_id); static constexpr auto kw_payable = LEXY_KEYWORD("payable", kw_id); static constexpr auto kw_static = LEXY_KEYWORD("static", kw_id); static constexpr auto kw_export = LEXY_KEYWORD("export", kw_id); static constexpr auto kw_return = LEXY_KEYWORD("return", kw_id); static constexpr auto kw_function = LEXY_KEYWORD("function", kw_id); static constexpr auto kw_namespace = LEXY_KEYWORD("package", kw_id); static constexpr auto kw_continue = LEXY_KEYWORD("continue", kw_id); static constexpr auto kw_break = LEXY_KEYWORD("break", kw_id); static constexpr auto kw_interface = LEXY_KEYWORD("interface", kw_id); static constexpr auto kw_import = LEXY_KEYWORD("import", kw_id); static constexpr auto kw_from = LEXY_KEYWORD("from", kw_id); struct comment { static constexpr auto name = "mmx.lang.comment"; static constexpr auto rule = LEXY_LIT("//") >> dsl::loop( (dsl::ascii::newline >> dsl::break_) | (dsl::eof >> dsl::break_) | dsl::ascii::character); }; struct reserved { static constexpr auto name = "mmx.lang.reserved"; static constexpr auto rule = dsl::literal_set( kw_if, kw_do, kw_for, kw_else, kw_while, kw_var, kw_let, kw_null, kw_true, kw_false, kw_const, kw_public, kw_return, kw_function, kw_namespace, kw_this, kw_export, kw_static, kw_continue, kw_break, kw_interface, kw_import); }; struct expected_identifier { static constexpr auto name = "expected identifier"; }; struct identifier : lexy::token_production { static constexpr auto name = "mmx.lang.identifier"; static constexpr auto rule = kw_id; }; struct restricted_identifier : lexy::transparent_production { struct invalid_reserved { static constexpr auto name = "invalid identifier: reserved keyword"; }; static constexpr auto name = "mmx.lang.restricted_identifier"; static constexpr auto rule = dsl::peek(dsl::p) >> dsl::error | dsl::p; }; struct primitive : lexy::token_production { static constexpr auto name = "mmx.lang.primitive"; static constexpr auto rule = dsl::literal_set(kw_null, kw_true, kw_false); }; struct integer : lexy::transparent_production { struct invalid_integer { static constexpr auto name = "invalid integer"; }; struct hex : lexy::token_production { static constexpr auto name = "mmx.lang.integer.hex"; static constexpr auto rule = dsl::digits >> dsl::if_(dsl::peek(dsl::ascii::alpha_underscore) >> dsl::error); }; struct binary : lexy::token_production { static constexpr auto name = "mmx.lang.integer.binary"; static constexpr auto rule = dsl::digits >> dsl::if_(dsl::peek(dsl::ascii::alpha_digit_underscore) >> dsl::error); }; struct decimal : lexy::token_production { static constexpr auto name = "mmx.lang.integer.decimal"; static constexpr auto rule = dsl::digits >> dsl::if_(dsl::peek(dsl::ascii::alpha_underscore) >> dsl::error); }; static constexpr auto name = "mmx.lang.integer"; static constexpr auto rule = (LEXY_LIT("0b") >> dsl::p) | (LEXY_LIT("0x") >> dsl::p) | dsl::p; }; struct string : lexy::token_production { static constexpr auto name = "mmx.lang.string"; static constexpr auto rule = dsl::quoted(-dsl::ascii::control, dsl::backslash_escape); }; struct address : lexy::token_production { static constexpr auto name = "mmx.lang.address"; static constexpr auto rule = dsl::peek(LEXY_LIT("mmx1")) >> dsl::identifier(dsl::ascii::alpha_digit); }; struct constant { static constexpr auto name = "mmx.lang.constant"; static constexpr auto rule = dsl::p | dsl::p
| dsl::p | dsl::p; }; struct import_list { static constexpr auto name = "mmx.lang.import_list"; static constexpr auto rule = dsl::curly_bracketed.list(dsl::recurse, dsl::sep(dsl::comma)); }; struct import { static constexpr auto name = "mmx.lang.import"; static constexpr auto rule = kw_import >> dsl::p + kw_from + dsl::p; }; struct scope { static constexpr auto name = "mmx.lang.scope"; static constexpr auto rule = dsl::curly_bracketed(dsl::recurse); }; struct namespace_ex { static constexpr auto name = "mmx.lang.namespace"; static constexpr auto rule = kw_namespace >> dsl::p + dsl::p; }; struct expected_constant { static constexpr auto name = "expected a constant"; }; struct function { struct arguments { struct item { static constexpr auto name = "mmx.lang.function.arguments.item"; static constexpr auto rule = dsl::p + dsl::opt(dsl::equal_sign >> (dsl::p | dsl::error)); }; static constexpr auto name = "mmx.lang.function.arguments"; static constexpr auto rule = dsl::parenthesized.opt_list(dsl::p, dsl::sep(dsl::comma)); }; struct qualifier { static constexpr auto name = "mmx.lang.function.qualifier"; static constexpr auto rule = dsl::literal_set(kw_const, kw_public, kw_payable, kw_static); }; static constexpr auto name = "mmx.lang.function"; static constexpr auto rule = kw_function >> dsl::p + dsl::p + dsl::while_(dsl::p) + dsl::p; }; struct operator_ex : lexy::token_production { static constexpr auto name = "mmx.lang.operator"; static constexpr auto rule = dsl::literal_set( dsl::lit_c<'.'>, dsl::lit_c<'+'>, dsl::lit_c<'-'>, dsl::lit_c<'*'>, dsl::lit_c<'/'>, dsl::lit_c<'!'>, dsl::lit_c<'='>, dsl::lit_c<'>'>, dsl::lit_c<'<'>, dsl::lit_c<'&'>, dsl::lit_c<'|'>, dsl::lit_c<'^'>, dsl::lit_c<'~'>, dsl::lit_c<'%'>, LEXY_LIT(">="), LEXY_LIT("<="), LEXY_LIT("=="), LEXY_LIT("!="), LEXY_LIT("^^"), LEXY_LIT("&&"), LEXY_LIT("||"), LEXY_LIT("++"), LEXY_LIT("--"), LEXY_LIT(">>"), LEXY_LIT("<<"), LEXY_LIT("+="), LEXY_LIT("-="), LEXY_LIT("*="), LEXY_LIT("/="), LEXY_LIT("^="), LEXY_LIT("&="), LEXY_LIT("|="), LEXY_LIT("^^="), LEXY_LIT("&&="), LEXY_LIT("||="), LEXY_LIT(">>="), LEXY_LIT("<<="), kw_return); }; struct qualifier : lexy::token_production { static constexpr auto name = "mmx.lang.qualifier"; static constexpr auto rule = dsl::literal_set(kw_let, kw_var, kw_const); }; struct variable { static constexpr auto name = "mmx.lang.variable"; static constexpr auto rule = dsl::p >> dsl::p + dsl::opt(dsl::equal_sign >> dsl::recurse); }; struct interface { static constexpr auto name = "mmx.lang.interface"; static constexpr auto rule = kw_interface >> dsl::p; }; struct array { static constexpr auto name = "mmx.lang.array"; static constexpr auto rule = dsl::square_bracketed.opt_list(dsl::recurse, dsl::trailing_sep(dsl::comma)); }; struct object { struct expected_key { static constexpr auto name = "expected key"; }; struct entry { static constexpr auto name = "mmx.lang.object.entry"; static constexpr auto rule = (dsl::p | dsl::p | dsl::error) + dsl::lit_c<':'> + dsl::recurse; }; static constexpr auto name = "mmx.lang.object"; static constexpr auto rule = dsl::curly_bracketed.opt_list(dsl::p, dsl::trailing_sep(dsl::comma)); }; struct sub_expr { static constexpr auto name = "mmx.lang.sub_expr"; static constexpr auto rule = dsl::parenthesized.opt_list(dsl::recurse, dsl::sep(dsl::comma)); }; struct expression { static constexpr auto name = "mmx.lang.expression"; static constexpr auto rule = dsl::loop( dsl::peek_not(dsl::comma | dsl::semicolon | dsl::lit_c<')'> | dsl::lit_c<']'> | dsl::lit_c<'}'> | dsl::eof) >> ( dsl::p | dsl::p | dsl::p | dsl::p | dsl::p | dsl::else_ >> dsl::p ) | dsl::break_); }; struct statement { static constexpr auto name = "mmx.lang.statement"; static constexpr auto rule = (dsl::p | dsl::p | dsl::p | kw_break | kw_continue | dsl::else_ >> dsl::p) + dsl::semicolon; }; struct else_ex; struct if_ex { static constexpr auto name = "mmx.lang.if"; static constexpr auto rule = kw_if >> dsl::parenthesized(dsl::p) + (dsl::p | dsl::else_ >> dsl::p) + dsl::if_(dsl::peek(kw_else) >> dsl::recurse); }; struct else_ex { static constexpr auto name = "mmx.lang.else"; static constexpr auto rule = kw_else + ((dsl::peek(kw_if) >> dsl::recurse) | dsl::p | dsl::else_ >> dsl::p) + dsl::if_(dsl::peek(kw_else) >> dsl::recurse); }; struct for_loop { static constexpr auto name = "mmx.lang.for"; static constexpr auto rule = kw_for >> dsl::parenthesized.opt_list( (dsl::p >> dsl::opt(kw_of >> dsl::p)) | dsl::else_ >> dsl::p, dsl::trailing_sep(dsl::comma | dsl::semicolon)) + (dsl::p | dsl::else_ >> dsl::p); }; struct while_loop { static constexpr auto name = "mmx.lang.while"; static constexpr auto rule = kw_while >> dsl::parenthesized(dsl::p) + (dsl::p | dsl::else_ >> dsl::p); }; struct source { static constexpr auto name = "mmx.lang.source"; static constexpr auto whitespace = dsl::inline_ | dsl::ascii::space; static constexpr auto rule = dsl::loop( dsl::peek_not(dsl::lit_c<'}'> | dsl::eof) >> ( dsl::p | dsl::p | dsl::p | dsl::p | dsl::p | dsl::p | dsl::else_ >> dsl::p ) | dsl::break_); }; } // lang template void dump_parse_tree(const Node& node, std::ostream& out, int depth = 0, int offset = 0) { out << (depth < 10 ? " " : "") << depth << ":" << (offset < 10 ? " " : "") << offset << " "; for(int i = 0; i < depth; ++i) { out << " "; } const std::string name(node.kind().name()); out << name; if(node.kind().is_token()) { const auto token = node.lexeme(); out << ": " << vnx::to_string(std::string(token.begin(), token.end())); } out << std::endl; int i = 0; for(const auto& child : node.children()) { const std::string name(child.kind().name()); if(name != "whitespace") { dump_parse_tree(child, out, depth + 1, i++); } } } class Compiler { public: static const std::string version; const compile_flags_t flags; Compiler(const compile_flags_t& flags = compile_flags_t()); std::shared_ptr compile(const std::string& source); protected: typedef lexy::parse_tree>> parse_tree_t; typedef typename parse_tree_t::node node_t; struct variable_t { bool is_const = false; bool is_static = false; uint32_t address = 0; std::string name; varptr_t value; }; struct function_t { bool is_init = false; bool is_const = false; bool is_public = false; bool is_payable = false; uint32_t address = 0; std::string name; std::vector args; vnx::optional root; }; struct frame_t { uint32_t section = MEM_STACK; uint32_t addr_offset = 0; std::vector var_list; std::map var_map; uint32_t new_addr() { return section + addr_offset++; } void add_variable(const variable_t& var) { if(var.name.size()) { if(!var_map.emplace(var.name, var_list.size()).second) { throw std::logic_error("duplicate variable name: " + var.name); } } var_list.push_back(var); } }; struct vref_t { bool is_const = false; bool is_interface = false; uint32_t address = -1; vnx::optional key; vnx::optional func; vnx::optional name; vnx::optional method; vref_t() = default; vref_t(uint32_t address) : address(address) {} vref_t(uint32_t address, std::string name) : address(address), name(name) {} vref_t(uint32_t address, uint32_t key) : address(address), key(key) {} vref_t(const std::string& name) : name(name) {} vref_t(const function_t& func) : func(func), name(func.name) {} void check_value() const { if(func) { throw std::logic_error("expected value not function"); } if(is_interface) { throw std::logic_error("expected value not interface"); } if(address == uint32_t(-1) && name) { throw std::logic_error("no such variable: " + (*name)); } } bool is_mutable() const { return !is_const || key; } }; void parse(parse_tree_t& tree); vref_t recurse(const node_t& node); vref_t recurse_expr(const node_t*& p_node, size_t& expr_len, const vref_t* lhs = nullptr, const int lhs_rank = -1); vref_t copy(const vref_t& dst, const vref_t& src, const bool validate = true); uint32_t get(const vref_t& src, const uint32_t* dst = nullptr); void push_scope(); void pop_scope(); const variable_t* find_variable(const std::string& name) const; const function_t* find_function(const std::string& name) const; variable_t get_variable(const std::string& name); uint32_t get_const_address(const varptr_t& value); uint32_t get_const_address(const uint256_t& value); uint32_t get_const_address(const addr_t& value); uint32_t get_const_address(const std::string& value); int get_node_rank(const node_t& node) const; std::string get_namespace(const bool concat = false) const; std::ostream& debug(bool ident = false) const; void print_debug_info(const node_t& node) const; void handle_new_code(); uint32_t get_line_number(const node_t& node) const; static std::vector get_children(const node_t& node); static std::string to_source(const node_t& node); static std::string get_literal(const node_t& node); static varptr_t parse_constant(const node_t& node); private: int depth = 0; int curr_pass = 0; uint8_t math_flags = 0; size_t code_offset = 0; vnx::optional curr_node; vnx::optional curr_function; frame_t global; std::vector code; std::vector frame; std::vector const_vars; std::vector name_space; std::map const_table; std::set interface_set; std::map function_map; std::map line_info; std::map linker_map; std::map rank_map; std::map simple_code_map; std::map this_obj_map; std::string source; std::shared_ptr binary; mutable std::stringstream debug_out; }; const std::string Compiler::version = "1.1.0"; Compiler::Compiler(const compile_flags_t& flags) : flags(flags) { if(flags.catch_overflow) { math_flags |= OPFLAG_CATCH_OVERFLOW; } int rank = 0; rank_map["position"] = -1; rank_map[lang::constant::name] = rank++; rank_map[lang::identifier::name] = rank++; rank_map["."] = rank++; rank_map[lang::array::name] = rank++; rank_map[lang::sub_expr::name] = rank++; rank_map[lang::object::name] = rank++; rank_map["++"] = rank; rank_map["--"] = rank++; rank_map["!"] = rank; rank_map["~"] = rank++; rank_map["*"] = rank; rank_map["/"] = rank; rank_map["%"] = rank++; rank_map["+"] = rank; rank_map["-"] = rank++; rank_map[">>"] = rank; rank_map["<<"] = rank++; rank_map["<"] = rank; rank_map[">"] = rank; rank_map["<="] = rank; rank_map[">="] = rank++; rank_map["!="] = rank; rank_map["=="] = rank++; rank_map["&"] = rank; rank_map["&&"] = rank++; rank_map["^"] = rank; rank_map["^^"] = rank++; rank_map["|"] = rank; rank_map["||"] = rank++; rank_map["="] = rank; rank_map["+="] = rank; rank_map["-="] = rank; rank_map["*="] = rank; rank_map["/="] = rank; rank_map["^="] = rank; rank_map["&="] = rank; rank_map["|="] = rank; rank_map["^^="] = rank; rank_map["&&="] = rank; rank_map["||="] = rank; rank_map[">>="] = rank; rank_map["<<="] = rank++; rank_map["break"] = rank; rank_map["continue"] = rank; rank_map["return"] = rank++; rank_map[lang::expression::name] = rank++; simple_code_map["+"] = OP_ADD; simple_code_map["-"] = OP_SUB; simple_code_map["*"] = OP_MUL; simple_code_map["/"] = OP_DIV; simple_code_map["%"] = OP_MOD; simple_code_map["&"] = OP_AND; simple_code_map["&&"] = OP_AND; simple_code_map["|"] = OP_OR; simple_code_map["||"] = OP_OR; simple_code_map["^"] = OP_XOR; simple_code_map["^^"] = OP_XOR; simple_code_map[">"] = OP_CMP_GT; simple_code_map["<"] = OP_CMP_LT; simple_code_map[">="] = OP_CMP_GTE; simple_code_map["<="] = OP_CMP_LTE; simple_code_map["!="] = OP_CMP_NEQ; simple_code_map["=="] = OP_CMP_EQ; this_obj_map["height"] = MEM_EXTERN + EXTERN_HEIGHT; this_obj_map["txid"] = MEM_EXTERN + EXTERN_TXID; this_obj_map["user"] = MEM_EXTERN + EXTERN_USER; this_obj_map["balance"] = MEM_EXTERN + EXTERN_BALANCE; this_obj_map["address"] = MEM_EXTERN + EXTERN_ADDRESS; this_obj_map["deposit"] = MEM_EXTERN + EXTERN_DEPOSIT; function_map["__nop"].name = "__nop"; function_map["__copy"].name = "__copy"; function_map["size"].name = "size"; function_map["push"].name = "push"; function_map["pop"].name = "pop"; function_map["set"].name = "set"; function_map["get"].name = "get"; function_map["min"].name = "min"; function_map["max"].name = "max"; function_map["clone"].name = "clone"; function_map["deref"].name = "deref"; function_map["erase"].name = "erase"; function_map["delete"].name = "delete"; function_map["typeof"].name = "typeof"; function_map["concat"].name = "concat"; function_map["memcpy"].name = "memcpy"; function_map["send"].name = "send"; function_map["mint"].name = "mint"; function_map["fail"].name = "fail"; function_map["log"].name = "log"; function_map["event"].name = "event"; function_map["read"].name = "read"; function_map["bech32"].name = "bech32"; function_map["binary"].name = "binary"; function_map["binary_le"].name = "binary_le"; function_map["binary_hex"].name = "binary_hex"; function_map["bool"].name = "bool"; function_map["uint"].name = "uint"; function_map["uint_le"].name = "uint_le"; function_map["uint_hex"].name = "uint_hex"; function_map["sha256"].name = "sha256"; function_map["ecdsa_verify"].name = "ecdsa_verify"; function_map["string"].name = "string"; function_map["string_hex"].name = "string_hex"; function_map["string_bech32"].name = "string_bech32"; function_map["rcall"].name = "rcall"; function_map["balance"].name = "balance"; function_map["is_uint"].name = "is_uint"; function_map["is_string"].name = "is_string"; function_map["is_binary"].name = "is_binary"; function_map["is_array"].name = "is_array"; function_map["is_map"].name = "is_map"; function_map["assert"].name = "assert"; global.section = MEM_STATIC; // address zero = null value if(get_const_address(std::make_unique())) { throw std::logic_error("zero address not null"); } } std::shared_ptr Compiler::compile(const std::string& source_) { if(curr_pass) { throw std::logic_error("invalid state"); } source = source_; { // resolve imports parse_tree_t tree; parse(tree); for(const auto& node : get_children(tree.root())) { const std::string name(node.kind().name()); if(name == lang::statement::name) { const auto list = get_children(node); if(!list.empty()) { const auto node = list[0]; const std::string name(node.kind().name()); if(name == lang::import::name) try { const auto list = get_children(node); if(list.size() != 4) { throw std::logic_error("invalid import"); } std::set units; const auto import_list = list[1]; for(const auto& node : get_children(import_list)) { const std::string name(node.kind().name()); if(name == lang::identifier::name) { units.insert(get_literal(node)); } } const auto module = get_literal(list[3]); if(module == "std") { for(const auto& unit : units) { const auto key = unit + ".js"; if(!std_file_map.count(key)) { throw std::logic_error("unknown unit '" + unit + "'"); } source += "\n// Imported from std/" + key + "\n"; source += std_file_map[key]; } } else { throw std::logic_error("unknown module '" + module + "'"); } } catch(const std::exception& ex) { dump_parse_tree(tree.root(), debug()); throw std::logic_error("error at line " + std::to_string(get_line_number(node)) + ": " + ex.what()); } } } } } binary = std::make_shared(); binary->source = source; binary->compiler = std::string("mmx") + "-" + version; binary->build_flags = flags; parse_tree_t tree; parse(tree); debug() << std::endl; dump_parse_tree(tree.root(), debug()); debug() << std::endl; try { // static init stack frame frame.emplace_back(); debug() << "First pass ..." << std::endl; recurse(tree.root()); curr_pass++; frame.clear(); debug() << std::endl << "Second pass ..." << std::endl; for(const auto& entry : function_map) { const auto& func = entry.second; if(const auto& node = func.root) { recurse(*node); } } for(const auto& entry : linker_map) { if(auto func = find_function(entry.second)) { code[entry.first].a = func->address; } else { throw std::runtime_error("undefined reference to function '" + entry.second + "'"); } } } catch(const std::exception& ex) { if(curr_node) { throw std::logic_error(std::string("error at line ") + std::to_string(get_line_number(*curr_node)) + ": " + ex.what()); } else { throw std::logic_error(std::string("error: ") + + ex.what()); } } for(const auto& var : const_vars) { if(!var.value) { throw std::logic_error("missing constant value"); } const auto data = serialize(*var.value, false, false); binary->constant.insert(binary->constant.end(), data.first.get(), data.first.get() + data.second); } for(const auto& var : global.var_list) { if(var.is_static) { binary->fields[var.name] = var.address; } } for(const auto& entry : function_map) { const auto& func = entry.second; if(func.root) { contract::method_t method; method.name = func.name; method.entry_point = func.address; method.is_init = func.is_init; method.is_const = func.is_const; method.is_public = func.is_public; method.is_payable = func.is_payable; for(const auto& arg : func.args) { method.args.push_back(arg.name); } binary->methods[method.name] = method; } } binary->binary = vm::serialize(code); { uint32_t prev = 0; for(const auto& entry : line_info) { if(entry.second != prev) { binary->line_info.insert(entry); prev = entry.second; } } } debug() << std::endl; dump_code(debug(), binary); return binary; } void Compiler::parse(parse_tree_t& tree) { const auto result = lexy::parse_as_tree( tree, lexy::string_input(source), lexy_ext::report_error); if(!result.is_success()) { throw std::runtime_error("parse() failed"); } } std::vector Compiler::get_children(const node_t& node) { std::vector list; for(const auto& child : node.children()) { const std::string name(child.kind().name()); if(name != "whitespace") { list.push_back(child); } } return list; } uint32_t Compiler::get_line_number(const node_t& node) const { const auto loc = lexy::get_input_location( lexy::string_input(source), node.position()); return loc.line_nr(); } std::string Compiler::to_source(const node_t& node) { std::string source; if(node.kind().is_token()) { const auto token = node.lexeme(); source.append(token.begin(), token.end()); } else { for(const auto& child : node.children()) { source += to_source(child); } } std::string out; for(auto c : source) { switch(c) { case '\r': break; case '\n': out += "\\n"; break; case '\t': out += "\\t"; break; default: out += c; break; } } return out; } std::string Compiler::get_literal(const node_t& node) { if(node.kind().is_token()) { const auto token = node.lexeme(); return std::string(token.begin(), token.end()); } else { const auto list = get_children(node); const std::string name(node.kind().name()); if(name == lang::string::name && list.size() == 3) { return get_literal(list[1]); } else { if(list.size() != 1) { throw std::logic_error("not a literal: " + std::string(node.kind().name())); } return get_literal(list[0]); } } } varptr_t Compiler::parse_constant(const node_t& node) { const auto list = get_children(node); const std::string name(node.kind().name()); if(name == lang::expression::name) { if(list.size() == 1) { return parse_constant(list[0]); } } else if(name == lang::constant::name) { if(list.size() > 2) { throw std::logic_error("invalid constant"); } return parse_constant(list.back()); } else if(name == lang::primitive::name) { if(list.size() != 1) { throw std::logic_error("invalid primitive"); } const auto value = get_literal(list[0]); if(value == "null") { return std::make_unique(); } else if(value == "true") { return std::make_unique(TYPE_TRUE); } else if(value == "false") { return std::make_unique(TYPE_FALSE); } } else if(name == lang::integer::hex::name) { return std::make_unique(uint256_t(get_literal(list[0]), 16)); } else if(name == lang::integer::binary::name) { return std::make_unique(uint256_t(get_literal(list[0]), 2)); } else if(name == lang::integer::decimal::name) { return std::make_unique(uint256_t(get_literal(list[0]), 10)); } else if(name == lang::string::name) { if(list.size() == 3) { return binary_t::alloc(get_literal(list[1])); } else if(list.size() == 2) { return binary_t::alloc(""); } else { throw std::logic_error("invalid string"); } } else if(name == lang::address::name) { if(list.size() != 1) { throw std::logic_error("invalid address"); } return to_binary(addr_t(get_literal(list[0]))); } return nullptr; } int Compiler::get_node_rank(const node_t& node) const { const std::string name(node.kind().name()); std::string key; if(name == lang::operator_ex::name) { key = get_literal(node); } else { key = name; } auto iter = rank_map.find(key); if(iter == rank_map.end()) { throw std::logic_error("missing rank for " + name); } return iter->second; } std::string Compiler::get_namespace(const bool concat) const { std::string res; for(const auto& name : name_space) { if(!res.empty()) { res += "."; } res += name; } if(concat && !res.empty()) { res += "."; } return res; } std::ostream& Compiler::debug(bool ident) const { auto& out = flags.verbose ? std::cerr : debug_out; for(int i = 0; ident && i < depth; ++i) { out << " "; } return out; } void Compiler::print_debug_info(const node_t& node) const { debug(true) << node.kind().name(); if(node.kind().is_token()) { const auto token = node.lexeme(); debug() << ": " << vnx::to_string(std::string(token.begin(), token.end())); } debug() << std::endl; } void Compiler::handle_new_code() { vnx::optional line; if(curr_node) { line = get_line_number(*curr_node); } for(auto i = code_offset; i < code.size(); ++i) { if(line) { line_info[i] = *line; } debug(true) << to_string(code[i]) << std::endl; } code_offset = code.size(); } Compiler::vref_t Compiler::recurse(const node_t& node) { handle_new_code(); print_debug_info(node); vref_t out; curr_node = node; depth++; const std::string name(node.kind().name()); const std::string p_name(node.parent().kind().name()); const auto list = get_children(node); if(name == lang::import::name) { // ignore here } else if(name == lang::namespace_ex::name) { if(list.size() < 2) { throw std::logic_error("invalid namespace declaration"); } const auto name = get_literal(list[1]); debug(true) << "name = \"" << name << "\"" << std::endl; // name_space.push_back(name); for(const auto& node : list) { recurse(node); } // name_space.pop_back(); } else if(name == lang::scope::name) { if(list.size() != 3) { throw std::logic_error("invalid scope"); } push_scope(); recurse(list[1]); pop_scope(); } else if(name == lang::source::name) { for(const auto& node : list) { recurse(node); } if(curr_pass == 0 && frame.size() == 1) { // return from static init code.emplace_back(OP_RET); } } else if(name == lang::function::name) { if(list.size() < 3) { throw std::logic_error("invalid function declaration"); } if(curr_pass == 0) { function_t func; func.root = node; func.name = get_namespace(true) + get_literal(list[1]); if(func.name == "init") { func.is_init = true; } if(func.name == "deposit") { func.is_payable = true; } debug(true) << "name = \"" << func.name << "\"" << std::endl; if(function_map.count(func.name)) { throw std::logic_error("duplicate function name"); } for(const auto& arg : get_children(list[2])) { const std::string name(arg.kind().name()); if(name == lang::function::arguments::item::name) { const auto list = get_children(arg); if(list.size() < 1) { throw std::logic_error("invalid function argument"); } const std::string name(list[0].kind().name()); if(name != lang::identifier::name) { throw std::logic_error("expected argument identifier"); } variable_t var; var.name = get_literal(list[0]); var.address = MEM_STACK + 1 + func.args.size(); debug(true) << "[" << func.args.size() << "] " << var.name; if(list.size() == 3) { var.value = parse_constant(list[2]); debug() << " = " << to_string(var.value); } else if(list.size() != 1) { throw std::logic_error("invalid function argument"); } debug() << std::endl; func.args.push_back(var); } } for(size_t i = 3; i < list.size(); ++i) { const auto node = list[i]; const std::string name(node.kind().name()); if(name == lang::function::qualifier::name) { const auto list = get_children(node); if(list.size() != 1) { throw std::logic_error("invalid function qualifier"); } const auto value = get_literal(list[0]); if(value == "const") { func.is_const = true; debug(true) << "is_const = true" << std::endl; } else if(value == "public") { func.is_public = true; debug(true) << "is_public = true" << std::endl; } else if(value == "payable") { func.is_payable = true; debug(true) << "is_payable = true" << std::endl; } else if(value == "static") { func.is_init = true; } else { throw std::logic_error("invalid function qualifier"); } } } if(func.is_init) { debug(true) << "is_init = true" << std::endl; if(func.is_const) { throw std::logic_error("constructor cannot be const"); } if(func.is_public) { throw std::logic_error("constructor cannot be public"); } if(func.is_payable) { throw std::logic_error("constructor cannot be payable"); } } function_map[func.name] = func; } else { // second pass const auto func_name = get_namespace(true) + get_literal(list[1]); debug(true) << "name = \"" << func_name << "\"" << std::endl; if(curr_function) { throw std::logic_error("cannot define function inside a function"); } auto& func = function_map[func_name]; func.address = code.size(); debug(true) << "address = 0x" << std::hex << func.address << std::dec << std::endl; frame_t scope; scope.addr_offset = 1 + func.args.size(); for(const auto& arg : func.args) { scope.add_variable(arg); } curr_function = func; if(func.is_init) { code.emplace_back(OP_CALL, 0, 0, scope.new_addr() - MEM_STACK); } frame.push_back(scope); code.emplace_back(OP_COPY, 0, MEM_STACK, 0); recurse(list.back()); frame.pop_back(); if(code.empty() || code.back().code != OP_RET) { code.emplace_back(OP_RET); } curr_function = nullptr; } } else if(name == lang::variable::name) { if(list.size() < 2) { throw std::logic_error("invalid variable declaration"); } const auto qualifier = get_literal(list[0]); variable_t var; var.is_const = (qualifier == "const"); var.name = get_literal(list[1]); bool is_constant = false; bool is_expression = false; if(list.size() == 4) { const auto value = parse_constant(list[3]); if(var.is_const && value) { is_constant = true; var.value = value; } else { is_expression = true; } } else if(list.size() != 2) { throw std::logic_error("invalid variable declaration"); } var.is_static = !is_constant && frame.size() == 1; auto& scope = frame.size() == 1 ? global : frame.back(); if(is_constant) { var.address = get_const_address(var.value); } else { var.address = scope.new_addr(); } debug(true) << qualifier << " " << var.name; if(is_constant) { debug() << " = " << to_string(var.value); } if(is_expression) { debug() << " = "; } debug() << " (0x" << std::hex << var.address << std::dec << ")" << std::endl; if(is_expression) { copy(var.address, recurse(list.back())); } else if(!is_constant) { copy(var.address, 0); } scope.add_variable(var); out.address = var.address; } else if(name == lang::interface::name) { if(list.size() != 2) { throw std::logic_error("invalid interface declaration"); } const auto qualifier = get_literal(list[0]); const auto name = get_literal(list[1]); debug(true) << qualifier << " " << name << std::endl; if(!interface_set.emplace(name).second) { throw std::logic_error("duplicate interface declaration"); } } else if(name == lang::if_ex::name) { if(list.size() < 5) { throw std::logic_error("invalid if()"); } const auto cond = get(recurse(list[2])); const auto jump = code.size(); code.emplace_back(OP_JUMPN, 0, -1, cond); recurse(list[4]); if(list.size() == 6) { const auto skip = code.size(); code.emplace_back(OP_JUMP, 0, -1); code[jump].a = code.size(); recurse(list[5]); code[skip].a = code.size(); } else { code[jump].a = code.size(); } } else if(name == lang::else_ex::name) { if(list.size() < 2) { throw std::logic_error("invalid else"); } recurse(list[1]); } else if(name == lang::while_loop::name) { if(list.size() < 5) { throw std::logic_error("invalid while()"); } const auto begin = code.size(); const auto cond = get(recurse(list[2])); const auto jump = code.size(); code.emplace_back(OP_JUMPN, 0, -1, cond); recurse(list.back()); code.emplace_back(OP_JUMP, 0, begin); code[jump].a = code.size(); } else if(name == lang::for_loop::name) { if(list.size() < 5) { throw std::logic_error("invalid for()"); } bool is_range = false; std::vector> nodes; nodes.emplace_back(); for(size_t i = 2; i + 1 < list.size(); ++i) { const auto& node = list[i]; const std::string name(node.kind().name()); if(name == "literal") { const auto lit = get_literal(node); if(lit == ";") { nodes.emplace_back(); } else if(lit == "of") { if(nodes.back().size() != 1) { throw std::logic_error("invalid range for()"); } is_range = true; } } else { nodes.back().push_back(node); } } push_scope(); if(is_range) { if(nodes.size() != 1) { throw std::logic_error("invalid range for()"); } const auto& range_ex = nodes.front(); if(range_ex.size() != 2) { throw std::logic_error("invalid range for()"); } auto iter = range_ex.begin(); const auto var_addr = get(recurse(*iter)); iter++; const auto range_addr = get(recurse(*iter)); auto& stack = frame.back(); const auto counter = stack.new_addr(); copy(counter, get_const_address(uint256_t(0))); const auto size = stack.new_addr(); code.emplace_back(OP_SIZE, OPFLAG_REF_B, size, range_addr); const auto begin = code.size(); const auto cond = stack.new_addr(); code.emplace_back(OP_CMP_LT, 0, cond, counter, size); const auto jump = code.size(); code.emplace_back(OP_JUMPN, 0, -1, cond); code.emplace_back(OP_GET, OPFLAG_REF_B, var_addr, range_addr, counter); recurse(list.back()); code.emplace_back(OP_ADD, OPFLAG_CATCH_OVERFLOW, counter, counter, get_const_address(1)); code.emplace_back(OP_JUMP, 0, begin); code[jump].a = code.size(); } else if(nodes.size() == 3) { if(nodes[1].size() != 1) { throw std::logic_error("invalid for() condition"); } for(const auto& node : nodes[0]) { recurse(node); } const auto begin = code.size(); const auto cond = get(recurse(nodes[1].front())); const auto jump = code.size(); code.emplace_back(OP_JUMPN, 0, -1, cond); recurse(list.back()); for(const auto& node : nodes[2]) { recurse(node); } code.emplace_back(OP_JUMP, 0, begin); code[jump].a = code.size(); } else { throw std::logic_error("invalid for()"); } pop_scope(); } else if(name == lang::statement::name) { if(list.size() != 2) { throw std::logic_error("invalid statement"); } recurse(list[0]); } else if(name == lang::expression::name) { auto p_node = list.data(); auto expr_len = list.size(); out = recurse_expr(p_node, expr_len); if(expr_len != 0) { throw std::logic_error("invalid expression"); } out.check_value(); } else if(name == "position") { // ignore dummy position nodes by lexy } else { throw std::logic_error("invalid statement: " + name); } handle_new_code(); depth--; return out; } Compiler::vref_t Compiler::recurse_expr(const node_t*& p_node, size_t& expr_len, const vref_t* lhs, const int lhs_rank) { if(expr_len == 0) { return lhs ? *lhs : vref_t(); } const auto node = p_node[0]; const auto rank = get_node_rank(node); if(lhs_rank >= 0 && rank >= lhs_rank) { if(!lhs) { throw std::logic_error("invalid expression"); } return *lhs; } p_node++; expr_len--; vref_t out; auto& stack = frame.back(); const std::string name(node.kind().name()); const auto list = get_children(node); debug(true) << name << " (rank = " << rank << ", expr_len = " << expr_len << ", list = " << list.size() << ")" << std::endl; depth++; if(name == lang::identifier::name) { if(lhs) { throw std::logic_error("invalid expression"); } const auto name = get_literal(node); if(auto var = find_variable(name)) { out.address = var->address; out.is_const = var->is_const; } else if(auto func = find_function(name)) { out.func = *func; out.address = func->address; } else if(interface_set.count(name)) { out.is_interface = true; } out.name = name; } else if(name == lang::array::name) { if(lhs) { if(list.size() != 3) { throw std::logic_error("invalid bracket operator"); } const auto key = recurse(list[1]); if(key.key) { out.key = copy(stack.new_addr(), key).address; } else { out.key = key.address; } if(lhs->key) { out.address = copy(stack.new_addr(), *lhs).address; } else { out.address = lhs->address; } lhs->check_value(); } else { out.address = stack.new_addr(); code.emplace_back(OP_CLONE, 0, out.address, get_const_address(std::make_unique())); for(const auto& node : list) { const std::string name(node.kind().name()); if(name == lang::expression::name) { const auto value = recurse(node); code.emplace_back(OP_PUSH_BACK, OPFLAG_REF_A, out.address, get(value)); } } } } else if(name == lang::operator_ex::name) { const auto op = get_literal(node); bool is_assign = false; auto iter = simple_code_map.find(op); if(iter == simple_code_map.end() && !op.empty() && op.back() == '=') { is_assign = true; iter = simple_code_map.find(op.substr(0, op.size() - 1)); } if(iter != simple_code_map.end()) { if(!lhs) { throw std::logic_error("missing left operand"); } if(expr_len < 1) { throw std::logic_error("missing right operand"); } int op_flags = 0; auto op_code = opcode_e(iter->second); switch(op_code) { case OP_ADD: case OP_SUB: case OP_MUL: case OP_DIV: case OP_MOD: op_flags |= math_flags; break; case OP_XOR: case OP_AND: case OP_OR: if(op == "^" || op == "&" || op == "|" || op == "^=" || op == "&=" || op == "|=") { op_flags |= OPFLAG_BITWISE; } break; default: break; } auto rhs = get(recurse_expr(p_node, expr_len, nullptr, rank)); switch(op_code) { case OP_DIV: case OP_MOD: if(rhs < const_vars.size() && flags.opt_level > 0) { // optimize division by power of two if(const auto& value = const_vars[rhs].value) { if(value->type == TYPE_UINT) { const auto& uint = ((const uint_t*)value.get())->value; if(uint != 0 && (uint & (uint - 1)) == 0) { int count = 0; auto tmp = uint; for(; count <= 256 && !(tmp & 1); ++count, tmp >>= 1); if(count < 256) { debug(false) << "Optimizing DIV / MOD by power of two: " << uint << " => " << count << std::endl; switch(op_code) { case OP_DIV: op_code = OP_SHR; op_flags = 0; rhs = count; break; case OP_MOD: op_code = OP_AND; op_flags = OPFLAG_BITWISE; rhs = get_const_address((uint256_1 << count) - 1); break; default: break; } } } } } } break; default: break; } if(is_assign) { if(lhs->key) { const auto tmp_addr = stack.new_addr(); code.emplace_back(op_code, op_flags, tmp_addr, get(*lhs), rhs); copy(*lhs, tmp_addr); } else { lhs->check_value(); code.emplace_back(op_code, op_flags, lhs->address, lhs->address, rhs); } out = *lhs; } else { out.address = stack.new_addr(); code.emplace_back(op_code, op_flags, out.address, get(*lhs), rhs); } } else if(op == "=") { if(!lhs) { throw std::logic_error("missing left operand"); } if(!lhs->is_mutable()) { if(lhs->name) { throw std::logic_error("cannot assign to const variable: " + *lhs->name); } else { throw std::logic_error("assignment to const variable"); } } if(expr_len < 1) { throw std::logic_error("missing right operand"); } const auto rhs = recurse_expr(p_node, expr_len, nullptr, rank); out = copy(*lhs, rhs); } else if(op == ".") { if(!lhs) { throw std::logic_error("missing left operand"); } if(expr_len < 1) { throw std::logic_error("missing right operand"); } const auto rhs = recurse_expr(p_node, expr_len, nullptr, rank); if(!rhs.name) { throw std::logic_error("expected identifier"); } const auto key = *rhs.name; if(lhs->is_interface && !lhs->method) { out = *lhs; out.method = key; } else if(lhs->name && *lhs->name == "this" && !lhs->key) { auto iter = this_obj_map.find(key); if(iter == this_obj_map.end()) { throw std::logic_error("no such variable: this." + key); } out.address = iter->second; out.is_const = true; } else if(lhs->address == MEM_EXTERN + EXTERN_DEPOSIT && !lhs->key) { out = *lhs; if(key == "currency") { out.key = get_const_address(uint256_t(0)); } else if(key == "amount") { out.key = get_const_address(uint256_t(1)); } else { throw std::logic_error("no such variable: this.deposit." + key); } } else { out.address = get(*lhs); out.key = get_const_address(key); out.is_const = lhs->is_const; } } else if(op == "!" || op == "~") { if(lhs) { throw std::logic_error("unexpected left operand"); } if(expr_len < 1) { throw std::logic_error("missing right operand"); } const auto rhs = recurse_expr(p_node, expr_len, nullptr, rank); out.address = stack.new_addr(); code.emplace_back(OP_NOT, op == "~" ? OPFLAG_BITWISE : 0, out.address, get(rhs)); } else if(op == "++" || op == "--") { if(lhs) { if(lhs->is_const) { throw std::logic_error("operand is const"); } out.address = copy(stack.new_addr(), *lhs).address; const auto tmp_addr = lhs->key ? stack.new_addr() : lhs->address; code.emplace_back(op == "++" ? OP_ADD : OP_SUB, math_flags, tmp_addr, out.address, get_const_address(1)); copy(*lhs, tmp_addr); } else { if(expr_len < 1) { throw std::logic_error("missing right operand"); } out = recurse_expr(p_node, expr_len, nullptr, rank); if(out.is_const) { throw std::logic_error("operand is const"); } const auto tmp_addr = out.key ? copy(stack.new_addr(), out).address : out.address; code.emplace_back(op == "++" ? OP_ADD : OP_SUB, math_flags, tmp_addr, tmp_addr, get_const_address(1)); copy(out, tmp_addr); } } else if(op == ">>" || op == "<<") { if(!lhs) { throw std::logic_error("missing left operand"); } out.address = stack.new_addr(); const auto rhs = recurse_expr(p_node, expr_len, nullptr, rank); code.emplace_back(op == ">>" ? OP_SHR : OP_SHL, OPFLAG_REF_C, out.address, get(*lhs), get(rhs)); } else if(op == "return") { if(lhs) { throw std::logic_error("unexpected left operand"); } if(expr_len > 0) { copy(MEM_STACK, recurse_expr(p_node, expr_len, nullptr, rank)); } code.emplace_back(OP_RET); } else { throw std::logic_error("invalid operator: " + op); } } else if(name == lang::sub_expr::name) { std::vector args; for(const auto& node : list) { const std::string name(node.kind().name()); if(name == lang::expression::name) { args.push_back(node); } } if(lhs && lhs->func) { const auto& name = lhs->func->name; if(name == "__nop") { if(args.size()) { throw std::logic_error("expected 0 arguments for __nop()"); } code.emplace_back(OP_NOP); } else if(name == "size") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for size()"); } out.address = stack.new_addr(); code.emplace_back(OP_SIZE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); } else if(name == "push") { if(args.size() < 2) { throw std::logic_error("expected 2 or more arguments for push(array, value)"); } const auto array = get(recurse(args[0])); for(size_t i = 1; i < args.size(); ++i) { code.emplace_back(OP_PUSH_BACK, OPFLAG_REF_A, array, get(recurse(args[i]))); } out.address = 0; } else if(name == "pop") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for pop()"); } out.address = stack.new_addr(); code.emplace_back(OP_POP_BACK, OPFLAG_REF_B, out.address, get(recurse(args[0]))); } else if(name == "set") { if(args.size() != 3) { throw std::logic_error("expected 3 arguments for set(..., key, value)"); } out.address = get(recurse(args[2])); code.emplace_back(OP_SET, OPFLAG_REF_A, get(recurse(args[0])), get(recurse(args[1])), out.address); } else if(name == "get") { if(args.size() != 2) { throw std::logic_error("expected 2 arguments for get()"); } out.address = stack.new_addr(); code.emplace_back(OP_GET, OPFLAG_REF_B, out.address, get(recurse(args[0])), get(recurse(args[1]))); } else if(name == "min" || name == "max") { if(args.size() < 2) { throw std::logic_error("expected 2 or more arguments for " + name + "()"); } out.address = stack.new_addr(); auto lhs = get(recurse(args[0])); for(size_t i = 1; i < args.size(); ++i) { code.emplace_back(name == "min" ? OP_MIN : OP_MAX, 0, out.address, lhs, get(recurse(args[i]))); lhs = out.address; } } else if(name == "__copy") { if(args.size() != 2) { throw std::logic_error("expected 2 arguments for __copy(dst, src)"); } copy(recurse(args[0]), recurse(args[1]), false); out.address = 0; } else if(name == "clone") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for clone()"); } out.address = stack.new_addr(); code.emplace_back(OP_CLONE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); } else if(name == "deref") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for deref()"); } out.address = stack.new_addr(); code.emplace_back(OP_COPY, OPFLAG_REF_B, out.address, get(recurse(args[0]))); } else if(name == "delete") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for delete()"); } code.emplace_back(OP_CLR, 0, get(recurse(args[0]))); out.address = 0; } else if(name == "erase") { if(args.size() != 2) { throw std::logic_error("expected 2 arguments for erase(object, key)"); } out.address = 0; code.emplace_back(OP_ERASE, OPFLAG_REF_A, get(recurse(args[0])), get(recurse(args[1]))); } else if(name == "typeof") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for typeof()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); } else if(name == "is_uint") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for is_uint()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); code.emplace_back(OP_CMP_EQ, 0, out.address, out.address, get_const_address(int(TYPE_UINT))); } else if(name == "is_string") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for is_string()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); code.emplace_back(OP_CMP_EQ, 0, out.address, out.address, get_const_address(int(TYPE_STRING))); } else if(name == "is_binary") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for is_binary()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); code.emplace_back(OP_CMP_EQ, 0, out.address, out.address, get_const_address(int(TYPE_BINARY))); } else if(name == "is_array") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for is_array()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); code.emplace_back(OP_CMP_EQ, 0, out.address, out.address, get_const_address(int(TYPE_ARRAY))); } else if(name == "is_map") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for is_map()"); } out.address = stack.new_addr(); code.emplace_back(OP_TYPE, OPFLAG_REF_B, out.address, get(recurse(args[0]))); code.emplace_back(OP_CMP_EQ, 0, out.address, out.address, get_const_address(int(TYPE_MAP))); } else if(name == "concat") { if(args.size() < 2) { throw std::logic_error("expected 2 or more arguments for concat()"); } auto lhs = get(recurse(args[0])); for(size_t i = 1; i < args.size(); ++i) { out.address = stack.new_addr(); code.emplace_back(OP_CONCAT, OPFLAG_REF_B | OPFLAG_REF_C, out.address, lhs, get(recurse(args[i]))); lhs = out.address; } } else if(name == "send") { if(args.size() < 2 || args.size() > 4) { throw std::logic_error("expected 2 to 4 arguments for send(address, amount, [currency], [memo])"); } code.emplace_back(OP_SEND, 0, get(recurse(args[0])), get(recurse(args[1])), args.size() > 2 ? get(recurse(args[2])) : get_const_address(addr_t()), args.size() > 3 ? get(recurse(args[3])) : 0); out.address = 0; } else if(name == "mint") { if(args.size() < 2 || args.size() > 3) { throw std::logic_error("expected 2 to 3 arguments for mint(address, amount, [memo])"); } code.emplace_back(OP_MINT, 0, get(recurse(args[0])), get(recurse(args[1])), args.size() > 2 ? get(recurse(args[2])) : 0); out.address = 0; } else if(name == "fail") { if(args.size() != 1 && args.size() != 2) { throw std::logic_error("expected 1 or 2 arguments for fail(message, [code])"); } code.emplace_back(OP_FAIL, args.size() > 1 ? OPFLAG_REF_B : 0, get(recurse(args[0])), args.size() > 1 ? get(recurse(args[1])) : 0); out.address = 0; } else if(name == "log") { if(args.size() != 2) { throw std::logic_error("expected 2 arguments for log(level, message)"); } code.emplace_back(OP_LOG, OPFLAG_REF_A, get(recurse(args[0])), get(recurse(args[1]))); out.address = 0; } else if(name == "event") { if(args.size() != 2) { throw std::logic_error("expected 2 arguments for event(name, data)"); } code.emplace_back(OP_EVENT, 0, get(recurse(args[0])), get(recurse(args[1]))); out.address = 0; } else if(name == "read") { out.address = stack.new_addr(); if(args.size() == 2) { code.emplace_back(OP_CREAD, 0, out.address, get(recurse(args[1])), get(recurse(args[0]))); } else if(args.size() == 1) { code.emplace_back(OP_CREAD, 0, out.address, MEM_EXTERN + EXTERN_ADDRESS, get(recurse(args[0]))); } else { throw std::logic_error("expected 1 or 2 arguments for read(field, [address])"); } } else if(name == "bech32") { if(args.size() == 0) { out.address = stack.new_addr(); code.emplace_back(OP_COPY, 0, out.address, get_const_address(addr_t())); } else if(args.size() == 1) { out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_ADDRESS, CONVTYPE_DEFAULT); } else { throw std::logic_error("expected 0 or 1 argument for bech32()"); } } else if(name == "binary") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for binary()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_BINARY, CONVTYPE_DEFAULT); } else if(name == "binary_le") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for binary_le()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), (CONVTYPE_BINARY | (CONVTYPE_LITTLE_ENDIAN << 8)), CONVTYPE_DEFAULT); } else if(name == "binary_hex") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for binary_hex()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_BINARY, CONVTYPE_BASE_16); } else if(name == "bool") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for bool()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_BOOL, CONVTYPE_DEFAULT); } else if(name == "uint") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for uint()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_UINT, CONVTYPE_DEFAULT); } else if(name == "uint_le") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for uint_le()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_UINT, CONVTYPE_LITTLE_ENDIAN); } else if(name == "uint_hex") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for uint_hex()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_UINT, CONVTYPE_BASE_16); } else if(name == "sha256") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for sha256()"); } out.address = stack.new_addr(); code.emplace_back(OP_SHA256, 0, out.address, get(recurse(args[0]))); } else if(name == "ecdsa_verify") { if(args.size() != 3) { throw std::logic_error("expected 3 arguments for ecdsa_verify(msg, pubkey, signature)"); } out.address = stack.new_addr(); code.emplace_back(OP_VERIFY, 0, out.address, get(recurse(args[0])), get(recurse(args[1])), get(recurse(args[2]))); } else if(name == "string") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for string()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_STRING, CONVTYPE_DEFAULT); } else if(name == "string_hex") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for string_hex()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_STRING | (CONVTYPE_BASE_16 << 8), CONVTYPE_DEFAULT); } else if(name == "string_bech32") { if(args.size() != 1) { throw std::logic_error("expected 1 argument for string_bech32()"); } out.address = stack.new_addr(); code.emplace_back(OP_CONV, 0, out.address, get(recurse(args[0])), CONVTYPE_STRING | (CONVTYPE_ADDRESS << 8), CONVTYPE_DEFAULT); } else if(name == "memcpy") { if(args.size() < 2 || args.size() > 3) { throw std::logic_error("expected 2 to 3 arguments for memcpy(src, count, [offset])"); } out.address = stack.new_addr(); code.emplace_back(OP_MEMCPY, OPFLAG_REF_C | OPFLAG_REF_D, out.address, get(recurse(args[0])), get(recurse(args[1])), (args.size() > 2 ? get(recurse(args[2])) : get_const_address(uint256_0))); } else if(name == "rcall") { if(args.size() < 2) { throw std::logic_error("expected at least two arguments for rcall(contract, method, ...)"); } const auto contract = get(recurse(args[0])); const auto method = get(recurse(args[1])); std::vector fargs; for(size_t i = 2; i < args.size(); ++i) { fargs.push_back(recurse(args[i])); // collect arguments first } const auto offset = stack.new_addr(); for(size_t i = 0; i < fargs.size(); ++i) { copy(offset + 1 + i, fargs[i]); } code.emplace_back(OP_RCALL, 0, contract, method, offset - MEM_STACK, args.size() - 2); out.address = offset; } else if(name == "balance") { if(args.size() > 1) { throw std::logic_error("expected at most one argument for balance([currency])"); } const auto currency = args.size() > 0 ? get(recurse(args[0])) : get_const_address(addr_t()); out.address = stack.new_addr(); code.emplace_back(OP_BALANCE, 0, out.address, currency); } else if(name == "assert") { if(args.size() < 1 || args.size() > 3) { throw std::logic_error("expected 1-3 arguments for assert(condition, [message], [code])"); } code.emplace_back(OP_JUMPI, 0, code.size() + 2, get(recurse(args[0]))); if(args.size() == 1) { code.emplace_back(OP_FAIL, 0, get_const_address("assert(" + to_source(args[0]) + ")")); } else { code.emplace_back(OP_FAIL, args.size() > 2 ? OPFLAG_REF_B : 0, get(recurse(args[1])), args.size() > 2 ? get(recurse(args[2])) : 0); } out.address = 0; } else { if(curr_function && curr_function->is_const && lhs->func->root && !lhs->func->is_const) { throw std::logic_error("cannot call non-const function inside const function: " + name); } if(args.size() > lhs->func->args.size()) { throw std::logic_error("too many function arguments: " + std::to_string(args.size()) + " > " + std::to_string(lhs->func->args.size())); } std::vector fargs; for(size_t i = 0; i < args.size(); ++i) { fargs.push_back(recurse(args[i])); // collect arguments first } const auto offset = stack.new_addr(); for(size_t i = 0; i < fargs.size(); ++i) { copy(offset + 1 + i, fargs[i]); } for(size_t i = args.size(); i < lhs->func->args.size(); ++i) { const auto& var = lhs->func->args[i]; code.emplace_back(OP_COPY, 0, offset + 1 + i, var.value ? get_const_address(var.value) : 0); } linker_map[code.size()] = name; code.emplace_back(OP_CALL, 0, -1, offset - MEM_STACK); out.address = offset; } } else if(lhs && lhs->is_interface) { if(!lhs->name) { throw std::logic_error("missing interface name"); } if(!lhs->method) { throw std::logic_error("missing method name"); } const auto contract = get_const_address(*lhs->name); const auto method = get_const_address(*lhs->method); std::vector fargs; for(size_t i = 0; i < args.size(); ++i) { fargs.push_back(recurse(args[i])); // collect arguments first } const auto offset = stack.new_addr(); for(size_t i = 0; i < fargs.size(); ++i) { copy(offset + 1 + i, fargs[i]); } code.emplace_back(OP_RCALL, 0, contract, method, offset - MEM_STACK, args.size()); out.address = offset; } else if(lhs) { if(lhs->name) { throw std::logic_error("not a function: " + *lhs->name); } throw std::logic_error("expected function name"); } else { if(list.size() != 3) { throw std::logic_error("invalid sub-expression"); } out = recurse(list[1]); } } else if(name == lang::constant::name) { if(lhs) { throw std::logic_error("unexpected left operand"); } const auto value = parse_constant(node); out.address = get_const_address(value); out.is_const = true; } else if(name == lang::object::name) { if(lhs) { throw std::logic_error("unexpected left operand"); } out.address = stack.new_addr(); code.emplace_back(OP_CLONE, 0, out.address, get_const_address(std::make_unique())); for(const auto& node : list) { const std::string name(node.kind().name()); if(name == lang::object::entry::name) { const auto list = get_children(node); if(list.size() != 3) { throw std::logic_error("invalid object entry"); } varptr_t key; const std::string key_type(list[0].kind().name()); if(key_type == lang::identifier::name) { key = binary_t::alloc(get_literal(list[0])); } else if(key_type == lang::string::name) { key = parse_constant(list[0]); } else { throw std::logic_error("invalid object key"); } const auto key_addr = get_const_address(key); copy(vref_t(out.address, key_addr), recurse(list[2])); } } } else if(name == "position") { // ignore } else { throw std::logic_error("invalid expression"); } handle_new_code(); depth--; return recurse_expr(p_node, expr_len, &out, lhs_rank); } void Compiler::push_scope() { frame_t scope; if(!frame.empty()) { scope.addr_offset = frame.back().addr_offset; } frame.push_back(scope); } void Compiler::pop_scope() { frame.pop_back(); } Compiler::vref_t Compiler::copy(const vref_t& dst, const vref_t& src, const bool validate) { // this function does not allocate anything new on the stack // so it's safe to use for preparing function call arguments src.check_value(); dst.check_value(); if(validate && !dst.is_mutable()) { throw std::logic_error("copy(): dst is const"); } if(src.key && dst.key) { code.emplace_back(OP_SET, OPFLAG_REF_A, dst.address, *dst.key, get(src)); } else if(!src.key && dst.key) { code.emplace_back(OP_SET, OPFLAG_REF_A, dst.address, *dst.key, src.address); } else if(src.key && !dst.key) { get(src, &dst.address); } else if(dst.address != src.address) { code.emplace_back(OP_COPY, 0, dst.address, src.address); } return dst; } uint32_t Compiler::get(const vref_t& src, const uint32_t* dst) { src.check_value(); if(src.key) { const auto dst_addr = (dst ? *dst : frame.back().new_addr()); if(src.address == MEM_EXTERN + EXTERN_BALANCE) { code.emplace_back(OP_BALANCE, 0, dst_addr, *src.key); } else { code.emplace_back(OP_GET, OPFLAG_REF_B, dst_addr, src.address, *src.key); } return dst_addr; } if(dst) { return copy(*dst, src).address; } return src.address; } const Compiler::variable_t* Compiler::find_variable(const std::string& name) const { for(auto iter = frame.rbegin(); iter != frame.rend(); ++iter) { auto iter2 = iter->var_map.find(name); if(iter2 != iter->var_map.end()) { return &iter->var_list[iter2->second]; } } { auto iter = global.var_map.find(name); if(iter != global.var_map.end()) { return &global.var_list[iter->second]; } } return nullptr; } Compiler::variable_t Compiler::get_variable(const std::string& name) { if(auto var = find_variable(name)) { return *var; } throw std::logic_error("no such variable: " + name); } const Compiler::function_t* Compiler::find_function(const std::string& name) const { auto iter = function_map.find(name); if(iter != function_map.end()) { return &iter->second; } return nullptr; } uint32_t Compiler::get_const_address(const varptr_t& value) { if(!value) { throw std::logic_error("get_const_addr(): !value"); } { auto iter = const_table.find(value); if(iter != const_table.end()) { return MEM_CONST + iter->second; } } const auto addr = const_table[value] = const_vars.size(); variable_t var; var.value = value; var.address = MEM_CONST + addr; const_vars.push_back(var); debug(true) << "CONSTANT [0x" << std::hex << var.address << std::dec << "] " << to_string(value) << std::endl; return var.address; } uint32_t Compiler::get_const_address(const uint256_t& value) { return get_const_address(std::make_unique(value)); } uint32_t Compiler::get_const_address(const addr_t& value) { return get_const_address(vm::to_binary(value)); } uint32_t Compiler::get_const_address(const std::string& value) { return get_const_address(vm::to_binary(value)); } std::shared_ptr compile(const std::string& source, const compile_flags_t& flags) { //#ifdef _WIN32 // lexy_ext::shell> shell; // // lexy::trace_to(shell.write_message().output_iterator(), // lexy::string_input(source), {lexy::visualize_use_color}); //#else // lexy_ext::shell> shell; // // lexy::trace_to(shell.write_message().output_iterator(), // lexy::string_input(source), {lexy::visualize_fancy}); //#endif // _WIN32 Compiler compiler(flags); return compiler.compile(source); } std::shared_ptr compile_files(const std::vector& file_names, const compile_flags_t& flags) { std::string buffer; for(const auto& src : file_names) { buffer += read_file(src); } return vm::compile(buffer, flags); } } // vm } // mmx ================================================ FILE: src/vm/Engine.cpp ================================================ /* * Engine.cpp * * Created on: Apr 22, 2022 * Author: mad */ #include #include #include #include #include #include namespace mmx { namespace vm { static const uint64_t MEM_HEAP_NEXT_ALLOC = MEM_HEAP + GLOBAL_NEXT_ALLOC; Engine::Engine(const addr_t& contract, std::shared_ptr backend, bool read_only) : contract(contract), storage(std::make_shared(this, backend, read_only)) { } Engine::~Engine() { key_map.clear(); } void Engine::addref(const uint64_t dst) { if(auto var = read(dst, true)) { var->addref(); } } void Engine::unref(const uint64_t dst) { if(auto var = read(dst, true)) { if(var->unref()) { erase(dst); } } } var_t* Engine::assign(const uint64_t dst, std::unique_ptr value) { if(have_init && dst < MEM_EXTERN) { throw std::logic_error("already initialized"); } switch(value->type) { case TYPE_ARRAY: ((array_t*)value.get())->address = dst; break; case TYPE_MAP: ((map_t*)value.get())->address = dst; break; default: break; } auto& var = memory[dst]; if(!var && dst >= MEM_STATIC && dst < new_heap_base) { var = storage->read(contract, dst); } return assign(var, std::move(value)); } var_t* Engine::assign(std::unique_ptr& var, std::unique_ptr value) { if(var) { if(var->flags & FLAG_CONST) { throw std::logic_error("read-only memory"); } value->flags = var->flags; value->ref_count = var->ref_count; clear(var.get()); } const auto size = num_bytes(value.get()); if(size > MAX_VALUE_BYTES) { throw std::runtime_error("value size too large: " + std::to_string(size) + " bytes"); } gas_used += WRITE_COST + (size * WRITE_32_BYTE_COST) / 32; var = std::move(value); var->flags |= FLAG_DIRTY; var->flags &= ~FLAG_DELETED; if(var->type == TYPE_REF) { addref(((const ref_t*)var.get())->address); } return var.get(); } uint64_t Engine::lookup(const uint64_t src, const bool read_only) { return lookup(read_fail(src), read_only); } uint64_t Engine::lookup(const var_t* var, const bool read_only) { return var ? lookup(*var, read_only) : 0; } uint64_t Engine::lookup(const varptr_t& var, const bool read_only) { return lookup(var.get(), read_only); } uint64_t Engine::lookup(const var_t& var, const bool read_only) { if(var.type == TYPE_NIL) { throw std::runtime_error("invalid key type"); } const auto size = num_bytes(var); if(size > MAX_KEY_BYTES) { throw std::runtime_error("invalid key size: " + std::to_string(size)); } const auto iter = key_map.find(&var); if(iter != key_map.end()) { return iter->second; } if(auto key = storage->lookup(contract, var)) { const auto& value = read_fail(key); if(!(value.flags & FLAG_CONST) || !(value.flags & FLAG_KEY)) { throw std::logic_error("lookup(): key missing flag CONST / KEY"); } key_map[&value] = key; return key; } if(read_only) { return 0; } const auto key = alloc(); const auto value = write(key, var); value->flags |= FLAG_CONST | FLAG_KEY; value->addref(); key_map[value] = key; return key; } var_t* Engine::write(const uint64_t dst, const var_t* src) { if(src) { return write(dst, *src); } return write(dst, var_t()); } var_t* Engine::write(const uint64_t dst, const var_t& src) { if(have_init && dst < MEM_EXTERN) { throw std::logic_error("already initialized"); } auto& var = memory[dst]; if(!var && dst >= MEM_STATIC && dst < new_heap_base) { var = storage->read(contract, dst); } return write(var, &dst, src); } var_t* Engine::write(const uint64_t dst, const varptr_t& var) { return write(dst, var.get()); } var_t* Engine::write(std::unique_ptr& var, const uint64_t* dst, const var_t& src) { if(var.get() == &src) { return var.get(); } if(src.flags & FLAG_DELETED) { throw std::logic_error("write(): src has FLAG_DELETED"); } if(var) { if(var->flags & FLAG_CONST) { if(dst) { throw std::logic_error("read-only memory at " + to_hex(*dst)); } else { throw std::logic_error("read-only memory"); } } if(var->flags & FLAG_DELETED) { var->flags |= FLAG_DIRTY; var->flags &= ~FLAG_DELETED; } switch(src.type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: switch(var->type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: if(var->type != src.type) { var->flags |= FLAG_DIRTY; var->type = src.type; } return var.get(); default: break; } break; case TYPE_REF: if(var->type == TYPE_REF) { auto ref = (ref_t*)var.get(); const auto new_address = ((const ref_t&)src).address; if(new_address != ref->address) { unref(ref->address); var->flags |= FLAG_DIRTY; ref->address = new_address; addref(ref->address); } return ref; } break; case TYPE_UINT: if(var->type == TYPE_UINT) { auto uint = (uint_t*)var.get(); const auto new_value = ((const uint_t&)src).value; if(new_value != uint->value) { var->flags |= FLAG_DIRTY; uint->value = new_value; } return uint; } break; default: break; } } switch(src.type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: assign(var, std::make_unique(src.type)); break; case TYPE_REF: assign(var, std::make_unique(((const ref_t&)src).address)); break; case TYPE_UINT: assign(var, std::make_unique(((const uint_t&)src).value)); break; case TYPE_STRING: case TYPE_BINARY: assign(var, binary_t::alloc((const binary_t&)src)); break; case TYPE_ARRAY: { if(!dst) { throw std::logic_error("cannot assign array here"); } const auto& asrc = (const array_t&)src; { auto tmp = std::make_unique(asrc.size); tmp->address = *dst; assign(var, std::move(tmp)); } for(uint64_t i = 0; i < asrc.size; ++i) { write_entry(*dst, i, read_entry_fail(asrc.address, i)); check_gas(); } break; } case TYPE_MAP: { if(!dst) { throw std::logic_error("cannot assign map here"); } if(src.flags & FLAG_STORED) { throw std::logic_error("cannot clone map from storage"); } const auto& msrc = (const map_t&)src; { auto tmp = std::make_unique(); tmp->address = *dst; assign(var, std::move(tmp)); } const auto begin = entries.lower_bound(std::make_pair(msrc.address, 0)); for(auto iter = begin; iter != entries.end() && iter->first.first == msrc.address; ++iter) { if(auto value = iter->second.get()) { if((value->flags & FLAG_DELETED) == 0) { write_entry(*dst, iter->first.second, *value); check_gas(); } } } break; } default: throw invalid_type(src); } return var.get(); } void Engine::push_back(const uint64_t dst, const var_t& var) { auto& array = read_fail(dst, TYPE_ARRAY); if(array.size >= std::numeric_limits::max()) { throw std::runtime_error("push_back() overflow at " + to_hex(dst)); } write_entry(dst, array.size++, var); array.flags |= FLAG_DIRTY; } void Engine::push_back(const uint64_t dst, const varptr_t& var) { if(var) { push_back(dst, *var); } else { push_back(dst, var_t()); } } void Engine::push_back(const uint64_t dst, const uint64_t src) { if(dst == src) { throw std::logic_error("push_back(): dst == src"); } push_back(dst, read_fail(src)); } void Engine::pop_back(const uint64_t dst, const uint64_t& src) { if(dst == src) { throw std::logic_error("pop_back(): dst == src"); } auto& array = read_fail(src, TYPE_ARRAY); if(array.size == 0) { throw std::logic_error("pop_back() underflow at " + to_hex(dst)); } const auto index = array.size - 1; write(dst, read_entry_fail(src, index)); erase_entry(src, index); array.size--; array.flags |= FLAG_DIRTY; } var_t* Engine::write_entry(const uint64_t dst, const uint64_t key, const var_t& src) { if(have_init && dst < MEM_EXTERN) { throw std::logic_error("already initialized"); } auto& container = read_fail(dst); if(container.flags & FLAG_CONST) { throw std::logic_error("read-only memory at " + to_hex(dst)); } return write(entries[std::make_pair(dst, key)], nullptr, src); } var_t* Engine::write_entry(const uint64_t dst, const uint64_t key, const varptr_t& var) { if(var) { return write_entry(dst, key, *var); } return write_entry(dst, key, var_t()); } var_t* Engine::write_key(const uint64_t dst, const uint64_t key, const var_t& var) { return write_entry(dst, lookup(key, false), var); } var_t* Engine::write_key(const uint64_t dst, const var_t& key, const var_t& var) { return write_entry(dst, lookup(key, false), var); } var_t* Engine::write_key(const uint64_t dst, const varptr_t& key, const varptr_t& var) { return write_entry(dst, lookup(key, false), var); } void Engine::erase_entry(const uint64_t dst, const uint64_t key) { const auto mapkey = std::make_pair(dst, key); auto iter = entries.find(mapkey); if(iter == entries.end() && dst >= MEM_STATIC && (read_fail(dst).flags & FLAG_STORED)) { if(auto var = storage->read(contract, dst, key)) { iter = entries.emplace(mapkey, std::move(var)).first; } } if(iter != entries.end()) { erase(iter->second); } } void Engine::erase_key(const uint64_t dst, const uint64_t key) { if(auto addr = lookup(key, true)) { erase_entry(dst, addr); } } void Engine::erase_entries(const uint64_t dst) { const auto begin = entries.lower_bound(std::make_pair(dst, 0)); for(auto iter = begin; iter != entries.end() && iter->first.first == dst; ++iter) { erase(iter->second); check_gas(); } } void Engine::erase(const uint64_t dst) { const auto iter = memory.find(dst); if(iter != memory.end()) { erase(iter->second); } else if(dst >= MEM_STATIC) { if(auto var = storage->read(contract, dst)) { erase(memory[dst] = std::move(var)); } } } void Engine::erase(std::unique_ptr& var) { if(!var) { return; } if(var->flags & FLAG_CONST) { throw std::logic_error("erase() on read-only memory"); } if(var->flags & FLAG_DELETED) { return; } if(var->ref_count) { throw std::logic_error("erase() with ref_count " + std::to_string(var->ref_count)); } if(++erase_call_depth > MAX_ERASE_RECURSION) { throw std::runtime_error("erase() recursion overflow"); } // account cost here because of recursion in clear() -> unref() -> erase() -> clear() gas_used += WRITE_COST; check_gas(); clear(var.get()); const auto prev = std::move(var); var = std::make_unique(); if(prev->flags & FLAG_STORED) { var->flags = (prev->flags | FLAG_DIRTY | FLAG_DELETED); } else { var->flags = FLAG_DELETED; } erase_call_depth--; } void Engine::clear(var_t* var) { switch(var->type) { case TYPE_REF: unref(((const ref_t*)var)->address); break; case TYPE_ARRAY: { if(var->flags & FLAG_STORED) { throw std::logic_error("cannot erase array in storage"); } erase_entries(((const array_t*)var)->address); break; } case TYPE_MAP: { if(var->flags & FLAG_STORED) { throw std::logic_error("cannot erase map in storage"); } erase_entries(((const map_t*)var)->address); break; } default: break; } } var_t* Engine::read(const uint64_t src, const bool mem_only) { auto iter = memory.find(src); if(iter != memory.end()) { auto var = iter->second.get(); if(var) { if(var->flags & FLAG_DELETED) { return nullptr; } } return var; } if(mem_only) { return nullptr; } if(src >= MEM_STATIC) { if(auto var = storage->read(contract, src)) { return (memory[src] = std::move(var)).get(); } } return nullptr; } var_t& Engine::read_fail(const uint64_t src) { if(auto var = read(src)) { return *var; } throw std::runtime_error("read fail at " + to_hex(src)); } var_t* Engine::read_entry(const uint64_t src, const uint64_t key) { const auto mapkey = std::make_pair(src, key); const auto iter = entries.find(mapkey); if(iter != entries.end()) { auto var = iter->second.get(); if(var) { if(var->flags & FLAG_DELETED) { return nullptr; } } return var; } if(src >= MEM_STATIC) { if(auto var = storage->read(contract, src, key)) { return (entries[mapkey] = std::move(var)).get(); } } return nullptr; } var_t& Engine::read_entry_fail(const uint64_t src, const uint64_t key) { if(auto var = read_entry(src, key)) { return *var; } throw std::logic_error("read fail at " + to_hex(src) + "[" + std::to_string(key) + "]"); } var_t* Engine::read_key(const uint64_t src, const uint64_t key) { if(auto addr = lookup(key, true)) { return read_entry(src, addr); } return nullptr; } var_t* Engine::read_key(const uint64_t src, const var_t& key) { if(auto addr = lookup(key, true)) { return read_entry(src, addr); } return nullptr; } var_t* Engine::read_key(const uint64_t src, const varptr_t& key) { if(auto addr = lookup(key, true)) { return read_entry(src, addr); } return nullptr; } var_t& Engine::read_key_fail(const uint64_t src, const uint64_t key) { if(auto addr = lookup(key, true)) { return read_entry_fail(src, addr); } throw std::logic_error("no such key at " + to_hex(src)); } uint64_t Engine::alloc() { auto offset = read(MEM_HEAP_NEXT_ALLOC, TYPE_UINT); if(!offset) { new_heap_base = MEM_HEAP; offset = (uint_t*)assign(MEM_HEAP_NEXT_ALLOC, std::make_unique(MEM_HEAP + GLOBAL_DYNAMIC_START)); offset->pin(); } if(offset->value >= uint64_t(-1)) { throw std::runtime_error("out of memory"); } offset->flags |= FLAG_DIRTY; if(first_alloc) { first_alloc = false; new_heap_base = offset->value; } return offset->value++; } void Engine::init() { if(have_init) { throw std::logic_error("init(): already initialized"); } // Note: address 0 is not a valid key (used to denote "key not found") for(auto iter = memory.lower_bound(1); iter != memory.lower_bound(MEM_EXTERN); ++iter) { const auto* key = iter->second.get(); if(num_bytes(key) <= MAX_KEY_BYTES) { key_map.emplace(key, iter->first); } } have_init = true; } void Engine::begin(const uint64_t instr_ptr) { if(!have_init) { throw std::logic_error("begin(): not initialized"); } if(!call_stack.empty()) { throw std::logic_error("begin(): call stack not empty"); } for(auto iter = memory.begin(); iter != memory.lower_bound(MEM_STACK); ++iter) { if(auto var = iter->second.get()) { var->flags |= FLAG_CONST; var->flags &= ~FLAG_DIRTY; } } frame_t frame; frame.instr_ptr = instr_ptr; call_stack.push_back(frame); } void Engine::run() { while(!call_stack.empty()) { step(); } } void Engine::step() { const auto instr_ptr = get_frame().instr_ptr; if(instr_ptr >= code.size()) { throw std::logic_error("instr_ptr out of bounds: " + to_hex(instr_ptr) + " > " + to_hex(code.size())); } try { exec(code[instr_ptr]); check_gas(); } catch(...) { if(is_debug) { dump_memory(); } error_addr = instr_ptr; throw; } } void Engine::check_gas() { if(gas_used > gas_limit) { error_code = error_code_e::TXFEE_OVERRUN; throw std::runtime_error("out of gas: " + std::to_string(gas_used) + " > " + std::to_string(gas_limit)); } } void Engine::copy(const uint64_t dst, const uint64_t src) { if(dst != src) { write(dst, read_fail(src)); } } void Engine::clone(const uint64_t dst, const uint64_t src) { const auto addr = alloc(); write(addr, read_fail(src)); write(dst, ref_t(addr)); } void Engine::get(const uint64_t dst, const uint64_t addr, const uint64_t key, const uint8_t flags) { const auto& var = read_fail(addr); switch(var.type) { case TYPE_ARRAY: { const auto& index = read_fail(key, TYPE_UINT); if(index.value < ((const array_t&)var).size) { write(dst, read_entry_fail(addr, uint64_t(index.value))); } else if(flags & OPFLAG_HARD_FAIL) { throw std::runtime_error("array index out of bounds"); } else { write(dst, var_t()); } break; } case TYPE_MAP: write(dst, read_key(addr, key)); break; default: if(flags & OPFLAG_HARD_FAIL) { throw invalid_type(var); } else { write(dst, var_t()); } } } void Engine::set(const uint64_t addr, const uint64_t key, const uint64_t src, const uint8_t flags) { const auto& var = read_fail(addr); switch(var.type) { case TYPE_ARRAY: { const auto& index = read_fail(key, TYPE_UINT); if(index.value >= ((const array_t&)var).size) { throw std::runtime_error("array index out of bounds"); } write_entry(addr, uint64_t(index.value), read_fail(src)); break; } case TYPE_MAP: write_key(addr, key, read_fail(src)); break; default: throw invalid_type(var); } } void Engine::erase(const uint64_t addr, const uint64_t key, const uint8_t flags) { const auto& var = read_fail(addr); switch(var.type) { case TYPE_MAP: erase_key(addr, key); break; default: throw invalid_type(var); } } void Engine::concat(const uint64_t dst, const uint64_t lhs, const uint64_t rhs) { const auto& lvar = read_fail(lhs); const auto& rvar = read_fail(rhs); if(lvar.type != rvar.type) { throw std::logic_error("type mismatch"); } switch(lvar.type) { case TYPE_STRING: case TYPE_BINARY: { const auto& L = (const binary_t&)lvar; const auto& R = (const binary_t&)rvar; const auto size = uint64_t(L.size) + R.size; auto res = binary_t::unsafe_alloc(size, lvar.type); ::memcpy(res->data(), L.data(), L.size); ::memcpy(res->data(L.size), R.data(), R.size); res->size = size; assign(dst, std::move(res)); break; } case TYPE_ARRAY: { if(dst == lhs || dst == rhs) { throw std::logic_error("dst == lhs || dst == rhs"); } const auto addr = alloc(); const auto& L = (const array_t&)lvar; const auto& R = (const array_t&)rvar; assign(addr, std::make_unique()); for(uint64_t i = 0; i < L.size; ++i) { push_back(addr, read_entry_fail(L.address, i)); check_gas(); } for(uint64_t i = 0; i < R.size; ++i) { push_back(addr, read_entry_fail(R.address, i)); check_gas(); } write(dst, ref_t(addr)); break; } default: throw invalid_type(lvar); } } void Engine::memcpy(const uint64_t dst, const uint64_t src, const uint64_t count, const uint64_t offset) { const auto& svar = read_fail(src); switch(svar.type) { case TYPE_STRING: case TYPE_BINARY: { const auto& sbin = (const binary_t&)svar; if(sbin.size < offset + count) { throw std::logic_error("out of bounds read"); } auto res = binary_t::unsafe_alloc(count, svar.type); ::memcpy(res->data(), sbin.data(offset), count); res->size = count; assign(dst, std::move(res)); break; } default: throw invalid_type(svar); } } void Engine::sha256(const uint64_t dst, const uint64_t src) { const auto& svar = read_fail(src); switch(svar.type) { case TYPE_STRING: case TYPE_BINARY: { const auto& sbin = (const binary_t&)svar; gas_used += ((sbin.size + 63) / 64) * SHA256_BLOCK_COST; check_gas(); const hash_t hash(sbin.data(), sbin.size); write(dst, binary_t::alloc(hash.data(), hash.size())); break; } default: throw invalid_type(svar); } } void Engine::verify(const uint64_t dst, const uint64_t msg, const uint64_t pubkey, const uint64_t signature) { gas_used += ECDSA_VERIFY_COST; check_gas(); write(dst, var_t( signature_t(read_fail(signature, TYPE_BINARY).to_vector()).verify( pubkey_t(read_fail(pubkey, TYPE_BINARY).to_vector()), hash_t::from_bytes(read_fail(msg, TYPE_BINARY).to_vector())))); } void Engine::conv(const uint64_t dst, const uint64_t src, const uint64_t dflags, const uint64_t sflags) { const uint8_t dflags_0 = dflags; const uint8_t dflags_1 = (dflags >> 8); const uint8_t sflags_0 = sflags; // const uint8_t sflags_1 = (sflags >> 8); const auto& svar = read_fail(src); if(dflags_0 == CONVTYPE_BOOL) { write(dst, var_t(is_true(svar))); return; } switch(svar.type) { case TYPE_NIL: switch(dflags_0) { case CONVTYPE_UINT: write(dst, uint_t()); break; case CONVTYPE_ADDRESS: write(dst, vm::to_binary(addr_t())); break; default: throw std::logic_error("invalid conversion: NIL to " + to_hex(dflags)); } break; case TYPE_TRUE: switch(dflags_0) { case CONVTYPE_UINT: write(dst, uint_t(1)); break; default: throw std::logic_error("invalid conversion: TRUE to " + to_hex(dflags)); } break; case TYPE_FALSE: switch(dflags_0) { case CONVTYPE_UINT: write(dst, uint_t()); break; default: throw std::logic_error("invalid conversion: FALSE to " + to_hex(dflags)); } break; case TYPE_UINT: { const auto& value = ((const uint_t&)svar).value; switch(dflags_0) { case CONVTYPE_UINT: write(dst, svar); break; case CONVTYPE_STRING: { int base = 10; switch(dflags_1) { case CONVTYPE_DEFAULT: break; case CONVTYPE_BASE_2: base = 2; break; case CONVTYPE_BASE_8: base = 8; break; case CONVTYPE_BASE_10: base = 10; break; case CONVTYPE_BASE_16: base = 16; break; default: throw std::logic_error("invalid conversion: UINT to STRING with dst flags " + to_hex(dflags)); } if(value >> 128) { switch(base) { case 2: case 8: case 16: break; default: throw std::logic_error("invalid conversion: 256-bit UINT to STRING with base " + std::to_string(base)); } gas_used += CONV_UINT_256_STRING_COST; } else if(value >> 64) { gas_used += CONV_UINT_128_STRING_COST; } else if(value >> 32) { gas_used += CONV_UINT_64_STRING_COST; } else { gas_used += CONV_UINT_32_STRING_COST; } check_gas(); assign(dst, binary_t::alloc(value.str(base))); break; } case CONVTYPE_BINARY: { bool big_endian = true; switch(dflags_1) { case CONVTYPE_DEFAULT: case CONVTYPE_BIG_ENDIAN: break; case CONVTYPE_LITTLE_ENDIAN: big_endian = false; break; default: throw std::logic_error("invalid conversion: UINT to BINARY with dst flags " + to_hex(dflags)); } bytes_t<32> tmp; tmp.from_uint(value, big_endian); assign(dst, binary_t::alloc(tmp.data(), tmp.size())); break; } default: throw std::logic_error("invalid conversion: UINT to " + to_hex(dflags)); } break; } case TYPE_STRING: { const auto& sstr = (const binary_t&)svar; switch(dflags_0) { case CONVTYPE_UINT: { auto value = sstr.to_string(); const auto prefix_2 = value.substr(0, 2); int base = 10; switch(sflags_0) { case CONVTYPE_DEFAULT: if(prefix_2 == "0x") { base = 16; } else if(prefix_2 == "0b") { base = 2; } break; case CONVTYPE_BASE_2: base = 2; break; case CONVTYPE_BASE_8: base = 8; break; case CONVTYPE_BASE_10: base = 10; break; case CONVTYPE_BASE_16: base = 16; break; default: throw std::logic_error("invalid conversion: STRING to UINT with src flags " + to_hex(sflags)); } if(prefix_2 == "0x" || prefix_2 == "0b") { value = value.substr(2); } for(const auto c : value) { int digit = -1; if('0' <= c && c <= '9') { digit = c - '0'; } else if('a' <= c && c <= 'z') { digit = c - 'a' + 10; } else if('A' <= c && c <= 'Z') { digit = c - 'A' + 10; } if(digit < 0 || digit >= base) { throw std::logic_error("invalid string of base " + std::to_string(base) + ": " + value); } } gas_used += value.size() * CONV_STRING_UINT_CHAR_COST; check_gas(); write(dst, uint_t(uint256_t(value.c_str(), base))); break; } case CONVTYPE_STRING: write(dst, svar); break; case CONVTYPE_BINARY: { int base = 0; switch(sflags_0) { case CONVTYPE_DEFAULT: break; case CONVTYPE_BASE_16: base = 16; break; default: throw std::logic_error("invalid conversion: STRING to BINARY with src flags " + to_hex(sflags)); } switch(base) { case 0: assign(dst, binary_t::alloc(sstr, TYPE_BINARY)); break; case 16: { const auto value = sstr.to_string(); if(value.size() % 2) { throw std::runtime_error("invalid conversion: STRING to BINARY with source length " + std::to_string(value.size()) + " % 2 != 0"); } const auto prefix = (value.substr(0, 2) == "0x" ? 2 : 0); for(size_t i = prefix; i < value.size(); ++i) { const auto c = value[i]; if(!('0' <= c && c <= '9') && !('a' <= c && c <= 'f') && !('A' <= c && c <= 'F')) { throw std::runtime_error("invalid hex string: " + value); } } const auto tmp = vnx::from_hex_string(value); assign(dst, binary_t::alloc(tmp.data(), tmp.size(), TYPE_BINARY)); break; } default: throw std::logic_error("invalid conversion: STRING to BINARY with base " + std::to_string(base)); } break; } case CONVTYPE_ADDRESS: { const auto value = sstr.to_string(); gas_used += CONV_STRING_BECH32_COST; check_gas(); const addr_t tmp(value); assign(dst, binary_t::alloc(tmp.data(), tmp.size())); break; } default: throw std::logic_error("invalid conversion: STRING to " + to_hex(dflags)); } break; } case TYPE_BINARY: { const auto& sbin = (const binary_t&)svar; switch(dflags_0) { case CONVTYPE_UINT: { if(sbin.size != 32) { throw std::runtime_error("invalid conversion: BINARY to UINT: size != 32"); } bool big_endian = true; switch(sflags_0) { case CONVTYPE_DEFAULT: case CONVTYPE_BIG_ENDIAN: break; case CONVTYPE_LITTLE_ENDIAN: big_endian = false; break; default: throw std::logic_error("invalid conversion: BINARY to UINT with src flags " + to_hex(sflags)); } bytes_t<32> tmp; ::memcpy(tmp.data(), sbin.data(), sbin.size); write(dst, uint_t(tmp.to_uint(big_endian))); break; } case CONVTYPE_STRING: { int base = 0; switch(dflags_1) { case CONVTYPE_DEFAULT: break; case CONVTYPE_BASE_16: base = 16; break; case CONVTYPE_ADDRESS: base = 32; break; default: throw std::logic_error("invalid conversion: BINARY to STRING with dst flags " + to_hex(dflags)); } switch(base) { case 32: gas_used += CONV_BECH32_STRING_COST; check_gas(); assign(dst, binary_t::alloc(sbin.to_addr().to_string())); break; case 16: assign(dst, binary_t::alloc(sbin.to_hex_string())); break; case 0: assign(dst, binary_t::alloc(sbin.data(), sbin.size, TYPE_STRING)); break; default: throw std::logic_error("invalid conversion: BINARY to STRING with base " + std::to_string(base)); } break; } case CONVTYPE_BINARY: write(dst, svar); break; case CONVTYPE_ADDRESS: if(sbin.size != 32) { throw std::runtime_error("invalid conversion: BINARY to ADDRESS with source length " + std::to_string(sbin.size) + " != 32"); } write(dst, svar); break; default: throw std::logic_error("invalid conversion: BINARY to " + to_hex(dflags)); } break; } default: throw std::logic_error("invalid conversion: " + to_hex(uint32_t(svar.type)) + " to " + to_hex(dflags)); } } void Engine::log(const uint64_t level, const uint64_t msg) { if(log_func) { log_func(level, read_fail(msg, TYPE_STRING).to_string()); } } void Engine::event(const uint64_t name, const uint64_t data) { if(event_func) { event_func(read_fail(name, TYPE_STRING).to_string(), data); } } vnx::optional Engine::parse_memo(const uint64_t addr) { const auto& value = read_fail(addr); switch(value.type) { case TYPE_NIL: return nullptr; case TYPE_STRING: { const auto memo = ((const binary_t&)value).to_string(); if(memo.size() > txio_t::MAX_MEMO_SIZE) { throw std::runtime_error("memo too large: " + memo); } if(memo.size()) { return memo; } return nullptr; } default: throw std::runtime_error("invalid memo type: " + to_string(value.type)); } return nullptr; } void Engine::send(const uint64_t address, const uint64_t amount, const uint64_t currency, const uint64_t memo) { const auto value = read_fail(amount, TYPE_UINT).value; if(value == 0) { return; } if(value >> 128) { throw std::runtime_error("send(): amount too large: 0x" + value.str(16)); } if(currency == 0) { throw std::runtime_error("send(): currency == null"); } auto& balance = get_balance(currency); if(balance < value) { throw std::runtime_error("send(): insufficient funds"); } balance -= value; txout_t out; out.contract = read_fail(currency, TYPE_BINARY).to_addr(); out.address = read_fail(address, TYPE_BINARY).to_addr(); out.amount = value; out.memo = parse_memo(memo); outputs.push_back(out); } void Engine::mint(const uint64_t address, const uint64_t amount, const uint64_t memo) { const auto value = read_fail(amount, TYPE_UINT).value; if(value == 0) { return; } if(value >> 80) { throw std::runtime_error("mint(): amount too large: 0x" + value.str(16)); } txout_t out; out.contract = contract; out.address = read_fail(address, TYPE_BINARY).to_addr(); out.amount = value; out.memo = parse_memo(memo); mint_outputs.push_back(out); } void Engine::rcall(const uint64_t name, const uint64_t method, const uint64_t stack_ptr, const uint64_t nargs) { if(stack_ptr >= STACK_SIZE) { throw std::logic_error("stack overflow"); } if(call_stack.size() >= MAX_CALL_RECURSION) { throw std::logic_error("recursion overflow"); } if(nargs > 4096) { throw std::logic_error("nargs > 4096"); } if(!remote_call) { throw std::logic_error("unable to make remote calls"); } gas_used += INSTR_CALL_COST; auto frame = get_frame(); frame.stack_ptr += stack_ptr; call_stack.push_back(frame); remote_call(read_fail(name, TYPE_STRING).to_string(), read_fail(method, TYPE_STRING).to_string(), nargs); ret(); } void Engine::cread(const uint64_t dst, const uint64_t address, const uint64_t field) { if(!read_contract) { throw std::logic_error("unable to read contract fields"); } read_contract( read_fail(address, TYPE_BINARY).to_addr(), read_fail(field, TYPE_STRING).to_string(), dst); } uint128_t& Engine::get_balance(const uint64_t currency_addr) { const auto currency = read_fail(currency_addr, TYPE_BINARY).to_addr(); { auto iter = balance_map.find(currency); if(iter != balance_map.end()) { return iter->second; } } gas_used += WRITE_COST; const auto value = storage->get_balance(contract, currency); return balance_map[currency] = (value ? *value : uint128_0); } void Engine::read_balance(const uint64_t dst, const uint64_t currency) { write(dst, uint_t(get_balance(currency))); } bool Engine::is_true(const uint64_t src) { return is_true(read_fail(src)); } bool Engine::is_true(const var_t& var) { switch(var.type) { case TYPE_NIL: case TYPE_FALSE: return false; case TYPE_UINT: return ((const uint_t&)var).value; case TYPE_STRING: case TYPE_BINARY: return ((const binary_t&)var).size; default: return true; } } void Engine::jump(const uint64_t instr_ptr) { get_frame().instr_ptr = instr_ptr; } void Engine::call(const uint64_t instr_ptr, const uint64_t stack_ptr) { if(stack_ptr >= STACK_SIZE) { throw std::logic_error("stack overflow"); } if(call_stack.size() >= MAX_CALL_RECURSION) { throw std::logic_error("recursion overflow"); } gas_used += INSTR_CALL_COST; auto frame = get_frame(); frame.instr_ptr = instr_ptr; frame.stack_ptr += stack_ptr; call_stack.push_back(frame); } bool Engine::ret() { clear_stack(get_frame().stack_ptr + 1); call_stack.pop_back(); return call_stack.empty(); } Engine::frame_t& Engine::get_frame() { if(call_stack.empty()) { throw std::logic_error("empty call stack"); } return call_stack.back(); } uint64_t Engine::get_stack_ptr() { return MEM_STACK + get_frame().stack_ptr; } uint64_t Engine::deref(const uint64_t src) { const auto& var = read_fail(src); if(var.type != TYPE_REF) { return src; } return ((const ref_t&)var).address; } uint64_t Engine::deref_addr(uint32_t src, const bool flag) { if(src >= MEM_STACK && src < MEM_STATIC) { const auto& frame = get_frame(); if(uint64_t(src) + frame.stack_ptr >= MEM_STATIC) { throw std::runtime_error("stack overflow"); } src += frame.stack_ptr; } return flag ? deref(src) : src; } uint64_t Engine::deref_value(uint32_t src, const bool flag) { if(flag) { return read_fail(deref_addr(src, false), TYPE_UINT).value; } return src; } void Engine::exec(const instr_t& instr) { gas_used += INSTR_COST; switch(instr.code) { case OP_NOP: break; case OP_CLR: if(instr.flags & OPFLAG_REF_A) { throw std::logic_error("OPFLAG_REF_A not supported"); } erase(instr.a); break; case OP_COPY: copy( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_CLONE: clone( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_JUMP: { jump( deref_value(instr.a, instr.flags & OPFLAG_REF_A)); return; } case OP_JUMPI: if(is_true(deref_addr(instr.b, instr.flags & OPFLAG_REF_B))) { jump(deref_value(instr.a, instr.flags & OPFLAG_REF_A)); return; } break; case OP_JUMPN: if(!is_true(deref_addr(instr.b, instr.flags & OPFLAG_REF_B))) { jump(deref_value(instr.a, instr.flags & OPFLAG_REF_A)); return; } break; case OP_CALL: if(instr.flags & OPFLAG_REF_B) { throw std::logic_error("OPFLAG_REF_B not supported"); } call( deref_value(instr.a, instr.flags & OPFLAG_REF_A), deref_value(instr.b, instr.flags & OPFLAG_REF_B)); return; case OP_RET: if(ret()) { return; } break; case OP_ADD: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; const uint256_t D = L + R; if((instr.flags & OPFLAG_CATCH_OVERFLOW) && D < L) { throw std::runtime_error("integer overflow"); } write(dst, uint_t(D)); break; } case OP_SUB: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; const uint256_t D = L - R; if((instr.flags & OPFLAG_CATCH_OVERFLOW) && D > L) { throw std::runtime_error("integer overflow"); } write(dst, uint_t(D)); break; } case OP_MUL: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; if((L >> 64) || (R >> 64)) { gas_used += INSTR_MUL_256_COST; } else { gas_used += INSTR_MUL_128_COST; } const uint256_t D = L * R; if((instr.flags & OPFLAG_CATCH_OVERFLOW) && (D < L && D < R)) { throw std::runtime_error("integer overflow"); } write(dst, uint_t(D)); break; } case OP_DIV: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; if(R == uint256_0) { throw std::runtime_error("division by zero"); } if(L.upper()) { gas_used += INSTR_DIV_256_COST; } else if(L.lower().upper()) { gas_used += INSTR_DIV_128_COST; } else { gas_used += INSTR_DIV_64_COST; } write(dst, uint_t(L / R)); break; } case OP_MOD: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; if(R == uint256_0) { throw std::runtime_error("division by zero"); } if(L.upper()) { gas_used += INSTR_DIV_256_COST; } else if(L.lower().upper()) { gas_used += INSTR_DIV_128_COST; } else { gas_used += INSTR_DIV_64_COST; } write(dst, uint_t(L % R)); break; } case OP_NOT: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto src = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto& var = read_fail(src); if(instr.flags & OPFLAG_BITWISE) { switch(var.type) { case TYPE_UINT: write(dst, uint_t(~((const uint_t&)var).value)); break; case TYPE_BINARY: { auto out = binary_t::alloc((const binary_t&)var); for(uint32_t i = 0; i < out->size; ++i) { (*out)[i] = ~(*out)[i]; } assign(dst, std::move(out)); break; } default: throw invalid_type(var); } } else { write(dst, var_t(!is_true(var))); } break; } case OP_XOR: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs); const auto& R = read_fail(rhs); if(instr.flags & OPFLAG_BITWISE) { if(L.type != R.type) { throw std::runtime_error("type mismatch (bitwise XOR)"); } switch(L.type) { case TYPE_UINT: write(dst, uint_t(((const uint_t&)L).value ^ ((const uint_t&)R).value)); break; case TYPE_BINARY: { const auto& lbin = (const binary_t&)L; const auto& rbin = (const binary_t&)R; if(lbin.size != rbin.size) { throw std::runtime_error("binary length mismatch (bitwise XOR)"); } auto out = binary_t::alloc(lbin.size, TYPE_BINARY); for(uint32_t i = 0; i < out->size; ++i) { (*out)[i] = lbin[i] ^ rbin[i]; } assign(dst, std::move(out)); break; } default: throw invalid_type(L); } } else { write(dst, var_t(is_true(L) ^ is_true(R))); } break; } case OP_AND: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs); const auto& R = read_fail(rhs); if(instr.flags & OPFLAG_BITWISE) { if(L.type != R.type) { throw std::runtime_error("type mismatch (bitwise AND)"); } switch(L.type) { case TYPE_UINT: write(dst, uint_t(((const uint_t&)L).value & ((const uint_t&)R).value)); break; case TYPE_BINARY: { const auto& lbin = (const binary_t&)L; const auto& rbin = (const binary_t&)R; if(lbin.size != rbin.size) { throw std::runtime_error("binary length mismatch (bitwise AND)"); } auto out = binary_t::alloc(lbin.size, TYPE_BINARY); for(uint32_t i = 0; i < out->size; ++i) { (*out)[i] = lbin[i] & rbin[i]; } assign(dst, std::move(out)); break; } default: throw invalid_type(L); } } else { write(dst, var_t(is_true(L) && is_true(R))); } break; } case OP_OR: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs); const auto& R = read_fail(rhs); if(instr.flags & OPFLAG_BITWISE) { if(L.type != R.type) { throw std::runtime_error("type mismatch (bitwise OR)"); } switch(L.type) { case TYPE_UINT: write(dst, uint_t(((const uint_t&)L).value | ((const uint_t&)R).value)); break; case TYPE_BINARY: { const auto& lbin = (const binary_t&)L; const auto& rbin = (const binary_t&)R; if(lbin.size != rbin.size) { throw std::runtime_error("binary length mismatch (bitwise OR)"); } auto out = binary_t::alloc(lbin.size, TYPE_BINARY); for(uint32_t i = 0; i < out->size; ++i) { (*out)[i] = lbin[i] | rbin[i]; } assign(dst, std::move(out)); break; } default: throw invalid_type(L); } } else { write(dst, var_t(is_true(L) || is_true(R))); } break; } case OP_MIN: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; write(dst, uint_t(L < R ? L : R)); break; } case OP_MAX: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs, TYPE_UINT).value; const auto& R = read_fail(rhs, TYPE_UINT).value; write(dst, uint_t(L > R ? L : R)); break; } case OP_SHL: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto src = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto count = deref_value(instr.c, instr.flags & OPFLAG_REF_C); const auto& value = read_fail(src, TYPE_UINT).value; write(dst, uint_t(value << count)); break; } case OP_SHR: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto src = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto count = deref_value(instr.c, instr.flags & OPFLAG_REF_C); const auto& value = read_fail(src, TYPE_UINT).value; write(dst, uint_t(value >> count)); break; } case OP_CMP_EQ: case OP_CMP_NEQ: case OP_CMP_LT: case OP_CMP_GT: case OP_CMP_LTE: case OP_CMP_GTE: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto lhs = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto rhs = deref_addr(instr.c, instr.flags & OPFLAG_REF_C); const auto& L = read_fail(lhs); const auto& R = read_fail(rhs); switch(instr.code) { case OP_CMP_EQ: case OP_CMP_NEQ: break; default: if(L.type != R.type) { throw std::logic_error("compare type mismatch: " + std::to_string(int(L.type)) + " != " + std::to_string(int(R.type))); } } const auto cmp = compare(L, R); bool res = false; switch(instr.code) { case OP_CMP_EQ: res = (cmp == 0); break; case OP_CMP_NEQ: res = (cmp != 0); break; case OP_CMP_LT: res = (cmp < 0); break; case OP_CMP_GT: res = (cmp > 0); break; case OP_CMP_LTE: res = (cmp <= 0); break; case OP_CMP_GTE: res = (cmp >= 0); break; default: break; } write(dst, var_t(res)); break; } case OP_TYPE: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto addr = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto& var = read_fail(addr); write(dst, uint_t(uint32_t(var.type))); break; } case OP_SIZE: { const auto dst = deref_addr(instr.a, instr.flags & OPFLAG_REF_A); const auto addr = deref_addr(instr.b, instr.flags & OPFLAG_REF_B); const auto& var = read_fail(addr); switch(var.type) { case TYPE_STRING: case TYPE_BINARY: write(dst, uint_t(((const binary_t&)var).size)); break; case TYPE_ARRAY: write(dst, uint_t(((const array_t&)var).size)); break; default: throw invalid_type(var); } break; } case OP_GET: get( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C), instr.flags); break; case OP_SET: set( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C), instr.flags); break; case OP_ERASE: erase( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), instr.flags); break; case OP_PUSH_BACK: push_back( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_POP_BACK: pop_back( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_CONV: conv( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_value(instr.c, instr.flags & OPFLAG_REF_C), deref_value(instr.d, instr.flags & OPFLAG_REF_D)); break; case OP_CONCAT: concat( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C)); break; case OP_MEMCPY: memcpy( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_value(instr.c, instr.flags & OPFLAG_REF_C), deref_value(instr.d, instr.flags & OPFLAG_REF_D)); break; case OP_SHA256: sha256( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_VERIFY: verify( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C), deref_addr(instr.d, instr.flags & OPFLAG_REF_D)); break; case OP_LOG: log( deref_value(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_SEND: send( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C), deref_addr(instr.d, instr.flags & OPFLAG_REF_D)); break; case OP_MINT: mint( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C)); break; case OP_EVENT: event( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; case OP_FAIL: error_code = deref_value(instr.b, instr.flags & OPFLAG_REF_B); throw std::runtime_error( to_string_value(read(deref_addr(instr.a, instr.flags & OPFLAG_REF_A)))); case OP_RCALL: rcall( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_value(instr.c, instr.flags & OPFLAG_REF_C), deref_value(instr.d, instr.flags & OPFLAG_REF_D)); break; case OP_CREAD: cread( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B), deref_addr(instr.c, instr.flags & OPFLAG_REF_C)); break; case OP_BALANCE: read_balance( deref_addr(instr.a, instr.flags & OPFLAG_REF_A), deref_addr(instr.b, instr.flags & OPFLAG_REF_B)); break; default: throw std::logic_error("invalid op_code: " + to_hex(uint32_t(instr.code))); } get_frame().instr_ptr++; } void Engine::clear_stack(const uint64_t offset) { for(auto iter = memory.lower_bound(MEM_STACK + offset); iter != memory.lower_bound(MEM_STATIC);) { clear(iter->second.get()); iter = memory.erase(iter); check_gas(); } } void Engine::commit() { clear_stack(); // clear references from stack for(auto iter = memory.lower_bound(MEM_STATIC); iter != memory.end(); ++iter) { if(auto var = iter->second.get()) { if(var->flags & FLAG_DIRTY) { storage->write(contract, iter->first, *var); var->flags &= ~FLAG_DIRTY; } } } for(auto iter = entries.lower_bound(std::make_pair(MEM_STATIC, 0)); iter != entries.end(); ++iter) { if(auto var = iter->second.get()) { if(var->flags & FLAG_DIRTY) { storage->write(contract, iter->first.first, iter->first.second, *var); var->flags &= ~FLAG_DIRTY; } } } check_gas(); } std::map Engine::find_entries(const uint64_t dst) const { std::map out; const auto begin = entries.lower_bound(std::make_pair(dst, 0)); for(auto iter = begin; iter != entries.end() && iter->first.first == dst; ++iter) { if(auto var = iter->second.get()) { if((var->flags & FLAG_DELETED) == 0) { out[iter->first.second] = var; } } } return out; } void Engine::dump_memory(const uint64_t begin, const uint64_t end) { std::cout << "-------------------------------------------" << std::endl; for(auto iter = memory.lower_bound(begin); iter != memory.lower_bound(end); ++iter) { std::cout << "[" << to_hex(iter->first) << "] " << to_string(iter->second.get()); if(auto var = iter->second.get()) { std::cout << "\t\t(vf: " << to_bin(var->flags) << ") (rc: " << var->ref_count << ")"; } std::cout << std::endl; } for(auto iter = entries.lower_bound(std::make_pair(begin, 0)); iter != entries.lower_bound(std::make_pair(end, 0)); ++iter) { std::cout << "[" << to_hex(iter->first.first) << "]" << "[" << to_hex(iter->first.second) << "] " << to_string(iter->second.get()); if(auto var = iter->second.get()) { std::cout << "\t\t(vf: " << to_bin(var->flags) << ")"; } std::cout << std::endl; } } } // vm } // mmx ================================================ FILE: src/vm/StorageCache.cpp ================================================ /* * StorageCache.cpp * * Created on: May 6, 2022 * Author: mad */ #include namespace mmx { namespace vm { StorageCache::StorageCache(std::shared_ptr backend) : backend(backend) { } StorageCache::~StorageCache() { } std::unique_ptr StorageCache::read(const addr_t& contract, const uint64_t src) const { if(auto var = Super::read(contract, src)) { return var; } return backend->read(contract, src); } std::unique_ptr StorageCache::read(const addr_t& contract, const uint64_t src, const uint64_t key) const { if(auto var = Super::read(contract, src, key)) { return var; } return backend->read(contract, src, key); } uint64_t StorageCache::lookup(const addr_t& contract, const var_t& value) const { if(auto key = Super::lookup(contract, value)) { return key; } return backend->lookup(contract, value); } void StorageCache::commit() const { for(const auto& entry : memory) { if(auto var = entry.second.get()) { backend->write(entry.first.first, entry.first.second, *var); } } for(const auto& entry : entries) { if(auto var = entry.second.get()) { backend->write(std::get<0>(entry.first), std::get<1>(entry.first), std::get<2>(entry.first), *var); } } for(const auto& entry : balance_map) { for(const auto& entry2 : entry.second) { backend->set_balance(entry.first, entry2.first, entry2.second); } } } std::unique_ptr StorageCache::get_balance(const addr_t& contract, const addr_t& currency) { if(auto value = Super::get_balance(contract, currency)) { return value; } auto amount = backend->get_balance(contract, currency); if(amount) { Super::set_balance(contract, currency, *amount); } return amount; } } // vm } // mmx ================================================ FILE: src/vm/StorageDB.cpp ================================================ /* * StorageRocksDB.cpp * * Created on: May 5, 2022 * Author: mad */ #include #include #include namespace mmx { namespace vm { constexpr int HASH_KEY_SIZE = 20; std::shared_ptr get_key(const addr_t& contract, uint64_t dst) { auto out = std::make_shared(HASH_KEY_SIZE + 8); ::memcpy(out->data, contract.data(), HASH_KEY_SIZE); dst = vnx::to_big_endian(dst); ::memcpy(out->data + HASH_KEY_SIZE, &dst, 8); return out; } std::tuple read_key(std::shared_ptr key) { if(key->size < HASH_KEY_SIZE + 8) { throw std::runtime_error("key size underflow"); } std::tuple out; ::memcpy(std::get<0>(out).data(), key->data, HASH_KEY_SIZE); ::memcpy(&std::get<1>(out), key->data + HASH_KEY_SIZE, 8); std::get<1>(out) = vnx::from_big_endian(std::get<1>(out)); return out; } std::shared_ptr write_entry_key(const addr_t& contract, uint64_t dst, uint64_t key) { auto out = std::make_shared(HASH_KEY_SIZE + 16); ::memcpy(out->data, contract.data(), HASH_KEY_SIZE); dst = vnx::to_big_endian(dst); ::memcpy(out->data + HASH_KEY_SIZE, &dst, 8); key = vnx::to_big_endian(key); ::memcpy(out->data + HASH_KEY_SIZE + 8, &key, 8); return out; } std::tuple read_entry_key(std::shared_ptr key) { if(key->size < HASH_KEY_SIZE + 16) { throw std::runtime_error("entry key size underflow"); } std::tuple out; ::memcpy(std::get<0>(out).data(), key->data, HASH_KEY_SIZE); ::memcpy(&std::get<1>(out), key->data + HASH_KEY_SIZE, 8); ::memcpy(&std::get<2>(out), key->data + HASH_KEY_SIZE + 8, 8); std::get<1>(out) = vnx::from_big_endian(std::get<1>(out)); std::get<2>(out) = vnx::from_big_endian(std::get<2>(out)); return out; } std::shared_ptr write_index_key(const addr_t& contract, const var_t& value) { auto data = serialize(value, false, false); auto out = std::make_shared(contract.size() + data.second); ::memcpy(out->data, contract.data(), contract.size()); ::memcpy(out->data + contract.size(), data.first.get(), data.second); return out; } StorageDB::StorageDB(const std::string& database_path, std::shared_ptr db) { table = std::make_shared
(database_path + "storage"); table_entries = std::make_shared
(database_path + "storage_entries"); table_index = std::make_shared
(database_path + "storage_index"); db->add(table); db->add(table_entries); db->add(table_index); } StorageDB::~StorageDB() { } std::unique_ptr StorageDB::read(const addr_t& contract, const uint64_t src) const { return read_ex(contract, src, -1); } std::unique_ptr StorageDB::read(const addr_t& contract, const uint64_t src, const uint64_t key) const { return read_ex(contract, src, key, -1); } std::unique_ptr StorageDB::read_ex(const addr_t& contract, const uint64_t src, const uint32_t height) const { const auto key = get_key(contract, src); if(auto value = table->find(key, height)) { std::unique_ptr var; deserialize(var, value->data, value->size, false); return var; } return nullptr; } std::unique_ptr StorageDB::read_ex(const addr_t& contract, const uint64_t src, const uint64_t key, const uint32_t height) const { const auto entry_key = write_entry_key(contract, src, key); if(auto value = table_entries->find(entry_key, height)) { std::unique_ptr var; deserialize(var, value->data, value->size, false); return var; } return nullptr; } void StorageDB::write(const addr_t& contract, const uint64_t dst, const var_t& value) { const auto key = get_key(contract, dst); auto data = serialize(value, false); if(value.flags & FLAG_KEY) { const auto key = write_index_key(contract, value); table_index->insert(key, std::make_shared(&dst, sizeof(dst))); } table->insert(key, std::make_shared(data.first.release(), data.second, false)); } void StorageDB::write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) { const auto entry_key = write_entry_key(contract, dst, key); auto data = serialize(value, false); table_entries->insert(entry_key, std::make_shared(data.first.release(), data.second, false)); } uint64_t StorageDB::lookup(const addr_t& contract, const var_t& value) const { const auto key = write_index_key(contract, value); uint64_t out = 0; if(auto value = table_index->find(key)) { if(value->size < sizeof(out)) { throw std::runtime_error("value underflow"); } ::memcpy(&out, value->data, sizeof(out)); } return out; } std::vector> StorageDB::find_range( const addr_t& contract, const uint64_t begin, const uint64_t end, const uint32_t height) const { std::vector> out; std::vector, uint64_t>> keys; Table::Iterator iter(table); iter.seek(get_key(contract, begin)); while(iter.is_valid()) { const auto key = read_key(iter.key()); const auto address = std::get<1>(key); if(::memcmp(std::get<0>(key).data(), contract.data(), HASH_KEY_SIZE) || address >= end) { break; } keys.emplace_back(iter.key(), address); iter.next(); } for(const auto& entry : keys) { if(auto value = table->find(entry.first, height)) { std::unique_ptr var; deserialize(var, value->data, value->size, false); out.emplace_back(entry.second, std::move(var)); } } return out; } std::vector> StorageDB::find_entries( const addr_t& contract, const uint64_t address, const uint32_t height) const { std::vector> out; std::vector, uint64_t>> keys; Table::Iterator iter(table_entries); iter.seek(write_entry_key(contract, address, 0)); while(iter.is_valid()) { const auto key = read_entry_key(iter.key()); if(::memcmp(std::get<0>(key).data(), contract.data(), HASH_KEY_SIZE) || std::get<1>(key) != address) { break; } keys.emplace_back(iter.key(), std::get<2>(key)); iter.next(); } for(const auto& entry : keys) { if(auto value = table_entries->find(entry.first, height)) { std::unique_ptr var; deserialize(var, value->data, value->size, false); out.emplace_back(entry.second, std::move(var)); } } return out; } std::vector StorageDB::read_array( const addr_t& contract, const uint64_t address, const uint32_t height) const { std::vector out; for(const auto& entry : find_entries(contract, address, height)) { out.push_back(entry.second); } return out; } void StorageDB::set_balance(const addr_t& contract, const addr_t& currency, const uint128& amount) { if(write_balance) { write_balance(contract, currency, amount); } } std::unique_ptr StorageDB::get_balance(const addr_t& contract, const addr_t& currency) { if(read_balance) { return read_balance(contract, currency); } return nullptr; } } // vm } // mmx ================================================ FILE: src/vm/StorageProxy.cpp ================================================ /* * StorageProxy.cpp * * Created on: Apr 24, 2022 * Author: mad */ #include #include namespace mmx { namespace vm { StorageProxy::StorageProxy(Engine* engine, std::shared_ptr backend, bool read_only) : engine(engine), backend(backend), read_only(read_only) { } std::unique_ptr StorageProxy::read_ex(std::unique_ptr var) const { if(var) { if(var->flags & FLAG_DELETED) { var.reset(); } } if(var) { var->flags &= ~FLAG_DIRTY; var->flags |= FLAG_STORED; if(read_only) { var->flags |= FLAG_CONST; } } return std::move(var); } std::unique_ptr StorageProxy::read(const addr_t& contract, const uint64_t src) const { auto var = read_ex(backend->read(contract, src)); const auto size = num_bytes(var.get()); const auto blocks = size / 32; if(engine->do_profile) { engine->cost_map["STOR_READ_COST"]++; engine->cost_map["STOR_READ_32_BYTE_COST"] += blocks; } engine->gas_used += STOR_READ_COST + blocks * STOR_READ_32_BYTE_COST; engine->check_gas(); if(engine->do_trace) { trace_t t; t.type = "READ"; t.contract = contract; t.addr = src; t.value = clone(var.get()); trace.push_back(t); } return var; } std::unique_ptr StorageProxy::read(const addr_t& contract, const uint64_t src, const uint64_t key) const { auto var = read_ex(backend->read(contract, src, key)); const auto size = num_bytes(var.get()); const auto blocks = size / 32; if(engine->do_profile) { engine->cost_map["STOR_READ_COST"]++; engine->cost_map["STOR_READ_32_BYTE_COST"] += blocks; } engine->gas_used += STOR_READ_COST + blocks * STOR_READ_32_BYTE_COST; engine->check_gas(); if(engine->do_trace) { trace_t t; t.type = "READ_KEY"; t.contract = contract; t.addr = src; t.key = key; t.value = clone(var.get()); trace.push_back(t); } return var; } void StorageProxy::write(const addr_t& contract, const uint64_t dst, const var_t& value) { if(read_only) { throw std::logic_error("read-only storage"); } if(engine->do_trace) { trace_t t; t.type = "WRITE"; t.contract = contract; t.addr = dst; t.value = clone(value); trace.push_back(t); } if(value.type == TYPE_REF) { const auto address = ((const ref_t&)value).address; if(address < MEM_STATIC) { throw std::logic_error("cannot store reference to non-static memory"); } } if((value.flags & FLAG_KEY) && !(value.flags & FLAG_CONST)) { throw std::logic_error("keys need to be const"); } const int cost_factor = (value.flags & FLAG_KEY ? 2 : 1); if(engine->do_profile) { engine->cost_map["STOR_WRITE_COST"] += cost_factor; engine->cost_map["STOR_WRITE_BYTE_COST"] += num_bytes(value) * cost_factor; } engine->gas_used += (STOR_WRITE_COST + num_bytes(value) * STOR_WRITE_BYTE_COST) * cost_factor; engine->check_gas(); backend->write(contract, dst, value); } void StorageProxy::write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) { if(read_only) { throw std::logic_error("read-only storage"); } if(engine->do_trace) { trace_t t; t.type = "WRITE_KEY"; t.contract = contract; t.addr = dst; t.key = key; t.value = clone(value); trace.push_back(t); } if(value.type == TYPE_REF) { const auto address = ((const ref_t&)value).address; if(address < MEM_STATIC) { throw std::logic_error("cannot store reference to non-static memory"); } } if(value.ref_count) { throw std::logic_error("entries cannot have ref_count > 0"); } if(engine->do_profile) { engine->cost_map["STOR_WRITE_COST"]++; engine->cost_map["STOR_WRITE_BYTE_COST"] += num_bytes(value); } engine->gas_used += STOR_WRITE_COST + num_bytes(value) * STOR_WRITE_BYTE_COST; engine->check_gas(); backend->write(contract, dst, key, value); } uint64_t StorageProxy::lookup(const addr_t& contract, const var_t& value) const { if(engine->do_trace) { trace_t t; t.type = "LOOKUP"; t.contract = contract; t.value = clone(value); trace.push_back(t); } const auto size = num_bytes(value); const auto blocks = size / 32; if(engine->do_profile) { engine->cost_map["STOR_READ_COST"]++; engine->cost_map["STOR_READ_32_BYTE_COST"] += blocks; } engine->gas_used += STOR_READ_COST + blocks * STOR_READ_32_BYTE_COST; engine->check_gas(); return backend->lookup(contract, value); } std::unique_ptr StorageProxy::get_balance(const addr_t& contract, const addr_t& currency) { if(engine->do_trace) { trace_t t; t.type = "GET_BALANCE"; t.contract = contract; t.value = to_binary(currency); trace.push_back(t); } if(engine->do_profile) { engine->cost_map["STOR_READ_COST"]++; } engine->gas_used += STOR_READ_COST; engine->check_gas(); return backend->get_balance(contract, currency); } } // vm } // mmx ================================================ FILE: src/vm/StorageRAM.cpp ================================================ /* * StorageRAM.cpp * * Created on: Apr 30, 2022 * Author: mad */ #include namespace mmx { namespace vm { StorageRAM::~StorageRAM() { clear(); } std::unique_ptr StorageRAM::read(const addr_t& contract, const uint64_t src) const { std::lock_guard lock(mutex); auto iter = memory.find(std::make_pair(contract, src)); if(iter != memory.end()) { return clone(iter->second.get()); } return nullptr; } std::unique_ptr StorageRAM::read(const addr_t& contract, const uint64_t src, const uint64_t key) const { std::lock_guard lock(mutex); auto iter = entries.find(std::make_tuple(contract, src, key)); if(iter != entries.end()) { return clone(iter->second.get()); } return nullptr; } void StorageRAM::write(const addr_t& contract, const uint64_t dst, const var_t& value) { const auto key = std::make_pair(contract, dst); std::lock_guard lock(mutex); auto& var = memory[key]; if(var) { if(var->flags & FLAG_KEY) { throw std::logic_error("cannot overwrite key"); } } var = clone(value); if(value.flags & FLAG_KEY) { key_map[contract][var.get()] = dst; } } void StorageRAM::write(const addr_t& contract, const uint64_t dst, const uint64_t key, const var_t& value) { const auto mapkey = std::make_tuple(contract, dst, key); std::lock_guard lock(mutex); entries[mapkey] = clone(value); } uint64_t StorageRAM::lookup(const addr_t& contract, const var_t& value) const { std::lock_guard lock(mutex); auto iter = key_map.find(contract); if(iter != key_map.end()) { const auto& map = iter->second; auto iter2 = map.find(&value); if(iter2 != map.end()) { return iter2->second; } } return 0; } void StorageRAM::clear() { std::lock_guard lock(mutex); key_map.clear(); memory.clear(); entries.clear(); balance_map.clear(); } void StorageRAM::set_balance(const addr_t& contract, const addr_t& currency, const uint128& amount) { std::lock_guard lock(mutex); balance_map[contract][currency] = amount; } std::unique_ptr StorageRAM::get_balance(const addr_t& contract, const addr_t& currency) { std::lock_guard lock(mutex); auto iter = balance_map.find(contract); if(iter != balance_map.end()) { const auto& map = iter->second; auto iter2 = map.find(currency); if(iter2 != map.end()) { return std::make_unique(iter2->second); } } return nullptr; } void StorageRAM::dump_memory(std::ostream& out) const { auto dump_entries = [this, &out](const addr_t& address) { for(auto iter = entries.lower_bound(std::make_tuple(address, 0, 0)); iter != entries.upper_bound(std::make_tuple(address, -1, -1)); ++iter) { out << "[" << to_hex(std::get<1>(iter->first)) << "]" << "[" << to_hex(std::get<2>(iter->first)) << "] " << to_string(iter->second.get()); if(auto var = iter->second.get()) { out << "\t\t(vf: " << to_bin(var->flags) << ")"; } out << std::endl; } }; const addr_t* curr_addr = nullptr; for(auto iter = memory.begin(); iter != memory.end(); ++iter) { if(!curr_addr || iter->first.first != *curr_addr) { if(curr_addr) { dump_entries(*curr_addr); } curr_addr = &iter->first.first; out << "[" << curr_addr->to_string() << "]" << std::endl; } out << "[" << to_hex(iter->first.second) << "] " << to_string(iter->second.get()); if(auto var = iter->second.get()) { out << "\t\t(vf: " << to_bin(var->flags) << ") (rc: " << var->ref_count << ")"; } out << std::endl; } if(curr_addr) { dump_entries(*curr_addr); } } } // vm } // mmx ================================================ FILE: src/vm/instr_t.cpp ================================================ /* * instr_t.cpp * * Created on: Apr 23, 2022 * Author: mad */ #include #include #include #include #include #include #include #define OPCODE_INFO(op, num) g_opcode_info[op] = {#op, num} namespace mmx { namespace vm { opcode_info_t g_opcode_info[256] = {}; const struct global_init_t { global_init_t() { OPCODE_INFO(OP_NOP, 0); OPCODE_INFO(OP_CLR, 1); OPCODE_INFO(OP_COPY, 2); OPCODE_INFO(OP_CLONE, 2); OPCODE_INFO(OP_JUMP, 1); OPCODE_INFO(OP_JUMPI, 2); OPCODE_INFO(OP_JUMPN, 2); OPCODE_INFO(OP_CALL, 2); OPCODE_INFO(OP_RET, 0); OPCODE_INFO(OP_ADD, 3); OPCODE_INFO(OP_SUB, 3); OPCODE_INFO(OP_MUL, 3); OPCODE_INFO(OP_DIV, 3); OPCODE_INFO(OP_MOD, 3); OPCODE_INFO(OP_NOT, 2); OPCODE_INFO(OP_XOR, 3); OPCODE_INFO(OP_AND, 3); OPCODE_INFO(OP_OR, 3); OPCODE_INFO(OP_MIN, 3); OPCODE_INFO(OP_MAX, 3); OPCODE_INFO(OP_SHL, 3); OPCODE_INFO(OP_SHR, 3); OPCODE_INFO(OP_CMP_EQ, 3); OPCODE_INFO(OP_CMP_NEQ, 3); OPCODE_INFO(OP_CMP_LT, 3); OPCODE_INFO(OP_CMP_GT, 3); OPCODE_INFO(OP_CMP_LTE, 3); OPCODE_INFO(OP_CMP_GTE, 3); OPCODE_INFO(OP_TYPE, 2); OPCODE_INFO(OP_SIZE, 2); OPCODE_INFO(OP_GET, 3); OPCODE_INFO(OP_SET, 3); OPCODE_INFO(OP_ERASE, 2); OPCODE_INFO(OP_PUSH_BACK, 2); OPCODE_INFO(OP_POP_BACK, 2); OPCODE_INFO(OP_CONV, 4); OPCODE_INFO(OP_CONCAT, 3); OPCODE_INFO(OP_MEMCPY, 4); OPCODE_INFO(OP_SHA256, 2); OPCODE_INFO(OP_VERIFY, 4); OPCODE_INFO(OP_LOG, 2); OPCODE_INFO(OP_SEND, 4); OPCODE_INFO(OP_MINT, 3); OPCODE_INFO(OP_EVENT, 2); OPCODE_INFO(OP_FAIL, 2); OPCODE_INFO(OP_RCALL, 4); OPCODE_INFO(OP_CREAD, 3); OPCODE_INFO(OP_BALANCE, 2); } } global_init; const opcode_info_t& get_opcode_info(opcode_e code) { return g_opcode_info[code]; } static void encode_symbol( vnx::OutputBuffer& out, const uint32_t symbol, const std::unordered_map>& sym_map) { auto iter = sym_map.find(symbol); if(iter != sym_map.end()) { out.write(&iter->second.first, iter->second.second); } else if(symbol < 0x7FFF) { // raw 15-bit value const uint32_t tmp = (((uint32_t(1) << 15) | symbol) << 8) | 0xFF; out.write(&tmp, 3); } else { // raw 32-bit value const uint64_t tmp = (uint64_t(symbol) << 24) | 0xFFFFFF; out.write(&tmp, 7); } } inline uint32_t encode_instr(const instr_t& instr) { return (uint32_t(instr.flags) << 8) | uint32_t(instr.code); } std::vector serialize(const std::vector& code) { std::unordered_map sym_count; for(const auto& instr : code) { const auto& info = get_opcode_info(instr.code); if(info.nargs >= 1) { sym_count[instr.a]++; } if(info.nargs >= 2) { sym_count[instr.b]++; } if(info.nargs >= 3) { sym_count[instr.c]++; } if(info.nargs >= 4) { sym_count[instr.d]++; } sym_count[encode_instr(instr)]++; } std::vector> sym_list; for(const auto& entry : sym_count) { if(entry.second > 1) { sym_list.push_back(entry); } } std::sort(sym_list.begin(), sym_list.end(), [](const std::pair& L, const std::pair& R) -> bool { return L.second == R.second ? L.first < R.first : L.second > R.second; }); sym_list.resize(std::min(sym_list.size(), 0x7FFF + 0xFF)); std::unordered_map> sym_map; for(uint32_t i = 0; i < sym_list.size(); ++i) { const auto& key = sym_list[i].first; if(i < 0xFF) { // 1-byte entry with 8-bit symbol sym_map[key] = std::make_pair(i, 1); } else { // 3-byte entry with 15-bit symbol sym_map[key] = std::make_pair(((i - 0xFF) << 8) | 0xFF, 3); } } std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::TypeOutput out(&stream); vnx::write(out, uint8_t(1)); // version vnx::write(out, uint32_t(sym_list.size())); // number of symbols for(const auto& entry : sym_list) { vnx::write(out, entry.first); // symbols } vnx::write(out, uint32_t(code.size())); // number of instructions for(const auto& instr : code) { encode_symbol(out, encode_instr(instr), sym_map); const auto& info = get_opcode_info(instr.code); if(info.nargs >= 1) { encode_symbol(out, instr.a, sym_map); } if(info.nargs >= 2) { encode_symbol(out, instr.b, sym_map); } if(info.nargs >= 3) { encode_symbol(out, instr.c, sym_map); } if(info.nargs >= 4) { encode_symbol(out, instr.d, sym_map); } } out.flush(); return buffer; } static uint32_t decode_symbol(vnx::InputBuffer& in, const std::vector& sym_list) { uint8_t first = 0; in.read(&first, 1); if(first < 0xFF) { if(first < sym_list.size()) { return sym_list[first]; } else { throw std::logic_error("decode_symbol(): invalid 8-bit symbol: " + std::to_string(first)); } } uint16_t second = 0; in.read(&second, 2); if(second < 0x7FFF) { second += 0xFF; if(second < sym_list.size()) { return sym_list[second]; } else { throw std::logic_error("decode_symbol(): invalid 15-bit symbol: " + std::to_string(second)); } } if(second < 0xFFFF) { // raw 15-bit value return second & 0x7FFF; } uint32_t value = 0; in.read(&value, 4); return value; } inline instr_t decode_instr(vnx::InputBuffer& in, const std::vector& sym_list) { const auto tmp = decode_symbol(in, sym_list); instr_t out; out.code = opcode_e(tmp & 0xFF); out.flags = (tmp >> 8) & 0xFF; return out; } size_t deserialize(std::vector& code, const void* data, const size_t length) { vnx::PointerInputStream stream(data, length); vnx::TypeInput in(&stream); uint8_t version = 0; vnx::read(in, version); if(version != 1) { throw std::logic_error("deserialize(): invalid version: " + std::to_string(version)); } uint32_t sym_count = 0; vnx::read(in, sym_count); if(sym_count > 0x7FFF + 0xFF) { throw std::logic_error("deserialize(): invalid symbol count: " + std::to_string(sym_count)); } std::vector sym_list(sym_count); for(uint32_t i = 0; i < sym_count; ++i) { vnx::read(in, sym_list[i]); } uint32_t instr_count = 0; vnx::read(in, instr_count); for(uint32_t i = 0; i < instr_count; ++i) { auto instr = decode_instr(in, sym_list); const auto& info = get_opcode_info(instr.code); if(info.nargs >= 1) { instr.a = decode_symbol(in, sym_list); } if(info.nargs >= 2) { instr.b = decode_symbol(in, sym_list); } if(info.nargs >= 3) { instr.c = decode_symbol(in, sym_list); } if(info.nargs >= 4) { instr.d = decode_symbol(in, sym_list); } code.push_back(instr); } return in.get_input_pos(); } std::string to_string(const instr_t& instr) { const auto info = get_opcode_info(instr.code); std::stringstream ss; ss << info.name; if(instr.flags & OPFLAG_BITWISE) { ss << "(B)"; } ss << std::uppercase << std::hex << "\t"; for(uint32_t i = 0; i < info.nargs; ++i) { ss << " "; bool ref = false; switch(i) { case 0: ref = instr.flags & OPFLAG_REF_A; break; case 1: ref = instr.flags & OPFLAG_REF_B; break; case 2: ref = instr.flags & OPFLAG_REF_C; break; case 3: ref = instr.flags & OPFLAG_REF_D; break; } if(ref) { ss << "["; } switch(i) { case 0: ss << "0x" << instr.a; break; case 1: ss << "0x" << instr.b; break; case 2: ss << "0x" << instr.c; break; case 3: ss << "0x" << instr.d; break; } if(ref) { ss << "]"; } } return ss.str(); } } // vm } // mmx ================================================ FILE: src/vm/std/compare.js ================================================ // Returns "EQ" if arguments are equal, "LT" if L < R and "GT" if L > R // Note: Arrays are (recursively) deep compared, otherwise the same as language operators function compare(L, R) const { if(!is_array(L) || !is_array(R)) { if(L < R) { return "LT"; } if(L > R) { return "GT"; } return "EQ"; } const N = size(L); const M = size(R); if(N != M) { if(N < M) { return "LT"; } return "GT"; } for(var i = 0; i < N; ++i) { const res = compare(L[i], R[i]); if(res != "EQ") { return res; } } return "EQ"; } ================================================ FILE: src/vm/std/compile.sh ================================================ #!/bin/bash # Output C++ file output_file="embedded.h" # Start writing the C++ file cat < "$output_file" #include #include namespace mmx { namespace vm { std::map std_file_map = { EOL # Iterate over all *.js files in the current directory for js_file in *.js; do if [[ -f "$js_file" ]]; then # Read the file content and escape double quotes and newlines content=$(sed ':a;N;$!ba;s/"/\\"/g;s/\n/\\n/g' "$js_file") # Append the file content to the C++ map echo " {\"$js_file\", \"$content\"}," >> "$output_file" fi done # Close the map and namespace cat <> "$output_file" }; } // namespace vm } // namespace mmx EOL ================================================ FILE: src/vm/std/embedded.h ================================================ #include #include namespace mmx { namespace vm { std::map std_file_map = { {"compare.js", "// Returns \"EQ\" if arguments are equal, \"LT\" if L < R and \"GT\" if L > R\n// Note: Arrays are (recursively) deep compared, otherwise the same as language operators\nfunction compare(L, R) const {\n if(!is_array(L) || !is_array(R)) {\n if(L < R) {\n return \"LT\";\n }\n if(L > R) {\n return \"GT\";\n }\n return \"EQ\";\n }\n const N = size(L);\n const M = size(R);\n if(N != M) {\n if(N < M) {\n return \"LT\";\n }\n return \"GT\";\n }\n for(var i = 0; i < N; ++i) {\n const res = compare(L[i], R[i]);\n if(res != \"EQ\") {\n return res;\n }\n }\n return \"EQ\";\n}"}, {"equals.js", "// Same as == operator, but does a deep (recursive) comparison for arrays\n// @returns true if the two values are equal, false otherwise\n// Note: Objects cannot be compared, as such comparison is based on the reference (address)\nfunction equals(L, R) const {\n if(L == R) {\n return true;\n }\n if(!is_array(L) || !is_array(R)) {\n return L == R;\n }\n const N = size(L);\n if(size(R) != N) {\n return false;\n }\n for(var i = 0; i < N; ++i) {\n if(!equals(L[i], R[i])) {\n return false;\n }\n }\n return true;\n}"}, {"reverse.js", "// Returns a new array with the elements of the input array in reverse order\nfunction reverse(arr) const {\n const N = size(arr);\n const out = [];\n for(var i = 0; i < N; i++) {\n push(out, arr[N - i - 1]);\n }\n return out;\n}"}, {"sort.js", "// Returns a sorted array in ascending order (using bubble sort)\n// Note: use reverse(sort(...)) to get a descending order\nfunction sort(arr) const {\n const N = size(arr);\n if(N <= 1) {\n return arr;\n }\n const N_1 = N - 1;\n for(var i = 0; i < N_1; i++) {\n const M = N_1 - i;\n for(var j = 0; j < M; j++) {\n const k = j + 1;\n const L = arr[j];\n const R = arr[k];\n if(L > R) {\n arr[j] = R;\n arr[k] = L;\n }\n }\n }\n return arr;\n}"}, }; } // namespace vm } // namespace mmx ================================================ FILE: src/vm/std/equals.js ================================================ // Same as == operator, but does a deep (recursive) comparison for arrays // @returns true if the two values are equal, false otherwise // Note: Objects cannot be compared, as such comparison is based on the reference (address) function equals(L, R) const { if(L == R) { return true; } if(!is_array(L) || !is_array(R)) { return L == R; } const N = size(L); if(size(R) != N) { return false; } for(var i = 0; i < N; ++i) { if(!equals(L[i], R[i])) { return false; } } return true; } ================================================ FILE: src/vm/std/reverse.js ================================================ // Returns a new array with the elements of the input array in reverse order function reverse(arr) const { const N = size(arr); const out = []; for(var i = 0; i < N; i++) { push(out, arr[N - i - 1]); } return out; } ================================================ FILE: src/vm/std/sort.js ================================================ // Returns a sorted array in ascending order (using bubble sort) // Note: use reverse(sort(...)) to get a descending order function sort(arr) const { const N = size(arr); if(N <= 1) { return arr; } const N_1 = N - 1; for(var i = 0; i < N_1; i++) { const M = N_1 - i; for(var j = 0; j < M; j++) { const k = j + 1; const L = arr[j]; const R = arr[k]; if(L > R) { arr[j] = R; arr[k] = L; } } } return arr; } ================================================ FILE: src/vm/var_t.cpp ================================================ /* * var_t.cpp * * Created on: Apr 22, 2022 * Author: mad */ #include #include namespace mmx { namespace vm { std::unique_ptr clone(const var_t& src) { switch(src.type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: return std::make_unique(src); case TYPE_REF: return std::make_unique((const ref_t&)src); case TYPE_UINT: return std::make_unique((const uint_t&)src); case TYPE_STRING: case TYPE_BINARY: return binary_t::clone((const binary_t&)src); case TYPE_ARRAY: return std::make_unique((const array_t&)src); case TYPE_MAP: return std::make_unique((const map_t&)src); default: return nullptr; } } std::unique_ptr clone(const var_t* var) { if(var) { return clone(*var); } return nullptr; } int compare(const var_t& lhs, const var_t& rhs) { if(lhs.type != rhs.type) { return lhs.type < rhs.type ? -1 : 1; } switch(lhs.type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: return 0; case TYPE_REF: { const auto& L = (const ref_t&)lhs; const auto& R = (const ref_t&)rhs; if(L.address == R.address) { return 0; } return L.address < R.address ? -1 : 1; } case TYPE_UINT: { const auto& L = ((const uint_t&)lhs).value; const auto& R = ((const uint_t&)rhs).value; if(L == R) { return 0; } return L < R ? -1 : 1; } case TYPE_STRING: case TYPE_BINARY: { const auto& L = (const binary_t&)lhs; const auto& R = (const binary_t&)rhs; if(L.size == R.size) { return ::memcmp(L.data(), R.data(), L.size); } return L.size < R.size ? -1 : 1; } case TYPE_ARRAY: { const auto& L = (const array_t&)lhs; const auto& R = (const array_t&)rhs; if(L.address == R.address) { return 0; } return L.address < R.address ? -1 : 1; } case TYPE_MAP: { const auto& L = (const map_t&)lhs; const auto& R = (const map_t&)rhs; if(L.address == R.address) { return 0; } return L.address < R.address ? -1 : 1; } default: return 0; } } int compare(const var_t* lhs, const var_t* rhs) { if(lhs && rhs) { return compare(*lhs, *rhs); } if(!lhs && !rhs) { return 0; } return rhs ? -1 : 1; } std::pair, size_t> serialize(const var_t& src, bool with_rc, bool with_vf) { size_t length = 1; if(with_rc) { length += 4; } if(with_vf) { length += 1; } switch(src.type) { case TYPE_REF: length += 8; break; case TYPE_UINT: length += 32; break; case TYPE_STRING: case TYPE_BINARY: length += 4 + size_t(((const binary_t&)src).size); break; case TYPE_ARRAY: length += 12; break; case TYPE_MAP: length += 8; break; default: break; } auto data = std::make_unique(length); size_t offset = 0; if(with_rc) { ::memcpy(data.get() + offset, &src.ref_count, 4); offset += 4; } if(with_vf) { ::memcpy(data.get() + offset, &src.flags, 1); offset += 1; } ::memcpy(data.get() + offset, &src.type, 1); offset += 1; switch(src.type) { case TYPE_REF: ::memcpy(data.get() + offset, &((const ref_t&)src).address, 8); offset += 8; break; case TYPE_UINT: { const auto& val_256 = ((const uint_t&)src).value; if(val_256.upper()) { data[offset - 1] = TYPE_UINT256; ::memcpy(data.get() + offset, &val_256, 32); offset += 32; } else { const auto& val_128 = val_256.lower(); if(val_128.upper()) { data[offset - 1] = TYPE_UINT128; ::memcpy(data.get() + offset, &val_128, 16); offset += 16; } else { const auto& val_64 = val_128.lower(); if(val_64 >> 32) { data[offset - 1] = TYPE_UINT64; ::memcpy(data.get() + offset, &val_64, 8); offset += 8; } else { const uint32_t val_32 = val_64; if(val_32 >> 16) { data[offset - 1] = TYPE_UINT32; ::memcpy(data.get() + offset, &val_32, 4); offset += 4; } else { const uint16_t val_16 = val_32; data[offset - 1] = TYPE_UINT16; ::memcpy(data.get() + offset, &val_16, 2); offset += 2; } } } } break; } case TYPE_STRING: case TYPE_BINARY: { const auto& bin = (const binary_t&)src; ::memcpy(data.get() + offset, &bin.size, 4); offset += 4; ::memcpy(data.get() + offset, bin.data(), bin.size); offset += bin.size; break; } case TYPE_ARRAY: ::memcpy(data.get() + offset, &((const array_t&)src).address, 8); offset += 8; ::memcpy(data.get() + offset, &((const array_t&)src).size, 4); offset += 4; break; case TYPE_MAP: ::memcpy(data.get() + offset, &((const map_t&)src).address, 8); offset += 8; break; default: break; } return std::make_pair(std::move(data), offset); } size_t deserialize(std::unique_ptr& out, const void* data_, const size_t length, bool with_rc, bool with_vf) { size_t offset = 0; const uint8_t* data = (const uint8_t*)data_; uint8_t flags = 0; uint32_t ref_count = 0; if(with_rc) { if(length < offset + 4) { throw std::runtime_error("unexpected eof"); } ::memcpy(&ref_count, data + offset, 4); offset += 4; } if(with_vf) { if(length < offset + 1) { throw std::runtime_error("unexpected eof"); } flags = data[offset]; offset += 1; } if(length < offset + 1) { throw std::runtime_error("unexpected eof"); } const auto type = vartype_e(data[offset]); offset += 1; switch(type) { case TYPE_NIL: case TYPE_TRUE: case TYPE_FALSE: out = std::make_unique(type); break; case TYPE_REF: { if(length < offset + 8) { throw std::runtime_error("unexpected eof"); } auto var = std::make_unique(); ::memcpy(&var->address, data + offset, 8); offset += 8; out = std::move(var); break; } case TYPE_UINT: case TYPE_UINT16: case TYPE_UINT32: case TYPE_UINT64: case TYPE_UINT128: case TYPE_UINT256: { size_t size = 32; switch(type) { case TYPE_UINT16: size = 2; break; case TYPE_UINT32: size = 4; break; case TYPE_UINT64: size = 8; break; case TYPE_UINT128: size = 16; break; default: break; } if(length < offset + size) { throw std::runtime_error("unexpected eof"); } auto var = std::make_unique(); switch(type) { case TYPE_UINT16: { uint16_t tmp = 0; ::memcpy(&tmp, data + offset, size); var->value = tmp; break; } case TYPE_UINT32: { uint32_t tmp = 0; ::memcpy(&tmp, data + offset, size); var->value = tmp; break; } case TYPE_UINT64: { uint64_t tmp = 0; ::memcpy(&tmp, data + offset, size); var->value = tmp; break; } case TYPE_UINT128: { uint128_t tmp = 0; ::memcpy(&tmp, data + offset, size); var->value = uint256_t(tmp); break; } default: ::memcpy(&var->value, data + offset, size); } offset += size; out = std::move(var); break; } case TYPE_STRING: case TYPE_BINARY: { if(length < offset + 4) { throw std::runtime_error("unexpected eof"); } uint32_t size = 0; ::memcpy(&size, data + offset, 4); offset += 4; if(length < offset + size) { throw std::runtime_error("unexpected eof"); } auto bin = binary_t::unsafe_alloc(size, type); bin->size = size; ::memcpy(bin->data(), data + offset, bin->size); offset += size; ::memset(bin->data(bin->size), 0, bin->capacity - bin->size); out = std::move(bin); break; } case TYPE_ARRAY: { if(length < offset + 12) { throw std::runtime_error("unexpected eof"); } auto var = std::make_unique(); ::memcpy(&var->address, data + offset, 8); offset += 8; ::memcpy(&var->size, data + offset, 4); offset += 4; out = std::move(var); break; } case TYPE_MAP: { if(length < offset + 8) { throw std::runtime_error("unexpected eof"); } auto var = std::make_unique(); ::memcpy(&var->address, data + offset, 8); offset += 8; out = std::move(var); break; } default: throw std::runtime_error("invalid type: " + std::to_string(int(type))); } if(out) { out->flags = flags; out->ref_count = ref_count; } return offset; } std::string to_string(const vartype_e& type) { switch(type) { case TYPE_ARRAY: return "TYPE_ARRAY"; case TYPE_BINARY: return "TYPE_BINARY"; case TYPE_FALSE: return "TYPE_FALSE"; case TYPE_MAP: return "TYPE_MAP"; case TYPE_NIL: return "TYPE_NIL"; case TYPE_REF: return "TYPE_REF"; case TYPE_STRING: return "TYPE_STRING"; case TYPE_TRUE: return "TYPE_TRUE"; case TYPE_UINT: return "TYPE_UINT"; case TYPE_UINT16: return "TYPE_UINT16"; case TYPE_UINT32: return "TYPE_UINT32"; case TYPE_UINT64: return "TYPE_UINT64"; case TYPE_UINT128: return "TYPE_UINT128"; case TYPE_UINT256: return "TYPE_UINT256"; } return std::to_string(uint8_t(type)); } std::string to_string(const var_t& var) { switch(var.type) { case TYPE_NIL: return "null"; case TYPE_TRUE: return "true"; case TYPE_FALSE: return "false"; case TYPE_REF: return "<0x" + vnx::to_hex_string(((const ref_t&)var).address) + ">"; case TYPE_UINT: return ((const uint_t&)var).value.str(10); case TYPE_STRING: return "\"" + ((const binary_t&)var).to_string() + "\""; case TYPE_BINARY: { const auto& bin = (const binary_t&)var; std::string out = "0x" + bin.to_hex_string(); if(bin.size == 32) { out += " | " + bin.to_addr().to_string(); } return out; } case TYPE_ARRAY: { const auto& array = (const array_t&)var; return "[0x" + vnx::to_hex_string(array.address) + "," + std::to_string(array.size) + "]"; } case TYPE_MAP: return "{0x" + vnx::to_hex_string(((const map_t&)var).address) + "}"; default: return "?"; } } std::string to_string_value(const var_t& var) { switch(var.type) { case TYPE_STRING: return ((const binary_t&)var).to_string(); default: return to_string(var); } } std::string to_string_value_hex(const var_t& var) { switch(var.type) { case TYPE_STRING: case TYPE_BINARY: return ((const binary_t&)var).to_hex_string(); default: return to_string(var); } } uint64_t to_ref(const var_t& var) { switch(var.type) { case TYPE_REF: return ((const ref_t&)var).address; case TYPE_ARRAY: return ((const array_t&)var).address; case TYPE_MAP: return ((const map_t&)var).address; default: return 0; } } uint256_t to_uint(const var_t& var) { switch(var.type) { case TYPE_UINT: return ((const uint_t&)var).value; default: return 0; } } hash_t to_hash(const var_t& var) { switch(var.type) { case TYPE_BINARY: return ((const binary_t&)var).to_hash(); default: return hash_t(); } } addr_t to_addr(const var_t& var) { switch(var.type) { case TYPE_BINARY: return ((const binary_t&)var).to_addr(); case TYPE_STRING: return addr_t(((const binary_t&)var).to_string()); default: return addr_t(); } } uint32_t get_size(const var_t& var) { switch(var.type) { case TYPE_STRING: case TYPE_BINARY: { const auto& bin = (const binary_t&)var; return bin.size; } case TYPE_ARRAY: { const auto& array = (const array_t&)var; return array.size; } default: return 0; } } } // vm } // mmx ================================================ FILE: src/vm/varptr_t.cpp ================================================ /* * varptr_t.cpp * * Created on: May 12, 2022 * Author: mad */ #include #include namespace vnx { void read(vnx::TypeInput& in, mmx::vm::varptr_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { switch(code[0]) { case CODE_LIST: case CODE_ALT_LIST: { std::vector data; vnx::read(in, data, type_code, code); std::unique_ptr var; deserialize(var, data.data(), data.size(), false, false); value = std::move(var); break; } case CODE_STRING: case CODE_ALT_STRING: { std::string tmp; vnx::read(in, tmp, type_code, code); value = mmx::vm::to_binary(tmp); break; } case CODE_DYNAMIC: case CODE_ALT_DYNAMIC: { vnx::Variant tmp; vnx::read(in, tmp, type_code, code); std::unique_ptr var; const auto data = tmp.to>(); deserialize(var, data.data(), data.size(), false, false); value = std::move(var); break; } default: vnx::skip(in, type_code, code); } } void write(vnx::TypeOutput& out, const mmx::vm::varptr_t& value, const vnx::TypeCode* type_code, const uint16_t* code) { auto var = value; if(!var) { var = std::make_unique(); } const auto data = mmx::vm::serialize(*var, false, false); write(out, uint32_t(data.second)); out.write(data.first.get(), data.second); } void read(std::istream& in, mmx::vm::varptr_t& value) { vnx::Variant tmp; vnx::read(in, tmp); if(tmp.is_null()) { value = std::make_unique(); } else if(tmp.is_bool()) { value = std::make_unique(tmp.to() ? mmx::vm::TYPE_TRUE : mmx::vm::TYPE_FALSE); } else if(tmp.is_ulong()) { value = std::make_unique(tmp.to()); } else if(tmp.is_long() || tmp.is_double()) { value = std::make_unique(tmp.to()); } else if(tmp.is_string()) { value = mmx::vm::binary_t::alloc(tmp.to()); } else { value = nullptr; } } void write(std::ostream& out, const mmx::vm::varptr_t& value) { vnx::DefaultPrinter visitor(out); vnx::accept(visitor, value); } void accept(vnx::Visitor& visitor, const mmx::vm::varptr_t& value) { const auto var = value.get(); switch(var ? var->type : mmx::vm::TYPE_NIL) { case mmx::vm::TYPE_NIL: visitor.visit_null(); break; case mmx::vm::TYPE_TRUE: visitor.visit(true); break; case mmx::vm::TYPE_FALSE: visitor.visit(false); break; case mmx::vm::TYPE_UINT: { const auto& value = ((const mmx::vm::uint_t*)var)->value; if(value >> 64) { visitor.visit("0x" + value.str(16)); } else { visitor.visit(value.lower().lower()); } break; } case mmx::vm::TYPE_STRING: { visitor.visit(((const mmx::vm::binary_t*)var)->to_string()); break; } case mmx::vm::TYPE_BINARY: { const auto* bin = ((const mmx::vm::binary_t*)var); visitor.visit(bin->data(), bin->size); break; } default: visitor.visit("vartype_e(" + std::to_string(int(var->type)) + ")"); } } } // vnx ================================================ FILE: src/vm_interface.cpp ================================================ /* * vm_interface.cpp * * Created on: May 12, 2022 * Author: mad */ #include #include #include #include #include namespace mmx { namespace vm { const contract::method_t* find_method(std::shared_ptr binary, const std::string& method_name) { auto iter = binary->methods.find(method_name); if(iter != binary->methods.end()) { return &iter->second; } return nullptr; } void set_deposit(std::shared_ptr engine, const addr_t& currency, const uint128& amount) { const auto addr = vm::MEM_EXTERN + vm::EXTERN_DEPOSIT; engine->assign(addr, std::make_unique()); engine->push_back(addr, to_binary(currency)); engine->push_back(addr, vm::uint_t(amount)); } std::vector> read_constants(const uint8_t* constant, const size_t constant_size) { size_t offset = 0; std::vector> out; while(offset < constant_size) { std::unique_ptr var; offset += vm::deserialize(var, constant + offset, constant_size - offset, false, false); out.push_back(std::move(var)); } return out; } std::vector> read_constants(std::shared_ptr binary) { return read_constants(binary->constant.data(), binary->constant.size()); } void load( std::shared_ptr engine, std::shared_ptr binary) { uint64_t dst = 0; for(auto& var : read_constants(binary)) { if(dst < vm::MEM_EXTERN) { engine->assign(dst++, std::move(var)); } } if(dst >= vm::MEM_EXTERN) { throw std::runtime_error("constant memory overflow"); } vm::deserialize(engine->code, binary->binary.data(), binary->binary.size()); engine->init(); engine->check_gas(); } void copy(std::shared_ptr dst, std::shared_ptr src, const uint64_t dst_addr, const uint64_t src_addr, size_t call_depth); void copy( std::shared_ptr dst, std::shared_ptr src, const uint64_t dst_addr, const uint64_t* dst_key, const vm::var_t* var, size_t call_depth) { if(++call_depth > vm::MAX_COPY_RECURSION) { throw std::runtime_error("copy recursion overflow"); } const vm::var_t* out = nullptr; std::unique_ptr tmp; if(var) { switch(var->type) { case vm::TYPE_REF: { const auto heap = dst->alloc(); copy(dst, src, heap, ((const vm::ref_t*)var)->address, call_depth); tmp = std::make_unique(heap); break; } case vm::TYPE_ARRAY: { if(dst_key) { throw std::logic_error("cannot assign array here"); } const auto array = (const vm::array_t*)var; dst->assign(dst_addr, std::make_unique(array->size)); for(uint64_t i = 0; i < array->size; ++i) { copy(dst, src, dst_addr, &i, src->read_entry(array->address, i), call_depth); } break; } case vm::TYPE_MAP: { if(dst_key) { throw std::logic_error("cannot assign map here"); } const auto map = (const vm::map_t*)var; if(map->flags & FLAG_STORED) { throw std::logic_error("cannot copy map from storage at " + to_hex(map->address)); } dst->assign(dst_addr, std::make_unique()); for(const auto& entry : src->find_entries(map->address)) { const auto key = dst->lookup(src->read(entry.first), false); copy(dst, src, dst_addr, &key, entry.second, call_depth); } break; } default: out = var; } } if(!out) { out = tmp.get(); } if(out) { if(dst_key) { dst->write_entry(dst_addr, *dst_key, *out); } else { dst->write(dst_addr, *out); } } dst->check_gas(); } void copy(std::shared_ptr dst, std::shared_ptr src, const uint64_t dst_addr, const uint64_t src_addr, size_t call_depth) { copy(dst, src, dst_addr, nullptr, src->read(src_addr), call_depth); } void copy(std::shared_ptr dst, std::shared_ptr src, const uint64_t dst_addr, const uint64_t src_addr) { copy(dst, src, dst_addr, src_addr, 0); } class AssignTo : public vnx::Visitor { public: // Note: This class is consensus critical. std::shared_ptr engine; AssignTo(std::shared_ptr engine, const uint64_t dst) : engine(engine) { frame_t frame; frame.dst = dst; stack.push_back(frame); } void visit_null() override { handle(std::make_unique()); } void visit(const bool& value) override { handle(std::make_unique(value ? vm::TYPE_TRUE : vm::TYPE_FALSE)); } void visit(const uint8_t& value) override { visit(uint256_t(value)); } void visit(const uint16_t& value) override { visit(uint256_t(value)); } void visit(const uint32_t& value) override { visit(uint256_t(value)); } void visit(const uint64_t& value) override { visit(uint256_t(value)); } void visit(const int8_t& value) override { if(value < 0) { throw std::logic_error("negative values not supported"); } visit(uint64_t(value)); } void visit(const int16_t& value) override { if(value < 0) { throw std::logic_error("negative values not supported"); } visit(uint64_t(value)); } void visit(const int32_t& value) override { if(value < 0) { throw std::logic_error("negative values not supported"); } visit(uint64_t(value)); } void visit(const int64_t& value) override { if(value < 0) { throw std::logic_error("negative values not supported"); } visit(uint64_t(value)); } void visit(const vnx::float32_t& value) override { throw std::logic_error("type float not supported"); } void visit(const vnx::float64_t& value) override { throw std::logic_error("type double not supported"); } void visit(const std::string& value) override { handle(vm::binary_t::alloc(value)); } void visit(const uint8_t* data, const size_t length) override { handle(vm::binary_t::alloc(data, length)); } void visit(const uint256_t& value) { handle(std::make_unique(value)); } void list_begin(size_t size) override { if(stack.size() >= vm::MAX_COPY_RECURSION) { throw std::logic_error("assign recursion overflow"); } const auto addr = engine->alloc(); engine->assign(addr, std::make_unique(size)); stack.emplace_back(addr); } void list_element(size_t index) override { stack.back().key = index; } void list_end(size_t size) override { const auto addr = stack.back().dst; stack.pop_back(); handle(std::make_unique(addr)); } void map_begin(size_t size) override { if(stack.size() >= vm::MAX_COPY_RECURSION) { throw std::logic_error("assign recursion overflow"); } const auto addr = engine->alloc(); engine->assign(addr, std::make_unique()); stack.emplace_back(addr); } void map_key(size_t index) override { stack.back().lookup = true; } void map_value(size_t index) override { stack.back().lookup = false; } void map_end(size_t size) override { const auto addr = stack.back().dst; stack.pop_back(); handle(std::make_unique(addr)); } private: void handle(std::unique_ptr var) { auto& frame = stack.back(); if(frame.lookup) { switch(var->type) { case TYPE_UINT: case TYPE_STRING: case TYPE_BINARY: break; default: throw std::logic_error("invalid key type: " + to_string(var->type)); } frame.key = engine->lookup(*var, false); } else if(frame.key) { engine->write_entry(frame.dst, *frame.key, *var); } else { engine->assign(frame.dst, std::move(var)); } } private: struct frame_t { uint64_t dst = 0; vnx::optional key; bool lookup = false; frame_t() = default; frame_t(const uint64_t& dst) : dst(dst) {} }; std::vector stack; }; void assign(std::shared_ptr engine, const uint64_t dst, const vnx::Variant& value) { AssignTo visitor(engine, dst); vnx::accept(visitor, value); } vnx::Variant convert(std::shared_ptr engine, const vm::var_t* var) { if(var) { switch(var->type) { case vm::TYPE_NIL: return vnx::Variant(nullptr); case vm::TYPE_TRUE: return vnx::Variant(true); case vm::TYPE_FALSE: return vnx::Variant(false); case vm::TYPE_REF: return convert(engine, engine->read(((const vm::ref_t*)var)->address)); case vm::TYPE_UINT: { const auto& value = ((const vm::uint_t*)var)->value; if(value >> 64 == 0) { return vnx::Variant(value.lower().lower()); } return vnx::Variant("0x" + value.str(16)); } case vm::TYPE_STRING: return vnx::Variant(((const vm::binary_t*)var)->to_string()); case vm::TYPE_BINARY: return vnx::Variant(((const vm::binary_t*)var)->to_vector()); case vm::TYPE_ARRAY: { const auto array = (const vm::array_t*)var; std::vector tmp; for(uint32_t i = 0; i < array->size; ++i) { tmp.push_back(convert(engine, engine->read_entry(array->address, i))); } return vnx::Variant(tmp); } case vm::TYPE_MAP: { const auto map = (const vm::map_t*)var; if(map->flags & FLAG_STORED) { throw std::logic_error("cannot read map from storage at " + to_hex(map->address)); } std::map tmp; for(const auto& entry : engine->find_entries(map->address)) { tmp[convert(engine, engine->read(entry.first))] = convert(engine, entry.second); } bool is_object = true; for(const auto& entry : tmp) { if(!entry.first.is_string()) { is_object = false; break; } } if(is_object) { vnx::Object obj; for(const auto& entry : tmp) { obj[entry.first.to_string_value()] = entry.second; } return vnx::Variant(obj); } return vnx::Variant(tmp); } default: break; } } return vnx::Variant(); } vnx::Variant read(std::shared_ptr engine, const uint64_t address) { return convert(engine, engine->read(address)); } void set_args(std::shared_ptr engine, const std::vector& args) { for(size_t i = 0; i < args.size(); ++i) { const auto dst = vm::MEM_STACK + 1 + i; if(dst >= vm::MEM_STATIC) { throw std::runtime_error("stack overflow"); } assign(engine, dst, args[i]); } } void execute(std::shared_ptr engine, const contract::method_t& method, const bool commit) { engine->begin(method.entry_point); engine->run(); if(!method.is_const && commit) { engine->commit(); } engine->check_gas(); } void dump_code(std::ostream& out, std::shared_ptr bin, const vnx::optional& method) { { uint32_t i = 0; out << "constants:" << std::endl; for(const auto& var : mmx::vm::read_constants(bin)) { out << " [0x" << vnx::to_hex_string(i++) << "] " << mmx::vm::to_string(var.get()) << std::endl; } } out << "fields:" << std::endl; for(const auto& entry : bin->fields) { out << " [0x" << vnx::to_hex_string(entry.second) << "] " << entry.first << std::endl; } std::map method_table; for(const auto& entry : bin->methods) { method_table[entry.second.entry_point] = entry.second; } std::vector code; const auto length = mmx::vm::deserialize(code, bin->binary.data(), bin->binary.size()); uint32_t i = 0; if(method) { if(auto tmp = bin->find_method(*method)) { i = tmp->entry_point; } else { out << "No such method: " << *method << std::endl; return; } } out << "code:" << std::endl; for(; i < code.size(); ++i) { if(auto entry = find_value(method_table, i)) { out << entry->name << " ("; int k = 0; for(const auto& arg : entry->args) { if(k++) { out << ", "; } out << arg; } out << ")" << std::endl; } const auto line = bin->find_line(i); out << " [0x" << vnx::to_hex_string(i) << ", L" << (line ? *line : -1) << "] " << to_string(code[i]) << std::endl; if(method && code[i].code == mmx::vm::OP_RET) { break; } } if(!method) { out << "Total size: " << length << " bytes" << std::endl; out << "Total instructions: " << code.size() << std::endl; } } } // vm } // mmx ================================================ FILE: src/wordlist_en.cpp ================================================ #include namespace mmx { namespace mnemonic { const std::vector wordlist_en = { "abandon", "ability", "able", "about", "above", "absent", "absorb", "abstract", "absurd", "abuse", "access", "accident", "account", "accuse", "achieve", "acid", "acoustic", "acquire", "across", "act", "action", "actor", "actress", "actual", "adapt", "add", "addict", "address", "adjust", "admit", "adult", "advance", "advice", "aerobic", "affair", "afford", "afraid", "again", "age", "agent", "agree", "ahead", "aim", "air", "airport", "aisle", "alarm", "album", "alcohol", "alert", "alien", "all", "alley", "allow", "almost", "alone", "alpha", "already", "also", "alter", "always", "amateur", "amazing", "among", "amount", "amused", "analyst", "anchor", "ancient", "anger", "angle", "angry", "animal", "ankle", "announce", "annual", "another", "answer", "antenna", "antique", "anxiety", "any", "apart", "apology", "appear", "apple", "approve", "april", "arch", "arctic", "area", "arena", "argue", "arm", "armed", "armor", "army", "around", "arrange", "arrest", "arrive", "arrow", "art", "artefact", "artist", "artwork", "ask", "aspect", "assault", "asset", "assist", "assume", "asthma", "athlete", "atom", "attack", "attend", "attitude", "attract", "auction", "audit", "august", "aunt", "author", "auto", "autumn", "average", "avocado", "avoid", "awake", "aware", "away", "awesome", "awful", "awkward", "axis", "baby", "bachelor", "bacon", "badge", "bag", "balance", "balcony", "ball", "bamboo", "banana", "banner", "bar", "barely", "bargain", "barrel", "base", "basic", "basket", "battle", "beach", "bean", "beauty", "because", "become", "beef", "before", "begin", "behave", "behind", "believe", "below", "belt", "bench", "benefit", "best", "betray", "better", "between", "beyond", "bicycle", "bid", "bike", "bind", "biology", "bird", "birth", "bitter", "black", "blade", "blame", "blanket", "blast", "bleak", "bless", "blind", "blood", "blossom", "blouse", "blue", "blur", "blush", "board", "boat", "body", "boil", "bomb", "bone", "bonus", "book", "boost", "border", "boring", "borrow", "boss", "bottom", "bounce", "box", "boy", "bracket", "brain", "brand", "brass", "brave", "bread", "breeze", "brick", "bridge", "brief", "bright", "bring", "brisk", "broccoli", "broken", "bronze", "broom", "brother", "brown", "brush", "bubble", "buddy", "budget", "buffalo", "build", "bulb", "bulk", "bullet", "bundle", "bunker", "burden", "burger", "burst", "bus", "business", "busy", "butter", "buyer", "buzz", "cabbage", "cabin", "cable", "cactus", "cage", "cake", "call", "calm", "camera", "camp", "can", "canal", "cancel", "candy", "cannon", "canoe", "canvas", "canyon", "capable", "capital", "captain", "car", "carbon", "card", "cargo", "carpet", "carry", "cart", "case", "cash", "casino", "castle", "casual", "cat", "catalog", "catch", "category", "cattle", "caught", "cause", "caution", "cave", "ceiling", "celery", "cement", "census", "century", "cereal", "certain", "chair", "chalk", "champion", "change", "chaos", "chapter", "charge", "chase", "chat", "cheap", "check", "cheese", "chef", "cherry", "chest", "chicken", "chief", "child", "chimney", "choice", "choose", "chronic", "chuckle", "chunk", "churn", "cigar", "cinnamon", "circle", "citizen", "city", "civil", "claim", "clap", "clarify", "claw", "clay", "clean", "clerk", "clever", "click", "client", "cliff", "climb", "clinic", "clip", "clock", "clog", "close", "cloth", "cloud", "clown", "club", "clump", "cluster", "clutch", "coach", "coast", "coconut", "code", "coffee", "coil", "coin", "collect", "color", "column", "combine", "come", "comfort", "comic", "common", "company", "concert", "conduct", "confirm", "congress", "connect", "consider", "control", "convince", "cook", "cool", "copper", "copy", "coral", "core", "corn", "correct", "cost", "cotton", "couch", "country", "couple", "course", "cousin", "cover", "coyote", "crack", "cradle", "craft", "cram", "crane", "crash", "crater", "crawl", "crazy", "cream", "credit", "creek", "crew", "cricket", "crime", "crisp", "critic", "crop", "cross", "crouch", "crowd", "crucial", "cruel", "cruise", "crumble", "crunch", "crush", "cry", "crystal", "cube", "culture", "cup", "cupboard", "curious", "current", "curtain", "curve", "cushion", "custom", "cute", "cycle", "dad", "damage", "damp", "dance", "danger", "daring", "dash", "daughter", "dawn", "day", "deal", "debate", "debris", "decade", "december", "decide", "decline", "decorate", "decrease", "deer", "defense", "define", "defy", "degree", "delay", "deliver", "demand", "demise", "denial", "dentist", "deny", "depart", "depend", "deposit", "depth", "deputy", "derive", "describe", "desert", "design", "desk", "despair", "destroy", "detail", "detect", "develop", "device", "devote", "diagram", "dial", "diamond", "diary", "dice", "diesel", "diet", "differ", "digital", "dignity", "dilemma", "dinner", "dinosaur", "direct", "dirt", "disagree", "discover", "disease", "dish", "dismiss", "disorder", "display", "distance", "divert", "divide", "divorce", "dizzy", "doctor", "document", "dog", "doll", "dolphin", "domain", "donate", "donkey", "donor", "door", "dose", "double", "dove", "draft", "dragon", "drama", "drastic", "draw", "dream", "dress", "drift", "drill", "drink", "drip", "drive", "drop", "drum", "dry", "duck", "dumb", "dune", "during", "dust", "dutch", "duty", "dwarf", "dynamic", "eager", "eagle", "early", "earn", "earth", "easily", "east", "easy", "echo", "ecology", "economy", "edge", "edit", "educate", "effort", "egg", "eight", "either", "elbow", "elder", "electric", "elegant", "element", "elephant", "elevator", "elite", "else", "embark", "embody", "embrace", "emerge", "emotion", "employ", "empower", "empty", "enable", "enact", "end", "endless", "endorse", "enemy", "energy", "enforce", "engage", "engine", "enhance", "enjoy", "enlist", "enough", "enrich", "enroll", "ensure", "enter", "entire", "entry", "envelope", "episode", "equal", "equip", "era", "erase", "erode", "erosion", "error", "erupt", "escape", "essay", "essence", "estate", "eternal", "ethics", "evidence", "evil", "evoke", "evolve", "exact", "example", "excess", "exchange", "excite", "exclude", "excuse", "execute", "exercise", "exhaust", "exhibit", "exile", "exist", "exit", "exotic", "expand", "expect", "expire", "explain", "expose", "express", "extend", "extra", "eye", "eyebrow", "fabric", "face", "faculty", "fade", "faint", "faith", "fall", "false", "fame", "family", "famous", "fan", "fancy", "fantasy", "farm", "fashion", "fat", "fatal", "father", "fatigue", "fault", "favorite", "feature", "february", "federal", "fee", "feed", "feel", "female", "fence", "festival", "fetch", "fever", "few", "fiber", "fiction", "field", "figure", "file", "film", "filter", "final", "find", "fine", "finger", "finish", "fire", "firm", "first", "fiscal", "fish", "fit", "fitness", "fix", "flag", "flame", "flash", "flat", "flavor", "flee", "flight", "flip", "float", "flock", "floor", "flower", "fluid", "flush", "fly", "foam", "focus", "fog", "foil", "fold", "follow", "food", "foot", "force", "forest", "forget", "fork", "fortune", "forum", "forward", "fossil", "foster", "found", "fox", "fragile", "frame", "frequent", "fresh", "friend", "fringe", "frog", "front", "frost", "frown", "frozen", "fruit", "fuel", "fun", "funny", "furnace", "fury", "future", "gadget", "gain", "galaxy", "gallery", "game", "gap", "garage", "garbage", "garden", "garlic", "garment", "gas", "gasp", "gate", "gather", "gauge", "gaze", "general", "genius", "genre", "gentle", "genuine", "gesture", "ghost", "giant", "gift", "giggle", "ginger", "giraffe", "girl", "give", "glad", "glance", "glare", "glass", "glide", "glimpse", "globe", "gloom", "glory", "glove", "glow", "glue", "goat", "goddess", "gold", "good", "goose", "gorilla", "gospel", "gossip", "govern", "gown", "grab", "grace", "grain", "grant", "grape", "grass", "gravity", "great", "green", "grid", "grief", "grit", "grocery", "group", "grow", "grunt", "guard", "guess", "guide", "guilt", "guitar", "gun", "gym", "habit", "hair", "half", "hammer", "hamster", "hand", "happy", "harbor", "hard", "harsh", "harvest", "hat", "have", "hawk", "hazard", "head", "health", "heart", "heavy", "hedgehog", "height", "hello", "helmet", "help", "hen", "hero", "hidden", "high", "hill", "hint", "hip", "hire", "history", "hobby", "hockey", "hold", "hole", "holiday", "hollow", "home", "honey", "hood", "hope", "horn", "horror", "horse", "hospital", "host", "hotel", "hour", "hover", "hub", "huge", "human", "humble", "humor", "hundred", "hungry", "hunt", "hurdle", "hurry", "hurt", "husband", "hybrid", "ice", "icon", "idea", "identify", "idle", "ignore", "ill", "illegal", "illness", "image", "imitate", "immense", "immune", "impact", "impose", "improve", "impulse", "inch", "include", "income", "increase", "index", "indicate", "indoor", "industry", "infant", "inflict", "inform", "inhale", "inherit", "initial", "inject", "injury", "inmate", "inner", "innocent", "input", "inquiry", "insane", "insect", "inside", "inspire", "install", "intact", "interest", "into", "invest", "invite", "involve", "iron", "island", "isolate", "issue", "item", "ivory", "jacket", "jaguar", "jar", "jazz", "jealous", "jeans", "jelly", "jewel", "job", "join", "joke", "journey", "joy", "judge", "juice", "jump", "jungle", "junior", "junk", "just", "kangaroo", "keen", "keep", "ketchup", "key", "kick", "kid", "kidney", "kind", "kingdom", "kiss", "kit", "kitchen", "kite", "kitten", "kiwi", "knee", "knife", "knock", "know", "lab", "label", "labor", "ladder", "lady", "lake", "lamp", "language", "laptop", "large", "later", "latin", "laugh", "laundry", "lava", "law", "lawn", "lawsuit", "layer", "lazy", "leader", "leaf", "learn", "leave", "lecture", "left", "leg", "legal", "legend", "leisure", "lemon", "lend", "length", "lens", "leopard", "lesson", "letter", "level", "liar", "liberty", "library", "license", "life", "lift", "light", "like", "limb", "limit", "link", "lion", "liquid", "list", "little", "live", "lizard", "load", "loan", "lobster", "local", "lock", "logic", "lonely", "long", "loop", "lottery", "loud", "lounge", "love", "loyal", "lucky", "luggage", "lumber", "lunar", "lunch", "luxury", "lyrics", "machine", "mad", "magic", "magnet", "maid", "mail", "main", "major", "make", "mammal", "man", "manage", "mandate", "mango", "mansion", "manual", "maple", "marble", "march", "margin", "marine", "market", "marriage", "mask", "mass", "master", "match", "material", "math", "matrix", "matter", "maximum", "maze", "meadow", "mean", "measure", "meat", "mechanic", "medal", "media", "melody", "melt", "member", "memory", "mention", "menu", "mercy", "merge", "merit", "merry", "mesh", "message", "metal", "method", "middle", "midnight", "milk", "million", "mimic", "mind", "minimum", "minor", "minute", "miracle", "mirror", "misery", "miss", "mistake", "mix", "mixed", "mixture", "mobile", "model", "modify", "mom", "moment", "monitor", "monkey", "monster", "month", "moon", "moral", "more", "morning", "mosquito", "mother", "motion", "motor", "mountain", "mouse", "move", "movie", "much", "muffin", "mule", "multiply", "muscle", "museum", "mushroom", "music", "must", "mutual", "myself", "mystery", "myth", "naive", "name", "napkin", "narrow", "nasty", "nation", "nature", "near", "neck", "need", "negative", "neglect", "neither", "nephew", "nerve", "nest", "net", "network", "neutral", "never", "news", "next", "nice", "night", "noble", "noise", "nominee", "noodle", "normal", "north", "nose", "notable", "note", "nothing", "notice", "novel", "now", "nuclear", "number", "nurse", "nut", "oak", "obey", "object", "oblige", "obscure", "observe", "obtain", "obvious", "occur", "ocean", "october", "odor", "off", "offer", "office", "often", "oil", "okay", "old", "olive", "olympic", "omit", "once", "one", "onion", "online", "only", "open", "opera", "opinion", "oppose", "option", "orange", "orbit", "orchard", "order", "ordinary", "organ", "orient", "original", "orphan", "ostrich", "other", "outdoor", "outer", "output", "outside", "oval", "oven", "over", "own", "owner", "oxygen", "oyster", "ozone", "pact", "paddle", "page", "pair", "palace", "palm", "panda", "panel", "panic", "panther", "paper", "parade", "parent", "park", "parrot", "party", "pass", "patch", "path", "patient", "patrol", "pattern", "pause", "pave", "payment", "peace", "peanut", "pear", "peasant", "pelican", "pen", "penalty", "pencil", "people", "pepper", "perfect", "permit", "person", "pet", "phone", "photo", "phrase", "physical", "piano", "picnic", "picture", "piece", "pig", "pigeon", "pill", "pilot", "pink", "pioneer", "pipe", "pistol", "pitch", "pizza", "place", "planet", "plastic", "plate", "play", "please", "pledge", "pluck", "plug", "plunge", "poem", "poet", "point", "polar", "pole", "police", "pond", "pony", "pool", "popular", "portion", "position", "possible", "post", "potato", "pottery", "poverty", "powder", "power", "practice", "praise", "predict", "prefer", "prepare", "present", "pretty", "prevent", "price", "pride", "primary", "print", "priority", "prison", "private", "prize", "problem", "process", "produce", "profit", "program", "project", "promote", "proof", "property", "prosper", "protect", "proud", "provide", "public", "pudding", "pull", "pulp", "pulse", "pumpkin", "punch", "pupil", "puppy", "purchase", "purity", "purpose", "purse", "push", "put", "puzzle", "pyramid", "quality", "quantum", "quarter", "question", "quick", "quit", "quiz", "quote", "rabbit", "raccoon", "race", "rack", "radar", "radio", "rail", "rain", "raise", "rally", "ramp", "ranch", "random", "range", "rapid", "rare", "rate", "rather", "raven", "raw", "razor", "ready", "real", "reason", "rebel", "rebuild", "recall", "receive", "recipe", "record", "recycle", "reduce", "reflect", "reform", "refuse", "region", "regret", "regular", "reject", "relax", "release", "relief", "rely", "remain", "remember", "remind", "remove", "render", "renew", "rent", "reopen", "repair", "repeat", "replace", "report", "require", "rescue", "resemble", "resist", "resource", "response", "result", "retire", "retreat", "return", "reunion", "reveal", "review", "reward", "rhythm", "rib", "ribbon", "rice", "rich", "ride", "ridge", "rifle", "right", "rigid", "ring", "riot", "ripple", "risk", "ritual", "rival", "river", "road", "roast", "robot", "robust", "rocket", "romance", "roof", "rookie", "room", "rose", "rotate", "rough", "round", "route", "royal", "rubber", "rude", "rug", "rule", "run", "runway", "rural", "sad", "saddle", "sadness", "safe", "sail", "salad", "salmon", "salon", "salt", "salute", "same", "sample", "sand", "satisfy", "satoshi", "sauce", "sausage", "save", "say", "scale", "scan", "scare", "scatter", "scene", "scheme", "school", "science", "scissors", "scorpion", "scout", "scrap", "screen", "script", "scrub", "sea", "search", "season", "seat", "second", "secret", "section", "security", "seed", "seek", "segment", "select", "sell", "seminar", "senior", "sense", "sentence", "series", "service", "session", "settle", "setup", "seven", "shadow", "shaft", "shallow", "share", "shed", "shell", "sheriff", "shield", "shift", "shine", "ship", "shiver", "shock", "shoe", "shoot", "shop", "short", "shoulder", "shove", "shrimp", "shrug", "shuffle", "shy", "sibling", "sick", "side", "siege", "sight", "sign", "silent", "silk", "silly", "silver", "similar", "simple", "since", "sing", "siren", "sister", "situate", "six", "size", "skate", "sketch", "ski", "skill", "skin", "skirt", "skull", "slab", "slam", "sleep", "slender", "slice", "slide", "slight", "slim", "slogan", "slot", "slow", "slush", "small", "smart", "smile", "smoke", "smooth", "snack", "snake", "snap", "sniff", "snow", "soap", "soccer", "social", "sock", "soda", "soft", "solar", "soldier", "solid", "solution", "solve", "someone", "song", "soon", "sorry", "sort", "soul", "sound", "soup", "source", "south", "space", "spare", "spatial", "spawn", "speak", "special", "speed", "spell", "spend", "sphere", "spice", "spider", "spike", "spin", "spirit", "split", "spoil", "sponsor", "spoon", "sport", "spot", "spray", "spread", "spring", "spy", "square", "squeeze", "squirrel", "stable", "stadium", "staff", "stage", "stairs", "stamp", "stand", "start", "state", "stay", "steak", "steel", "stem", "step", "stereo", "stick", "still", "sting", "stock", "stomach", "stone", "stool", "story", "stove", "strategy", "street", "strike", "strong", "struggle", "student", "stuff", "stumble", "style", "subject", "submit", "subway", "success", "such", "sudden", "suffer", "sugar", "suggest", "suit", "summer", "sun", "sunny", "sunset", "super", "supply", "supreme", "sure", "surface", "surge", "surprise", "surround", "survey", "suspect", "sustain", "swallow", "swamp", "swap", "swarm", "swear", "sweet", "swift", "swim", "swing", "switch", "sword", "symbol", "symptom", "syrup", "system", "table", "tackle", "tag", "tail", "talent", "talk", "tank", "tape", "target", "task", "taste", "tattoo", "taxi", "teach", "team", "tell", "ten", "tenant", "tennis", "tent", "term", "test", "text", "thank", "that", "theme", "then", "theory", "there", "they", "thing", "this", "thought", "three", "thrive", "throw", "thumb", "thunder", "ticket", "tide", "tiger", "tilt", "timber", "time", "tiny", "tip", "tired", "tissue", "title", "toast", "tobacco", "today", "toddler", "toe", "together", "toilet", "token", "tomato", "tomorrow", "tone", "tongue", "tonight", "tool", "tooth", "top", "topic", "topple", "torch", "tornado", "tortoise", "toss", "total", "tourist", "toward", "tower", "town", "toy", "track", "trade", "traffic", "tragic", "train", "transfer", "trap", "trash", "travel", "tray", "treat", "tree", "trend", "trial", "tribe", "trick", "trigger", "trim", "trip", "trophy", "trouble", "truck", "true", "truly", "trumpet", "trust", "truth", "try", "tube", "tuition", "tumble", "tuna", "tunnel", "turkey", "turn", "turtle", "twelve", "twenty", "twice", "twin", "twist", "two", "type", "typical", "ugly", "umbrella", "unable", "unaware", "uncle", "uncover", "under", "undo", "unfair", "unfold", "unhappy", "uniform", "unique", "unit", "universe", "unknown", "unlock", "until", "unusual", "unveil", "update", "upgrade", "uphold", "upon", "upper", "upset", "urban", "urge", "usage", "use", "used", "useful", "useless", "usual", "utility", "vacant", "vacuum", "vague", "valid", "valley", "valve", "van", "vanish", "vapor", "various", "vast", "vault", "vehicle", "velvet", "vendor", "venture", "venue", "verb", "verify", "version", "very", "vessel", "veteran", "viable", "vibrant", "vicious", "victory", "video", "view", "village", "vintage", "violin", "virtual", "virus", "visa", "visit", "visual", "vital", "vivid", "vocal", "voice", "void", "volcano", "volume", "vote", "voyage", "wage", "wagon", "wait", "walk", "wall", "walnut", "want", "warfare", "warm", "warrior", "wash", "wasp", "waste", "water", "wave", "way", "wealth", "weapon", "wear", "weasel", "weather", "web", "wedding", "weekend", "weird", "welcome", "west", "wet", "whale", "what", "wheat", "wheel", "when", "where", "whip", "whisper", "wide", "width", "wife", "wild", "will", "win", "window", "wine", "wing", "wink", "winner", "winter", "wire", "wisdom", "wise", "wish", "witness", "wolf", "woman", "wonder", "wood", "wool", "word", "work", "world", "worry", "worth", "wrap", "wreck", "wrestle", "wrist", "write", "wrong", "yard", "year", "yellow", "you", "young", "youth", "zebra", "zero", "zone", "zoo", }; } } ================================================ FILE: start_harvester.sh ================================================ #!/bin/bash if pgrep -x "mmx_harvester" > /dev/null then echo "Already running" exit fi DIR=$(dirname "$0") screen -S mmx_harvester -d -m ${DIR}/run_harvester.sh $@ echo "Started MMX harvester in screen, to attach type 'screen -r mmx_harvester'." ================================================ FILE: start_node.sh ================================================ #!/bin/bash if pgrep -x "mmx_node" > /dev/null then echo "Already running" exit fi DIR=$(dirname "$0") screen -S mmx_node -d -m ${DIR}/run_node.sh $@ echo "Started MMX node in screen, to attach type 'screen -r mmx_node'." ================================================ FILE: start_wallet.sh ================================================ #!/bin/bash if pgrep -x "mmx_wallet" > /dev/null then echo "Already running" exit fi DIR=$(dirname "$0") screen -S mmx_wallet -d -m ${DIR}/run_wallet.sh $@ echo "Started MMX wallet in screen, to attach type 'screen -r mmx_wallet'." ================================================ FILE: stop_harvester.sh ================================================ #!/bin/bash killall mmx_harvester || exit ================================================ FILE: stop_node.sh ================================================ #!/bin/bash killall mmx_node || exit ================================================ FILE: stop_wallet.sh ================================================ #!/bin/bash killall mmx_wallet || exit ================================================ FILE: test/CMakeLists.txt ================================================ add_executable(test_engine test_engine.cpp) add_executable(test_mnemonic test_mnemonic.cpp) add_executable(test_database test_database.cpp) add_executable(test_compiler test_compiler.cpp) add_executable(test_transactions test_transactions.cpp) add_executable(test_swap_algo test_swap_algo.cpp) add_executable(test_database_reads test_database_reads.cpp) add_executable(test_mem_hash test_mem_hash.cpp) add_executable(test_pos_compute test_pos_compute.cpp) add_executable(test_encoding test_encoding.cpp) add_executable(test_score_target test_score_target.cpp) add_executable(test_space_diff test_space_diff.cpp) add_executable(test_execute vm/test_execute.cpp) add_executable(database_fill database_fill.cpp) add_executable(test_write_bytes_vitest_gen test_write_bytes_vitest_gen.cpp) add_executable(mmx_tests mmx_tests.cpp) add_executable(vm_engine_tests vm/engine_tests.cpp) add_executable(vm_storage_tests vm/storage_tests.cpp) target_link_libraries(test_engine mmx_vm) target_link_libraries(test_mnemonic mmx_iface) target_link_libraries(test_database mmx_db mmx_iface) target_link_libraries(test_compiler mmx_vm mmx_iface) target_link_libraries(test_transactions mmx_modules) target_link_libraries(test_swap_algo mmx_iface) target_link_libraries(test_database_reads mmx_db mmx_iface) target_link_libraries(database_fill mmx_db mmx_iface) target_link_libraries(test_mem_hash vnx_base mmx_pos) target_link_libraries(test_pos_compute mmx_iface mmx_pos) target_link_libraries(test_space_diff mmx_iface mmx_pos) target_link_libraries(test_encoding mmx_pos) target_link_libraries(test_execute mmx_vm mmx_iface) target_link_libraries(mmx_tests mmx_iface mmx_pos) target_link_libraries(vm_engine_tests mmx_vm) target_link_libraries(vm_storage_tests mmx_vm) target_link_libraries(test_write_bytes_vitest_gen mmx_iface) if(CUDA_FOUND) add_executable(test_cuda_recompute test_cuda_recompute.cpp) target_link_libraries(test_cuda_recompute mmx_pos mmx_pos_cuda) endif() ================================================ FILE: test/README.md ================================================ ## AFL ### Install ``` sudo apt install llvm clang ninja-build git clone https://github.com/AFLplusplus/AFLplusplus cd AFLplusplus make distrib sudo make install ``` ### Build with AFL ``` export AFL_CC_COMPILER=LLVM ./make_devel.sh -DCMAKE_C_COMPILER=afl-cc -DCMAKE_CXX_COMPILER=afl-c++ ``` ### Execute ``` echo core | sudo tee /proc/sys/kernel/core_pattern ``` ``` AFL_SKIP_CPUFREQ=1 afl-fuzz -a binary -i test/vm/AFL/inputs/ -o test/vm/AFL/outputs/ ./build/test/test_execute @@ ``` ================================================ FILE: test/attacks/cross_site_access.html ================================================ ================================================ FILE: test/code/contract_01.js ================================================ var value = 0; function init() {} function add(count) public { value += count; } function increment() public { value++; } function get_value() public const { return value; } function reset() public { value = 0; } ================================================ FILE: test/code/contract_02.js ================================================ interface counter; function init() {} function cross_add(value) public { counter.add(value); // rcall("counter", "add", value); } function cross_increment() public { counter.increment(); // rcall("counter", "increment"); } function cross_read_update() public { const value = counter.get_value(); // const value = rcall("counter", "get_value"); if(value % 2 != 0) { counter.increment(); // rcall("counter", "increment"); } } ================================================ FILE: test/code/instr_loop.js ================================================ var value = 0; var array = []; var map = {}; // var string = "A3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"; // for(var i = 0; i < 8; ++i) { // string = concat(string, string); // } // for(var i = 0; i < 100000; ++i) { // map[i] = i; // } for(var i = 0; i < 100000; ++i) { // value = 1; // value = 1 / 115792089237316195423570985008687907853269984665640564039457584007913129639935; // value = 115792089237316195423570985008687907853269984665640564039457584007913129639935 / 11; // value = 115792089237316195423570985008687907853269984665640564039457584007913129639935 / 16; // value = 340282366920938463463374607431768211455 / 11; // value = 18446744073709551615 / 11; // value = 4294967295 / 11; // value = 4294967295 * 4294967295; // value = 18446744073709551615 * 18446744073709551615; // value = 340282366920938463463374607431768211455 * 340282366920938463463374607431768211455; // value = sha256("sajvnskjnvcksdjvnksjdnvkjsdnv"); // value = uint("18446744073709551615"); // value = uint("340282366920938463463374607431768211455"); value = uint("115792089237316195423570985008687907853269984665640564039457584007913129639935"); // value = uint("0xF3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"); // value = binary_hex("F3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964AF3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964AF3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"); // value = to_string(4294967295); // value = to_string(18446744073709551615); // value = to_string(340282366920938463463374607431768211455); // value = to_string(115792089237316195423570985008687907853269984665640564039457584007913129639935); // value = to_string_hex(115792089237316195423570985008687907853269984665640564039457584007913129639935); // value = bech32("mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"); // value = to_string_bech32(0xF3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A); // value = ecdsa_verify( // binary_hex("A3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"), // binary_hex("02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E"), // binary_hex("C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39") // ); // value = string == string; // value = []; // push(array, null); // push(array, string); // map[i] = i; // value = map[i % 10000]; // erase(map, i); } // while(true) {} array = null; map = null; ================================================ FILE: test/code/test.js ================================================ function func(a, b) { return; } var map = {}; var test = []; for(var i = 0, test = 0; i < 6; ++i, i = i + 1) { ++test; } for(const value of test) { value.field = 123; } var owner; function check_owner() { if (this.user != owner) { fail("user != owner", 1); } var tmp = to_string_bech32(this.user); } ================================================ FILE: test/contracts/MMX_USDM_swap.json ================================================ { "__type": "mmx.contract.Executable", "name": "MMX / USDM Swap", "binary": "mmx15qd3lrqm7d7jyqx3rrwqav09n8sq2xlwpehq9ydxfn8peyh367lsxfsfqd", "init_args": ["mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev", "mmx1gk9s4xg265yxdujagqzu4tzsy3gygycy3nksr9ux8qxj8hs6zgys4shv5n"] } ================================================ FILE: test/contracts/MultiSig.json ================================================ { "__type": "mmx.contract.MultiSig", "num_required": 1, "owners": [ "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns", "mmx1uj2dth7r9tcn3vas42f0hzz74dkz8ygv59mpx44n7px7j7yhvv4sfmkf0d" ] } ================================================ FILE: test/contracts/PlotNFT.json ================================================ { "__type": "mmx.contract.Executable", "name": "test1", "binary": "mmx1cw4nwrhceunjd82tdcauy8yeg8ccygsrx3r4kzr8v35prv482qvqdvz80z", "init_args": ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"] } ================================================ FILE: test/contracts/TEST_token.json ================================================ { "__type": "mmx.contract.Executable", "name": "Test Token", "symbol": "TEST", "decimals": 3, "binary": "mmx17pzl9cgmesyjur7rvvev70fx7f55rvyv7549cvrtf7chjml4qh4sryu9yl", "init_args": ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"] } ================================================ FILE: test/contracts/contract_01.json ================================================ { "__type": "mmx.contract.Executable", "name": "contract_01", "binary": "mmx1dr7hxpdcc223hqnjyejvfj87w7jtulr8mglgspcmjm58690320csf5k4s5", "init_args": [] } ================================================ FILE: test/contracts/contract_02.json ================================================ { "__type": "mmx.contract.Executable", "name": "contract_02", "binary": "mmx1xeux3zlku0w275e7u0llq9yfj6mh97hn4ytueevmwv9e9f9mtudq6gsstv", "init_args": [], "depends": { "counter": "mmx1886vtx08rt5pd0n6rgp6zagucfr2z70fkhg5erqthftkfmpllm0qvf7xs5" } } ================================================ FILE: test/contracts/fixed_price_token.json ================================================ { "__type": "mmx.contract.Executable", "name": "Fixed Price Token", "symbol": "FIXED", "decimals": 0, "binary": "mmx1tyes0rdg7z9a6xqlm8hzlkj9lwpq3j90yda6m7tafyr02kdm08sq4hn5et", "init_args": ["mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z", "9223372036854775808", "MMX"] } ================================================ FILE: test/contracts/test_Data.json ================================================ { "__type": "mmx.contract.Data", "value": "test123" } ================================================ FILE: test/database_fill.cpp ================================================ /* * database_fill.cpp * * Created on: May 24, 2023 * Author: mad */ #include int main(int argc, char** argv) { const std::string path = argc > 1 ? std::string(argv[1]) : "tmp/test_table"; const size_t num_rows = argc > 2 ? ::atoi(argv[2]) : 1; const size_t key_size = argc > 3 ? ::atoi(argv[3]) : 32; const size_t value_size = argc > 4 ? ::atoi(argv[4]) : 32; ::srand(::time(nullptr)); auto table = std::make_shared(path); auto version = table->current_version(); std::vector key(key_size); std::vector value(value_size); for(size_t i = 0; i < num_rows; ++i) { for(size_t k = 0; k < key_size; ++k) { key[k] = ::rand(); } table->insert( std::make_shared(key.data(), key.size()), std::make_shared(value.data(), value.size())); if(i % 10000 == 0) { table->commit(++version); } } table->commit(++version); return 0; } ================================================ FILE: test/http/test_pipeline.txt ================================================ GET /wapi/node/info HTTP/1.1 Host: localhost Connection: keep-alive GET /wapi/node/info HTTP/1.1 Host: localhost Connection: close ================================================ FILE: test/mmx_tests.cpp ================================================ /* * mmx_tests.cpp * * Created on: Dec 16, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void expect_throw(const std::function& code) { bool did_throw = false; try { code(); } catch(...) { did_throw = true; } if(!did_throw) { throw std::logic_error("expected failure"); } } using namespace mmx; int main(int argc, char** argv) { mmx::secp256k1_init(); vnx::test::init("mmx"); VNX_TEST_BEGIN("uint128") { vnx::test::expect(uint128().to_double(), 0); vnx::test::expect(uint128(11).to_double(), 11); vnx::test::expect(uint128(1123456).to_double(), 1123456); vnx::test::expect((uint128(256) / 1).lower(), 256u); vnx::test::expect((uint128(256) / 2).lower(), 128u); vnx::test::expect((uint128(256) / 4).lower(), 64u); vnx::test::expect((uint128(256) / 8).lower(), 32u); vnx::test::expect((uint128(256) / 16).lower(), 16u); vnx::test::expect(vnx::Variant(uint128((uint128_1 << 127) + 3)).to(), uint128((uint128_1 << 127) + 3)); } VNX_TEST_END() VNX_TEST_BEGIN("hash_t") { vnx::test::expect(hash_t().to_string(), "0000000000000000000000000000000000000000000000000000000000000000"); vnx::test::expect(hash_t(std::string()).to_string(), "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"); vnx::test::expect(hash_t::empty().to_string(), "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855"); vnx::test::expect(hash_t() < hash_t(), false); vnx::test::expect(hash_t() > hash_t(), false); vnx::test::expect(hash_t() < hash_t("1"), true); vnx::test::expect(hash_t() > hash_t("1"), false); vnx::test::expect(hash_t("1") > hash_t(), true); vnx::test::expect(hash_t("1") < hash_t(), false); } VNX_TEST_END() VNX_TEST_BEGIN("addr_t") { std::map, uint128> balance; balance[std::make_pair(addr_t(std::string("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf")), addr_t())] = 1337; vnx::test::expect(balance[std::make_pair(addr_t(std::string("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf")), addr_t())], 1337); vnx::test::expect(balance[std::make_pair(addr_t(std::string("mmx1hfyq6t2jartw9f8fkkertepxef0f8egegd3m438ndfttrlhzzmks7c99tv")), addr_t())], 0); } VNX_TEST_END() VNX_TEST_BEGIN("fixed128") { vnx::test::expect(fixed128().to_amount(0), 0); vnx::test::expect(fixed128().to_amount(6), 0); vnx::test::expect(fixed128(1).to_amount(0), 1); vnx::test::expect(fixed128(11).to_amount(6), 11000000); vnx::test::expect(fixed128(111, 3).to_string(), "0.111"); vnx::test::expect(fixed128(1111, 3).to_string(), "1.111"); vnx::test::expect(fixed128(1.1).to_amount(1), 11); vnx::test::expect(fixed128(1.01).to_amount(4), 10100); vnx::test::expect(fixed128(1.001).to_amount(4), 10010); vnx::test::expect(fixed128(1.0001).to_amount(4), 10001); vnx::test::expect(fixed128(1.00001).to_amount(6), 1000010); vnx::test::expect(fixed128(1.000001).to_amount(6), 1000001); vnx::test::expect(fixed128("1").to_amount(0), 1); vnx::test::expect(fixed128("1.").to_amount(0), 1); vnx::test::expect(fixed128("1.0").to_amount(0), 1); vnx::test::expect(fixed128("1.000000").to_amount(0), 1); vnx::test::expect(fixed128("1.2").to_amount(0), 1); vnx::test::expect(fixed128("1,3").to_amount(1), 13); vnx::test::expect(fixed128("1e1").to_amount(1), 100); vnx::test::expect(fixed128("1,1e0").to_amount(2), 110); vnx::test::expect(fixed128("1,1E2").to_amount(3), 110000); vnx::test::expect(fixed128("1,4E-1").to_amount(2), 14); vnx::test::expect(fixed128("123.000000").to_amount(6), 123000000); vnx::test::expect(fixed128("123.000001").to_amount(6), 123000001); vnx::test::expect(fixed128("123.000011").to_amount(6), 123000011); vnx::test::expect(fixed128("0123.012345").to_amount(6), 123012345); vnx::test::expect(fixed128("0123.1123456789").to_amount(6), 123112345); vnx::test::expect(fixed128("1.1").to_string(), "1.1"); vnx::test::expect(fixed128("1.01").to_string(), "1.01"); vnx::test::expect(fixed128("1.000001").to_string(), "1.000001"); vnx::test::expect(fixed128("1.0123456789").to_string(), "1.0123456789"); vnx::test::expect(fixed128("1.200").to_string(), "1.2"); vnx::test::expect(fixed128("001.3").to_string(), "1.3"); vnx::test::expect(fixed128("1.4").to_value(), 1.4); } VNX_TEST_END() VNX_TEST_BEGIN("to_amount()") { vnx::test::expect(mmx::to_amount(1.0, int(0)), 1); vnx::test::expect(mmx::to_amount(1337.0, int(0)), 1337); vnx::test::expect(mmx::to_amount(1337.1337, int(4)), 13371337); vnx::test::expect(mmx::to_amount(1337.1337, int(6)), 1337133700); vnx::test::expect(mmx::to_amount(1180591620717411303424.0, int(0)), uint128_1 << 70); vnx::test::expect(mmx::to_amount(10, int(18)), 10000000000000000000ull); } VNX_TEST_END() VNX_TEST_BEGIN("calc_tree_hash()") { std::vector list; auto hash = mmx::calc_btree_hash(list); vnx::test::expect(hash, hash_t()); for(int i = 0; i < 1000; ++i) { list.push_back(hash_t(std::to_string(i))); auto next = mmx::calc_btree_hash(list); vnx::test::expect(next != hash, true); hash = next; } } VNX_TEST_END() VNX_TEST_BEGIN("is_json()") { vnx::test::expect(is_json(vnx::Variant()), true); vnx::test::expect(is_json(vnx::Variant(nullptr)), true); vnx::test::expect(is_json(vnx::Variant(false)), true); vnx::test::expect(is_json(vnx::Variant(true)), true); vnx::test::expect(is_json(vnx::Variant(1)), true); vnx::test::expect(is_json(vnx::Variant(1 << 16)), true); vnx::test::expect(is_json(vnx::Variant(uint64_t(1) << 32)), true); vnx::test::expect(is_json(vnx::Variant(-1)), true); vnx::test::expect(is_json(vnx::Variant(-256)), true); vnx::test::expect(is_json(vnx::Variant(-65536)), true); vnx::test::expect(is_json(vnx::Variant(-4294967296)), true); vnx::test::expect(is_json(vnx::Variant("")), true); vnx::test::expect(is_json(vnx::Variant("test")), true); vnx::test::expect(is_json(vnx::Variant(std::vector{})), true); vnx::test::expect(is_json(vnx::Variant(std::vector{vnx::Variant(1337), vnx::Variant("test")})), true); vnx::test::expect(is_json(vnx::Variant(vnx::Object())), true); vnx::test::expect(is_json(vnx::Variant(vnx::Object({{"test", vnx::Variant(1337)}, {"test1", vnx::Variant("test")}}))), true); vnx::test::expect(is_json(vnx::Variant(std::array())), false); vnx::test::expect(is_json(vnx::Variant(std::vector{1, 2, 3})), false); vnx::test::expect(is_json(vnx::Variant(std::map())), false); vnx::test::expect(is_json(vnx::Variant(std::vector{vnx::Variant(std::vector{1, 2, 3})})), false); } VNX_TEST_END() VNX_TEST_BEGIN("Contract::num_bytes()") { auto params = mmx::ChainParams::create(); params->min_txfee_byte = 100; const std::string str(1024 * 1024, 'A'); { auto tmp = mmx::contract::Data::create(); tmp->value = str; vnx::test::expect(tmp->num_bytes() > str.size(), true); vnx::test::expect(tmp->calc_cost(params) > str.size() * params->min_txfee_byte, true); } { auto tmp = mmx::contract::WebData::create(); tmp->mime_type = str; tmp->payload = str; vnx::test::expect(tmp->num_bytes() > 2 * str.size(), true); } { auto tmp = mmx::contract::Binary::create(); tmp->binary.resize(str.size()); tmp->constant.resize(str.size()); tmp->compiler = str; tmp->fields.emplace(str, 0); tmp->methods.emplace(str, mmx::contract::method_t()); tmp->name = str; tmp->source = str; vnx::test::expect(tmp->num_bytes() > 7 * str.size(), true); } { auto tmp = mmx::contract::Binary::create(); for(uint32_t i = 0; i < 1024; ++i) { tmp->line_info.emplace(i, i); } vnx::test::expect(tmp->num_bytes() > 8 * 1024, true); } { auto tmp = mmx::contract::TokenBase::create(); tmp->meta_data = str; tmp->name = str; tmp->symbol = str; vnx::test::expect(tmp->num_bytes() > 3 * str.size(), true); } { auto tmp = mmx::contract::Executable::create(); tmp->depends.emplace(str, mmx::addr_t()); tmp->init_args.emplace_back(str); tmp->init_method = str; tmp->meta_data = str; tmp->name = str; tmp->symbol = str; vnx::test::expect(tmp->num_bytes() > 6 * str.size(), true); } { auto tmp = mmx::contract::MultiSig::create(); for(uint32_t i = 0; i < 256; ++i) { tmp->owners.emplace(hash_t(std::to_string(i))); } vnx::test::expect(tmp->num_bytes() > 32 * 256, true); } } VNX_TEST_END() VNX_TEST_BEGIN("write_bytes()") { { const bool value = true; std::vector tmp; vnx::VectorOutputStream stream(&tmp); vnx::OutputBuffer out(&stream); write_bytes(out, value); out.flush(); vnx::test::expect(tmp.size(), 1u); } { const vnx::Variant value(true); std::vector tmp; vnx::VectorOutputStream stream(&tmp); vnx::OutputBuffer out(&stream); write_bytes(out, value); out.flush(); vnx::test::expect(tmp.size(), 1u); } { const vnx::Variant value(1337); std::vector tmp; vnx::VectorOutputStream stream(&tmp); vnx::OutputBuffer out(&stream); write_bytes(out, value); out.flush(); vnx::test::expect(tmp.size(), 8u); } { const vnx::Variant value(-1337); std::vector tmp; vnx::VectorOutputStream stream(&tmp); vnx::OutputBuffer out(&stream); write_bytes(out, value); out.flush(); vnx::test::expect(tmp.size(), 8u); } } VNX_TEST_END() VNX_TEST_BEGIN("MultiSig") { const hash_t txid; std::vector> keys; for(int i = 0; i < 10; ++i) { const auto skey = skey_t(hash_t(std::to_string(i))); keys.emplace_back(skey, pubkey_t(skey)); } { auto tmp = mmx::contract::MultiSig::create(); for(int i = 0; i < 3; ++i) { tmp->owners.insert(keys[i].second.get_addr()); } tmp->num_required = 1; vnx::test::expect(tmp->is_valid(), true); for(int i = 0; i < 3; ++i) { auto sol = mmx::solution::PubKey::create(); sol->pubkey = keys[i].second; sol->signature = signature_t::sign(keys[i].first, txid); tmp->validate(sol, txid); } { auto sol = mmx::solution::MultiSig::create(); sol->num_required = tmp->num_required; for(int i = 0; i < 3; ++i) { auto tmp = mmx::solution::PubKey::create(); tmp->pubkey = keys[i].second; tmp->signature = signature_t::sign(keys[i].first, txid); sol->solutions[tmp->pubkey.get_addr()] = tmp; } tmp->validate(sol, txid); } { auto sol = mmx::solution::PubKey::create(); const auto skey = skey_t(hash_t::random()); sol->pubkey = pubkey_t(skey); sol->signature = signature_t::sign(skey, txid); expect_throw([=]() { tmp->validate(sol, txid); }); } } { auto tmp = mmx::contract::MultiSig::create(); for(int i = 0; i < 5; ++i) { tmp->owners.insert(keys[i].second.get_addr()); } tmp->num_required = 3; vnx::test::expect(tmp->is_valid(), true); { auto sol = mmx::solution::MultiSig::create(); for(int i = 0; i < 3; ++i) { auto tmp = mmx::solution::PubKey::create(); tmp->pubkey = keys[i].second; tmp->signature = signature_t::sign(keys[i].first, txid); sol->solutions[tmp->pubkey.get_addr()] = tmp; } tmp->validate(sol, txid); } { auto sol = mmx::solution::MultiSig::create(); for(int i = 2; i < 5; ++i) { auto tmp = mmx::solution::PubKey::create(); tmp->pubkey = keys[i].second; tmp->signature = signature_t::sign(keys[i].first, txid); sol->solutions[tmp->pubkey.get_addr()] = tmp; } tmp->validate(sol, txid); } { auto sol = mmx::solution::MultiSig::create(); for(uint32_t i = 0; i < tmp->num_required; ++i) { auto tmp = mmx::solution::PubKey::create(); const auto skey = skey_t(hash_t::random()); tmp->pubkey = skey; tmp->signature = signature_t::sign(skey, txid); sol->solutions[tmp->pubkey.get_addr()] = tmp; } expect_throw([=]() { tmp->validate(sol, txid); }); } } } VNX_TEST_END() VNX_TEST_BEGIN("proof_verify") { mmx::hash_t plot_id; mmx::hash_t challenge; std::vector x_values; vnx::from_string("156EBEA58EF0E25E9647C87380238F45E4E446114ED78F6B40C626319EE7DD21", challenge); vnx::from_string("60C67427E27FBD77C8BDFF5EB1CC3696C08926FA12BCE8B1AE48E87099F9366B", plot_id); vnx::from_string("[3684070240, 4088919472, 4255854024, 2557705011, 2826775019, 784116104, 3002057429, 1544955509, 1600690361, 1551417277, 2728397286, 1771107893, 1187799433, 1044600637, 1880286022, 1921473397, 4059605908, 3921758377, 1663788388, 2187951111, 1469314847, 2221602546, 3049849478, 2483049477, 783906790, 1769349661, 627534699, 1664365119, 3108470239, 4050165503, 1719994423, 2296755013, 3689388662, 173076783, 178304083, 3395522713, 1454472817, 3194528037, 1512291786, 1987638418, 1143780087, 3120478614, 2855051906, 693584283, 3818941816, 4127002689, 2989697755, 3891407791, 2509655266, 4258376726, 1843252036, 3191219821, 2088352375, 213252018, 4115819364, 3175076101, 3561808706, 1948511669, 3322128563, 3750559212, 2272209440, 1293941526, 437177217, 2820197201, 3807400022, 7496129, 2683510002, 3807839482, 2233243744, 2411092355, 1331204979, 2038088672, 2167782813, 3830146105, 537456114, 2401528407, 2652250456, 2221908904, 890566783, 708924513, 2596290458, 340917615, 3250050811, 3771386335, 3494357838, 1179822413, 2341748577, 602106011, 1122065619, 252962133, 278550961, 1768804869, 669497081, 1990086308, 2491380917, 51625349, 4207300886, 3095591768, 1852131389, 609642249, 2918683512, 2059312217, 3335572914, 2736167997, 1528047374, 4124848408, 902683345, 4263117025, 108772979, 485864815, 2410357795, 908723453, 1183430568, 2815414658, 2737238764, 2669408162, 2850938826, 2890536155, 491707862, 2553723643, 1034532861, 3214153497, 3097594346, 2701020101, 678153046, 2932267943, 1365864923, 532310940, 2351720145, 4080824906, 2893128375, 2595930727, 1064911548, 3834810248, 3565525092, 163085774, 685730942, 2810511962, 2540444228, 1857924416, 4174369771, 2145288036, 587439552, 718732787, 1169724691, 3254817017, 3946843084, 954721517, 3373230078, 3637676521, 1331632982, 4086478124, 4116294100, 4120279824, 476981752, 2430423022, 220679215, 4117454286, 4166904409, 2171504903, 2001727739, 3383221100, 2596677253, 988991329, 2638232513, 1095569023, 3303068778, 1931231583, 2226576220, 1480273400, 3911488963, 1608929138, 1376754282, 61629307, 3957255986, 514129543, 2169952004, 3308565016, 3572656193, 1573653323, 961047589, 2310528924, 2099635716, 817068327, 3653864895, 4168803514, 2147588334, 2794673138, 492271828, 3268899536, 1623851505, 1985375222, 396546240, 3609981176, 2079278511, 2161006185, 2007577134, 2954139926, 1277553298, 3205868414, 4257573912, 3376256719, 4227206123, 585150605, 2904436845, 2619013042, 3125718317, 3035845111, 2049651560, 161957643, 393761167, 2783560380, 1211203226, 3313590097, 479870197, 830535414, 3613172362, 3953259697, 265953611, 1493207470, 955279780, 2133758876, 2884678190, 3234737433, 1365475005, 2908229202, 2072744826, 4263640821, 2236131683, 894009793, 307201858, 3291293763, 2184230914, 776021200, 867100221, 4032840254, 2454442006, 1289389606, 1247346023, 386849697, 1757849095, 973341783, 3958516371, 1277136670, 205471439, 2514111789, 1777386820, 1436581469, 1494466641, 512070215, 2845825157, 329403080, 1115243938, 4009264613, 3806285763, 3170487941]", x_values); const auto plot_challenge = get_plot_challenge(challenge, plot_id); mmx::pos::verify(x_values, plot_challenge, plot_id, 4, 0, 32, false); } VNX_TEST_END() VNX_TEST_BEGIN("proof_order") { mmx::ProofOfSpaceOG proof; vnx::from_string("{\ \"plot_id\": \"8FA05447F4F0849B7875E0D0D25B99360F8A7981C67DE7CA5FCF1E1483089F82\",\ \"challenge\": \"3BD3D3158D26678DBD4910F4F8975F5177C4C45A5B68D52686939566C5D88239\",\ \"farmer_key\": \"027D7562FB5A8967E57A22F876302F75BA3AE3980607FB32E4439681F820AE398F\",\ \"ksize\": 29,\ \"seed\": \"B655BE5A884F7CC18FB3D423F6E9D48B229DD13DD1CC3B9D7A165012077D49D3\",\ \"proof_xs\": [41526030, 190034280, 27487774, 360531876, 157328122, 533344899, 348912715, 158286857, 500512399, 286789283, 309409411, 33301427, 291496595, 292537, 431952279, 209584997, 111041179, 225686812, 377306265, 45918619, 136492725, 443847657, 63762825, 455772217, 299457809, 62819158, 423066079, 70184667, 116121877, 262069313, 94597380, 277096972, 178726801, 264024912, 497654815, 81149636, 201256170, 209529847, 86228594, 32668245, 122504482, 174029193, 404468875, 222875439, 241585134, 438378901, 310806690, 77808852, 506242593, 337807442, 171130081, 360833911, 483590771, 498133539, 78329797, 41557646, 163327753, 315798381, 131747531, 361264561, 216455451, 179665178, 51870911, 429035183, 295349671, 152798101, 253786116, 433103191, 476044027, 346642880, 47227825, 208846273, 206436033, 245874067, 427075796, 180779200, 410970246, 1143092, 50889398, 224426279, 375125060, 188487454, 319636984, 272259131, 377087291, 271901983, 531636482, 454874007, 274228377, 431843070, 523612467, 361408983, 423618927, 339345523, 86142409, 160801159, 22024508, 233678781, 241239177, 475088783, 400172747, 362038581, 429952975, 121634389, 179032692, 152394426, 223298082, 93030597, 63400229, 175256560, 530644023, 21993664, 153789041, 515107385, 135370091, 156498932, 72211704, 400919262, 136383461, 504380151, 239462247, 184409768, 245564618, 264419588, 183760152, 303573155, 280701899, 412267540, 281366400, 318612884, 281199257, 28786199, 280595286, 469254350, 516006656, 76648711, 534052766, 109825608, 383408610, 400602196, 201747007, 232103494, 225366639, 473932026, 373853689, 523521134, 385137715, 297896772, 460856009, 253065215, 191027004, 302714203, 102745112, 118857551, 531336719, 298547044, 308312588, 441150850, 177353289, 366287353, 117270343, 323760640, 436125237, 193628024, 496102441, 192425221, 174984738, 267393617, 119828474, 382207855, 157357834, 102830320, 69524625, 32453159, 470198640, 253550250, 12023423, 143563219, 38100930, 259685561, 358040000, 277554148, 502359901, 375665759, 268245745, 193785837, 21177576, 97132723, 237830009, 390049154, 424082856, 287383135, 482999386, 93334862, 211737164, 32954960, 379554381, 329067393, 322071582, 452967760, 223523925, 394112637, 91770475, 33515598, 41541163, 159354561, 448723432, 360714676, 298810627, 463092740, 8253330, 416722492, 172191294, 358486549, 286025427, 260690064, 290924466, 157109118, 14568701, 256902937, 225155064, 507728616, 21730277, 31804253, 365161673, 184388967, 36778686, 241694509, 71357500, 429209559, 275960351, 244822214, 345055770, 122399096, 93423247, 5590085, 299893246, 386457316, 300993063, 533350058, 313848074, 106703937, 516682805, 49602142, 321158224, 265493627, 329208949, 45211675, 112966538, 523299896, 80915641, 499055347, 124794444, 78543398, 155955534, 393135459]\ }", proof); const auto plot_filter = 4; const auto plot_challenge = get_plot_challenge(proof.challenge, proof.plot_id); mmx::pos::verify(proof.proof_xs, plot_challenge, proof.plot_id, plot_filter, 0, proof.ksize, false); std::default_random_engine engine; for(int i = 0; i < 100; ++i) { std::shuffle(proof.proof_xs.begin(), proof.proof_xs.end(), engine); expect_throw([=]() { mmx::pos::verify(proof.proof_xs, plot_challenge, proof.plot_id, plot_filter, 0, proof.ksize, false); }); } } VNX_TEST_END() VNX_TEST_BEGIN("mnemonic") { vnx::test::expect( mmx::mnemonic::words_to_string(mmx::mnemonic::seed_to_words(hash_t(), mmx::mnemonic::wordlist_en)), "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art"); vnx::test::expect( mmx::mnemonic::words_to_seed(mmx::mnemonic::string_to_words("void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold"), mmx::mnemonic::wordlist_en).to_string(), "8F9D98FD746F9D0AFA660965B00FB2891AB25495C653D37DB50D52EC1AC185F5"); hash_t seed; vnx::from_string("8F9D98FD746F9D0AFA660965B00FB2891AB25495C653D37DB50D52EC1AC185F5", seed); vnx::test::expect(seed.to_string(), "8F9D98FD746F9D0AFA660965B00FB2891AB25495C653D37DB50D52EC1AC185F5"); vnx::test::expect( mmx::mnemonic::words_to_string(mmx::mnemonic::seed_to_words(seed, mmx::mnemonic::wordlist_en)), "void come effort suffer camp survey warrior heavy shoot primary clutch crush open amazing screen patrol group space point ten exist slush involve unfold"); } VNX_TEST_END() mmx::secp256k1_free(); return vnx::test::done(); } ================================================ FILE: test/test_challenge_grind.cpp ================================================ /* * test_challenge_grind.cpp * * Created on: Jan 10, 2025 * Author: mad */ #include #include #include #include int main() { const int N = 5; const int M = 2; // number of choices const int P = 500; // netspace / 1000 const int num_iter = 10000; const auto free_chance = pow(double(P) / 1000, M - 1); std::default_random_engine engine; std::uniform_real_distribution dist(0, 1); uint64_t total = 0; uint64_t lost = 0; for(int iter = 0; iter < num_iter; ++iter) { int sum[M] = {}; for(int k = 0; k < M; ++k) { for(int i = 0; i < N; ++i) { sum[k] += (engine() % 1000) < P ? 1 : 0; } } int best = 0; int index = 0; for(int k = 0; k < M; ++k) { if(sum[k] > best) { best = sum[k]; index = k; } } total += best; if(index > 0) { if(dist(engine) > free_chance) { lost++; } } } const auto loss_chance = double(lost) / num_iter; const auto avg_blocks = double(total) / num_iter - loss_chance; const auto exp_blocks = double(N * P) / 1000; const auto gain = avg_blocks / exp_blocks; const auto effective = (gain - 1) * double(P) / 1000 / 256 * 100; std::cout << "free_chance = " << free_chance << std::endl; std::cout << "loss_chance = " << loss_chance << std::endl; std::cout << "avg_blocks = " << avg_blocks << std::endl; std::cout << "exp_blocks = " << exp_blocks << std::endl; std::cout << "gain = " << gain << std::endl; std::cout << "effective = " << effective << " %" << std::endl; return 0; } ================================================ FILE: test/test_compiler.cpp ================================================ /* * test_compiler.cpp * * Created on: Dec 19, 2022 * Author: mad */ #include #include using namespace mmx; int main(int argc, char** argv) { std::map options; options["f"] = "file"; vnx::init("test_compiler", argc, argv, options); std::string file_name; if(vnx::read_config("file", file_name)) { std::ifstream stream(file_name); std::stringstream buffer; buffer << stream.rdbuf(); auto bin = vm::compile(buffer.str()); vnx::write_to_file("binary.dat", bin); } vnx::close(); return 0; } ================================================ FILE: test/test_cuda_recompute.cpp ================================================ /* * test_cuda_recompute.cpp * * Created on: Feb 5, 2025 * Author: mad */ #include #include #include using namespace mmx; using namespace mmx::pos; int main(int argc, char** argv) { std::map options; options["C"] = "clevel"; options["N"] = "count"; options["devices"] = "list"; vnx::init("test_cuda_recompute", argc, argv, options); int count = 1; int clevel = 0; std::vector device_list; vnx::read_config("count", count); vnx::read_config("clevel", clevel); vnx::read_config("devices", device_list); cuda_recompute_init(true, device_list); int ksize = 29; hash_t plot_id; std::vector x_values; vnx::from_string("8FA05447F4F0849B7875E0D0D25B99360F8A7981C67DE7CA5FCF1E1483089F82", plot_id); vnx::from_string("[41526030, 190034280, 27487774, 360531876, 157328122, 533344899, 348912715, 158286857, 500512399, 286789283, 309409411, 33301427, 291496595, 292537, 431952279, 209584997, 111041179, 225686812, 377306265, 45918619, 136492725, 443847657, 63762825, 455772217, 299457809, 62819158, 423066079, 70184667, 116121877, 262069313, 94597380, 277096972, 178726801, 264024912, 497654815, 81149636, 201256170, 209529847, 86228594, 32668245, 122504482, 174029193, 404468875, 222875439, 241585134, 438378901, 310806690, 77808852, 506242593, 337807442, 171130081, 360833911, 483590771, 498133539, 78329797, 41557646, 163327753, 315798381, 131747531, 361264561, 216455451, 179665178, 51870911, 429035183, 295349671, 152798101, 253786116, 433103191, 476044027, 346642880, 47227825, 208846273, 206436033, 245874067, 427075796, 180779200, 410970246, 1143092, 50889398, 224426279, 375125060, 188487454, 319636984, 272259131, 377087291, 271901983, 531636482, 454874007, 274228377, 431843070, 523612467, 361408983, 423618927, 339345523, 86142409, 160801159, 22024508, 233678781, 241239177, 475088783, 400172747, 362038581, 429952975, 121634389, 179032692, 152394426, 223298082, 93030597, 63400229, 175256560, 530644023, 21993664, 153789041, 515107385, 135370091, 156498932, 72211704, 400919262, 136383461, 504380151, 239462247, 184409768, 245564618, 264419588, 183760152, 303573155, 280701899, 412267540, 281366400, 318612884, 281199257, 28786199, 280595286, 469254350, 516006656, 76648711, 534052766, 109825608, 383408610, 400602196, 201747007, 232103494, 225366639, 473932026, 373853689, 523521134, 385137715, 297896772, 460856009, 253065215, 191027004, 302714203, 102745112, 118857551, 531336719, 298547044, 308312588, 441150850, 177353289, 366287353, 117270343, 323760640, 436125237, 193628024, 496102441, 192425221, 174984738, 267393617, 119828474, 382207855, 157357834, 102830320, 69524625, 32453159, 470198640, 253550250, 12023423, 143563219, 38100930, 259685561, 358040000, 277554148, 502359901, 375665759, 268245745, 193785837, 21177576, 97132723, 237830009, 390049154, 424082856, 287383135, 482999386, 93334862, 211737164, 32954960, 379554381, 329067393, 322071582, 452967760, 223523925, 394112637, 91770475, 33515598, 41541163, 159354561, 448723432, 360714676, 298810627, 463092740, 8253330, 416722492, 172191294, 358486549, 286025427, 260690064, 290924466, 157109118, 14568701, 256902937, 225155064, 507728616, 21730277, 31804253, 365161673, 184388967, 36778686, 241694509, 71357500, 429209559, 275960351, 244822214, 345055770, 122399096, 93423247, 5590085, 299893246, 386457316, 300993063, 533350058, 313848074, 106703937, 516682805, 49602142, 321158224, 265493627, 329208949, 45211675, 112966538, 523299896, 80915641, 499055347, 124794444, 78543398, 155955534, 393135459]", x_values); auto x_in = x_values; for(auto& x : x_in) { x >>= clevel; } const auto time_begin = get_time_ms(); std::set jobs; for(int i = 0; i < count; ++i) { const auto id = cuda_recompute(ksize, clevel, plot_id, x_in); jobs.insert(id); } while(!jobs.empty()) { const auto res = cuda_recompute_poll(jobs); if(res->failed) { std::cout << "[" << res->id << "] failed with: " << res->error << std::endl; } else { for(const auto& entry : res->entries) { std::cout << "[" << res->id << "] Y = " << entry.first << std::endl; std::cout << "[" << res->id << "] M = " << entry.second.to_string() << std::endl; } if(res->X != x_values) { std::cout << vnx::to_string(res->X) << std::endl; throw std::logic_error("X mismatch"); } } jobs.erase(res->id); } std::cout << "Took " << get_time_ms() - time_begin << " ms" << std::endl; cuda_recompute_shutdown(); vnx::close(); return 0; } ================================================ FILE: test/test_database.cpp ================================================ /* * test_database.cpp * * Created on: Jun 9, 2022 * Author: mad */ #include #include #include #include #include template std::shared_ptr db_write(T value) { auto out = std::make_shared(sizeof(T)); vnx::write_value(out->data, vnx::to_big_endian(value)); return out; } template T db_read(std::shared_ptr value) { if(!value) { throw std::runtime_error("!value"); } if(value->size != sizeof(T)) { throw std::runtime_error("size mismatch: " + std::to_string(value->size) + " != " + std::to_string(sizeof(T))); } T out = T(); ::memcpy(&out, value->data, sizeof(T)); return vnx::from_big_endian(out); } int main(int argc, char** argv) { vnx::test::init("mmx.database"); VNX_TEST_BEGIN("test_table") { const uint32_t num_entries = 100; mmx::Table::options_t options; options.max_block_size = 1024 * 1024; auto table = std::make_shared("tmp/test_table", options); if(table->current_version() == 1) { for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i); } } table->revert(0); for(uint32_t i = 0; i < num_entries; ++i) { table->insert(db_write(uint32_t(i * 2)), db_write(uint64_t(i))); } table->commit(1); for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i); } { auto iter = std::make_shared(table); iter->seek_begin(); uint32_t i = 0; while(iter->is_valid()) { vnx::test::expect(db_read(iter->key()), i * 2); vnx::test::expect(db_read(iter->value()), i); iter->next(); i++; } } table->flush(); for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i); } { auto iter = std::make_shared(table); iter->seek_begin(); uint32_t i = 0; while(iter->is_valid()) { vnx::test::expect(db_read(iter->key()), i * 2); vnx::test::expect(db_read(iter->value()), i); iter->next(); i++; } } for(uint32_t i = 2 * num_entries; i > 0; --i) { table->insert(db_write(uint32_t((i - 1) * 2)), db_write(uint64_t(i))); } table->commit(2); for(uint32_t i = 0; i < 2 * num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i + 1); } for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)), 0)), i); } table->flush(); for(uint32_t i = 0; i < 2 * num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i + 1); } for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)), 0)), i); } if(table->find(db_write(uint32_t(5 * num_entries)))) { throw std::logic_error("found something"); } { auto iter = std::make_shared(table); iter->seek_begin(); uint32_t i = 0; while(iter->is_valid()) { vnx::test::expect(db_read(iter->key()), i * 2); vnx::test::expect(db_read(iter->value()), i + 1); iter->next(); i++; } } { auto iter = std::make_shared(table); iter->seek(db_write(uint32_t(num_entries + 1))); vnx::test::expect(iter->is_valid(), true); vnx::test::expect(db_read(iter->key()), num_entries + 2); iter->prev(); vnx::test::expect(iter->is_valid(), true); vnx::test::expect(db_read(iter->key()), num_entries); iter->prev(); vnx::test::expect(iter->is_valid(), true); vnx::test::expect(db_read(iter->key()), num_entries - 2); } table->revert(1); for(uint32_t i = 0; i < num_entries; ++i) { vnx::test::expect(db_read(table->find(db_write(uint32_t(i * 2)))), i); } } VNX_TEST_END() VNX_TEST_BEGIN("uint_table") { mmx::uint_table table("tmp/uint_table"); table.revert(0); table.insert(3, "dfhgdfgdfgdfg"); table.insert(1, "sdfsdfsdf"); { std::string value; const auto res = table.find(1, value); vnx::test::expect(res, true); vnx::test::expect(value, "sdfsdfsdf"); } { std::string value; const auto res = table.find(3, value); vnx::test::expect(res, true); vnx::test::expect(value, "dfhgdfgdfgdfg"); } table.commit(1); table.flush(); { std::string value; const auto res = table.find(1, value); vnx::test::expect(res, true); vnx::test::expect(value, "sdfsdfsdf"); } { std::string value; const auto res = table.find(3, value); vnx::test::expect(res, true); vnx::test::expect(value, "dfhgdfgdfgdfg"); } // table.scan([](const uint32_t& key, const std::string& value) { // std::cout << key << " => " << value << std::endl; // }); } VNX_TEST_END() VNX_TEST_BEGIN("uint_multi_table") { mmx::uint_multi_table table("tmp/uint_multi_table"); table.revert(0); table.insert(1, "234523345"); table.insert(3, "dfhgdfgdfgdfg"); table.insert(1, "sdfsdfsdf"); { std::vector value; const auto res = table.find(1, value); vnx::test::expect(res, size_t(2)); vnx::test::expect(value[0], "234523345"); vnx::test::expect(value[1], "sdfsdfsdf"); } { std::vector value; const auto res = table.find(3, value); vnx::test::expect(res, size_t(1)); vnx::test::expect(value[0], "dfhgdfgdfgdfg"); } table.commit(1); table.flush(); { std::vector value; const auto res = table.find(1, value); vnx::test::expect(res, size_t(2)); vnx::test::expect(value[0], "234523345"); vnx::test::expect(value[1], "sdfsdfsdf"); } { std::vector value; const auto res = table.find(3, value); vnx::test::expect(res, size_t(1)); vnx::test::expect(value[0], "dfhgdfgdfgdfg"); } // table.scan([](const uint32_t& key, const std::string& value) { // std::cout << key << " => " << value << std::endl; // }); } VNX_TEST_END() VNX_TEST_BEGIN("test_table_1") { mmx::Table::options_t options; options.force_flush_threshold = 10; auto table = std::make_shared("tmp/test_table_1", options); table->revert(0); const uint32_t num_iter = 100 * options.force_flush_threshold + options.force_flush_threshold / 2; const auto key = db_write(uint64_t(1337)); const auto key2 = db_write(uint64_t(-1)); for(uint32_t i = 0; i < num_iter; ++i) { table->insert(key, db_write(-1)); table->commit(i + 1); table->revert(i); if(i) { vnx::test::expect(db_read(table->find(key)), uint32_t(i - 1)); } table->insert(key, db_write(-1)); table->insert(key, db_write(i)); table->commit(i + 1); } vnx::test::expect(bool(table->find(key2)), false); table->insert(key2, db_write(-1)); table = nullptr; table = std::make_shared("tmp/test_table_1", options); vnx::test::expect(bool(table->find(key2)), false); for(int32_t i = num_iter - 1; i >= 0; --i) { auto value = table->find(key, i); vnx::test::expect(bool(value), true); vnx::test::expect(db_read(value), uint32_t(i)); } for(int32_t i = num_iter; i >= 0; --i) { table->revert(i); auto value = table->find(key); if(i) { vnx::test::expect(bool(value), true); vnx::test::expect(db_read(value), uint32_t(i - 1)); } else { vnx::test::expect(bool(value), false); } } } VNX_TEST_END() VNX_TEST_BEGIN("empty_force_flush") { mmx::Table::options_t options; options.force_flush_threshold = 10; auto table = std::make_shared("tmp/empty_force_flush", options); table->revert(0); const uint32_t num_iter = 100 * options.force_flush_threshold; for(uint32_t i = 0; i < num_iter; ++i) { table->commit(i + 1); } table = nullptr; table = std::make_shared("tmp/empty_force_flush", options); vnx::test::expect(table->current_version(), num_iter); } VNX_TEST_END() VNX_TEST_BEGIN("write_log_corruption") { auto table = std::make_shared("tmp/write_log_corruption"); table->revert(0); const uint32_t num_iter = 1000; const uint32_t num_bytes = 256; const auto key = db_write(uint64_t(1337)); for(uint32_t i = 0; i < num_iter; ++i) { table->insert(key, db_write(i)); table->commit(i + 1); } table = nullptr; { vnx::File write_log("tmp/write_log_corruption/write_log.dat"); write_log.open("rb+"); write_log.seek_to(write_log.file_size() - num_bytes); std::vector zeros(num_bytes); write_log.out.write(zeros.data(), zeros.size()); write_log.close(); } table = std::make_shared("tmp/write_log_corruption"); mmx::Table::Iterator iter(table); iter.seek_begin(); while(iter.is_valid()) { if(iter.key()->size == 0) { throw std::logic_error("key size == 0"); } if(iter.value()->size == 0) { throw std::logic_error("value size == 0"); } iter.next(); } } VNX_TEST_END() return vnx::test::done(); } ================================================ FILE: test/test_database_reads.cpp ================================================ /* * test_database_reads.cpp * * Created on: May 24, 2023 * Author: mad */ #include #include #include int main(int argc, char** argv) { const std::string path = argc > 1 ? std::string(argv[1]) : "tmp/test_table"; const int num_rows = argc > 2 ? ::atoi(argv[2]) : 1000; const int num_threads = argc > 3 ? ::atoi(argv[3]) : 1; const uint64_t seed = argc > 4 ? ::atoi(argv[4]) : vnx::get_time_micros(); ::srand(seed); auto table = std::make_shared(path); std::atomic total_bytes {0}; const auto time_begin = vnx::get_time_micros(); #pragma omp parallel for num_threads(num_threads) for(int i = 0; i < num_rows; ++i) { auto key = std::make_shared(8); for(size_t k = 0; k < key->size; ++k) { key->data[k] = ::rand(); } mmx::Table::Iterator iter(table); iter.seek(key); if(iter.is_valid()) { total_bytes += iter.value()->size; } } const auto elapsed = (vnx::get_time_micros() - time_begin) / 1e3; std::cout << "Total Read: " << total_bytes / pow(1024, 2) << " MiB" << std::endl; std::cout << "Total Time: " << elapsed << " ms" << std::endl; std::cout << "Lookup Time: " << elapsed / num_rows << " ms" << std::endl; return 0; } ================================================ FILE: test/test_encoding.cpp ================================================ /* * test_encoding.cpp * * Created on: Nov 20, 2023 * Author: mad */ #include #include int main(int argc, char** argv) { const int num_symbols = argc > 1 ? ::atoi(argv[1]) : 4096; std::vector symbols; for(int i = 0; i < num_symbols; ++i) { uint8_t sym = 0; const auto ticket = ::rand() % 1000; if(ticket < 900) { sym = ticket % 3; } else if(ticket < 990) { sym = 3 + ticket % 3; } else { sym = 6 + ticket % 3; } symbols.push_back(sym); } for(auto sym : symbols) { std::cout << int(sym) << " "; } std::cout << std::endl; uint64_t total_bits = 0; const auto bit_stream = mmx::pos::encode(symbols, total_bits); std::cout << "symbols = " << num_symbols << std::endl; std::cout << "bit_stream = " << (total_bits + 7) / 8 << " bytes, " << double(total_bits) / num_symbols << " bits / symbol" << std::endl; const auto test = mmx::pos::decode(bit_stream, symbols.size()); if(test != symbols) { for(auto sym : test) { std::cout << int(sym) << " "; } throw std::logic_error("test != symbols"); } return 0; } ================================================ FILE: test/test_engine.cpp ================================================ /* * test_engine.cpp * * Created on: May 1, 2022 * Author: mad */ #include #include #include #include #include using namespace mmx; int main(int arcv, char** argv) { auto db = std::make_shared(1); // auto storage = std::make_shared(); auto backend = std::make_shared("tmp/", db); db->revert(0); auto storage = std::make_shared(backend); { vm::Engine engine(addr_t(), storage, false); engine.write(vm::MEM_CONST + 0, vm::var_t()); engine.write(vm::MEM_CONST + 1, vm::uint_t(1337)); engine.write(vm::MEM_CONST + 2, vm::map_t()); engine.assign(vm::MEM_CONST + 3, vm::binary_t::alloc("value")); engine.write(vm::MEM_CONST + 4, vm::uint_t(11337)); engine.write(vm::MEM_CONST + 5, vm::array_t()); auto& code = engine.code; code.emplace_back(vm::OP_CLONE, 0, vm::MEM_STACK + 1, vm::MEM_CONST + 1); code.emplace_back(vm::OP_COPY, vm::OPFLAG_REF_B, vm::MEM_STACK + 0, vm::MEM_STACK + 1); code.emplace_back(vm::OP_COPY, 0, vm::MEM_STATIC + 0, vm::MEM_CONST + 2); code.emplace_back(vm::OP_CLONE, 0, vm::MEM_STACK + 3, vm::MEM_CONST + 3); code.emplace_back(vm::OP_CONCAT, 0, vm::MEM_STACK + 4, vm::MEM_CONST + 3, vm::MEM_CONST + 3); code.emplace_back(vm::OP_SET, 0, vm::MEM_STATIC + 0, vm::MEM_CONST + 3, vm::MEM_CONST + 1); code.emplace_back(vm::OP_SET, 0, vm::MEM_STATIC + 0, vm::MEM_STACK + 4, vm::MEM_CONST + 3); code.emplace_back(vm::OP_SET, vm::OPFLAG_REF_B, vm::MEM_STATIC + 0, vm::MEM_STACK + 3, vm::MEM_CONST + 4); code.emplace_back(vm::OP_GET, 0, vm::MEM_STACK + 2, vm::MEM_STATIC + 0, vm::MEM_CONST + 3); code.emplace_back(vm::OP_COPY, 0, vm::MEM_STATIC + 1, vm::MEM_CONST + 5); code.emplace_back(vm::OP_PUSH_BACK, vm::OPFLAG_REF_A, vm::MEM_STATIC + 1, vm::MEM_CONST + 1); code.emplace_back(vm::OP_PUSH_BACK, vm::OPFLAG_REF_A, vm::MEM_STATIC + 1, vm::MEM_CONST + 4); code.emplace_back(vm::OP_PUSH_BACK, vm::OPFLAG_REF_A, vm::MEM_STATIC + 1, vm::MEM_CONST + 3); code.emplace_back(vm::OP_SIZE, 0, vm::MEM_STATIC + 8, vm::MEM_STATIC + 1); code.emplace_back(vm::OP_TYPE, 0, vm::MEM_STATIC + 9, vm::MEM_STATIC + 0); code.emplace_back(vm::OP_RET); engine.gas_limit = 1000000; engine.init(); engine.begin(0); engine.run(); engine.dump_memory(); engine.commit(); std::cout << "Cost: " << engine.gas_used << std::endl; } storage->commit(); db->commit(1); { vm::Engine engine(addr_t(), storage, false); engine.write(vm::MEM_CONST + 0, vm::var_t()); engine.write(vm::MEM_CONST + 1, vm::uint_t()); engine.write(vm::MEM_CONST + 2, vm::uint_t(1)); engine.assign(vm::MEM_CONST + 3, vm::binary_t::alloc("value")); auto& code = engine.code; code.emplace_back(vm::OP_GET, 0, vm::MEM_STACK + 0, vm::MEM_STATIC + 0, vm::MEM_CONST + 3); code.emplace_back(vm::OP_ERASE, 0, vm::MEM_STATIC + 0, vm::MEM_CONST + 3); code.emplace_back(vm::OP_GET, 0, vm::MEM_STATIC + 16, vm::MEM_STATIC + 1, vm::MEM_CONST + 1); code.emplace_back(vm::OP_GET, 0, vm::MEM_STATIC + 17, vm::MEM_STATIC + 1, vm::MEM_CONST + 2); code.emplace_back(vm::OP_POP_BACK, 0, vm::MEM_STATIC + 18, vm::MEM_STATIC + 1); code.emplace_back(vm::OP_RET); engine.gas_limit = 100000; engine.init(); engine.begin(0); engine.run(); engine.dump_memory(); engine.commit(); std::cout << "Cost: " << engine.gas_used << std::endl; } storage->commit(); db->commit(2); { vm::Engine engine(addr_t(), storage, true); engine.write(vm::MEM_CONST + 0, vm::var_t()); engine.write(vm::MEM_CONST + 1, vm::uint_t()); engine.write(vm::MEM_CONST + 2, vm::uint_t(1)); engine.assign(vm::MEM_CONST + 3, vm::binary_t::alloc("value")); engine.write(vm::MEM_CONST + 4, vm::uint_t(2)); auto& code = engine.code; code.emplace_back(vm::OP_GET, 0, vm::MEM_STACK + 0, vm::MEM_STATIC + 0, vm::MEM_CONST + 3); code.emplace_back(vm::OP_GET, 0, vm::MEM_STATIC + 32, vm::MEM_STATIC + 1, vm::MEM_CONST + 1); code.emplace_back(vm::OP_GET, 0, vm::MEM_STATIC + 33, vm::MEM_STATIC + 1, vm::MEM_CONST + 2); code.emplace_back(vm::OP_GET, 0, vm::MEM_STATIC + 34, vm::MEM_STATIC + 1, vm::MEM_CONST + 4); code.emplace_back(vm::OP_CLONE, 0, vm::MEM_STACK + 1, vm::MEM_STATIC + 32); code.emplace_back(vm::OP_CLONE, 0, vm::MEM_STATIC + 40, vm::MEM_STATIC + 32); code.emplace_back(vm::OP_RET); engine.gas_limit = 100000; engine.init(); engine.begin(0); engine.run(); engine.dump_memory(); std::cout << "Cost: " << engine.gas_used << std::endl; } { vm::Engine engine(addr_t(), storage, true); engine.write(vm::MEM_CONST + 0, vm::var_t()); engine.write(vm::MEM_CONST + 1, vm::uint_t()); engine.write(vm::MEM_CONST + 2, vm::uint_t(1)); engine.write(vm::MEM_CONST + 3, vm::uint_t(10000)); auto& code = engine.code; code.emplace_back(vm::OP_COPY, 0, vm::MEM_STACK + 0, vm::MEM_CONST + 1); code.emplace_back(vm::OP_CMP_GTE, 0, vm::MEM_STACK + 1, vm::MEM_STACK + 0, vm::MEM_CONST + 3); code.emplace_back(vm::OP_JUMPI, 0, 5, vm::MEM_STACK + 1); code.emplace_back(vm::OP_ADD, 0, vm::MEM_STACK + 0, vm::MEM_STACK + 0, vm::MEM_CONST + 2); code.emplace_back(vm::OP_JUMP, 0, 1); code.emplace_back(vm::OP_RET); engine.gas_limit = 10000000; engine.init(); engine.begin(0); engine.run(); engine.dump_memory(); std::cout << "Cost: " << engine.gas_used << std::endl; } return 0; } ================================================ FILE: test/test_hash_vdl.cpp ================================================ /* * test_hash_vdl.cpp * * Created on: Dec 6, 2021 * Author: mad */ #include #include using namespace mmx; int main(int argc, char** argv) { const size_t num_iter = 5000 * 1000; const size_t segment_len = num_iter / 256; const auto vdl_begin = vnx::get_time_micros(); const hash_t begin("test"); std::vector proof; { size_t j = 0; hash_t point = begin; for(size_t i = 0; i < num_iter; ++i) { if(i > 0 && i % segment_len == 0) { time_segment_t seg; seg.num_iters = i - j; seg.output = point; proof.push_back(seg); j = i; } point = hash_t(point.bytes); } if(num_iter > j) { time_segment_t seg; seg.num_iters = num_iter - j; seg.output = point; proof.push_back(seg); } } std::cout << "VDL took " << (vnx::get_time_micros() - vdl_begin) / 1000 << " ms" << std::endl; const auto verify_begin = vnx::get_time_micros(); #pragma omp parallel for for(size_t i = 0; i < proof.size(); ++i) { hash_t point; if(i > 0) { point = proof[i - 1].output; } else { point = begin; } for(size_t k = 0; k < proof[i].num_iters; ++k) { point = hash_t(point.bytes); } if(point != proof[i].output) { throw std::logic_error("invalid proof at segment " + std::to_string(i)); } } std::cout << "Verify took " << (vnx::get_time_micros() - verify_begin) / 1000 << " ms" << std::endl; return 0; } ================================================ FILE: test/test_mem_hash.cpp ================================================ /* * test_mem_hash.cpp * * Created on: Oct 30, 2023 * Author: mad */ #include #include #include #include #include #include #include #include using namespace mmx::pos; int main(int argc, char** argv) { const int N = 32; const int count = argc > 1 ? std::atoi(argv[1]) : 1; const int num_iter = argc > 2 ? std::atoi(argv[2]) : 256; const uint64_t mem_size = uint64_t(N) * N; std::cout << "count = " << count << std::endl; std::cout << "num_iter = " << num_iter << std::endl; std::cout << "mem_size = " << mem_size << " (" << mem_size * 4 / 1024 << " KiB)" << std::endl; size_t pop_sum = 0; size_t min_pop_count = 1024; size_t bit_sum[1024] = {}; uint32_t* mem = new uint32_t[mem_size]; for(int iter = 0; iter < count; ++iter) { uint32_t msg[9] = {}; msg[0] = iter; const mmx::hash_512_t key(&msg, sizeof(msg)); gen_mem_array(mem, key.data(), mem_size); if(iter == 0) { std::map init_count; for(int k = 0; k < 32; ++k) { std::cout << "[" << k << "] "; for(int i = 0; i < N; ++i) { init_count[mem[k * N + i]]++; std::cout << vnx::to_hex_string(&mem[k * N + i], 4, true, true) << " "; } std::cout << std::endl; } for(const auto& entry : init_count) { if(entry.second > 1) { std::cout << "WARN [" << std::hex << entry.first << std::dec << "] " << entry.second << std::endl; } } std::cout << "key[0] = " << key.to_string() << std::endl; } mmx::bytes_t<128> hash; calc_mem_hash(mem, hash.data(), num_iter); size_t pop = 0; for(int i = 0; i < 1024; ++i) { const auto bit = (hash[i / 8] >> (i % 8)) & 1; pop += bit; bit_sum[i] += bit; } pop_sum += pop; min_pop_count = std::min(min_pop_count, pop); std::cout << "[" << iter << "] " << hash << " (" << pop << ")" << std::endl; } for(int i = 0; i < 1024; ++i) { const auto val = bit_sum[i] / double(count); if(std::fabs(val - 0.5) > std::fmax(1000 / double(count), 0.01)) { std::cout << "WARN: bit[" << i << "] " << val << std::endl; } } // for(int i = 0; i < 1024; ++i) { // const auto val = ((dir_counter[i] * 1024) / num_iter) / double(count); // if(std::fabs(val - 1) > std::fmax(1000 / double(count), 0.02)) { // std::cout << "WARN: dir_counter[" << i << "] " << val << std::endl; // } // } std::cout << "min_pop_count = " << min_pop_count << std::endl; std::cout << "avg_pop_count = " << pop_sum / double(count) << std::endl; delete [] mem; return 0; } ================================================ FILE: test/test_mnemonic.cpp ================================================ /* * test_mnemonic.cpp * * Created on: Sep 12, 2022 * Author: mad */ #include #include using namespace mmx; void test_both(const hash_t& seed) { const auto words = mnemonic::seed_to_words(seed); const auto res = mnemonic::words_to_seed(words); if(res != seed) { throw std::logic_error("conversion failed"); } } int main(int argc, char** argv) { std::cout << vnx::to_string(mnemonic::seed_to_words(hash_t())) << std::endl; std::cout << vnx::to_string(mnemonic::seed_to_words(hash_t("test"))) << std::endl; for(int i = 0; i < 10000; ++i) { const auto k = ::rand(); test_both(hash_t(&k, sizeof(k))); } } ================================================ FILE: test/test_pos_compute.cpp ================================================ /* * test_pos_compute.cpp * * Created on: Nov 6, 2023 * Author: mad */ #include #include #include using namespace mmx; int main(int argc, char** argv) { const int ksize = argc > 1 ? std::atoi(argv[1]) : 32; const int xbits = argc > 2 ? std::atoi(argv[2]) : 0; vnx::init("test_pos_compute", 0, nullptr); std::cout << "ksize = " << ksize << std::endl; std::cout << "xbits = " << xbits << std::endl; const bool full_mode = (xbits == ksize); const hash_t id; std::mt19937_64 generator(1337); std::uniform_int_distribution dist(0, (uint64_t(1) << (ksize - xbits)) - 1); std::vector X_values; if(!full_mode) { for(int i = 0; i < 256; ++i) { X_values.push_back(dist(generator)); } } else { for(int i = 0; i < 256; ++i) { X_values.push_back(i); } } std::cout << "X = "; for(auto X : X_values) { std::cout << X << " "; } std::cout << std::endl; std::vector X_out; const auto res = pos::compute(X_values, &X_out, id, ksize, full_mode ? ksize - 8 : xbits); for(size_t i = 0; i < std::min(res.size(), 5); ++i) { std::cout << "Y = " << res[i].first << std::endl; std::cout << "M = " << res[i].second.to_string() << std::endl; std::cout << "X = "; for(size_t k = 0; k < 256; ++k) { std::cout << X_out[i * 256 + k] << " "; } std::cout << std::endl; } std::cout << "num_entries = " << res.size() << std::endl; vnx::close(); } ================================================ FILE: test/test_proof_grind.cpp ================================================ /* * test_proof_grind.cpp * * Created on: Jan 10, 2025 * Author: mad */ #include #include #include int main() { const int N = 256; const int M = 2; // number of choices const int P = 4; // avg num proofs const int num_iter = 10000; std::default_random_engine engine; std::uniform_real_distribution dist(0, 2 * P); uint64_t total = 0; uint64_t expected = 0; for(int iter = 0; iter < num_iter; ++iter) { int sum[M] = {}; for(int k = 0; k < M; ++k) { for(int i = 0; i < N; ++i) { sum[k] += dist(engine) + 0.5; } } int best = 0; for(int k = 0; k < M; ++k) { best = std::max(best, sum[k]); expected += sum[k]; } total += best; } const auto avg_proofs = double(total) / num_iter; const auto exp_proofs = double(expected) / M / num_iter; std::cout << "avg_proofs = " << avg_proofs << std::endl; std::cout << "exp_proofs = " << exp_proofs << std::endl; std::cout << "gain = " << avg_proofs / exp_proofs << std::endl; return 0; } ================================================ FILE: test/test_score_target.cpp ================================================ /* * test_score_target.cpp * * Created on: Dec 27, 2024 * Author: mad */ #include #include int main(int argc, char** argv) { const int N = argc > 1 ? std::atoi(argv[1]) : 1; const int K = 10000000; int64_t sum = 0; for(int i = 0; i < K; ++i) { int tmp = 1 << 16; for(int k = 0; k < N; ++k) { tmp = std::min(tmp, rand() % (1 << 16)); } sum += tmp; } std::cout << sum / K << std::endl; return 0; } ================================================ FILE: test/test_secp256k1.cpp ================================================ /* * test_secp256k1.cpp * * Created on: Nov 28, 2021 * Author: mad */ #include #include #include #include #include #include #include using namespace mmx; static constexpr uint64_t COIN = 1000000; std::unordered_map utxo_map; std::unordered_map> contract_map; int64_t total_tx_count = 0; int64_t total_verify_time = 0; int64_t total_process_time = 0; hash_t validate(std::shared_ptr tx, bool is_base = false) { const auto id = tx->calc_hash(); uint64_t base_amount = 0; std::unordered_map amounts; for(const auto& in : tx->inputs) { auto iter = utxo_map.find(in.prev); if(iter == utxo_map.end()) { throw std::logic_error("invalid prev_tx + index"); } const auto& out = iter->second; // verify signature if(!in.solution) { throw std::logic_error("no solution"); } { auto iter = contract_map.find(out.address); if(iter != contract_map.end()) { auto contract = iter->second; // TODO } else if(auto sol = std::dynamic_pointer_cast(in.solution)) { if(sol->pubkey.get_addr() != out.address) { throw std::logic_error("invalid pubkey"); } if(!sol->signature.verify(sol->pubkey, id)) { throw std::logic_error("invalid signature"); } } else { throw std::logic_error("invalid solution"); } } amounts[out.contract] += out.amount; } for(const auto& op : tx->execute) { // TODO } for(const auto& out : tx->outputs) { if(is_base) { if(out.contract != hash_t()) { throw std::logic_error("invalid coin base contract"); } base_amount += out.amount; } else { auto iter = amounts.find(out.contract); if(iter == amounts.end()) { throw std::logic_error("invalid output contract"); } auto& value = iter->second; if(out.amount > value) { throw std::logic_error("output > input"); } value -= out.amount; } } return id; } void process(std::shared_ptr tx, const hash_t& txid, bool is_base = false) { for(const auto& in : tx->inputs) { auto iter = utxo_map.find(in.prev); if(iter != utxo_map.end()) { utxo_map.erase(iter); } else { throw std::logic_error("no such utxo"); } } for(size_t i = 0; i < tx->outputs.size(); ++i) { txio_key_t key; key.txid = txid; key.index = i; utxo_map[key] = tx->outputs[i]; } total_tx_count++; } void process(std::shared_ptr block) { const auto begin = vnx::get_wall_time_micros(); if(!block->is_valid()) { throw std::logic_error("invalid block hash"); } if(auto tx = block->tx_base) { const auto id = validate(tx, true); process(tx, id, true); } std::vector tx_id(block->tx_list.size()); const auto verify_begin = vnx::get_wall_time_micros(); #pragma omp parallel for for(size_t i = 0; i < block->tx_list.size(); ++i) { tx_id[i] = validate(block->tx_list[i]); } total_verify_time += vnx::get_wall_time_micros() - verify_begin; for(size_t i = 0; i < block->tx_list.size(); ++i) { process(block->tx_list[i], tx_id[i]); } total_process_time += vnx::get_wall_time_micros() - begin; } int main(int argc, char** argv) { vnx::init("test_validation", argc, argv); int num_keys = 10; int num_blocks = 10; vnx::read_config("nkeys", num_keys); vnx::read_config("nblocks", num_blocks); mmx::secp256k1_init(); vector seed(32); std::vector skeys; { hash_t state(seed.data(), seed.size()); for(int i = 0; i < num_keys; ++i) { skey_t key; key.bytes = state.bytes; state = hash_t(state.bytes); skeys.push_back(key); } } std::vector pubkeys; std::unordered_map skey_map; for(const auto& skey : skeys) { const auto pubkey = pubkey_t::from_skey(skey); skey_map[pubkey] = skey; pubkeys.push_back(pubkey); } std::vector addrs; std::unordered_map pubkey_map; for(const auto& key : pubkeys) { const auto addr = key.get_addr(); pubkey_map[addr] = key; addrs.push_back(addr); } auto genesis = Block::create(); { auto base = Transaction::create(); for(int i = 0; i < num_keys; ++i) { tx_out_t out; out.address = addrs[i]; out.amount = 1 * COIN; base->outputs.push_back(out); } genesis->tx_base = base; } genesis->finalize(); std::cout << "Genesis block hash: " << genesis->hash << std::endl; process(genesis); auto prev = genesis; for(int b = 0; b < num_blocks; ++b) { auto block = Block::create(); block->prev = prev->hash; for(const auto& entry : utxo_map) { auto tx = Transaction::create(); std::shared_ptr to_sign; const auto dst_addr = addrs[rand() % addrs.size()]; { tx_out_t out; out.address = dst_addr; out.amount = entry.second.amount; tx->outputs.push_back(out); } { tx_in_t in; in.prev = entry.first; { auto sol = solution::PubKey::create(); sol->pubkey = pubkey_map[entry.second.address]; in.solution = sol; to_sign = sol; } tx->inputs.push_back(in); } const auto id = tx->calc_hash(); if(to_sign) { to_sign->signature = signature_t::sign(skey_map[to_sign->pubkey], id); } block->tx_list.push_back(tx); } block->finalize(); std::cout << "Block: hash=" << block->hash << " ntx=" << block->tx_list.size() << std::endl; process(block); prev = block; } std::cout << "total_tx_count = " << total_tx_count << std::endl; std::cout << "total_verify_time = " << total_verify_time / 1000 << " ms" << std::endl; std::cout << "total_process_time = " << total_process_time / 1000 << " ms" << std::endl; std::cout << "tps = " << 1e6 / (total_process_time / total_tx_count) << std::endl; vnx::close(); mmx::secp256k1_free(); return 0; } ================================================ FILE: test/test_space_diff.cpp ================================================ /* * test_space_diff.cpp * * Created on: Dec 30, 2024 * Author: mad */ #include #include #include #include using namespace mmx; int main(int argc, char** argv) { mmx::secp256k1_init(); std::map options; options["f"] = "file"; options["n"] = "iter"; options["s"] = "diff"; options["file"] = "plot file"; options["iter"] = "number of iterations"; options["diff"] = "space diff"; vnx::write_config("log_level", 2); vnx::init("test_space_diff", argc, argv, options); int num_iter = 1000; int plot_filter = 4; std::string file_name; uint64_t space_diff = 1; vnx::read_config("file", file_name); vnx::read_config("iter", num_iter); vnx::read_config("diff", space_diff); const auto params = get_params(); std::cout << "Iterations: " << num_iter << std::endl; std::cout << "Difficulty: " << space_diff << std::endl; const auto prover = std::make_shared(file_name); const auto ksize = prover->get_ksize(); std::cout << "K Size: " << ksize << std::endl; std::cout << "Effective Size: " << get_effective_plot_size(ksize) / 1e12 << " TB" << std::endl; int total_proofs = 0; for(int iter = 0; iter < num_iter; ++iter) { const hash_t challenge(prover->get_plot_id() + std::to_string(iter)); const auto qualities = prover->get_qualities(challenge, plot_filter); for(const auto& entry : qualities) { try { if(!entry.valid) { throw std::runtime_error(entry.error_msg); } const auto quality = pos::calc_quality(challenge, entry.meta); if(check_proof_threshold(params, ksize, quality, space_diff, false)) { total_proofs++; } } catch(const std::exception& ex) { std::cerr << "Threw: " << ex.what() << std::endl; } } } const int total_challenges = num_iter << plot_filter; std::cout << "---------------------------------------------------" << std::endl; std::cout << "Total Proofs: " << total_proofs << std::endl; std::cout << "Total Challenges: " << total_challenges << std::endl; std::cout << "Proof Chance: " << double(total_proofs) / total_challenges << std::endl; vnx::close(); mmx::secp256k1_free(); return 0; } ================================================ FILE: test/test_swap_algo.cpp ================================================ /* * test_swap_algo.cpp * * Created on: Oct 26, 2022 * Author: mad */ #include #include #include #include constexpr int FRACT_BITS = 20; class User { public: std::array wallet = {0, 0}; std::array balance = {0, 0}; std::array last_user_total = {0, 0}; // user total at last payout std::array last_fees_paid = {0, 0}; // pool fees at last payout }; class Swap { public: std::array wallet = {0, 0}; std::array balance = {0, 0}; std::array user_total = {0, 0}; std::array fees_paid = {0, 0}; std::array fees_claimed = {0, 0}; const uint256_t max_fee_rate = (uint256_t(1) << FRACT_BITS) / 4; const uint256_t min_fee_rate = (uint256_t(1) << FRACT_BITS) / 2048; void add_liquid(User& user, std::array amount) { payout(user); for(int i = 0; i < 2; ++i) { if(amount[i]) { wallet[i] += amount[i]; balance[i] += amount[i]; user_total[i] += amount[i]; user.balance[i] += amount[i]; user.last_user_total[i] = user_total[i]; } } } void rem_liquid(User& user, const int i, uint256_t amount) { if(amount == 0) { throw std::logic_error("amount == 0"); } if(amount > user.balance[i]) { throw std::logic_error("amount > user balance"); } uint256_t ret_amount = amount; if(balance[i] < user_total[i]) { ret_amount = (amount * balance[i]) / user_total[i]; const int k = (i + 1) % 2; if(balance[k] > user_total[k]) { const auto trade_amount = ((balance[k] - user_total[k]) * amount) / user_total[i]; user.wallet[k] += trade_amount; wallet[k] -= trade_amount; balance[k] -= trade_amount; } } user.wallet[i] += ret_amount; user.balance[i] -= amount; wallet[i] -= ret_amount; balance[i] -= ret_amount; user_total[i] -= amount; } void trade(User& user, const int i, uint256_t amount) { if(amount == 0) { return; } const int k = (i + 1) % 2; if(balance[k] == 0) { throw std::logic_error("nothing to buy"); } wallet[i] += amount; balance[i] += amount; const auto trade_amount = (amount * balance[k]) / balance[i]; if(trade_amount < 4) { throw std::logic_error("trade_amount < 4"); } const auto fee_rate = std::max((trade_amount * max_fee_rate) / balance[k], min_fee_rate); const auto fee_amount = std::max((trade_amount * fee_rate) >> FRACT_BITS, uint256_t(1)); auto actual_amount = trade_amount - fee_amount; actual_amount = std::min(actual_amount, wallet[k]); user.wallet[k] += actual_amount; wallet[k] -= actual_amount; balance[k] -= trade_amount; fees_paid[k] += fee_amount; } void payout(User& user) { const auto user_share = get_earned_fees(user); for(int i = 0; i < 2; ++i) { if(user_share[i]) { wallet[i] -= user_share[i]; fees_claimed[i] += user_share[i]; user.wallet[i] += user_share[i]; } user.last_user_total[i] = user_total[i]; user.last_fees_paid[i] = fees_paid[i]; } } std::array get_earned_fees(User& user) { std::array user_share = {0, 0}; for(int i = 0; i < 2; ++i) { if(user.balance[i]) { const auto total_fees = fees_paid[i] - user.last_fees_paid[i]; user_share[i] = (2 * total_fees * user.balance[i]) / (user_total[i] + user.last_user_total[i]); user_share[i] = std::min(user_share[i], wallet[i] - balance[i]); } } return user_share; } }; int main() { { Swap swap; User A; User B; User C; swap.add_liquid(A, {1000, 0}); swap.add_liquid(B, {0, 5000}); swap.add_liquid(A, {1000, 0}); swap.add_liquid(B, {0, 5000}); std::cout << "A_balance = [" << A.balance[0] << ", " << A.balance[1] << "]" << std::endl; std::cout << "B_balance = [" << B.balance[0] << ", " << B.balance[1] << "]" << std::endl; std::cout << "balance = [" << swap.balance[0] << ", " << swap.balance[1] << "]" << std::endl; std::cout << "wallet = [" << swap.wallet[0] << ", " << swap.wallet[1] << "]" << std::endl << std::endl; swap.trade(C, 0, 1000); std::cout << "wallet = [" << swap.wallet[0] << ", " << swap.wallet[1] << "]" << std::endl; std::cout << "balance = [" << swap.balance[0] << ", " << swap.balance[1] << "]" << std::endl; std::cout << "C_wallet = [" << C.wallet[0] << ", " << C.wallet[1] << "]" << std::endl << std::endl; swap.payout(B); std::cout << "fees_paid = [" << swap.fees_paid[0] << ", " << swap.fees_paid[1] << "]" << std::endl; std::cout << "fees_claimed = [" << swap.fees_claimed[0] << ", " << swap.fees_claimed[1] << "]" << std::endl << std::endl; swap.rem_liquid(B, 1, 5000); std::cout << "wallet = [" << swap.wallet[0] << ", " << swap.wallet[1] << "]" << std::endl; std::cout << "balance = [" << swap.balance[0] << ", " << swap.balance[1] << "]" << std::endl; std::cout << "B_balance = [" << B.balance[0] << ", " << B.balance[1] << "]" << std::endl; std::cout << "B_wallet = [" << B.wallet[0] << ", " << B.wallet[1] << "]" << std::endl << std::endl; swap.rem_liquid(A, 0, A.balance[0]); swap.rem_liquid(B, 1, B.balance[1]); std::cout << "wallet = [" << swap.wallet[0] << ", " << swap.wallet[1] << "]" << std::endl; std::cout << "balance = [" << swap.balance[0] << ", " << swap.balance[1] << "]" << std::endl; std::cout << "A_wallet = [" << A.wallet[0] << ", " << A.wallet[1] << "]" << std::endl; std::cout << "B_wallet = [" << B.wallet[0] << ", " << B.wallet[1] << "]" << std::endl << std::endl; } return 0; } ================================================ FILE: test/test_transactions.cpp ================================================ /* * test_transactions.cpp * * Created on: Sep 23, 2022 * Author: mad */ #include #include #include #include #include #include #include #include #include #include using namespace mmx; void expect_fail(NodeClient& node, std::shared_ptr tx) { try { node.add_transaction(tx, true); } catch(...) { return; } throw std::logic_error("expected fail"); } int main(int argc, char** argv) { mmx::secp256k1_init(); std::map options; options["w"] = "wallet"; options["n"] = "node"; vnx::init("test_transactions", argc, argv, options); std::string key_path = "wallet.dat"; std::string node_url = ":11331"; vnx::read_config("wallet", key_path); auto key_file = vnx::read_from_file(key_path); if(!key_file) { throw std::logic_error("missing wallet: " + key_path); } const auto params = mmx::get_params(); if(params->network.empty()) { throw std::logic_error("no network configured"); } vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); proxy->forward_list = {"Node"}; proxy.start(); NodeClient node("Node"); account_t config; config.key_file = key_path; config.num_addresses = 100; ECDSA_Wallet wallet(key_file->seed_value, config, params); wallet.unlock(); const auto height = node.get_height(); const auto balances = node.get_all_balances(wallet.get_all_addresses()); wallet.update_cache(balances, {}, height); { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->max_fee_amount = 0; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->fee_ratio = 0; tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->fee_ratio = 100 * 1024; tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(config.num_addresses - 1); tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->expires = 0; tx->sender = wallet.get_address(0); tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->add_output(addr_t(), addr_t(), -1); tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->add_input(addr_t(), wallet.get_address(0), -1); tx->add_output(addr_t(), addr_t(), -1); tx->max_fee_amount = 100000; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->add_input(addr_t(), wallet.get_address(0), 100000); for(int i = 0; i < 100000; ++i) { tx->add_output(addr_t(), addr_t(), 1); } tx->max_fee_amount = -1; wallet.sign_off(tx); expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); tx->add_input(addr_t(), wallet.get_address(0), 1); tx->add_output(addr_t(), addr_t(), 1); tx->outputs[0].memo = std::string(txio_t::MAX_MEMO_SIZE + 1, 'M'); tx->max_fee_amount = -1; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; expect_fail(node, tx); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); auto exec = mmx::contract::Executable::create(); exec->binary = params->plot_nft_binary; exec->init_args.emplace_back(tx->sender->to_string()); tx->deploy = exec; auto op = mmx::operation::Execute::create(); op->method = "transfer"; op->user = wallet.get_address(0); op->args.emplace_back(wallet.get_address(1).to_string()); tx->execute.push_back(op); tx->max_fee_amount = -1; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; node.add_transaction(tx, true); } { auto tx = Transaction::create(); tx->sender = wallet.get_address(0); auto multi = contract::MultiSig::create(); multi->num_required = 3; for(int i = 0; i < 3; ++i) { multi->owners.insert(wallet.get_address(i)); } tx->deploy = multi; tx->max_fee_amount = -1; wallet.sign_off(tx); std::cout << tx->to_string() << std::endl; node.add_transaction(tx, true); } vnx::close(); mmx::secp256k1_free(); return 0; } ================================================ FILE: test/test_validation.cpp ================================================ /* * test_validation.cpp * * Created on: Nov 27, 2021 * Author: mad */ #include #include #include #include #include using namespace mmx; static constexpr uint64_t COIN = 1000000; std::unordered_map> contract_map; std::unordered_map> utxo_map; int64_t total_tx_count = 0; int64_t total_verify_time = 0; int64_t total_process_time = 0; hash_t validate(std::shared_ptr tx, bool is_base = false) { const auto id = tx->calc_hash(); bls::AugSchemeMPL MPL; uint64_t base_amount = 0; std::unordered_map amounts; for(const auto& in : tx->inputs) { auto iter = utxo_map.find(in.prev_tx); if(iter == utxo_map.end()) { throw std::logic_error("invalid prev_tx"); } const auto& entry = iter->second; auto iter2 = entry.find(in.index); if(iter2 == entry.end()) { throw std::logic_error("invalid index"); } const auto& out = iter2->second; // verify signature if(!in.solution) { throw std::logic_error("no solution"); } { auto iter = contract_map.find(out.address); if(iter != contract_map.end()) { auto contract = iter->second; // TODO } else if(auto sol = std::dynamic_pointer_cast(in.solution)) { if(sol->pubkey.get_addr() != out.address) { throw std::logic_error("wrong pubkey"); } const auto G1 = sol->pubkey.to_bls(); const auto G2 = sol->signature.to_bls(); if(!MPL.Verify(G1, bls::Bytes(id.bytes.data(), id.bytes.size()), G2)) { throw std::logic_error("wrong signature"); } } else { throw std::logic_error("invalid solution"); } } amounts[out.contract] += out.amount; } for(const auto& op : tx->execute) { // TODO } for(const auto& out : tx->outputs) { if(is_base) { if(out.contract != hash_t()) { throw std::logic_error("invalid coin base contract"); } base_amount += out.amount; } else { auto iter = amounts.find(out.contract); if(iter == amounts.end()) { throw std::logic_error("invalid output contract"); } auto& value = iter->second; if(out.amount > value) { throw std::logic_error("output > input"); } value -= out.amount; } } return id; } void process(std::shared_ptr tx, const hash_t& tx_id, bool is_base = false) { for(const auto& in : tx->inputs) { auto iter = utxo_map.find(in.prev_tx); if(iter != utxo_map.end()) { auto& entry = iter->second; auto iter2 = entry.find(in.index); if(iter2 != entry.end()) { entry.erase(iter2); } if(entry.empty()) { utxo_map.erase(iter); } } } auto& entry = utxo_map[tx_id]; entry.reserve(tx->outputs.size()); for(size_t i = 0; i < tx->outputs.size(); ++i) { entry[i] = tx->outputs[i]; } total_tx_count++; } void process(std::shared_ptr block) { const auto begin = vnx::get_wall_time_micros(); if(!block->is_valid()) { throw std::logic_error("invalid block hash"); } if(auto tx = block->coin_base) { const auto id = validate(tx, true); process(tx, id, true); } std::vector tx_id(block->tx_list.size()); const auto verify_begin = vnx::get_wall_time_micros(); #pragma omp parallel for for(size_t i = 0; i < block->tx_list.size(); ++i) { tx_id[i] = validate(block->tx_list[i]); } total_verify_time += vnx::get_wall_time_micros() - verify_begin; for(size_t i = 0; i < block->tx_list.size(); ++i) { process(block->tx_list[i], tx_id[i]); } total_process_time += vnx::get_wall_time_micros() - begin; } int main(int argc, char** argv) { vnx::init("test_validation", argc, argv); int num_keys = 10; int num_blocks = 10; vnx::read_config("nkeys", num_keys); vnx::read_config("nblocks", num_blocks); vector seed(32); bls::AugSchemeMPL MPL; const bls::PrivateKey master_sk = MPL.KeyGen(seed); std::vector keys; for(int i = 0; i < num_keys; ++i) { keys.push_back(MPL.DeriveChildSk(master_sk, i)); } std::vector pubkeys; std::unordered_map skey_map; for(const auto& key : keys) { const auto G1 = key.GetG1Element(); skey_map[G1] = key; pubkeys.emplace_back(G1); } std::vector addrs; std::unordered_map pubkey_map; for(const auto& key : pubkeys) { const auto addr = key.get_addr(); pubkey_map[addr] = key; addrs.push_back(addr); } auto genesis = Block::create(); { auto base = Transaction::create(); for(int i = 0; i < num_keys; ++i) { tx_out_t out; out.address = addrs[i]; out.amount = 1 * COIN; base->outputs.push_back(out); } genesis->coin_base = base; } genesis->finalize(); std::cout << "Genesis block hash: " << genesis->hash << std::endl; process(genesis); auto prev = genesis; { auto block = Block::create(); block->prev = prev->hash; const auto prev_tx = genesis->coin_base->calc_hash(); for(const auto& utxo : utxo_map[prev_tx]) { auto tx = Transaction::create(); std::vector> to_sign; { const auto dst_addr = addrs[rand() % addrs.size()]; { tx_out_t out; out.address = dst_addr; out.amount = utxo.second.amount; tx->outputs.push_back(out); } { tx_in_t in; in.prev_tx = prev_tx; in.index = utxo.first; { auto sol = solution::PubKey::create(); sol->pubkey = pubkey_map[utxo.second.address]; in.solution = sol; to_sign.push_back(sol); } tx->inputs.push_back(in); } } const auto id = tx->calc_hash(); for(const auto& sol : to_sign) { sol->signature = MPL.Sign(skey_map[sol->pubkey].to_bls(), bls::Bytes(id.bytes.data(), id.bytes.size())); } block->tx_list.push_back(tx); } block->finalize(); std::cout << "Block: hash=" << block->hash << " ntx=" << block->tx_list.size() << std::endl; process(block); prev = block; } for(int b = 0; b < num_blocks; ++b) { auto block = Block::create(); block->prev = prev->hash; for(const auto& entry : utxo_map) { auto tx = Transaction::create(); std::vector> to_sign; for(const auto& utxo : entry.second) { const auto dst_addr = addrs[rand() % addrs.size()]; { tx_out_t out; out.address = dst_addr; out.amount = utxo.second.amount; tx->outputs.push_back(out); } { tx_in_t in; in.prev_tx = entry.first; in.index = utxo.first; { auto sol = solution::PubKey::create(); sol->pubkey = pubkey_map[utxo.second.address]; in.solution = sol; to_sign.push_back(sol); } tx->inputs.push_back(in); } } const auto id = tx->calc_hash(); for(const auto& sol : to_sign) { sol->signature = MPL.Sign(skey_map[sol->pubkey].to_bls(), bls::Bytes(id.bytes.data(), id.bytes.size())); } block->tx_list.push_back(tx); } block->finalize(); std::cout << "Block: hash=" << block->hash << " ntx=" << block->tx_list.size() << std::endl; process(block); prev = block; } std::cout << "total_tx_count = " << total_tx_count << std::endl; std::cout << "total_verify_time = " << total_verify_time / 1000 << " ms" << std::endl; std::cout << "total_process_time = " << total_process_time / 1000 << " ms" << std::endl; std::cout << "tps = " << 1e6 / (total_process_time / total_tx_count) << std::endl; vnx::close(); return 0; } ================================================ FILE: test/test_write_bytes_vitest_gen.cpp ================================================ #include #include #include using namespace mmx; template void static print_test(const std::string& testname, const T& value, const std::string& jsvalue) { std::vector buffer; vnx::VectorOutputStream stream(&buffer); vnx::OutputBuffer out(&stream); write_field(out, "field_name", value); out.flush(); const auto cppHex = vnx::to_hex_string(buffer.data(), buffer.size()); const auto test = "it(\"" + testname + "\", () => {\n" " const wb = new WriteBytes();\n" " wb.write_field(\"field_name\", " + jsvalue + ");\n" " const jsHex = wb.buffer.toHex();\n" " const cppHex = \"" + cppHex + "\";\n" " assert.equal(jsHex, cppHex);\n" "});"; std::cout << test << std::endl << std::endl; } int main(int argc, char** argv) { { const auto testname = "bool true"; constexpr auto value = true; const std::string jsvalue = "true"; print_test(testname, value, jsvalue); } { const auto testname = "bool false"; constexpr auto value = false; const std::string jsvalue = "false"; print_test(testname, value, jsvalue); } { const auto testname = "uint64_t"; constexpr auto value = (uint64_t)1337; const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } { const auto testname = "uint64_t min"; constexpr auto value = std::numeric_limits::min(); const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } { const auto testname = "uint64_t max"; constexpr auto value = std::numeric_limits::max(); const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } //{ // const auto testname = "uint32_t"; // const auto value = (uint32_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} //{ // const auto testname = "uint16_t"; // const auto value = (uint16_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} //{ // const auto testname = "uint8_t"; // const auto value = (uint16_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} { const auto testname = "int64_t"; constexpr auto value = (int64_t)1337; const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } { const auto testname = "int64_t min"; constexpr auto value = std::numeric_limits::min(); const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } { const auto testname = "int64_t max"; constexpr auto value = std::numeric_limits::max(); const std::string jsvalue = std::to_string(value) + "n"; print_test(testname, value, jsvalue); } //{ // const auto testname = "int32_t"; // const auto value = (int32_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} //{ // const auto testname = "int16_t"; // const auto value = (int16_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} //{ // const auto testname = "int8_t"; // const auto value = (int16_t)1337; // const std::string jsvalue = std::to_string(value); // print_test(testname, value, jsvalue); //} // TODO uint128 { const auto testname = "string"; const std::string value = "string"; const std::string jsvalue = "\"" + value + "\""; print_test(testname, value, jsvalue); } const auto test_vector = std::vector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; { const auto testname = "bytes_t"; const auto value = bytes_t<16>(test_vector); const std::string jsvalue = "new bytes_t(new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))"; print_test(testname, value, jsvalue); } { const auto testname = "bytes_t empty"; const auto value = bytes_t<0>(); const std::string jsvalue = "new bytes_t()"; print_test(testname, value, jsvalue); } { const auto testname = "bytes_t addr_t"; const auto value = addr_t("mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a"); const std::string jsvalue = "new addr_t(\"mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a\")"; print_test(testname, value, jsvalue); } { const auto testname = "vector"; const auto value = test_vector; const std::string jsvalue = "new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])"; print_test(testname, value, jsvalue); } { const auto testname = "vector string"; const auto value = std::vector{ "1337", "hello", "world"}; const std::string jsvalue = "[\"1337\", \"hello\", \"world\"]"; print_test(testname, value, jsvalue); } { const auto testname = "vector uint64_t"; const auto value = std::vector{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; const std::string jsvalue = "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]"; print_test(testname, value, jsvalue); } { const auto testname = "vector empty"; const auto value = std::vector{}; const std::string jsvalue = "new Uint8Array([])"; print_test(testname, value, jsvalue); } { const auto testname = "Variant empty"; const vnx::Variant value; const std::string jsvalue = "new Variant()"; print_test(testname, value, jsvalue); } { const auto testname = "Variant bool true"; const vnx::Variant value(true); const std::string jsvalue = "new Variant(true)"; print_test(testname, value, jsvalue); } { const auto testname = "Variant bool false"; const vnx::Variant value(false); const std::string jsvalue = "new Variant(false)"; print_test(testname, value, jsvalue); } { const auto testname = "Variant int"; const vnx::Variant value(255); const std::string jsvalue = "new Variant(255)"; print_test(testname, value, jsvalue); } { const auto testname = "Variant string"; const vnx::Variant value("1337"); const std::string jsvalue = "new Variant(\"1337\")"; print_test(testname, value, jsvalue); } { const auto testname = "Variant vector"; const vnx::Variant value(test_vector); const std::string jsvalue = "new Variant([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])"; print_test(testname, value, jsvalue); } { const auto testname = "Variant vnx::Object"; vnx::Object obj; obj["field1"] = "1337"; obj["field2"] = (uint64_t)1337; const vnx::Variant value(obj); const std::string jsvalue = "new Variant(new vnxObject({field1: \"1337\", field2: 1337}))"; print_test(testname, value, jsvalue); } { const auto testname = "vnx::Object"; vnx::Object value; value["field1"] = "1337"; value["field2"] = (uint64_t)1337; const std::string jsvalue = "new vnxObject({field1: \"1337\", field2: 1337})"; print_test(testname, value, jsvalue); } { const auto testname = "vnx::Object empty"; const vnx::Object value; const std::string jsvalue = "new vnxObject()"; print_test(testname, value, jsvalue); } { const auto testname = "txout_t"; txout_t value; value.address = addr_t("mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a"); value.contract = addr_t(); value.amount = 255; value.memo = "memo"; const std::string jsvalue = "new txout_t({address: \"mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a\", contract : \"mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev\", amount : 255,memo : \"memo\"})"; print_test(testname, value, jsvalue); } { const auto testname = "txin_t"; txin_t value; value.address = addr_t("mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a"); value.contract = addr_t(); value.amount = 255; value.memo = "memo"; value.solution = 255; value.flags = 255; const std::string jsvalue = "new txin_t({address: \"mmx1ckyz0x7fpet4y7zmckyg7lklp8dc5gdr2kjd8hamk49rnk8zu9eq2cnz7a\", contract : \"mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev\", amount : 255,memo : \"memo\", solution: 255, flags: 255 })"; print_test(testname, value, jsvalue); } // TODO ulong_fraction_t time_segment_t compile_flags_t method_t { const auto testname = "optional"; const auto value = vnx::optional>(test_vector); const std::string jsvalue = "new optional(new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]))"; print_test(testname, value, jsvalue); } { const auto testname = "optional nullptr"; const auto value = vnx::optional>(nullptr); const std::string jsvalue = "new optional(null)"; print_test(testname, value, jsvalue); } { const auto testname = "pair"; std::pair value("test1", 255); const std::string jsvalue = "new pair(\"test1\", 255)"; print_test(testname, value, jsvalue); } { const auto testname = "map"; std::map value = { {"test1", 255}, {"test2", 255} }; const std::string jsvalue = "new Map([ [\"test1\", 255], [\"test2\", 255] ])"; print_test(testname, value, jsvalue); } { const auto testname = "map empty"; std::map value = {}; const std::string jsvalue = "new Map([])"; print_test(testname, value, jsvalue); } } ================================================ FILE: test/vm/AFL/compile_all.sh ================================================ #!/bin/bash mmx_compile -f ../compiler_tests.js -o inputs/compiler_tests.js.dat mmx_compile -f ../engine_tests.js -o inputs/engine_tests.js.dat for file in ../fails/*.js; do echo "Compiling [$file]" mmx_compile -f $file -o inputs/${file}.dat done mv fails/*.dat inputs/ rmdir fails ================================================ FILE: test/vm/AFL/inputs/js/compiler_tests.js ================================================ null; { var test; if(test != null) { fail("empty var"); } } function test1(a, b = 1) { return a + b; } if(test1(1) != 2) { fail("test1"); } if(concat(to_string(1), to_string(2), to_string(3)) != "123") { fail("concat()", 1); } { var map = {}; if(map.test != null) { fail("map.test != null"); } } { var map = {}; map.tmp = 123; if(map.tmp != 123) { fail("var to key assignment"); } } { var map = {"test": 123}; const tmp = map.test; if(tmp != 123) { fail("key to var assignment"); } map.tmp = map.test; if(map.tmp != 123) { fail("key to key assignment"); } } if(balance() != 0) { fail("balance() != 0"); } if(balance(sha256("test")) != 0) { fail("balance(test) != 0"); } if(this.balance[bech32()] != 0) { fail("this.balance != 0"); } { var tmp = balance(); if(tmp != 0) { fail("balance() != 0"); } tmp = 1337; } { var tmp = this.balance[bech32()]; if(tmp != 0) { fail("this.balance != 0"); } tmp = 1337; } { var array = [1, 2, 3]; for(var entry of array) { entry = 0; } for(const entry of array) { if(entry == 0) { fail("var entry of array (integer)"); } } } { var array = ["1", "2", "3"]; for(var entry of array) { entry = "0"; } for(const entry of array) { if(entry == "0") { fail("var entry of array (string)"); } } } { var array = [[1], [2], [3]]; for(var entry of array) { entry = []; } for(const entry of array) { if(size(entry) == 0) { fail("var entry of array (array)"); } } } { var array = [{val: 1}, {val: 2}, {val: 3}]; for(var entry of array) { entry = {val: 0}; } for(const entry of array) { if(entry.val == 0) { fail("var entry of array (object)"); } } } { var obj = {key: "value"}; if(obj.key != "value") { fail("object key (1)"); } } { var obj = {"key": "value"}; if(obj.key != "value") { fail("object key (2)"); } } { var obj = {test: 123, key: "value"}; if(obj.key != "value") { fail("object key (3)"); } } { var obj = { key : "value" }; if(obj.key != "value") { fail("object key (4)"); } } { var obj = { key : "value" }; if(obj.key != "value") { fail("object key (5)"); } } { var obj = {_key_: "value"}; if(obj._key_ != "value") { fail("object _key_"); } } if(1337 / 16 != 83) { fail("1337 / 16 != 83"); } if(1337 % 16 != 9) { fail("1337 % 16 != 9"); } if(1337133713371337 / 1024 != 1305794641964) { fail("1337133713371337 / 1024 != 1305794641964"); } if(1337133713371337 % 1024 != 201) { fail("1337133713371337 % 1024 != 201"); } if(false) { fail("if(false)"); } if(!true) { fail("if(!true)"); } if(1 == 2) { fail("if(1 == 2)"); } if(1 != 1) { fail("if(1 != 1)"); } if(2 < 1) { fail("if(2 < 1)"); } if(1 > 2) { fail("if(1 > 2)"); } if(2 <= 1) { fail("if(2 <= 1)"); } if(1 >= 2) { fail("if(1 >= 2)"); } if(!(1 == 1)) { fail("if(!(1 == 1))"); } if((1 == 1) && (1 == 0)) { fail("if((1 == 1) && (1 == 0))"); } if((1 != 1) || (1 != 1)) { fail("if((1 != 1) || (1 != 1))"); } if(0) { fail("if(0)"); } if(null) { fail("if(null)"); } if("") { fail("if('')"); } if(!1337) { fail("if(!1337)"); } if(!"test") { fail("if(!'test')"); } if(!(true && 1337 && "test")) { fail("if(!(1 && true && 'test'))"); } if(0 || null || "") { fail("if(0 || null || '')"); } if(!(0 || null || 1)) { fail("if(!(null || null || 1))"); } { var cond = (1 > 2); if(cond) { fail("if(cond)"); } } { const cond = (1 > 2); if(cond) { fail("if(cond)"); } } ================================================ FILE: test/vm/AFL/inputs/js/engine_tests.js ================================================ {} { } if(false) { fail("false"); } if(!true) { fail("!"); } if(!(!false)) { fail("!!"); } if(true && false) { fail("true && false"); } if(false && true) { fail("false && true"); } if(!(true || false)) { fail("true || false"); } if(!(false || true)) { fail("false || true"); } if(!(true && true)) { fail("true && true"); } if(!(true || true)) { fail("true && true"); } if(false || false) { fail("false || false"); } if(false && false) { fail("false && false"); } if(false ^ false) { fail("false ^ false"); } if(true ^ true) { fail("true ^ true"); } if(!(false ^ true)) { fail("false ^ true"); } if(!(true ^ false)) { fail("false ^ true"); } if(true) { // pass } else { fail("else"); } if(false) { fail("else-if"); } else if(false) { fail("else-if"); } else if(false) { fail("else-if"); } else { // pass } if(null != null) { fail("null != null"); } if(null == 0) { fail("null == 0"); } if(null == false) { fail("null == false"); } if(null == true) { fail("null == true"); } if(null == "") { fail("null == ''"); } if(!(null == null)) { fail("!(null == null)"); } if(!(null != 0)) { fail("!(null != 0)"); } if(!(null != false)) { fail("!(null != false)"); } if(!(null != true)) { fail("!(null != true)"); } if(!(null != "")) { fail("!(null != '')"); } if(!(1 > 0)) { fail("1 > 0"); } if(!(1 >= 0)) { fail("1 >= 0"); } if(!(1 >= 1)) { fail("1 >= 1"); } if(!(0 < 1)) { fail("0 < 1"); } if(!(0 <= 1)) { fail("0 <= 1"); } if(!(1 <= 1)) { fail("1 <= 1"); } if((1 >> 0) != 1) { fail("1 >> 0"); } if((2 >> 1) != 1) { fail("2 >> 1"); } if((1 << 0) != 1) { fail("1 << 0"); } if((1 << 1) != 2) { fail("1 << 1"); } if(1 + 1 != 2) { fail("add", 1); } if(1 - 1 != 0) { fail("sub", 1); } if(1 * 1 != 1) { fail("mul", 1); } if(1337 * 1337 != 1787569) { fail("mul", 2); } if(18446744073709551615 * 18446744073709551615 != 340282366920938463426481119284349108225) { fail("mul", 3); } if(340282366920938463463374607431768211455 * 340282366920938463463374607431768211455 != 115792089237316195423570985008687907852589419931798687112530834793049593217025) { fail("mul", 4); } if(86605900701059233675071791330357447908204924955602516110289890806217748420 * 1337 != 115792089237316195423570985008687907853269984665640564039457584007913129637540) { fail("mul", 5); } if(3 / 2 != 1) { fail("div", 1); } if(13371337 / 1337 != 10001) { fail("div", 2); } if(340282366920938463463374607431768211455 / 1337 != 254511867554927796158096191048442940) { fail("div", 3); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 1337 != 86605900701059233675071791330357447908204924955602516110289890806217748421) { fail("div", 4); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 340282366920938463463374607431768211455 != 340282366920938463463374607431768211457) { fail("div", 5); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 86605900701059233675071791330357447908204924955602516110289890806217748420 != 1337) { fail("div", 6); } if((3 >> 0) != 3) { fail("3 >> 0"); } if(3 / 1 != 3) { fail(concat("div 3 / 1 => ", to_string(3 / 1))); } if(13371337 / 1024 != 13057) { fail("div 13371337 / 1024"); } for(var i = 1; i < 100; ++i) { if((11 * i) / i != 11) { fail(concat("div (11 * i) / i: ", to_string(i))); } } if(3 % 2 != 1) { fail("mod", 1); } if(13371337 % 1337 != 0) { fail("mod", 2); } if(340282366920938463463374607431768211455 % 1337 != 675) { fail("mod", 3); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 % 1337 != 1058) { fail("mod", 4); } if(3 % 1 != 0) { fail("mod 3 % 1"); } if(13371337 % 1024 != 969) { fail("mod 13371337 % 1024"); } for(var i = 1; i < 100; ++i) { if((11 * i) % i != 0) { fail(concat("mod (11 * i) % i: ", to_string(i))); } } if((0xFF00FF ^ 0xFF00FF) != 0) { fail("xor", 1); } if((0xFF00FF & 0xFFFFFF) != 0xFF00FF) { fail("and", 1); } if((0xFF00FF | 0) != 0xFF00FF) { fail("or", 1); } if((~0xFF00FF & 0xFFFFFF) != 0x00FF00) { fail("not", 1); } { var res = 0; for(var i = 0; i < 10; ++i) { res += 2; } if(res != 20) { fail("for", 1); } } { var res = 0; for(var i of [1, 2, 3]) { res += i; } if(res != 6) { fail("for", 2); } } if(0x100 != 256) { fail("hex", 1); } if(0b100 != 4) { fail("bin", 1); } if(uint("") != 0) { fail("uint('')"); } if(uint("0b01011101010001") != 0b01011101010001) { fail("uint(bin)", 1); } if(uint(111) != 111) { fail("uint(dec)", 1); } if(uint("111820312618873087563030836565815045174850059154595088905299609727287843170569") != 111820312618873087563030836565815045174850059154595088905299609727287843170569) { fail("uint(dec)", 2); } if(uint("0x0123456789ABCDEF") != 0x0123456789ABCDEF) { fail("uint(hex)", 1); } if(uint("0x0123456789abcdef") != 0x0123456789abcdef) { fail("uint(hex)", 2); } if(uint("0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7") != 0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7) { fail("uint(hex)", 3); } if(uint("0b1001") != 9) { fail("uint(bin)", 1); } if(bech32("mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev") != binary_hex("0000000000000000000000000000000000000000000000000000000000000000")) { fail("bech32", 1); } if(bech32("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") != binary_hex("09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7")) { fail("bech32", 2); } if(to_string_bech32(binary_hex("09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7")) != "mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") { fail("bech32", 3); } if(bech32("MMX") != bech32()) { fail("bech32", 4); } if(bech32() != binary_hex("0000000000000000000000000000000000000000000000000000000000000000")) { fail("bech32", 5); } if(bech32(null) != bech32()) { fail("bech32", 6); } if(to_string(1337) != "1337") { fail("to_string(1337)"); } if(to_string(18446744073709551615) != "18446744073709551615") { fail("to_string(18446744073709551615)"); } if(to_string(340282366920938463463374607431768211455) != "340282366920938463463374607431768211455") { fail("to_string(340282366920938463463374607431768211455)"); } if(to_string_hex(0x01234567ABCDE) != "1234567abcde") { fail("to_string_hex(0x01234567ABCDE)"); } if(to_string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) != "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") { fail("to_string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)"); } if(to_string_bech32(bech32("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf")) != "mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") { fail("to_string_bech32(mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf)"); } if(to_string(binary("ABCDEF")) != "ABCDEF") { fail("binary(ABCDEF)"); } if(to_string_hex(binary("AB")) != "4142") { fail("binary(AB)"); } if(to_string_hex(binary_hex("0123456789ABCDEF")) != "0123456789ABCDEF") { fail("binary_hex(0123456789ABCDEF)"); } if(to_string_hex(binary_hex("0x0123456789ABCDEF")) != "0123456789ABCDEF") { fail("binary_hex(0x0123456789ABCDEF)"); } if(concat("A", "BC", "D") != "ABCD") { fail("concat()", 1); } if(memcpy("ABC", 1) != "A") { fail(concat("memcpy(ABC, 1): '", memcpy("ABC", 1), "'")); } if(memcpy("ABC", 2, 1) != "BC") { fail("memcpy(ABC, 2, 1)"); } if(sha256("") != binary_hex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) { fail("sha256()", 1); } if(sha256("abc") != binary_hex("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad")) { fail("sha256()", 2); } if(ecdsa_verify( binary_hex("F3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"), binary_hex("02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E"), binary_hex("C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39")) != true) { fail("ecdsa_verify", 1); } if(ecdsa_verify( binary_hex("A3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"), binary_hex("02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E"), binary_hex("C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39")) != false) { fail("ecdsa_verify", 2); } if(size("123") != 3) { fail("size('123')"); } if(size(binary("123")) != 3) { fail("size(binary('123'))"); } if(min(1, 2, 3) != 1) { fail("min()"); } if(max(1, 2, 3) != 3) { fail("max()"); } if(typeof(null) != 0) { fail("typeof(null)"); } if(typeof(false) != 1) { fail("typeof(false)"); } if(typeof(true) != 2) { fail("typeof(true)"); } if(typeof(1) != 4) { fail("typeof(1)"); } if(typeof("") != 5) { fail("typeof('')"); } if(typeof(binary("")) != 6) { fail("typeof(binary)"); } if(typeof([]) != 7) { fail("typeof([])"); } if(typeof({}) != 8) { fail("typeof({})"); } if(deref(clone(1)) != 1) { fail("deref(clone(1)) != 1"); } if(bool(null) != false) { fail("bool(null)"); } if(bool(false) != false) { fail("bool(false)"); } if(bool(true) != true) { fail("bool(true)"); } if(bool(0) != false) { fail("bool(0)"); } if(bool(10) != true) { fail("bool(10)"); } if(bool("") != false) { fail("bool('')"); } if(bool("0") != true) { fail("bool('0')"); } if(bool(binary("")) != false) { fail("bool(binary(''))"); } if(bool(binary("0")) != true) { fail("bool(binary('0')"); } if(bool([]) != true) { fail("bool([])"); } if(bool({}) != true) { fail("bool({})"); } if(uint(null) != 0) { fail("uint(null)"); } if(uint(false) != 0) { fail("uint(false)"); } if(uint(true) != 1) { fail("uint(true)"); } if(uint_hex("aabbc") != 0xaabbc) { fail("uint_hex('aabbc')"); } if(uint(binary(0xABCDEF0)) != 0xABCDEF0) { fail("uint(binary(0xABCDEF0))"); } if(uint(binary(binary(0xABCDEF0))) != 0xABCDEF0) { fail("uint(binary(binary(0xABCDEF0)))"); } if(uint_le(binary_le(0xABCDEF0)) != 0xABCDEF0) { fail("uint_le(binary_le(0xABCDEF0))"); } if(bech32(binary(bech32("MMX"))) != bech32("MMX")) { fail("bech32(binary(bech32(MMX)))"); } if([] == []) { fail("[] == []"); } if({} == {}) { fail("[] == []"); } if(to_string("test") != "test") { fail("to_string(test)"); } __nop(); { var array = []; if(size(array) != 0) { fail("size(array) != 0"); } push(array, 11); if(array[0] != 11) { fail("array[0] != 11"); } if(size(array) != 1) { fail("size(array) != 1"); } array[0] = 12; { var tmp = clone(array); if(tmp[0] != 12) { fail("clone: array[0] != 12"); } pop(tmp); } if(pop(array) != 12) { fail("pop(array) != 12"); } if(size(array) != 0) { fail("size(array) != 0"); } if(array[35345345345] != null) { fail("array[35345345345] != null"); } } { var map = {}; if(map.field != null) { fail("map.field != null"); } map.field = 1337; if(get(map, "field") != 1337) { fail("map.field != 1337"); } map.field++; if(map.field != 1338) { fail("map.field != 1338"); } set(map, "field", 1339); { var tmp = clone(map); if(tmp.field != 1339) { fail("clone: tmp.field != 1339"); } erase(tmp, "field"); } if(map.field != 1339) { fail("map.field != 1339"); } erase(map, "field"); if(map.field != null) { fail("after erase: map.field != null"); } { var tmp = clone(map); if(tmp.field != null) { fail("clone: tmp.field != null"); } } } { var map = {}; map[0] = true; map[false] = true; map[true] = true; map["test"] = true; map[binary("bin123")] = true; var tmp0 = []; map[tmp0] = true; var tmp1 = {}; map[tmp1] = true; if(map[0] == null) { fail("map[0] == null"); } if(map[false] == null) { fail("map[false] == null"); } if(map[true] == null) { fail("map[true] == null"); } if(map["test"] == null) { fail("map['test'] == null"); } if(map[binary("bin123")] == null) { fail("map[bin123] == null"); } if(map[tmp0] == null) { fail("map[tmp0] == null"); } if(map[tmp1] == null) { fail("map[tmp1] == null"); } } { var test = { field: "value", "field1": 123 }; if(test.field != "value") { fail("test.field"); } if(test.field1 != 123) { fail("test.field1"); } var test2 = {}; test2.field = test.field; if(test2.field != test.field) { fail("test2.field"); } } { var test = null; if(test.field != null) { fail("null.field != null"); } } { var test = concat([1, 2], [3, 4], [5]); if(size(test) != 5) { fail("concat: size(test) != 5"); } for(var i = 0; i < 5; ++i) { if(test[i] != i + 1) { fail("test[i] != i + 1"); } } } { var test = { field: { field: 1337 } }; var test2 = test; test = null; if(test2.field.field != 1337) { fail("test2.field.field != 1337"); } } { var test = 1; delete(test); test = 1; if(test != 1) { fail("use after delete()"); } } { var test = [1, 2, 3]; pop(test); push(test, 4); if(test[2] != 4) { fail("test[2] != 4"); } } { var test = [1, 2, 3]; var test2 = deref(test); if(size(test2) != 3) { fail("size(test2) != 3"); } for(var i = 0; i < size(test2); ++i) { if(test2[i] != i + 1) { fail("test2[i] != i + 1"); } } pop(test2); pop(test2); if(size(test) != 3) { fail("size(test) != 3"); } for(var i = 0; i < size(test); ++i) { if(test[i] != i + 1) { fail("test[i] != i + 1"); } } } { var test = [null, true, false, 1, "test", [], {}]; if(test[0] != null) { fail("test[0] != null"); } if(test[1] != true) { fail("test[1] != true"); } if(test[2] != false) { fail("test[2] != false"); } if(test[3] != 1) { fail("test[3] != 1"); } if(test[4] != "test") { fail("test[4] != test"); } } { var map = {}; const key = bech32("mmx1cxn9nan8xyw3zflxheaf2c2mrzgexzp33j9rwqmxw7ed3ut09wqsr06jmq"); map[key] = 1337; if(map[key] != 1337) { fail("map[key] != 1337 (key = bech32())"); } } { const array = [1, 2, 3]; const tmp = array; push(tmp, 4); if(array[3] != 4) { fail("array[3] != 4"); } } { const object = {"foo": {}}; const foo = object.foo; foo.bar = true; if(object.foo.bar != true) { fail("object.foo.bar != true"); } } { const obj = {"foo": true}; delete(obj.foo); if(obj.foo != true) { fail("delete(): obj.foo != true"); } } { var map = {}; if(map[bech32()] == 0) { fail("map[bech32()] == 0"); } } { var obj = {test: "data"}; obj.ptr = obj; delete(obj); } { const A = {}; const B = {ptr: A}; A.ptr = B; } { var array = [1, 2, 3]; pop(array); if(array[2] != null) { fail("array[2] != null"); } if(array[1337] != null) { fail("array[1337] != null"); } } ================================================ FILE: test/vm/AFL/inputs/js/test_plot_nft.js ================================================ interface __test; interface plot_nft; const MMX = bech32(); const binary = __test.compile("src/contract/plot_nft.js"); const owner = "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"; const plot_nft_addr = plot_nft.__deploy({ __type: "mmx.contract.Executable", binary: binary, init_args: [owner] }); plot_nft.check_owner({__test: 1, user: owner}); plot_nft.check_owner({__test: 1, user: bech32(owner)}); plot_nft.check_owner({__test: 1, assert_fail: true}); __test.assert(plot_nft.is_locked() == false); __test.assert(__test.get_balance(plot_nft_addr, bech32()) == 0); const farmer = "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns"; __test.assert(plot_nft.mmx_reward_target(null) == owner); __test.assert(plot_nft.mmx_reward_target(farmer) == farmer); const pool_target = "mmx1uj2dth7r9tcn3vas42f0hzz74dkz8ygv59mpx44n7px7j7yhvv4sfmkf0d"; plot_nft.lock(pool_target, null, {__test: 1, user: owner}); __test.assert(plot_nft.is_locked() == true); __test.assert(plot_nft.mmx_reward_target(null) == pool_target); __test.assert(plot_nft.mmx_reward_target(farmer) == pool_target); plot_nft.set_server_url("http://pool.mmx.network", {__test: 1, user: owner}); const pool_wallet = "mmx13nf0pdarcfdm7tmxxlchnq9yw8gdvnymg5avfad04t5yqu7myewq6wkcqp"; __test.send(plot_nft_addr, 500000, MMX); plot_nft.claim_all(owner, MMX, {__test: 1, user: owner, assert_fail: true}); plot_nft.claim_all(pool_wallet, MMX, {__test: 1, user: pool_target}); __test.assert(__test.get_balance(pool_wallet, MMX) == 500000); plot_nft.unlock({__test: true, user: owner}); __test.assert(plot_nft.is_locked() == true); __test.inc_height(1); __test.assert(plot_nft.is_locked() == true); __test.inc_height(255); __test.assert(plot_nft.is_locked() == false); __test.assert(plot_nft.mmx_reward_target(null) == owner); __test.assert(plot_nft.mmx_reward_target(farmer) == farmer); const owner_wallet = "mmx1mlurm4px73xghkdn02u60qff4f795nnmt04e4as595tf4luvasmsggxmfk"; __test.send(plot_nft_addr, 500000, MMX); plot_nft.claim_all(owner_wallet, MMX, {__test: 1, user: owner}); plot_nft.claim_all(pool_wallet, MMX, {__test: 1, user: pool_target, assert_fail: true}); __test.assert(__test.get_balance(owner_wallet, MMX) == 500000); __test.inc_height(100); __test.assert(plot_nft.is_locked() == false); plot_nft.lock(pool_target, null, {__test: 1, user: owner}); __test.assert(plot_nft.is_locked() == true); __test.assert(plot_nft.mmx_reward_target(null) == pool_target); __test.assert(plot_nft.mmx_reward_target(farmer) == pool_target); __test.inc_height(100); __test.assert(plot_nft.is_locked() == true); const new_owner = "mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr"; plot_nft.transfer(new_owner, null, {__test: 1, user: owner}); plot_nft.unlock({__test: true, user: owner, assert_fail: true}); plot_nft.unlock({__test: true, user: new_owner}); ================================================ FILE: test/vm/AFL/inputs/json/engine_tests.js.json ================================================ {"__type": "mmx.contract.Binary", "version": 0, "name": "", "fields": [], "methods": [], "constant": [0, 1, 5, 5, 0, 0, 0, 102, 97, 108, 115, 101, 2, 5, 1, 0, 0, 0, 33, 5, 2, 0, 0, 0, 33, 33, 5, 13, 0, 0, 0, 116, 114, 117, 101, 32, 38, 38, 32, 102, 97, 108, 115, 101, 5, 13, 0, 0, 0, 102, 97, 108, 115, 101, 32, 38, 38, 32, 116, 114, 117, 101, 5, 13, 0, 0, 0, 116, 114, 117, 101, 32, 124, 124, 32, 102, 97, 108, 115, 101, 5, 13, 0, 0, 0, 102, 97, 108, 115, 101, 32, 124, 124, 32, 116, 114, 117, 101, 5, 12, 0, 0, 0, 116, 114, 117, 101, 32, 38, 38, 32, 116, 114, 117, 101, 5, 14, 0, 0, 0, 102, 97, 108, 115, 101, 32, 124, 124, 32, 102, 97, 108, 115, 101, 5, 14, 0, 0, 0, 102, 97, 108, 115, 101, 32, 38, 38, 32, 102, 97, 108, 115, 101, 5, 13, 0, 0, 0, 102, 97, 108, 115, 101, 32, 94, 32, 102, 97, 108, 115, 101, 5, 11, 0, 0, 0, 116, 114, 117, 101, 32, 94, 32, 116, 114, 117, 101, 5, 12, 0, 0, 0, 102, 97, 108, 115, 101, 32, 94, 32, 116, 114, 117, 101, 5, 4, 0, 0, 0, 101, 108, 115, 101, 5, 7, 0, 0, 0, 101, 108, 115, 101, 45, 105, 102, 5, 12, 0, 0, 0, 110, 117, 108, 108, 32, 33, 61, 32, 110, 117, 108, 108, 9, 0, 0, 5, 9, 0, 0, 0, 110, 117, 108, 108, 32, 61, 61, 32, 48, 5, 13, 0, 0, 0, 110, 117, 108, 108, 32, 61, 61, 32, 102, 97, 108, 115, 101, 5, 12, 0, 0, 0, 110, 117, 108, 108, 32, 61, 61, 32, 116, 114, 117, 101, 5, 0, 0, 0, 0, 5, 10, 0, 0, 0, 110, 117, 108, 108, 32, 61, 61, 32, 39, 39, 5, 15, 0, 0, 0, 33, 40, 110, 117, 108, 108, 32, 61, 61, 32, 110, 117, 108, 108, 41, 5, 12, 0, 0, 0, 33, 40, 110, 117, 108, 108, 32, 33, 61, 32, 48, 41, 5, 16, 0, 0, 0, 33, 40, 110, 117, 108, 108, 32, 33, 61, 32, 102, 97, 108, 115, 101, 41, 5, 15, 0, 0, 0, 33, 40, 110, 117, 108, 108, 32, 33, 61, 32, 116, 114, 117, 101, 41, 5, 13, 0, 0, 0, 33, 40, 110, 117, 108, 108, 32, 33, 61, 32, 39, 39, 41, 9, 1, 0, 5, 5, 0, 0, 0, 49, 32, 62, 32, 48, 5, 6, 0, 0, 0, 49, 32, 62, 61, 32, 48, 5, 6, 0, 0, 0, 49, 32, 62, 61, 32, 49, 5, 5, 0, 0, 0, 48, 32, 60, 32, 49, 5, 6, 0, 0, 0, 48, 32, 60, 61, 32, 49, 5, 6, 0, 0, 0, 49, 32, 60, 61, 32, 49, 5, 6, 0, 0, 0, 49, 32, 62, 62, 32, 48, 9, 2, 0, 5, 6, 0, 0, 0, 50, 32, 62, 62, 32, 49, 5, 6, 0, 0, 0, 49, 32, 60, 60, 32, 48, 5, 6, 0, 0, 0, 49, 32, 60, 60, 32, 49, 5, 3, 0, 0, 0, 97, 100, 100, 5, 3, 0, 0, 0, 115, 117, 98, 5, 3, 0, 0, 0, 109, 117, 108, 9, 57, 5, 10, 177, 70, 27, 0, 11, 255, 255, 255, 255, 255, 255, 255, 255, 12, 1, 0, 0, 0, 0, 0, 0, 0, 254, 255, 255, 255, 255, 255, 255, 255, 9, 3, 0, 12, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 13, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 9, 4, 0, 13, 196, 175, 186, 185, 230, 163, 232, 73, 110, 192, 171, 119, 7, 161, 111, 129, 60, 228, 24, 110, 201, 4, 31, 78, 168, 25, 74, 101, 103, 4, 49, 0, 13, 164, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 9, 5, 0, 5, 3, 0, 0, 0, 100, 105, 118, 10, 201, 7, 204, 0, 9, 17, 39, 12, 60, 228, 24, 110, 201, 4, 31, 78, 168, 25, 74, 101, 103, 4, 49, 0, 13, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 13, 197, 175, 186, 185, 230, 163, 232, 73, 110, 192, 171, 119, 7, 161, 111, 129, 60, 228, 24, 110, 201, 4, 31, 78, 168, 25, 74, 101, 103, 4, 49, 0, 13, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 6, 0, 5, 6, 0, 0, 0, 51, 32, 62, 62, 32, 48, 5, 13, 0, 0, 0, 100, 105, 118, 32, 51, 32, 47, 32, 49, 32, 61, 62, 32, 9, 0, 4, 9, 1, 51, 5, 19, 0, 0, 0, 100, 105, 118, 32, 49, 51, 51, 55, 49, 51, 51, 55, 32, 47, 32, 49, 48, 50, 52, 9, 100, 0, 9, 11, 0, 5, 18, 0, 0, 0, 100, 105, 118, 32, 40, 49, 49, 32, 42, 32, 105, 41, 32, 47, 32, 105, 58, 32, 5, 3, 0, 0, 0, 109, 111, 100, 9, 163, 2, 9, 34, 4, 5, 9, 0, 0, 0, 109, 111, 100, 32, 51, 32, 37, 32, 49, 9, 255, 3, 9, 201, 3, 5, 19, 0, 0, 0, 109, 111, 100, 32, 49, 51, 51, 55, 49, 51, 51, 55, 32, 37, 32, 49, 48, 50, 52, 5, 18, 0, 0, 0, 109, 111, 100, 32, 40, 49, 49, 32, 42, 32, 105, 41, 32, 37, 32, 105, 58, 32, 10, 255, 0, 255, 0, 5, 3, 0, 0, 0, 120, 111, 114, 10, 255, 255, 255, 0, 5, 3, 0, 0, 0, 97, 110, 100, 5, 2, 0, 0, 0, 111, 114, 9, 0, 255, 5, 3, 0, 0, 0, 110, 111, 116, 9, 10, 0, 9, 20, 0, 5, 3, 0, 0, 0, 102, 111, 114, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 1, 5, 3, 0, 0, 0, 104, 101, 120, 5, 3, 0, 0, 0, 98, 105, 110, 5, 8, 0, 0, 0, 117, 105, 110, 116, 40, 39, 39, 41, 5, 16, 0, 0, 0, 48, 98, 48, 49, 48, 49, 49, 49, 48, 49, 48, 49, 48, 48, 48, 49, 9, 81, 23, 5, 9, 0, 0, 0, 117, 105, 110, 116, 40, 98, 105, 110, 41, 9, 111, 0, 5, 9, 0, 0, 0, 117, 105, 110, 116, 40, 100, 101, 99, 41, 5, 78, 0, 0, 0, 49, 49, 49, 56, 50, 48, 51, 49, 50, 54, 49, 56, 56, 55, 51, 48, 56, 55, 53, 54, 51, 48, 51, 48, 56, 51, 54, 53, 54, 53, 56, 49, 53, 48, 52, 53, 49, 55, 52, 56, 53, 48, 48, 53, 57, 49, 53, 52, 53, 57, 53, 48, 56, 56, 57, 48, 53, 50, 57, 57, 54, 48, 57, 55, 50, 55, 50, 56, 55, 56, 52, 51, 49, 55, 48, 53, 54, 57, 13, 9, 41, 45, 119, 168, 223, 142, 121, 13, 70, 127, 69, 139, 41, 89, 28, 26, 251, 17, 240, 103, 108, 199, 171, 187, 119, 140, 96, 217, 13, 56, 247, 5, 18, 0, 0, 0, 48, 120, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 11, 239, 205, 171, 137, 103, 69, 35, 1, 5, 9, 0, 0, 0, 117, 105, 110, 116, 40, 104, 101, 120, 41, 5, 18, 0, 0, 0, 48, 120, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102, 5, 66, 0, 0, 0, 48, 120, 48, 57, 50, 57, 50, 68, 55, 55, 65, 56, 68, 70, 56, 69, 55, 57, 48, 68, 52, 54, 55, 70, 52, 53, 56, 66, 50, 57, 53, 57, 49, 67, 49, 65, 70, 66, 49, 49, 70, 48, 54, 55, 54, 67, 67, 55, 65, 66, 66, 66, 55, 55, 56, 67, 54, 48, 68, 57, 48, 68, 51, 56, 70, 55, 13, 247, 56, 13, 217, 96, 140, 119, 187, 171, 199, 108, 103, 240, 17, 251, 26, 28, 89, 41, 139, 69, 127, 70, 13, 121, 142, 223, 168, 119, 45, 41, 9, 5, 6, 0, 0, 0, 48, 98, 49, 48, 48, 49, 9, 9, 0, 5, 62, 0, 0, 0, 109, 109, 120, 49, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 100, 103, 121, 116, 101, 118, 5, 64, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 5, 6, 0, 0, 0, 98, 101, 99, 104, 51, 50, 5, 62, 0, 0, 0, 109, 109, 120, 49, 55, 117, 117, 113, 109, 107, 116, 113, 51, 51, 109, 109, 104, 50, 55, 56, 100, 51, 110, 108, 113, 121, 48, 109, 114, 103, 119, 57, 106, 50, 118, 116, 103, 52, 108, 53, 118, 114, 116, 101, 51, 109, 48, 54, 115, 97, 101, 100, 57, 121, 121, 115, 50, 113, 53, 104, 114, 102, 5, 64, 0, 0, 0, 48, 57, 50, 57, 50, 68, 55, 55, 65, 56, 68, 70, 56, 69, 55, 57, 48, 68, 52, 54, 55, 70, 52, 53, 56, 66, 50, 57, 53, 57, 49, 67, 49, 65, 70, 66, 49, 49, 70, 48, 54, 55, 54, 67, 67, 55, 65, 66, 66, 66, 55, 55, 56, 67, 54, 48, 68, 57, 48, 68, 51, 56, 70, 55, 5, 3, 0, 0, 0, 77, 77, 88, 6, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 49, 51, 51, 55, 5, 15, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 40, 49, 51, 51, 55, 41, 5, 20, 0, 0, 0, 49, 56, 52, 52, 54, 55, 52, 52, 48, 55, 51, 55, 48, 57, 53, 53, 49, 54, 49, 53, 5, 31, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 40, 49, 56, 52, 52, 54, 55, 52, 52, 48, 55, 51, 55, 48, 57, 53, 53, 49, 54, 49, 53, 41, 5, 39, 0, 0, 0, 51, 52, 48, 50, 56, 50, 51, 54, 54, 57, 50, 48, 57, 51, 56, 52, 54, 51, 52, 54, 51, 51, 55, 52, 54, 48, 55, 52, 51, 49, 55, 54, 56, 50, 49, 49, 52, 53, 53, 5, 50, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 40, 51, 52, 48, 50, 56, 50, 51, 54, 54, 57, 50, 48, 57, 51, 56, 52, 54, 51, 52, 54, 51, 51, 55, 52, 54, 48, 55, 52, 51, 49, 55, 54, 56, 50, 49, 49, 52, 53, 53, 41, 11, 222, 188, 122, 86, 52, 18, 0, 0, 5, 12, 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, 97, 98, 99, 100, 101, 5, 30, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 95, 104, 101, 120, 40, 48, 120, 48, 49, 50, 51, 52, 53, 54, 55, 65, 66, 67, 68, 69, 41, 13, 85, 184, 82, 120, 27, 153, 149, 164, 76, 147, 155, 100, 228, 65, 174, 39, 36, 185, 111, 153, 200, 244, 251, 154, 20, 28, 252, 152, 66, 196, 176, 227, 5, 64, 0, 0, 0, 101, 51, 98, 48, 99, 52, 52, 50, 57, 56, 102, 99, 49, 99, 49, 52, 57, 97, 102, 98, 102, 52, 99, 56, 57, 57, 54, 102, 98, 57, 50, 52, 50, 55, 97, 101, 52, 49, 101, 52, 54, 52, 57, 98, 57, 51, 52, 99, 97, 52, 57, 53, 57, 57, 49, 98, 55, 56, 53, 50, 98, 56, 53, 53, 5, 81, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 95, 104, 101, 120, 40, 48, 120, 101, 51, 98, 48, 99, 52, 52, 50, 57, 56, 102, 99, 49, 99, 49, 52, 57, 97, 102, 98, 102, 52, 99, 56, 57, 57, 54, 102, 98, 57, 50, 52, 50, 55, 97, 101, 52, 49, 101, 52, 54, 52, 57, 98, 57, 51, 52, 99, 97, 52, 57, 53, 57, 57, 49, 98, 55, 56, 53, 50, 98, 56, 53, 53, 41, 5, 80, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 95, 98, 101, 99, 104, 51, 50, 40, 109, 109, 120, 49, 55, 117, 117, 113, 109, 107, 116, 113, 51, 51, 109, 109, 104, 50, 55, 56, 100, 51, 110, 108, 113, 121, 48, 109, 114, 103, 119, 57, 106, 50, 118, 116, 103, 52, 108, 53, 118, 114, 116, 101, 51, 109, 48, 54, 115, 97, 101, 100, 57, 121, 121, 115, 50, 113, 53, 104, 114, 102, 41, 5, 6, 0, 0, 0, 65, 66, 67, 68, 69, 70, 5, 14, 0, 0, 0, 98, 105, 110, 97, 114, 121, 40, 65, 66, 67, 68, 69, 70, 41, 5, 2, 0, 0, 0, 65, 66, 5, 4, 0, 0, 0, 52, 49, 52, 50, 5, 10, 0, 0, 0, 98, 105, 110, 97, 114, 121, 40, 65, 66, 41, 5, 16, 0, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 5, 28, 0, 0, 0, 98, 105, 110, 97, 114, 121, 95, 104, 101, 120, 40, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 41, 5, 30, 0, 0, 0, 98, 105, 110, 97, 114, 121, 95, 104, 101, 120, 40, 48, 120, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 41, 5, 1, 0, 0, 0, 65, 5, 2, 0, 0, 0, 66, 67, 5, 1, 0, 0, 0, 68, 5, 4, 0, 0, 0, 65, 66, 67, 68, 5, 8, 0, 0, 0, 99, 111, 110, 99, 97, 116, 40, 41, 5, 3, 0, 0, 0, 65, 66, 67, 5, 17, 0, 0, 0, 109, 101, 109, 99, 112, 121, 40, 65, 66, 67, 44, 32, 49, 41, 58, 32, 39, 5, 1, 0, 0, 0, 39, 5, 17, 0, 0, 0, 109, 101, 109, 99, 112, 121, 40, 65, 66, 67, 44, 32, 50, 44, 32, 49, 41, 5, 8, 0, 0, 0, 115, 104, 97, 50, 53, 54, 40, 41, 5, 3, 0, 0, 0, 97, 98, 99, 5, 64, 0, 0, 0, 98, 97, 55, 56, 49, 54, 98, 102, 56, 102, 48, 49, 99, 102, 101, 97, 52, 49, 52, 49, 52, 48, 100, 101, 53, 100, 97, 101, 50, 50, 50, 51, 98, 48, 48, 51, 54, 49, 97, 51, 57, 54, 49, 55, 55, 97, 57, 99, 98, 52, 49, 48, 102, 102, 54, 49, 102, 50, 48, 48, 49, 53, 97, 100, 5, 64, 0, 0, 0, 70, 51, 68, 54, 67, 55, 56, 49, 55, 48, 48, 49, 70, 52, 56, 57, 52, 54, 50, 55, 48, 67, 68, 48, 48, 67, 69, 49, 69, 65, 50, 49, 48, 53, 70, 52, 55, 48, 70, 54, 53, 68, 65, 54, 54, 67, 49, 70, 66, 67, 65, 65, 68, 69, 51, 69, 55, 67, 65, 66, 57, 54, 52, 65, 5, 66, 0, 0, 0, 48, 50, 48, 53, 52, 49, 57, 49, 68, 53, 49, 48, 51, 70, 55, 65, 48, 52, 66, 50, 69, 53, 66, 53, 51, 65, 70, 50, 53, 51, 65, 54, 52, 55, 54, 70, 49, 49, 68, 68, 67, 68, 66, 51, 66, 52, 49, 51, 52, 68, 55, 52, 67, 70, 68, 54, 52, 50, 57, 54, 57, 66, 48, 56, 50, 69, 5, 128, 0, 0, 0, 67, 48, 53, 70, 49, 51, 67, 56, 53, 66, 68, 68, 70, 66, 66, 48, 65, 49, 57, 56, 54, 57, 55, 70, 65, 65, 67, 54, 57, 55, 51, 65, 65, 48, 48, 56, 65, 65, 52, 53, 53, 52, 52, 70, 66, 55, 65, 66, 53, 56, 54, 66, 54, 51, 54, 52, 48, 53, 70, 55, 51, 70, 50, 49, 53, 50, 51, 55, 68, 53, 48, 56, 67, 54, 70, 65, 69, 57, 48, 67, 50, 52, 66, 69, 52, 50, 52, 53, 56, 52, 54, 52, 48, 70, 56, 50, 52, 56, 54, 52, 66, 54, 70, 70, 51, 70, 50, 66, 57, 57, 70, 66, 50, 49, 48, 52, 66, 66, 68, 53, 55, 52, 51, 69, 56, 69, 51, 57, 5, 12, 0, 0, 0, 101, 99, 100, 115, 97, 95, 118, 101, 114, 105, 102, 121, 5, 64, 0, 0, 0, 65, 51, 68, 54, 67, 55, 56, 49, 55, 48, 48, 49, 70, 52, 56, 57, 52, 54, 50, 55, 48, 67, 68, 48, 48, 67, 69, 49, 69, 65, 50, 49, 48, 53, 70, 52, 55, 48, 70, 54, 53, 68, 65, 54, 54, 67, 49, 70, 66, 67, 65, 65, 68, 69, 51, 69, 55, 67, 65, 66, 57, 54, 52, 65, 5, 3, 0, 0, 0, 49, 50, 51, 5, 11, 0, 0, 0, 115, 105, 122, 101, 40, 39, 49, 50, 51, 39, 41, 5, 19, 0, 0, 0, 115, 105, 122, 101, 40, 98, 105, 110, 97, 114, 121, 40, 39, 49, 50, 51, 39, 41, 41, 5, 5, 0, 0, 0, 109, 105, 110, 40, 41, 5, 5, 0, 0, 0, 109, 97, 120, 40, 41, 5, 12, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 110, 117, 108, 108, 41, 5, 13, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 102, 97, 108, 115, 101, 41, 5, 12, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 116, 114, 117, 101, 41, 5, 9, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 49, 41, 5, 10, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 39, 39, 41, 5, 14, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 98, 105, 110, 97, 114, 121, 41, 9, 7, 0, 5, 10, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 91, 93, 41, 8, 0, 0, 0, 0, 0, 0, 0, 0, 9, 8, 0, 5, 10, 0, 0, 0, 116, 121, 112, 101, 111, 102, 40, 123, 125, 41, 5, 20, 0, 0, 0, 100, 101, 114, 101, 102, 40, 99, 108, 111, 110, 101, 40, 49, 41, 41, 32, 33, 61, 32, 49, 5, 10, 0, 0, 0, 98, 111, 111, 108, 40, 110, 117, 108, 108, 41, 5, 11, 0, 0, 0, 98, 111, 111, 108, 40, 102, 97, 108, 115, 101, 41, 5, 10, 0, 0, 0, 98, 111, 111, 108, 40, 116, 114, 117, 101, 41, 5, 7, 0, 0, 0, 98, 111, 111, 108, 40, 48, 41, 5, 8, 0, 0, 0, 98, 111, 111, 108, 40, 49, 48, 41, 5, 8, 0, 0, 0, 98, 111, 111, 108, 40, 39, 39, 41, 5, 1, 0, 0, 0, 48, 5, 9, 0, 0, 0, 98, 111, 111, 108, 40, 39, 48, 39, 41, 5, 16, 0, 0, 0, 98, 111, 111, 108, 40, 98, 105, 110, 97, 114, 121, 40, 39, 39, 41, 41, 5, 16, 0, 0, 0, 98, 111, 111, 108, 40, 98, 105, 110, 97, 114, 121, 40, 39, 48, 39, 41, 5, 8, 0, 0, 0, 98, 111, 111, 108, 40, 91, 93, 41, 5, 8, 0, 0, 0, 98, 111, 111, 108, 40, 123, 125, 41, 5, 10, 0, 0, 0, 117, 105, 110, 116, 40, 110, 117, 108, 108, 41, 5, 11, 0, 0, 0, 117, 105, 110, 116, 40, 102, 97, 108, 115, 101, 41, 5, 10, 0, 0, 0, 117, 105, 110, 116, 40, 116, 114, 117, 101, 41, 5, 5, 0, 0, 0, 97, 97, 98, 98, 99, 10, 188, 171, 10, 0, 5, 17, 0, 0, 0, 117, 105, 110, 116, 95, 104, 101, 120, 40, 39, 97, 97, 98, 98, 99, 39, 41, 10, 240, 222, 188, 10, 5, 23, 0, 0, 0, 117, 105, 110, 116, 40, 98, 105, 110, 97, 114, 121, 40, 48, 120, 65, 66, 67, 68, 69, 70, 48, 41, 41, 5, 31, 0, 0, 0, 117, 105, 110, 116, 40, 98, 105, 110, 97, 114, 121, 40, 98, 105, 110, 97, 114, 121, 40, 48, 120, 65, 66, 67, 68, 69, 70, 48, 41, 41, 41, 5, 29, 0, 0, 0, 117, 105, 110, 116, 95, 108, 101, 40, 98, 105, 110, 97, 114, 121, 95, 108, 101, 40, 48, 120, 65, 66, 67, 68, 69, 70, 48, 41, 41, 5, 27, 0, 0, 0, 98, 101, 99, 104, 51, 50, 40, 98, 105, 110, 97, 114, 121, 40, 98, 101, 99, 104, 51, 50, 40, 77, 77, 88, 41, 41, 41, 5, 8, 0, 0, 0, 91, 93, 32, 61, 61, 32, 91, 93, 5, 4, 0, 0, 0, 116, 101, 115, 116, 5, 15, 0, 0, 0, 116, 111, 95, 115, 116, 114, 105, 110, 103, 40, 116, 101, 115, 116, 41, 5, 16, 0, 0, 0, 115, 105, 122, 101, 40, 97, 114, 114, 97, 121, 41, 32, 33, 61, 32, 48, 5, 14, 0, 0, 0, 97, 114, 114, 97, 121, 91, 48, 93, 32, 33, 61, 32, 49, 49, 5, 16, 0, 0, 0, 115, 105, 122, 101, 40, 97, 114, 114, 97, 121, 41, 32, 33, 61, 32, 49, 9, 12, 0, 5, 21, 0, 0, 0, 99, 108, 111, 110, 101, 58, 32, 97, 114, 114, 97, 121, 91, 48, 93, 32, 33, 61, 32, 49, 50, 5, 16, 0, 0, 0, 112, 111, 112, 40, 97, 114, 114, 97, 121, 41, 32, 33, 61, 32, 49, 50, 11, 65, 43, 191, 58, 8, 0, 0, 0, 5, 26, 0, 0, 0, 97, 114, 114, 97, 121, 91, 51, 53, 51, 52, 53, 51, 52, 53, 51, 52, 53, 93, 32, 33, 61, 32, 110, 117, 108, 108, 5, 5, 0, 0, 0, 102, 105, 101, 108, 100, 5, 17, 0, 0, 0, 109, 97, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 110, 117, 108, 108, 5, 17, 0, 0, 0, 109, 97, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 49, 51, 51, 55, 9, 58, 5, 5, 17, 0, 0, 0, 109, 97, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 49, 51, 51, 56, 9, 59, 5, 5, 24, 0, 0, 0, 99, 108, 111, 110, 101, 58, 32, 116, 109, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 49, 51, 51, 57, 5, 17, 0, 0, 0, 109, 97, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 49, 51, 51, 57, 5, 30, 0, 0, 0, 97, 102, 116, 101, 114, 32, 101, 114, 97, 115, 101, 58, 32, 109, 97, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 110, 117, 108, 108, 5, 24, 0, 0, 0, 99, 108, 111, 110, 101, 58, 32, 116, 109, 112, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 110, 117, 108, 108, 5, 6, 0, 0, 0, 98, 105, 110, 49, 50, 51, 5, 14, 0, 0, 0, 109, 97, 112, 91, 48, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 18, 0, 0, 0, 109, 97, 112, 91, 102, 97, 108, 115, 101, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 17, 0, 0, 0, 109, 97, 112, 91, 116, 114, 117, 101, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 19, 0, 0, 0, 109, 97, 112, 91, 39, 116, 101, 115, 116, 39, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 19, 0, 0, 0, 109, 97, 112, 91, 98, 105, 110, 49, 50, 51, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 17, 0, 0, 0, 109, 97, 112, 91, 116, 109, 112, 48, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 17, 0, 0, 0, 109, 97, 112, 91, 116, 109, 112, 49, 93, 32, 61, 61, 32, 110, 117, 108, 108, 5, 5, 0, 0, 0, 118, 97, 108, 117, 101, 5, 6, 0, 0, 0, 102, 105, 101, 108, 100, 49, 9, 123, 0, 5, 10, 0, 0, 0, 116, 101, 115, 116, 46, 102, 105, 101, 108, 100, 5, 11, 0, 0, 0, 116, 101, 115, 116, 46, 102, 105, 101, 108, 100, 49, 5, 11, 0, 0, 0, 116, 101, 115, 116, 50, 46, 102, 105, 101, 108, 100, 5, 18, 0, 0, 0, 110, 117, 108, 108, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 110, 117, 108, 108, 5, 23, 0, 0, 0, 99, 111, 110, 99, 97, 116, 58, 32, 115, 105, 122, 101, 40, 116, 101, 115, 116, 41, 32, 33, 61, 32, 53, 5, 16, 0, 0, 0, 116, 101, 115, 116, 91, 105, 93, 32, 33, 61, 32, 105, 32, 43, 32, 49, 5, 25, 0, 0, 0, 116, 101, 115, 116, 50, 46, 102, 105, 101, 108, 100, 46, 102, 105, 101, 108, 100, 32, 33, 61, 32, 49, 51, 51, 55, 5, 18, 0, 0, 0, 117, 115, 101, 32, 97, 102, 116, 101, 114, 32, 100, 101, 108, 101, 116, 101, 40, 41, 5, 12, 0, 0, 0, 116, 101, 115, 116, 91, 50, 93, 32, 33, 61, 32, 52, 5, 16, 0, 0, 0, 115, 105, 122, 101, 40, 116, 101, 115, 116, 50, 41, 32, 33, 61, 32, 51, 5, 17, 0, 0, 0, 116, 101, 115, 116, 50, 91, 105, 93, 32, 33, 61, 32, 105, 32, 43, 32, 49, 5, 15, 0, 0, 0, 115, 105, 122, 101, 40, 116, 101, 115, 116, 41, 32, 33, 61, 32, 51, 5, 15, 0, 0, 0, 116, 101, 115, 116, 91, 48, 93, 32, 33, 61, 32, 110, 117, 108, 108, 5, 15, 0, 0, 0, 116, 101, 115, 116, 91, 49, 93, 32, 33, 61, 32, 116, 114, 117, 101, 5, 16, 0, 0, 0, 116, 101, 115, 116, 91, 50, 93, 32, 33, 61, 32, 102, 97, 108, 115, 101, 5, 12, 0, 0, 0, 116, 101, 115, 116, 91, 51, 93, 32, 33, 61, 32, 49, 5, 15, 0, 0, 0, 116, 101, 115, 116, 91, 52, 93, 32, 33, 61, 32, 116, 101, 115, 116, 5, 62, 0, 0, 0, 109, 109, 120, 49, 99, 120, 110, 57, 110, 97, 110, 56, 120, 121, 119, 51, 122, 102, 108, 120, 104, 101, 97, 102, 50, 99, 50, 109, 114, 122, 103, 101, 120, 122, 112, 51, 51, 106, 57, 114, 119, 113, 109, 120, 119, 55, 101, 100, 51, 117, 116, 48, 57, 119, 113, 115, 114, 48, 54, 106, 109, 113, 5, 33, 0, 0, 0, 109, 97, 112, 91, 107, 101, 121, 93, 32, 33, 61, 32, 49, 51, 51, 55, 32, 40, 107, 101, 121, 32, 61, 32, 98, 101, 99, 104, 51, 50, 40, 41, 41, 5, 13, 0, 0, 0, 97, 114, 114, 97, 121, 91, 51, 93, 32, 33, 61, 32, 52, 5, 3, 0, 0, 0, 102, 111, 111, 5, 3, 0, 0, 0, 98, 97, 114, 5, 22, 0, 0, 0, 111, 98, 106, 101, 99, 116, 46, 102, 111, 111, 46, 98, 97, 114, 32, 33, 61, 32, 116, 114, 117, 101, 5, 25, 0, 0, 0, 100, 101, 108, 101, 116, 101, 40, 41, 58, 32, 111, 98, 106, 46, 102, 111, 111, 32, 33, 61, 32, 116, 114, 117, 101, 5, 18, 0, 0, 0, 109, 97, 112, 91, 98, 101, 99, 104, 51, 50, 40, 41, 93, 32, 61, 61, 32, 48, 5, 4, 0, 0, 0, 100, 97, 116, 97, 5, 3, 0, 0, 0, 112, 116, 114, 5, 16, 0, 0, 0, 97, 114, 114, 97, 121, 91, 50, 93, 32, 33, 61, 32, 110, 117, 108, 108, 5, 19, 0, 0, 0, 97, 114, 114, 97, 121, 91, 49, 51, 51, 55, 93, 32, 33, 61, 32, 110, 117, 108, 108], "binary": [1, 228, 1, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 196, 0, 0, 0, 97, 0, 0, 0, 160, 0, 0, 0, 52, 1, 0, 8, 30, 0, 0, 0, 3, 0, 0, 0, 53, 1, 0, 8, 2, 0, 0, 0, 130, 2, 0, 0, 196, 2, 0, 0, 5, 0, 0, 0, 19, 0, 0, 0, 54, 1, 0, 8, 1, 0, 0, 0, 55, 1, 0, 8, 133, 1, 0, 0, 56, 1, 0, 8, 8, 0, 0, 0, 49, 0, 0, 0, 4, 0, 0, 0, 38, 0, 0, 0, 58, 1, 0, 8, 131, 1, 0, 0, 62, 1, 0, 8, 206, 0, 0, 0, 57, 1, 0, 8, 64, 0, 0, 0, 60, 1, 0, 8, 90, 0, 0, 0, 168, 0, 0, 0, 63, 1, 0, 8, 45, 0, 0, 0, 61, 1, 0, 8, 96, 0, 0, 0, 59, 1, 0, 8, 64, 1, 0, 8, 32, 32, 0, 0, 52, 0, 0, 0, 137, 0, 0, 8, 10, 0, 0, 0, 65, 1, 0, 8, 129, 2, 0, 0, 115, 0, 0, 8, 7, 0, 0, 0, 98, 0, 0, 0, 136, 0, 0, 8, 138, 0, 0, 8, 161, 6, 0, 0, 127, 0, 0, 8, 23, 0, 0, 0, 128, 2, 0, 0, 55, 0, 0, 0, 56, 0, 0, 0, 80, 0, 0, 0, 34, 32, 0, 0, 139, 0, 0, 8, 50, 0, 0, 0, 65, 0, 0, 0, 66, 0, 0, 0, 67, 0, 0, 0, 112, 0, 0, 0, 190, 0, 0, 0, 247, 0, 0, 0, 134, 2, 0, 0, 35, 32, 0, 0, 66, 1, 0, 8, 67, 1, 0, 8, 44, 0, 0, 0, 60, 0, 0, 0, 69, 0, 0, 0, 70, 0, 0, 0, 113, 0, 0, 0, 7, 4, 0, 0, 17, 0, 0, 0, 57, 0, 0, 0, 63, 0, 0, 0, 72, 0, 0, 0, 99, 0, 0, 0, 116, 0, 0, 0, 201, 0, 0, 0, 3, 2, 0, 0, 36, 32, 0, 0, 71, 32, 0, 0, 113, 0, 0, 8, 114, 0, 0, 8, 116, 0, 0, 8, 117, 0, 0, 8, 118, 0, 0, 8, 119, 0, 0, 8, 120, 0, 0, 8, 121, 0, 0, 8, 128, 0, 0, 8, 129, 0, 0, 8, 130, 0, 0, 8, 131, 0, 0, 8, 132, 0, 0, 8, 133, 0, 0, 8, 140, 0, 0, 8, 141, 0, 0, 8, 202, 0, 0, 8, 203, 0, 0, 8, 204, 0, 0, 8, 225, 0, 0, 8, 227, 0, 0, 8, 68, 1, 0, 8, 69, 1, 0, 8, 12, 0, 0, 0, 47, 0, 0, 0, 68, 0, 0, 0, 82, 0, 0, 0, 100, 0, 0, 0, 101, 0, 0, 0, 102, 0, 0, 0, 104, 0, 0, 0, 115, 0, 0, 0, 135, 0, 0, 0, 143, 0, 0, 0, 153, 0, 0, 0, 163, 0, 0, 0, 164, 0, 0, 0, 211, 0, 0, 0, 232, 0, 0, 0, 248, 0, 0, 0, 253, 0, 0, 0, 71, 4, 0, 0, 162, 12, 0, 0, 66, 32, 0, 0, 15, 0, 0, 0, 22, 0, 0, 0, 28, 0, 0, 0, 34, 0, 0, 0, 40, 0, 0, 0, 46, 0, 0, 0, 51, 0, 0, 0, 53, 0, 0, 0, 74, 0, 0, 0, 77, 0, 0, 0, 78, 0, 0, 0, 86, 0, 0, 0, 87, 0, 0, 0, 89, 0, 0, 0, 91, 0, 0, 0, 93, 0, 0, 0, 103, 0, 0, 0, 105, 0, 0, 0, 109, 0, 0, 0, 111, 0, 0, 0, 114, 0, 0, 0, 117, 0, 0, 0, 121, 0, 0, 0, 125, 0, 0, 0, 127, 0, 0, 0, 129, 0, 0, 0, 130, 0, 0, 0, 133, 0, 0, 0, 137, 0, 0, 0, 138, 0, 0, 0, 139, 0, 0, 0, 141, 0, 0, 0, 145, 0, 0, 0, 147, 0, 0, 0, 149, 0, 0, 0, 151, 0, 0, 0, 152, 0, 0, 0, 155, 0, 0, 0, 157, 0, 0, 0, 161, 0, 0, 0, 165, 0, 0, 0, 169, 0, 0, 0, 173, 0, 0, 0, 177, 0, 0, 0, 178, 0, 0, 0, 181, 0, 0, 0, 185, 0, 0, 0, 189, 0, 0, 0, 193, 0, 0, 0, 195, 0, 0, 0, 197, 0, 0, 0, 198, 0, 0, 0, 205, 0, 0, 0, 209, 0, 0, 0, 213, 0, 0, 0, 216, 0, 0, 0, 217, 0, 0, 0, 221, 0, 0, 0, 224, 0, 0, 0, 225, 0, 0, 0, 226, 0, 0, 0, 228, 0, 0, 0, 233, 0, 0, 0, 242, 0, 0, 0, 244, 0, 0, 0, 252, 0, 0, 0, 132, 1, 0, 0, 2, 2, 0, 0, 70, 4, 0, 0, 7, 10, 0, 0, 0, 0, 0, 8, 1, 0, 0, 8, 2, 0, 0, 8, 3, 0, 0, 8, 4, 0, 0, 8, 5, 0, 0, 8, 6, 0, 0, 8, 7, 0, 0, 8, 8, 0, 0, 8, 9, 0, 0, 8, 10, 0, 0, 8, 11, 0, 0, 8, 12, 0, 0, 8, 13, 0, 0, 8, 14, 0, 0, 8, 15, 0, 0, 8, 16, 0, 0, 8, 17, 0, 0, 8, 18, 0, 0, 8, 19, 0, 0, 8, 20, 0, 0, 8, 21, 0, 0, 8, 22, 0, 0, 8, 23, 0, 0, 8, 24, 0, 0, 8, 25, 0, 0, 8, 26, 0, 0, 8, 27, 0, 0, 8, 28, 0, 0, 8, 29, 0, 0, 8, 30, 0, 0, 8, 31, 0, 0, 8, 32, 0, 0, 8, 33, 0, 0, 8, 34, 0, 0, 8, 35, 0, 0, 8, 36, 0, 0, 8, 37, 0, 0, 8, 38, 0, 0, 8, 39, 0, 0, 8, 40, 0, 0, 8, 41, 0, 0, 8, 42, 0, 0, 8, 43, 0, 0, 8, 44, 0, 0, 8, 45, 0, 0, 8, 46, 0, 0, 8, 47, 0, 0, 8, 48, 0, 0, 8, 49, 0, 0, 8, 50, 0, 0, 8, 51, 0, 0, 8, 52, 0, 0, 8, 53, 0, 0, 8, 54, 0, 0, 8, 55, 0, 0, 8, 56, 0, 0, 8, 57, 0, 0, 8, 58, 0, 0, 8, 59, 0, 0, 8, 60, 0, 0, 8, 61, 0, 0, 8, 62, 0, 0, 8, 63, 0, 0, 8, 64, 0, 0, 8, 65, 0, 0, 8, 66, 0, 0, 8, 67, 0, 0, 8, 68, 0, 0, 8, 69, 0, 0, 8, 70, 0, 0, 8, 71, 0, 0, 8, 72, 0, 0, 8, 73, 0, 0, 8, 74, 0, 0, 8, 75, 0, 0, 8, 76, 0, 0, 8, 77, 0, 0, 8, 78, 0, 0, 8, 79, 0, 0, 8, 80, 0, 0, 8, 81, 0, 0, 8, 82, 0, 0, 8, 83, 0, 0, 8, 84, 0, 0, 8, 85, 0, 0, 8, 86, 0, 0, 8, 87, 0, 0, 8, 88, 0, 0, 8, 89, 0, 0, 8, 90, 0, 0, 8, 91, 0, 0, 8, 92, 0, 0, 8, 93, 0, 0, 8, 94, 0, 0, 8, 95, 0, 0, 8, 96, 0, 0, 8, 97, 0, 0, 8, 98, 0, 0, 8, 99, 0, 0, 8, 100, 0, 0, 8, 101, 0, 0, 8, 102, 0, 0, 8, 103, 0, 0, 8, 104, 0, 0, 8, 105, 0, 0, 8, 106, 0, 0, 8, 107, 0, 0, 8, 108, 0, 0, 8, 109, 0, 0, 8, 110, 0, 0, 8, 111, 0, 0, 8, 112, 0, 0, 8, 122, 0, 0, 8, 123, 0, 0, 8, 124, 0, 0, 8, 125, 0, 0, 8, 126, 0, 0, 8, 134, 0, 0, 8, 135, 0, 0, 8, 142, 0, 0, 8, 143, 0, 0, 8, 144, 0, 0, 8, 145, 0, 0, 8, 146, 0, 0, 8, 147, 0, 0, 8, 148, 0, 0, 8, 149, 0, 0, 8, 150, 0, 0, 8, 151, 0, 0, 8, 152, 0, 0, 8, 153, 0, 0, 8, 154, 0, 0, 8, 155, 0, 0, 8, 156, 0, 0, 8, 157, 0, 0, 8, 158, 0, 0, 8, 159, 0, 0, 8, 160, 0, 0, 8, 161, 0, 0, 8, 162, 0, 0, 8, 163, 0, 0, 8, 164, 0, 0, 8, 165, 0, 0, 8, 166, 0, 0, 8, 167, 0, 0, 8, 168, 0, 0, 8, 169, 0, 0, 8, 170, 0, 0, 8, 171, 0, 0, 8, 172, 0, 0, 8, 173, 0, 0, 8, 174, 0, 0, 8, 175, 0, 0, 8, 176, 0, 0, 8, 177, 0, 0, 8, 178, 0, 0, 8, 179, 0, 0, 8, 180, 0, 0, 8, 181, 0, 0, 8, 182, 0, 0, 8, 183, 0, 0, 8, 184, 0, 0, 8, 185, 0, 0, 8, 186, 0, 0, 8, 187, 0, 0, 8, 188, 0, 0, 8, 189, 0, 0, 8, 190, 0, 0, 8, 191, 0, 0, 8, 192, 0, 0, 8, 193, 0, 0, 8, 194, 0, 0, 8, 195, 0, 0, 8, 196, 0, 0, 8, 197, 0, 0, 8, 198, 0, 0, 8, 199, 0, 0, 8, 200, 0, 0, 8, 201, 0, 0, 8, 205, 0, 0, 8, 206, 0, 0, 8, 207, 0, 0, 8, 208, 0, 0, 8, 209, 0, 0, 8, 210, 0, 0, 8, 211, 0, 0, 8, 212, 0, 0, 8, 213, 0, 0, 8, 214, 0, 0, 8, 215, 0, 0, 8, 216, 0, 0, 8, 217, 0, 0, 8, 218, 0, 0, 8, 219, 0, 0, 8, 220, 0, 0, 8, 221, 0, 0, 8, 222, 0, 0, 8, 223, 0, 0, 8, 224, 0, 0, 8, 226, 0, 0, 8, 228, 0, 0, 8, 229, 0, 0, 8, 230, 0, 0, 8, 231, 0, 0, 8, 232, 0, 0, 8, 233, 0, 0, 8, 234, 0, 0, 8, 235, 0, 0, 8, 236, 0, 0, 8, 237, 0, 0, 8, 238, 0, 0, 8, 239, 0, 0, 8, 240, 0, 0, 8, 241, 0, 0, 8, 242, 0, 0, 8, 243, 0, 0, 8, 244, 0, 0, 8, 245, 0, 0, 8, 246, 0, 0, 8, 247, 0, 0, 8, 248, 0, 0, 8, 249, 0, 0, 8, 250, 0, 0, 8, 251, 0, 0, 8, 252, 0, 0, 8, 253, 0, 0, 8, 254, 0, 0, 8, 255, 0, 0, 8, 0, 1, 0, 8, 1, 1, 0, 8, 2, 1, 0, 8, 3, 1, 0, 8, 4, 1, 0, 8, 5, 1, 0, 8, 6, 1, 0, 8, 7, 1, 0, 8, 8, 1, 0, 8, 9, 1, 0, 8, 10, 1, 0, 8, 11, 1, 0, 8, 12, 1, 0, 8, 13, 1, 0, 8, 14, 1, 0, 8, 15, 1, 0, 8, 16, 1, 0, 8, 17, 1, 0, 8, 18, 1, 0, 8, 19, 1, 0, 8, 20, 1, 0, 8, 21, 1, 0, 8, 22, 1, 0, 8, 23, 1, 0, 8, 24, 1, 0, 8, 25, 1, 0, 8, 26, 1, 0, 8, 27, 1, 0, 8, 28, 1, 0, 8, 29, 1, 0, 8, 30, 1, 0, 8, 31, 1, 0, 8, 32, 1, 0, 8, 33, 1, 0, 8, 34, 1, 0, 8, 35, 1, 0, 8, 36, 1, 0, 8, 37, 1, 0, 8, 38, 1, 0, 8, 39, 1, 0, 8, 40, 1, 0, 8, 41, 1, 0, 8, 42, 1, 0, 8, 43, 1, 0, 8, 44, 1, 0, 8, 45, 1, 0, 8, 46, 1, 0, 8, 47, 1, 0, 8, 48, 1, 0, 8, 49, 1, 0, 8, 50, 1, 0, 8, 51, 1, 0, 8, 70, 1, 0, 8, 71, 1, 0, 8, 72, 1, 0, 8, 73, 1, 0, 8, 212, 3, 0, 0, 4, 199, 15, 12, 0, 1, 7, 199, 2, 9, 0, 4, 201, 7, 12, 0, 28, 200, 201, 1, 45, 200, 2, 21, 0, 4, 203, 15, 12, 0, 28, 202, 203, 28, 204, 202, 1, 108, 204, 2, 12, 0, 4, 206, 7, 12, 0, 4, 207, 15, 12, 0, 60, 205, 206, 207, 1, 75, 205, 2, 1, 0, 4, 209, 15, 12, 0, 4, 210, 7, 12, 0, 60, 208, 209, 210, 1, 130, 208, 2, 45, 0, 4, 212, 7, 12, 0, 4, 213, 15, 12, 0, 61, 211, 212, 213, 28, 214, 211, 1, 131, 214, 2, 19, 0, 4, 216, 15, 12, 0, 4, 217, 7, 12, 0, 61, 215, 216, 217, 28, 218, 215, 1, 132, 218, 2, 255, 9, 128, 0, 4, 220, 7, 12, 0, 4, 221, 7, 12, 0, 60, 219, 220, 221, 28, 222, 219, 1, 133, 222, 2, 41, 0, 4, 224, 7, 12, 0, 4, 225, 7, 12, 0, 61, 223, 224, 225, 28, 226, 223, 1, 134, 226, 2, 41, 0, 4, 228, 15, 12, 0, 4, 229, 15, 12, 0, 61, 227, 228, 229, 1, 135, 227, 2, 255, 11, 128, 0, 4, 231, 15, 12, 0, 4, 232, 15, 12, 0, 60, 230, 231, 232, 1, 54, 230, 2, 108, 0, 59, 233, 15, 15, 4, 234, 233, 12, 0, 1, 70, 234, 2, 255, 13, 128, 0, 59, 235, 7, 7, 4, 236, 235, 12, 0, 1, 28, 236, 2, 255, 14, 128, 0, 59, 237, 15, 7, 4, 239, 237, 12, 0, 28, 238, 239, 1, 71, 238, 2, 129, 0, 59, 240, 7, 15, 4, 242, 240, 12, 0, 28, 241, 242, 1, 137, 241, 2, 129, 0, 4, 243, 7, 12, 0, 1, 138, 243, 21, 139, 2, 255, 16, 128, 0, 4, 244, 15, 12, 0, 1, 111, 244, 2, 75, 0, 21, 30, 4, 245, 15, 12, 0, 1, 140, 245, 2, 75, 0, 21, 30, 4, 246, 15, 12, 0, 1, 30, 246, 2, 75, 0, 21, 30, 3, 247, 0, 0, 1, 144, 247, 2, 255, 18, 128, 0, 35, 248, 0, 13, 1, 35, 248, 2, 255, 20, 128, 0, 35, 249, 0, 15, 1, 79, 249, 2, 255, 21, 128, 0, 35, 250, 0, 7, 1, 114, 250, 2, 130, 0, 35, 251, 0, 51, 1, 146, 251, 2, 255, 24, 128, 0, 35, 252, 0, 0, 28, 253, 252, 1, 147, 253, 2, 255, 25, 128, 0, 3, 254, 0, 13, 28, 255, 0, 0, 254, 1, 73, 255, 0, 0, 2, 255, 26, 128, 0, 3, 255, 1, 0, 0, 15, 28, 255, 2, 0, 255, 1, 0, 1, 150, 255, 2, 0, 2, 255, 27, 128, 0, 3, 255, 3, 0, 0, 7, 28, 255, 4, 0, 255, 3, 0, 1, 151, 255, 4, 0, 2, 131, 0, 3, 255, 5, 0, 0, 51, 28, 255, 6, 0, 255, 5, 0, 1, 152, 255, 6, 0, 2, 255, 29, 128, 0, 79, 255, 7, 0, 6, 13, 28, 255, 8, 0, 255, 7, 0, 1, 154, 255, 8, 0, 2, 255, 31, 128, 0, 113, 255, 9, 0, 6, 13, 28, 255, 10, 0, 255, 9, 0, 1, 156, 255, 10, 0, 2, 255, 32, 128, 0, 113, 255, 11, 0, 6, 6, 28, 255, 12, 0, 255, 11, 0, 1, 157, 255, 12, 0, 2, 255, 33, 128, 0, 46, 255, 13, 0, 13, 6, 28, 255, 14, 0, 255, 13, 0, 1, 160, 255, 14, 0, 2, 132, 0, 112, 255, 15, 0, 13, 6, 28, 255, 16, 0, 255, 15, 0, 1, 161, 255, 16, 0, 2, 255, 35, 128, 0, 112, 255, 17, 0, 6, 6, 28, 255, 18, 0, 255, 17, 0, 1, 163, 255, 18, 0, 2, 255, 36, 128, 0, 126, 255, 19, 0, 6, 13, 3, 255, 20, 0, 255, 19, 0, 6, 1, 119, 255, 20, 0, 2, 255, 37, 128, 0, 126, 255, 21, 0, 22, 6, 3, 255, 22, 0, 255, 21, 0, 6, 1, 167, 255, 22, 0, 2, 255, 39, 128, 0, 197, 255, 23, 0, 6, 13, 3, 255, 24, 0, 255, 23, 0, 6, 1, 168, 255, 24, 0, 2, 133, 0, 197, 255, 25, 0, 6, 6, 3, 255, 26, 0, 255, 25, 0, 22, 1, 169, 255, 26, 0, 2, 255, 41, 128, 0, 38, 255, 27, 0, 6, 6, 3, 255, 28, 0, 255, 27, 0, 22, 1, 170, 255, 28, 0, 11, 255, 42, 128, 6, 255, 33, 160, 255, 29, 0, 6, 6, 3, 255, 30, 0, 255, 29, 0, 13, 1, 171, 255, 30, 0, 11, 255, 43, 128, 6, 56, 255, 31, 0, 6, 6, 3, 255, 32, 0, 255, 31, 0, 6, 1, 172, 255, 32, 0, 11, 69, 6, 56, 255, 33, 0, 33, 33, 3, 255, 34, 0, 255, 33, 0, 134, 1, 174, 255, 34, 0, 11, 69, 22, 56, 255, 35, 0, 109, 109, 3, 255, 36, 0, 255, 35, 0, 255, 48, 128, 1, 175, 255, 36, 0, 11, 69, 20, 56, 255, 37, 0, 58, 58, 3, 255, 38, 0, 255, 37, 0, 135, 1, 176, 255, 38, 0, 11, 69, 39, 56, 255, 39, 0, 136, 33, 3, 255, 40, 0, 255, 39, 0, 255, 54, 128, 1, 177, 255, 40, 0, 11, 69, 53, 84, 255, 41, 0, 20, 15, 3, 255, 42, 0, 255, 41, 0, 6, 1, 179, 255, 42, 0, 11, 54, 6, 66, 255, 43, 0, 76, 33, 3, 255, 44, 0, 255, 43, 0, 255, 58, 128, 1, 81, 255, 44, 0, 11, 54, 22, 66, 255, 45, 0, 58, 33, 3, 255, 46, 0, 255, 45, 0, 255, 59, 128, 1, 181, 255, 46, 0, 11, 54, 20, 66, 255, 47, 0, 70, 33, 3, 255, 48, 0, 255, 47, 0, 255, 61, 128, 1, 182, 255, 48, 0, 11, 54, 39, 66, 255, 49, 0, 70, 58, 3, 255, 50, 0, 255, 49, 0, 255, 62, 128, 1, 183, 255, 50, 0, 11, 54, 53, 66, 255, 51, 0, 70, 136, 3, 255, 52, 0, 255, 51, 0, 33, 1, 185, 255, 52, 0, 11, 54, 77, 126, 255, 53, 0, 20, 13, 3, 255, 54, 0, 255, 53, 0, 20, 1, 186, 255, 54, 0, 2, 28, 0, 84, 255, 55, 0, 20, 0, 3, 255, 56, 0, 255, 55, 0, 20, 1, 190, 255, 56, 0, 84, 44, 20, 0, 4, 86, 44, 45, 0, 49, 85, 59, 86, 2, 85, 0, 84, 85, 76, 41, 3, 86, 85, 61, 1, 123, 86, 2, 110, 0, 9, 44, 6, 46, 87, 44, 71, 1, 193, 87, 56, 88, 72, 44, 66, 89, 88, 44, 3, 90, 89, 72, 1, 192, 90, 4, 92, 44, 45, 0, 49, 91, 255, 71, 128, 92, 2, 91, 0, 38, 44, 44, 6, 21, 191, 128, 44, 20, 6, 3, 87, 44, 6, 1, 124, 87, 11, 78, 6, 83, 88, 76, 33, 3, 89, 88, 13, 1, 194, 89, 11, 78, 22, 83, 90, 58, 33, 3, 91, 90, 255, 73, 128, 1, 255, 0, 129, 91, 11, 78, 20, 83, 92, 70, 33, 3, 255, 57, 0, 92, 137, 1, 255, 4, 129, 255, 57, 0, 11, 78, 39, 128, 255, 58, 0, 20, 13, 3, 255, 59, 0, 255, 58, 0, 13, 1, 255, 8, 129, 255, 59, 0, 2, 255, 75, 128, 0, 128, 255, 60, 0, 76, 255, 76, 128, 3, 255, 61, 0, 255, 60, 0, 138, 1, 255, 12, 129, 255, 61, 0, 2, 139, 0, 9, 50, 6, 46, 93, 50, 71, 1, 255, 24, 129, 93, 56, 94, 72, 50, 83, 95, 94, 50, 3, 96, 95, 13, 1, 255, 22, 129, 96, 4, 98, 50, 45, 0, 49, 97, 255, 79, 128, 98, 2, 97, 0, 38, 50, 50, 6, 21, 255, 13, 129, 59, 50, 55, 55, 3, 93, 50, 13, 1, 255, 28, 129, 93, 11, 255, 81, 128, 6, 60, 94, 55, 111, 3, 95, 94, 55, 1, 255, 32, 129, 95, 11, 255, 83, 128, 6, 61, 96, 55, 13, 3, 97, 96, 55, 1, 255, 36, 129, 97, 11, 255, 84, 128, 6, 28, 98, 55, 60, 255, 62, 0, 98, 111, 3, 255, 63, 0, 255, 62, 0, 255, 85, 128, 1, 255, 41, 129, 255, 63, 0, 11, 140, 6, 9, 47, 13, 9, 40, 13, 46, 48, 40, 141, 1, 255, 48, 129, 48, 38, 47, 47, 22, 38, 40, 40, 6, 21, 255, 43, 129, 3, 40, 47, 255, 88, 128, 1, 255, 51, 129, 40, 11, 142, 6, 9, 47, 13, 9, 40, 0, 7, 48, 30, 17, 48, 6, 17, 48, 22, 17, 48, 20, 9, 57, 13, 43, 99, 48, 46, 100, 57, 99, 1, 255, 65, 129, 100, 10, 40, 48, 57, 38, 47, 47, 40, 38, 57, 57, 6, 21, 255, 59, 129, 3, 40, 47, 77, 1, 255, 68, 129, 40, 11, 142, 22, 3, 47, 143, 143, 1, 255, 71, 129, 47, 11, 255, 92, 128, 6, 3, 40, 39, 39, 1, 255, 74, 129, 40, 11, 144, 6, 4, 48, 51, 1, 0, 3, 57, 48, 13, 1, 255, 78, 129, 57, 2, 255, 94, 128, 0, 4, 99, 255, 95, 128, 1, 0, 3, 100, 99, 35, 1, 255, 82, 129, 100, 11, 3, 6, 4, 255, 64, 0, 46, 1, 0, 3, 255, 65, 0, 255, 64, 0, 46, 1, 255, 86, 129, 255, 65, 0, 11, 79, 6, 4, 255, 66, 0, 112, 1, 0, 3, 255, 67, 0, 255, 66, 0, 113, 1, 255, 90, 129, 255, 67, 0, 11, 79, 22, 4, 255, 68, 0, 114, 1, 0, 3, 255, 69, 0, 255, 68, 0, 145, 1, 255, 94, 129, 255, 69, 0, 11, 115, 6, 4, 255, 70, 0, 146, 1, 0, 3, 255, 71, 0, 255, 70, 0, 145, 1, 255, 98, 129, 255, 71, 0, 11, 115, 22, 4, 255, 72, 0, 255, 106, 128, 1, 0, 3, 255, 73, 0, 255, 72, 0, 255, 107, 128, 1, 255, 102, 129, 255, 73, 0, 11, 115, 20, 4, 255, 74, 0, 255, 108, 128, 1, 0, 3, 255, 75, 0, 255, 74, 0, 147, 1, 255, 106, 129, 255, 75, 0, 11, 3, 6, 4, 255, 76, 0, 255, 110, 128, 41, 0, 4, 255, 77, 0, 148, 19, 21, 3, 255, 78, 0, 255, 76, 0, 255, 77, 0, 1, 255, 111, 129, 255, 78, 0, 11, 62, 6, 4, 255, 79, 0, 73, 41, 0, 4, 255, 80, 0, 149, 19, 21, 3, 255, 81, 0, 255, 79, 0, 255, 80, 0, 1, 255, 116, 129, 255, 81, 0, 11, 62, 22, 4, 255, 83, 0, 149, 19, 21, 4, 255, 82, 0, 255, 83, 0, 198, 0, 3, 255, 84, 0, 255, 82, 0, 73, 1, 255, 121, 129, 255, 84, 0, 11, 62, 20, 4, 255, 85, 0, 116, 41, 0, 9, 255, 86, 0, 80, 3, 255, 87, 0, 255, 85, 0, 255, 86, 0, 1, 255, 126, 129, 255, 87, 0, 11, 62, 39, 9, 255, 88, 0, 80, 4, 255, 89, 0, 148, 19, 21, 3, 255, 90, 0, 255, 88, 0, 255, 89, 0, 1, 24, 255, 90, 0, 11, 62, 53, 4, 255, 91, 0, 0, 41, 0, 9, 255, 92, 0, 80, 3, 255, 93, 0, 255, 91, 0, 255, 92, 0, 1, 255, 136, 129, 255, 93, 0, 11, 62, 77, 4, 255, 94, 0, 33, 45, 0, 3, 255, 95, 0, 255, 94, 0, 150, 1, 255, 140, 129, 255, 95, 0, 2, 255, 118, 128, 0, 4, 255, 96, 0, 109, 45, 0, 3, 255, 97, 0, 255, 96, 0, 255, 119, 128, 1, 255, 144, 129, 255, 97, 0, 2, 255, 120, 128, 0, 4, 255, 98, 0, 58, 45, 0, 3, 255, 99, 0, 255, 98, 0, 151, 1, 255, 148, 129, 255, 99, 0, 2, 255, 122, 128, 0, 4, 255, 100, 0, 255, 123, 128, 74, 0, 3, 255, 101, 0, 255, 100, 0, 255, 124, 128, 1, 255, 152, 129, 255, 101, 0, 2, 152, 0, 4, 255, 102, 0, 255, 126, 128, 74, 0, 3, 255, 103, 0, 255, 102, 0, 153, 1, 255, 156, 129, 255, 103, 0, 2, 255, 128, 128, 0, 4, 255, 105, 0, 73, 41, 0, 4, 255, 104, 0, 255, 105, 0, 198, 0, 3, 255, 106, 0, 255, 104, 0, 73, 1, 255, 161, 129, 255, 106, 0, 2, 154, 0, 4, 255, 108, 0, 155, 19, 0, 4, 255, 107, 0, 255, 108, 0, 45, 0, 3, 255, 109, 0, 255, 107, 0, 155, 1, 255, 166, 129, 255, 109, 0, 2, 255, 131, 128, 0, 4, 255, 111, 0, 255, 132, 128, 19, 0, 4, 255, 110, 0, 255, 111, 0, 74, 0, 3, 255, 112, 0, 255, 110, 0, 156, 1, 255, 171, 129, 255, 112, 0, 2, 255, 134, 128, 0, 4, 255, 114, 0, 117, 19, 21, 4, 255, 113, 0, 255, 114, 0, 74, 0, 3, 255, 115, 0, 255, 113, 0, 117, 1, 255, 176, 129, 255, 115, 0, 2, 255, 136, 128, 0, 4, 255, 117, 0, 114, 19, 21, 4, 255, 116, 0, 255, 117, 0, 74, 0, 3, 255, 118, 0, 255, 116, 0, 117, 1, 255, 181, 129, 255, 118, 0, 2, 157, 0, 49, 255, 119, 0, 158, 159, 49, 255, 120, 0, 255, 119, 0, 255, 140, 128, 3, 255, 121, 0, 255, 120, 0, 160, 1, 255, 186, 129, 255, 121, 0, 11, 255, 142, 128, 6, 127, 255, 122, 0, 118, 6, 13, 3, 255, 123, 0, 255, 122, 0, 158, 1, 255, 193, 129, 255, 123, 0, 127, 102, 118, 6, 13, 49, 101, 255, 144, 128, 102, 49, 103, 101, 161, 2, 103, 0, 127, 101, 118, 22, 6, 3, 102, 101, 159, 1, 255, 197, 129, 102, 2, 255, 146, 128, 0, 120, 103, 51, 4, 255, 124, 0, 153, 19, 21, 3, 255, 125, 0, 103, 255, 124, 0, 1, 255, 202, 129, 255, 125, 0, 11, 162, 6, 120, 255, 126, 0, 255, 148, 128, 4, 255, 127, 0, 163, 19, 21, 3, 255, 128, 0, 255, 126, 0, 255, 127, 0, 1, 255, 207, 129, 255, 128, 0, 11, 162, 22, 4, 255, 130, 0, 255, 150, 128, 19, 21, 4, 255, 131, 0, 164, 19, 21, 4, 255, 132, 0, 165, 19, 21, 121, 255, 129, 0, 255, 130, 0, 255, 131, 0, 255, 132, 0, 3, 255, 133, 0, 255, 129, 0, 7, 1, 255, 214, 129, 255, 133, 0, 11, 119, 6, 4, 255, 135, 0, 255, 154, 128, 19, 21, 4, 255, 136, 0, 164, 19, 21, 4, 255, 137, 0, 165, 19, 21, 121, 255, 134, 0, 255, 135, 0, 255, 136, 0, 255, 137, 0, 3, 255, 138, 0, 255, 134, 0, 15, 1, 255, 221, 129, 255, 138, 0, 11, 119, 22, 43, 255, 139, 0, 166, 3, 255, 140, 0, 255, 139, 0, 20, 1, 255, 225, 129, 255, 140, 0, 2, 255, 156, 128, 0, 4, 255, 142, 0, 166, 19, 0, 43, 255, 141, 0, 255, 142, 0, 3, 255, 143, 0, 255, 141, 0, 20, 1, 255, 230, 129, 255, 143, 0, 2, 167, 0, 110, 104, 6, 22, 110, 104, 104, 20, 3, 255, 144, 0, 104, 6, 1, 255, 235, 129, 255, 144, 0, 2, 255, 158, 128, 0, 71, 105, 6, 22, 71, 105, 105, 20, 3, 255, 145, 0, 105, 20, 1, 255, 240, 129, 255, 145, 0, 2, 255, 159, 128, 0, 52, 255, 146, 0, 0, 3, 255, 147, 0, 255, 146, 0, 13, 1, 255, 244, 129, 255, 147, 0, 2, 4, 0, 52, 255, 148, 0, 15, 3, 255, 149, 0, 255, 148, 0, 6, 1, 255, 248, 129, 255, 149, 0, 2, 168, 0, 52, 255, 150, 0, 7, 3, 255, 151, 0, 255, 150, 0, 22, 1, 255, 252, 129, 255, 151, 0, 2, 255, 162, 128, 0, 52, 255, 152, 0, 6, 3, 255, 153, 0, 255, 152, 0, 39, 1, 255, 0, 130, 255, 153, 0, 2, 120, 0, 52, 255, 154, 0, 51, 3, 255, 155, 0, 255, 154, 0, 53, 1, 255, 4, 130, 255, 155, 0, 2, 121, 0, 4, 255, 157, 0, 51, 19, 0, 52, 255, 156, 0, 255, 157, 0, 3, 255, 158, 0, 255, 156, 0, 77, 1, 255, 9, 130, 255, 158, 0, 2, 169, 0, 7, 255, 160, 0, 30, 52, 255, 159, 0, 255, 160, 0, 3, 255, 161, 0, 255, 159, 0, 255, 166, 128, 1, 255, 14, 130, 255, 161, 0, 2, 255, 167, 128, 0, 7, 255, 163, 0, 31, 52, 255, 162, 0, 255, 163, 0, 3, 255, 164, 0, 255, 162, 0, 170, 1, 255, 19, 130, 255, 164, 0, 2, 255, 170, 128, 0, 82, 255, 166, 0, 6, 196, 255, 165, 0, 255, 166, 0, 3, 255, 167, 0, 255, 165, 0, 6, 1, 255, 24, 130, 255, 167, 0, 2, 255, 171, 128, 0, 4, 255, 168, 0, 0, 12, 0, 3, 255, 169, 0, 255, 168, 0, 15, 1, 255, 28, 130, 255, 169, 0, 2, 255, 172, 128, 0, 4, 255, 170, 0, 15, 12, 0, 3, 255, 171, 0, 255, 170, 0, 15, 1, 255, 32, 130, 255, 171, 0, 2, 171, 0, 4, 255, 172, 0, 7, 12, 0, 3, 255, 173, 0, 255, 172, 0, 7, 1, 255, 36, 130, 255, 173, 0, 2, 255, 174, 128, 0, 4, 255, 174, 0, 13, 12, 0, 3, 255, 175, 0, 255, 174, 0, 15, 1, 255, 40, 130, 255, 175, 0, 2, 255, 175, 128, 0, 4, 255, 176, 0, 141, 12, 0, 3, 255, 177, 0, 255, 176, 0, 7, 1, 255, 44, 130, 255, 177, 0, 2, 255, 176, 128, 0, 4, 255, 178, 0, 51, 12, 0, 3, 255, 179, 0, 255, 178, 0, 15, 1, 255, 48, 130, 255, 179, 0, 2, 172, 0, 4, 255, 180, 0, 173, 12, 0, 3, 255, 181, 0, 255, 180, 0, 7, 1, 255, 52, 130, 255, 181, 0, 2, 255, 179, 128, 0, 4, 255, 183, 0, 51, 19, 0, 4, 255, 182, 0, 255, 183, 0, 12, 0, 3, 255, 184, 0, 255, 182, 0, 15, 1, 255, 57, 130, 255, 184, 0, 2, 255, 180, 128, 0, 4, 255, 186, 0, 173, 19, 0, 4, 255, 185, 0, 255, 186, 0, 12, 0, 3, 255, 187, 0, 255, 185, 0, 7, 1, 255, 62, 130, 255, 187, 0, 2, 174, 0, 7, 255, 189, 0, 30, 4, 255, 188, 0, 255, 189, 0, 12, 0, 3, 255, 190, 0, 255, 188, 0, 7, 1, 255, 67, 130, 255, 190, 0, 2, 255, 182, 128, 0, 7, 255, 192, 0, 31, 4, 255, 191, 0, 255, 192, 0, 12, 0, 3, 255, 193, 0, 255, 191, 0, 7, 1, 255, 72, 130, 255, 193, 0, 2, 255, 183, 128, 0, 4, 255, 194, 0, 0, 1, 0, 3, 255, 195, 0, 255, 194, 0, 13, 1, 255, 76, 130, 255, 195, 0, 2, 255, 184, 128, 0, 4, 255, 196, 0, 15, 1, 0, 3, 255, 197, 0, 255, 196, 0, 13, 1, 255, 80, 130, 255, 197, 0, 2, 175, 0, 4, 255, 198, 0, 7, 1, 0, 3, 255, 199, 0, 255, 198, 0, 6, 1, 255, 84, 130, 255, 199, 0, 2, 255, 186, 128, 0, 4, 255, 200, 0, 255, 187, 128, 1, 21, 3, 255, 201, 0, 255, 200, 0, 255, 188, 128, 1, 255, 88, 130, 255, 201, 0, 2, 176, 0, 4, 255, 203, 0, 63, 19, 0, 4, 255, 202, 0, 255, 203, 0, 1, 0, 3, 255, 204, 0, 255, 202, 0, 63, 1, 255, 93, 130, 255, 204, 0, 2, 255, 191, 128, 0, 4, 255, 207, 0, 63, 19, 0, 4, 255, 206, 0, 255, 207, 0, 19, 0, 4, 255, 205, 0, 255, 206, 0, 1, 0, 3, 255, 208, 0, 255, 205, 0, 63, 1, 255, 99, 130, 255, 208, 0, 2, 255, 192, 128, 0, 4, 255, 210, 0, 63, 255, 8, 140, 0, 4, 255, 209, 0, 255, 210, 0, 1, 108, 3, 255, 211, 0, 255, 209, 0, 63, 1, 255, 104, 130, 255, 211, 0, 2, 177, 0, 4, 255, 214, 0, 116, 41, 0, 4, 255, 213, 0, 255, 214, 0, 19, 0, 4, 255, 212, 0, 255, 213, 0, 41, 0, 4, 255, 215, 0, 116, 41, 0, 3, 255, 216, 0, 255, 212, 0, 255, 215, 0, 1, 255, 111, 130, 255, 216, 0, 2, 255, 194, 128, 0, 7, 255, 217, 0, 30, 7, 255, 218, 0, 30, 35, 255, 219, 0, 255, 217, 0, 255, 218, 0, 1, 255, 116, 130, 255, 219, 0, 2, 178, 0, 7, 255, 220, 0, 31, 7, 255, 221, 0, 31, 35, 255, 222, 0, 255, 220, 0, 255, 221, 0, 1, 255, 121, 130, 255, 222, 0, 2, 178, 0, 4, 255, 223, 0, 2, 45, 0, 3, 255, 224, 0, 255, 223, 0, 2, 1, 255, 125, 130, 255, 224, 0, 2, 179, 0, 0, 7, 8, 30, 9, 5, 8, 43, 14, 5, 3, 16, 14, 13, 1, 255, 132, 130, 16, 2, 180, 0, 17, 5, 72, 10, 27, 5, 13, 3, 18, 27, 72, 1, 255, 137, 130, 18, 2, 255, 199, 128, 0, 43, 23, 5, 3, 36, 23, 6, 1, 255, 141, 130, 36, 2, 255, 200, 128, 0, 24, 5, 13, 81, 82, 34, 5, 9, 29, 34, 10, 32, 29, 13, 3, 25, 32, 81, 1, 255, 148, 130, 25, 2, 255, 202, 128, 0, 65, 37, 29, 65, 29, 5, 3, 34, 29, 81, 1, 255, 153, 130, 34, 2, 255, 203, 128, 0, 43, 25, 5, 3, 32, 25, 13, 1, 255, 157, 130, 32, 2, 180, 0, 10, 42, 5, 255, 204, 128, 3, 37, 42, 0, 1, 255, 161, 130, 37, 2, 181, 0, 7, 8, 31, 9, 5, 8, 10, 16, 5, 26, 3, 14, 16, 0, 1, 255, 167, 130, 14, 2, 255, 207, 128, 0, 24, 5, 26, 33, 10, 18, 5, 26, 3, 27, 18, 33, 1, 255, 172, 130, 27, 2, 255, 208, 128, 0, 10, 23, 5, 26, 38, 36, 23, 6, 24, 5, 26, 36, 10, 34, 5, 26, 3, 29, 34, 182, 1, 255, 179, 130, 29, 2, 255, 210, 128, 0, 24, 5, 26, 122, 82, 32, 5, 9, 25, 32, 10, 42, 25, 26, 3, 37, 42, 122, 1, 255, 186, 130, 37, 2, 255, 212, 128, 0, 195, 25, 26, 10, 32, 5, 26, 3, 25, 32, 122, 1, 255, 191, 130, 25, 2, 183, 0, 195, 5, 26, 10, 42, 5, 26, 3, 37, 42, 0, 1, 11, 37, 2, 255, 214, 128, 0, 82, 68, 5, 9, 67, 68, 10, 107, 67, 26, 3, 106, 107, 0, 1, 255, 202, 130, 106, 2, 255, 215, 128, 0, 7, 8, 31, 9, 5, 8, 24, 5, 13, 7, 24, 5, 15, 7, 24, 5, 7, 7, 24, 5, 2, 7, 4, 14, 184, 19, 0, 24, 5, 14, 7, 7, 18, 30, 9, 16, 18, 24, 5, 16, 7, 7, 23, 31, 9, 27, 23, 24, 5, 27, 7, 10, 29, 5, 13, 35, 36, 29, 0, 1, 255, 220, 130, 36, 2, 185, 0, 10, 25, 5, 15, 35, 34, 25, 0, 1, 255, 224, 130, 34, 2, 255, 218, 128, 0, 10, 37, 5, 7, 35, 32, 37, 0, 1, 255, 228, 130, 32, 2, 255, 219, 128, 0, 10, 67, 5, 2, 35, 42, 67, 0, 1, 255, 232, 130, 42, 2, 255, 220, 128, 0, 4, 68, 184, 19, 0, 10, 107, 5, 68, 35, 106, 107, 0, 1, 255, 237, 130, 106, 2, 186, 0, 10, 255, 226, 0, 5, 16, 35, 255, 225, 0, 255, 226, 0, 0, 1, 255, 241, 130, 255, 225, 0, 2, 255, 222, 128, 0, 10, 255, 228, 0, 5, 27, 35, 255, 227, 0, 255, 228, 0, 0, 1, 255, 245, 130, 255, 227, 0, 2, 255, 223, 128, 0, 7, 8, 31, 24, 8, 26, 187, 24, 8, 188, 189, 9, 5, 8, 10, 16, 5, 26, 3, 14, 16, 187, 1, 255, 253, 130, 14, 2, 255, 227, 128, 0, 10, 27, 5, 188, 3, 18, 27, 189, 1, 255, 1, 131, 18, 2, 190, 0, 7, 36, 31, 9, 23, 36, 10, 29, 5, 26, 24, 23, 26, 29, 10, 34, 5, 26, 10, 32, 23, 26, 3, 25, 32, 34, 1, 255, 10, 131, 25, 2, 255, 229, 128, 0, 9, 5, 0, 10, 14, 5, 26, 3, 8, 14, 0, 1, 255, 15, 131, 8, 2, 255, 230, 128, 0, 7, 8, 30, 17, 8, 6, 17, 8, 22, 7, 16, 30, 17, 16, 20, 17, 16, 39, 49, 14, 8, 16, 7, 27, 30, 17, 27, 53, 49, 18, 14, 27, 9, 5, 18, 43, 23, 5, 3, 36, 23, 53, 1, 255, 30, 131, 36, 2, 255, 231, 128, 0, 9, 29, 13, 46, 34, 29, 53, 1, 255, 40, 131, 34, 38, 25, 29, 6, 10, 37, 5, 29, 3, 32, 37, 25, 1, 255, 38, 131, 32, 2, 123, 0, 38, 29, 29, 6, 21, 255, 31, 131, 7, 8, 31, 7, 14, 31, 24, 14, 26, 33, 24, 8, 26, 14, 9, 5, 8, 9, 16, 5, 9, 5, 0, 10, 18, 16, 26, 10, 23, 18, 26, 3, 27, 23, 33, 1, 255, 52, 131, 27, 2, 191, 0, 9, 5, 6, 15, 5, 9, 5, 6, 3, 8, 5, 6, 1, 255, 58, 131, 8, 2, 255, 234, 128, 0, 7, 8, 30, 17, 8, 6, 17, 8, 22, 17, 8, 20, 9, 5, 8, 65, 14, 5, 17, 5, 39, 10, 18, 5, 22, 3, 16, 18, 39, 1, 255, 69, 131, 16, 2, 255, 235, 128, 0, 7, 8, 30, 17, 8, 6, 17, 8, 22, 17, 8, 20, 9, 5, 8, 196, 16, 5, 9, 14, 16, 43, 18, 14, 3, 27, 18, 20, 1, 255, 80, 131, 27, 2, 255, 236, 128, 0, 9, 23, 13, 43, 36, 14, 46, 29, 23, 36, 1, 255, 91, 131, 29, 38, 34, 23, 6, 10, 32, 14, 23, 3, 25, 32, 34, 1, 255, 89, 131, 25, 2, 255, 237, 128, 0, 38, 23, 23, 6, 21, 255, 81, 131, 65, 23, 14, 65, 36, 14, 43, 29, 5, 3, 34, 29, 20, 1, 255, 97, 131, 34, 2, 255, 238, 128, 0, 9, 25, 13, 43, 32, 5, 46, 37, 25, 32, 1, 255, 108, 131, 37, 38, 42, 25, 6, 10, 68, 5, 25, 3, 67, 68, 42, 1, 255, 106, 131, 67, 2, 123, 0, 38, 25, 25, 6, 21, 255, 98, 131, 7, 8, 30, 17, 8, 0, 17, 8, 7, 17, 8, 15, 17, 8, 6, 17, 8, 2, 7, 14, 30, 17, 8, 14, 7, 16, 31, 17, 8, 16, 9, 5, 8, 10, 27, 5, 13, 3, 18, 27, 0, 1, 255, 123, 131, 18, 2, 255, 239, 128, 0, 10, 36, 5, 6, 3, 23, 36, 7, 1, 255, 127, 131, 23, 2, 255, 240, 128, 0, 10, 34, 5, 22, 3, 29, 34, 15, 1, 255, 131, 131, 29, 2, 255, 241, 128, 0, 10, 32, 5, 20, 3, 25, 32, 6, 1, 255, 135, 131, 25, 2, 192, 0, 10, 42, 5, 39, 3, 37, 42, 2, 1, 255, 139, 131, 37, 2, 255, 243, 128, 0, 7, 8, 31, 9, 5, 8, 4, 16, 193, 41, 0, 9, 14, 16, 24, 5, 14, 33, 10, 27, 5, 14, 3, 18, 27, 33, 1, 255, 148, 131, 18, 2, 255, 245, 128, 0, 7, 8, 30, 17, 8, 6, 17, 8, 22, 17, 8, 20, 9, 5, 8, 9, 14, 5, 17, 14, 39, 10, 18, 5, 20, 3, 16, 18, 39, 1, 255, 159, 131, 16, 2, 255, 246, 128, 0, 7, 8, 31, 7, 14, 31, 24, 8, 64, 14, 9, 5, 8, 10, 16, 5, 64, 24, 16, 124, 7, 10, 18, 5, 64, 10, 23, 18, 124, 3, 27, 23, 7, 1, 255, 170, 131, 27, 2, 255, 249, 128, 0, 7, 8, 31, 24, 8, 64, 7, 9, 5, 8, 10, 14, 5, 64, 15, 14, 10, 18, 5, 64, 3, 16, 18, 7, 1, 255, 179, 131, 16, 2, 255, 250, 128, 0, 7, 8, 31, 9, 5, 8, 9, 14, 80, 10, 18, 5, 14, 35, 16, 18, 13, 1, 255, 186, 131, 16, 2, 255, 251, 128, 0, 7, 8, 31, 24, 8, 2, 194, 9, 5, 8, 24, 5, 125, 5, 15, 5, 7, 8, 31, 9, 5, 8, 7, 16, 31, 24, 16, 125, 5, 9, 14, 16, 24, 5, 125, 14, 7, 8, 30, 17, 8, 6, 17, 8, 22, 17, 8, 20, 9, 5, 8, 65, 14, 5, 10, 18, 5, 22, 3, 16, 18, 0, 1, 255, 207, 131, 16, 2, 255, 254, 128, 0, 10, 23, 5, 33, 3, 27, 23, 0, 1, 255, 211, 131, 27, 2, 255, 255, 128, 0, 19], "line_info": [], "source": "\n{}\n\n{\n}\n\nif(false) {\n\tfail(\"false\");\n}\nif(!true) {\n\tfail(\"!\");\n}\nif(!(!false)) {\n\tfail(\"!!\");\n}\nif(true && false) {\n\tfail(\"true && false\");\n}\nif(false && true) {\n\tfail(\"false && true\");\n}\nif(!(true || false)) {\n\tfail(\"true || false\");\n}\nif(!(false || true)) {\n\tfail(\"false || true\");\n}\nif(!(true && true)) {\n\tfail(\"true && true\");\n}\nif(!(true || true)) {\n\tfail(\"true && true\");\n}\nif(false || false) {\n\tfail(\"false || false\");\n}\nif(false && false) {\n\tfail(\"false && false\");\n}\nif(false ^ false) {\n\tfail(\"false ^ false\");\n}\nif(true ^ true) {\n\tfail(\"true ^ true\");\n}\nif(!(false ^ true)) {\n\tfail(\"false ^ true\");\n}\nif(!(true ^ false)) {\n\tfail(\"false ^ true\");\n}\nif(true) {\n\t// pass\n} else {\n\tfail(\"else\");\n}\nif(false) {\n\tfail(\"else-if\");\n} else if(false) {\n\tfail(\"else-if\");\n} else if(false) {\n\tfail(\"else-if\");\n} else {\n\t// pass\n}\n\nif(null != null) {\n\tfail(\"null != null\");\n}\nif(null == 0) {\n\tfail(\"null == 0\");\n}\nif(null == false) {\n\tfail(\"null == false\");\n}\nif(null == true) {\n\tfail(\"null == true\");\n}\nif(null == \"\") {\n\tfail(\"null == ''\");\n}\nif(!(null == null)) {\n\tfail(\"!(null == null)\");\n}\nif(!(null != 0)) {\n\tfail(\"!(null != 0)\");\n}\nif(!(null != false)) {\n\tfail(\"!(null != false)\");\n}\nif(!(null != true)) {\n\tfail(\"!(null != true)\");\n}\nif(!(null != \"\")) {\n\tfail(\"!(null != '')\");\n}\n\nif(!(1 > 0)) {\n\tfail(\"1 > 0\");\n}\nif(!(1 >= 0)) {\n\tfail(\"1 >= 0\");\n}\nif(!(1 >= 1)) {\n\tfail(\"1 >= 1\");\n}\nif(!(0 < 1)) {\n\tfail(\"0 < 1\");\n}\nif(!(0 <= 1)) {\n\tfail(\"0 <= 1\");\n}\nif(!(1 <= 1)) {\n\tfail(\"1 <= 1\");\n}\n\nif((1 >> 0) != 1) {\n\tfail(\"1 >> 0\");\n}\nif((2 >> 1) != 1) {\n\tfail(\"2 >> 1\");\n}\nif((1 << 0) != 1) {\n\tfail(\"1 << 0\");\n}\nif((1 << 1) != 2) {\n\tfail(\"1 << 1\");\n}\n\nif(1 + 1 != 2) {\n\tfail(\"add\", 1);\n}\nif(1 - 1 != 0) {\n\tfail(\"sub\", 1);\n}\n\nif(1 * 1 != 1) {\n\tfail(\"mul\", 1);\n}\nif(1337 * 1337 != 1787569) {\n\tfail(\"mul\", 2);\n}\nif(18446744073709551615 * 18446744073709551615 != 340282366920938463426481119284349108225) {\n\tfail(\"mul\", 3);\n}\nif(340282366920938463463374607431768211455 * 340282366920938463463374607431768211455 != 115792089237316195423570985008687907852589419931798687112530834793049593217025) {\n\tfail(\"mul\", 4);\n}\nif(86605900701059233675071791330357447908204924955602516110289890806217748420 * 1337 != 115792089237316195423570985008687907853269984665640564039457584007913129637540) {\n\tfail(\"mul\", 5);\n}\n\nif(3 / 2 != 1) {\n\tfail(\"div\", 1);\n}\nif(13371337 / 1337 != 10001) {\n\tfail(\"div\", 2);\n}\nif(340282366920938463463374607431768211455 / 1337 != 254511867554927796158096191048442940) {\n\tfail(\"div\", 3);\n}\nif(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 1337 != 86605900701059233675071791330357447908204924955602516110289890806217748421) {\n\tfail(\"div\", 4);\n}\nif(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 340282366920938463463374607431768211455 != 340282366920938463463374607431768211457) {\n\tfail(\"div\", 5);\n}\nif(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 86605900701059233675071791330357447908204924955602516110289890806217748420 != 1337) {\n\tfail(\"div\", 6);\n}\nif((3 >> 0) != 3) {\n\tfail(\"3 >> 0\");\n}\nif(3 / 1 != 3) {\n\tfail(concat(\"div 3 / 1 => \", to_string(3 / 1)));\n}\nif(13371337 / 1024 != 13057) {\n\tfail(\"div 13371337 / 1024\");\n}\nfor(var i = 1; i < 100; ++i) {\n\tif((11 * i) / i != 11) {\n\t\tfail(concat(\"div (11 * i) / i: \", to_string(i)));\n\t}\n}\n\nif(3 % 2 != 1) {\n\tfail(\"mod\", 1);\n}\nif(13371337 % 1337 != 0) {\n\tfail(\"mod\", 2);\n}\nif(340282366920938463463374607431768211455 % 1337 != 675) {\n\tfail(\"mod\", 3);\n}\nif(115792089237316195423570985008687907853269984665640564039457584007913129639935 % 1337 != 1058) {\n\tfail(\"mod\", 4);\n}\nif(3 % 1 != 0) {\n\tfail(\"mod 3 % 1\");\n}\nif(13371337 % 1024 != 969) {\n\tfail(\"mod 13371337 % 1024\");\n}\nfor(var i = 1; i < 100; ++i) {\n\tif((11 * i) % i != 0) {\n\t\tfail(concat(\"mod (11 * i) % i: \", to_string(i)));\n\t}\n}\n\nif((0xFF00FF ^ 0xFF00FF) != 0) {\n\tfail(\"xor\", 1);\n}\nif((0xFF00FF & 0xFFFFFF) != 0xFF00FF) {\n\tfail(\"and\", 1);\n}\nif((0xFF00FF | 0) != 0xFF00FF) {\n\tfail(\"or\", 1);\n}\nif((~0xFF00FF & 0xFFFFFF) != 0x00FF00) {\n\tfail(\"not\", 1);\n}\n\n{\n\tvar res = 0;\n\tfor(var i = 0; i < 10; ++i) {\n\t\tres += 2;\n\t}\n\tif(res != 20) {\n\t\tfail(\"for\", 1);\n\t}\n}\n{\n\tvar res = 0;\n\tfor(var i of [1, 2, 3]) {\n\t\tres += i;\n\t}\n\tif(res != 6) {\n\t\tfail(\"for\", 2);\n\t}\n}\n\nif(0x100 != 256) {\n\tfail(\"hex\", 1);\n}\nif(0b100 != 4) {\n\tfail(\"bin\", 1);\n}\nif(uint(\"\") != 0) {\n\tfail(\"uint('')\");\n}\nif(uint(\"0b01011101010001\") != 0b01011101010001) {\n\tfail(\"uint(bin)\", 1);\n}\nif(uint(111) != 111) {\n\tfail(\"uint(dec)\", 1);\n}\nif(uint(\"111820312618873087563030836565815045174850059154595088905299609727287843170569\") != 111820312618873087563030836565815045174850059154595088905299609727287843170569) {\n\tfail(\"uint(dec)\", 2);\n}\nif(uint(\"0x0123456789ABCDEF\") != 0x0123456789ABCDEF) {\n\tfail(\"uint(hex)\", 1);\n}\nif(uint(\"0x0123456789abcdef\") != 0x0123456789abcdef) {\n\tfail(\"uint(hex)\", 2);\n}\nif(uint(\"0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7\") != 0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7) {\n\tfail(\"uint(hex)\", 3);\n}\nif(uint(\"0b1001\") != 9) {\n\tfail(\"uint(bin)\", 1);\n}\nif(bech32(\"mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev\") != binary_hex(\"0000000000000000000000000000000000000000000000000000000000000000\")) {\n\tfail(\"bech32\", 1);\n}\nif(bech32(\"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf\") != binary_hex(\"09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7\")) {\n\tfail(\"bech32\", 2);\n}\nif(to_string_bech32(binary_hex(\"09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7\")) != \"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf\") {\n\tfail(\"bech32\", 3);\n}\nif(bech32(\"MMX\") != bech32()) {\n\tfail(\"bech32\", 4);\n}\nif(bech32() != binary_hex(\"0000000000000000000000000000000000000000000000000000000000000000\")) {\n\tfail(\"bech32\", 5);\n}\nif(bech32(null) != bech32()) {\n\tfail(\"bech32\", 6);\n}\nif(to_string(1337) != \"1337\") {\n\tfail(\"to_string(1337)\");\n}\nif(to_string(18446744073709551615) != \"18446744073709551615\") {\n\tfail(\"to_string(18446744073709551615)\");\n}\nif(to_string(340282366920938463463374607431768211455) != \"340282366920938463463374607431768211455\") {\n\tfail(\"to_string(340282366920938463463374607431768211455)\");\n}\nif(to_string_hex(0x01234567ABCDE) != \"1234567abcde\") {\n\tfail(\"to_string_hex(0x01234567ABCDE)\");\n}\nif(to_string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) != \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\") {\n\tfail(\"to_string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)\");\n}\nif(to_string_bech32(bech32(\"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf\")) != \"mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf\") {\n\tfail(\"to_string_bech32(mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf)\");\n}\nif(to_string(binary(\"ABCDEF\")) != \"ABCDEF\") {\n\tfail(\"binary(ABCDEF)\");\n}\nif(to_string_hex(binary(\"AB\")) != \"4142\") {\n\tfail(\"binary(AB)\");\n}\nif(to_string_hex(binary_hex(\"0123456789ABCDEF\")) != \"0123456789ABCDEF\") {\n\tfail(\"binary_hex(0123456789ABCDEF)\");\n}\nif(to_string_hex(binary_hex(\"0x0123456789ABCDEF\")) != \"0123456789ABCDEF\") {\n\tfail(\"binary_hex(0x0123456789ABCDEF)\");\n}\nif(concat(\"A\", \"BC\", \"D\") != \"ABCD\") {\n\tfail(\"concat()\", 1);\n}\nif(memcpy(\"ABC\", 1) != \"A\") {\n\tfail(concat(\"memcpy(ABC, 1): '\", memcpy(\"ABC\", 1), \"'\"));\n}\nif(memcpy(\"ABC\", 2, 1) != \"BC\") {\n\tfail(\"memcpy(ABC, 2, 1)\");\n}\nif(sha256(\"\") != binary_hex(\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\")) {\n\tfail(\"sha256()\", 1);\n}\nif(sha256(\"abc\") != binary_hex(\"ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad\")) {\n\tfail(\"sha256()\", 2);\n}\nif(ecdsa_verify(\n\t\tbinary_hex(\"F3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A\"),\n\t\tbinary_hex(\"02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E\"),\n\t\tbinary_hex(\"C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39\")) != true)\n{\n\tfail(\"ecdsa_verify\", 1);\n}\nif(ecdsa_verify(\n\t\tbinary_hex(\"A3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A\"),\n\t\tbinary_hex(\"02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E\"),\n\t\tbinary_hex(\"C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39\")) != false)\n{\n\tfail(\"ecdsa_verify\", 2);\n}\nif(size(\"123\") != 3) {\n\tfail(\"size('123')\");\n}\nif(size(binary(\"123\")) != 3) {\n\tfail(\"size(binary('123'))\");\n}\nif(min(1, 2, 3) != 1) {\n\tfail(\"min()\");\n}\nif(max(1, 2, 3) != 3) {\n\tfail(\"max()\");\n}\nif(typeof(null) != 0) {\n\tfail(\"typeof(null)\");\n}\nif(typeof(false) != 1) {\n\tfail(\"typeof(false)\");\n}\nif(typeof(true) != 2) {\n\tfail(\"typeof(true)\");\n}\nif(typeof(1) != 4) {\n\tfail(\"typeof(1)\");\n}\nif(typeof(\"\") != 5) {\n\tfail(\"typeof('')\");\n}\nif(typeof(binary(\"\")) != 6) {\n\tfail(\"typeof(binary)\");\n}\nif(typeof([]) != 7) {\n\tfail(\"typeof([])\");\n}\nif(typeof({}) != 8) {\n\tfail(\"typeof({})\");\n}\nif(deref(clone(1)) != 1) {\n\tfail(\"deref(clone(1)) != 1\");\n}\nif(bool(null) != false) {\n\tfail(\"bool(null)\");\n}\nif(bool(false) != false) {\n\tfail(\"bool(false)\");\n}\nif(bool(true) != true) {\n\tfail(\"bool(true)\");\n}\nif(bool(0) != false) {\n\tfail(\"bool(0)\");\n}\nif(bool(10) != true) {\n\tfail(\"bool(10)\");\n}\nif(bool(\"\") != false) {\n\tfail(\"bool('')\");\n}\nif(bool(\"0\") != true) {\n\tfail(\"bool('0')\");\n}\nif(bool(binary(\"\")) != false) {\n\tfail(\"bool(binary(''))\");\n}\nif(bool(binary(\"0\")) != true) {\n\tfail(\"bool(binary('0')\");\n}\nif(bool([]) != true) {\n\tfail(\"bool([])\");\n}\nif(bool({}) != true) {\n\tfail(\"bool({})\");\n}\nif(uint(null) != 0) {\n\tfail(\"uint(null)\");\n}\nif(uint(false) != 0) {\n\tfail(\"uint(false)\");\n}\nif(uint(true) != 1) {\n\tfail(\"uint(true)\");\n}\nif(uint_hex(\"aabbc\") != 0xaabbc) {\n\tfail(\"uint_hex('aabbc')\");\n}\nif(uint(binary(0xABCDEF0)) != 0xABCDEF0) {\n\tfail(\"uint(binary(0xABCDEF0))\");\n}\nif(uint(binary(binary(0xABCDEF0))) != 0xABCDEF0) {\n\tfail(\"uint(binary(binary(0xABCDEF0)))\");\n}\nif(uint_le(binary_le(0xABCDEF0)) != 0xABCDEF0) {\n\tfail(\"uint_le(binary_le(0xABCDEF0))\");\n}\nif(bech32(binary(bech32(\"MMX\"))) != bech32(\"MMX\")) {\n\tfail(\"bech32(binary(bech32(MMX)))\");\n}\nif([] == []) {\n\tfail(\"[] == []\");\n}\nif({} == {}) {\n\tfail(\"[] == []\");\n}\nif(to_string(\"test\") != \"test\") {\n\tfail(\"to_string(test)\");\n}\n\n__nop();\n\n{\n\tvar array = [];\n\tif(size(array) != 0) {\n\t\tfail(\"size(array) != 0\");\n\t}\n\tpush(array, 11);\n\tif(array[0] != 11) {\n\t\tfail(\"array[0] != 11\");\n\t}\n\tif(size(array) != 1) {\n\t\tfail(\"size(array) != 1\");\n\t}\n\tarray[0] = 12;\n\t{\n\t\tvar tmp = clone(array);\n\t\tif(tmp[0] != 12) {\n\t\t\tfail(\"clone: array[0] != 12\");\n\t\t}\n\t\tpop(tmp);\n\t}\n\tif(pop(array) != 12) {\n\t\tfail(\"pop(array) != 12\");\n\t}\n\tif(size(array) != 0) {\n\t\tfail(\"size(array) != 0\");\n\t}\n\tif(array[35345345345] != null) {\n\t\tfail(\"array[35345345345] != null\");\n\t}\n}\n{\n\tvar map = {};\n\tif(map.field != null) {\n\t\tfail(\"map.field != null\");\n\t}\n\tmap.field = 1337;\n\tif(get(map, \"field\") != 1337) {\n\t\tfail(\"map.field != 1337\");\n\t}\n\tmap.field++;\n\tif(map.field != 1338) {\n\t\tfail(\"map.field != 1338\");\n\t}\n\tset(map, \"field\", 1339);\n\t{\n\t\tvar tmp = clone(map);\n\t\tif(tmp.field != 1339) {\n\t\t\tfail(\"clone: tmp.field != 1339\");\n\t\t}\n\t\terase(tmp, \"field\");\n\t}\n\tif(map.field != 1339) {\n\t\tfail(\"map.field != 1339\");\n\t}\n\terase(map, \"field\");\n\tif(map.field != null) {\n\t\tfail(\"after erase: map.field != null\");\n\t}\n\t{\n\t\tvar tmp = clone(map);\n\t\tif(tmp.field != null) {\n\t\t\tfail(\"clone: tmp.field != null\");\n\t\t}\n\t}\n}\n{\n\tvar map = {};\n\tmap[0] = true;\n\tmap[false] = true;\n\tmap[true] = true;\n\tmap[\"test\"] = true;\n\tmap[binary(\"bin123\")] = true;\n\tvar tmp0 = [];\n\tmap[tmp0] = true;\n\tvar tmp1 = {};\n\tmap[tmp1] = true;\n\t\n\tif(map[0] == null) {\n\t\tfail(\"map[0] == null\");\n\t}\n\tif(map[false] == null) {\n\t\tfail(\"map[false] == null\");\n\t}\n\tif(map[true] == null) {\n\t\tfail(\"map[true] == null\");\n\t}\n\tif(map[\"test\"] == null) {\n\t\tfail(\"map['test'] == null\");\n\t}\n\tif(map[binary(\"bin123\")] == null) {\n\t\tfail(\"map[bin123] == null\");\n\t}\n\tif(map[tmp0] == null) {\n\t\tfail(\"map[tmp0] == null\");\n\t}\n\tif(map[tmp1] == null) {\n\t\tfail(\"map[tmp1] == null\");\n\t}\n}\n{\n\tvar test = {\n\t\tfield: \"value\",\n\t\t\"field1\": 123\n\t};\n\tif(test.field != \"value\") {\n\t\tfail(\"test.field\");\n\t}\n\tif(test.field1 != 123) {\n\t\tfail(\"test.field1\");\n\t}\n\tvar test2 = {};\n\ttest2.field = test.field;\n\tif(test2.field != test.field) {\n\t\tfail(\"test2.field\");\n\t}\n}\n{\n\tvar test = null;\n\tif(test.field != null) {\n\t\tfail(\"null.field != null\");\n\t}\n}\n{\n\tvar test = concat([1, 2], [3, 4], [5]);\n\tif(size(test) != 5) {\n\t\tfail(\"concat: size(test) != 5\");\n\t}\n\tfor(var i = 0; i < 5; ++i) {\n\t\tif(test[i] != i + 1) {\n\t\t\tfail(\"test[i] != i + 1\");\n\t\t}\n\t}\n}\n{\n\tvar test = {\n\t\tfield: {\n\t\t\tfield: 1337\n\t\t}\n\t};\n\tvar test2 = test;\n\ttest = null;\n\tif(test2.field.field != 1337) {\n\t\tfail(\"test2.field.field != 1337\");\n\t}\n}\n{\n\tvar test = 1;\n\tdelete(test);\n\ttest = 1;\n\tif(test != 1) {\n\t\tfail(\"use after delete()\");\n\t}\n}\n{\n\tvar test = [1, 2, 3];\n\tpop(test);\n\tpush(test, 4);\n\tif(test[2] != 4) {\n\t\tfail(\"test[2] != 4\");\n\t}\n}\n{\n\tvar test = [1, 2, 3];\n\tvar test2 = deref(test);\n\tif(size(test2) != 3) {\n\t\tfail(\"size(test2) != 3\");\n\t}\n\tfor(var i = 0; i < size(test2); ++i) {\n\t\tif(test2[i] != i + 1) {\n\t\t\tfail(\"test2[i] != i + 1\");\n\t\t}\n\t}\n\tpop(test2);\n\tpop(test2);\n\tif(size(test) != 3) {\n\t\tfail(\"size(test) != 3\");\n\t}\n\tfor(var i = 0; i < size(test); ++i) {\n\t\tif(test[i] != i + 1) {\n\t\t\tfail(\"test[i] != i + 1\");\n\t\t}\n\t}\n}\n{\n\tvar test = [null, true, false, 1, \"test\", [], {}];\n\tif(test[0] != null) {\n\t\tfail(\"test[0] != null\");\n\t}\n\tif(test[1] != true) {\n\t\tfail(\"test[1] != true\");\n\t}\n\tif(test[2] != false) {\n\t\tfail(\"test[2] != false\");\n\t}\n\tif(test[3] != 1) {\n\t\tfail(\"test[3] != 1\");\n\t}\n\tif(test[4] != \"test\") {\n\t\tfail(\"test[4] != test\");\n\t}\n}\n{\n\tvar map = {};\n\tconst key = bech32(\"mmx1cxn9nan8xyw3zflxheaf2c2mrzgexzp33j9rwqmxw7ed3ut09wqsr06jmq\");\n\tmap[key] = 1337;\n\tif(map[key] != 1337) {\n\t\tfail(\"map[key] != 1337 (key = bech32())\");\n\t}\n}\n{\n\tconst array = [1, 2, 3];\n\tconst tmp = array;\n\tpush(tmp, 4);\n\tif(array[3] != 4) {\n\t\tfail(\"array[3] != 4\");\n\t}\n}\n{\n\tconst object = {\"foo\": {}};\n\tconst foo = object.foo;\n\tfoo.bar = true;\n\tif(object.foo.bar != true) {\n\t\tfail(\"object.foo.bar != true\");\n\t}\n}\n{\n\tconst obj = {\"foo\": true};\n\tdelete(obj.foo);\n\tif(obj.foo != true) {\n\t\tfail(\"delete(): obj.foo != true\");\n\t}\n}\n{\n\tvar map = {};\n\tif(map[bech32()] == 0) {\n\t\tfail(\"map[bech32()] == 0\");\n\t}\n}\n{\n\tvar obj = {test: \"data\"};\n\tobj.ptr = obj;\n\tdelete(obj);\n}\n{\n\tconst A = {};\n\tconst B = {ptr: A};\n\tA.ptr = B;\n}\n{\n\tvar array = [1, 2, 3];\n\tpop(array);\n\tif(array[2] != null) {\n\t\tfail(\"array[2] != null\");\n\t}\n\tif(array[1337] != null) {\n\t\tfail(\"array[1337] != null\");\n\t}\n}\n\n\n", "compiler": "mmx-1.0.0", "build_flags": {"__type": "mmx.compile_flags_t", "verbose": 0, "opt_level": 3, "catch_overflow": true}} ================================================ FILE: test/vm/compiler_tests.js ================================================ null; assert(true); assert(true, "test"); assert(1 == 1); { var test; assert(test == null); } function test1(a, b = 1) { return a + b; } assert(test1(1) == 2); assert(test1(1, 2) == 3); function no_return() {} assert(no_return() == null); function multi_return(v) { if(v < 10) { return "SMALL"; } if(v < 100) { return "MEDIUM"; } return "LARGE"; } assert(multi_return(0) == "SMALL"); assert(multi_return(11) == "MEDIUM"); assert(multi_return(111) == "LARGE"); function return_array() { return [1, 2, 3]; } assert(return_array()[0] == 1); assert(return_array()[1] == 2); assert(return_array()[2] == 3); assert(concat(string(1), string(2), string(3)) == "123"); { var map = {}; assert(map.test == null); } { var map = {}; map.tmp = 123; assert(map.tmp == 123); } { var map = {"test": 123}; map.test = 1234; assert(map.test == 1234); } { var map = {"test": 123}; const tmp = map.test; assert(tmp == 123); map.tmp = map.test; assert(map.tmp == 123); } assert(balance() == 0); assert(balance(sha256("test")) == 0); assert(this.balance[bech32()] == 0); { var tmp = balance(); assert(tmp == 0); tmp = 1337; assert(balance() == 0); } { var tmp = this.balance[bech32()]; assert(tmp == 0); tmp = 1337; assert(balance(bech32()) == 0); } { var array = [1, 2, 3]; for(var entry of array) { entry = 0; } for(const entry of array) { assert(entry); } } { var array = ["1", "2", "3"]; for(var entry of array) { entry = "0"; } for(const entry of array) { assert(entry != "0"); } } { var array = [[1], [2], [3]]; for(var entry of array) { entry = []; } for(const entry of array) { assert(size(entry)); } } { var array = [{val: 1}, {val: 2}, {val: 3}]; for(var entry of array) { entry = {val: 0}; } for(const entry of array) { assert(entry.val); } } { var obj = {key: "value"}; assert(obj.key == "value"); } { var obj = {"key": "value"}; assert(obj.key == "value"); } { var obj = {test: 123, key: "value"}; assert(obj.key == "value"); } { var obj = { key : "value" }; assert(obj.key == "value"); } { var obj = { key : "value" }; assert(obj.key == "value"); } { var obj = {_key_: "value"}; assert(obj._key_ == "value"); } assert(1337 / 16 == 83); assert(1337 % 16 == 9); assert(1337133713371337 / 1024 == 1305794641964); assert(1337133713371337 % 1024 == 201); if(false) { fail("if(false)"); } if(!true) { fail("if(!true)"); } if(1 == 2) { fail("if(1 == 2)"); } if(1 != 1) { fail("if(1 != 1)"); } if(2 < 1) { fail("if(2 < 1)"); } if(1 > 2) { fail("if(1 > 2)"); } if(2 <= 1) { fail("if(2 <= 1)"); } if(1 >= 2) { fail("if(1 >= 2)"); } if(!(1 == 1)) { fail("if(!(1 == 1))"); } if((1 == 1) && (1 == 0)) { fail("if((1 == 1) && (1 == 0))"); } if((1 != 1) || (1 != 1)) { fail("if((1 != 1) || (1 != 1))"); } if(0) { fail("if(0)"); } if(null) { fail("if(null)"); } if("") { fail("if('')"); } if(!1337) { fail("if(!1337)"); } if(!"test") { fail("if(!'test')"); } if(!(true && 1337 && "test")) { fail("if(!(1 && true && 'test'))"); } if(0 || null || "") { fail("if(0 || null || '')"); } if(!(0 || null || 1)) { fail("if(!(null || null || 1))"); } { var cond = (1 > 2); if(cond) { fail("if(cond)"); } } { const cond = (1 > 2); if(cond) { fail("if(cond)"); } } { var tmp = 1; tmp += 1; assert(tmp == 2); } { var tmp = 1; tmp -= 1; assert(tmp == 0); } { var tmp = 10; tmp *= 2; assert(tmp == 20); } { var tmp = 10; tmp /= 2; assert(tmp == 5); } { var tmp = 0; tmp ^= 0xFF; assert(tmp == 0xFF); } { var tmp = 0xFF; tmp &= 0xFF; assert(tmp == 0xFF); } { var tmp = 0; tmp |= 0xFF; assert(tmp == 0xFF); } { var tmp = false; tmp ^^= true; assert(tmp == true); } { var tmp = false; tmp &&= true; assert(tmp == false); } { var tmp = false; tmp ||= true; assert(tmp == true); } { assert(is_uint(1337)); assert(is_string("test")); assert(is_binary(bech32())); assert(is_array([])); assert(is_map({})); } { assert(!is_uint(null)); assert(!is_uint(true)); assert(!is_uint(false)); assert(!is_uint("test")); assert(!is_string(null)); assert(!is_string(true)); assert(!is_string(false)); assert(!is_string(1337)); assert(!is_array(null)); assert(!is_map(null)); } { while(false) { fail("while(false)"); } } { var i = 0; while(i < 10) { i++; } assert(i == 10); } { var map = {}; map[0] = 0; map[0] += 1; assert(map[0] == 1); } { var map = {}; map[1] = 1; map[1] -= 1; assert(map[1] == 0); } { var N = 1; for(var i = 0; i < N; ++i) { if(i < 10) { N++; } } assert(N == 11); } { var N = 1; var i = 0; while(i < N) { if(i < 10) { N++; } i++; } assert(N == 11); } ================================================ FILE: test/vm/contract_tests.sh ================================================ #!/bin/bash set -e for file in test/vm/test_*.js; do echo "Unit tests [$file]" ./build/tools/mmx_compile -e -f $file echo "Pass" done ================================================ FILE: test/vm/engine_tests.cpp ================================================ /* * engine_tests.cpp * * Created on: May 21, 2022 * Author: mad */ #include #include #include #include #include #include #include #include using namespace mmx; void expect(const vm::var_t* got, const vm::var_t* want) { if(compare(got, want)) { throw std::logic_error("expected " + to_string(want) + " but got " + to_string(got)); } } void expect(const vm::var_t* got, const vm::var_t& want) { expect(got, &want); } void expect(const vm::var_t* got, vm::varptr_t want) { expect(got, want.get()); } void test_serialize(vm::varptr_t var, bool with_rc, bool with_vf) { const auto data = serialize(*var.get(), with_rc, with_vf); std::unique_ptr res; auto size = deserialize(res, data.first.get(), data.second, with_rc, with_vf); vnx::test::expect(size, data.second); vnx::test::expect(compare(res.get(), var.get()), 0); if(with_rc) { vnx::test::expect(res->ref_count, var->ref_count); } if(with_vf) { vnx::test::expect(res->flags, var->flags); } } void test_serialize(vm::varptr_t var) { test_serialize(var, true, true); test_serialize(var, false, true); test_serialize(var, true, false); test_serialize(var, false, false); } void test_compare(vm::varptr_t var) { vnx::test::expect(var == var, true); vnx::test::expect(var != var, false); vnx::test::expect(var < var, false); vnx::test::expect(var > var, false); vm::varptr_t null; vnx::test::expect(var == null, var.get() == nullptr); vnx::test::expect(var < null, false); vnx::test::expect(var > null, var.get() != nullptr); } void test_clone(vm::varptr_t var) { const auto res = clone(var.get()); vnx::test::expect(compare(res.get(), var.get()), 0); } int main(int argc, char** argv) { vnx::test::init("mmx.vm.engine"); VNX_TEST_BEGIN("serialize") { test_serialize(std::make_unique()); test_serialize(std::make_unique(true)); test_serialize(std::make_unique(false)); test_serialize(std::make_unique(uint64_t(-1))); test_serialize(std::make_unique()); test_serialize(std::make_unique(uint64_t(1) << 8)); test_serialize(std::make_unique(uint64_t(1) << 16)); test_serialize(std::make_unique(uint64_t(1) << 32)); test_serialize(std::make_unique(uint128_t(1) << 64)); test_serialize(std::make_unique(uint256_t(1) << 128)); test_serialize(std::make_unique(uint256_max)); test_serialize(vm::binary_t::alloc("test")); test_serialize(vm::binary_t::alloc(10, vm::TYPE_BINARY)); test_serialize(std::make_unique(-1)); test_serialize(std::make_unique()); } VNX_TEST_END() VNX_TEST_BEGIN("clone") { test_clone(nullptr); test_clone(std::make_unique()); test_clone(std::make_unique(true)); test_clone(std::make_unique(false)); test_clone(std::make_unique(uint64_t(-1))); test_clone(std::make_unique(uint256_max)); test_clone(vm::binary_t::alloc("test")); test_clone(vm::binary_t::alloc(10, vm::TYPE_BINARY)); test_clone(std::make_unique(-1)); test_clone(std::make_unique()); } VNX_TEST_END() VNX_TEST_BEGIN("compare_func") { test_compare(std::make_unique()); test_compare(std::make_unique(true)); test_compare(std::make_unique(false)); test_compare(std::make_unique(0)); test_compare(std::make_unique()); test_compare(std::make_unique(uint256_max)); test_compare(vm::binary_t::alloc("test")); test_compare(vm::binary_t::alloc(10, vm::TYPE_BINARY)); test_compare(std::make_unique()); test_compare(std::make_unique()); vnx::test::expect(compare(vm::var_t(), vm::var_t(false)), -1); vnx::test::expect(compare(vm::var_t(false), vm::var_t(true)), -1); vnx::test::expect(compare(vm::ref_t(0), vm::ref_t(1)), -1); vnx::test::expect(compare(vm::ref_t(1), vm::ref_t(1)), 0); vnx::test::expect(compare(vm::uint_t(), vm::uint_t(1)), -1); vnx::test::expect(compare(vm::uint_t(1), vm::uint_t(1)), 0); vnx::test::expect(vm::varptr_t(vm::binary_t::alloc("")) < vm::varptr_t(vm::binary_t::alloc("test")), true); vnx::test::expect(vm::varptr_t(vm::binary_t::alloc("test")) == vm::varptr_t(vm::binary_t::alloc("test")), true); } VNX_TEST_END() VNX_TEST_BEGIN("stuff") { vnx::test::expect(vm::to_binary(hash_t(""))->to_hash(), hash_t("")); { auto var = vm::binary_t::alloc("test"); var = vm::binary_t::alloc("test1"); vnx::test::expect(var->to_string(), std::string("test1")); } } VNX_TEST_END() auto backend = std::make_shared(); auto storage = std::make_shared(backend); auto engine = std::make_shared(addr_t(), storage, false); engine->gas_limit = 1000000; VNX_TEST_BEGIN("setup") { vm::assign(engine, vm::MEM_STATIC + 1, vnx::Variant()); vm::assign(engine, vm::MEM_STATIC + 2, vnx::Variant(true)); vm::assign(engine, vm::MEM_STATIC + 3, vnx::Variant(false)); vm::assign(engine, vm::MEM_STATIC + 4, vnx::Variant(1337)); vm::assign(engine, vm::MEM_STATIC + 5, vnx::Variant("test")); vm::assign(engine, vm::MEM_STATIC + 6, vnx::Variant(std::vector{1, 2, 3, 4})); vm::assign(engine, vm::MEM_STATIC + 7, vnx::Variant(hash_t("test"))); vm::assign(engine, vm::MEM_STATIC + 8, vnx::Variant(addr_t("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf"))); vm::assign(engine, vm::MEM_STATIC + 9, vnx::Variant(std::vector{11, 12, 13, 14})); { vnx::Object tmp; tmp["field"] = 123; tmp["field1"] = "test"; tmp["field2"] = std::vector{11, 12, 13, 14}; vm::assign(engine, vm::MEM_STATIC + 10, vnx::Variant(tmp)); } engine->write(vm::MEM_STATIC + 11, vm::uint_t(-1)); vm::assign(engine, vm::MEM_STATIC + 12, vnx::Variant(uint8_t(137))); vm::assign(engine, vm::MEM_STATIC + 13, vnx::Variant(uint16_t(1337))); vm::assign(engine, vm::MEM_STATIC + 14, vnx::Variant(int8_t(127))); vm::assign(engine, vm::MEM_STATIC + 15, vnx::Variant(int16_t(1337))); { engine->assign(vm::MEM_STATIC + 16, std::make_unique()); engine->write_key(vm::MEM_STATIC + 16, vm::uint_t(88), vm::uint_t(99)); engine->write_key(vm::MEM_STATIC + 16, vm::uint_t(888), vm::uint_t(999)); } } VNX_TEST_END() VNX_TEST_BEGIN("parse_memo") { { auto memo = engine->parse_memo(vm::MEM_STATIC + 1); vnx::test::expect(bool(memo), false); } { auto memo = engine->parse_memo(vm::MEM_STATIC + 5); vnx::test::expect(bool(memo), true); vnx::test::expect(*memo, "test"); } } VNX_TEST_END() const auto check_func_1 = [](std::shared_ptr engine, const uint64_t offset) { expect(engine->read(offset + 1), vm::var_t()); expect(engine->read(offset + 2), vm::var_t(true)); expect(engine->read(offset + 3), vm::var_t(false)); expect(engine->read(offset + 4), vm::uint_t(1337)); expect(engine->read(offset + 5), vm::to_binary("test")); expect(engine->read(offset + 6), vm::to_binary(bytes_t<4>(std::vector{1, 2, 3, 4}))); expect(engine->read(offset + 7), vm::to_binary(hash_t("test"))); expect(engine->read(offset + 8), vm::to_binary(addr_t("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf"))); { const auto& ref = engine->read_fail(offset + 9, vm::TYPE_REF); const auto& var = engine->read_fail(ref.address, vm::TYPE_ARRAY); vnx::test::expect(var.size, 4u); vnx::test::expect(var.address, ref.address); for(size_t i = 0; i < 4; ++i) { expect(engine->read_entry(ref.address, i), vm::uint_t(i + 11)); } } { const auto& ref = engine->read_fail(offset + 10, vm::TYPE_REF); const auto& var = engine->read_fail(ref.address, vm::TYPE_MAP); vnx::test::expect(var.address, ref.address); expect(engine->read_key(ref.address, vm::to_binary("field")), vm::uint_t(123)); expect(engine->read_key(ref.address, vm::to_binary("field1")), vm::to_binary("test")); { const auto& ref2 = engine->read_key_fail(ref.address, engine->lookup(vm::to_binary("field2"), true), vm::TYPE_REF); const auto& var = engine->read_fail(ref2.address, vm::TYPE_ARRAY); vnx::test::expect(var.size, 4u); for(size_t i = 0; i < 4; ++i) { expect(engine->read_entry(ref2.address, i), vm::uint_t(i + 11)); } } } expect(engine->read(offset + 11), vm::uint_t(-1)); expect(engine->read(offset + 12), vm::uint_t(137)); expect(engine->read(offset + 13), vm::uint_t(1337)); expect(engine->read(offset + 14), vm::uint_t(127)); expect(engine->read(offset + 15), vm::uint_t(1337)); }; VNX_TEST_BEGIN("copy") { auto engine1 = std::make_shared(hash_t("copy:1"), storage, false); engine1->gas_limit = 1000000; for(size_t i = 1; i <= 16; ++i) { vm::copy(engine1, engine, vm::MEM_STACK + i, vm::MEM_STATIC + i); } check_func_1(engine1, vm::MEM_STACK); } VNX_TEST_END() VNX_TEST_BEGIN("data_recursion") { auto engine1 = std::make_shared(hash_t("data_recursion:1"), storage, false); engine1->gas_limit = 10000000; const auto addr = engine1->alloc(); engine1->write(addr, vm::map_t()); engine1->write(vm::MEM_STATIC + 1, vm::ref_t(addr)); engine1->write_key(addr, vm::uint_t(0), vm::ref_t(addr)); auto engine2 = std::make_shared(hash_t("data_recursion:2"), storage, false); engine2->gas_limit = 10000000; bool failed = false; try { vm::copy(engine2, engine1, vm::MEM_STACK + 1, vm::MEM_STATIC + 1); } catch(...) { failed = true; } if(!failed) { throw std::logic_error("expected vm::copy() to fail"); } engine1->commit(); } VNX_TEST_END() VNX_TEST_BEGIN("convert") { vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 1).is_null(), true); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 2).to(), true); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 3).to(), false); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 4).to(), 1337); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 5).to(), "test"); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 6).to>(), std::vector{1, 2, 3, 4}); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 7).to(), hash_t("test")); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 8).to(), addr_t("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf")); vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 9).to>(), std::vector{11, 12, 13, 14}); { const auto var = vm::read(engine, vm::MEM_STATIC + 10); vnx::test::expect(var.is_object(), true); const auto value = var.to_object(); vnx::test::expect(value["field"].to(), 123u); vnx::test::expect(value["field1"].to(), "test"); vnx::test::expect(value["field2"].to>(), std::vector{11, 12, 13, 14}); } vnx::test::expect(vm::read(engine, vm::MEM_STATIC + 11).to(), "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); { auto value = vm::read(engine, vm::MEM_STATIC + 16).to>(); vnx::test::expect(value[88], 99u); vnx::test::expect(value[888], 999u); } } VNX_TEST_END() VNX_TEST_BEGIN("log_event") { engine->log_func = [](uint32_t level, const std::string& msg) { vnx::test::expect(level, 1337u); vnx::test::expect(msg, "test"); }; engine->event_func = [&engine](const std::string& name, const uint64_t data) { vnx::test::expect(name, "test"); expect(engine->read(data), vm::to_binary(hash_t("test"))); }; engine->code.emplace_back(vm::OP_LOG, vm::OPFLAG_REF_A, vm::MEM_STATIC + 4, vm::MEM_STATIC + 5); engine->code.emplace_back(vm::OP_EVENT, 0, vm::MEM_STATIC + 5, vm::MEM_STATIC + 7); engine->code.emplace_back(vm::OP_RET); engine->init(); engine->begin(0); engine->run(); } VNX_TEST_END() engine->commit(); storage->commit(); VNX_TEST_BEGIN("assign") { auto engine = std::make_shared(addr_t(), backend, true); engine->gas_limit = 1000000; check_func_1(engine, vm::MEM_STATIC); } VNX_TEST_END() return vnx::test::done(); } ================================================ FILE: test/vm/engine_tests.js ================================================ {} { } if(false) { fail("false"); } if(!true) { fail("!"); } if(!(!false)) { fail("!!"); } if(true && false) { fail("true && false"); } if(false && true) { fail("false && true"); } if(!(true || false)) { fail("true || false"); } if(!(false || true)) { fail("false || true"); } if(!(true && true)) { fail("true && true"); } if(!(true || true)) { fail("true && true"); } if(false || false) { fail("false || false"); } if(false && false) { fail("false && false"); } if(false ^^ false) { fail("false ^ false"); } if(true ^^ true) { fail("true ^ true"); } if(!(false ^^ true)) { fail("false ^ true"); } if(!(true ^^ false)) { fail("false ^ true"); } if(true) { // pass } else { fail("else"); } if(false) { fail("else-if"); } else if(false) { fail("else-if"); } else if(false) { fail("else-if"); } else { // pass } if(null != null) { fail("null != null"); } if(null == 0) { fail("null == 0"); } if(null == false) { fail("null == false"); } if(null == true) { fail("null == true"); } if(null == "") { fail("null == ''"); } if(!(null == null)) { fail("!(null == null)"); } if(!(null != 0)) { fail("!(null != 0)"); } if(!(null != false)) { fail("!(null != false)"); } if(!(null != true)) { fail("!(null != true)"); } if(!(null != "")) { fail("!(null != '')"); } if(!(1 > 0)) { fail("1 > 0"); } if(!(1 >= 0)) { fail("1 >= 0"); } if(!(1 >= 1)) { fail("1 >= 1"); } if(!(0 < 1)) { fail("0 < 1"); } if(!(0 <= 1)) { fail("0 <= 1"); } if(!(1 <= 1)) { fail("1 <= 1"); } if((1 >> 0) != 1) { fail("1 >> 0"); } if((2 >> 1) != 1) { fail("2 >> 1"); } if((1 << 0) != 1) { fail("1 << 0"); } if((1 << 1) != 2) { fail("1 << 1"); } if(1 + 1 != 2) { fail("add", 1); } if(1 - 1 != 0) { fail("sub", 1); } if(1 * 1 != 1) { fail("mul", 1); } if(1337 * 1337 != 1787569) { fail("mul", 2); } if(18446744073709551615 * 18446744073709551615 != 340282366920938463426481119284349108225) { fail("mul", 3); } if(340282366920938463463374607431768211455 * 340282366920938463463374607431768211455 != 115792089237316195423570985008687907852589419931798687112530834793049593217025) { fail("mul", 4); } if(86605900701059233675071791330357447908204924955602516110289890806217748420 * 1337 != 115792089237316195423570985008687907853269984665640564039457584007913129637540) { fail("mul", 5); } if(3 / 2 != 1) { fail("div", 1); } if(13371337 / 1337 != 10001) { fail("div", 2); } if(340282366920938463463374607431768211455 / 1337 != 254511867554927796158096191048442940) { fail("div", 3); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 1337 != 86605900701059233675071791330357447908204924955602516110289890806217748421) { fail("div", 4); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 340282366920938463463374607431768211455 != 340282366920938463463374607431768211457) { fail("div", 5); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 / 86605900701059233675071791330357447908204924955602516110289890806217748420 != 1337) { fail("div", 6); } if((3 >> 0) != 3) { fail("3 >> 0"); } if(3 / 1 != 3) { fail(concat("div 3 / 1 => ", string(3 / 1))); } if(13371337 / 1024 != 13057) { fail("div 13371337 / 1024"); } for(var i = 1; i < 100; ++i) { if((11 * i) / i != 11) { fail(concat("div (11 * i) / i: ", string(i))); } } if(3 % 2 != 1) { fail("mod", 1); } if(13371337 % 1337 != 0) { fail("mod", 2); } if(340282366920938463463374607431768211455 % 1337 != 675) { fail("mod", 3); } if(115792089237316195423570985008687907853269984665640564039457584007913129639935 % 1337 != 1058) { fail("mod", 4); } if(3 % 1 != 0) { fail("mod 3 % 1"); } if(13371337 % 1024 != 969) { fail("mod 13371337 % 1024"); } for(var i = 1; i < 100; ++i) { if((11 * i) % i != 0) { fail(concat("mod (11 * i) % i: ", string(i))); } } if((0xFF00FF ^ 0xFF00FF) != 0) { fail("xor", 1); } if((0xFF00FF & 0xFFFFFF) != 0xFF00FF) { fail("and", 1); } if((0xFF00FF | 0) != 0xFF00FF) { fail("or", 1); } if((~0xFF00FF & 0xFFFFFF) != 0x00FF00) { fail("not", 1); } { var res = 0; for(var i = 0; i < 10; ++i) { res += 2; } if(res != 20) { fail("for", 1); } } { var res = 0; for(var i of [1, 2, 3]) { res += i; } if(res != 6) { fail("for", 2); } } if(0x100 != 256) { fail("hex", 1); } if(0b100 != 4) { fail("bin", 1); } if(uint("") != 0) { fail("uint('')"); } if(uint("0b01011101010001") != 0b01011101010001) { fail("uint(bin)", 1); } if(uint(111) != 111) { fail("uint(dec)", 1); } if(uint("111820312618873087563030836565815045174850059154595088905299609727287843170569") != 111820312618873087563030836565815045174850059154595088905299609727287843170569) { fail("uint(dec)", 2); } if(uint("0x0123456789ABCDEF") != 0x0123456789ABCDEF) { fail("uint(hex)", 1); } if(uint("0x0123456789abcdef") != 0x0123456789abcdef) { fail("uint(hex)", 2); } if(uint("0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7") != 0x09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7) { fail("uint(hex)", 3); } if(uint("0b1001") != 9) { fail("uint(bin)", 1); } if(bech32("mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev") != binary_hex("0000000000000000000000000000000000000000000000000000000000000000")) { fail("bech32", 1); } if(bech32("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") != binary_hex("09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7")) { fail("bech32", 2); } if(string_bech32(binary_hex("09292D77A8DF8E790D467F458B29591C1AFB11F0676CC7ABBB778C60D90D38F7")) != "mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") { fail("bech32", 3); } if(bech32("MMX") != bech32()) { fail("bech32", 4); } if(bech32() != binary_hex("0000000000000000000000000000000000000000000000000000000000000000")) { fail("bech32", 5); } if(bech32(null) != bech32()) { fail("bech32", 6); } if(string(1337) != "1337") { fail("string(1337)"); } if(string(18446744073709551615) != "18446744073709551615") { fail("string(18446744073709551615)"); } if(string(340282366920938463463374607431768211455) != "340282366920938463463374607431768211455") { fail("string(340282366920938463463374607431768211455)"); } if(string_hex(0x01234567ABCDE) != "1234567abcde") { fail("string_hex(0x01234567ABCDE)"); } if(string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) != "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") { fail("string_hex(0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)"); } if(string_bech32(bech32("mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf")) != "mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf") { fail("string_bech32(mmx17uuqmktq33mmh278d3nlqy0mrgw9j2vtg4l5vrte3m06saed9yys2q5hrf)"); } if(string(binary("ABCDEF")) != "ABCDEF") { fail("binary(ABCDEF)"); } if(string_hex(binary("AB")) != "4142") { fail("binary(AB)"); } if(string_hex(binary_hex("0123456789ABCDEF")) != "0123456789ABCDEF") { fail("binary_hex(0123456789ABCDEF)"); } if(string_hex(binary_hex("0x0123456789ABCDEF")) != "0123456789ABCDEF") { fail("binary_hex(0x0123456789ABCDEF)"); } if(concat("A", "BC", "D") != "ABCD") { fail("concat()", 1); } if(memcpy("ABC", 1) != "A") { fail(concat("memcpy(ABC, 1): '", memcpy("ABC", 1), "'")); } if(memcpy("ABC", 2, 1) != "BC") { fail("memcpy(ABC, 2, 1)"); } if(sha256("") != binary_hex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) { fail("sha256()", 1); } if(sha256("abc") != binary_hex("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad")) { fail("sha256()", 2); } if(ecdsa_verify( binary_hex("F3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"), binary_hex("02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E"), binary_hex("C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39")) != true) { fail("ecdsa_verify", 1); } if(ecdsa_verify( binary_hex("A3D6C7817001F48946270CD00CE1EA2105F470F65DA66C1FBCAADE3E7CAB964A"), binary_hex("02054191D5103F7A04B2E5B53AF253A6476F11DDCDB3B4134D74CFD642969B082E"), binary_hex("C05F13C85BDDFBB0A198697FAAC6973AA008AA45544FB7AB586B636405F73F215237D508C6FAE90C24BE424584640F824864B6FF3F2B99FB2104BBD5743E8E39")) != false) { fail("ecdsa_verify", 2); } if(size("123") != 3) { fail("size('123')"); } if(size(binary("123")) != 3) { fail("size(binary('123'))"); } if(min(1, 2, 3) != 1) { fail("min()"); } if(max(1, 2, 3) != 3) { fail("max()"); } if(typeof(null) != 0) { fail("typeof(null)"); } if(typeof(false) != 1) { fail("typeof(false)"); } if(typeof(true) != 2) { fail("typeof(true)"); } if(typeof(1) != 4) { fail("typeof(1)"); } if(typeof("") != 5) { fail("typeof('')"); } if(typeof(binary("")) != 6) { fail("typeof(binary)"); } if(typeof([]) != 7) { fail("typeof([])"); } if(typeof({}) != 8) { fail("typeof({})"); } if(deref(clone(1)) != 1) { fail("deref(clone(1)) != 1"); } if(bool(null) != false) { fail("bool(null)"); } if(bool(false) != false) { fail("bool(false)"); } if(bool(true) != true) { fail("bool(true)"); } if(bool(0) != false) { fail("bool(0)"); } if(bool(10) != true) { fail("bool(10)"); } if(bool("") != false) { fail("bool('')"); } if(bool("0") != true) { fail("bool('0')"); } if(bool(binary("")) != false) { fail("bool(binary(''))"); } if(bool(binary("0")) != true) { fail("bool(binary('0')"); } if(bool([]) != true) { fail("bool([])"); } if(bool({}) != true) { fail("bool({})"); } if(uint(null) != 0) { fail("uint(null)"); } if(uint(false) != 0) { fail("uint(false)"); } if(uint(true) != 1) { fail("uint(true)"); } if(uint_hex("aabbc") != 0xaabbc) { fail("uint_hex('aabbc')"); } if(uint(binary(0xABCDEF0)) != 0xABCDEF0) { fail("uint(binary(0xABCDEF0))"); } if(uint(binary(binary(0xABCDEF0))) != 0xABCDEF0) { fail("uint(binary(binary(0xABCDEF0)))"); } if(uint_le(binary_le(0xABCDEF0)) != 0xABCDEF0) { fail("uint_le(binary_le(0xABCDEF0))"); } if(bech32(binary(bech32("MMX"))) != bech32("MMX")) { fail("bech32(binary(bech32(MMX)))"); } if([] == []) { fail("[] == []"); } if({} == {}) { fail("[] == []"); } if(string("test") != "test") { fail("string(test)"); } __nop(); { var array = []; if(size(array) != 0) { fail("size(array) != 0"); } push(array, 11); if(array[0] != 11) { fail("array[0] != 11"); } if(size(array) != 1) { fail("size(array) != 1"); } array[0] = 12; { var tmp = clone(array); if(tmp[0] != 12) { fail("clone: array[0] != 12"); } pop(tmp); } if(pop(array) != 12) { fail("pop(array) != 12"); } if(size(array) != 0) { fail("size(array) != 0"); } if(array[35345345345] != null) { fail("array[35345345345] != null"); } } { var map = {}; if(map.field != null) { fail("map.field != null"); } map.field = 1337; if(get(map, "field") != 1337) { fail("map.field != 1337"); } map.field++; if(map.field != 1338) { fail("map.field != 1338"); } set(map, "field", 1339); { var tmp = clone(map); if(tmp.field != 1339) { fail("clone: tmp.field != 1339"); } erase(tmp, "field"); } if(map.field != 1339) { fail("map.field != 1339"); } erase(map, "field"); if(map.field != null) { fail("after erase: map.field != null"); } { var tmp = clone(map); if(tmp.field != null) { fail("clone: tmp.field != null"); } } } { var map = {}; map[0] = true; map[false] = true; map[true] = true; map["test"] = true; map[binary("bin123")] = true; var tmp0 = []; map[tmp0] = true; var tmp1 = {}; map[tmp1] = true; if(map[0] == null) { fail("map[0] == null"); } if(map[false] == null) { fail("map[false] == null"); } if(map[true] == null) { fail("map[true] == null"); } if(map["test"] == null) { fail("map['test'] == null"); } if(map[binary("bin123")] == null) { fail("map[bin123] == null"); } if(map[tmp0] == null) { fail("map[tmp0] == null"); } if(map[tmp1] == null) { fail("map[tmp1] == null"); } } { var test = { field: "value", "field1": 123 }; if(test.field != "value") { fail("test.field"); } if(test.field1 != 123) { fail("test.field1"); } var test2 = {}; test2.field = test.field; if(test2.field != test.field) { fail("test2.field"); } } { var test = null; if(test.field != null) { fail("null.field != null"); } } { var test = concat([1, 2], [3, 4], [5]); if(size(test) != 5) { fail("concat: size(test) != 5"); } for(var i = 0; i < 5; ++i) { if(test[i] != i + 1) { fail("test[i] != i + 1"); } } } { var test = { field: { field: 1337 } }; var test2 = test; test = null; if(test2.field.field != 1337) { fail("test2.field.field != 1337"); } } { var test = 1; delete(test); test = 1; if(test != 1) { fail("use after delete()"); } } { var test = [1, 2, 3]; pop(test); push(test, 4); if(test[2] != 4) { fail("test[2] != 4"); } } { var test = [1, 2, 3]; var test2 = deref(test); if(size(test2) != 3) { fail("size(test2) != 3"); } for(var i = 0; i < size(test2); ++i) { if(test2[i] != i + 1) { fail("test2[i] != i + 1"); } } pop(test2); pop(test2); if(size(test) != 3) { fail("size(test) != 3"); } for(var i = 0; i < size(test); ++i) { if(test[i] != i + 1) { fail("test[i] != i + 1"); } } } { var test = [null, true, false, 1, "test", [], {}]; if(test[0] != null) { fail("test[0] != null"); } if(test[1] != true) { fail("test[1] != true"); } if(test[2] != false) { fail("test[2] != false"); } if(test[3] != 1) { fail("test[3] != 1"); } if(test[4] != "test") { fail("test[4] != test"); } } { var map = {}; const key = bech32("mmx1cxn9nan8xyw3zflxheaf2c2mrzgexzp33j9rwqmxw7ed3ut09wqsr06jmq"); map[key] = 1337; if(map[key] != 1337) { fail("map[key] != 1337 (key = bech32())"); } } { const array = [1, 2, 3]; const tmp = array; push(tmp, 4); if(array[3] != 4) { fail("array[3] != 4"); } } { const object = {"foo": {}}; const foo = object.foo; foo.bar = true; if(object.foo.bar != true) { fail("object.foo.bar != true"); } } { const obj = {"foo": true}; delete(obj.foo); if(obj.foo != true) { fail("delete(): obj.foo != true"); } } { var map = {}; if(map[bech32()] == 0) { fail("map[bech32()] == 0"); } } { var obj = {test: "data"}; obj.ptr = obj; delete(obj); } { const A = {}; const B = {ptr: A}; A.ptr = B; } { var array = [1, 2, 3]; pop(array); if(array[2] != null) { fail("array[2] != null"); } if(array[1337] != null) { fail("array[1337] != null"); } } if(~binary_hex("F000") != binary_hex("0FFF")) { fail("~binary_hex"); } if((binary_hex("F000") ^ binary_hex("FFF0")) != binary_hex("0FF0")) { fail("binary ^ binary"); } if((binary_hex("F000") & binary_hex("FFF0")) != binary_hex("F000")) { fail("binary & binary"); } if((binary_hex("F000") | binary_hex("FFF0")) != binary_hex("FFF0")) { fail("binary | binary"); } ================================================ FILE: test/vm/engine_tests.sh ================================================ #!/bin/bash set -e echo "Unit tests [test/vm/compiler_tests.js]" ./build/tools/mmx_compile -e -f test/vm/compiler_tests.js echo "Pass" echo "Unit tests [test/vm/engine_tests.js]" ./build/tools/mmx_compile -e -f test/vm/engine_tests.js echo "Pass" for file in test/vm/fails/*.js; do echo "Asserting fail on [$file]" ./build/tools/mmx_compile -e -w -g 10000000 --assert-fail -f $file echo "Pass" done ================================================ FILE: test/vm/fails/assert.js ================================================ assert(false && true); ================================================ FILE: test/vm/fails/assert_code.js ================================================ assert(false, "msg", 1337); ================================================ FILE: test/vm/fails/assert_msg.js ================================================ assert(false, "test"); ================================================ FILE: test/vm/fails/commit_out_of_gas.js ================================================ var test = []; for(var i = 0; i < 10000; ++i) { push(test, i); } ================================================ FILE: test/vm/fails/div_by_zero.js ================================================ 1 / 0; ================================================ FILE: test/vm/fails/endless_loop.js ================================================ while(true) {} ================================================ FILE: test/vm/fails/erase_recursion_overflow.js ================================================ var test; for(var i = 0; i < 102; ++i) { test = [test]; } test = null; ================================================ FILE: test/vm/fails/integer_overflow_0.js ================================================ 0 - 1; ================================================ FILE: test/vm/fails/integer_overflow_1.js ================================================ 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF + 1; ================================================ FILE: test/vm/fails/integer_overflow_2.js ================================================ 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF * 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; ================================================ FILE: test/vm/fails/invalid_array_index.js ================================================ var test = []; test["123"] = true; ================================================ FILE: test/vm/fails/invalid_bech32_0.js ================================================ bech32("mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"); ================================================ FILE: test/vm/fails/invalid_bech32_1.js ================================================ bech32("mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"); ================================================ FILE: test/vm/fails/invalid_binary_and.js ================================================ binary_hex("FF") & binary_hex("FF00"); ================================================ FILE: test/vm/fails/invalid_binary_hex.js ================================================ binary_hex("0xjlklklLKTY"); ================================================ FILE: test/vm/fails/invalid_binary_or.js ================================================ binary_hex("FF") | binary_hex("FF00"); ================================================ FILE: test/vm/fails/invalid_binary_xor.js ================================================ binary_hex("FF") ^ binary_hex("FF00"); ================================================ FILE: test/vm/fails/invalid_bitwise_and.js ================================================ 0xFF & true; ================================================ FILE: test/vm/fails/invalid_bitwise_and2.js ================================================ true & true; ================================================ FILE: test/vm/fails/invalid_bitwise_not.js ================================================ ~false; ================================================ FILE: test/vm/fails/invalid_bitwise_or.js ================================================ 0 | true; ================================================ FILE: test/vm/fails/invalid_bitwise_or2.js ================================================ true | true; ================================================ FILE: test/vm/fails/invalid_bitwise_xor.js ================================================ 0xFF ^ false; ================================================ FILE: test/vm/fails/invalid_bitwise_xor2.js ================================================ false ^ false; ================================================ FILE: test/vm/fails/invalid_concat_0.js ================================================ concat("123", 456); ================================================ FILE: test/vm/fails/invalid_concat_1.js ================================================ concat(123, 456); ================================================ FILE: test/vm/fails/invalid_conv_integer_256_bit.js ================================================ string(340282366920938463463374607431768211457); ================================================ FILE: test/vm/fails/invalid_conv_integer_negative.js ================================================ uint("-1"); ================================================ FILE: test/vm/fails/invalid_conv_integer_string_10.js ================================================ uint("abcdef"); ================================================ FILE: test/vm/fails/invalid_conv_integer_string_11.js ================================================ uint("..."); ================================================ FILE: test/vm/fails/invalid_conv_integer_string_16.js ================================================ uint("0xghj"); ================================================ FILE: test/vm/fails/invalid_conv_integer_string_2.js ================================================ uint("0b23456789"); ================================================ FILE: test/vm/fails/invalid_erase.js ================================================ var test = [1, 2, 3]; erase(test, 2); ================================================ FILE: test/vm/fails/invalid_fail.js ================================================ fail(123); ================================================ FILE: test/vm/fails/invalid_greater_equal.js ================================================ const res = (11 >= "111"); ================================================ FILE: test/vm/fails/invalid_greater_than.js ================================================ const res = (11 > "123"); ================================================ FILE: test/vm/fails/invalid_hex_string_0.js ================================================ binary_hex("G0"); ================================================ FILE: test/vm/fails/invalid_hex_string_1.js ================================================ binary_hex("000"); ================================================ FILE: test/vm/fails/invalid_less_equal.js ================================================ const res = (11 <= "111"); ================================================ FILE: test/vm/fails/invalid_less_than.js ================================================ const res = (0 < "1234"); ================================================ FILE: test/vm/fails/invalid_mint.js ================================================ mint(bech32("MMX"), 1 << 80); ================================================ FILE: test/vm/fails/invalid_neg_0.js ================================================ ~false; ================================================ FILE: test/vm/fails/invalid_neg_1.js ================================================ ~"test"; ================================================ FILE: test/vm/fails/invalid_op_add.js ================================================ 1 + "test"; ================================================ FILE: test/vm/fails/invalid_op_div.js ================================================ 1 / "test"; ================================================ FILE: test/vm/fails/invalid_op_mod.js ================================================ 1 % "test"; ================================================ FILE: test/vm/fails/invalid_op_mul.js ================================================ 1 * "test"; ================================================ FILE: test/vm/fails/invalid_op_set.js ================================================ var map; map[123] = true; ================================================ FILE: test/vm/fails/invalid_op_sub.js ================================================ 1 - "test"; ================================================ FILE: test/vm/fails/invalid_rcall.js ================================================ rcall("test", "func", 1, false, []); ================================================ FILE: test/vm/fails/invalid_read.js ================================================ read(bech32(), "field"); ================================================ FILE: test/vm/fails/invalid_send_0.js ================================================ send(bech32("MMX"), 1 << 128); ================================================ FILE: test/vm/fails/invalid_send_1.js ================================================ send(bech32("MMX"), 1, bech32("MMX")); ================================================ FILE: test/vm/fails/invalid_size.js ================================================ size(123); ================================================ FILE: test/vm/fails/key_size_overflow.js ================================================ var key = "0123456789ABCDEF"; for(var i = 0; i < 8; ++i) { key = concat(key, key); } key = concat(key, "."); var map = {}; map[key] = 1; ================================================ FILE: test/vm/fails/mod_by_zero.js ================================================ 1 % 0; ================================================ FILE: test/vm/fails/modify_balance.js ================================================ this.balance[bech32()] = 1337; ================================================ FILE: test/vm/fails/modify_user.js ================================================ __copy(this.user, bech32()); ================================================ FILE: test/vm/fails/null_map_key.js ================================================ var map = {}; map[null] = null; ================================================ FILE: test/vm/fails/out_of_bounds_array_set.js ================================================ var array = []; array[1111] = true; ================================================ FILE: test/vm/fails/out_of_bounds_memcpy.js ================================================ memcpy("ABC", 1, 4); ================================================ FILE: test/vm/fails/read_fail.js ================================================ var test = 0; delete(test); test++; ================================================ FILE: test/vm/fails/recursive_loop.js ================================================ function func(a, b, c, d) { func(a, b, c, d); } func(1, 2, 3, 4); ================================================ FILE: test/vm/fails/value_size_overflow.js ================================================ var value = "0123456789ABCDEF"; for(var i = 0; i < 29; ++i) { value = concat(value, value); } value = null; ================================================ FILE: test/vm/storage_tests.cpp ================================================ /* * storage_tests.cpp * * Created on: Apr 23, 2024 * Author: mad */ #include #include #include #include #include #include #include #include using namespace mmx; void expect(const vm::var_t* got, const vm::var_t* want) { if(compare(got, want)) { throw std::logic_error("expected " + to_string(want) + " but got " + to_string(got)); } } void expect(const vm::var_t* got, const vm::var_t& want) { expect(got, &want); } void expect(const vm::var_t* got, vm::varptr_t want) { expect(got, want.get()); } std::shared_ptr new_engine(std::shared_ptr storage, bool read_only) { auto engine = std::make_shared(addr_t(), storage, read_only); engine->gas_limit = 1000000; engine->init(); return engine; } int main(int argc, char** argv) { vnx::test::init("mmx.vm.storage"); auto db = std::make_shared(1); auto storage = std::make_shared("tmp/", db); VNX_TEST_BEGIN("stack") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STACK, vm::uint_t(1337)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, true); expect(engine->read(vm::MEM_STACK), nullptr); } } VNX_TEST_END() VNX_TEST_BEGIN("heap") { db->revert(0); uint64_t addr = 0; { auto engine = new_engine(storage, false); addr = engine->alloc(); engine->write(addr, vm::uint_t(1337)); engine->write(vm::MEM_STATIC, vm::ref_t(addr)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, true); const auto ref = engine->read(vm::MEM_STATIC); vnx::test::expect(bool(ref), true); const auto value = engine->read(vm::to_ref(ref)); expect(value, vm::uint_t(1337)); } { auto engine = new_engine(storage, false); engine->erase(vm::MEM_STATIC); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, true); expect(engine->read(vm::MEM_STATIC), nullptr); expect(engine->read(addr), vm::uint_t(1337)); } } VNX_TEST_END() VNX_TEST_BEGIN("heap_erase") { db->revert(0); uint64_t addr = 0; uint64_t addr2 = 0; { auto engine = new_engine(storage, false); addr = engine->alloc(); engine->write(addr, vm::uint_t(1337)); engine->write(vm::MEM_STATIC, vm::ref_t(addr)); expect(engine->read(addr), vm::uint_t(1337)); addr2 = engine->alloc(); engine->write(addr2, vm::uint_t(11)); engine->write(vm::MEM_STATIC, vm::ref_t(addr2)); expect(engine->read(addr), nullptr); engine->erase(vm::MEM_STATIC); expect(engine->read(vm::MEM_STATIC), nullptr); expect(engine->read(addr2), nullptr); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, true); expect(engine->read(vm::MEM_STATIC), nullptr); expect(engine->read(addr), nullptr); expect(engine->read(addr2), nullptr); } } VNX_TEST_END() VNX_TEST_BEGIN("heap_recursive_erase") { db->revert(0); uint64_t addr = 0; uint64_t addr2 = 0; { auto engine = new_engine(storage, false); addr = engine->alloc(); addr2 = engine->alloc(); engine->write(addr, vm::map_t()); engine->write(addr2, vm::map_t()); engine->write(vm::MEM_STATIC, vm::ref_t(addr)); engine->write_key(addr, vm::uint_t(1337), vm::ref_t(addr2)); engine->write_key(addr2, vm::uint_t(1337), vm::uint_t(1337)); expect(engine->read_key(addr2, vm::uint_t(1337)), vm::uint_t(1337)); engine->erase(vm::MEM_STATIC); expect(engine->read(vm::MEM_STATIC), nullptr); expect(engine->read(addr), nullptr); expect(engine->read(addr2), nullptr); expect(engine->read_key(addr2, vm::uint_t(1337)), nullptr); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, true); expect(engine->read(vm::MEM_STATIC), nullptr); expect(engine->read(addr), nullptr); expect(engine->read(addr2), nullptr); expect(engine->read_key(addr2, vm::uint_t(1337)), nullptr); } } VNX_TEST_END() VNX_TEST_BEGIN("lookup") { db->revert(0); { auto engine = new_engine(storage, false); const auto key = engine->lookup(vm::to_binary("test"), false); engine->write(vm::MEM_STATIC, vm::map_t()); vnx::test::expect(vm::to_ref(engine->read(vm::MEM_STATIC)), vm::MEM_STATIC); engine->write_key(vm::MEM_STATIC, key, vm::uint_t(1337)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, true); const auto key = engine->lookup(vm::to_binary("test"), true); const auto value = engine->read_key(vm::MEM_STATIC, key); expect(value, vm::uint_t(1337)); } } VNX_TEST_END() VNX_TEST_BEGIN("over_write") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::uint_t(1337)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::uint_t(11337)); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, true); const auto value = engine->read(vm::MEM_STATIC); expect(value, vm::uint_t(11337)); } } VNX_TEST_END() VNX_TEST_BEGIN("array") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::array_t()); vnx::test::expect(vm::to_ref(engine->read(vm::MEM_STATIC)), vm::MEM_STATIC); engine->push_back(vm::MEM_STATIC, vm::uint_t(1)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, false); vnx::test::expect(vm::to_ref(engine->read(vm::MEM_STATIC)), vm::MEM_STATIC); engine->push_back(vm::MEM_STATIC, vm::to_binary("test")); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, true); const auto value = engine->read(vm::MEM_STATIC); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_ARRAY); auto array = (vm::array_t*)value; vnx::test::expect(array->size, 2u); expect(engine->read_entry(vm::MEM_STATIC, 0), vm::uint_t(1)); expect(engine->read_entry(vm::MEM_STATIC, 1), vm::to_binary("test")); engine->copy(vm::MEM_STACK, vm::MEM_STATIC); { const auto value = engine->read(vm::MEM_STACK); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_ARRAY); auto array = (vm::array_t*)value; vnx::test::expect(array->size, 2u); expect(engine->read_entry(vm::MEM_STACK, 0), vm::uint_t(1)); expect(engine->read_entry(vm::MEM_STACK, 1), vm::to_binary("test")); } } { auto engine = new_engine(storage, false); engine->pop_back(vm::MEM_STACK, vm::MEM_STATIC); expect(engine->read(vm::MEM_STACK), vm::to_binary("test")); engine->commit(); } db->commit(3); { auto engine = new_engine(storage, true); const auto value = engine->read(vm::MEM_STATIC); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_ARRAY); auto array = (vm::array_t*)value; vnx::test::expect(array->size, 1u); expect(engine->read_entry(vm::MEM_STATIC, 0), vm::uint_t(1)); } } VNX_TEST_END() VNX_TEST_BEGIN("map") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::map_t()); const auto value = engine->read(vm::MEM_STATIC); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_MAP); vnx::test::expect(vm::to_ref(value), vm::MEM_STATIC); engine->write_key(vm::MEM_STATIC, vm::uint_t(1), vm::var_t(vm::TYPE_TRUE)); engine->write_key(vm::MEM_STATIC, vm::to_binary(addr_t()), vm::to_binary(addr_t())); engine->copy(vm::MEM_STACK, vm::MEM_STATIC); { const auto value = engine->read(vm::MEM_STACK); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_MAP); vnx::test::expect(vm::to_ref(value), vm::MEM_STACK); expect(engine->read_key(vm::MEM_STACK, vm::uint_t(1)), vm::var_t(vm::TYPE_TRUE)); expect(engine->read_key(vm::MEM_STACK, vm::to_binary(addr_t())), vm::to_binary(addr_t())); } engine->commit(); } db->commit(1); { auto engine = new_engine(storage, false); const auto value = engine->read(vm::MEM_STATIC); vnx::test::expect(bool(value), true); vnx::test::expect(value->type, vm::TYPE_MAP); vnx::test::expect(vm::to_ref(value), vm::MEM_STATIC); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1)), vm::var_t(vm::TYPE_TRUE)); expect(engine->read_key(vm::MEM_STATIC, vm::to_binary(addr_t())), vm::to_binary(addr_t())); engine->write_key(vm::MEM_STATIC, vm::uint_t(1), vm::uint_t(2)); engine->write_key(vm::MEM_STATIC, vm::to_binary(addr_t()), vm::to_binary(hash_t("test"))); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, true); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1)), vm::uint_t(2)); expect(engine->read_key(vm::MEM_STATIC, vm::to_binary(addr_t())), vm::to_binary(hash_t("test"))); } { auto engine = new_engine(storage, false); engine->erase_key(vm::MEM_STATIC, engine->lookup(vm::uint_t(1), true)); engine->erase_key(vm::MEM_STATIC, engine->lookup(vm::to_binary(addr_t()), true)); engine->commit(); } db->commit(3); { auto engine = new_engine(storage, false); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1)), nullptr); expect(engine->read_key(vm::MEM_STATIC, vm::to_binary(addr_t())), nullptr); engine->write_key(vm::MEM_STATIC, vm::uint_t(1), vm::uint_t(3)); engine->write_key(vm::MEM_STATIC, vm::to_binary(addr_t()), nullptr); engine->commit(); } db->commit(4); { auto engine = new_engine(storage, true); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1)), vm::uint_t(3)); expect(engine->read_key(vm::MEM_STATIC, vm::to_binary(addr_t())), vm::var_t()); } } VNX_TEST_END() VNX_TEST_BEGIN("delete_write") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::uint_t(1337)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, false); expect(engine->read(vm::MEM_STATIC), vm::uint_t(1337)); engine->erase(vm::MEM_STATIC); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, false); expect(engine->read(vm::MEM_STATIC), nullptr); engine->write(vm::MEM_STATIC, vm::uint_t(11337)); expect(engine->read(vm::MEM_STATIC), vm::uint_t(11337)); engine->commit(); } db->commit(3); { auto engine = new_engine(storage, true); expect(engine->read(vm::MEM_STATIC), vm::uint_t(11337)); } } VNX_TEST_END() VNX_TEST_BEGIN("delete_write_key") { db->revert(0); { auto engine = new_engine(storage, false); engine->write(vm::MEM_STATIC, vm::map_t()); engine->write_key(vm::MEM_STATIC, vm::uint_t(1337), vm::uint_t(11)); engine->commit(); } db->commit(1); { auto engine = new_engine(storage, false); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1337)), vm::uint_t(11)); engine->erase_key(vm::MEM_STATIC, engine->lookup(vm::uint_t(1337), true)); engine->commit(); } db->commit(2); { auto engine = new_engine(storage, false); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1337)), nullptr); engine->write_key(vm::MEM_STATIC, vm::uint_t(1337), vm::uint_t(111)); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1337)), vm::uint_t(111)); engine->commit(); } db->commit(3); { auto engine = new_engine(storage, true); expect(engine->read_key(vm::MEM_STATIC, vm::uint_t(1337)), vm::uint_t(111)); } } VNX_TEST_END() return vnx::test::done(); } ================================================ FILE: test/vm/test_execute.cpp ================================================ /* * test_execute.cpp * * Created on: Oct 23, 2024 * Author: mad */ #include #include #include #include #include #include using namespace mmx; int main(int argc, char** argv) { mmx::secp256k1_init(); std::map options; options["f"] = "file"; options["n"] = "repeat"; options["file"] = "binary file"; options["gas"] = "gas limit"; options["assert-fail"] = "assert fail"; vnx::write_config("log_level", 2); vnx::init("test_execute", argc, argv, options); uint64_t gas_limit = 25 * 1000 * 1000; std::string network = "mainnet"; std::string file_name = "binary"; vnx::read_config("file", file_name); vnx::read_config("gas", gas_limit); try { std::shared_ptr binary; if(file_name == "binary") { vnx::Memory data; std::vector buffer(4096); while(std::cin.read(buffer.data(), buffer.size()) || std::cin.gcount() > 0) { const auto bytes_read = std::cin.gcount(); ::memcpy(data.add_chunk(bytes_read), buffer.data(), bytes_read); } vnx::MemoryInputStream stream(&data); vnx::TypeInput in(&stream); vnx::read(in, binary); } else if(file_name == "json") { vnx::read(std::cin).to(binary); } else { binary = vnx::read_from_file(file_name); } if(!binary) { throw std::logic_error("failed to read file: " + file_name); } auto storage = std::make_shared(); auto engine = std::make_shared(hash_t("__test"), storage, false); engine->gas_limit = gas_limit; vm::load(engine, binary); engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::var_t()); engine->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(engine->contract)); engine->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(network)); engine->write(vm::MEM_EXTERN + vm::EXTERN_HEIGHT, vm::uint_t(0)); engine->begin(0); try { engine->run(); engine->commit(); } catch(const std::exception& ex) { std::cerr << "Failed at " << vm::to_hex(engine->error_addr) << " line " << vnx::to_string(binary->find_line(engine->error_addr)) << " with: " << ex.what() << " (code " << engine->error_code << ")" << std::endl; } } catch(const std::exception& ex) { std::cerr << ex.what() << std::endl; } vnx::close(); mmx::secp256k1_free(); return 0; } ================================================ FILE: test/vm/test_nft.js ================================================ interface __test; interface nft; const nft_binary = __test.compile("src/contract/nft.js"); const creator = "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"; const nft_addr = nft.__deploy({ __type: "mmx.contract.Executable", binary: nft_binary, init_args: [creator] }); const wallet = "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns"; nft.mint_to(wallet, null, {__test: 1, assert_fail: true}); nft.mint_to(wallet, null, {__test: 1, user: creator}); nft.mint_to(wallet, null, {__test: 1, user: creator, assert_fail: true}); assert(__test.get_balance(wallet, nft_addr) == 1); ================================================ FILE: test/vm/test_nft_n.js ================================================ interface __test; interface template; interface nft_1; interface nft_2; interface nft_test; const nft_binary = __test.compile("src/contract/nft.js"); const template_binary = __test.compile("src/contract/template.js"); const creator_skey = sha256("skey"); const creator_key = __test.get_public_key(creator_skey); const creator_key_hex = string_hex(creator_key); const creator = string_bech32(sha256(creator_key)); const template_addr = template.__deploy({ __type: "mmx.contract.Executable", binary: template_binary, init_args: [creator] }); const msg_0 = concat(string_bech32(template_addr), "/", string(0)); const signature_0 = string_hex(__test.ecdsa_sign(creator_skey, sha256(msg_0))); // fail due to serial 0 nft_1.__deploy({ __type: "mmx.contract.Executable", binary: nft_binary, depends: {template: template_addr}, init_method: "init_n", init_args: [creator_key_hex, 0, signature_0, {__test: 1, assert_fail: true}] }); const msg_1 = concat(string_bech32(template_addr), "/", string(1)); const signature_1 = string_hex(__test.ecdsa_sign(creator_skey, sha256(msg_1))); const nft_1_addr = nft_1.__deploy({ __type: "mmx.contract.Executable", binary: nft_binary, depends: {template: template_addr}, init_method: "init_n", init_args: [creator_key_hex, 1, signature_1] }); // fail due to duplicate serial nft_test.__deploy({ __type: "mmx.contract.Executable", binary: nft_binary, depends: {template: template_addr}, init_method: "init_n", init_args: [creator_key_hex, 1, signature_1, {__test: 1, assert_fail: true}] }); const msg_2 = concat(string_bech32(template_addr), "/", string(2)); const signature_2 = string_hex(__test.ecdsa_sign(creator_skey, sha256(msg_2))); const nft_2_addr = nft_2.__deploy({ __type: "mmx.contract.Executable", binary: nft_binary, depends: {template: template_addr}, init_method: "init_n", init_args: [creator_key_hex, 2, signature_2] }); ================================================ FILE: test/vm/test_offer.js ================================================ interface __test; interface offer; const MMX = string_bech32(bech32()); const USD = string_bech32(sha256("USD")); const binary = __test.compile("src/contract/offer.js"); const owner = "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"; var price = (1 << 64) / 2; const offer_addr = offer.__deploy({ __type: "mmx.contract.Executable", binary: binary, init_args: [owner, MMX, USD, string(price), null] }); __test.send(offer_addr, 10000000, MMX); const user = "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns"; offer.trade(user, string(price), {__test: 1, assert_fail: true}); offer.trade(user, string(price), {__test: 1, assert_fail: true, deposit: [1000, MMX]}); offer.trade(user, string(price), {__test: 1, assert_fail: true, deposit: [1000000000000000, USD]}); offer.trade(user, "0x000000000", {__test: 1, assert_fail: true, deposit: [1000000, USD]}); offer.trade(user, string(price), {__test: 1, deposit: [1000000, USD]}); assert(__test.get_balance(user, MMX) = 500000); price = (1 << 64); offer.set_price(string(price), {__test: 1, user: owner, assert_fail: true}); __test.inc_height(1080); offer.set_price(string(price), {__test: 1, user: owner}); offer.trade(user, string(price), {__test: 1, deposit: [1000000, USD]}); assert(__test.get_balance(user, MMX) = 1500000); __test.inc_height(1080); price = (100 << 64); offer.set_price(string(price), {__test: 1, user: owner}); ================================================ FILE: test/vm/test_plot_nft.js ================================================ interface __test; interface plot_nft; const MMX = string_bech32(bech32()); const binary = __test.compile("src/contract/plot_nft.js"); const owner = "mmx1kx69pm743rshqac5lgcstlr8nq4t93hzm8gumkkxmp5y9fglnkes6ve09z"; const plot_nft_addr = plot_nft.__deploy({ __type: "mmx.contract.Executable", binary: binary, init_args: [owner] }); plot_nft.check_owner({__test: 1, user: owner}); plot_nft.check_owner({__test: 1, user: bech32(owner)}); plot_nft.check_owner({__test: 1, assert_fail: true}); assert(plot_nft.is_locked() == false); assert(__test.get_balance(plot_nft_addr, bech32()) == 0); const farmer = "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns"; assert(plot_nft.mmx_reward_target(null) == owner); assert(plot_nft.mmx_reward_target(farmer) == farmer); const pool_target = "mmx1uj2dth7r9tcn3vas42f0hzz74dkz8ygv59mpx44n7px7j7yhvv4sfmkf0d"; plot_nft.lock(pool_target, null, {__test: 1, user: owner}); assert(plot_nft.is_locked() == true); assert(plot_nft.mmx_reward_target(null) == pool_target); assert(plot_nft.mmx_reward_target(farmer) == pool_target); plot_nft.set_server_url("http://pool.mmx.network", {__test: 1, user: owner}); __test.send(plot_nft_addr, 500000, MMX); plot_nft.claim_all(MMX, {__test: 1, user: owner, assert_fail: true}); plot_nft.claim_all(MMX, {__test: 1, user: pool_target}); assert(__test.get_balance(pool_target, MMX) == 500000); plot_nft.unlock({__test: true, user: owner}); assert(plot_nft.is_locked() == true); __test.inc_height(1); assert(plot_nft.is_locked() == true); __test.inc_height(255); assert(plot_nft.is_locked() == false); assert(plot_nft.mmx_reward_target(null) == owner); assert(plot_nft.mmx_reward_target(farmer) == farmer); __test.send(plot_nft_addr, 500000, MMX); plot_nft.claim_all(MMX, {__test: 1, user: owner}); plot_nft.claim_all(MMX, {__test: 1, user: pool_target, assert_fail: true}); assert(__test.get_balance(owner, MMX) == 500000); __test.inc_height(100); assert(plot_nft.is_locked() == false); plot_nft.lock(pool_target, null, {__test: 1, user: owner}); assert(plot_nft.is_locked() == true); assert(plot_nft.mmx_reward_target(null) == pool_target); assert(plot_nft.mmx_reward_target(farmer) == pool_target); __test.inc_height(100); assert(plot_nft.is_locked() == true); const new_owner = "mmx1rc6ezc4pmjw2vx7m7t63cl3qz6na56nnuywweekt88ds2j6q3c0qvy4qmr"; plot_nft.transfer(new_owner, null, {__test: 1, user: owner}); plot_nft.unlock({__test: true, user: owner, assert_fail: true}); plot_nft.unlock({__test: true, user: new_owner}); ================================================ FILE: test/vm/test_poker.js ================================================ import {equals} from "std"; interface __test; interface poker; const poker_binary = __test.compile("src/contract/poker.js"); const poker_addr = poker.__deploy({ __type: "mmx.contract.Executable", binary: poker_binary, init_args: [] }); function main() { { const rank = poker.get_rank([["2", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]]); assert(rank[0] == 0); // High Card } { const rank = poker.get_rank([["4", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]]); assert(rank[0] == 1); // One Pair } { const rank = poker.get_rank([["4", "H"], ["4", "D"], ["7", "C"], ["7", "S"], ["J", "H"]]); assert(rank[0] == 2); // Two Pair } { const rank = poker.get_rank([["6", "H"], ["6", "D"], ["6", "C"], ["9", "S"], ["J", "H"]]); assert(rank[0] == 3); // Three of a Kind } { const rank = poker.get_rank([["A", "H"], ["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"]]); assert(rank[0] == 4); // Ace Low Straight } { const rank = poker.get_rank([["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"], ["6", "H"]]); assert(rank[0] == 5); // Straight } { const rank = poker.get_rank([["2", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]]); assert(rank[0] == 6); // Flush } { const rank = poker.get_rank([["3", "D"], ["3", "H"], ["3", "S"], ["5", "C"], ["5", "H"]]); assert(rank[0] == 7); // Full House } { const rank = poker.get_rank([["9", "H"], ["9", "D"], ["9", "C"], ["9", "S"], ["K", "H"]]); assert(rank[0] == 8); // Four of a Kind } { const rank = poker.get_rank([["A", "H"], ["2", "H"], ["3", "H"], ["4", "H"], ["5", "H"]]); assert(rank[0] == 9); // Ace Low Straight Flush } { const rank = poker.get_rank([["5", "S"], ["6", "S"], ["7", "S"], ["8", "S"], ["9", "S"]]); assert(rank[0] == 10); // Straight Flush } { const rank = poker.get_rank([["10", "S"], ["J", "S"], ["Q", "S"], ["K", "S"], ["A", "S"]]); assert(rank[0] == 10); // Royal Flush } assert(poker.check_win( [["2", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]], // High Card [["2", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]] // High Card ) == "EQ"); assert(poker.check_win( [["A", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]], // High Card [["2", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]] // High Card ) == "GT"); assert(poker.check_win( [["2", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]], // High Card [["A", "H"], ["4", "D"], ["7", "C"], ["9", "S"], ["J", "H"]] // High Card ) == "LT"); assert(poker.check_win( [["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"], ["6", "H"]], // Straight [["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"], ["6", "H"]] // Straight ) == "EQ"); assert(poker.check_win( [["2", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]], // Flush [["2", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]] // Flush ) == "EQ"); assert(poker.check_win( [["A", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]], // Flush [["2", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]] // Flush ) == "GT"); assert(poker.check_win( [["2", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]], // Flush [["A", "H"], ["5", "H"], ["8", "H"], ["J", "H"], ["K", "H"]] // Flush ) == "LT"); assert(poker.check_win( [["A", "H"], ["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"]], // Ace Low Straight [["2", "H"], ["3", "D"], ["4", "C"], ["5", "S"], ["6", "H"]] // Straight ) == "LT"); assert(poker.check_win( [["A", "H"], ["2", "H"], ["3", "H"], ["4", "H"], ["5", "H"]], // Ace Low Straight Flush [["2", "H"], ["3", "H"], ["4", "H"], ["5", "H"], ["6", "H"]] // Straight Flush ) == "LT"); } // main main(); ================================================ FILE: test/vm/test_std.js ================================================ import {equals, sort, reverse, compare} from "std"; function main() { assert(equals(1, 1)); assert(equals(1, 2) == false); assert(equals(1, true) == false); assert(equals(null, null)); assert(equals(null, false) == false); assert(equals(true, true)); assert(equals([], [])); assert(equals([1, 2], [1, 2])); assert(equals([1, 2], [1, 3]) == false); assert(equals([1, 2], [2, 1]) == false); assert(equals([1, 2], [1, 2, 3]) == false); assert(equals([1, 2, 3], [1, 2]) == false); assert(equals(sort([]), [])); assert(equals(sort([1]), [1])); assert(equals(sort([5, 2, 9, 1, 5, 6]), [1, 2, 5, 5, 6, 9])); assert(equals(sort([1, 2, 3, 4, 5, 6]), [1, 2, 3, 4, 5, 6])); assert(equals(reverse([]), [])); assert(equals(reverse([1]), [1])); assert(equals(reverse([1, 2]), [2, 1])); assert(equals(reverse([1, 2, 3]), [3, 2, 1])); assert(compare(0, 1) == "LT"); assert(compare(1, 0) == "GT"); assert(compare(1, 1) == "EQ"); assert(compare([], []) == "EQ"); assert(compare([0], [0]) == "EQ"); assert(compare([1, 2], [1, 2]) == "EQ"); assert(compare([1, 2], [1, 3]) == "LT"); assert(compare([0, 2], [1, 2]) == "LT"); assert(compare([1, 3], [1, 2]) == "GT"); assert(compare([2, 2], [1, 2]) == "GT"); assert(compare([0, 0], [1, 0]) == "LT"); assert(compare([0, 1], [0, 0]) == "GT"); } // main main(); ================================================ FILE: test_all.sh ================================================ #!/bin/bash set -e rm -rf tmp ./scripts/reset_coverage.sh echo "Unit tests [mmx_tests]" ./build/test/mmx_tests echo "Unit tests [test_database]" ./build/test/test_database echo "Unit tests [vm_engine_tests]" ./build/test/vm_engine_tests echo "Unit tests [vm_storage_tests]" ./build/test/vm_storage_tests ./test/vm/engine_tests.sh ./test/vm/contract_tests.sh ================================================ FILE: tools/CMakeLists.txt ================================================ add_executable(tx_bench tx_bench.cpp) add_executable(mmx_compile mmx_compile.cpp) add_executable(mmx_postool mmx_postool.cpp) add_executable(mmx_posbench mmx_posbench.cpp) add_executable(dump_table dump_table.cpp) add_executable(dump_binary dump_binary.cpp) add_executable(generate_passwd generate_passwd.cpp) add_executable(calc_test_rewards calc_test_rewards.cpp) target_link_libraries(tx_bench mmx_iface) target_link_libraries(mmx_compile mmx_iface mmx_vm) target_link_libraries(mmx_postool mmx_iface mmx_pos) target_link_libraries(mmx_posbench mmx_iface mmx_pos) target_link_libraries(dump_table mmx_iface mmx_db) target_link_libraries(dump_binary mmx_iface mmx_vm) target_link_libraries(generate_passwd mmx_iface) target_link_libraries(calc_test_rewards mmx_iface) install(TARGETS mmx_compile mmx_postool mmx_posbench DESTINATION bin ) install(TARGETS generate_passwd dump_binary tx_bench DESTINATION ${NODE_INSTALL_PATH}/bin ) ================================================ FILE: tools/calc_test_rewards.cpp ================================================ /* * calc_test_rewards.cpp * * Created on: Oct 10, 2022 * Author: mad */ #include #include #include #include #include #include using namespace mmx; int main(int argc, char** argv) { std::map options; options["s"] = "start"; options["e"] = "end"; options["j"] = "json"; options["r"] = "reward"; options["start"] = "height"; options["end"] = "height"; options["reward"] = "MMX"; options["timelord"] = "TL rewards"; vnx::init("calc_test_rewards", argc, argv, options); uint32_t start_height = 25000; uint32_t end_height = -1; double reward = 0; bool json = false; bool timelord = false; vnx::read_config("start", start_height); vnx::read_config("end", end_height); vnx::read_config("reward", reward); vnx::read_config("json", json); vnx::read_config("timelord", timelord); if(reward <= 0) { if(timelord) { reward = 0.01; } else { reward = 0.5; } } vnx::Handle proxy = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(":11330")); proxy->forward_list = {"Node"}; proxy.start(); NodeClient node("Node"); std::map reward_count; for(uint32_t height = start_height; height <= end_height; ++height) { const auto block = node.get_header_at(height); if(!block) { break; } if(timelord) { for(auto addr : block->vdf_reward_addr) { reward_count[addr]++; } } else { if(auto addr = block->reward_addr) { reward_count[*addr]++; } } } if(json) { std::cout << vnx::to_string(reward_count) << std::endl; } else { std::vector> sorted(reward_count.begin(), reward_count.end()); std::sort(sorted.begin(), sorted.end(), [](const std::pair& L, const std::pair& R) -> bool { return L.second > R.second; }); for(const auto& entry : sorted) { std::cout << entry.first << "\t" << entry.second << "\t" << entry.second * reward << std::endl; } } vnx::close(); return 0; } ================================================ FILE: tools/dump_binary.cpp ================================================ /* * dump_binary.cpp * * Created on: Jan 6, 2023 * Author: mad */ #include #include #include int main(int argc, char** argv) { std::map options; options["f"] = "file"; options["m"] = "method"; vnx::init("dump_binary", argc, argv, options); vnx::optional method; vnx::read_config("method", method); std::string file_name; if(vnx::read_config("file", file_name)) { if(auto bin = vnx::read_from_file(file_name)) { mmx::vm::dump_code(std::cout, bin, method); } else { std::cerr << "Not a binary!" << std::endl; } } vnx::close(); return 0; } ================================================ FILE: tools/dump_table.cpp ================================================ /* * dump_table.cpp * * Created on: Oct 22, 2023 * Author: mad */ #include int main(int argc, char** argv) { if(argc < 1) { return -1; } mmx::Table table(argv[1]); mmx::Table::Iterator iter(&table); iter.seek_begin(); while(iter.is_valid()) { const auto key = iter.key(); const auto value = iter.value(); std::cout << "[" << key->to_hex_string() << "] => " << value->to_hex_string() << std::endl; iter.next(); } std::cout << "version = " << table.current_version() << std::endl; } ================================================ FILE: tools/generate_passwd.cpp ================================================ /* * generate_passwd.cpp * * Created on: May 24, 2022 * Author: mad */ #include #include int main() { std::cout << mmx::hash_t::secure_random().to_string() << std::endl; return 0; } ================================================ FILE: tools/mmx_compile.cpp ================================================ /* * mmx_compile.cpp * * Created on: Apr 19, 2023 * Author: mad */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace mmx; int main(int argc, char** argv) { mmx::secp256k1_init(); std::map options; options["f"] = "files"; options["o"] = "output"; options["t"] = "txmode"; options["v"] = "verbose"; options["e"] = "execute"; options["n"] = "network"; options["w"] = "commit"; options["g"] = "gas"; options["O"] = "opt-level"; options["files"] = "source files"; options["output"] = "output name"; options["gas"] = "gas limit"; options["assert-fail"] = "assert fail"; vnx::write_config("log_level", 2); vnx::init("mmx_compile", argc, argv, options); compile_flags_t flags; int verbose = 0; int opt_level = 3; bool txmode = false; bool execute = false; bool commit = false; bool assert_fail = false; uint64_t gas_limit = -1; std::string network = "mainnet"; std::string output; std::vector file_names; vnx::read_config("verbose", verbose); vnx::read_config("opt-level", opt_level); vnx::read_config("txmode", txmode); vnx::read_config("execute", execute); vnx::read_config("commit", commit); vnx::read_config("network", network); vnx::read_config("output", output); vnx::read_config("files", file_names); vnx::read_config("gas", gas_limit); vnx::read_config("assert-fail", assert_fail); flags.verbose = verbose; flags.opt_level = opt_level; int ret_value = 0; std::shared_ptr binary; try { if(file_names.empty()) { std::string source; std::vector buffer(4096); while(std::cin.read(buffer.data(), buffer.size()) || std::cin.gcount() > 0) { const auto bytes_read = std::cin.gcount(); source += std::string(buffer.data(), bytes_read); } binary = vm::compile(source, flags); } else { binary = vm::compile_files(file_names, flags); } } catch(const std::exception& ex) { std::cerr << "Compilation failed with:" << std::endl << "\t" << ex.what() << std::endl; vnx::close(); return 1; } if(!output.empty()) { if(txmode) { auto tx = Transaction::create(); tx->deploy = binary; tx->network = network; tx->id = tx->calc_hash(false); tx->content_hash = tx->calc_hash(true); vnx::write_to_file(output, tx); std::cout << addr_t(tx->id).to_string() << std::endl; } else { vnx::write_to_file(output, binary); } } if(execute) { if(verbose) { std::cerr << "-------------------------------------------" << std::endl; } const auto time_begin = vnx::get_wall_time_micros(); auto storage = std::make_shared(); auto engine = std::make_shared(hash_t("__test"), storage, false); engine->is_debug = verbose; engine->gas_limit = gas_limit; uint32_t height = 0; std::map> contract_map; std::map> binary_map; engine->log_func = [](uint32_t level, const std::string& msg) { std::cout << "LOG[" << level << "] " << msg << std::endl; }; engine->event_func = [&engine](const std::string& name, const uint64_t data) { std::cout << "EVENT[" << name << "] " << vm::read(engine, data).to_string() << std::endl; }; const auto main_engine = engine; std::function, const std::string&, const std::string&, const uint32_t)> remote_call; remote_call = [verbose, network, storage, &main_engine, &height, &contract_map, &binary_map, &remote_call] (std::weak_ptr w_engine, const std::string& name, const std::string& method, const uint32_t nargs) { const auto engine = w_engine.lock(); const addr_t address = hash_t(name); std::shared_ptr exec; { auto iter = contract_map.find(address); if(iter != contract_map.end()) { exec = std::dynamic_pointer_cast(iter->second); } } const auto stack_ptr = engine->get_stack_ptr(); engine->write(stack_ptr, vm::var_t()); if(exec) { const auto cache = std::make_shared(storage); const auto child = std::make_shared(address, cache, false); child->gas_limit = engine->gas_limit; child->log_func = [](uint32_t level, const std::string& msg) { std::cout << "LOG[" << level << "] " << msg << std::endl; }; child->event_func = [&child](const std::string& name, const uint64_t data) { std::cout << "EVENT[" << name << "] " << vm::read(child, data).to_string() << std::endl; }; child->remote_call = std::bind(remote_call, child, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); child->read_contract = [&child, &contract_map] (const addr_t& address, const std::string& field, const uint64_t dst) { auto iter = contract_map.find(address); if(iter != contract_map.end()) { vm::assign(child, dst, iter->second->read_field(field)); } else { throw std::logic_error("no such contract: " + address.to_string()); } }; bool assert_fail = false; vnx::optional user = engine->contract; vnx::optional> deposit; for(uint32_t i = 0; i < nargs; ++i) { const auto src = stack_ptr + 1 + i; const auto arg = vm::read(engine, src); if(arg.is_object()) { auto opt = arg.to_object(); if(opt["__test"]) { const auto& value = opt["user"]; if(!value.empty()) { value.to(user); } if(const auto& value = opt["deposit"]) { if(value.is_object()) { auto obj = value.to_object(); deposit = std::make_pair(obj["amount"].to(), obj["currency"].to()); } else { value.to(deposit); } } opt["assert_fail"].to(assert_fail); break; } } if(engine == main_engine && !is_json(arg)) { throw std::logic_error("argument not strict json: " + arg.to_string()); } vm::copy(child, engine, vm::MEM_STACK + 1 + i, src); } if(verbose && (!user || *user != engine->contract)) { std::cout << "user = " << vnx::to_string(user) << std::endl; } if(deposit) { const auto& amount = deposit->first; const auto& currency = deposit->second; vm::set_deposit(child, currency, amount); if(verbose) { std::cout << "deposit = " << amount.to_string() << " [" << currency.to_string() << "]" << std::endl; } const auto balance = cache->get_balance(address, currency); cache->set_balance(address, currency, (balance ? *balance : uint128()) + amount); } if(user) { child->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::to_binary(*user)); } else { child->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::var_t()); } child->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(address)); child->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(network)); child->write(vm::MEM_EXTERN + vm::EXTERN_HEIGHT, vm::uint_t(height)); child->write(vm::MEM_EXTERN + vm::EXTERN_TXID, vm::to_binary(addr_t())); std::shared_ptr binary; { auto iter = binary_map.find(exec->binary); if(iter != binary_map.end()) { binary = iter->second; } } if(!binary) { throw std::logic_error("no such binary: " + exec->binary.to_string()); } const auto func = vm::find_method(binary, method); if(!func) { throw std::logic_error("no such method: " + method); } if(!func->is_payable && deposit) { throw std::logic_error("method does not allow deposit: " + method); } vm::load(child, binary); bool did_fail = true; try { vm::execute(child, *func, false); did_fail = false; } catch(const std::exception& ex) { if(verbose) { if(assert_fail) { std::cout << name << "." << method << "() failed as expected: " << ex.what() << " (code " << child->error_code << ")" << std::endl; } else { std::cerr << name << "." << method << "() failed at " << vm::to_hex(child->error_addr) << " line " << vnx::to_string(binary->find_line(child->error_addr)) << " with: " << ex.what() << " (code " << child->error_code << ")" << std::endl; } } if(!assert_fail) { throw; } } if(assert_fail) { if(!did_fail) { throw std::logic_error("expected call to fail"); } } else { if(verbose) { std::cout << name << "." << method << "() => " << vm::read(child, vm::MEM_STACK).to_string() << std::endl; } for(const auto& out : child->outputs) { if(verbose) { std::cout << ">>> " << out.amount.to_string() << " [" << out.contract.to_string() << "] to " << out.address.to_string() << std::endl; } const auto src_bal = cache->get_balance(address, out.contract); if(!src_bal || (*src_bal) < out.amount) { throw std::logic_error("insufficient funds"); } cache->set_balance(address, out.contract, (*src_bal) - out.amount); const auto dst_bal = cache->get_balance(out.address, out.contract); cache->set_balance(out.address, out.contract, (dst_bal ? *dst_bal : uint128()) + out.amount); } for(const auto& out : child->mint_outputs) { if(verbose) { std::cout << "--> " << out.amount.to_string() << " [" << out.contract.to_string() << "] to " << out.address.to_string() << std::endl; } const auto dst_bal = cache->get_balance(out.address, out.contract); cache->set_balance(out.address, out.contract, (dst_bal ? *dst_bal : uint128()) + out.amount); } vm::copy(engine, child, stack_ptr, vm::MEM_STACK); if(!func->is_const) { child->commit(); } cache->commit(); } return; } if(name != "__test") { if(method == "__deploy") { const auto contract = vm::read(engine, stack_ptr + 1).to>(); if(!contract) { throw std::logic_error("invalid __deploy()"); } const addr_t address = hash_t(name); contract_map[address] = contract; bool is_fail = false; if(auto exec = std::dynamic_pointer_cast(contract)) { engine->call(0, 3); uint32_t i = 1; for(const auto& arg : exec->init_args) { if(arg.is_object()) { auto obj = arg.to_object(); if(obj["__test"] && obj["assert_fail"].to()) { is_fail = true; } } vm::assign(engine, engine->get_stack_ptr() + i, arg); i++; } engine->remote_call(name, exec->init_method, exec->init_args.size()); engine->ret(); } if(is_fail) { if(verbose) { std::cout << "Deployment of '" << name << "' failed as expected" << std::endl; } contract_map.erase(address); } else { if(verbose) { std::cout << "Deployed '" << name << "' as " << address.to_string() << std::endl << vnx::to_pretty_string(contract); } engine->write(stack_ptr, vm::to_binary(address)); } return; } throw std::logic_error("invalid remote call: " + name + "." + method + "()"); } if(method == "set_height") { height = vm::read(engine, stack_ptr + 1).to(); if(verbose) { std::cout << "height = " << height << std::endl; } } else if(method == "inc_height") { height += vm::read(engine, stack_ptr + 1).to(); if(verbose) { std::cout << "height = " << height << std::endl; } } else if(method == "get_height") { engine->write(stack_ptr, vm::uint_t(height)); } else if(method == "get_balance") { const auto address = vm::read(engine, stack_ptr + 1).to(); const auto currency = vm::read(engine, stack_ptr + 2).to(); if(auto balance = storage->get_balance(address, currency)) { engine->write(stack_ptr, vm::uint_t(*balance)); } else { engine->write(stack_ptr, vm::uint_t()); } } else if(method == "assert") { if(!vm::read(engine, stack_ptr + 1)) { if(auto msg = vm::read(engine, stack_ptr + 2)) { throw std::logic_error("assert failed (" + msg.to_string_value() + ")"); } else { throw std::logic_error("assert failed"); } } } else if(method == "get_public_key") { const auto skey = vm::read(engine, stack_ptr + 1).to(); engine->write(stack_ptr, vm::to_binary(pubkey_t(skey))); } else if(method == "ecdsa_sign") { const auto skey = vm::read(engine, stack_ptr + 1).to(); const auto hash = vm::read(engine, stack_ptr + 2).to(); engine->write(stack_ptr, vm::to_binary(signature_t::sign(skey, hash))); } else if(method == "send") { const auto dst = vm::read(engine, stack_ptr + 1); const auto amount = engine->read_fail(stack_ptr + 2, vm::TYPE_UINT).value; const auto currency = vm::read(engine, stack_ptr + 3).to(); if(amount >> 128) { throw std::logic_error("amount too large"); } addr_t address; std::string dst_name; if(dst.is_string()) { dst_name = dst.to_string_value(); address = hash_t(dst_name); } else { address = dst.to(); dst_name = address.to_string(); } const auto balance = storage->get_balance(address, currency); storage->set_balance(address, currency, (balance ? *balance : uint128()) + amount.lower()); if(verbose) { std::cout << "--> " << amount.str(10) << " [" << currency.to_string() << "] to " << dst_name << std::endl; } } else if(method == "compile") { const auto list = vm::read(engine, stack_ptr + 1).to>(); const auto flags = vm::read(engine, stack_ptr + 2).to(); if(verbose) { std::cout << "Compiling " << vnx::to_string(list) << std::endl << vnx::to_pretty_string(flags); } const auto bin = vm::compile_files(list, flags); const addr_t addr = bin->calc_hash(); if(verbose) { std::cout << "binary = " << addr.to_string() << std::endl; } binary_map[addr] = bin; engine->write(stack_ptr, vm::to_binary(addr)); } else { throw std::logic_error("invalid __test method: " + method); } }; engine->remote_call = std::bind( remote_call, std::weak_ptr(engine), std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); vm::load(engine, binary); engine->write(vm::MEM_EXTERN + vm::EXTERN_USER, vm::var_t()); engine->write(vm::MEM_EXTERN + vm::EXTERN_ADDRESS, vm::to_binary(engine->contract)); engine->write(vm::MEM_EXTERN + vm::EXTERN_NETWORK, vm::to_binary(network)); engine->begin(0); try { engine->run(); if(commit) { engine->commit(); if(verbose) { std::cerr << "-------------------------------------------" << std::endl; storage->dump_memory(std::cerr); } } } catch(const std::exception& ex) { if(verbose || !assert_fail) { std::cerr << "Failed at " << vm::to_hex(engine->error_addr) << " line " << vnx::to_string(binary->find_line(engine->error_addr)) << " with: " << ex.what() << " (code " << engine->error_code << ")" << std::endl; } ret_value = 1; } if(assert_fail) { if(ret_value) { ret_value = 0; } else { std::cerr << "Expected execution failure on " << vnx::to_string(file_names) << std::endl; ret_value = 1; } } if(verbose) { const auto exec_time_ms = (vnx::get_wall_time_micros() - time_begin) / 1e3; std::cerr << "-------------------------------------------" << std::endl; std::cerr << "Total cost: " << engine->gas_used << std::endl; std::cerr << "Execution time: " << exec_time_ms << " ms" << std::endl; std::cerr << "Execution time cost: " << exec_time_ms / (engine->gas_used / 1e6) << " ms/MMX" << std::endl; } } vnx::close(); mmx::secp256k1_free(); return ret_value; } ================================================ FILE: tools/mmx_posbench.cpp ================================================ /* * mmx_posbench.cpp * * Created on: Feb 5, 2025 * Author: mad */ #include #include #include #include #ifdef WITH_CUDA #include #endif int main(int argc, char** argv) { std::map options; options["n"] = "iter"; options["k"] = "ksize"; options["r"] = "threads"; options["v"] = "verbose"; options["C"] = "clevel"; options["cuda"] = "flag"; options["devices"] = "CUDA devices"; options["iter"] = "number of iterations"; options["threads"] = "number of threads"; vnx::write_config("log_level", 2); vnx::init("mmx_posbench", argc, argv, options); int num_iter = 0; int num_threads = 0; int ksize = 32; int clevel = 0; bool cuda = true; bool verbose = false; std::vector cuda_devices; vnx::read_config("iter", num_iter); vnx::read_config("threads", num_threads); vnx::read_config("ksize", ksize); vnx::read_config("clevel", clevel); vnx::read_config("verbose", verbose); vnx::read_config("cuda", cuda); vnx::read_config("devices", cuda_devices); if(num_threads <= 0) { num_threads = std::max(std::thread::hardware_concurrency(), 16u); } if(num_iter <= 0) { num_iter = std::max(1 << std::max(16 - clevel, 0), 4); } std::cout << "Threads: " << num_threads << std::endl; std::cout << "Iterations: " << num_iter << std::endl; #ifdef WITH_CUDA if(cuda) { std::cout << "CUDA available: yes" << std::endl; } else { std::cout << "CUDA available: disabled" << std::endl; } mmx::pos::cuda_recompute_init(cuda, cuda_devices); std::this_thread::sleep_for(std::chrono::milliseconds(200)); // wait for CUDA alloc #else std::cout << "CUDA available: no" << std::endl; #endif vnx::ThreadPool threads(num_threads, 1000); mmx::hash_t plot_id; std::vector x_values; vnx::from_string("60C67427E27FBD77C8BDFF5EB1CC3696C08926FA12BCE8B1AE48E87099F9366B", plot_id); vnx::from_string("[3684070240, 4088919472, 4255854024, 2557705011, 2826775019, 784116104, 3002057429, 1544955509, 1600690361, 1551417277, 2728397286, 1771107893, 1187799433, 1044600637, 1880286022, 1921473397, 4059605908, 3921758377, 1663788388, 2187951111, 1469314847, 2221602546, 3049849478, 2483049477, 783906790, 1769349661, 627534699, 1664365119, 3108470239, 4050165503, 1719994423, 2296755013, 3689388662, 173076783, 178304083, 3395522713, 1454472817, 3194528037, 1512291786, 1987638418, 1143780087, 3120478614, 2855051906, 693584283, 3818941816, 4127002689, 2989697755, 3891407791, 2509655266, 4258376726, 1843252036, 3191219821, 2088352375, 213252018, 4115819364, 3175076101, 3561808706, 1948511669, 3322128563, 3750559212, 2272209440, 1293941526, 437177217, 2820197201, 3807400022, 7496129, 2683510002, 3807839482, 2233243744, 2411092355, 1331204979, 2038088672, 2167782813, 3830146105, 537456114, 2401528407, 2652250456, 2221908904, 890566783, 708924513, 2596290458, 340917615, 3250050811, 3771386335, 3494357838, 1179822413, 2341748577, 602106011, 1122065619, 252962133, 278550961, 1768804869, 669497081, 1990086308, 2491380917, 51625349, 4207300886, 3095591768, 1852131389, 609642249, 2918683512, 2059312217, 3335572914, 2736167997, 1528047374, 4124848408, 902683345, 4263117025, 108772979, 485864815, 2410357795, 908723453, 1183430568, 2815414658, 2737238764, 2669408162, 2850938826, 2890536155, 491707862, 2553723643, 1034532861, 3214153497, 3097594346, 2701020101, 678153046, 2932267943, 1365864923, 532310940, 2351720145, 4080824906, 2893128375, 2595930727, 1064911548, 3834810248, 3565525092, 163085774, 685730942, 2810511962, 2540444228, 1857924416, 4174369771, 2145288036, 587439552, 718732787, 1169724691, 3254817017, 3946843084, 954721517, 3373230078, 3637676521, 1331632982, 4086478124, 4116294100, 4120279824, 476981752, 2430423022, 220679215, 4117454286, 4166904409, 2171504903, 2001727739, 3383221100, 2596677253, 988991329, 2638232513, 1095569023, 3303068778, 1931231583, 2226576220, 1480273400, 3911488963, 1608929138, 1376754282, 61629307, 3957255986, 514129543, 2169952004, 3308565016, 3572656193, 1573653323, 961047589, 2310528924, 2099635716, 817068327, 3653864895, 4168803514, 2147588334, 2794673138, 492271828, 3268899536, 1623851505, 1985375222, 396546240, 3609981176, 2079278511, 2161006185, 2007577134, 2954139926, 1277553298, 3205868414, 4257573912, 3376256719, 4227206123, 585150605, 2904436845, 2619013042, 3125718317, 3035845111, 2049651560, 161957643, 393761167, 2783560380, 1211203226, 3313590097, 479870197, 830535414, 3613172362, 3953259697, 265953611, 1493207470, 955279780, 2133758876, 2884678190, 3234737433, 1365475005, 2908229202, 2072744826, 4263640821, 2236131683, 894009793, 307201858, 3291293763, 2184230914, 776021200, 867100221, 4032840254, 2454442006, 1289389606, 1247346023, 386849697, 1757849095, 973341783, 3958516371, 1277136670, 205471439, 2514111789, 1777386820, 1436581469, 1494466641, 512070215, 2845825157, 329403080, 1115243938, 4009264613, 3806285763, 3170487941]", x_values); for(auto& x : x_values) { x >>= clevel; } std::atomic progress {0}; const auto time_begin = mmx::get_time_ms(); for(int i = 0; i < num_iter; ++i) { threads.add_task([&]() { if(!vnx::do_run()) { return; } std::vector x_out; const auto entries = mmx::pos::compute(x_values, &x_out, plot_id, 32, clevel); if(entries.empty() || x_out.size() != entries.size() * 256) { throw std::logic_error("invalid proof"); } if((progress++) % std::max((num_iter / 100), 1) == 0) { std::cout << "."; std::cout.flush(); } }); } threads.sync(); const auto elapsed_sec = (mmx::get_time_ms() - time_begin) / 1e3; std::cout << std::endl; if(verbose) { std::cout << "Took " << elapsed_sec << " sec" << std::endl; } const double proof_time = elapsed_sec / num_iter; std::cout << "Proof time: " << proof_time << " sec (average)" << std::endl; const double max_plots_ssd = 8.0 / proof_time; const double max_plots_hdd = max_plots_ssd * 1024; const double saved_per_level = 1.0 * pow(1024, 3) / pow(1000, 3) / pow(2, 32 - ksize); // GB const double plot_size = mmx::get_effective_plot_size(ksize) / pow(1000, 3); const double plot_size_hdd = plot_size - saved_per_level * clevel; const double plot_size_ssd = plot_size / 2.5 - saved_per_level * clevel; const double max_farm_size_ssd = max_plots_ssd * plot_size_ssd / pow(1000, 2); const double max_farm_size_hdd = max_plots_hdd * plot_size_hdd / pow(1000, 2); const double GiB_factor = pow(1000, 3) / pow(1024, 3); const double PiB_factor = pow(1000, 5) / pow(1024, 5); std::cout << "Plot: k" << ksize << " C" << clevel << std::endl; std::cout << "Plot Size (SSD): " << plot_size_ssd << " GB / " << plot_size_ssd * GiB_factor << " GiB" << std::endl; std::cout << "Plot Size (HDD): " << plot_size_hdd << " GB / " << plot_size_hdd * GiB_factor << " GiB" << std::endl;; std::cout << "Max Farm Size (SSD): " << max_farm_size_ssd << " PB / " << max_farm_size_ssd * PiB_factor << " PiB" << std::endl; std::cout << "Max Farm Size (HDD): " << max_farm_size_hdd << " PB / " << max_farm_size_hdd * PiB_factor << " PiB" << std::endl; #ifdef WITH_CUDA mmx::pos::cuda_recompute_shutdown(); #endif vnx::close(); return 0; } ================================================ FILE: tools/mmx_postool.cpp ================================================ /* * mmx_postool.cpp * * Created on: Apr 5, 2024 * Author: mad */ #include #include #include #include #include #ifdef WITH_CUDA #include #endif using namespace mmx; int main(int argc, char** argv) { mmx::secp256k1_init(); std::map options; options["f"] = "file"; options["n"] = "iter"; options["r"] = "threads"; options["v"] = "verbose"; options["D"] = "verbose-debug"; options["file"] = "plot files"; options["cuda"] = "flag"; options["devices"] = "CUDA devices"; options["plotdir"] = "plot files directory"; options["iter"] = "number of iterations"; options["threads"] = "number of threads"; vnx::write_config("log_level", 2); vnx::init("mmx_postool", argc, argv, options); bool debug = false; bool verbose = false; bool cuda = true; int num_iter = 10; const auto processor_count = std::thread::hardware_concurrency(); int num_threads = processor_count ? processor_count : 16; int plot_filter = 4; int post_filter = 10; std::vector file_names; std::vector dir_names; std::vector cuda_devices; vnx::read_config("verbose-debug", debug); vnx::read_config("verbose", verbose); vnx::read_config("file", file_names); vnx::read_config("plotdir", dir_names); vnx::read_config("iter", num_iter); vnx::read_config("threads", num_threads); vnx::read_config("cuda", cuda); vnx::read_config("devices", cuda_devices); if(debug) { verbose = true; } if(verbose) { std::cout << "Threads: " << num_threads << std::endl; std::cout << "Iterations: " << num_iter << std::endl; } #ifdef WITH_CUDA if(cuda) { std::cout << "CUDA available: yes" << std::endl; } else { std::cout << "CUDA available: disabled" << std::endl; } mmx::pos::cuda_recompute_init(cuda, cuda_devices); #else std::cout << "CUDA available: no" << std::endl; #endif vnx::ThreadPool threads(num_threads, 10); struct summary_t { std::string file; bool valid = false; std::atomic num_pass {0}; std::atomic num_proof {0}; std::atomic num_fail {0}; }; std::mutex mutex; std::vector> result; for (const auto& dir_name : dir_names) { try { vnx::Directory dir(dir_name); for (const auto& file : dir.files()) { if (file && file->get_extension() == ".plot") { file_names.push_back(file->get_path()); } } } catch (const std::exception& ex) { std::cerr << "Threw: " << ex.what() << std::endl; } } for(const auto& file_name : file_names) { auto out = std::make_shared(); out->file = file_name; try { auto prover = std::make_shared(file_name); prover->debug = debug; std::cout << "--------------------------------------------------------------------------------" << std::endl; std::cout << "Checking '" << file_name << "'" << std::endl; const auto header = prover->get_header(); if(verbose) { std::cout << "Size: " << (header->has_meta ? "HDD" : "SSD") << " K" << header->ksize << " C" << prover->get_clevel() << " (" << header->plot_size / pow(1024, 3) << " GiB)" << std::endl; std::cout << "Plot ID: " << prover->get_plot_id().to_string() << std::endl; std::cout << "Farmer Key: " << header->farmer_key.to_string() << std::endl; std::cout << "Contract: " << (header->contract ? header->contract->to_string() : std::string("N/A")) << std::endl; } out->valid = true; const auto time_begin = vnx::get_wall_time_millis(); for(int iter = 0; iter < num_iter && vnx::do_run(); ++iter) { threads.add_task([iter, prover, header, out, plot_filter, post_filter, verbose, debug, &mutex]() { const auto plot_id = prover->get_plot_id(); const hash_t challenge(plot_id + std::to_string(iter)); try { const auto qualities = prover->get_qualities(challenge, plot_filter); for(const auto& entry : qualities) { try { if(!entry.valid) { throw std::runtime_error(entry.error_msg); } if(debug) { std::lock_guard lock(mutex); std::cout << "[" << iter << "] index = " << entry.index << ", meta = " << entry.meta.to_string() << std::endl; } std::vector proof; if(entry.proof.size()) { proof = entry.proof; } else { const auto res = prover->get_full_proof(entry.index); if(!res.valid) { throw std::runtime_error(entry.error_msg); } proof = res.proof; } pos::verify(proof, challenge, header->plot_id, plot_filter, 0, header->ksize, true); if(debug) { std::lock_guard lock(mutex); std::cout << "Proof " << entry.index << " passed: "; for(const auto X : proof) { std::cout << X << " "; } std::cout << std::endl; } if(pos::check_post_filter(challenge, entry.meta, post_filter)) { out->num_proof++; } out->num_pass++; } catch(const std::exception& ex) { std::lock_guard lock(mutex); std::cerr << "Threw: " << ex.what() << std::endl; out->num_fail++; } } } catch(const std::exception& ex) { std::lock_guard lock(mutex); std::cerr << "Threw: " << ex.what() << std::endl; out->num_fail++; } }); } threads.sync(); const auto time_end = vnx::get_wall_time_millis(); const auto elapsed = (time_end - time_begin) / 1e3; const auto expected = uint64_t(num_iter) << plot_filter; std::cout << "Pass: " << out->num_pass << " / " << expected << ", " << float(100 * out->num_pass) / expected << " %" << std::endl; std::cout << "Fail: " << out->num_fail << " / " << expected << ", " << float(100 * out->num_fail) / expected << " %" << std::endl; if(verbose) { std::cout << "Proofs: " << out->num_proof << ", " << float(100 * out->num_proof) / expected << " %" << std::endl; } if(prover->has_meta()) { std::cout << "Full Proof Time: " << elapsed / out->num_pass << " sec (should be less than 20)" << std::endl; } else { const auto max_time = 8.0; const auto plot_size = vnx::File(file_name).file_size(); std::cout << "Max Farm Size: " << double(plot_size) / pow(1024, 5) * max_time * out->num_pass / elapsed << " PiB (physical)" << std::endl; } if(!vnx::do_run()) { break; } } catch(const std::exception& ex) { std::cerr << "--------------------------------------------------------------------------------" << std::endl; std::cerr << "Failed to open plot " << file_name << ": " << ex.what() << std::endl; } result.push_back(out); } std::vector bad_plots; for(auto entry : result) { if(entry->num_fail > 1) { bad_plots.push_back(entry->file); } } std::cout << "--------------------------------------------------------------------------------" << std::endl; std::cout << "Bad plots: "; if(bad_plots.empty()) { std::cout << "None" << std::endl; } else { std::cout << bad_plots.size() << std::endl; for(auto file : bad_plots) { std::cout << file << std::endl; } } threads.close(); #ifdef WITH_CUDA mmx::pos::cuda_recompute_shutdown(); #endif vnx::close(); mmx::secp256k1_free(); return bad_plots.size() ? -1 : 0; } ================================================ FILE: tools/tx_bench.cpp ================================================ /* * tx_bench.cpp * * Created on: Dec 30, 2021 * Author: mad */ #include #include #include #include int main(int argc, char** argv) { std::map options; options["n"] = "node"; options["s"] = "speed"; options["j"] = "index"; options["a"] = "amount"; options["t"] = "target"; options["w"] = "swap"; options["r"] = "fee-ratio"; options["x"] = "contract"; options["node"] = "address"; options["speed"] = "TPS"; options["index"] = "0"; options["amount"] = "1000"; options["target"] = "address"; options["swap"] = "address"; options["fee-ratio"] = "1"; options["contract"] = "address"; vnx::write_config("log_level", 2); vnx::init("tx_bench", argc, argv, options); std::string node_url = ":11331"; vnx::optional target; vnx::optional swap; mmx::addr_t contract; int64_t index = 0; mmx::uint128 amount = 1000; double speed = 1; double fee_ratio = 1; vnx::read_config("node", node_url); vnx::read_config("speed", speed); vnx::read_config("index", index); vnx::read_config("amount", amount); vnx::read_config("target", target); vnx::read_config("swap", swap); vnx::read_config("fee-ratio", fee_ratio); vnx::read_config("contract", contract); const int64_t interval = 1e6 / speed; std::cout << "Sending amount " << amount << " at speed of " << speed << " TX/s" << std::endl; mmx::NodeClient node("Node"); mmx::WalletClient wallet("Wallet"); { vnx::Handle module = new vnx::Proxy("Proxy", vnx::Endpoint::from_url(node_url)); module->forward_list = {"Wallet", "Node"}; module.start_detached(); } mmx::spend_options_t spend_options; spend_options.fee_ratio = fee_ratio * 1024; size_t total = 0; size_t counter = 0; int64_t time_next = vnx::get_wall_time_micros(); int64_t last_info = time_next; while(true) { try { if(target) { wallet.send(index, amount, *target, contract, spend_options); } else if(swap) { wallet.swap_trade(index, *swap, amount, contract, nullptr, 5, spend_options); } else { wallet.send(index, amount, mmx::hash_t::random(), contract, spend_options); } counter++; total++; } catch(...) { if(vnx::do_run()) { throw; } } if(total % 1000 == 0 || !vnx::do_run()) { const auto now = vnx::get_wall_time_micros(); const auto actual = (counter * 1e6) / (now - last_info); std::cout << "Sent " << total << " total so far, speed = " << actual << " TX/s" << std::endl; last_info = now; counter = 0; } if(!vnx::do_run()) { break; } time_next += interval; const auto left = time_next - vnx::get_wall_time_micros(); if(left > 0) { std::this_thread::sleep_for(std::chrono::microseconds(left)); } } vnx::close(); return 0; } ================================================ FILE: update.sh ================================================ #!/bin/bash set -e git pull git submodule update --init --recursive ./make_devel.sh $@ ./activate.sh ================================================ FILE: vcpkg.json ================================================ { "name": "mmx-node", "dependencies": [ "zlib", "zstd", "opencl", "cuda", "secp256k1", "miniupnpc" ], "builtin-baseline":"74e6536215718009aae747d86d84b78376bf9e09", "overrides": [ { "name": "secp256k1", "version": "2017-19-10#4" } ] } ================================================ FILE: www/.gitignore ================================================ node_modules ================================================ FILE: www/explorer/public/assets/fonts/material-icons/material-icons.css ================================================ /* material-icons-regular - latin */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Material Design Icons'; font-style: normal; font-weight: 400; src: url('material-icons-v142-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } ================================================ FILE: www/explorer/public/assets/fonts/roboto/roboto.css ================================================ /* roboto-100 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 100; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-100italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 100; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-300 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 300; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-300italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 300; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-regular - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 400; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-500 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-500italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 500; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-700 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-700italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 700; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-900 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 900; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-900italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 900; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-900italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } ================================================ FILE: www/explorer/public/explorer.js ================================================ Vue.component('explore-menu', { data() { return { input: null, error: null } }, methods: { submit() { const hex = /[0-9A-Fa-f]{8}/g; if(this.input) { this.error = null; if(this.input.startsWith("mmx1")) { this.$router.push("/explore/address/" + this.input); } else if(hex.test(this.input)) { if(this.input.length == 64) { fetch(WAPI_URL + '/header?hash=' + this.input) .then(response => { if(response.ok) { this.$router.push("/explore/block/hash/" + this.input); } else { this.$router.push("/explore/transaction/" + this.input); } }); } else if(this.input.length == 66) { this.$router.push("/explore/farmer/" + this.input); } else { this.error = true; } } else if(parseInt(this.input) != NaN) { this.$router.push("/explore/block/height/" + this.input); } else { this.error = true; } } } }, template: `
{{ $t('explore_menu.blocks') }} {{ $t('explore_menu.transactions') }} {{ $t('explore_menu.farmers') }}
` }) Vue.component('blocks-table', { props: { data: [], loaded: { type: Boolean, default: true } }, computed: { headers() { return [ { text: this.$t('explore_blocks.height'), value: 'height', width: "5%"}, { text: "VDF", value: 'vdf_count' }, { text: this.$t('explore_blocks.tx'), value: 'tx_count' }, { text: this.$t('explore_blocks.k'), value: 'ksize' }, { text: this.$t('explore_blocks.score'), value: 'score' }, { text: this.$t('explore_blocks.reward'), value: 'reward' }, { text: "TX Fees", value: 'tx_fees' }, { text: this.$t('explore_blocks.size'), value: 'static_cost_ratio' }, { text: this.$t('explore_blocks.cost'), value: 'total_cost_ratio' }, { text: this.$t('explore_blocks.hash'), value: 'hash' }, ] } }, template: ` ` }) Vue.component('explore-blocks', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, methods: { update() { fetch(WAPI_URL + '/headers?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('explore-transactions', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('explore_transactions.height'), value: 'height' }, { text: this.$t('explore_transactions.type'), value: 'type' }, { text: this.$t('explore_transactions.fee'), value: 'fee' }, { text: this.$t('explore_transactions.n_in'), value: 'inputs.length' }, { text: this.$t('explore_transactions.n_out'), value: 'outputs.length' }, { text: this.$t('explore_transactions.n_op'), value: 'operations.length' }, { text: this.$t('explore_transactions.transaction_id'), value: 'transaction_id' }, { text: this.$t('account_tx_history.time'), value: 'time' }, ] } }, methods: { update() { fetch(WAPI_URL + '/transactions?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('explore-farmers', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('explore_farmers.no_blocks'), value: 'block_count'}, { text: this.$t('explore_farmers.farmer_key'), value: 'farmer_key'}, ] } }, methods: { update() { fetch(WAPI_URL + '/farmers?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('block-view', { props: { hash: String, height: Number }, data() { return { data: null, loading: false } }, methods: { update() { let url = null; if(this.hash) { url = WAPI_URL + '/block?hash=' + this.hash; } if(this.height >= 0) { url = WAPI_URL + '/block?height=' + this.height; } if(url) { this.loading = true; fetch(url) .then(response => { if(response.ok) { response.json() .then(data => { this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } } }, watch: { hash() { this.update(); }, height() { this.update(); } }, created() { this.update(); }, template: `
{{ $t('block_view.no_such_block') }}
` }) Vue.component('transaction-view', { props: { id: String }, data() { return { data: null, timer: null, loading: false } }, methods: { update() { if(this.id) { this.loading = true; fetch(WAPI_URL + '/transaction?id=' + this.id) .then(response => { if(response.ok) { response.json() .then(data => { for(const op of data.operations) { delete op.solution; } this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } } }, watch: { id() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` {{ $t('transaction_view.transaction') }} {{ id }} {{ $t('transaction_view.no_such_transaction') }} ` }) Vue.component('farmer-view', { props: { farmer_key: String, limit: Number }, data() { return { data: null, blocks: [], timer: null, loaded: false } }, methods: { update() { fetch(WAPI_URL + '/farmer?id=' + this.farmer_key) .then(response => response.json()) .then(data => { this.data = data; }); fetch(WAPI_URL + '/farmer/blocks?id=' + this.farmer_key + '&limit=' + this.limit) .then(response => response.json()) .then(data => { this.blocks = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` Farmer {{farmer_key}} ` }) Vue.component('address-view', { props: { address: String }, data() { return { data: null } }, methods: { update() { this.loading = true; fetch(WAPI_URL + '/contract?id=' + this.address) .then(response => { if(response.ok) { response.json() .then(data => { this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } }, watch: { address() { this.update(); } }, created() { this.update(); }, template: ` {{ $t('common.address') }} {{ address }}
{{ data.__type }}
` }) Vue.component('address-history-table', { props: { address: String, limit: Number, show_empty: Boolean }, data() { return { data: [], loaded: false, timer: null } }, computed: { headers() { return [ { text: this.$t('address_history_table.height'), value: 'height'}, { text: this.$t('address_history_table.type'), value: 'type'}, { text: this.$t('address_history_table.amount'), value: 'amount'}, { text: this.$t('address_history_table.token'), value: 'token'}, { text: "Transaction ID", value: 'txid'}, { text: "Memo", value: 'memo'}, { text: this.$t('address_history_table.time'), value: 'time'}, ] } }, methods: { update() { fetch(WAPI_URL + '/address/history?limit=' + this.limit + '&id=' + this.address) .then(response => response.json()) .then(data => { this.loaded = true; this.data = data; }).catch(() => { this.loaded = true; }); } }, watch: { address() { this.update(); }, limit() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('object-table', { props: { data: Object }, data() { return { tt: [], } }, methods: { stringify(value) { return JSON.stringify(value, null, 4); } }, template: `
` }) ================================================ FILE: www/explorer/public/i18n.utils.js ================================================ const availableLanguages = [ { code: "en", language: "English" }, { code: "id", language: "Bahasa Indonesia" }, { code: "de", language: "Deutsch" }, { code: "es", language: "Español" }, { code: "nl", language: "Nederlands" }, { code: "pt", language: "Português" }, { code: "ru", language: "Русский" }, { code: "uk", language: "Українська" }, { code: "zh", language: "简体中文" } ]; const defaultLocale = 'en'; const loadedLanguages = ['en'] const i18n = new VueI18n({ globalInjection: true, legacy: false, locale: 'en', fallbackLocale: 'en', messages: { 'en': mergeDeep({}, commonLocale, enLocale) } }) function setI18nLanguage(locale) { i18n.locale = locale /** * NOTE: * If you need to specify the language setting for headers, such as the `fetch` API, set it here. * The following is an example for axios. * * axios.defaults.headers.common['Accept-Language'] = locale */ document.querySelector('html').setAttribute('lang', locale) } function isObject(item) { return (item && typeof item === 'object' && !Array.isArray(item)); } function mergeDeep(target, ...sources) { if (!sources.length) return target; const source = sources.shift(); if (isObject(target) && isObject(source)) { for (const key in source) { if (isObject(source[key])) { if (!target[key]) Object.assign(target, { [key]: {} }); mergeDeep(target[key], source[key]); } else { Object.assign(target, { [key]: source[key] }); } } } return mergeDeep(target, ...sources); } function customFallback(msg) { let result = mergeDeep({}, commonLocale, enLocale, msg) return result; } function loadLanguageAsync(locale) { //console.log('loadLanguageAsync', locale); //if (i18n.locale === locale) { // return Promise.resolve(setI18nLanguage(locale)) //} if (loadedLanguages.includes(locale)) { return Promise.resolve(setI18nLanguage(locale)) } if (availableLanguages.filter( lang => lang.code == locale ).length > 0 ) { return fetch(`./locales/${locale}.json`).then( response => response.json() ).then( messages => { messages = customFallback(messages); i18n.setLocaleMessage(locale, messages); //console.log('setLocaleMessage', locale, messages); loadedLanguages.push(locale) return setI18nLanguage(locale) }, ) } else { return Promise.resolve(setI18nLanguage(locale)) } } ================================================ FILE: www/explorer/public/index.html ================================================ Explorer - MMX
================================================ FILE: www/explorer/public/index.js ================================================ const WAPI_URL = "https://rpc.mmx.network"; function validate_address(address) { return address && address.length == 62 && address.startsWith("mmx1"); } function get_short_addr(address, length) { if(!length) { length = 10; } return address.substring(0, length) + '...' + address.substring(62 - length); } function get_short_hash(hash, length) { if(!length) { length = 10; } return hash.substring(0, length) + '...' + hash.substring(64 - length); } const intl_format = new Intl.NumberFormat(navigator.language, {minimumFractionDigits: 1, maximumFractionDigits: 12}); function amount_format(value) { return intl_format.format(value); } function get_tx_type_color(type, dark = false) { if(type == "REWARD") return dark ? "lime--text" : "lime--text text--darken-2"; if(type == "RECEIVE" || type == "REWARD" || type == "VDF_REWARD") return "green--text"; if(type == "SPEND") return "red--text"; if(type == "TXFEE") return "grey--text"; return ""; } const MMX_ADDR = "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev"; const Explore = { template: `
` } const ExploreBlocks = { template: ` ` } const ExploreTransactions = { template: ` ` } const ExploreFarmers = { template: ` ` } const ExploreBlock = { template: ` ` } const ExploreFarmer = { template: ` ` } const ExploreAddress = { template: ` ` } const ExploreTransaction = { template: ` ` } Vue.component('main-menu', { methods: { toggle_dark_mode() { const value = !this.$vuetify.theme.dark; this.$vuetify.theme.dark = value; localStorage.setItem('theme_dark', value); } }, template: ` {{ $t('main_menu.explore') }} {{$vuetify.theme.dark ? 'mdi-moon-waxing-crescent' : 'mdi-white-balance-sunny'}} ` }) Vue.component('balance-table', { props: { address: String, show_empty: Boolean }, data() { return { data: [], loading: false, loaded: false, timer: null } }, computed: { headers() { return [ { text: this.$t('balance_table.balance'), value: 'total'}, { text: this.$t('balance_table.locked'), value: 'locked'}, { text: this.$t('balance_table.spendable'), value: 'spendable'}, { text: this.$t('balance_table.token'), value: 'symbol'}, { text: this.$t('balance_table.contract'), value: 'contract', width: '50%'}, ] } }, methods: { update() { this.loading = true; fetch(WAPI_URL + '/balance?id=' + this.address) .then(response => response.json()) .then(data => { this.loading = false; this.loaded = true; this.data = data.balances; }); } }, watch: { address() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('app', { computed: { colClass(){ return 'cols-12 col-xl-8 offset-xl-2'; }, fluid() { return !(this.$vuetify.breakpoint.xl || this.$vuetify.breakpoint.lg); } }, template: ` ` }) ================================================ FILE: www/explorer/public/locales/common.js ================================================ const commonLocale = { "common": { "reward_address_placeholder": "<@.lower:common.default>" }, "main_menu": { "node": "@:common.node", "wallet": "@:common.wallet" }, "node_menu": { "netspace": "@:node_common.netspace", "blocks": "@:common.blocks", "vdf_speed": "@:node_common.vdf_speed", "block_reward": "@:node_common.block_reward" }, "node_info": { "height": "@:common.height", "netspace": "@:node_common.netspace", "vdf_speed": "@:node_common.vdf_speed", "block_reward": "@:node_common.block_reward", "block_size": "@:node_common.block_size" }, "node_log": { "wallet": "@:common.wallet", "node": "@:common.node", "harvester": "@:common.harvester", }, "harvester_settings": { "harvester": "@:common.harvester" }, "node_log_table": { "time": "@:common.time", }, "node_peers": { "ip": "IP", "height": "@:common.height", "type": "@:common.type" }, "netspace_graph": { "title": "@:node_common.netspace ({0})" }, "vdf_speed_graph": { "title": "@:node_common.vdf_speed ({0})" }, "block_reward_graph": { "title": "@:node_common.block_reward ({0})" }, "tx_fees_graph": { "title": "@:node_common.tx_fees ({0})" }, "wallet_summary": { "new_wallet": "@:wallet_summary.new @:common.wallet" }, "account_menu": { "balance": "@:common.balance", "log": "@:node_menu.log" }, "account_header": { "wallet": "@:common.wallet" }, "account_addresses": { "address": "@:common.address", }, "account_send_form": { "amount": "@:common.amount", "wallet": "@:common.wallet", "confirm": "@:common.confirm", "currency": "@:common.currency" }, "wallet_settings": { "name": "@:common.name", "symbol": "@:common.symbol", "contract": "@:common.contract" }, "balance_table": { "token": "@:common.token", "balance": "@:common.balance", "contract": "@:common.contract" }, "account_balance": { "balance": "@:common.balance", "spendable": "@:balance_table.spendable", "token": "@:common.token", "contract": "@:balance_table.contract" }, "account_plots": { "balance": "@:common.balance", "address": "@:common.address" }, "account_history": { "height": "@:common.height", "type": "@:common.type", "amount": "@:common.amount", "token": "@:common.token", "address": "@:common.address", "time": "@:common.time", "link": "@:common.link" }, "account_tx_history": { "height": "@:common.height", "confirmed": "@:transaction_view.confirmed", "transaction_id": "@:explore_transactions.transaction_id", "time": "@:common.time", "status": "@:common.status", "pending": "@:common.pending", "expired": "@:common.expired", "failed": "@:common.failed" }, "account_offers": { "any": "@:common.any", "height": "@:common.height", "address": "@:common.address", "time": "@:common.time", "deposit": "@:common.deposit", "price": "@:common.price" }, "account_offer_form": { "confirm": "@:common.confirm", }, "explore_menu": { "blocks": "@:common.blocks", "transaction_id": "@:explore_transactions.transaction_id", "address": "@.lower:common.address", "placeholder": "@.lower:explore_menu.address | @.lower:explore_menu.transaction_id | @.lower:explore_menu.block_height" }, "explore_blocks": { "height": "@:common.height", "reward": "@:common.reward", "hash": "@:common.hash" }, "explore_transactions": { "height": "@:common.height", "type": "@:common.type", "fee": "@:common.fee" }, "block_view": { "height": "@:common.height", "hash": "@:common.hash", "amount": "@:common.amount", "address": "@:common.address", "reward": "@:common.reward", "time": "@:common.time", "transaction_id": "@:explore_transactions.transaction_id" }, "address_history_table": { "height": "@:common.height", "type": "@:common.type", "amount": "@:common.amount", "token": "@:common.token", "address": "@:common.address", "time": "@:common.time", "link": "@:common.link" }, "transaction_view": { "height": "@:common.height", "time": "@:common.time", "address": "@:common.address", "fee": "@:common.fee", "amount": "@:common.amount", "token": "@:common.token" }, "market_menu": { "wallet": "@:common.wallet" }, "market_offers": { "price": "@:common.price", "they_offer": "@:market_menu.they_offer", "they_ask": "@:market_menu.they_ask", "time": "@:common.time", "link": "@:common.link", "address": "@:common.address", "accept": "@:common.accept", "cancel": "@:common.cancel" }, "account_history_form": { "any": "@:common.any" }, "farmer_blocks": { "height": "@:common.height", "reward": "@:common.reward", "score": "@:explore_blocks.score", "tx_fees": "@:node_common.tx_fees", "time": "@:common.time" }, "farmer_proofs": { "height": "@:common.height", "score": "@:explore_blocks.score", "sdiff": "@:explore_blocks.sdiff", "time": "@:common.time", "plot_id": "@:block_view.plot_id", "harvester": "@:common.harvester" }, "swap": { "volume_24h": "@:swap.volume (@:swap.24h)", "volume_7d": "@:swap.volume (@:swap.7d)" } } ================================================ FILE: www/explorer/public/locales/en.js ================================================ const enLocale = { "common": { "yes": "Yes", "no": "No", "default": "default", "node": "Node", "wallet": "Wallet", "height": "Height", "blocks": "Blocks", "balance": "Balance", "name": "Name", "token": "Token", "currency": "Currency", "symbol": "Symbol", "price": "Price", "hash": "Hash", "reward": "Reward", "amount": "Amount", "address": "Address", "contract": "Contract", "type": "Type", "time": "Time", "fee": "Fee", "status": "Status", "pending": "pending", "expired": "expired", "failed": "failed", "confirm": "Confirm", "deploy": "Deploy", "create": "Create", "remove": "Remove", "accept": "Accept", "cancel": "Cancel", "transaction_has_been_sent": "Transaction has been sent", "failed_with": "Failed with", "deployed_as": "Deployed as", "any": "Any", "link": "Link", "owner": "Owner", "manage": "Manage", "harvester": "Harvester", "deposit": "Deposit", "user": "User" }, "main_menu": { "explore": "Explore", "market": "Market", "farmer": "Farmer", "exchange": "Exchange", "swap": "Swap", "settings": "Settings", "logout": "Logout" }, "node_status": { "disconnected": "Disconnected from node", "logged_off": "Logged off", "connecting": "Connecting...", "syncing": "Syncing", "synced": "Synced" }, "node_common": { "vdf_speed": "VDF Speed", "block_reward": "Block Reward", "block_size": "Block Size", "tx_fees": "Transaction Fees", "netspace": "Netspace" }, "node_menu": { "log": "Log", "peers": "Peers" }, "node_info": { "synced": "Synced", "supply": "Supply", "no_addresses": "No. Addresses" }, "farmer_info": { "virtual_balance": "Virtual Balance", "virtual_size": "Virtual Size", "physical_size": "Physical Size", "total_farm_size": "Total Farm Size" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "timelord": "TimeLord" }, "node_log_table": { "module": "Module", "message": "Message" }, "node_peers": { "version": "Version", "received": "Received", "send": "Sent", "ping": "Ping", "duration": "Duration", "credits": "Credits", "tx_gas": "TX Gas", "connection": "Connection", "outbound": "outbound", "inbound": "inbound" }, "wallet_summary": { "new": "New" }, "account_menu": { "nfts": "NFTs", "contracts": "Contracts", "addresses": "Addresses", "send": "Send", "plots": "Plots", "offer": "Offer", "history": "History", "liquidity": "Liquidity", "info": "Info", "details": "Details" }, "account_addresses": { "index": "#", "n_recv": "N(Recv)", "n_spend": "N(Spend)", "last_recv": "Last Recv", "last_spend": "Last Spend" }, "wallet_common": { "enter_passphrase": "Passphrase required" }, "account_send_form": { "source_address": "Source Address", "destination": "Destination", "destination_address": "Destination Address", "address_input": "Address Input", "send": "Send" }, "balance_table": { "locked": "Locked", "spendable": "Spendable" }, "account_balance": { "reserved": "Reserved", "show_unknown": "Show unknown" }, "account_plots": { "size": "Size", "new_plot": "New Plot", "from": "from", "to": "to", "deposit_warning": "Only 90% of the amount deposited will be returned on withdrawal, the remaining 10% is burned as fee.", "withdraw_warning": "Only 90% of the amount will be returned, the remaining 10% is burned as fee." }, "account_offers": { "offering": "Offering", "received": "Received", "status": "Status", "actions": "Actions", "revoke": "Revoke", "accepted": "Accepted", "revoked": "Revoked", "open": "Open", "deposit_to": "Deposit to" }, "account_offer_form": { "offer_amount": "Offer Amount", "offer_currency": "Offer Currency", "receive_amount": "Receive Amount", "receive_currency_contract": "Receive Currency Contract", "symbol": "Symbol", "offer": "Offer" }, "explore_menu": { "transactions": "Transactions", "farmers": "Farmers", "block_height": "block height", }, "explore_blocks": { "k": "K", "tx": "TX", "score": "Score", "tdiff": "T-Diff", "sdiff": "S-Diff", "size": "Size", "cost": "Cost" }, "explore_transactions": { "n_in": "N(in)", "n_out": "N(out)", "n_op": "N(op)", "transaction_id": "Transaction ID" }, "explore_farmers": { "no_blocks": "No. Blocks", "farmer_key": "Farmer Key" }, "block_view": { "previous": "Previous", "next": "Next", "block": "Block", "no_such_block": "No such block!", "time_diff": "Time Diff", "space_diff": "Space Diff", "vdf_iterations": "VDF Iterations", "tx_base": "TX Base", "tx_count": "TX Count", "k_size": "K Size", "proof_score": "Proof Score", "plot_id": "Plot ID", "farmer_key": "Farmer Key", "inputs": "Inputs", "outputs": "Outputs", "operations": "Operations" }, "transaction_view": { "transaction": "Transaction", "message": "Message", "confirmed": "Confirmed", "expires": "Expires", "note": "Note", "sender": "Sender", "cost": "Cost", "input": "Input", "output": "Output", "no_such_transaction": "No such transaction!" }, "create_contract_menu": { "contract_type": "Contract Type" }, "account_contract_summary": { "deposit": "Deposit", "withdraw": "Withdraw" }, "node_settings": { "gui": "GUI", "language": "Language", "theme": "Theme", "light": "Light", "dark": "Dark", "general": "General", "enable_timelord": "Enable TimeLord", "enable_timelord_reward": "Enable TimeLord Rewards (requires one more CPU core)", "verify_timelord_reward": "Verify TimeLord Rewards (disable to speed up VDF verify)", "open_port": "Open network port to allow incoming connections (UPnP)", "reward": "Reward", "farmer_reward_address": "Farmer Reward Address", "timeLord_reward_address": "TimeLord Reward Address", "restart_needed": "(restart needed to apply)", "opencl_device": "OpenCL Device", "blockchain": "Blockchain", "revert_db_to_height": "Revert DB to height", "revert": "Revert" }, "harvester_settings": { "harvester_reload_interval": "Harvester Reload Interval (sec)", "plot_directory": "Plot Directory", "add_directory": "Add Directory" }, "wallet_settings": { "token_whitelist": "Token Whitelist", "token_address": "Token Address", "add_token": "Add Token" }, "build_version": { "build": "Build", "version": "Version", "commit": "Commit" }, "create_locked_contract": { "owner_address": "Owner Address", "unlock_height": "Unlock at Chain Height" }, "create_virtual_plot_contract": { "farmer_public_key": "Farmer Public Key", "reward_address": "Reward Address (optional, for pooling)" }, "account_details": { "copy_keys_to_plotter": "Copy keys to plotter" }, "account_actions": { "reset_cache": "Reset Cache", "show_seed": "Show Seed" }, "create_account": { "account_index": "Account Index", "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "create_account": "Create Account" }, "create_wallet": { "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "use_custom_seed": "Use Custom Seed", "use_passphrase": "With Passphrase", "seed_words": "Mnemonic Seed Words (optional, 24 words)", "passphrase": "Passphrase (secure password, 10+ characters)", "placeholder": "", "create_wallet": "Create Wallet" }, "market_menu": { "they_offer": "They Offer", "they_ask": "They Ask", "anything": "Anything", "offers": "Offers", "history": "History" }, "market_offers": { "accept_offer": "Accept Offer", "wallet_ballance": "Wallet Balance", "you_send": "You send", "you_receive": "You Receive", "you_pay": "You Pay", "increase": "Increase", "trade": "Trade" }, "login": { "password_label": "Password (see PASSWD file)", "login": "Login" }, "account_history_form": { "spend": "Spend", "receive": "Receive", "reward": "Reward", "tx_fee": "TX Fee" }, "farmer_menu": { "plots": "Plots", "blocks": "Blocks", "proofs": "Proofs" }, "farmer_plots": { "type": "Type", "count": "Count", "reload_plots": "Reload Plots" }, "farmer_plot_dirs": { "path": "Path" }, "swap": { "swap": "Swap", "pool_balance": "Pool Balance", "volume": "Volume", "24h": "24h", "7d": "7 days", "apy": "APY", "trade": "Trade", "history": "History", "my_liquidity": "My Liquidity", "pool_state": "Pool State", "my_balance": "My Balance", "fees_earned": "Fees Earned", "fee_level": "Fee Level", "unlock_height": "Unlock Height", "user_total": "User Total", "token_amount": "Token Amount", "currency_amount": "Currency Amount", "price_match": "Price Match", "payout": "Payout", "switch_fee": "Switch Fee", "add_liquidity": "Add Liquidity", "remove_iquidity": "Remove Liquidity", "remove_all": "Remove All", "wallet_ballance": "Wallet Balance", "buy_amount": "Buy Amount", "sell_amount": "Sell Amount", "trade_fee_estimated": "Trade Fee (estimated)", "you_receive_estimated": "You receive (estimated)", "sell": "Sell", "buy": "Buy" }, "$vuetify": { close: 'Close', dataIterator: { pageText: '{0}-{1} of {2}', noResultsText: 'No matching records found', loadingText: 'Loading items...', }, dataTable: { itemsPerPageText: 'Rows per page:', ariaLabel: { sortDescending: ': Sorted descending. Activate to remove sorting.', sortAscending: ': Sorted ascending. Activate to sort descending.', sortNone: ': Not sorted. Activate to sort ascending.', }, sortBy: 'Sort by', }, dataFooter: { itemsPerPageText: 'Items per page:', itemsPerPageAll: 'All', nextPage: 'Next page', prevPage: 'Previous page', firstPage: 'First page', lastPage: 'Last page', }, datePicker: { itemsSelected: '{0} selected', }, noDataText: 'No data available', carousel: { prev: 'Previous visual', next: 'Next visual', }, calendar: { moreEvents: '{0} more', }, fileInput: { counter: '{0} files', counterSize: '{0} files ({1} in total)', }, } } ================================================ FILE: www/explorer/public/mount.js ================================================ const routes = [ { path: '/', redirect: "/explore" }, { path: '/explore', component: Explore, redirect: "/explore/blocks", children: [ { path: 'blocks', component: ExploreBlocks, meta: { page: 'blocks' } }, { path: 'transactions', component: ExploreTransactions, meta: { page: 'transactions' } }, { path: 'farmers', component: ExploreFarmers, meta: { page: 'farmers' } }, { path: 'block/hash/:hash', component: ExploreBlock, meta: { page: 'block' } }, { path: 'block/height/:height', component: ExploreBlock, meta: { page: 'block' } }, { path: 'farmer/:id', component: ExploreFarmer, meta: { page: 'farmer' } }, { path: 'address/:address', component: ExploreAddress, meta: { page: 'address' } }, { path: 'transaction/:id', component: ExploreTransaction, meta: { page: 'transaction' } }, ] } ] const router = new VueRouter({ routes }) var vuetify = new Vuetify({ lang: { t: (key, ...params) => i18n.t(key, params), }, }); (async () => { var locale = localStorage.getItem('language'); if (locale) { await loadLanguageAsync(locale); } else { setI18nLanguage('en'); } new Vue({ data: { nodeInfo: null }, el: '#app', vuetify: vuetify, router: router, i18n: i18n, beforeMount() { this.$vuetify.theme.dark = localStorage.getItem('theme_dark') === 'true'; } }); })(); ================================================ FILE: www/old/explorer/index.js ================================================ const express = require('express') const axios = require('axios') const {bech32, bech32m} = require('bech32') const {createProxyMiddleware} = require('http-proxy-middleware'); const app = express(); const port = 3000; const host = 'http://localhost:11380'; axios.defaults.headers.common['x-api-token'] = '94660788ae448af0a59793ad1b7d2f971406a421103f9559408b63ac560e1404'; app.set('views', './views'); app.set('view engine', 'ejs'); app.use(express.static('data')); app.use(express.static("public")); const MMX_ADDR = "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev"; function to_hex(a) { var b = a.map(function (x) { x = x.toString(16); // to hex x = ("00"+x).substr(-2); // zero-pad to 2-digits return x; }).join(''); return b; } function to_addr(array) { return bech32m.encode('mmx', bech32m.toWords(array.reverse())); } function to_balance(amount) { return amount / 1e6; } function on_error(res, ex) { console.log(ex.message); res.status(500).send(ex.message); } function parse_block(data) { let block = data; if(block.proof) { block.ksize = block.proof.ksize; block.score = block.proof.score; block.pool_key = block.proof.pool_key; block.farmer_key = block.proof.farmer_key; } block.reward = 0; block.rewards = []; if(block.tx_base) { for(const out of block.tx_base.outputs) { block.reward += out.amount; block.rewards.push({address: out.address, value: out.value}); } block.reward = to_balance(block.reward); } return block } function on_block(res, ret) { if(!ret.data) { res.status(404).send("no such block"); return; } let args = {}; args.body = 'block'; args.block = parse_block(ret.data); res.render('index', args); } async function on_recent_blocks(res, ret) { if(!ret.data) { res.status(404).send("nothing found"); return; } const height = ret.data; var blocks = []; for(let i = 0; i < 30 && i < height; i++) { try { const ret = await axios.get(host + '/wapi/header?height=' + (height - i)); blocks.push(parse_block(ret.data)); } catch(err) { break; } } let args = {}; args.body = 'recent'; args.blocks = blocks; res.render('index', args); } function on_recent_transactions(res, ret) { if(!ret.data) { res.status(404).send("nothing found"); return; } let args = {}; args.body = 'recent_transactions'; args.transactions = ret.data; res.render('index', args); } async function on_address(res, address) { let ret = null; ret = await axios.get(host + '/wapi/address?id=' + address); const contract = ret.data.contract; const all_balances = ret.data.balances; ret = await axios.get(host + '/wapi/address/history?limit=1000&id=' + address); const history = ret.data; let nfts = []; let balances = []; for(const entry of all_balances) { if(entry.is_nft) { nfts.push(entry); } else { balances.push(entry); } } let args = {}; args.body = 'address'; args.address = address; args.nfts = nfts; args.balances = balances; args.contract = contract; args.history = history; res.render('index', args); } async function on_transaction(res, tx) { let args = {}; args.body = 'transaction'; args.tx = tx; res.render('index', args); } app.get('/', (req, res) => { res.redirect('/recent'); }); app.get('/recent', (req, res) => { axios.get(host + '/api/node/get_height') .then(on_recent_blocks.bind(null, res)) .catch(on_error.bind(null, res)); }); app.get('/transactions', (req, res) => { axios.get(host + '/wapi/transactions?limit=100') .then(on_recent_transactions.bind(null, res)) .catch(on_error.bind(null, res)); }); app.get('/block', (req, res) => { if(req.query.hash) { axios.get(host + '/wapi/block?hash=' + req.query.hash) .then(on_block.bind(null, res)) .catch(on_error.bind(null, res)); } else if(req.query.height) { axios.get(host + '/wapi/block?height=' + req.query.height) .then(on_block.bind(null, res)) .catch(on_error.bind(null, res)); } else { res.status(404).send("missing hash or height param"); } }); app.get('/address', async (req, res) => { if(!req.query.addr) { res.status(404).send("missing addr param"); return; } const address = req.query.addr; on_address(res, address).catch(on_error.bind(null, res)); }); app.get('/transaction', (req, res) => { if(!req.query.id) { res.status(404).send("missing id param"); return; } axios.get(host + '/wapi/transaction?id=' + req.query.id) .then((ret) => { const tx = ret.data; if(tx) { on_transaction(res, tx).catch(on_error.bind(null, res)); } else { res.status(404).send("no such transaction"); } }) .catch(on_error.bind(null, res)); }); /* app.get('/search', (req, res) => { }); */ app.use('/api', createProxyMiddleware({target: host, changeOrigin: true})); app.listen(port, '0.0.0.0', () => { console.log(`Listening at http://0.0.0.0:${port}`); }); ================================================ FILE: www/old/explorer/package.json ================================================ { "name": "MMX-explorer", "version": "1.0.0", "description": "MMX block explorer", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Max Wittal", "license": "ISC", "dependencies": { "axios": "^0.21.4", "bech32": "^2.0.0", "ejs": "^3.1.7", "express": "^4.17.2", "http-proxy-middleware": "^1.3.1" } } ================================================ FILE: www/old/explorer/public/js/bootstrap.bundle.js ================================================ /*! * Bootstrap v5.1.3 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory()); })(this, (function () { 'use strict'; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const MAX_UID = 1000000; const MILLISECONDS_MULTIPLIER = 1000; const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) const toType = obj => { if (obj === null || obj === undefined) { return `${obj}`; } return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); }; /** * -------------------------------------------------------------------------- * Public Util Api * -------------------------------------------------------------------------- */ const getUID = prefix => { do { prefix += Math.floor(Math.random() * MAX_UID); } while (document.getElementById(prefix)); return prefix; }; const getSelector = element => { let selector = element.getAttribute('data-bs-target'); if (!selector || selector === '#') { let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes, // so everything starting with `#` or `.`. If a "real" URL is used as the selector, // `document.querySelector` will rightfully complain it is invalid. // See https://github.com/twbs/bootstrap/issues/32273 if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) { return null; } // Just in case some CMS puts out a full URL with the anchor appended if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) { hrefAttr = `#${hrefAttr.split('#')[1]}`; } selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null; } return selector; }; const getSelectorFromElement = element => { const selector = getSelector(element); if (selector) { return document.querySelector(selector) ? selector : null; } return null; }; const getElementFromSelector = element => { const selector = getSelector(element); return selector ? document.querySelector(selector) : null; }; const getTransitionDurationFromElement = element => { if (!element) { return 0; } // Get transition-duration of the element let { transitionDuration, transitionDelay } = window.getComputedStyle(element); const floatTransitionDuration = Number.parseFloat(transitionDuration); const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found if (!floatTransitionDuration && !floatTransitionDelay) { return 0; } // If multiple durations are defined, take the first transitionDuration = transitionDuration.split(',')[0]; transitionDelay = transitionDelay.split(',')[0]; return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; }; const triggerTransitionEnd = element => { element.dispatchEvent(new Event(TRANSITION_END)); }; const isElement$1 = obj => { if (!obj || typeof obj !== 'object') { return false; } if (typeof obj.jquery !== 'undefined') { obj = obj[0]; } return typeof obj.nodeType !== 'undefined'; }; const getElement = obj => { if (isElement$1(obj)) { // it's a jQuery object or a node element return obj.jquery ? obj[0] : obj; } if (typeof obj === 'string' && obj.length > 0) { return document.querySelector(obj); } return null; }; const typeCheckConfig = (componentName, config, configTypes) => { Object.keys(configTypes).forEach(property => { const expectedTypes = configTypes[property]; const value = config[property]; const valueType = value && isElement$1(value) ? 'element' : toType(value); if (!new RegExp(expectedTypes).test(valueType)) { throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`); } }); }; const isVisible = element => { if (!isElement$1(element) || element.getClientRects().length === 0) { return false; } return getComputedStyle(element).getPropertyValue('visibility') === 'visible'; }; const isDisabled = element => { if (!element || element.nodeType !== Node.ELEMENT_NODE) { return true; } if (element.classList.contains('disabled')) { return true; } if (typeof element.disabled !== 'undefined') { return element.disabled; } return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'; }; const findShadowRoot = element => { if (!document.documentElement.attachShadow) { return null; } // Can find the shadow root otherwise it'll return the document if (typeof element.getRootNode === 'function') { const root = element.getRootNode(); return root instanceof ShadowRoot ? root : null; } if (element instanceof ShadowRoot) { return element; } // when we don't find a shadow root if (!element.parentNode) { return null; } return findShadowRoot(element.parentNode); }; const noop = () => {}; /** * Trick to restart an element's animation * * @param {HTMLElement} element * @return void * * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation */ const reflow = element => { // eslint-disable-next-line no-unused-expressions element.offsetHeight; }; const getjQuery = () => { const { jQuery } = window; if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) { return jQuery; } return null; }; const DOMContentLoadedCallbacks = []; const onDOMContentLoaded = callback => { if (document.readyState === 'loading') { // add listener on the first call when the document is in loading state if (!DOMContentLoadedCallbacks.length) { document.addEventListener('DOMContentLoaded', () => { DOMContentLoadedCallbacks.forEach(callback => callback()); }); } DOMContentLoadedCallbacks.push(callback); } else { callback(); } }; const isRTL = () => document.documentElement.dir === 'rtl'; const defineJQueryPlugin = plugin => { onDOMContentLoaded(() => { const $ = getjQuery(); /* istanbul ignore if */ if ($) { const name = plugin.NAME; const JQUERY_NO_CONFLICT = $.fn[name]; $.fn[name] = plugin.jQueryInterface; $.fn[name].Constructor = plugin; $.fn[name].noConflict = () => { $.fn[name] = JQUERY_NO_CONFLICT; return plugin.jQueryInterface; }; } }); }; const execute = callback => { if (typeof callback === 'function') { callback(); } }; const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => { if (!waitForTransition) { execute(callback); return; } const durationPadding = 5; const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding; let called = false; const handler = ({ target }) => { if (target !== transitionElement) { return; } called = true; transitionElement.removeEventListener(TRANSITION_END, handler); execute(callback); }; transitionElement.addEventListener(TRANSITION_END, handler); setTimeout(() => { if (!called) { triggerTransitionEnd(transitionElement); } }, emulatedDuration); }; /** * Return the previous/next element of a list. * * @param {array} list The list of elements * @param activeElement The active element * @param shouldGetNext Choose to get next or previous element * @param isCycleAllowed * @return {Element|elem} The proper element */ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => { let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed if (index === -1) { return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0]; } const listLength = list.length; index += shouldGetNext ? 1 : -1; if (isCycleAllowed) { index = (index + listLength) % listLength; } return list[Math.max(0, Math.min(index, listLength - 1))]; }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): dom/event-handler.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const namespaceRegex = /[^.]*(?=\..*)\.|.*/; const stripNameRegex = /\..*/; const stripUidRegex = /::\d+$/; const eventRegistry = {}; // Events storage let uidEvent = 1; const customEvents = { mouseenter: 'mouseover', mouseleave: 'mouseout' }; const customEventsRegex = /^(mouseenter|mouseleave)/i; const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']); /** * ------------------------------------------------------------------------ * Private methods * ------------------------------------------------------------------------ */ function getUidEvent(element, uid) { return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++; } function getEvent(element) { const uid = getUidEvent(element); element.uidEvent = uid; eventRegistry[uid] = eventRegistry[uid] || {}; return eventRegistry[uid]; } function bootstrapHandler(element, fn) { return function handler(event) { event.delegateTarget = element; if (handler.oneOff) { EventHandler.off(element, event.type, fn); } return fn.apply(element, [event]); }; } function bootstrapDelegationHandler(element, selector, fn) { return function handler(event) { const domElements = element.querySelectorAll(selector); for (let { target } = event; target && target !== this; target = target.parentNode) { for (let i = domElements.length; i--;) { if (domElements[i] === target) { event.delegateTarget = target; if (handler.oneOff) { EventHandler.off(element, event.type, selector, fn); } return fn.apply(target, [event]); } } } // To please ESLint return null; }; } function findHandler(events, handler, delegationSelector = null) { const uidEventList = Object.keys(events); for (let i = 0, len = uidEventList.length; i < len; i++) { const event = events[uidEventList[i]]; if (event.originalHandler === handler && event.delegationSelector === delegationSelector) { return event; } } return null; } function normalizeParams(originalTypeEvent, handler, delegationFn) { const delegation = typeof handler === 'string'; const originalHandler = delegation ? delegationFn : handler; let typeEvent = getTypeEvent(originalTypeEvent); const isNative = nativeEvents.has(typeEvent); if (!isNative) { typeEvent = originalTypeEvent; } return [delegation, originalHandler, typeEvent]; } function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) { if (typeof originalTypeEvent !== 'string' || !element) { return; } if (!handler) { handler = delegationFn; delegationFn = null; } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position // this prevents the handler from being dispatched the same way as mouseover or mouseout does if (customEventsRegex.test(originalTypeEvent)) { const wrapFn = fn => { return function (event) { if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) { return fn.call(this, event); } }; }; if (delegationFn) { delegationFn = wrapFn(delegationFn); } else { handler = wrapFn(handler); } } const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn); const events = getEvent(element); const handlers = events[typeEvent] || (events[typeEvent] = {}); const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null); if (previousFn) { previousFn.oneOff = previousFn.oneOff && oneOff; return; } const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, '')); const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler); fn.delegationSelector = delegation ? handler : null; fn.originalHandler = originalHandler; fn.oneOff = oneOff; fn.uidEvent = uid; handlers[uid] = fn; element.addEventListener(typeEvent, fn, delegation); } function removeHandler(element, events, typeEvent, handler, delegationSelector) { const fn = findHandler(events[typeEvent], handler, delegationSelector); if (!fn) { return; } element.removeEventListener(typeEvent, fn, Boolean(delegationSelector)); delete events[typeEvent][fn.uidEvent]; } function removeNamespacedHandlers(element, events, typeEvent, namespace) { const storeElementEvent = events[typeEvent] || {}; Object.keys(storeElementEvent).forEach(handlerKey => { if (handlerKey.includes(namespace)) { const event = storeElementEvent[handlerKey]; removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector); } }); } function getTypeEvent(event) { // allow to get the native events from namespaced events ('click.bs.button' --> 'click') event = event.replace(stripNameRegex, ''); return customEvents[event] || event; } const EventHandler = { on(element, event, handler, delegationFn) { addHandler(element, event, handler, delegationFn, false); }, one(element, event, handler, delegationFn) { addHandler(element, event, handler, delegationFn, true); }, off(element, originalTypeEvent, handler, delegationFn) { if (typeof originalTypeEvent !== 'string' || !element) { return; } const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn); const inNamespace = typeEvent !== originalTypeEvent; const events = getEvent(element); const isNamespace = originalTypeEvent.startsWith('.'); if (typeof originalHandler !== 'undefined') { // Simplest case: handler is passed, remove that listener ONLY. if (!events || !events[typeEvent]) { return; } removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null); return; } if (isNamespace) { Object.keys(events).forEach(elementEvent => { removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1)); }); } const storeElementEvent = events[typeEvent] || {}; Object.keys(storeElementEvent).forEach(keyHandlers => { const handlerKey = keyHandlers.replace(stripUidRegex, ''); if (!inNamespace || originalTypeEvent.includes(handlerKey)) { const event = storeElementEvent[keyHandlers]; removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector); } }); }, trigger(element, event, args) { if (typeof event !== 'string' || !element) { return null; } const $ = getjQuery(); const typeEvent = getTypeEvent(event); const inNamespace = event !== typeEvent; const isNative = nativeEvents.has(typeEvent); let jQueryEvent; let bubbles = true; let nativeDispatch = true; let defaultPrevented = false; let evt = null; if (inNamespace && $) { jQueryEvent = $.Event(event, args); $(element).trigger(jQueryEvent); bubbles = !jQueryEvent.isPropagationStopped(); nativeDispatch = !jQueryEvent.isImmediatePropagationStopped(); defaultPrevented = jQueryEvent.isDefaultPrevented(); } if (isNative) { evt = document.createEvent('HTMLEvents'); evt.initEvent(typeEvent, bubbles, true); } else { evt = new CustomEvent(event, { bubbles, cancelable: true }); } // merge custom information in our event if (typeof args !== 'undefined') { Object.keys(args).forEach(key => { Object.defineProperty(evt, key, { get() { return args[key]; } }); }); } if (defaultPrevented) { evt.preventDefault(); } if (nativeDispatch) { element.dispatchEvent(evt); } if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') { jQueryEvent.preventDefault(); } return evt; } }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): dom/data.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const elementMap = new Map(); const Data = { set(element, key, instance) { if (!elementMap.has(element)) { elementMap.set(element, new Map()); } const instanceMap = elementMap.get(element); // make it clear we only want one instance per element // can be removed later when multiple key/instances are fine to be used if (!instanceMap.has(key) && instanceMap.size !== 0) { // eslint-disable-next-line no-console console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`); return; } instanceMap.set(key, instance); }, get(element, key) { if (elementMap.has(element)) { return elementMap.get(element).get(key) || null; } return null; }, remove(element, key) { if (!elementMap.has(element)) { return; } const instanceMap = elementMap.get(element); instanceMap.delete(key); // free up element references if there are no instances left for an element if (instanceMap.size === 0) { elementMap.delete(element); } } }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): base-component.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const VERSION = '5.1.3'; class BaseComponent { constructor(element) { element = getElement(element); if (!element) { return; } this._element = element; Data.set(this._element, this.constructor.DATA_KEY, this); } dispose() { Data.remove(this._element, this.constructor.DATA_KEY); EventHandler.off(this._element, this.constructor.EVENT_KEY); Object.getOwnPropertyNames(this).forEach(propertyName => { this[propertyName] = null; }); } _queueCallback(callback, element, isAnimated = true) { executeAfterTransition(callback, element, isAnimated); } /** Static */ static getInstance(element) { return Data.get(getElement(element), this.DATA_KEY); } static getOrCreateInstance(element, config = {}) { return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null); } static get VERSION() { return VERSION; } static get NAME() { throw new Error('You have to implement the static method "NAME", for each component!'); } static get DATA_KEY() { return `bs.${this.NAME}`; } static get EVENT_KEY() { return `.${this.DATA_KEY}`; } } /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/component-functions.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const enableDismissTrigger = (component, method = 'hide') => { const clickEvent = `click.dismiss${component.EVENT_KEY}`; const name = component.NAME; EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { if (['A', 'AREA'].includes(this.tagName)) { event.preventDefault(); } if (isDisabled(this)) { return; } const target = getElementFromSelector(this) || this.closest(`.${name}`); const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method instance[method](); }); }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$d = 'alert'; const DATA_KEY$c = 'bs.alert'; const EVENT_KEY$c = `.${DATA_KEY$c}`; const EVENT_CLOSE = `close${EVENT_KEY$c}`; const EVENT_CLOSED = `closed${EVENT_KEY$c}`; const CLASS_NAME_FADE$5 = 'fade'; const CLASS_NAME_SHOW$8 = 'show'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Alert extends BaseComponent { // Getters static get NAME() { return NAME$d; } // Public close() { const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE); if (closeEvent.defaultPrevented) { return; } this._element.classList.remove(CLASS_NAME_SHOW$8); const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5); this._queueCallback(() => this._destroyElement(), this._element, isAnimated); } // Private _destroyElement() { this._element.remove(); EventHandler.trigger(this._element, EVENT_CLOSED); this.dispose(); } // Static static jQueryInterface(config) { return this.each(function () { const data = Alert.getOrCreateInstance(this); if (typeof config !== 'string') { return; } if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { throw new TypeError(`No method named "${config}"`); } data[config](this); }); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ enableDismissTrigger(Alert, 'close'); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Alert to jQuery only if jQuery is present */ defineJQueryPlugin(Alert); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$c = 'button'; const DATA_KEY$b = 'bs.button'; const EVENT_KEY$b = `.${DATA_KEY$b}`; const DATA_API_KEY$7 = '.data-api'; const CLASS_NAME_ACTIVE$3 = 'active'; const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]'; const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Button extends BaseComponent { // Getters static get NAME() { return NAME$c; } // Public toggle() { // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3)); } // Static static jQueryInterface(config) { return this.each(function () { const data = Button.getOrCreateInstance(this); if (config === 'toggle') { data[config](); } }); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => { event.preventDefault(); const button = event.target.closest(SELECTOR_DATA_TOGGLE$5); const data = Button.getOrCreateInstance(button); data.toggle(); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Button to jQuery only if jQuery is present */ defineJQueryPlugin(Button); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): dom/manipulator.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ function normalizeData(val) { if (val === 'true') { return true; } if (val === 'false') { return false; } if (val === Number(val).toString()) { return Number(val); } if (val === '' || val === 'null') { return null; } return val; } function normalizeDataKey(key) { return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`); } const Manipulator = { setDataAttribute(element, key, value) { element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value); }, removeDataAttribute(element, key) { element.removeAttribute(`data-bs-${normalizeDataKey(key)}`); }, getDataAttributes(element) { if (!element) { return {}; } const attributes = {}; Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => { let pureKey = key.replace(/^bs/, ''); pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length); attributes[pureKey] = normalizeData(element.dataset[key]); }); return attributes; }, getDataAttribute(element, key) { return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`)); }, offset(element) { const rect = element.getBoundingClientRect(); return { top: rect.top + window.pageYOffset, left: rect.left + window.pageXOffset }; }, position(element) { return { top: element.offsetTop, left: element.offsetLeft }; } }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): dom/selector-engine.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const NODE_TEXT = 3; const SelectorEngine = { find(selector, element = document.documentElement) { return [].concat(...Element.prototype.querySelectorAll.call(element, selector)); }, findOne(selector, element = document.documentElement) { return Element.prototype.querySelector.call(element, selector); }, children(element, selector) { return [].concat(...element.children).filter(child => child.matches(selector)); }, parents(element, selector) { const parents = []; let ancestor = element.parentNode; while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) { if (ancestor.matches(selector)) { parents.push(ancestor); } ancestor = ancestor.parentNode; } return parents; }, prev(element, selector) { let previous = element.previousElementSibling; while (previous) { if (previous.matches(selector)) { return [previous]; } previous = previous.previousElementSibling; } return []; }, next(element, selector) { let next = element.nextElementSibling; while (next) { if (next.matches(selector)) { return [next]; } next = next.nextElementSibling; } return []; }, focusableChildren(element) { const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', '); return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el)); } }; /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$b = 'carousel'; const DATA_KEY$a = 'bs.carousel'; const EVENT_KEY$a = `.${DATA_KEY$a}`; const DATA_API_KEY$6 = '.data-api'; const ARROW_LEFT_KEY = 'ArrowLeft'; const ARROW_RIGHT_KEY = 'ArrowRight'; const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch const SWIPE_THRESHOLD = 40; const Default$a = { interval: 5000, keyboard: true, slide: false, pause: 'hover', wrap: true, touch: true }; const DefaultType$a = { interval: '(number|boolean)', keyboard: 'boolean', slide: '(boolean|string)', pause: '(string|boolean)', wrap: 'boolean', touch: 'boolean' }; const ORDER_NEXT = 'next'; const ORDER_PREV = 'prev'; const DIRECTION_LEFT = 'left'; const DIRECTION_RIGHT = 'right'; const KEY_TO_DIRECTION = { [ARROW_LEFT_KEY]: DIRECTION_RIGHT, [ARROW_RIGHT_KEY]: DIRECTION_LEFT }; const EVENT_SLIDE = `slide${EVENT_KEY$a}`; const EVENT_SLID = `slid${EVENT_KEY$a}`; const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`; const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`; const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`; const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`; const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`; const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`; const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`; const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`; const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`; const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`; const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`; const CLASS_NAME_CAROUSEL = 'carousel'; const CLASS_NAME_ACTIVE$2 = 'active'; const CLASS_NAME_SLIDE = 'slide'; const CLASS_NAME_END = 'carousel-item-end'; const CLASS_NAME_START = 'carousel-item-start'; const CLASS_NAME_NEXT = 'carousel-item-next'; const CLASS_NAME_PREV = 'carousel-item-prev'; const CLASS_NAME_POINTER_EVENT = 'pointer-event'; const SELECTOR_ACTIVE$1 = '.active'; const SELECTOR_ACTIVE_ITEM = '.active.carousel-item'; const SELECTOR_ITEM = '.carousel-item'; const SELECTOR_ITEM_IMG = '.carousel-item img'; const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; const SELECTOR_INDICATORS = '.carousel-indicators'; const SELECTOR_INDICATOR = '[data-bs-target]'; const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'; const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'; const POINTER_TYPE_TOUCH = 'touch'; const POINTER_TYPE_PEN = 'pen'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Carousel extends BaseComponent { constructor(element, config) { super(element); this._items = null; this._interval = null; this._activeElement = null; this._isPaused = false; this._isSliding = false; this.touchTimeout = null; this.touchStartX = 0; this.touchDeltaX = 0; this._config = this._getConfig(config); this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element); this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; this._pointerEvent = Boolean(window.PointerEvent); this._addEventListeners(); } // Getters static get Default() { return Default$a; } static get NAME() { return NAME$b; } // Public next() { this._slide(ORDER_NEXT); } nextWhenVisible() { // Don't call next when the page isn't visible // or the carousel or its parent isn't visible if (!document.hidden && isVisible(this._element)) { this.next(); } } prev() { this._slide(ORDER_PREV); } pause(event) { if (!event) { this._isPaused = true; } if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) { triggerTransitionEnd(this._element); this.cycle(true); } clearInterval(this._interval); this._interval = null; } cycle(event) { if (!event) { this._isPaused = false; } if (this._interval) { clearInterval(this._interval); this._interval = null; } if (this._config && this._config.interval && !this._isPaused) { this._updateInterval(); this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); } } to(index) { this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); const activeIndex = this._getItemIndex(this._activeElement); if (index > this._items.length - 1 || index < 0) { return; } if (this._isSliding) { EventHandler.one(this._element, EVENT_SLID, () => this.to(index)); return; } if (activeIndex === index) { this.pause(); this.cycle(); return; } const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV; this._slide(order, this._items[index]); } // Private _getConfig(config) { config = { ...Default$a, ...Manipulator.getDataAttributes(this._element), ...(typeof config === 'object' ? config : {}) }; typeCheckConfig(NAME$b, config, DefaultType$a); return config; } _handleSwipe() { const absDeltax = Math.abs(this.touchDeltaX); if (absDeltax <= SWIPE_THRESHOLD) { return; } const direction = absDeltax / this.touchDeltaX; this.touchDeltaX = 0; if (!direction) { return; } this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT); } _addEventListeners() { if (this._config.keyboard) { EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event)); } if (this._config.pause === 'hover') { EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event)); EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event)); } if (this._config.touch && this._touchSupported) { this._addTouchEventListeners(); } } _addTouchEventListeners() { const hasPointerPenTouch = event => { return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH); }; const start = event => { if (hasPointerPenTouch(event)) { this.touchStartX = event.clientX; } else if (!this._pointerEvent) { this.touchStartX = event.touches[0].clientX; } }; const move = event => { // ensure swiping with one touch and not pinching this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX; }; const end = event => { if (hasPointerPenTouch(event)) { this.touchDeltaX = event.clientX - this.touchStartX; } this._handleSwipe(); if (this._config.pause === 'hover') { // If it's a touch-enabled device, mouseenter/leave are fired as // part of the mouse compatibility events on first tap - the carousel // would stop cycling until user tapped out of it; // here, we listen for touchend, explicitly pause the carousel // (as if it's the second time we tap on it, mouseenter compat event // is NOT fired) and after a timeout (to allow for mouse compatibility // events to fire) we explicitly restart cycling this.pause(); if (this.touchTimeout) { clearTimeout(this.touchTimeout); } this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval); } }; SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => { EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault()); }); if (this._pointerEvent) { EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event)); EventHandler.on(this._element, EVENT_POINTERUP, event => end(event)); this._element.classList.add(CLASS_NAME_POINTER_EVENT); } else { EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event)); EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event)); EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event)); } } _keydown(event) { if (/input|textarea/i.test(event.target.tagName)) { return; } const direction = KEY_TO_DIRECTION[event.key]; if (direction) { event.preventDefault(); this._slide(direction); } } _getItemIndex(element) { this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : []; return this._items.indexOf(element); } _getItemByOrder(order, activeElement) { const isNext = order === ORDER_NEXT; return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap); } _triggerSlideEvent(relatedTarget, eventDirectionName) { const targetIndex = this._getItemIndex(relatedTarget); const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)); return EventHandler.trigger(this._element, EVENT_SLIDE, { relatedTarget, direction: eventDirectionName, from: fromIndex, to: targetIndex }); } _setActiveIndicatorElement(element) { if (this._indicatorsElement) { const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement); activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2); activeIndicator.removeAttribute('aria-current'); const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement); for (let i = 0; i < indicators.length; i++) { if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) { indicators[i].classList.add(CLASS_NAME_ACTIVE$2); indicators[i].setAttribute('aria-current', 'true'); break; } } } } _updateInterval() { const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); if (!element) { return; } const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10); if (elementInterval) { this._config.defaultInterval = this._config.defaultInterval || this._config.interval; this._config.interval = elementInterval; } else { this._config.interval = this._config.defaultInterval || this._config.interval; } } _slide(directionOrOrder, element) { const order = this._directionToOrder(directionOrOrder); const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element); const activeElementIndex = this._getItemIndex(activeElement); const nextElement = element || this._getItemByOrder(order, activeElement); const nextElementIndex = this._getItemIndex(nextElement); const isCycling = Boolean(this._interval); const isNext = order === ORDER_NEXT; const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END; const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV; const eventDirectionName = this._orderToDirection(order); if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$2)) { this._isSliding = false; return; } if (this._isSliding) { return; } const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); if (slideEvent.defaultPrevented) { return; } if (!activeElement || !nextElement) { // Some weirdness is happening, so we bail return; } this._isSliding = true; if (isCycling) { this.pause(); } this._setActiveIndicatorElement(nextElement); this._activeElement = nextElement; const triggerSlidEvent = () => { EventHandler.trigger(this._element, EVENT_SLID, { relatedTarget: nextElement, direction: eventDirectionName, from: activeElementIndex, to: nextElementIndex }); }; if (this._element.classList.contains(CLASS_NAME_SLIDE)) { nextElement.classList.add(orderClassName); reflow(nextElement); activeElement.classList.add(directionalClassName); nextElement.classList.add(directionalClassName); const completeCallBack = () => { nextElement.classList.remove(directionalClassName, orderClassName); nextElement.classList.add(CLASS_NAME_ACTIVE$2); activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName); this._isSliding = false; setTimeout(triggerSlidEvent, 0); }; this._queueCallback(completeCallBack, activeElement, true); } else { activeElement.classList.remove(CLASS_NAME_ACTIVE$2); nextElement.classList.add(CLASS_NAME_ACTIVE$2); this._isSliding = false; triggerSlidEvent(); } if (isCycling) { this.cycle(); } } _directionToOrder(direction) { if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) { return direction; } if (isRTL()) { return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT; } return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV; } _orderToDirection(order) { if (![ORDER_NEXT, ORDER_PREV].includes(order)) { return order; } if (isRTL()) { return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT; } return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT; } // Static static carouselInterface(element, config) { const data = Carousel.getOrCreateInstance(element, config); let { _config } = data; if (typeof config === 'object') { _config = { ..._config, ...config }; } const action = typeof config === 'string' ? config : _config.slide; if (typeof config === 'number') { data.to(config); } else if (typeof action === 'string') { if (typeof data[action] === 'undefined') { throw new TypeError(`No method named "${action}"`); } data[action](); } else if (_config.interval && _config.ride) { data.pause(); data.cycle(); } } static jQueryInterface(config) { return this.each(function () { Carousel.carouselInterface(this, config); }); } static dataApiClickHandler(event) { const target = getElementFromSelector(this); if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) { return; } const config = { ...Manipulator.getDataAttributes(target), ...Manipulator.getDataAttributes(this) }; const slideIndex = this.getAttribute('data-bs-slide-to'); if (slideIndex) { config.interval = false; } Carousel.carouselInterface(target, config); if (slideIndex) { Carousel.getInstance(target).to(slideIndex); } event.preventDefault(); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler); EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => { const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE); for (let i = 0, len = carousels.length; i < len; i++) { Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i])); } }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Carousel to jQuery only if jQuery is present */ defineJQueryPlugin(Carousel); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$a = 'collapse'; const DATA_KEY$9 = 'bs.collapse'; const EVENT_KEY$9 = `.${DATA_KEY$9}`; const DATA_API_KEY$5 = '.data-api'; const Default$9 = { toggle: true, parent: null }; const DefaultType$9 = { toggle: 'boolean', parent: '(null|element)' }; const EVENT_SHOW$5 = `show${EVENT_KEY$9}`; const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`; const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`; const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`; const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`; const CLASS_NAME_SHOW$7 = 'show'; const CLASS_NAME_COLLAPSE = 'collapse'; const CLASS_NAME_COLLAPSING = 'collapsing'; const CLASS_NAME_COLLAPSED = 'collapsed'; const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`; const CLASS_NAME_HORIZONTAL = 'collapse-horizontal'; const WIDTH = 'width'; const HEIGHT = 'height'; const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'; const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Collapse extends BaseComponent { constructor(element, config) { super(element); this._isTransitioning = false; this._config = this._getConfig(config); this._triggerArray = []; const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4); for (let i = 0, len = toggleList.length; i < len; i++) { const elem = toggleList[i]; const selector = getSelectorFromElement(elem); const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element); if (selector !== null && filterElement.length) { this._selector = selector; this._triggerArray.push(elem); } } this._initializeChildren(); if (!this._config.parent) { this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()); } if (this._config.toggle) { this.toggle(); } } // Getters static get Default() { return Default$9; } static get NAME() { return NAME$a; } // Public toggle() { if (this._isShown()) { this.hide(); } else { this.show(); } } show() { if (this._isTransitioning || this._isShown()) { return; } let actives = []; let activesData; if (this._config.parent) { const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth } const container = SelectorEngine.findOne(this._selector); if (actives.length) { const tempActiveData = actives.find(elem => container !== elem); activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null; if (activesData && activesData._isTransitioning) { return; } } const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5); if (startEvent.defaultPrevented) { return; } actives.forEach(elemActive => { if (container !== elemActive) { Collapse.getOrCreateInstance(elemActive, { toggle: false }).hide(); } if (!activesData) { Data.set(elemActive, DATA_KEY$9, null); } }); const dimension = this._getDimension(); this._element.classList.remove(CLASS_NAME_COLLAPSE); this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.style[dimension] = 0; this._addAriaAndCollapsedClass(this._triggerArray, true); this._isTransitioning = true; const complete = () => { this._isTransitioning = false; this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); this._element.style[dimension] = ''; EventHandler.trigger(this._element, EVENT_SHOWN$5); }; const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); const scrollSize = `scroll${capitalizedDimension}`; this._queueCallback(complete, this._element, true); this._element.style[dimension] = `${this._element[scrollSize]}px`; } hide() { if (this._isTransitioning || !this._isShown()) { return; } const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5); if (startEvent.defaultPrevented) { return; } const dimension = this._getDimension(); this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`; reflow(this._element); this._element.classList.add(CLASS_NAME_COLLAPSING); this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7); const triggerArrayLength = this._triggerArray.length; for (let i = 0; i < triggerArrayLength; i++) { const trigger = this._triggerArray[i]; const elem = getElementFromSelector(trigger); if (elem && !this._isShown(elem)) { this._addAriaAndCollapsedClass([trigger], false); } } this._isTransitioning = true; const complete = () => { this._isTransitioning = false; this._element.classList.remove(CLASS_NAME_COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSE); EventHandler.trigger(this._element, EVENT_HIDDEN$5); }; this._element.style[dimension] = ''; this._queueCallback(complete, this._element, true); } _isShown(element = this._element) { return element.classList.contains(CLASS_NAME_SHOW$7); } // Private _getConfig(config) { config = { ...Default$9, ...Manipulator.getDataAttributes(this._element), ...config }; config.toggle = Boolean(config.toggle); // Coerce string values config.parent = getElement(config.parent); typeCheckConfig(NAME$a, config, DefaultType$9); return config; } _getDimension() { return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT; } _initializeChildren() { if (!this._config.parent) { return; } const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => { const selected = getElementFromSelector(element); if (selected) { this._addAriaAndCollapsedClass([element], this._isShown(selected)); } }); } _addAriaAndCollapsedClass(triggerArray, isOpen) { if (!triggerArray.length) { return; } triggerArray.forEach(elem => { if (isOpen) { elem.classList.remove(CLASS_NAME_COLLAPSED); } else { elem.classList.add(CLASS_NAME_COLLAPSED); } elem.setAttribute('aria-expanded', isOpen); }); } // Static static jQueryInterface(config) { return this.each(function () { const _config = {}; if (typeof config === 'string' && /show|hide/.test(config)) { _config.toggle = false; } const data = Collapse.getOrCreateInstance(this, _config); if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError(`No method named "${config}"`); } data[config](); } }); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) { // preventDefault only for elements (which change the URL) not inside the collapsible element if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') { event.preventDefault(); } const selector = getSelectorFromElement(this); const selectorElements = SelectorEngine.find(selector); selectorElements.forEach(element => { Collapse.getOrCreateInstance(element, { toggle: false }).toggle(); }); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Collapse to jQuery only if jQuery is present */ defineJQueryPlugin(Collapse); var top = 'top'; var bottom = 'bottom'; var right = 'right'; var left = 'left'; var auto = 'auto'; var basePlacements = [top, bottom, right, left]; var start = 'start'; var end = 'end'; var clippingParents = 'clippingParents'; var viewport = 'viewport'; var popper = 'popper'; var reference = 'reference'; var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) { return acc.concat([placement + "-" + start, placement + "-" + end]); }, []); var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) { return acc.concat([placement, placement + "-" + start, placement + "-" + end]); }, []); // modifiers that need to read the DOM var beforeRead = 'beforeRead'; var read = 'read'; var afterRead = 'afterRead'; // pure-logic modifiers var beforeMain = 'beforeMain'; var main = 'main'; var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state) var beforeWrite = 'beforeWrite'; var write = 'write'; var afterWrite = 'afterWrite'; var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite]; function getNodeName(element) { return element ? (element.nodeName || '').toLowerCase() : null; } function getWindow(node) { if (node == null) { return window; } if (node.toString() !== '[object Window]') { var ownerDocument = node.ownerDocument; return ownerDocument ? ownerDocument.defaultView || window : window; } return node; } function isElement(node) { var OwnElement = getWindow(node).Element; return node instanceof OwnElement || node instanceof Element; } function isHTMLElement(node) { var OwnElement = getWindow(node).HTMLElement; return node instanceof OwnElement || node instanceof HTMLElement; } function isShadowRoot(node) { // IE 11 has no ShadowRoot if (typeof ShadowRoot === 'undefined') { return false; } var OwnElement = getWindow(node).ShadowRoot; return node instanceof OwnElement || node instanceof ShadowRoot; } // and applies them to the HTMLElements such as popper and arrow function applyStyles(_ref) { var state = _ref.state; Object.keys(state.elements).forEach(function (name) { var style = state.styles[name] || {}; var attributes = state.attributes[name] || {}; var element = state.elements[name]; // arrow is optional + virtual elements if (!isHTMLElement(element) || !getNodeName(element)) { return; } // Flow doesn't support to extend this property, but it's the most // effective way to apply styles to an HTMLElement // $FlowFixMe[cannot-write] Object.assign(element.style, style); Object.keys(attributes).forEach(function (name) { var value = attributes[name]; if (value === false) { element.removeAttribute(name); } else { element.setAttribute(name, value === true ? '' : value); } }); }); } function effect$2(_ref2) { var state = _ref2.state; var initialStyles = { popper: { position: state.options.strategy, left: '0', top: '0', margin: '0' }, arrow: { position: 'absolute' }, reference: {} }; Object.assign(state.elements.popper.style, initialStyles.popper); state.styles = initialStyles; if (state.elements.arrow) { Object.assign(state.elements.arrow.style, initialStyles.arrow); } return function () { Object.keys(state.elements).forEach(function (name) { var element = state.elements[name]; var attributes = state.attributes[name] || {}; var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them var style = styleProperties.reduce(function (style, property) { style[property] = ''; return style; }, {}); // arrow is optional + virtual elements if (!isHTMLElement(element) || !getNodeName(element)) { return; } Object.assign(element.style, style); Object.keys(attributes).forEach(function (attribute) { element.removeAttribute(attribute); }); }); }; } // eslint-disable-next-line import/no-unused-modules const applyStyles$1 = { name: 'applyStyles', enabled: true, phase: 'write', fn: applyStyles, effect: effect$2, requires: ['computeStyles'] }; function getBasePlacement(placement) { return placement.split('-')[0]; } // import { isHTMLElement } from './instanceOf'; function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars includeScale) { var rect = element.getBoundingClientRect(); var scaleX = 1; var scaleY = 1; // FIXME: // `offsetWidth` returns an integer while `getBoundingClientRect` // returns a float. This results in `scaleX` or `scaleY` being // non-1 when it should be for elements that aren't a full pixel in // width or height. // if (isHTMLElement(element) && includeScale) { // const offsetHeight = element.offsetHeight; // const offsetWidth = element.offsetWidth; // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale // // Fallback to 1 in case both values are `0` // if (offsetWidth > 0) { // scaleX = rect.width / offsetWidth || 1; // } // if (offsetHeight > 0) { // scaleY = rect.height / offsetHeight || 1; // } // } return { width: rect.width / scaleX, height: rect.height / scaleY, top: rect.top / scaleY, right: rect.right / scaleX, bottom: rect.bottom / scaleY, left: rect.left / scaleX, x: rect.left / scaleX, y: rect.top / scaleY }; } // means it doesn't take into account transforms. function getLayoutRect(element) { var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed. // Fixes https://github.com/popperjs/popper-core/issues/1223 var width = element.offsetWidth; var height = element.offsetHeight; if (Math.abs(clientRect.width - width) <= 1) { width = clientRect.width; } if (Math.abs(clientRect.height - height) <= 1) { height = clientRect.height; } return { x: element.offsetLeft, y: element.offsetTop, width: width, height: height }; } function contains(parent, child) { var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method if (parent.contains(child)) { return true; } // then fallback to custom implementation with Shadow DOM support else if (rootNode && isShadowRoot(rootNode)) { var next = child; do { if (next && parent.isSameNode(next)) { return true; } // $FlowFixMe[prop-missing]: need a better way to handle this... next = next.parentNode || next.host; } while (next); } // Give up, the result is false return false; } function getComputedStyle$1(element) { return getWindow(element).getComputedStyle(element); } function isTableElement(element) { return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; } function getDocumentElement(element) { // $FlowFixMe[incompatible-return]: assume body is always available return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing] element.document) || window.document).documentElement; } function getParentNode(element) { if (getNodeName(element) === 'html') { return element; } return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle // $FlowFixMe[incompatible-return] // $FlowFixMe[prop-missing] element.assignedSlot || // step into the shadow DOM of the parent of a slotted node element.parentNode || ( // DOM Element detected isShadowRoot(element) ? element.host : null) || // ShadowRoot detected // $FlowFixMe[incompatible-call]: HTMLElement is a Node getDocumentElement(element) // fallback ); } function getTrueOffsetParent(element) { if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837 getComputedStyle$1(element).position === 'fixed') { return null; } return element.offsetParent; } // `.offsetParent` reports `null` for fixed elements, while absolute elements // return the containing block function getContainingBlock(element) { var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1; var isIE = navigator.userAgent.indexOf('Trident') !== -1; if (isIE && isHTMLElement(element)) { // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport var elementCss = getComputedStyle$1(element); if (elementCss.position === 'fixed') { return null; } } var currentNode = getParentNode(element); while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) { var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that // create a containing block. // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') { return currentNode; } else { currentNode = currentNode.parentNode; } } return null; } // Gets the closest ancestor positioned element. Handles some edge cases, // such as table ancestors and cross browser bugs. function getOffsetParent(element) { var window = getWindow(element); var offsetParent = getTrueOffsetParent(element); while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') { offsetParent = getTrueOffsetParent(offsetParent); } if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) { return window; } return offsetParent || getContainingBlock(element) || window; } function getMainAxisFromPlacement(placement) { return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; } var max = Math.max; var min = Math.min; var round = Math.round; function within(min$1, value, max$1) { return max(min$1, min(value, max$1)); } function getFreshSideObject() { return { top: 0, right: 0, bottom: 0, left: 0 }; } function mergePaddingObject(paddingObject) { return Object.assign({}, getFreshSideObject(), paddingObject); } function expandToHashMap(value, keys) { return keys.reduce(function (hashMap, key) { hashMap[key] = value; return hashMap; }, {}); } var toPaddingObject = function toPaddingObject(padding, state) { padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, { placement: state.placement })) : padding; return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); }; function arrow(_ref) { var _state$modifiersData$; var state = _ref.state, name = _ref.name, options = _ref.options; var arrowElement = state.elements.arrow; var popperOffsets = state.modifiersData.popperOffsets; var basePlacement = getBasePlacement(state.placement); var axis = getMainAxisFromPlacement(basePlacement); var isVertical = [left, right].indexOf(basePlacement) >= 0; var len = isVertical ? 'height' : 'width'; if (!arrowElement || !popperOffsets) { return; } var paddingObject = toPaddingObject(options.padding, state); var arrowRect = getLayoutRect(arrowElement); var minProp = axis === 'y' ? top : left; var maxProp = axis === 'y' ? bottom : right; var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len]; var startDiff = popperOffsets[axis] - state.rects.reference[axis]; var arrowOffsetParent = getOffsetParent(arrowElement); var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0; var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is // outside of the popper bounds var min = paddingObject[minProp]; var max = clientSize - arrowRect[len] - paddingObject[maxProp]; var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference; var offset = within(min, center, max); // Prevents breaking syntax highlighting... var axisProp = axis; state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$); } function effect$1(_ref2) { var state = _ref2.state, options = _ref2.options; var _options$element = options.element, arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element; if (arrowElement == null) { return; } // CSS selector if (typeof arrowElement === 'string') { arrowElement = state.elements.popper.querySelector(arrowElement); if (!arrowElement) { return; } } if (!contains(state.elements.popper, arrowElement)) { return; } state.elements.arrow = arrowElement; } // eslint-disable-next-line import/no-unused-modules const arrow$1 = { name: 'arrow', enabled: true, phase: 'main', fn: arrow, effect: effect$1, requires: ['popperOffsets'], requiresIfExists: ['preventOverflow'] }; function getVariation(placement) { return placement.split('-')[1]; } var unsetSides = { top: 'auto', right: 'auto', bottom: 'auto', left: 'auto' }; // Round the offsets to the nearest suitable subpixel based on the DPR. // Zooming can change the DPR, but it seems to report a value that will // cleanly divide the values into the appropriate subpixels. function roundOffsetsByDPR(_ref) { var x = _ref.x, y = _ref.y; var win = window; var dpr = win.devicePixelRatio || 1; return { x: round(round(x * dpr) / dpr) || 0, y: round(round(y * dpr) / dpr) || 0 }; } function mapToStyles(_ref2) { var _Object$assign2; var popper = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets; var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y; var hasX = offsets.hasOwnProperty('x'); var hasY = offsets.hasOwnProperty('y'); var sideX = left; var sideY = top; var win = window; if (adaptive) { var offsetParent = getOffsetParent(popper); var heightProp = 'clientHeight'; var widthProp = 'clientWidth'; if (offsetParent === getWindow(popper)) { offsetParent = getDocumentElement(popper); if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') { heightProp = 'scrollHeight'; widthProp = 'scrollWidth'; } } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it offsetParent = offsetParent; if (placement === top || (placement === left || placement === right) && variation === end) { sideY = bottom; // $FlowFixMe[prop-missing] y -= offsetParent[heightProp] - popperRect.height; y *= gpuAcceleration ? 1 : -1; } if (placement === left || (placement === top || placement === bottom) && variation === end) { sideX = right; // $FlowFixMe[prop-missing] x -= offsetParent[widthProp] - popperRect.width; x *= gpuAcceleration ? 1 : -1; } } var commonStyles = Object.assign({ position: position }, adaptive && unsetSides); if (gpuAcceleration) { var _Object$assign; return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign)); } return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2)); } function computeStyles(_ref4) { var state = _ref4.state, options = _ref4.options; var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets; var commonStyles = { placement: getBasePlacement(state.placement), variation: getVariation(state.placement), popper: state.elements.popper, popperRect: state.rects.popper, gpuAcceleration: gpuAcceleration }; if (state.modifiersData.popperOffsets != null) { state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.popperOffsets, position: state.options.strategy, adaptive: adaptive, roundOffsets: roundOffsets }))); } if (state.modifiersData.arrow != null) { state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, { offsets: state.modifiersData.arrow, position: 'absolute', adaptive: false, roundOffsets: roundOffsets }))); } state.attributes.popper = Object.assign({}, state.attributes.popper, { 'data-popper-placement': state.placement }); } // eslint-disable-next-line import/no-unused-modules const computeStyles$1 = { name: 'computeStyles', enabled: true, phase: 'beforeWrite', fn: computeStyles, data: {} }; var passive = { passive: true }; function effect(_ref) { var state = _ref.state, instance = _ref.instance, options = _ref.options; var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize; var window = getWindow(state.elements.popper); var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper); if (scroll) { scrollParents.forEach(function (scrollParent) { scrollParent.addEventListener('scroll', instance.update, passive); }); } if (resize) { window.addEventListener('resize', instance.update, passive); } return function () { if (scroll) { scrollParents.forEach(function (scrollParent) { scrollParent.removeEventListener('scroll', instance.update, passive); }); } if (resize) { window.removeEventListener('resize', instance.update, passive); } }; } // eslint-disable-next-line import/no-unused-modules const eventListeners = { name: 'eventListeners', enabled: true, phase: 'write', fn: function fn() {}, effect: effect, data: {} }; var hash$1 = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; function getOppositePlacement(placement) { return placement.replace(/left|right|bottom|top/g, function (matched) { return hash$1[matched]; }); } var hash = { start: 'end', end: 'start' }; function getOppositeVariationPlacement(placement) { return placement.replace(/start|end/g, function (matched) { return hash[matched]; }); } function getWindowScroll(node) { var win = getWindow(node); var scrollLeft = win.pageXOffset; var scrollTop = win.pageYOffset; return { scrollLeft: scrollLeft, scrollTop: scrollTop }; } function getWindowScrollBarX(element) { // If has a CSS width greater than the viewport, then this will be // incorrect for RTL. // Popper 1 is broken in this case and never had a bug report so let's assume // it's not an issue. I don't think anyone ever specifies width on // anyway. // Browsers where the left scrollbar doesn't cause an issue report `0` for // this (e.g. Edge 2019, IE11, Safari) return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft; } function getViewportRect(element) { var win = getWindow(element); var html = getDocumentElement(element); var visualViewport = win.visualViewport; var width = html.clientWidth; var height = html.clientHeight; var x = 0; var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper // can be obscured underneath it. // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even // if it isn't open, so if this isn't available, the popper will be detected // to overflow the bottom of the screen too early. if (visualViewport) { width = visualViewport.width; height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently) // In Chrome, it returns a value very close to 0 (+/-) but contains rounding // errors due to floating point numbers, so we need to check precision. // Safari returns a number <= 0, usually < -1 when pinch-zoomed // Feature detection fails in mobile emulation mode in Chrome. // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < // 0.001 // Fallback here: "Not Safari" userAgent if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { x = visualViewport.offsetLeft; y = visualViewport.offsetTop; } } return { width: width, height: height, x: x + getWindowScrollBarX(element), y: y }; } // of the `` and `` rect bounds if horizontally scrollable function getDocumentRect(element) { var _element$ownerDocumen; var html = getDocumentElement(element); var winScroll = getWindowScroll(element); var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body; var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0); var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0); var x = -winScroll.scrollLeft + getWindowScrollBarX(element); var y = -winScroll.scrollTop; if (getComputedStyle$1(body || html).direction === 'rtl') { x += max(html.clientWidth, body ? body.clientWidth : 0) - width; } return { width: width, height: height, x: x, y: y }; } function isScrollParent(element) { // Firefox wants us to check `-x` and `-y` variations as well var _getComputedStyle = getComputedStyle$1(element), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY; return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX); } function getScrollParent(node) { if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) { // $FlowFixMe[incompatible-return]: assume body is always available return node.ownerDocument.body; } if (isHTMLElement(node) && isScrollParent(node)) { return node; } return getScrollParent(getParentNode(node)); } /* given a DOM element, return the list of all scroll parents, up the list of ancesors until we get to the top window object. This list is what we attach scroll listeners to, because if any of these parent elements scroll, we'll need to re-calculate the reference element's position. */ function listScrollParents(element, list) { var _element$ownerDocumen; if (list === void 0) { list = []; } var scrollParent = getScrollParent(element); var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body); var win = getWindow(scrollParent); var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent; var updatedList = list.concat(target); return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here updatedList.concat(listScrollParents(getParentNode(target))); } function rectToClientRect(rect) { return Object.assign({}, rect, { left: rect.x, top: rect.y, right: rect.x + rect.width, bottom: rect.y + rect.height }); } function getInnerBoundingClientRect(element) { var rect = getBoundingClientRect(element); rect.top = rect.top + element.clientTop; rect.left = rect.left + element.clientLeft; rect.bottom = rect.top + element.clientHeight; rect.right = rect.left + element.clientWidth; rect.width = element.clientWidth; rect.height = element.clientHeight; rect.x = rect.left; rect.y = rect.top; return rect; } function getClientRectFromMixedType(element, clippingParent) { return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element))); } // A "clipping parent" is an overflowable container with the characteristic of // clipping (or hiding) overflowing elements with a position different from // `initial` function getClippingParents(element) { var clippingParents = listScrollParents(getParentNode(element)); var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0; var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element; if (!isElement(clipperElement)) { return []; } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414 return clippingParents.filter(function (clippingParent) { return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body'; }); } // Gets the maximum area that the element is visible in due to any number of // clipping parents function getClippingRect(element, boundary, rootBoundary) { var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary); var clippingParents = [].concat(mainClippingParents, [rootBoundary]); var firstClippingParent = clippingParents[0]; var clippingRect = clippingParents.reduce(function (accRect, clippingParent) { var rect = getClientRectFromMixedType(element, clippingParent); accRect.top = max(rect.top, accRect.top); accRect.right = min(rect.right, accRect.right); accRect.bottom = min(rect.bottom, accRect.bottom); accRect.left = max(rect.left, accRect.left); return accRect; }, getClientRectFromMixedType(element, firstClippingParent)); clippingRect.width = clippingRect.right - clippingRect.left; clippingRect.height = clippingRect.bottom - clippingRect.top; clippingRect.x = clippingRect.left; clippingRect.y = clippingRect.top; return clippingRect; } function computeOffsets(_ref) { var reference = _ref.reference, element = _ref.element, placement = _ref.placement; var basePlacement = placement ? getBasePlacement(placement) : null; var variation = placement ? getVariation(placement) : null; var commonX = reference.x + reference.width / 2 - element.width / 2; var commonY = reference.y + reference.height / 2 - element.height / 2; var offsets; switch (basePlacement) { case top: offsets = { x: commonX, y: reference.y - element.height }; break; case bottom: offsets = { x: commonX, y: reference.y + reference.height }; break; case right: offsets = { x: reference.x + reference.width, y: commonY }; break; case left: offsets = { x: reference.x - element.width, y: commonY }; break; default: offsets = { x: reference.x, y: reference.y }; } var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null; if (mainAxis != null) { var len = mainAxis === 'y' ? 'height' : 'width'; switch (variation) { case start: offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); break; case end: offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); break; } } return offsets; } function detectOverflow(state, options) { if (options === void 0) { options = {}; } var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding; var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements)); var altContext = elementContext === popper ? reference : popper; var popperRect = state.rects.popper; var element = state.elements[altBoundary ? altContext : elementContext]; var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary); var referenceClientRect = getBoundingClientRect(state.elements.reference); var popperOffsets = computeOffsets({ reference: referenceClientRect, element: popperRect, strategy: 'absolute', placement: placement }); var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets)); var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect // 0 or negative = within the clipping rect var overflowOffsets = { top: clippingClientRect.top - elementClientRect.top + paddingObject.top, bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom, left: clippingClientRect.left - elementClientRect.left + paddingObject.left, right: elementClientRect.right - clippingClientRect.right + paddingObject.right }; var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element if (elementContext === popper && offsetData) { var offset = offsetData[placement]; Object.keys(overflowOffsets).forEach(function (key) { var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1; var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x'; overflowOffsets[key] += offset[axis] * multiply; }); } return overflowOffsets; } function computeAutoPlacement(state, options) { if (options === void 0) { options = {}; } var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP; var variation = getVariation(placement); var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) { return getVariation(placement) === variation; }) : basePlacements; var allowedPlacements = placements$1.filter(function (placement) { return allowedAutoPlacements.indexOf(placement) >= 0; }); if (allowedPlacements.length === 0) { allowedPlacements = placements$1; } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions... var overflows = allowedPlacements.reduce(function (acc, placement) { acc[placement] = detectOverflow(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, padding: padding })[getBasePlacement(placement)]; return acc; }, {}); return Object.keys(overflows).sort(function (a, b) { return overflows[a] - overflows[b]; }); } function getExpandedFallbackPlacements(placement) { if (getBasePlacement(placement) === auto) { return []; } var oppositePlacement = getOppositePlacement(placement); return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)]; } function flip(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; if (state.modifiersData[name]._skip) { return; } var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements; var preferredPlacement = state.options.placement; var basePlacement = getBasePlacement(preferredPlacement); var isBasePlacement = basePlacement === preferredPlacement; var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement)); var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) { return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, padding: padding, flipVariations: flipVariations, allowedAutoPlacements: allowedAutoPlacements }) : placement); }, []); var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var checksMap = new Map(); var makeFallbackChecks = true; var firstFittingPlacement = placements[0]; for (var i = 0; i < placements.length; i++) { var placement = placements[i]; var _basePlacement = getBasePlacement(placement); var isStartVariation = getVariation(placement) === start; var isVertical = [top, bottom].indexOf(_basePlacement) >= 0; var len = isVertical ? 'width' : 'height'; var overflow = detectOverflow(state, { placement: placement, boundary: boundary, rootBoundary: rootBoundary, altBoundary: altBoundary, padding: padding }); var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top; if (referenceRect[len] > popperRect[len]) { mainVariationSide = getOppositePlacement(mainVariationSide); } var altVariationSide = getOppositePlacement(mainVariationSide); var checks = []; if (checkMainAxis) { checks.push(overflow[_basePlacement] <= 0); } if (checkAltAxis) { checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0); } if (checks.every(function (check) { return check; })) { firstFittingPlacement = placement; makeFallbackChecks = false; break; } checksMap.set(placement, checks); } if (makeFallbackChecks) { // `2` may be desired in some cases – research later var numberOfChecks = flipVariations ? 3 : 1; var _loop = function _loop(_i) { var fittingPlacement = placements.find(function (placement) { var checks = checksMap.get(placement); if (checks) { return checks.slice(0, _i).every(function (check) { return check; }); } }); if (fittingPlacement) { firstFittingPlacement = fittingPlacement; return "break"; } }; for (var _i = numberOfChecks; _i > 0; _i--) { var _ret = _loop(_i); if (_ret === "break") break; } } if (state.placement !== firstFittingPlacement) { state.modifiersData[name]._skip = true; state.placement = firstFittingPlacement; state.reset = true; } } // eslint-disable-next-line import/no-unused-modules const flip$1 = { name: 'flip', enabled: true, phase: 'main', fn: flip, requiresIfExists: ['offset'], data: { _skip: false } }; function getSideOffsets(overflow, rect, preventedOffsets) { if (preventedOffsets === void 0) { preventedOffsets = { x: 0, y: 0 }; } return { top: overflow.top - rect.height - preventedOffsets.y, right: overflow.right - rect.width + preventedOffsets.x, bottom: overflow.bottom - rect.height + preventedOffsets.y, left: overflow.left - rect.width - preventedOffsets.x }; } function isAnySideFullyClipped(overflow) { return [top, right, bottom, left].some(function (side) { return overflow[side] >= 0; }); } function hide(_ref) { var state = _ref.state, name = _ref.name; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var preventedOffsets = state.modifiersData.preventOverflow; var referenceOverflow = detectOverflow(state, { elementContext: 'reference' }); var popperAltOverflow = detectOverflow(state, { altBoundary: true }); var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect); var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets); var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets); var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); state.modifiersData[name] = { referenceClippingOffsets: referenceClippingOffsets, popperEscapeOffsets: popperEscapeOffsets, isReferenceHidden: isReferenceHidden, hasPopperEscaped: hasPopperEscaped }; state.attributes.popper = Object.assign({}, state.attributes.popper, { 'data-popper-reference-hidden': isReferenceHidden, 'data-popper-escaped': hasPopperEscaped }); } // eslint-disable-next-line import/no-unused-modules const hide$1 = { name: 'hide', enabled: true, phase: 'main', requiresIfExists: ['preventOverflow'], fn: hide }; function distanceAndSkiddingToXY(placement, rects, offset) { var basePlacement = getBasePlacement(placement); var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1; var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, { placement: placement })) : offset, skidding = _ref[0], distance = _ref[1]; skidding = skidding || 0; distance = (distance || 0) * invertDistance; return [left, right].indexOf(basePlacement) >= 0 ? { x: distance, y: skidding } : { x: skidding, y: distance }; } function offset(_ref2) { var state = _ref2.state, options = _ref2.options, name = _ref2.name; var _options$offset = options.offset, offset = _options$offset === void 0 ? [0, 0] : _options$offset; var data = placements.reduce(function (acc, placement) { acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset); return acc; }, {}); var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y; if (state.modifiersData.popperOffsets != null) { state.modifiersData.popperOffsets.x += x; state.modifiersData.popperOffsets.y += y; } state.modifiersData[name] = data; } // eslint-disable-next-line import/no-unused-modules const offset$1 = { name: 'offset', enabled: true, phase: 'main', requires: ['popperOffsets'], fn: offset }; function popperOffsets(_ref) { var state = _ref.state, name = _ref.name; // Offsets are the actual position the popper needs to have to be // properly positioned near its reference element // This is the most basic placement, and will be adjusted by // the modifiers in the next step state.modifiersData[name] = computeOffsets({ reference: state.rects.reference, element: state.rects.popper, strategy: 'absolute', placement: state.placement }); } // eslint-disable-next-line import/no-unused-modules const popperOffsets$1 = { name: 'popperOffsets', enabled: true, phase: 'read', fn: popperOffsets, data: {} }; function getAltAxis(axis) { return axis === 'x' ? 'y' : 'x'; } function preventOverflow(_ref) { var state = _ref.state, options = _ref.options, name = _ref.name; var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset; var overflow = detectOverflow(state, { boundary: boundary, rootBoundary: rootBoundary, padding: padding, altBoundary: altBoundary }); var basePlacement = getBasePlacement(state.placement); var variation = getVariation(state.placement); var isBasePlacement = !variation; var mainAxis = getMainAxisFromPlacement(basePlacement); var altAxis = getAltAxis(mainAxis); var popperOffsets = state.modifiersData.popperOffsets; var referenceRect = state.rects.reference; var popperRect = state.rects.popper; var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, { placement: state.placement })) : tetherOffset; var data = { x: 0, y: 0 }; if (!popperOffsets) { return; } if (checkMainAxis || checkAltAxis) { var mainSide = mainAxis === 'y' ? top : left; var altSide = mainAxis === 'y' ? bottom : right; var len = mainAxis === 'y' ? 'height' : 'width'; var offset = popperOffsets[mainAxis]; var min$1 = popperOffsets[mainAxis] + overflow[mainSide]; var max$1 = popperOffsets[mainAxis] - overflow[altSide]; var additive = tether ? -popperRect[len] / 2 : 0; var minLen = variation === start ? referenceRect[len] : popperRect[len]; var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go // outside the reference bounds var arrowElement = state.elements.arrow; var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : { width: 0, height: 0 }; var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject(); var arrowPaddingMin = arrowPaddingObject[mainSide]; var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want // to include its full size in the calculation. If the reference is small // and near the edge of a boundary, the popper can overflow even if the // reference is not overflowing as well (e.g. virtual elements with no // width or height) var arrowLen = within(0, referenceRect[len], arrowRect[len]); var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue; var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue; var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow); var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0; var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0; var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset; var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue; if (checkMainAxis) { var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1); popperOffsets[mainAxis] = preventedOffset; data[mainAxis] = preventedOffset - offset; } if (checkAltAxis) { var _mainSide = mainAxis === 'x' ? top : left; var _altSide = mainAxis === 'x' ? bottom : right; var _offset = popperOffsets[altAxis]; var _min = _offset + overflow[_mainSide]; var _max = _offset - overflow[_altSide]; var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max); popperOffsets[altAxis] = _preventedOffset; data[altAxis] = _preventedOffset - _offset; } } state.modifiersData[name] = data; } // eslint-disable-next-line import/no-unused-modules const preventOverflow$1 = { name: 'preventOverflow', enabled: true, phase: 'main', fn: preventOverflow, requiresIfExists: ['offset'] }; function getHTMLElementScroll(element) { return { scrollLeft: element.scrollLeft, scrollTop: element.scrollTop }; } function getNodeScroll(node) { if (node === getWindow(node) || !isHTMLElement(node)) { return getWindowScroll(node); } else { return getHTMLElementScroll(node); } } function isElementScaled(element) { var rect = element.getBoundingClientRect(); var scaleX = rect.width / element.offsetWidth || 1; var scaleY = rect.height / element.offsetHeight || 1; return scaleX !== 1 || scaleY !== 1; } // Returns the composite rect of an element relative to its offsetParent. // Composite means it takes into account transforms as well as layout. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) { if (isFixed === void 0) { isFixed = false; } var isOffsetParentAnElement = isHTMLElement(offsetParent); isHTMLElement(offsetParent) && isElementScaled(offsetParent); var documentElement = getDocumentElement(offsetParent); var rect = getBoundingClientRect(elementOrVirtualElement); var scroll = { scrollLeft: 0, scrollTop: 0 }; var offsets = { x: 0, y: 0 }; if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078 isScrollParent(documentElement)) { scroll = getNodeScroll(offsetParent); } if (isHTMLElement(offsetParent)) { offsets = getBoundingClientRect(offsetParent); offsets.x += offsetParent.clientLeft; offsets.y += offsetParent.clientTop; } else if (documentElement) { offsets.x = getWindowScrollBarX(documentElement); } } return { x: rect.left + scroll.scrollLeft - offsets.x, y: rect.top + scroll.scrollTop - offsets.y, width: rect.width, height: rect.height }; } function order(modifiers) { var map = new Map(); var visited = new Set(); var result = []; modifiers.forEach(function (modifier) { map.set(modifier.name, modifier); }); // On visiting object, check for its dependencies and visit them recursively function sort(modifier) { visited.add(modifier.name); var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []); requires.forEach(function (dep) { if (!visited.has(dep)) { var depModifier = map.get(dep); if (depModifier) { sort(depModifier); } } }); result.push(modifier); } modifiers.forEach(function (modifier) { if (!visited.has(modifier.name)) { // check for visited object sort(modifier); } }); return result; } function orderModifiers(modifiers) { // order based on dependencies var orderedModifiers = order(modifiers); // order based on phase return modifierPhases.reduce(function (acc, phase) { return acc.concat(orderedModifiers.filter(function (modifier) { return modifier.phase === phase; })); }, []); } function debounce(fn) { var pending; return function () { if (!pending) { pending = new Promise(function (resolve) { Promise.resolve().then(function () { pending = undefined; resolve(fn()); }); }); } return pending; }; } function mergeByName(modifiers) { var merged = modifiers.reduce(function (merged, current) { var existing = merged[current.name]; merged[current.name] = existing ? Object.assign({}, existing, current, { options: Object.assign({}, existing.options, current.options), data: Object.assign({}, existing.data, current.data) }) : current; return merged; }, {}); // IE11 does not support Object.values return Object.keys(merged).map(function (key) { return merged[key]; }); } var DEFAULT_OPTIONS = { placement: 'bottom', modifiers: [], strategy: 'absolute' }; function areValidElements() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return !args.some(function (element) { return !(element && typeof element.getBoundingClientRect === 'function'); }); } function popperGenerator(generatorOptions) { if (generatorOptions === void 0) { generatorOptions = {}; } var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2; return function createPopper(reference, popper, options) { if (options === void 0) { options = defaultOptions; } var state = { placement: 'bottom', orderedModifiers: [], options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), modifiersData: {}, elements: { reference: reference, popper: popper }, attributes: {}, styles: {} }; var effectCleanupFns = []; var isDestroyed = false; var instance = { state: state, setOptions: function setOptions(setOptionsAction) { var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction; cleanupModifierEffects(); state.options = Object.assign({}, defaultOptions, state.options, options); state.scrollParents = { reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [], popper: listScrollParents(popper) }; // Orders the modifiers based on their dependencies and `phase` // properties var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers state.orderedModifiers = orderedModifiers.filter(function (m) { return m.enabled; }); // Validate the provided modifiers so that the consumer will get warned runModifierEffects(); return instance.update(); }, // Sync update – it will always be executed, even if not necessary. This // is useful for low frequency updates where sync behavior simplifies the // logic. // For high frequency updates (e.g. `resize` and `scroll` events), always // prefer the async Popper#update method forceUpdate: function forceUpdate() { if (isDestroyed) { return; } var _state$elements = state.elements, reference = _state$elements.reference, popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements // anymore if (!areValidElements(reference, popper)) { return; } // Store the reference and popper rects to be read by modifiers state.rects = { reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'), popper: getLayoutRect(popper) }; // Modifiers have the ability to reset the current update cycle. The // most common use case for this is the `flip` modifier changing the // placement, which then needs to re-run all the modifiers, because the // logic was previously ran for the previous placement and is therefore // stale/incorrect state.reset = false; state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier // is filled with the initial data specified by the modifier. This means // it doesn't persist and is fresh on each update. // To ensure persistent data, use `${name}#persistent` state.orderedModifiers.forEach(function (modifier) { return state.modifiersData[modifier.name] = Object.assign({}, modifier.data); }); for (var index = 0; index < state.orderedModifiers.length; index++) { if (state.reset === true) { state.reset = false; index = -1; continue; } var _state$orderedModifie = state.orderedModifiers[index], fn = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name; if (typeof fn === 'function') { state = fn({ state: state, options: _options, name: name, instance: instance }) || state; } } }, // Async and optimistically optimized update – it will not be executed if // not necessary (debounced to run at most once-per-tick) update: debounce(function () { return new Promise(function (resolve) { instance.forceUpdate(); resolve(state); }); }), destroy: function destroy() { cleanupModifierEffects(); isDestroyed = true; } }; if (!areValidElements(reference, popper)) { return instance; } instance.setOptions(options).then(function (state) { if (!isDestroyed && options.onFirstUpdate) { options.onFirstUpdate(state); } }); // Modifiers have the ability to execute arbitrary code before the first // update cycle runs. They will be executed in the same order as the update // cycle. This is useful when a modifier adds some persistent data that // other modifiers need to use, but the modifier is run after the dependent // one. function runModifierEffects() { state.orderedModifiers.forEach(function (_ref3) { var name = _ref3.name, _ref3$options = _ref3.options, options = _ref3$options === void 0 ? {} : _ref3$options, effect = _ref3.effect; if (typeof effect === 'function') { var cleanupFn = effect({ state: state, name: name, instance: instance, options: options }); var noopFn = function noopFn() {}; effectCleanupFns.push(cleanupFn || noopFn); } }); } function cleanupModifierEffects() { effectCleanupFns.forEach(function (fn) { return fn(); }); effectCleanupFns = []; } return instance; }; } var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1]; var createPopper$1 = /*#__PURE__*/popperGenerator({ defaultModifiers: defaultModifiers$1 }); // eslint-disable-next-line import/no-unused-modules var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1]; var createPopper = /*#__PURE__*/popperGenerator({ defaultModifiers: defaultModifiers }); // eslint-disable-next-line import/no-unused-modules const Popper = /*#__PURE__*/Object.freeze({ __proto__: null, popperGenerator, detectOverflow, createPopperBase: createPopper$2, createPopper, createPopperLite: createPopper$1, top, bottom, right, left, auto, basePlacements, start, end, clippingParents, viewport, popper, reference, variationPlacements, placements, beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite, modifierPhases, applyStyles: applyStyles$1, arrow: arrow$1, computeStyles: computeStyles$1, eventListeners, flip: flip$1, hide: hide$1, offset: offset$1, popperOffsets: popperOffsets$1, preventOverflow: preventOverflow$1 }); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$9 = 'dropdown'; const DATA_KEY$8 = 'bs.dropdown'; const EVENT_KEY$8 = `.${DATA_KEY$8}`; const DATA_API_KEY$4 = '.data-api'; const ESCAPE_KEY$2 = 'Escape'; const SPACE_KEY = 'Space'; const TAB_KEY$1 = 'Tab'; const ARROW_UP_KEY = 'ArrowUp'; const ARROW_DOWN_KEY = 'ArrowDown'; const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`); const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`; const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`; const EVENT_SHOW$4 = `show${EVENT_KEY$8}`; const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`; const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`; const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`; const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`; const CLASS_NAME_SHOW$6 = 'show'; const CLASS_NAME_DROPUP = 'dropup'; const CLASS_NAME_DROPEND = 'dropend'; const CLASS_NAME_DROPSTART = 'dropstart'; const CLASS_NAME_NAVBAR = 'navbar'; const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]'; const SELECTOR_MENU = '.dropdown-menu'; const SELECTOR_NAVBAR_NAV = '.navbar-nav'; const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'; const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'; const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'; const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'; const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'; const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'; const Default$8 = { offset: [0, 2], boundary: 'clippingParents', reference: 'toggle', display: 'dynamic', popperConfig: null, autoClose: true }; const DefaultType$8 = { offset: '(array|string|function)', boundary: '(string|element)', reference: '(string|element|object)', display: 'string', popperConfig: '(null|object|function)', autoClose: '(boolean|string)' }; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Dropdown extends BaseComponent { constructor(element, config) { super(element); this._popper = null; this._config = this._getConfig(config); this._menu = this._getMenuElement(); this._inNavbar = this._detectNavbar(); } // Getters static get Default() { return Default$8; } static get DefaultType() { return DefaultType$8; } static get NAME() { return NAME$9; } // Public toggle() { return this._isShown() ? this.hide() : this.show(); } show() { if (isDisabled(this._element) || this._isShown(this._menu)) { return; } const relatedTarget = { relatedTarget: this._element }; const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget); if (showEvent.defaultPrevented) { return; } const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar if (this._inNavbar) { Manipulator.setDataAttribute(this._menu, 'popper', 'none'); } else { this._createPopper(parent); } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) { [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop)); } this._element.focus(); this._element.setAttribute('aria-expanded', true); this._menu.classList.add(CLASS_NAME_SHOW$6); this._element.classList.add(CLASS_NAME_SHOW$6); EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget); } hide() { if (isDisabled(this._element) || !this._isShown(this._menu)) { return; } const relatedTarget = { relatedTarget: this._element }; this._completeHide(relatedTarget); } dispose() { if (this._popper) { this._popper.destroy(); } super.dispose(); } update() { this._inNavbar = this._detectNavbar(); if (this._popper) { this._popper.update(); } } // Private _completeHide(relatedTarget) { const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget); if (hideEvent.defaultPrevented) { return; } // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop)); } if (this._popper) { this._popper.destroy(); } this._menu.classList.remove(CLASS_NAME_SHOW$6); this._element.classList.remove(CLASS_NAME_SHOW$6); this._element.setAttribute('aria-expanded', 'false'); Manipulator.removeDataAttribute(this._menu, 'popper'); EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget); } _getConfig(config) { config = { ...this.constructor.Default, ...Manipulator.getDataAttributes(this._element), ...config }; typeCheckConfig(NAME$9, config, this.constructor.DefaultType); if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') { // Popper virtual elements require a getBoundingClientRect method throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); } return config; } _createPopper(parent) { if (typeof Popper === 'undefined') { throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); } let referenceElement = this._element; if (this._config.reference === 'parent') { referenceElement = parent; } else if (isElement$1(this._config.reference)) { referenceElement = getElement(this._config.reference); } else if (typeof this._config.reference === 'object') { referenceElement = this._config.reference; } const popperConfig = this._getPopperConfig(); const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false); this._popper = createPopper(referenceElement, this._menu, popperConfig); if (isDisplayStatic) { Manipulator.setDataAttribute(this._menu, 'popper', 'static'); } } _isShown(element = this._element) { return element.classList.contains(CLASS_NAME_SHOW$6); } _getMenuElement() { return SelectorEngine.next(this._element, SELECTOR_MENU)[0]; } _getPlacement() { const parentDropdown = this._element.parentNode; if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) { return PLACEMENT_RIGHT; } if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) { return PLACEMENT_LEFT; } // We need to trim the value because custom properties can also include spaces const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'; if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) { return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP; } return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM; } _detectNavbar() { return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null; } _getOffset() { const { offset } = this._config; if (typeof offset === 'string') { return offset.split(',').map(val => Number.parseInt(val, 10)); } if (typeof offset === 'function') { return popperData => offset(popperData, this._element); } return offset; } _getPopperConfig() { const defaultBsPopperConfig = { placement: this._getPlacement(), modifiers: [{ name: 'preventOverflow', options: { boundary: this._config.boundary } }, { name: 'offset', options: { offset: this._getOffset() } }] }; // Disable Popper if we have a static display if (this._config.display === 'static') { defaultBsPopperConfig.modifiers = [{ name: 'applyStyles', enabled: false }]; } return { ...defaultBsPopperConfig, ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) }; } _selectMenuItem({ key, target }) { const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible); if (!items.length) { return; } // if target isn't included in items (e.g. when expanding the dropdown) // allow cycling to get the last item in case key equals ARROW_UP_KEY getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus(); } // Static static jQueryInterface(config) { return this.each(function () { const data = Dropdown.getOrCreateInstance(this, config); if (typeof config !== 'string') { return; } if (typeof data[config] === 'undefined') { throw new TypeError(`No method named "${config}"`); } data[config](); }); } static clearMenus(event) { if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) { return; } const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3); for (let i = 0, len = toggles.length; i < len; i++) { const context = Dropdown.getInstance(toggles[i]); if (!context || context._config.autoClose === false) { continue; } if (!context._isShown()) { continue; } const relatedTarget = { relatedTarget: context._element }; if (event) { const composedPath = event.composedPath(); const isMenuTarget = composedPath.includes(context._menu); if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) { continue; } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) { continue; } if (event.type === 'click') { relatedTarget.clickEvent = event; } } context._completeHide(relatedTarget); } } static getParentFromElement(element) { return getElementFromSelector(element) || element.parentNode; } static dataApiKeydownHandler(event) { // If not input/textarea: // - And not a key in REGEXP_KEYDOWN => not a dropdown command // If input/textarea: // - If space key => not a dropdown command // - If key is other than escape // - If key is not up or down => not a dropdown command // - If trigger inside the menu => not a dropdown command if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) { return; } const isActive = this.classList.contains(CLASS_NAME_SHOW$6); if (!isActive && event.key === ESCAPE_KEY$2) { return; } event.preventDefault(); event.stopPropagation(); if (isDisabled(this)) { return; } const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0]; const instance = Dropdown.getOrCreateInstance(getToggleButton); if (event.key === ESCAPE_KEY$2) { instance.hide(); return; } if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) { if (!isActive) { instance.show(); } instance._selectMenuItem(event); return; } if (!isActive || event.key === SPACE_KEY) { Dropdown.clearMenus(); } } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { event.preventDefault(); Dropdown.getOrCreateInstance(this).toggle(); }); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Dropdown to jQuery only if jQuery is present */ defineJQueryPlugin(Dropdown); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/scrollBar.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; const SELECTOR_STICKY_CONTENT = '.sticky-top'; class ScrollBarHelper { constructor() { this._element = document.body; } getWidth() { // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes const documentWidth = document.documentElement.clientWidth; return Math.abs(window.innerWidth - documentWidth); } hide() { const width = this.getWidth(); this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width); this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width); } _disableOverFlow() { this._saveInitialAttribute(this._element, 'overflow'); this._element.style.overflow = 'hidden'; } _setElementAttributes(selector, styleProp, callback) { const scrollbarWidth = this.getWidth(); const manipulationCallBack = element => { if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) { return; } this._saveInitialAttribute(element, styleProp); const calculatedValue = window.getComputedStyle(element)[styleProp]; element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`; }; this._applyManipulationCallback(selector, manipulationCallBack); } reset() { this._resetElementAttributes(this._element, 'overflow'); this._resetElementAttributes(this._element, 'paddingRight'); this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight'); this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight'); } _saveInitialAttribute(element, styleProp) { const actualValue = element.style[styleProp]; if (actualValue) { Manipulator.setDataAttribute(element, styleProp, actualValue); } } _resetElementAttributes(selector, styleProp) { const manipulationCallBack = element => { const value = Manipulator.getDataAttribute(element, styleProp); if (typeof value === 'undefined') { element.style.removeProperty(styleProp); } else { Manipulator.removeDataAttribute(element, styleProp); element.style[styleProp] = value; } }; this._applyManipulationCallback(selector, manipulationCallBack); } _applyManipulationCallback(selector, callBack) { if (isElement$1(selector)) { callBack(selector); } else { SelectorEngine.find(selector, this._element).forEach(callBack); } } isOverflowing() { return this.getWidth() > 0; } } /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/backdrop.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const Default$7 = { className: 'modal-backdrop', isVisible: true, // if false, we use the backdrop helper without adding any element to the dom isAnimated: false, rootElement: 'body', // give the choice to place backdrop under different elements clickCallback: null }; const DefaultType$7 = { className: 'string', isVisible: 'boolean', isAnimated: 'boolean', rootElement: '(element|string)', clickCallback: '(function|null)' }; const NAME$8 = 'backdrop'; const CLASS_NAME_FADE$4 = 'fade'; const CLASS_NAME_SHOW$5 = 'show'; const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`; class Backdrop { constructor(config) { this._config = this._getConfig(config); this._isAppended = false; this._element = null; } show(callback) { if (!this._config.isVisible) { execute(callback); return; } this._append(); if (this._config.isAnimated) { reflow(this._getElement()); } this._getElement().classList.add(CLASS_NAME_SHOW$5); this._emulateAnimation(() => { execute(callback); }); } hide(callback) { if (!this._config.isVisible) { execute(callback); return; } this._getElement().classList.remove(CLASS_NAME_SHOW$5); this._emulateAnimation(() => { this.dispose(); execute(callback); }); } // Private _getElement() { if (!this._element) { const backdrop = document.createElement('div'); backdrop.className = this._config.className; if (this._config.isAnimated) { backdrop.classList.add(CLASS_NAME_FADE$4); } this._element = backdrop; } return this._element; } _getConfig(config) { config = { ...Default$7, ...(typeof config === 'object' ? config : {}) }; // use getElement() with the default "body" to get a fresh Element on each instantiation config.rootElement = getElement(config.rootElement); typeCheckConfig(NAME$8, config, DefaultType$7); return config; } _append() { if (this._isAppended) { return; } this._config.rootElement.append(this._getElement()); EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => { execute(this._config.clickCallback); }); this._isAppended = true; } dispose() { if (!this._isAppended) { return; } EventHandler.off(this._element, EVENT_MOUSEDOWN); this._element.remove(); this._isAppended = false; } _emulateAnimation(callback) { executeAfterTransition(callback, this._getElement(), this._config.isAnimated); } } /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/focustrap.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const Default$6 = { trapElement: null, // The element to trap focus inside of autofocus: true }; const DefaultType$6 = { trapElement: 'element', autofocus: 'boolean' }; const NAME$7 = 'focustrap'; const DATA_KEY$7 = 'bs.focustrap'; const EVENT_KEY$7 = `.${DATA_KEY$7}`; const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`; const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`; const TAB_KEY = 'Tab'; const TAB_NAV_FORWARD = 'forward'; const TAB_NAV_BACKWARD = 'backward'; class FocusTrap { constructor(config) { this._config = this._getConfig(config); this._isActive = false; this._lastTabNavDirection = null; } activate() { const { trapElement, autofocus } = this._config; if (this._isActive) { return; } if (autofocus) { trapElement.focus(); } EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event)); EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event)); this._isActive = true; } deactivate() { if (!this._isActive) { return; } this._isActive = false; EventHandler.off(document, EVENT_KEY$7); } // Private _handleFocusin(event) { const { target } = event; const { trapElement } = this._config; if (target === document || target === trapElement || trapElement.contains(target)) { return; } const elements = SelectorEngine.focusableChildren(trapElement); if (elements.length === 0) { trapElement.focus(); } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) { elements[elements.length - 1].focus(); } else { elements[0].focus(); } } _handleKeydown(event) { if (event.key !== TAB_KEY) { return; } this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD; } _getConfig(config) { config = { ...Default$6, ...(typeof config === 'object' ? config : {}) }; typeCheckConfig(NAME$7, config, DefaultType$6); return config; } } /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$6 = 'modal'; const DATA_KEY$6 = 'bs.modal'; const EVENT_KEY$6 = `.${DATA_KEY$6}`; const DATA_API_KEY$3 = '.data-api'; const ESCAPE_KEY$1 = 'Escape'; const Default$5 = { backdrop: true, keyboard: true, focus: true }; const DefaultType$5 = { backdrop: '(boolean|string)', keyboard: 'boolean', focus: 'boolean' }; const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`; const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`; const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`; const EVENT_SHOW$3 = `show${EVENT_KEY$6}`; const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`; const EVENT_RESIZE = `resize${EVENT_KEY$6}`; const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`; const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`; const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`; const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`; const CLASS_NAME_OPEN = 'modal-open'; const CLASS_NAME_FADE$3 = 'fade'; const CLASS_NAME_SHOW$4 = 'show'; const CLASS_NAME_STATIC = 'modal-static'; const OPEN_SELECTOR$1 = '.modal.show'; const SELECTOR_DIALOG = '.modal-dialog'; const SELECTOR_MODAL_BODY = '.modal-body'; const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Modal extends BaseComponent { constructor(element, config) { super(element); this._config = this._getConfig(config); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element); this._backdrop = this._initializeBackDrop(); this._focustrap = this._initializeFocusTrap(); this._isShown = false; this._ignoreBackdropClick = false; this._isTransitioning = false; this._scrollBar = new ScrollBarHelper(); } // Getters static get Default() { return Default$5; } static get NAME() { return NAME$6; } // Public toggle(relatedTarget) { return this._isShown ? this.hide() : this.show(relatedTarget); } show(relatedTarget) { if (this._isShown || this._isTransitioning) { return; } const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, { relatedTarget }); if (showEvent.defaultPrevented) { return; } this._isShown = true; if (this._isAnimated()) { this._isTransitioning = true; } this._scrollBar.hide(); document.body.classList.add(CLASS_NAME_OPEN); this._adjustDialog(); this._setEscapeEvent(); this._setResizeEvent(); EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => { EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => { if (event.target === this._element) { this._ignoreBackdropClick = true; } }); }); this._showBackdrop(() => this._showElement(relatedTarget)); } hide() { if (!this._isShown || this._isTransitioning) { return; } const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3); if (hideEvent.defaultPrevented) { return; } this._isShown = false; const isAnimated = this._isAnimated(); if (isAnimated) { this._isTransitioning = true; } this._setEscapeEvent(); this._setResizeEvent(); this._focustrap.deactivate(); this._element.classList.remove(CLASS_NAME_SHOW$4); EventHandler.off(this._element, EVENT_CLICK_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS); this._queueCallback(() => this._hideModal(), this._element, isAnimated); } dispose() { [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6)); this._backdrop.dispose(); this._focustrap.deactivate(); super.dispose(); } handleUpdate() { this._adjustDialog(); } // Private _initializeBackDrop() { return new Backdrop({ isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value isAnimated: this._isAnimated() }); } _initializeFocusTrap() { return new FocusTrap({ trapElement: this._element }); } _getConfig(config) { config = { ...Default$5, ...Manipulator.getDataAttributes(this._element), ...(typeof config === 'object' ? config : {}) }; typeCheckConfig(NAME$6, config, DefaultType$5); return config; } _showElement(relatedTarget) { const isAnimated = this._isAnimated(); const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog); if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { // Don't move modal's DOM position document.body.append(this._element); } this._element.style.display = 'block'; this._element.removeAttribute('aria-hidden'); this._element.setAttribute('aria-modal', true); this._element.setAttribute('role', 'dialog'); this._element.scrollTop = 0; if (modalBody) { modalBody.scrollTop = 0; } if (isAnimated) { reflow(this._element); } this._element.classList.add(CLASS_NAME_SHOW$4); const transitionComplete = () => { if (this._config.focus) { this._focustrap.activate(); } this._isTransitioning = false; EventHandler.trigger(this._element, EVENT_SHOWN$3, { relatedTarget }); }; this._queueCallback(transitionComplete, this._dialog, isAnimated); } _setEscapeEvent() { if (this._isShown) { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => { if (this._config.keyboard && event.key === ESCAPE_KEY$1) { event.preventDefault(); this.hide(); } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) { this._triggerBackdropTransition(); } }); } else { EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1); } } _setResizeEvent() { if (this._isShown) { EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog()); } else { EventHandler.off(window, EVENT_RESIZE); } } _hideModal() { this._element.style.display = 'none'; this._element.setAttribute('aria-hidden', true); this._element.removeAttribute('aria-modal'); this._element.removeAttribute('role'); this._isTransitioning = false; this._backdrop.hide(() => { document.body.classList.remove(CLASS_NAME_OPEN); this._resetAdjustments(); this._scrollBar.reset(); EventHandler.trigger(this._element, EVENT_HIDDEN$3); }); } _showBackdrop(callback) { EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => { if (this._ignoreBackdropClick) { this._ignoreBackdropClick = false; return; } if (event.target !== event.currentTarget) { return; } if (this._config.backdrop === true) { this.hide(); } else if (this._config.backdrop === 'static') { this._triggerBackdropTransition(); } }); this._backdrop.show(callback); } _isAnimated() { return this._element.classList.contains(CLASS_NAME_FADE$3); } _triggerBackdropTransition() { const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED); if (hideEvent.defaultPrevented) { return; } const { classList, scrollHeight, style } = this._element; const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) { return; } if (!isModalOverflowing) { style.overflowY = 'hidden'; } classList.add(CLASS_NAME_STATIC); this._queueCallback(() => { classList.remove(CLASS_NAME_STATIC); if (!isModalOverflowing) { this._queueCallback(() => { style.overflowY = ''; }, this._dialog); } }, this._dialog); this._element.focus(); } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // ---------------------------------------------------------------------- _adjustDialog() { const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; const scrollbarWidth = this._scrollBar.getWidth(); const isBodyOverflowing = scrollbarWidth > 0; if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) { this._element.style.paddingLeft = `${scrollbarWidth}px`; } if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) { this._element.style.paddingRight = `${scrollbarWidth}px`; } } _resetAdjustments() { this._element.style.paddingLeft = ''; this._element.style.paddingRight = ''; } // Static static jQueryInterface(config, relatedTarget) { return this.each(function () { const data = Modal.getOrCreateInstance(this, config); if (typeof config !== 'string') { return; } if (typeof data[config] === 'undefined') { throw new TypeError(`No method named "${config}"`); } data[config](relatedTarget); }); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) { const target = getElementFromSelector(this); if (['A', 'AREA'].includes(this.tagName)) { event.preventDefault(); } EventHandler.one(target, EVENT_SHOW$3, showEvent => { if (showEvent.defaultPrevented) { // only register focus restorer if modal will actually get shown return; } EventHandler.one(target, EVENT_HIDDEN$3, () => { if (isVisible(this)) { this.focus(); } }); }); // avoid conflict when clicking moddal toggler while another one is open const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1); if (allReadyOpen) { Modal.getInstance(allReadyOpen).hide(); } const data = Modal.getOrCreateInstance(target); data.toggle(this); }); enableDismissTrigger(Modal); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Modal to jQuery only if jQuery is present */ defineJQueryPlugin(Modal); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): offcanvas.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$5 = 'offcanvas'; const DATA_KEY$5 = 'bs.offcanvas'; const EVENT_KEY$5 = `.${DATA_KEY$5}`; const DATA_API_KEY$2 = '.data-api'; const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`; const ESCAPE_KEY = 'Escape'; const Default$4 = { backdrop: true, keyboard: true, scroll: false }; const DefaultType$4 = { backdrop: 'boolean', keyboard: 'boolean', scroll: 'boolean' }; const CLASS_NAME_SHOW$3 = 'show'; const CLASS_NAME_BACKDROP = 'offcanvas-backdrop'; const OPEN_SELECTOR = '.offcanvas.show'; const EVENT_SHOW$2 = `show${EVENT_KEY$5}`; const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`; const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`; const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`; const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`; const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`; const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Offcanvas extends BaseComponent { constructor(element, config) { super(element); this._config = this._getConfig(config); this._isShown = false; this._backdrop = this._initializeBackDrop(); this._focustrap = this._initializeFocusTrap(); this._addEventListeners(); } // Getters static get NAME() { return NAME$5; } static get Default() { return Default$4; } // Public toggle(relatedTarget) { return this._isShown ? this.hide() : this.show(relatedTarget); } show(relatedTarget) { if (this._isShown) { return; } const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, { relatedTarget }); if (showEvent.defaultPrevented) { return; } this._isShown = true; this._element.style.visibility = 'visible'; this._backdrop.show(); if (!this._config.scroll) { new ScrollBarHelper().hide(); } this._element.removeAttribute('aria-hidden'); this._element.setAttribute('aria-modal', true); this._element.setAttribute('role', 'dialog'); this._element.classList.add(CLASS_NAME_SHOW$3); const completeCallBack = () => { if (!this._config.scroll) { this._focustrap.activate(); } EventHandler.trigger(this._element, EVENT_SHOWN$2, { relatedTarget }); }; this._queueCallback(completeCallBack, this._element, true); } hide() { if (!this._isShown) { return; } const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2); if (hideEvent.defaultPrevented) { return; } this._focustrap.deactivate(); this._element.blur(); this._isShown = false; this._element.classList.remove(CLASS_NAME_SHOW$3); this._backdrop.hide(); const completeCallback = () => { this._element.setAttribute('aria-hidden', true); this._element.removeAttribute('aria-modal'); this._element.removeAttribute('role'); this._element.style.visibility = 'hidden'; if (!this._config.scroll) { new ScrollBarHelper().reset(); } EventHandler.trigger(this._element, EVENT_HIDDEN$2); }; this._queueCallback(completeCallback, this._element, true); } dispose() { this._backdrop.dispose(); this._focustrap.deactivate(); super.dispose(); } // Private _getConfig(config) { config = { ...Default$4, ...Manipulator.getDataAttributes(this._element), ...(typeof config === 'object' ? config : {}) }; typeCheckConfig(NAME$5, config, DefaultType$4); return config; } _initializeBackDrop() { return new Backdrop({ className: CLASS_NAME_BACKDROP, isVisible: this._config.backdrop, isAnimated: true, rootElement: this._element.parentNode, clickCallback: () => this.hide() }); } _initializeFocusTrap() { return new FocusTrap({ trapElement: this._element }); } _addEventListeners() { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => { if (this._config.keyboard && event.key === ESCAPE_KEY) { this.hide(); } }); } // Static static jQueryInterface(config) { return this.each(function () { const data = Offcanvas.getOrCreateInstance(this, config); if (typeof config !== 'string') { return; } if (data[config] === undefined || config.startsWith('_') || config === 'constructor') { throw new TypeError(`No method named "${config}"`); } data[config](this); }); } } /** * ------------------------------------------------------------------------ * Data Api implementation * ------------------------------------------------------------------------ */ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) { const target = getElementFromSelector(this); if (['A', 'AREA'].includes(this.tagName)) { event.preventDefault(); } if (isDisabled(this)) { return; } EventHandler.one(target, EVENT_HIDDEN$2, () => { // focus on trigger when it is closed if (isVisible(this)) { this.focus(); } }); // avoid conflict when clicking a toggler of an offcanvas, while another is open const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR); if (allReadyOpen && allReadyOpen !== target) { Offcanvas.getInstance(allReadyOpen).hide(); } const data = Offcanvas.getOrCreateInstance(target); data.toggle(this); }); EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())); enableDismissTrigger(Offcanvas); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ defineJQueryPlugin(Offcanvas); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']); const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; /** * A pattern that recognizes a commonly useful subset of URLs that are safe. * * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts */ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i; /** * A pattern that matches safe data URLs. Only matches image, video and audio types. * * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts */ const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; const allowedAttribute = (attribute, allowedAttributeList) => { const attributeName = attribute.nodeName.toLowerCase(); if (allowedAttributeList.includes(attributeName)) { if (uriAttributes.has(attributeName)) { return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue)); } return true; } const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute. for (let i = 0, len = regExp.length; i < len; i++) { if (regExp[i].test(attributeName)) { return true; } } return false; }; const DefaultAllowlist = { // Global attributes allowed on any supplied element below. '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], a: ['target', 'href', 'title', 'rel'], area: [], b: [], br: [], col: [], code: [], div: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] }; function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) { if (!unsafeHtml.length) { return unsafeHtml; } if (sanitizeFn && typeof sanitizeFn === 'function') { return sanitizeFn(unsafeHtml); } const domParser = new window.DOMParser(); const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); const elements = [].concat(...createdDocument.body.querySelectorAll('*')); for (let i = 0, len = elements.length; i < len; i++) { const element = elements[i]; const elementName = element.nodeName.toLowerCase(); if (!Object.keys(allowList).includes(elementName)) { element.remove(); continue; } const attributeList = [].concat(...element.attributes); const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []); attributeList.forEach(attribute => { if (!allowedAttribute(attribute, allowedAttributes)) { element.removeAttribute(attribute.nodeName); } }); } return createdDocument.body.innerHTML; } /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$4 = 'tooltip'; const DATA_KEY$4 = 'bs.tooltip'; const EVENT_KEY$4 = `.${DATA_KEY$4}`; const CLASS_PREFIX$1 = 'bs-tooltip'; const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']); const DefaultType$3 = { animation: 'boolean', template: 'string', title: '(string|element|function)', trigger: 'string', delay: '(number|object)', html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', offset: '(array|string|function)', container: '(string|element|boolean)', fallbackPlacements: 'array', boundary: '(string|element)', customClass: '(string|function)', sanitize: 'boolean', sanitizeFn: '(null|function)', allowList: 'object', popperConfig: '(null|object|function)' }; const AttachmentMap = { AUTO: 'auto', TOP: 'top', RIGHT: isRTL() ? 'left' : 'right', BOTTOM: 'bottom', LEFT: isRTL() ? 'right' : 'left' }; const Default$3 = { animation: true, template: '', trigger: 'hover focus', title: '', delay: 0, html: false, selector: false, placement: 'top', offset: [0, 0], container: false, fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', customClass: '', sanitize: true, sanitizeFn: null, allowList: DefaultAllowlist, popperConfig: null }; const Event$2 = { HIDE: `hide${EVENT_KEY$4}`, HIDDEN: `hidden${EVENT_KEY$4}`, SHOW: `show${EVENT_KEY$4}`, SHOWN: `shown${EVENT_KEY$4}`, INSERTED: `inserted${EVENT_KEY$4}`, CLICK: `click${EVENT_KEY$4}`, FOCUSIN: `focusin${EVENT_KEY$4}`, FOCUSOUT: `focusout${EVENT_KEY$4}`, MOUSEENTER: `mouseenter${EVENT_KEY$4}`, MOUSELEAVE: `mouseleave${EVENT_KEY$4}` }; const CLASS_NAME_FADE$2 = 'fade'; const CLASS_NAME_MODAL = 'modal'; const CLASS_NAME_SHOW$2 = 'show'; const HOVER_STATE_SHOW = 'show'; const HOVER_STATE_OUT = 'out'; const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`; const EVENT_MODAL_HIDE = 'hide.bs.modal'; const TRIGGER_HOVER = 'hover'; const TRIGGER_FOCUS = 'focus'; const TRIGGER_CLICK = 'click'; const TRIGGER_MANUAL = 'manual'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Tooltip extends BaseComponent { constructor(element, config) { if (typeof Popper === 'undefined') { throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); } super(element); // private this._isEnabled = true; this._timeout = 0; this._hoverState = ''; this._activeTrigger = {}; this._popper = null; // Protected this._config = this._getConfig(config); this.tip = null; this._setListeners(); } // Getters static get Default() { return Default$3; } static get NAME() { return NAME$4; } static get Event() { return Event$2; } static get DefaultType() { return DefaultType$3; } // Public enable() { this._isEnabled = true; } disable() { this._isEnabled = false; } toggleEnabled() { this._isEnabled = !this._isEnabled; } toggle(event) { if (!this._isEnabled) { return; } if (event) { const context = this._initializeOnDelegatedTarget(event); context._activeTrigger.click = !context._activeTrigger.click; if (context._isWithActiveTrigger()) { context._enter(null, context); } else { context._leave(null, context); } } else { if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) { this._leave(null, this); return; } this._enter(null, this); } } dispose() { clearTimeout(this._timeout); EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); if (this.tip) { this.tip.remove(); } this._disposePopper(); super.dispose(); } show() { if (this._element.style.display === 'none') { throw new Error('Please use show on visible elements'); } if (!(this.isWithContent() && this._isEnabled)) { return; } const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW); const shadowRoot = findShadowRoot(this._element); const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element); if (showEvent.defaultPrevented || !isInTheDom) { return; } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title` // This will be removed later in favor of a `setContent` method if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) { this._disposePopper(); this.tip.remove(); this.tip = null; } const tip = this.getTipElement(); const tipId = getUID(this.constructor.NAME); tip.setAttribute('id', tipId); this._element.setAttribute('aria-describedby', tipId); if (this._config.animation) { tip.classList.add(CLASS_NAME_FADE$2); } const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement; const attachment = this._getAttachment(placement); this._addAttachmentClass(attachment); const { container } = this._config; Data.set(tip, this.constructor.DATA_KEY, this); if (!this._element.ownerDocument.documentElement.contains(this.tip)) { container.append(tip); EventHandler.trigger(this._element, this.constructor.Event.INSERTED); } if (this._popper) { this._popper.update(); } else { this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment)); } tip.classList.add(CLASS_NAME_SHOW$2); const customClass = this._resolvePossibleFunction(this._config.customClass); if (customClass) { tip.classList.add(...customClass.split(' ')); } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement) { [].concat(...document.body.children).forEach(element => { EventHandler.on(element, 'mouseover', noop); }); } const complete = () => { const prevHoverState = this._hoverState; this._hoverState = null; EventHandler.trigger(this._element, this.constructor.Event.SHOWN); if (prevHoverState === HOVER_STATE_OUT) { this._leave(null, this); } }; const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2); this._queueCallback(complete, this.tip, isAnimated); } hide() { if (!this._popper) { return; } const tip = this.getTipElement(); const complete = () => { if (this._isWithActiveTrigger()) { return; } if (this._hoverState !== HOVER_STATE_SHOW) { tip.remove(); } this._cleanTipClass(); this._element.removeAttribute('aria-describedby'); EventHandler.trigger(this._element, this.constructor.Event.HIDDEN); this._disposePopper(); }; const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE); if (hideEvent.defaultPrevented) { return; } tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop)); } this._activeTrigger[TRIGGER_CLICK] = false; this._activeTrigger[TRIGGER_FOCUS] = false; this._activeTrigger[TRIGGER_HOVER] = false; const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2); this._queueCallback(complete, this.tip, isAnimated); this._hoverState = ''; } update() { if (this._popper !== null) { this._popper.update(); } } // Protected isWithContent() { return Boolean(this.getTitle()); } getTipElement() { if (this.tip) { return this.tip; } const element = document.createElement('div'); element.innerHTML = this._config.template; const tip = element.children[0]; this.setContent(tip); tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); this.tip = tip; return this.tip; } setContent(tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER); } _sanitizeAndSetContent(template, content, selector) { const templateElement = SelectorEngine.findOne(selector, template); if (!content && templateElement) { templateElement.remove(); return; } // we use append for html objects to maintain js events this.setElementContent(templateElement, content); } setElementContent(element, content) { if (element === null) { return; } if (isElement$1(content)) { content = getElement(content); // content is a DOM node or a jQuery if (this._config.html) { if (content.parentNode !== element) { element.innerHTML = ''; element.append(content); } } else { element.textContent = content.textContent; } return; } if (this._config.html) { if (this._config.sanitize) { content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn); } element.innerHTML = content; } else { element.textContent = content; } } getTitle() { const title = this._element.getAttribute('data-bs-original-title') || this._config.title; return this._resolvePossibleFunction(title); } updateAttachment(attachment) { if (attachment === 'right') { return 'end'; } if (attachment === 'left') { return 'start'; } return attachment; } // Private _initializeOnDelegatedTarget(event, context) { return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig()); } _getOffset() { const { offset } = this._config; if (typeof offset === 'string') { return offset.split(',').map(val => Number.parseInt(val, 10)); } if (typeof offset === 'function') { return popperData => offset(popperData, this._element); } return offset; } _resolvePossibleFunction(content) { return typeof content === 'function' ? content.call(this._element) : content; } _getPopperConfig(attachment) { const defaultBsPopperConfig = { placement: attachment, modifiers: [{ name: 'flip', options: { fallbackPlacements: this._config.fallbackPlacements } }, { name: 'offset', options: { offset: this._getOffset() } }, { name: 'preventOverflow', options: { boundary: this._config.boundary } }, { name: 'arrow', options: { element: `.${this.constructor.NAME}-arrow` } }, { name: 'onChange', enabled: true, phase: 'afterWrite', fn: data => this._handlePopperPlacementChange(data) }], onFirstUpdate: data => { if (data.options.placement !== data.placement) { this._handlePopperPlacementChange(data); } } }; return { ...defaultBsPopperConfig, ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig) }; } _addAttachmentClass(attachment) { this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`); } _getAttachment(placement) { return AttachmentMap[placement.toUpperCase()]; } _setListeners() { const triggers = this._config.trigger.split(' '); triggers.forEach(trigger => { if (trigger === 'click') { EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event)); } else if (trigger !== TRIGGER_MANUAL) { const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN; const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT; EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event)); EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event)); } }); this._hideModalHandler = () => { if (this._element) { this.hide(); } }; EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler); if (this._config.selector) { this._config = { ...this._config, trigger: 'manual', selector: '' }; } else { this._fixTitle(); } } _fixTitle() { const title = this._element.getAttribute('title'); const originalTitleType = typeof this._element.getAttribute('data-bs-original-title'); if (title || originalTitleType !== 'string') { this._element.setAttribute('data-bs-original-title', title || ''); if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) { this._element.setAttribute('aria-label', title); } this._element.setAttribute('title', ''); } } _enter(event, context) { context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; } if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) { context._hoverState = HOVER_STATE_SHOW; return; } clearTimeout(context._timeout); context._hoverState = HOVER_STATE_SHOW; if (!context._config.delay || !context._config.delay.show) { context.show(); return; } context._timeout = setTimeout(() => { if (context._hoverState === HOVER_STATE_SHOW) { context.show(); } }, context._config.delay.show); } _leave(event, context) { context = this._initializeOnDelegatedTarget(event, context); if (event) { context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget); } if (context._isWithActiveTrigger()) { return; } clearTimeout(context._timeout); context._hoverState = HOVER_STATE_OUT; if (!context._config.delay || !context._config.delay.hide) { context.hide(); return; } context._timeout = setTimeout(() => { if (context._hoverState === HOVER_STATE_OUT) { context.hide(); } }, context._config.delay.hide); } _isWithActiveTrigger() { for (const trigger in this._activeTrigger) { if (this._activeTrigger[trigger]) { return true; } } return false; } _getConfig(config) { const dataAttributes = Manipulator.getDataAttributes(this._element); Object.keys(dataAttributes).forEach(dataAttr => { if (DISALLOWED_ATTRIBUTES.has(dataAttr)) { delete dataAttributes[dataAttr]; } }); config = { ...this.constructor.Default, ...dataAttributes, ...(typeof config === 'object' && config ? config : {}) }; config.container = config.container === false ? document.body : getElement(config.container); if (typeof config.delay === 'number') { config.delay = { show: config.delay, hide: config.delay }; } if (typeof config.title === 'number') { config.title = config.title.toString(); } if (typeof config.content === 'number') { config.content = config.content.toString(); } typeCheckConfig(NAME$4, config, this.constructor.DefaultType); if (config.sanitize) { config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn); } return config; } _getDelegateConfig() { const config = {}; for (const key in this._config) { if (this.constructor.Default[key] !== this._config[key]) { config[key] = this._config[key]; } } // In the future can be replaced with: // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]]) // `Object.fromEntries(keysWithDifferentValues)` return config; } _cleanTipClass() { const tip = this.getTipElement(); const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g'); const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex); if (tabClass !== null && tabClass.length > 0) { tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass)); } } _getBasicClassPrefix() { return CLASS_PREFIX$1; } _handlePopperPlacementChange(popperData) { const { state } = popperData; if (!state) { return; } this.tip = state.elements.popper; this._cleanTipClass(); this._addAttachmentClass(this._getAttachment(state.placement)); } _disposePopper() { if (this._popper) { this._popper.destroy(); this._popper = null; } } // Static static jQueryInterface(config) { return this.each(function () { const data = Tooltip.getOrCreateInstance(this, config); if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError(`No method named "${config}"`); } data[config](); } }); } } /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Tooltip to jQuery only if jQuery is present */ defineJQueryPlugin(Tooltip); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$3 = 'popover'; const DATA_KEY$3 = 'bs.popover'; const EVENT_KEY$3 = `.${DATA_KEY$3}`; const CLASS_PREFIX = 'bs-popover'; const Default$2 = { ...Tooltip.Default, placement: 'right', offset: [0, 8], trigger: 'click', content: '', template: '' }; const DefaultType$2 = { ...Tooltip.DefaultType, content: '(string|element|function)' }; const Event$1 = { HIDE: `hide${EVENT_KEY$3}`, HIDDEN: `hidden${EVENT_KEY$3}`, SHOW: `show${EVENT_KEY$3}`, SHOWN: `shown${EVENT_KEY$3}`, INSERTED: `inserted${EVENT_KEY$3}`, CLICK: `click${EVENT_KEY$3}`, FOCUSIN: `focusin${EVENT_KEY$3}`, FOCUSOUT: `focusout${EVENT_KEY$3}`, MOUSEENTER: `mouseenter${EVENT_KEY$3}`, MOUSELEAVE: `mouseleave${EVENT_KEY$3}` }; const SELECTOR_TITLE = '.popover-header'; const SELECTOR_CONTENT = '.popover-body'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class Popover extends Tooltip { // Getters static get Default() { return Default$2; } static get NAME() { return NAME$3; } static get Event() { return Event$1; } static get DefaultType() { return DefaultType$2; } // Overrides isWithContent() { return this.getTitle() || this._getContent(); } setContent(tip) { this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE); this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT); } // Private _getContent() { return this._resolvePossibleFunction(this._config.content); } _getBasicClassPrefix() { return CLASS_PREFIX; } // Static static jQueryInterface(config) { return this.each(function () { const data = Popover.getOrCreateInstance(this, config); if (typeof config === 'string') { if (typeof data[config] === 'undefined') { throw new TypeError(`No method named "${config}"`); } data[config](); } }); } } /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ * add .Popover to jQuery only if jQuery is present */ defineJQueryPlugin(Popover); /** * -------------------------------------------------------------------------- * Bootstrap (v5.1.3): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ const NAME$2 = 'scrollspy'; const DATA_KEY$2 = 'bs.scrollspy'; const EVENT_KEY$2 = `.${DATA_KEY$2}`; const DATA_API_KEY$1 = '.data-api'; const Default$1 = { offset: 10, method: 'auto', target: '' }; const DefaultType$1 = { offset: 'number', method: 'string', target: '(string|element)' }; const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`; const EVENT_SCROLL = `scroll${EVENT_KEY$2}`; const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`; const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; const CLASS_NAME_ACTIVE$1 = 'active'; const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]'; const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group'; const SELECTOR_NAV_LINKS = '.nav-link'; const SELECTOR_NAV_ITEMS = '.nav-item'; const SELECTOR_LIST_ITEMS = '.list-group-item'; const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`; const SELECTOR_DROPDOWN$1 = '.dropdown'; const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; const METHOD_OFFSET = 'offset'; const METHOD_POSITION = 'position'; /** * ------------------------------------------------------------------------ * Class Definition * ------------------------------------------------------------------------ */ class ScrollSpy extends BaseComponent { constructor(element, config) { super(element); this._scrollElement = this._element.tagName === 'BODY' ? window : this._element; this._config = this._getConfig(config); this._offsets = []; this._targets = []; this._activeTarget = null; this._scrollHeight = 0; EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process()); this.refresh(); this._process(); } // Getters static get Default() { return Default$1; } static get NAME() { return NAME$2; } // Public refresh() { const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION; const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0; this._offsets = []; this._targets = []; this._scrollHeight = this._getScrollHeight(); const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target); targets.map(element => { const targetSelector = getSelectorFromElement(element); const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null; if (target) { const targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector]; } } return null; }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => { this._offsets.push(item[0]); this._targets.push(item[1]); }); } dispose() { EventHandler.off(this._scrollElement, EVENT_KEY$2); super.dispose(); } // Private _getConfig(config) { config = { ...Default$1, ...Manipulator.getDataAttributes(this._element), ...(typeof config === 'object' && config ? config : {}) }; config.target = getElement(config.target) || document.documentElement; typeCheckConfig(NAME$2, config, DefaultType$1); return config; } _getScrollTop() { return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; } _getScrollHeight() { return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); } _getOffsetHeight() { return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; } _process() { const scrollTop = this._getScrollTop() + this._config.offset; const scrollHeight = this._getScrollHeight(); const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); if (this._scrollHeight !== scrollHeight) { this.refresh(); } if (scrollTop >= maxScroll) { const target = this._targets[this._targets.length - 1]; if (this._activeTarget !== target) { this._activate(target); } return; } if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { this._activeTarget = null; this._clear(); return; } for (let i = this._offsets.length; i--;) { const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); if (isActiveTarget) { this._activate(this._targets[i]); } } } _activate(target) { this._activeTarget = target; this._clear(); const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`); const link = SelectorEngine.findOne(queries.join(','), this._config.target); link.classList.add(CLASS_NAME_ACTIVE$1); if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) { SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1); } else { SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => { // Set triggered links parents as active // With both
<% balances.forEach(function(entry) { %> <% }); %> <% nfts.forEach(function(entry) { %> <% }); %>
Balance Token Contract
<%= entry.value %> <%= entry.symbol %> <% if(!entry.is_native) { %> <%= entry.contract %> <% } %>
N/A NFT <%= entry.contract %>
<% if(contract) { %>
<%= JSON.stringify(contract, null, 4) %>
<% } %> <% history.forEach(function(entry) { %> <% }); %>
Height Type Amount Token Address
<%= entry.height %> <%= entry.type %> <%= entry.value %> <% if(entry.symbol != "MMX") { %> <%= entry.symbol %> <% } else { %> MMX <% } %> <%= entry.address %> TX
================================================ FILE: www/old/explorer/views/block.ejs ================================================

Block | <%= block.height %>

<% block.rewards.forEach(function(entry, index) { %> <% }); %>
Hash <%= block.hash %>
Previous <%= block.prev %>
Height <%= block.height %>
Next <%= block.height+1 %>
K Size <%= block.ksize %>
Proof Score <%= block.score %>
Reward[<%= index %>] <%= entry.value %> | <%= entry.address %>
Farmer Key <%= block.farmer_key %>
<% block.tx_list.forEach(function(tx, index) { %> <% }); %>
TX[<%= index %>] <%= tx.id %>
================================================ FILE: www/old/explorer/views/index.ejs ================================================ MMX - Explorer

<%- include(body) %>
================================================ FILE: www/old/explorer/views/recent.ejs ================================================ <% blocks.forEach(function(block) { %> <% }); %>
Height TX K Score Reward T‐Diff S‐Diff Hash
<%= block.height %> <%= block.tx_count %> <%= block.ksize %> <%= block.score %> <%= block.reward %> <%= block.time_diff %> <%= block.space_diff %> <%= block.hash %>
================================================ FILE: www/old/explorer/views/recent_transactions.ejs ================================================ <% transactions.forEach(function(info) { %> <% }); %>
Height Fee N(In) N(Out) ID
<%= info.height %> <%= info.fee.value %> MMX <%= info.inputs.length %> <%= info.outputs.length %> <%= info.id %>
================================================ FILE: www/old/explorer/views/transaction.ejs ================================================

TX | <%= tx.id %>

Block <% if(tx.height) { %> <%= tx.height %> <% } else { %> unconfirmed <% } %>
Fee <%= tx.fee.value %> MMX
<% tx.inputs.forEach(function(input, index) { %> <% if(input.utxo) { %> <% } %> <% }); %> <% tx.outputs.forEach(function(output, index) { %> <% }); %>
Amount Token Address
Input[<%= index %>] <%= input.value %> <% if(input.contract) { %> <%= input.symbol %> <% } else { %> <%= input.symbol %> <% } %> <%= input.address %> Prev
Output[<%= index %>] <%= output.value %> <% if(output.contract) { %> <%= output.symbol %> <% } else { %> <%= output.symbol %> <% } %> <%= output.address %>
================================================ FILE: www/pool-server/README.md ================================================ # pool-server ## MongoDB v8.0 Setup ``` curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ --dearmor echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list sudo apt-get update sudo apt-get install -y mongodb-org ``` ### Config /etc/mongod.conf ``` net: port: 27017 bindIp: 0.0.0.0 replication: replSetName: rs ``` `sudo systemctl restart mongod` ### Firewall `sudo apt install ufw` ``` # ufw status Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere Anywhere ALLOW 69.197.174.72 Anywhere ALLOW 49.231.43.170 Anywhere ALLOW 110.164.184.5 Anywhere ALLOW 89.116.184.19 27017 DENY Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 27017 (v6) DENY Anywhere (v6) ``` ### Add Member ``` $ mongosh rs.add({host: 'mmx-si-1.mmx.network', priority: 1}) ``` ### Inital Setup `mongosh` on one server after adding members: ``` rs.initiate() ``` ================================================ FILE: www/pool-server/account.js ================================================ const mongoose = require('mongoose'); const axios = require("axios"); const dbs = require('./schema.js'); const utils = require('./utils.js'); const config = require('./config.js'); var db = null; var vdf_height = null; var sync_height = null; var balance_lock = false; const api_token_header = { headers: {'x-api-token': config.api_token} }; async function query_height() { try { vdf_height = await utils.get_vdf_height(); sync_height = await utils.get_synced_height(); if(!sync_height) { console.log('Waiting for node sync ...'); } } catch(e) { console.log("Failed to query sync height:", e.message); } } async function update_account(address, reward, pool_share, points, count, height, opt) { const account = await dbs.Account.findOne({address: address}); if(account) { if(reward > 0) { account.balance += reward; } account.pool_share = pool_share; account.points_rate = points / config.share_window; account.partial_rate = count / config.share_window_hours; account.last_update = height; await account.save(opt); } } var update_lock = false; async function update() { if(!sync_height) { return; } if(update_lock) { return; } while(balance_lock) { await utils.sleep(1000); } update_lock = true; balance_lock = true; try { const conn = await db.startSession(); try { await conn.startTransaction(); const opt = {session: conn}; const start_height = vdf_height - config.share_window; const result = await dbs.Partial.aggregate([ {$match: {pending: false, valid: true, height: {$gte: start_height}}}, {$group: {_id: "$account", points: {$sum: "$points"}, count: {$sum: 1}}} ]); const distribution = await dbs.Partial.aggregate([ {$match: {pending: false, valid: true, height: {$gte: start_height}}}, {$group: {_id: "$height", points: {$sum: "$points"}, count: {$sum: 1}}} ]); const errors = await dbs.Partial.aggregate([ {$match: {pending: false, valid: false, height: {$gte: start_height}}}, {$group: {_id: "$error_code", points: {$sum: "$points"}, count: {$sum: 1}}} ]); let uptime = 0; let reward_enable = false; { const blocks_per_hour = 3600 * 1000 / config.block_interval; const map = new Map(); for(const entry of distribution) { const hour = Math.floor((entry._id - start_height) / blocks_per_hour); map.set(hour, true); } uptime = Math.min(map.size, config.share_window_hours); reward_enable = (uptime > config.share_window_hours / 2); } let total_points = 0; let total_partials = 0; for(const entry of result) { total_points += entry.points; total_partials += entry.count; } let total_points_failed = 0; for(const entry of errors) { total_points_failed += entry.points; } let pool = await dbs.Pool.findOne({id: "this"}); if(!pool) { pool = new dbs.Pool({id: "this"}); } pool.farmers = result.length; pool.points_rate = total_points / config.share_window; pool.partial_rate = total_partials / config.share_window_hours; const partial_errors = {}; for(const entry of errors) { partial_errors[entry._id] = { points: entry.points, count: entry.count, share: entry.points / (total_points + total_points_failed) }; } pool.partial_errors = partial_errors; pool.last_update = vdf_height; await pool.save(opt); let total_rewards = 0; if(reward_enable) { // Find all blocks that are pending and have been confirmed enough const blocks = await dbs.Block.find({ pending: true, height: {$lte: sync_height - config.account_delay} }); for(const block of blocks) { const res = await axios.get(config.node_url + '/wapi/header?height=' + block.height, api_token_header); const valid = (res.data.hash === block.hash); if(valid) { total_rewards += block.reward_value; } block.valid = valid; block.pending = false; await block.save(opt); if(valid) { console.log("Farmed block", block.height, "reward", block.reward_value, "MMX", "account", block.account); } else { console.log("Invalid block", block.height); } } } var fee_value = 0; // Take pool fee first if(total_rewards) { fee_value = total_rewards * config.pool_fee; total_rewards -= fee_value; let account = await dbs.Account.findOne({address: config.fee_account}); if(!account) { account = new dbs.Account({address: config.fee_account}); } account.balance += fee_value; await account.save(opt); } // Distribute rewards and update account stats let res = []; for(const entry of result) { const pool_share = entry.points / total_points; const reward_share = total_rewards * pool_share; res.push(update_account( entry._id, reward_share, pool_share, entry.points, entry.count, vdf_height, opt)); } await Promise.all(res); await conn.commitTransaction(); if(total_rewards) { console.log( "Distributed", total_rewards, "MMX to", result.length, "accounts", "fee", fee_value, "MMX", "total_points", total_points, "total_partials", total_partials); } console.log( "vdf_height", vdf_height, "points_rate", pool.points_rate, "partial_rate", pool.partial_rate, "farmers", pool.farmers, "reward_enable", reward_enable, "uptime", uptime, "/", config.share_window_hours, "hours" ); if(total_points_failed) { console.log("partial_errors:", partial_errors); } } catch(e) { await conn.abortTransaction(); throw e; } finally { conn.endSession(); } } catch(e) { console.log("update() failed:", e.message); } finally { update_lock = false; balance_lock = false; } } var find_blocks_lock = false; async function find_blocks() { if(find_blocks_lock) { return; } find_blocks_lock = true; try { let since = 0; { const latest = await dbs.Block.findOne().sort({height: -1}); if(latest) { since = Math.max(latest.height - config.account_delay, 0); } } const res = await axios.get(config.node_url + '/wapi/address/history?id=' + config.pool_target + "&since=" + since + "&limit=-1", api_token_header ); for(const entry of res.data) { if(entry.type != 'REWARD') { continue; } if(!entry.is_native) { continue; // not MMX } const block_hash = entry.txid; // txid = block hash in case of type == REWARD if(await dbs.Block.exists({hash: block_hash})) { continue; } try { const res = await axios.get(config.node_url + '/wapi/header?hash=' + block_hash, api_token_header); const header = res.data; const block = new dbs.Block({ hash: header.hash, height: header.height, vdf_height: header.vdf_height, account: header.reward_account, contract: header.reward_contract, reward_addr: header.reward_addr, farmer_key: header.farmer_key, reward: entry.amount, reward_value: entry.value, time: entry.time_stamp, pending: true, }); await block.save(); console.log("Added block", block.height, "hash", block.hash, "reward", block.reward_value, "MMX"); } catch(e) { console.log("Failed to add block:", e.message); } } } catch(e) { console.log("check() failed:", e.message); } finally { find_blocks_lock = false; } } var check_payout_lock = false; async function check_payout() { if(!sync_height) { return; } const height = sync_height; if(check_payout_lock) { return; } while(balance_lock) { await utils.sleep(1000); } check_payout_lock = true; balance_lock = true; try { const list = await dbs.Payout.find({pending: true}); for(const payout of list) { let failed = false; let expired = false; let confirmed = false; try { const res = await axios.get(config.node_url + '/wapi/transaction?id=' + payout.txid, api_token_header); const tx = res.data; if(tx.confirm && tx.confirm >= config.account_delay) { if(tx.did_fail) { failed = true; console.log("Payout transaction failed with:", tx.message); } else { confirmed = true; } payout.tx_fee = tx.fee.value; } } catch(e) { if(height - payout.height > config.payout_tx_expire + 100) { failed = true; expired = true; console.log("Payout transaction expired:", "height", payout.height, "txid", payout.txid); } else { console.log("Failed to check payout transaction:", e.message, "response", e.response ? e.response.data : null, "txid", payout.txid); } } if(!confirmed && !failed) { continue; } payout.valid = !failed; payout.pending = false; const conn = await db.startSession(); try { await conn.startTransaction(); const opt = {session: conn}; if(failed) { // revert balances for(const entry of payout.amounts) { const address = entry[0]; const account = await dbs.Account.findOne({address: address}); if(!account) { throw new Error("Account not found: " + address); } account.balance += entry[1]; await account.save(opt); } payout.expired = expired; console.log("Payout failed:", "height", payout.height, "txid", payout.txid); } else { for(const entry of payout.amounts) { await dbs.Account.updateOne({address: entry[0]}, {$inc: {total_paid: entry[1]}}, opt); } console.log("Payout confirmed:", "height", payout.height, "total_amount", payout.total_amount, "count", payout.count, "tx_fee", payout.tx_fee, "txid", payout.txid); } await payout.save(opt); if(!expired) { const account = await dbs.Account.findOne({address: config.fee_account}); if(!account) { throw new Error("Fee account not found: " + config.fee_account); } account.balance -= payout.tx_fee; await account.save(opt); } await conn.commitTransaction(); } catch(e) { await conn.abortTransaction(); throw e; } finally { conn.endSession(); } } } catch(e) { console.log("check() failed:", e.message); } finally { check_payout_lock = false; balance_lock = false; } } async function make_payout(height, amounts, opt) { const options = { auto_send: false, mark_spent: true, expire_at: height + config.payout_tx_expire, }; let tx = null; try { const res = await axios.post(config.node_url + '/wapi/wallet/send_many', { index: config.wallet_index, amounts: amounts, currency: "MMX", options: options, }, api_token_header); tx = res.data; } catch(e) { throw new Error("Failed to create payout transaction: " + e.message + " (" + (e.response ? e.response.data : "???") + ")"); } if(tx.sender != config.pool_target) { throw new Error("Invalid payout transaction sender: " + tx.sender + " != " + config.pool_target + " (wrong config.wallet_index)"); } let total_amount = 0; for(const entry of amounts) { const payout = new dbs.UserPayout({ account: entry[0], height: height, amount: entry[1], txid: tx.id, }); total_amount += payout.amount; await payout.save(opt); } const payout = new dbs.Payout({ txid: tx.id, total_amount: total_amount, amounts: amounts, count: amounts.length, time: Date.now(), height: height, pending: true, }); await payout.save(opt); console.log("Payout transaction created:", tx.id, "total_amount", total_amount, "count", amounts.length); return tx; } var payout_lock = false; async function payout() { if(!sync_height) { return; } const height = sync_height; if(payout_lock) { return; } while(balance_lock) { await utils.sleep(1000); } payout_lock = true; balance_lock = true; try { const pool = await dbs.Pool.findOne({id: "this"}); if(!pool) { throw new Error("Pool state not found"); } if(!pool.payout_enable) { console.log("Payouts currently disabled"); return; } if(pool.last_payout && height - pool.last_payout < config.payout_interval) { return; } const conn = await db.startSession(); try { await conn.startTransaction(); const opt = {session: conn}; const list = dbs.Account.find({balance: {$gt: config.payout_threshold}}); // reserve for tx fees const reserve = (list.length * config.tx_output_cost + 1); let total_count = 0; let total_amount = 0; let outputs = []; let tx_list = []; for await(const account of list) { let amount = account.balance; if(account.address == config.fee_account) { amount -= reserve; if(amount < config.payout_threshold) { continue; } } account.balance -= amount; await account.save(opt); console.log("Payout triggered for", account.address, "amount", amount, "MMX"); total_count++; total_amount += amount; outputs.push([account.address, amount]); if(outputs.length >= config.max_payouts) { tx_list.push(await make_payout(height, outputs, opt)); outputs = []; } } if(outputs.length) { tx_list.push(await make_payout(height, outputs, opt)); } pool.last_payout = height; await pool.save(opt); await conn.commitTransaction(); for(const tx of tx_list) { try { await axios.post(config.node_url + '/wapi/wallet/send_off', { index: config.wallet_index, tx: tx, }, api_token_header); console.log("Payout transaction sent:", tx.id); } catch(e) { console.log("Failed to send payout transaction:", e.message, "txid", tx.id, "response", e.response ? e.response.data : "???"); } } if(tx_list.length) { console.log("Payout initiated:", "height", height, "total_amount", total_amount, "total_count", total_count, "tx_count", tx_list.length); } } catch(e) { await conn.abortTransaction(); throw e; } finally { conn.endSession(); } } catch(e) { console.log("payout() failed:", e.message); } finally { payout_lock = false; balance_lock = false; } } async function main() { db = await mongoose.connect(config.mongodb_uri); await query_height(); await update(); await payout(); await find_blocks(); await check_payout(); setInterval(query_height, config.block_interval / 10); setInterval(update, config.share_interval * 1000); setInterval(payout, 15 * 60 * 1000); setInterval(find_blocks, config.block_interval / 2); setInterval(check_payout, 60 * 1000); } main(); ================================================ FILE: www/pool-server/config.js ================================================ const config = {}; config.pool_fee = 0.01; // [%] config.partial_expiry = 100; // [blocks] config.account_delay = 48; // [blocks] config.share_window = 8640; // [blocks] config.share_window_hours = 24; // [hours] config.share_interval = 5 * 60; // [sec] config.block_interval = 10 * 1000; // [ms] config.min_difficulty = 1; // diff 1 gives ~0.7 partials per k32 per height config.default_difficulty = 10; config.space_diff_constant = 100000000000; config.payout_interval = 8640; // [blocks] config.payout_tx_expire = 1000; // [blocks] config.payout_threshold = 10; // [MMX] config.tx_output_cost = 0.01; // [MMX] config.max_payout_count = 1000; // max number of payouts per transaction config.server_port = 8080; config.wallet_index = 0; // for pool wallet (payout) config.node_url = "http://localhost:11380"; config.pool_name = "MMX Pool"; config.pool_description = "MMX Pool (reference implementation)"; config.logo_path = "/img/logo.png"; config.fee_account = "mmx1e7yktu9vpeyq7hx39cmagzfp2um3kddwjf4tlt8j3kmktwc7fk6qmyc6ns"; // where the pool fee goes config.pool_target = "mmx1uj2dth7r9tcn3vas42f0hzz74dkz8ygv59mpx44n7px7j7yhvv4sfmkf0d"; // where the block rewards go config.api_token = "B01255C3AD4640292FAB5D0078439E945349EE13A9DD8C1DFE9F69FD0AE8B18C"; // for node API config.mongodb_uri = "mongodb://127.0.0.1:27017/mmx-pool?replicaSet=rs"; module.exports = config; ================================================ FILE: www/pool-server/package.json ================================================ { "dependencies": { "axios": "^1.7.7", "express": "^4.21.0", "mongoose": "^8.6.3" } } ================================================ FILE: www/pool-server/schema.js ================================================ const mongoose = require('mongoose'); const partial = new mongoose.Schema({ hash: {type: String, unique: true}, height: {type: Number, index: true}, account: {type: String, index: true}, contract: {type: String, index: true}, harvester: {type: String, index: true}, difficulty: Number, lookup_time: Number, response_time: Number, time: {type: Date, index: true}, data: Object, points: {type: Number, default: 0}, pending: {type: Boolean, default: true, index: true}, valid: {type: Boolean, index: true}, error_code: {type: String, index: true}, error_message: String, }); const account = new mongoose.Schema({ address: {type: String, unique: true}, balance: {type: Number, default: 0, index: true}, total_paid: {type: Number, default: 0, index: true}, difficulty: {type: Number, default: 1, index: true}, pool_share: {type: Number, default: 0, index: true}, points_rate: {type: Number, default: 0, index: true}, partial_rate: {type: Number, default: 0, index: true}, created: {type: Date, default: Date.now, index: true}, last_update: {type: Number, index: true}, }); const block = new mongoose.Schema({ hash: {type: String, unique: true}, height: {type: Number, index: true}, vdf_height: {type: Number, index: true}, account: {type: String, index: true}, contract: {type: String, index: true}, farmer_key: {type: String, index: true}, reward_addr: {type: String, index: true}, reward: String, reward_value: {type: Number, index: true}, time: Date, pending: {type: Boolean, default: true, index: true}, valid: {type: Boolean, index: true}, }); const payout = new mongoose.Schema({ txid: {type: String, unique: true}, total_amount: Number, tx_fee: Number, amounts: Array, // [[account, amount], ...] count: Number, time: Date, height: {type: Number, index: true}, pending: {type: Boolean, default: true, index: true}, expired: {type: Boolean, index: true}, valid: {type: Boolean, index: true}, }); const user_payout = new mongoose.Schema({ account: {type: String, index: true}, height: {type: Number, index: true}, amount: Number, txid: String, }); const pool = new mongoose.Schema({ id: {type: String, unique: true}, farmers: {type: Number, default: 0}, points_rate: {type: Number, default: 0}, partial_rate: {type: Number, default: 0}, partial_errors: {type: Object}, last_update: {type: Number, default: 0}, last_payout: {type: Number, default: 0}, payout_enable: {type: Boolean, default: true}, }, { minimize: false, }); exports.Partial = mongoose.model('Partial', partial); exports.Account = mongoose.model('Account', account); exports.Block = mongoose.model('Block', block); exports.Payout = mongoose.model('Payout', payout); exports.UserPayout = mongoose.model('UserPayout', user_payout); exports.Pool = mongoose.model('Pool', pool); ================================================ FILE: www/pool-server/server.js ================================================ const mongoose = require('mongoose'); const express = require('express'); const http = require('http'); const axios = require("axios"); const dbs = require('./schema.js'); const utils = require('./utils.js'); const config = require('./config.js'); const { createHash } = require('crypto'); var db = null; var app = express(); var vdf_height = false; var sync_time = null; app.use(express.json()); function no_cache(req, res, next) { res.set('Cache-Control', 'no-cache'); next(); } function max_age_cache(max_age = 60) { return (req, res, next) => { res.set('Cache-Control', 'public, max-age=' + max_age); next(); } } app.get('/pool/info', max_age_cache(60), async (req, res) => { res.json({ name: config.pool_name, description: config.pool_description, fee: config.pool_fee, logo_path: config.logo_path, protocol_version: 1, pool_target: config.pool_target, min_difficulty: config.min_difficulty, }); }); app.get('/pool/stats', max_age_cache(60), async (req, res, next) => { try { const pool = await dbs.Pool.findOne({id: "this"}); if(!pool) { throw new Error('Not initialized yet'); } res.json({ estimated_space: utils.calc_eff_space(pool.points_rate), partial_rate: pool.partial_rate, partial_errors: pool.partial_errors, farmers: pool.farmers, last_update: pool.last_update, last_payout: pool.last_payout, }); } catch(e) { next(e); } }); app.get('/account/info', max_age_cache(60), async (req, res, next) => { const id = req.query.id; try { const account = await dbs.Account.findOne({address: id}); if(!account) { throw new Error('Account not found'); } const blocks_found = await dbs.Block.countDocuments({account: id, valid: true}); res.json({ balance: account.balance, total_paid: account.total_paid, difficulty: account.difficulty, pool_share: account.pool_share, partial_rate: account.partial_rate, blocks_found: blocks_found, estimated_space: utils.calc_eff_space(account.points_rate), }); } catch(e) { next(e); } }); app.get('/difficulty', max_age_cache(30), async (req, res) => { const account = await dbs.Account.findOne({address: req.query.id}); res.json({difficulty: account ? account.difficulty : config.default_difficulty}); }); app.post('/partial', no_cache, async (req, res, next) => { try { const now = Date.now(); const partial = req.body; const out = { valid: false }; let is_valid = true; let response_time = null; if(vdf_height) { const delta = vdf_height - partial.vdf_height; response_time = delta * config.block_interval + (now - sync_time); if(delta >= 0) { is_valid = false; out.error_code = 'PARTIAL_TOO_LATE'; out.error_message = 'Partial received ' + response_time / 1e3 + ' sec too late'; } } else { is_valid = false; out.error_code = 'POOL_LOST_SYNC'; out.error_message = 'Pool lost sync with blockchain'; } out.response_time = response_time; if(partial.vdf_height < 0 || partial.vdf_height > 4294967295 || partial.lookup_time_ms < 0 || partial.lookup_time_ms > 4294967295) { out.error_code = 'INVALID_PARTIAL'; out.error_message = 'Invalid numeric value for height or lookup_time_ms'; res.json(out); return; } if(!partial.proof) { out.error_code = 'INVALID_PROOF'; out.error_message = 'Missing proof'; res.json(out); return; } const proof = partial.proof; const partial_diff = proof.difficulty; console.log('/partial', 'height', partial.vdf_height, 'diff', partial_diff, 'response', response_time / 1e3, 'time', now, 'account', partial.account); if(proof.__type == 'mmx.ProofOfSpaceNFT') { const ksize = proof.ksize; const proof_xs = proof.proof_xs; if(ksize < 0 || ksize > 255) { out.error_code = 'INVALID_PROOF'; out.error_message = 'Invalid proof ksize'; res.json(out); return; } if(!Array.isArray(proof_xs) || proof_xs.length > 1024) { out.error_code = 'INVALID_PROOF'; out.error_message = 'Invalid proof proof_xs'; res.json(out); return; } for(const x of proof_xs) { if(x < 0 || x > 4294967295) { out.error_code = 'INVALID_PROOF'; out.error_message = 'Proof value out of range'; res.json(out); return; } } } if(partial_diff < 1 || partial_diff > 4503599627370495) { out.error_code = 'INVALID_DIFFICULTY'; out.error_message = 'Invalid numeric value for difficulty'; res.json(out); return; } var msg = proof.plot_id + ':' + proof.challenge; switch(proof.__type) { case 'mmx.ProofOfSpaceNFT': msg += ':' + proof.proof_xs.join(','); break; default: out.error_code = 'INVALID_PROOF'; out.error_message = 'Invalid proof type: ' + proof.__type; res.json(out); return; } const hash = createHash('sha256').update(msg).digest('hex'); if(await dbs.Partial.exists({hash: hash})) { out.error_code = 'DUPLICATE_PARTIAL'; out.error_message = 'Duplicate partial'; res.json(out); return; } let difficulty = config.default_difficulty; const account = await dbs.Account.findOne({address: partial.account}); if(account) { difficulty = account.difficulty; } if(partial_diff < difficulty) { is_valid = false; out.error_code = 'PARTIAL_NOT_GOOD_ENOUGH'; out.error_message = 'Partial difficulty too low: ' + partial_diff + ' < ' + difficulty; } const entry = new dbs.Partial({ hash: hash, height: partial.vdf_height, account: partial.account, contract: partial.contract, harvester: partial.harvester, difficulty: partial_diff, lookup_time: partial.lookup_time_ms, response_time: response_time, time: now, }); if(is_valid) { entry.data = partial; entry.points = Math.floor(difficulty); // need to use current difficulty to avoid cheating } else { entry.valid = false; entry.pending = false; entry.points = 0; entry.error_code = out.error_code; entry.error_message = out.error_message; } await entry.save(); out.valid = is_valid; out.points = entry.points; res.json(out); } catch(e) { next(e); } }); app.use((err, req, res, next) => { console.log('URL', req.url); console.error(err); res.status(500).send(err.message); }); async function query_height() { try { const now = Date.now(); const value = await utils.get_synced_vdf_height(); if(value) { if(vdf_height == null) { console.log("Node synced at VDF height " + value); } if(vdf_height == null || value > vdf_height) { console.log("New VDF peak at", value, "time", now, "delta", now - sync_time); sync_time = now; vdf_height = value; } } else { if(vdf_height) { console.error("Node lost sync"); } vdf_height = null; } } catch(e) { if(vdf_height) { console.error("Failed to get current height:", e.message); } vdf_height = null; } } async function main() { db = await mongoose.connect(config.mongodb_uri); http.createServer(app).listen(config.server_port); setInterval(query_height, 500); console.log("Listening on port " + config.server_port); } main(); ================================================ FILE: www/pool-server/start.sh ================================================ #!/bin/bash THREADS=${1:-max} pm2 start server.js --name pool-server --namespace mmx-pool -i $THREADS pm2 start verify.js --name pool-verify --namespace mmx-pool pm2 start account.js --name pool-account --namespace mmx-pool ================================================ FILE: www/pool-server/utils.js ================================================ const axios = require("axios"); const config = require('./config.js'); async function get_synced_height() { const res = await axios.get(config.node_url + '/api/node/get_synced_height'); return res.data; } async function get_synced_vdf_height() { const res = await axios.get(config.node_url + '/api/node/get_synced_vdf_height'); return res.data; } async function get_vdf_height() { const res = await axios.get(config.node_url + '/api/node/get_vdf_height'); return res.data; } function calc_eff_space(points_rate) { // points_rate = points per block (height) return points_rate * config.space_diff_constant * 4.8 * 1e-12; // [TB] } function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } exports.get_synced_height = get_synced_height; exports.get_synced_vdf_height = get_synced_vdf_height; exports.get_vdf_height = get_vdf_height; exports.calc_eff_space = calc_eff_space; exports.sleep = sleep; ================================================ FILE: www/pool-server/verify.js ================================================ const mongoose = require('mongoose'); const axios = require("axios"); const dbs = require('./schema.js'); const utils = require('./utils.js'); const config = require('./config.js'); var db = null; var first_sync = null; async function verify(partial, vdf_height) { try { if(vdf_height > partial.height + config.partial_expiry) { if(partial.height < first_sync) { partial.error_code = 'POOL_LOST_SYNC'; partial.error_message = 'Pool server lost sync with blockchain or was offline'; } else { partial.error_code = 'SERVER_ERROR'; partial.error_message = 'Partial expired for some reason'; } partial.data = null; partial.valid = false; partial.pending = false; await partial.save(); console.log("Partial", partial.hash, "expired at height", vdf_height, 'due to', partial.error_code, '(' + partial.error_message + ')'); return; } const res = await axios.post(config.node_url + '/api/node/verify_partial', { partial: partial.data, pool_target: config.pool_target }, { headers: {'x-api-token': config.api_token} }); const [code, message] = res.data; // console.log("Partial", partial.hash, "verified with code", code, '(' + message + ')'); if(code == 'NONE') { partial.valid = true; } else { partial.valid = false; partial.error_code = code; partial.error_message = message; console.log("Partial", partial.hash, "failed verification with code", code, '(' + message + ')'); } partial.data = null; partial.pending = false; await partial.save(); } catch(e) { console.log("Failed to verify partial", partial.hash, ":", e.message, '(' + e.response.data + ')'); } try { if(partial.valid) { let account = await dbs.Account.findOne({address: partial.account}); if(!account) { account = new dbs.Account({ address: partial.account, difficulty: config.default_difficulty, }); await account.save(); console.log("Created new account for", partial.account); } } } catch(e) { console.log("Failed to create account:", e.message); } } var verify_lock = false; async function verify_all() { let vdf_height = null; try { vdf_height = await utils.get_synced_vdf_height(); if(!vdf_height) { console.log('Waiting for node sync ...'); return; } } catch(e) { console.log("Failed to query sync height:", e.message); return; } if(!first_sync) { first_sync = vdf_height; } if(verify_lock) { return; } verify_lock = true; try { const list = dbs.Partial.find({pending: true, height: {$lte: vdf_height}}); let res = []; let total = 0; for await(const partial of list) { res.push(verify(partial, vdf_height)); total++; } await Promise.all(res); if(total) { console.log("Verified", total, "partials at height", vdf_height); } } catch(e) { console.log("verify_all() failed:", e.message); } finally { verify_lock = false; } } async function main() { db = await mongoose.connect(config.mongodb_uri); setInterval(verify_all, 1000); } main(); ================================================ FILE: www/rpc-server/.gitignore ================================================ /remotes.json ================================================ FILE: www/rpc-server/README.md ================================================ ## Install ``` npm install pm2 -g ``` ### SSL certificate ``` export BUNNY_API_KEY=... curl https://get.acme.sh | sh -s email=admin@mmx.network cd ~/.acme.sh ./acme.sh --issue --dns dns_bunny -d rpc.mmx.network ``` ================================================ FILE: www/rpc-server/index.js ================================================ const max_retry = 1; const latency_gain = 0.5; const load_balance_tick = 500; // [ms] const check_interval_ms = 10 * 1000; const error_timeout_ms = 3 * check_interval_ms; const express = require('express'); const axios = require("axios"); const https = require('https'); const http = require('http'); const fs = require('fs'); const remotes = require('./remotes.json'); var targets = ['http://localhost:11380/wapi'].concat(remotes); console.log("Targets:", targets); var servers = []; for(const entry of targets) { servers.push({url: entry, count: 0, pending: 0, errors: 0, latency: 1000, timeout: 0, last_request: 0}); } servers[0].latency = 0; var http_proxy = require('http-proxy'); var proxy = http_proxy.createProxyServer({}); proxy.on('proxyRes', function(proxyRes) { proxyRes.headers['Access-Control-Allow-Origin'] = "*"; }); var app = express(); app.all('*', function(req, res) { const hop_count = req.get('x-hop-count'); const is_health_check = req.get('x-health-check'); console.log(req.method + ' ' + req.url + ' (hop ' + (hop_count ? hop_count : 0) + ')' + (is_health_check ? " (check)" : "")); if(req.url == "/server/status") { res.send(JSON.stringify(servers, null, 4) + '\n'); return; } const time_begin = Date.now(); var server = servers[0]; if(!is_health_check) { if(!hop_count || hop_count <= max_retry) { var is_fallback = server.timeout > time_begin; for(const entry of servers) { if(time_begin > entry.timeout) { if((entry.pending + 1) * entry.latency < (server.pending + 1) * server.latency || is_fallback) { is_fallback = false; server = entry; } } } } server.count++; server.pending++; server.last_request = time_begin; } res.on('finish', function() { const now = Date.now(); if(res.statusCode >= 500) { server.errors++; server.timeout = now + error_timeout_ms; } const latency = now - time_begin; console.log(req.method + ' ' + server.url + req.url + ' => status ' + res.statusCode + ', took ' + latency + ' ms'); }); proxy.web(req, res, { target: server.url, headers: {'x-hop-count': (hop_count > 0 ? hop_count + 1 : 1)} }, function(err) { try { res.status(500); res.send(err.code); } catch(e) { // ignore } console.log(err); }); }); function health_check() { for(const server of servers) { const time_begin = Date.now(); axios.get(server.url + '/node/info', {headers: {'x-health-check': true}}) .then((res) => { var info = {}; if(res.status == 200) { if(res.data) { info = res.data; } server.timeout = 0; } const latency = Date.now() - time_begin; server.latency = parseInt(server.latency * (1 - latency_gain) + latency * latency_gain); console.log('CHECK ' + server.url + ' => status ' + res.status + ', height ' + info.height + ', latency ' + latency + ' ms'); }).catch((err) => { server.timeout = Date.now() + error_timeout_ms; console.log('CHECK ' + server.url + ' failed with: ' + err.code); }); } } function reset_pending() { for(const server of servers) { server.pending = 0; } } health_check(); setInterval(health_check, check_interval_ms); setInterval(reset_pending, load_balance_tick); { http.createServer(app).listen(80); console.log("Listening on port 80 ..."); } const cert_path = '/root/.acme.sh/rpc.mmx.network_ecc/'; if(fs.existsSync(cert_path)) { var options = { key: fs.readFileSync(cert_path + 'rpc.mmx.network.key'), cert: fs.readFileSync(cert_path + 'fullchain.cer'), ca: fs.readFileSync(cert_path + 'ca.cer') }; https.createServer(options, app).listen(443); console.log("Listening on port 443 ..."); } ================================================ FILE: www/rpc-server/package.json ================================================ { "dependencies": { "axios": "^1.7.2", "express": "^4.19.2", "http-proxy": "^1.18.1" } } ================================================ FILE: www/rpc-server/start.sh ================================================ #!/bin/bash pm2 start index.js --name mmx-rpc --namespace mmx --cron-restart="0 0 * * *" ================================================ FILE: www/web-gui/public/assets/fonts/material-icons/material-icons.css ================================================ /* material-icons-regular - latin */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Material Design Icons'; font-style: normal; font-weight: 400; src: url('material-icons-v142-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } ================================================ FILE: www/web-gui/public/assets/fonts/roboto/roboto.css ================================================ /* roboto-100 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 100; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-100italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 100; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-300 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 300; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-300italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 300; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-regular - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 400; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-500 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-500italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 500; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-700 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-700italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 700; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-900 - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: normal; font-weight: 900; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } /* roboto-900italic - cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese */ @font-face { font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ font-family: 'Roboto'; font-style: italic; font-weight: 900; src: url('roboto-v30-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-900italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ } ================================================ FILE: www/web-gui/public/components/seed.js ================================================ Vue.component('seed-autocomplete', { props: { value: String, word_list: Array, index: Number, word_count: Number, disabled: Boolean }, model: { prop: 'value', event: 'input' }, data() { return { items: [], queryTerm: null, word_list: [] } }, watch: { word_list() { this.queryTerm = '' this.items = this.word_list }, }, computed: { search: { get () { return this.queryTerm }, set (searchInput) { if (this.queryTerm !== searchInput) { this.queryTerm = (searchInput || '').trim() if(this.queryTerm) { this.items = this.word_list.filter(i => i.indexOf(this.queryTerm) == 0) } else { this.items = this.word_list } if(this.items[0] == this.queryTerm) { this.value = this.items[0] this.$emit('input', this.value); } //console.log(this.value, this.queryTerm, this.items) } } }, }, methods: { customFilter (item, queryText, itemText) { const text = item.toLowerCase().trim() const searchText = queryText.toLowerCase().trim() return text.indexOf(searchText) == 0 }, onInput(event) { this.$emit('input', event); }, onPaste(event) { this.$emit('paste', event) const text = event.clipboardData.getData('text'); var wordArray = text.split(' '); if(wordArray.length == this.word_count) { event.preventDefault(); this.value = wordArray[this.index] this.queryTerm = wordArray[this.index] this.items = this.word_list.filter(i => i.indexOf(this.queryTerm) == 0) } } }, template: ` ` }); Vue.component('seed', { props: { value: String, readonly: Boolean, disabled: Boolean }, model: { prop: 'value', event: 'input' }, data() { return { words: (this.value || '').split(' '), word_count: 24, rows: 4, cols: 6, word_list: [] } }, created() { fetch('/api/wallet/get_mnemonic_wordlist') .then(response => response.json()) .then(data => { this.word_list = data; }); }, watch: { value() { this.words = (this.value || '').split(' ') }, }, methods: { onPaste(event) { const text = event.clipboardData.getData('text'); var wordArray = text.split(' '); if(wordArray.length == this.word_count) { this.words = wordArray } }, onInput() { this.$emit('input', this.words.join(' ')) } }, template: `
` }) ================================================ FILE: www/web-gui/public/explorer.js ================================================ Vue.component('explore-menu', { data() { return { input: null, error: null } }, methods: { submit() { const hex = /[0-9A-Fa-f]{8}/g; if(this.input) { this.error = null; if(this.input.startsWith("mmx1")) { this.$router.push("/explore/address/" + this.input); } else if(hex.test(this.input)) { if(this.input.length == 64) { fetch(WAPI_URL + '/header?hash=' + this.input) .then(response => { if(response.ok) { this.$router.push("/explore/block/hash/" + this.input); } else { this.$router.push("/explore/transaction/" + this.input); } }); } else if(this.input.length == 66) { this.$router.push("/explore/farmer/" + this.input); } else { this.error = true; } } else if(parseInt(this.input) != NaN) { this.$router.push("/explore/block/height/" + this.input); } else { this.error = true; } } } }, template: `
{{ $t('explore_menu.blocks') }} {{ $t('explore_menu.transactions') }} {{ $t('explore_menu.farmers') }}
` }) Vue.component('blocks-table', { props: { data: [], loaded: { type: Boolean, default: true } }, computed: { headers() { return [ { text: this.$t('explore_blocks.height'), value: 'height', width: "5%"}, { text: "VDF", value: 'vdf_count' }, { text: this.$t('explore_blocks.tx'), value: 'tx_count' }, { text: this.$t('explore_blocks.k'), value: 'ksize' }, { text: this.$t('explore_blocks.score'), value: 'score' }, { text: this.$t('explore_blocks.reward'), value: 'reward' }, { text: "TX Fees", value: 'tx_fees' }, { text: this.$t('explore_blocks.size'), value: 'static_cost_ratio' }, { text: this.$t('explore_blocks.cost'), value: 'total_cost_ratio' }, { text: this.$t('explore_blocks.hash'), value: 'hash' }, ] } }, template: ` ` }) Vue.component('explore-blocks', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, methods: { update() { fetch(WAPI_URL + '/headers?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('explore-transactions', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('explore_transactions.height'), value: 'height' }, { text: this.$t('explore_transactions.type'), value: 'type' }, { text: this.$t('explore_transactions.fee'), value: 'fee' }, { text: this.$t('explore_transactions.n_in'), value: 'inputs.length' }, { text: this.$t('explore_transactions.n_out'), value: 'outputs.length' }, { text: this.$t('explore_transactions.n_op'), value: 'operations.length' }, { text: this.$t('explore_transactions.transaction_id'), value: 'transaction_id' }, { text: this.$t('account_tx_history.time'), value: 'time' }, ] } }, methods: { update() { fetch(WAPI_URL + '/transactions?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('explore-farmers', { props: { limit: Number }, data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('explore_farmers.no_blocks'), value: 'block_count'}, { text: this.$t('explore_farmers.farmer_key'), value: 'farmer_key'}, ] } }, methods: { update() { fetch(WAPI_URL + '/farmers?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('block-view', { props: { hash: String, height: Number }, data() { return { data: null, loading: false } }, methods: { update() { let url = null; if(this.hash) { url = WAPI_URL + '/block?hash=' + this.hash; } if(this.height >= 0) { url = WAPI_URL + '/block?height=' + this.height; } if(url) { this.loading = true; fetch(url) .then(response => { if(response.ok) { response.json() .then(data => { this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } } }, watch: { hash() { this.update(); }, height() { this.update(); } }, created() { this.update(); }, template: `
{{ $t('block_view.no_such_block') }}
` }) Vue.component('transaction-view', { props: { id: String }, data() { return { data: null, timer: null, loading: false } }, methods: { update() { if(this.id) { this.loading = true; fetch(WAPI_URL + '/transaction?id=' + this.id) .then(response => { if(response.ok) { response.json() .then(data => { for(const op of data.operations) { delete op.solution; } this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } } }, watch: { id() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` {{ $t('transaction_view.transaction') }} {{ id }} {{ $t('transaction_view.no_such_transaction') }} ` }) Vue.component('farmer-view', { props: { farmer_key: String, limit: Number }, data() { return { data: null, blocks: [], timer: null, loaded: false } }, methods: { update() { fetch(WAPI_URL + '/farmer?id=' + this.farmer_key) .then(response => response.json()) .then(data => { this.data = data; }); fetch(WAPI_URL + '/farmer/blocks?id=' + this.farmer_key + '&limit=' + this.limit) .then(response => response.json()) .then(data => { this.blocks = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` Farmer {{farmer_key}} ` }) Vue.component('address-view', { props: { address: String }, data() { return { data: null } }, methods: { update() { this.loading = true; fetch(WAPI_URL + '/contract?id=' + this.address) .then(response => { if(response.ok) { response.json() .then(data => { this.loading = false; this.data = data; }); } else { this.loading = false; this.data = null; } }); } }, watch: { address() { this.update(); } }, created() { this.update(); }, template: ` {{ $t('common.address') }} {{ address }}
{{ data.__type }}
` }) Vue.component('address-history-table', { props: { address: String, limit: Number, show_empty: Boolean }, data() { return { data: [], loaded: false, timer: null } }, computed: { headers() { return [ { text: this.$t('address_history_table.height'), value: 'height'}, { text: this.$t('address_history_table.type'), value: 'type'}, { text: this.$t('address_history_table.amount'), value: 'amount'}, { text: this.$t('address_history_table.token'), value: 'token'}, { text: "Transaction ID", value: 'txid'}, { text: "Memo", value: 'memo'}, { text: this.$t('address_history_table.time'), value: 'time'}, ] } }, methods: { update() { fetch(WAPI_URL + '/address/history?limit=' + this.limit + '&id=' + this.address) .then(response => response.json()) .then(data => { this.loaded = true; this.data = data; }).catch(() => { this.loaded = true; }); } }, watch: { address() { this.update(); }, limit() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('object-table', { props: { data: Object }, data() { return { tt: [], } }, methods: { stringify(value) { return JSON.stringify(value, null, 4); } }, template: ` ` }) ================================================ FILE: www/web-gui/public/farmer.js ================================================ Vue.component('farmer-menu', { template: ` {{ $t('farmer_menu.plots') }} NFTs {{ $t('farmer_menu.blocks') }} {{ $t('farmer_menu.proofs') }} ` }) Vue.component('farmer-info', { data() { return { info: null, summary: null } }, methods: { update() { fetch('/wapi/farm/info') .then(response => response.json()) .then(data => this.info = data); fetch('/wapi/farm/blocks/summary?since=10000') .then(response => response.json()) .then(data => this.summary = data); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ (info.total_bytes / Math.pow(1000, 4)).toFixed(3) }} TB
{{ $t('farmer_info.physical_size') }}
{{ (info.total_bytes_effective / Math.pow(1000, 4)).toFixed(3) }} TBe
Effective Size
{{ summary.num_blocks }}
No. Blocks
{{ (summary.total_rewards_value).toFixed(3) }} MMX
Total Rewards
` }) Vue.component('farmer-rewards', { data() { return { data: null, netspace: null, // [GB] farm_size: null, // [GB] } }, methods: { update() { fetch('/wapi/farm/blocks/summary?since=10000') .then(response => response.json()) .then(data => this.data = data); fetch('/wapi/node/info') .then(response => response.json()) .then(data => this.netspace = data.total_space); fetch('/wapi/farm/info') .then(response => response.json()) .then(data => this.farm_size = data.total_bytes_effective / 1e9); } }, computed: { est_time_to_win() { if(this.netspace && this.farm_size) { const est_min = (this.netspace / this.farm_size) / 6; if(est_min <= 60) { return Math.floor(est_min) + " minutes"; } const est_hours = est_min / 60; if(est_hours <= 24) { return Math.floor(est_hours) + " hours and " + Math.floor(est_min % 60) + " minutes"; } const est_days = est_hours / 24; return Math.floor(est_days) + " days and " + Math.floor(est_hours % 24) + " hours"; } return "N/A"; } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('farmer-plots', { data() { return { loaded: false, plot_count: [], harvester_bytes: [] } }, computed: { headers() { return [ { text: this.$t('farmer_plots.type'), value: 'ksize', width: "20%" }, { text: this.$t('farmer_plots.count'), value: 'count' }, ] }, headers2() { return [ { text: this.$t('common.harvester'), value: 'name' }, { text: this.$t('farmer_info.physical_size'), value: 'bytes' }, { text: "Effective Size", value: 'effective' }, ] } }, methods: { update() { fetch('/wapi/farm/info') .then(response => response.json()) .then(data => { this.plot_count = []; for(const entry of data.plot_count) { this.plot_count.push({ksize: entry[0], count: entry[1]}); } this.harvester_bytes = []; for(const entry of data.harvester_bytes) { this.harvester_bytes.push({name: entry[0], bytes: entry[1][0], effective: entry[1][1]}); } this.loaded = true; }); }, reload() { fetch('/api/harvester/reload').then(this.update()); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('farmer_plots.reload_plots') }}
` }) Vue.component('farmer-plot-dirs', { data() { return { loaded: false, data: [] } }, computed: { headers() { return [ { text: this.$t('farmer_plot_dirs.path'), value: 'item' }, ] } }, methods: { update() { fetch('/wapi/farm/info') .then(response => response.json()) .then(data => { this.data = data.plot_dirs; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('farmer-blocks', { props: { limit: Number }, data() { return { loaded: false, data: [] } }, computed: { headers() { return [ { text: this.$t('farmer_blocks.height'), value: 'height' }, { text: "TX", value: 'tx_count' }, { text: "K", value: 'ksize' }, { text: this.$t('farmer_blocks.score'), value: 'score' }, { text: this.$t('farmer_blocks.reward'), value: 'reward' }, { text: this.$t('farmer_blocks.tx_fees'), value: 'tx_fees' }, { text: this.$t('farmer_blocks.time'), value: 'time' }, ] } }, methods: { update() { fetch('/wapi/farm/blocks?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('farmer-proofs', { props: { limit: Number }, data() { return { loaded: false, data: [] } }, computed: { headers() { return [ { text: "VDF height", value: 'vdf_height' }, { text: this.$t('farmer_proofs.harvester'), value: 'harvester' }, { text: this.$t('farmer_proofs.score'), value: 'proof.score' }, { text: this.$t('farmer_proofs.sdiff'), value: 'proof.difficulty' }, { text: this.$t('farmer_proofs.time'), value: 'lookup_time_ms' }, { text: this.$t('farmer_proofs.plot_id'), value: 'proof.plot_id' }, ] } }, methods: { update() { fetch('/wapi/farm/proofs?limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('farmer-plotnfts', { data() { return { list: null, timer: null, } }, methods: { update() { fetch('/wapi/farm/info') .then(response => response.json()) .then(data => this.list = data.pool_info); } }, created() { this.update(); timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('plotnft-info', { props: { address: String, data: Object, }, template: ` Address {{address}} Pool Server {{data.server_url}} N/A (solo farming) Pool Target {{data.pool_target}} Partial Difficulty {{data.partial_diff}} Plot Count {{data.plot_count}} ` }); ================================================ FILE: www/web-gui/public/i18n.utils.js ================================================ const availableLanguages = [ { code: "en", language: "English" }, { code: "id", language: "Bahasa Indonesia" }, { code: "de", language: "Deutsch" }, { code: "es", language: "Español" }, { code: "nl", language: "Nederlands" }, { code: "pt", language: "Português" }, { code: "ru", language: "Русский" }, { code: "uk", language: "Українська" }, { code: "zh", language: "简体中文" } ]; const defaultLocale = 'en'; const loadedLanguages = ['en'] const i18n = new VueI18n({ globalInjection: true, legacy: false, locale: 'en', fallbackLocale: 'en', messages: { 'en': mergeDeep({}, commonLocale, enLocale) } }) function setI18nLanguage(locale) { i18n.locale = locale /** * NOTE: * If you need to specify the language setting for headers, such as the `fetch` API, set it here. * The following is an example for axios. * * axios.defaults.headers.common['Accept-Language'] = locale */ document.querySelector('html').setAttribute('lang', locale) } function isObject(item) { return (item && typeof item === 'object' && !Array.isArray(item)); } function mergeDeep(target, ...sources) { if (!sources.length) return target; const source = sources.shift(); if (isObject(target) && isObject(source)) { for (const key in source) { if (isObject(source[key])) { if (!target[key]) Object.assign(target, { [key]: {} }); mergeDeep(target[key], source[key]); } else { Object.assign(target, { [key]: source[key] }); } } } return mergeDeep(target, ...sources); } function customFallback(msg) { let result = mergeDeep({}, commonLocale, enLocale, msg) return result; } function loadLanguageAsync(locale) { //console.log('loadLanguageAsync', locale); //if (i18n.locale === locale) { // return Promise.resolve(setI18nLanguage(locale)) //} if (loadedLanguages.includes(locale)) { return Promise.resolve(setI18nLanguage(locale)) } if (availableLanguages.filter( lang => lang.code == locale ).length > 0 ) { return fetch(`./locales/${locale}.json`).then( response => response.json() ).then( messages => { messages = customFallback(messages); i18n.setLocaleMessage(locale, messages); //console.log('setLocaleMessage', locale, messages); loadedLanguages.push(locale) return setI18nLanguage(locale) }, ) } else { return Promise.resolve(setI18nLanguage(locale)) } } ================================================ FILE: www/web-gui/public/index.html ================================================ MMX-GUI
================================================ FILE: www/web-gui/public/index.js ================================================ const WAPI_URL = "/wapi"; function validate_address(address) { return address && address.length == 62 && address.startsWith("mmx1"); } function get_short_addr(address, length) { if(!length) { length = 10; } return address.substring(0, length) + '...' + address.substring(62 - length); } function get_short_hash(hash, length) { if(!length) { length = 10; } return hash.substring(0, length) + '...' + hash.substring(64 - length); } function validate_amount(value) { if(value && value.length && value.match(/^(\d+([.,]\d*)?)$/)) { return true; } return "invalid amount"; } function to_string_hex(number) { let hex = BigInt(number).toString(16); if(hex.length % 2) { hex = '0' + hex; // Ensure even length } return '0x' + hex; } const intl_format = new Intl.NumberFormat(navigator.language, {minimumFractionDigits: 1, maximumFractionDigits: 12}); function amount_format(value) { return intl_format.format(value); } function get_tx_type_color(type, dark = false) { if(type == "REWARD") return dark ? "lime--text" : "lime--text text--darken-2"; if(type == "RECEIVE" || type == "REWARD" || type == "VDF_REWARD") return "green--text"; if(type == "SPEND") return "red--text"; if(type == "TXFEE") return "grey--text"; return ""; } function get_active_wallet() { const value = localStorage.getItem('active_wallet'); return value != null ? parseInt(value) : null; } const MMX_ADDR = "mmx1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqdgytev"; const Wallet = { template: '' } const WalletCreate = { template: '' } const Account = { props: { index: Number }, template: ` ` } const AccountHome = { props: { index: Number }, template: `
` } const AccountNFTs = { props: { index: Number }, template: ` ` } const AccountContracts = { props: { index: Number }, template: `
` } const AccountSend = { props: { index: Number }, template: ` ` } const AccountSendFrom = { props: { index: Number }, template: ` ` } const AccountSplit = { props: { index: Number }, template: ` ` } const AccountOffer = { props: { index: Number }, template: ` ` } const AccountHistory = { props: { index: Number }, template: ` ` } const AccountLog = { props: { index: Number }, template: ` ` } const AccountPlotNFTs = { props: { index: Number }, template: `
` } const AccountLiquid = { props: { index: Number }, template: ` ` } const AccountDetails = { props: { index: Number }, template: ` ` } const AccountOptions = { props: { index: Number }, template: ` ` } const AccountCreateLocked = { props: { index: Number }, template: ` ` } const Market = { props: { wallet: Number, bid: null, ask: null, }, template: `
` } const MarketOffers = { props: { wallet: Number, bid: null, ask: null, }, template: ` ` } const MarketHistory = { props: { bid: null, ask: null, }, template: ` ` } const Swap = { props: { address: null, }, data() { return { wallet: null, } }, template: `
` } const SwapMarket = { template: `
` } const SwapTrade = { props: { wallet: null, address: null }, template: ` ` } const SwapHistory = { props: { address: null }, template: ` ` } const SwapLiquid = { props: { wallet: null, address: null }, template: ` ` } const SwapPool = { props: { address: null }, template: ` ` } const Explore = { template: `
` } const ExploreBlocks = { template: ` ` } const ExploreTransactions = { template: ` ` } const ExploreFarmers = { template: ` ` } const ExploreBlock = { template: ` ` } const ExploreFarmer = { template: ` ` } const ExploreAddress = { template: ` ` } const ExploreTransaction = { template: ` ` } const NodeView = { template: `
` } const NodeBlocks = { template: ` ` } const NodeLog = { template: ` ` } const NodePeers = { template: ` ` } const NodeNetspace = { template: ` ` } const NodeVDFSpeed = { template: ` ` } const NodeBlockReward = { template: ` ` } const Farmer = { template: `
` } const FarmerBlocks = { template: ` ` } const FarmerProofs = { template: ` ` } const FarmerPlots = { template: `
` } const FarmerPlotNFTs = { template: ` ` } const Settings = { template: `
` } const Login = { data() { return { passwd: null, auto_login: false, error: null } }, methods: { submit(passwd) { this.error = null; fetch('/server/login', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({user: 'mmx-admin', passwd_plain: passwd}) }).then(response => { if(response.ok) { localStorage.setItem('login-passwd', passwd); this.$router.push("/"); location.reload(); } else { this.error = "Login failed!"; } }); } }, created() { const passwd = localStorage.getItem('login-passwd'); if(passwd) { this.submit(passwd); } }, template: `
{{ $t('login.login') }} {{ error }}
` } Vue.component('tx-fee-select', { emits: [ "update-value" ], data() { return { value: null, items: [ {text: "1x (min fee)", value: 1024}, {text: "2x", value: 2048}, {text: "3x", value: 3072}, {text: "5x", value: 5120}, {text: "10x", value: 10240}, {text: "20x", value: 20480}, ] } }, watch: { value() { this.$emit('update-value', this.value); } }, created() { this.value = 1024; }, template: ` ` }) Vue.component('tx-type-link', { props: { id: String, type: String, }, computed: { link() { switch(this.type) { case 'REWARD': case 'VDF_REWARD': case 'PROJECT_REWARD': return '/explore/block/hash/' + this.id; default: return '/explore/transaction/' + this.id; } } }, template: ` TX ` }) Vue.component('main-menu', { data() { return { timer: null } }, methods: { update() { fetch('/server/session') .then(response => response.json()) .then(data => { if(!data.user) { if(this.$router.currentRoute.path != "/login") { this.$router.push("/login"); } } }); }, logout() { fetch('/server/logout') .then(response => { if(response.ok) { localStorage.removeItem('login-passwd'); this.$router.push("/login"); } }); } }, created() { if(!this.$isWinGUI && !this.$isQtGUI) { this.update(); this.timer = setInterval(() => { this.update(); }, 5000); } }, beforeDestroy() { clearInterval(this.timer); }, template: ` {{ $t('main_menu.node') }} {{ $t('main_menu.wallet') }} {{ $t('main_menu.farmer') }} {{ $t('main_menu.explore') }} {{ $t('main_menu.market') }} {{ $t('main_menu.swap') }} {{ $t('main_menu.settings') }} ` }) Vue.component('node-status', { data() { return { node_status: { DisconnectedFromNode: this.$t('node_status.disconnected'), LoggedOff: this.$t('node_status.logged_off'), Connecting: this.$t('node_status.connecting'), Syncing: this.$t('node_status.syncing'), Synced: this.$t('node_status.synced') }, timer: null, session_fails: 99, peer_fails: 99, synced_fails: 99, } }, methods: { async update() { if(this.status = this.node_status.LoggedOff || this.status == this.node_status.DisconnectedFromNode || this.status == node_status.Connecting) { await fetch('/server/session') .then( () => this.session_fails = 0 ) .catch( () => this.session_fails++ ); } if(this.status == this.node_status.Connecting || this.status == this.node_status.Syncing) { if(this.$root.local_node) { await fetch('/api/router/get_peer_info') .then( response => response.json() ) .then( data => { if(data.peers && data.peers.length > 0) { this.peer_fails = 0 } else { this.peer_fails++ } }) .catch( () => this.peer_fails++ ); } } if(this.status == this.node_status.Connecting || this.status == this.node_status.Syncing || this.status == this.node_status.Synced) { await fetch('/wapi/node/info') .then( response => response.json() ) .then( data => { this.$root.nodeInfo = data if(data.is_synced) { this.synced_fails = 0 } else { this.synced_fails++ } }) .catch( () => { this.synced_fails++; this.$root.nodeInfo = null; } ); } // console.log('--------------------------------'); // console.log('session_fails', this.session_fails); // console.log('connectedToNode', this.connectedToNode); // console.log('peer_fails', this.peer_fails); // console.log('connectedToNetwork', this.connectedToNetwork); // console.log('synced_fails', this.synced_fails); // console.log('synced', this.synced); }, }, computed: { connectedToNode() { return this.session_fails < 1; }, loggedIn() { return !this.$route.meta.is_login || this.$isWinGUI; }, connectedToNetwork() { return this.peer_fails < 1 || !this.$root.local_node; }, synced() { return this.synced_fails == 0; }, status() { let result = this.node_status.DisconnectedFromNode if(this.connectedToNode) { if(this.loggedIn) { result = this.node_status.Connecting; if(this.connectedToNetwork) { result = this.node_status.Syncing; } if(this.synced) { result = this.node_status.Synced; } } else { result = this.node_status.LoggedOff; } } //console.log(result) return result; } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 5000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
mdi-connection mdi-sync mdi-cloud-check mdi-shield-key mdi-emoticon-dead
` }) Vue.component('t-icon', { props: { color: String, tooltip: String }, template: ` {{tooltip}} ` }) Vue.component('git-update-checker', { data() { return { timer: null, show: false, commit_status_message: '' } }, methods: { async update() { this.commit_status_message = ''; this.show = false; fetch('/wapi/config/get?key=build') .then( response => { if (!response.ok) { throw Error(response.statusText); } return response.json(); }) .then( data => { if(data && data.version) { var version = data.version; fetch(`https://api.github.com/repos/madMAx43v3r/mmx-node/tags`) .then( response => response.json() ) .then( data => { if(data) { var latest = ''; for(let item of data) { if(item && item.name.length && item.name[0] === "v"){ latest = item.name; break; } } version = version.split("-", 1)[0]; if(version !== latest) { this.show = true; this.commit_status_message += `${version}, compared to ${latest} at`; } } }) } }) .catch((err) => { console.log(`git-update-checker: ${err}`); }); } }, created() { if(!this.$isWinGUI) { this.update(); this.timer = setInterval(() => { this.update(); }, 60*60*1000); } }, beforeDestroy() { clearInterval(this.timer); }, computed: { tooltip() { return `This build is ${this.commit_status_message} madMAx43v3r:master`; } }, template: `
mdi-alert-decagram-outline
` }), Vue.component('app', { computed: { colClass(){ var result = ''; if(!this.$isWinGUI) { result = 'cols-12 col-xl-8 offset-xl-2'; } return result; }, fluid() { return this.$isWinGUI || !(this.$vuetify.breakpoint.xl || this.$vuetify.breakpoint.lg); } }, template: ` ` }) ================================================ FILE: www/web-gui/public/locales/common.js ================================================ const commonLocale = { "common": { "reward_address_placeholder": "<@.lower:common.default>" }, "main_menu": { "node": "@:common.node", "wallet": "@:common.wallet" }, "node_menu": { "netspace": "@:node_common.netspace", "blocks": "@:common.blocks", "vdf_speed": "@:node_common.vdf_speed", "block_reward": "@:node_common.block_reward" }, "node_info": { "height": "@:common.height", "netspace": "@:node_common.netspace", "vdf_speed": "@:node_common.vdf_speed", "block_reward": "@:node_common.block_reward", "block_size": "@:node_common.block_size" }, "node_log": { "wallet": "@:common.wallet", "node": "@:common.node", "harvester": "@:common.harvester", }, "harvester_settings": { "harvester": "@:common.harvester" }, "node_log_table": { "time": "@:common.time", }, "node_peers": { "ip": "IP", "height": "@:common.height", "type": "@:common.type" }, "netspace_graph": { "title": "@:node_common.netspace ({0})" }, "vdf_speed_graph": { "title": "@:node_common.vdf_speed ({0})" }, "block_reward_graph": { "title": "@:node_common.block_reward ({0})" }, "tx_fees_graph": { "title": "@:node_common.tx_fees ({0})" }, "wallet_summary": { "new_wallet": "@:wallet_summary.new @:common.wallet" }, "account_menu": { "balance": "@:common.balance", "log": "@:node_menu.log" }, "account_header": { "wallet": "@:common.wallet" }, "account_addresses": { "address": "@:common.address", }, "account_send_form": { "amount": "@:common.amount", "wallet": "@:common.wallet", "confirm": "@:common.confirm", "currency": "@:common.currency" }, "wallet_settings": { "name": "@:common.name", "symbol": "@:common.symbol", "contract": "@:common.contract" }, "balance_table": { "token": "@:common.token", "balance": "@:common.balance", "contract": "@:common.contract" }, "account_balance": { "balance": "@:common.balance", "spendable": "@:balance_table.spendable", "token": "@:common.token", "contract": "@:balance_table.contract" }, "account_plots": { "balance": "@:common.balance", "address": "@:common.address" }, "account_history": { "height": "@:common.height", "type": "@:common.type", "amount": "@:common.amount", "token": "@:common.token", "address": "@:common.address", "time": "@:common.time", "link": "@:common.link" }, "account_tx_history": { "height": "@:common.height", "confirmed": "@:transaction_view.confirmed", "transaction_id": "@:explore_transactions.transaction_id", "time": "@:common.time", "status": "@:common.status", "pending": "@:common.pending", "expired": "@:common.expired", "failed": "@:common.failed" }, "account_offers": { "any": "@:common.any", "height": "@:common.height", "address": "@:common.address", "time": "@:common.time", "deposit": "@:common.deposit", "price": "@:common.price" }, "account_offer_form": { "confirm": "@:common.confirm", }, "explore_menu": { "blocks": "@:common.blocks", "transaction_id": "@:explore_transactions.transaction_id", "address": "@.lower:common.address", "placeholder": "@.lower:explore_menu.address | @.lower:explore_menu.transaction_id | @.lower:explore_menu.block_height" }, "explore_blocks": { "height": "@:common.height", "reward": "@:common.reward", "hash": "@:common.hash" }, "explore_transactions": { "height": "@:common.height", "type": "@:common.type", "fee": "@:common.fee" }, "block_view": { "height": "@:common.height", "hash": "@:common.hash", "amount": "@:common.amount", "address": "@:common.address", "reward": "@:common.reward", "time": "@:common.time", "transaction_id": "@:explore_transactions.transaction_id" }, "address_history_table": { "height": "@:common.height", "type": "@:common.type", "amount": "@:common.amount", "token": "@:common.token", "address": "@:common.address", "time": "@:common.time", "link": "@:common.link" }, "transaction_view": { "height": "@:common.height", "time": "@:common.time", "address": "@:common.address", "fee": "@:common.fee", "amount": "@:common.amount", "token": "@:common.token" }, "market_menu": { "wallet": "@:common.wallet" }, "market_offers": { "price": "@:common.price", "they_offer": "@:market_menu.they_offer", "they_ask": "@:market_menu.they_ask", "time": "@:common.time", "link": "@:common.link", "address": "@:common.address", "accept": "@:common.accept", "cancel": "@:common.cancel" }, "account_history_form": { "any": "@:common.any" }, "farmer_blocks": { "height": "@:common.height", "reward": "@:common.reward", "score": "@:explore_blocks.score", "tx_fees": "@:node_common.tx_fees", "time": "@:common.time" }, "farmer_proofs": { "height": "@:common.height", "score": "@:explore_blocks.score", "sdiff": "@:explore_blocks.sdiff", "time": "@:common.time", "plot_id": "@:block_view.plot_id", "harvester": "@:common.harvester" }, "swap": { "volume_24h": "@:swap.volume (@:swap.24h)", "volume_7d": "@:swap.volume (@:swap.7d)" } } ================================================ FILE: www/web-gui/public/locales/de.json ================================================ { "common": { "yes": "Ja", "no": "Nein", "default": "default", "node": "Knoten", "wallet": "Börse", "height": "Höhe", "blocks": "Blöcke", "balance": "Stand", "token": "Token", "hash": "Hash", "reward": "Belohnung", "amount": "Betrag", "address": "Adresse", "type": "Typ", "time": "Zeit", "fee": "Gebühr", "pending": "ausstehend", "confirm": "Bestätigen", "deploy": "Einsetzen", "create": "Erstellen", "transaction_has_been_sent": "Die Transaktion wurde gesendet", "failed_with": "Fehlgeschlagen mit", "deployed_as": "Eingesetzt als", "link": "Link" }, "main_menu": { "explore": "Erkunden", "market": "Marktplatz", "exchange": "Austausch", "settings": "Einstellungen", "logout": "Ausloggen" }, "node_common": { "vdf_speed": "VDF Geschwindigkeit", "block_reward": "Block Belohnung", "netspace": "Netzgröße" }, "node_menu": { "log": "Log", "peers": "Verbindungen" }, "node_info": { "synced": "Synchronisiert", "supply": "Ausgeliefert", "no_addresses": "Anzahl Adressen" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "harvester": "Harvester", "timelord": "TimeLord" }, "node_peers": { "version": "Version", "received": "Empfangen", "send": "Gesendet", "ping": "Ping", "duration": "Dauer", "credits": "Bewertung", "tx_gas": "Transaktionsgebühr", "connection": "Verbindung", "outbound": "ausgehend", "inbound": "eingehend" }, "wallet_summary": { "new": "Neu" }, "account_menu": { "nfts": "NFTs", "contracts": "Verträge", "addresses": "Adressen", "send": "Senden", "offer": "Anbieten", "history": "bisherige Transaktionen", "details": "Details" }, "account_send_form": { "source_address": "Quell-Adresse", "destination": "Ziel", "destination_address": "Ziel-Adresse", "address_input": "Adress-Eingabe", "currency": "Währung", "send": "Sende" }, "balance_table": { "locked": "Gesperrt", "spendable": "Ausgabefähig", "contract": "Vertrag" }, "account_balance": { "reserved": "Reserviert" }, "account_history": { "link": "@:common.link" }, "account_offers": { "offer": "Angebot", "receive": "Empfangen", "status": "Status", "actions": "Aktionen", "revoke": "Zurückziehen", "accepted": "Akzeptiert", "revoked": "Zurückgezogen", "open": "Offen" }, "account_offer_form": { "offer_amount": "Betrag anbieten", "offer_currency": "Währung anbieten", "receive_amount": "Betrag empfangen", "receive_currency_contract": "Währungs-Vertrag empfangen", "symbol": "Symbol", "offer": "Jetzt anbieten" }, "explore_menu": { "transactions": "Transaktionen", "address": "@.lower:common.address", "block_height": "Blockhöhe" }, "explore_blocks": { "score": "Bewertung" }, "explore_transactions": { "transaction_id": "Transaktions-ID" }, "block_view": { "previous": "Vorhergende", "next": "Nächste", "block": "Block", "no_such_block": "Kein solcher Block!", "time_diff": "Zeitunterschied", "space_diff": "Platzunterschied", "vdf_iterations": "VDF Iterationen", "tx_base": "TX Basis", "tx_count": "TX Anzahl", "k_size": "K Größe", "proof_score": "Nachweisbewertung", "plot_id": "Plot Kennung", "farmer_key": "Farmer Schlüssel", "inputs": "Eingaben", "outputs": "Ausgaben", "operations": "Operationen" }, "transaction_view": { "transaction": "Transaktion", "confirmed": "Bestätigt", "expires": "Läuft ab", "note": "Bemerkung", "sender": "Sender", "cost": "Kosten", "input": "Eingabe", "output": "Ausgabe" }, "create_contract_menu": { "contract_type": "Vertrags-Typ" }, "account_contract_summary": { "deposit": "Hinterlegen", "withdraw": "Abheben" }, "node_settings": { "language": "Sprache", "enable_timelord": "TimeLord aktivieren", "farmer_reward_address": "Adresse für die Farmer-Belohnung", "timeLord_reward_address": "Adresse für die TimeLord-Belohnung", "reward_address_placeholder": "", "restart_needed": "(zur Aktivierung neu starten)" }, "create_locked_contract": { "owner_address": "Besitzer Adresse", "unlock_height": "Freischalten bei Höhe der Blockchain" }, "create_virtual_plot_contract": { "farmer_public_key": "Öffentlicher Schlüssel des Farmers", "reward_address": "Belohnungs-Adresse (optional, bei pooling)" }, "account_details": { "copy_keys_to_plotter": "Kopiere die Schlüssel zum Plotter" }, "account_actions": { "reset_cache": "Zwichenspeicher zurücksetzen", "show_seed": "Zeige den Samen" }, "create_account": { "account_index": "Konto Index", "account_name": "Konto Name", "number_of_addresses": "Anzahl der Adessen", "create_account": "Konto erstellen" }, "create_wallet": { "use_custom_seed": "Nutze individuellen Samen", "seed_hash": "Samen Hash (optional, hex Zeichenkette, 64 Buchstaben)", "placeholder": "", "create_wallet": "Erstelle Börse" }, "market_menu": { "they_offer": "Angeboten", "they_ask": "Nachgefragt", "anything": "Alles", "offers": "Angebote" }, "market_offers": { "price": "Preis", "accept": "Akzeptieren", "cancel": "Abbrechen", "accept_offer": "Angebot akzeptieren", "you_receive": "Erhalten", "you_pay": "Bezahlen" }, "login": { "password_label": "Passwort (Schaue in die PASSWD Datei)", "login": "Einloggen" } } ================================================ FILE: www/web-gui/public/locales/en.js ================================================ const enLocale = { "common": { "yes": "Yes", "no": "No", "default": "default", "node": "Node", "wallet": "Wallet", "height": "Height", "blocks": "Blocks", "balance": "Balance", "name": "Name", "token": "Token", "currency": "Currency", "symbol": "Symbol", "price": "Price", "hash": "Hash", "reward": "Reward", "amount": "Amount", "address": "Address", "contract": "Contract", "type": "Type", "time": "Time", "fee": "Fee", "status": "Status", "pending": "pending", "expired": "expired", "failed": "failed", "confirm": "Confirm", "deploy": "Deploy", "create": "Create", "remove": "Remove", "accept": "Accept", "cancel": "Cancel", "transaction_has_been_sent": "Transaction has been sent", "failed_with": "Failed with", "deployed_as": "Deployed as", "any": "Any", "link": "Link", "owner": "Owner", "manage": "Manage", "harvester": "Harvester", "deposit": "Deposit", "user": "User" }, "main_menu": { "explore": "Explore", "market": "Market", "farmer": "Farmer", "exchange": "Exchange", "swap": "Swap", "settings": "Settings", "logout": "Logout" }, "node_status": { "disconnected": "Disconnected from node", "logged_off": "Logged off", "connecting": "Connecting...", "syncing": "Syncing", "synced": "Synced" }, "node_common": { "vdf_speed": "VDF Speed", "block_reward": "Block Reward", "block_size": "Block Size", "tx_fees": "Transaction Fees", "netspace": "Netspace" }, "node_menu": { "log": "Log", "peers": "Peers" }, "node_info": { "synced": "Synced", "supply": "Supply", "no_addresses": "No. Addresses" }, "farmer_info": { "virtual_balance": "Virtual Balance", "virtual_size": "Virtual Size", "physical_size": "Physical Size", "total_farm_size": "Total Farm Size" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "timelord": "TimeLord" }, "node_log_table": { "module": "Module", "message": "Message" }, "node_peers": { "version": "Version", "received": "Received", "send": "Sent", "ping": "Ping", "duration": "Duration", "credits": "Credits", "tx_gas": "TX Gas", "connection": "Connection", "outbound": "outbound", "inbound": "inbound" }, "wallet_summary": { "new": "New" }, "account_menu": { "nfts": "NFTs", "contracts": "Contracts", "addresses": "Addresses", "send": "Send", "plots": "Plots", "offer": "Offer", "history": "History", "liquidity": "Liquidity", "info": "Info", "details": "Details" }, "account_addresses": { "index": "#", "n_recv": "N(Recv)", "n_spend": "N(Spend)", "last_recv": "Last Recv", "last_spend": "Last Spend" }, "wallet_common": { "enter_passphrase": "Passphrase required" }, "account_send_form": { "source_address": "Source Address", "destination": "Destination", "destination_address": "Destination Address", "address_input": "Address Input", "send": "Send" }, "balance_table": { "locked": "Locked", "spendable": "Spendable" }, "account_balance": { "reserved": "Reserved", "show_unknown": "Show unknown" }, "account_plots": { "size": "Size", "new_plot": "New Plot", "from": "from", "to": "to", "deposit_warning": "Only 90% of the amount deposited will be returned on withdrawal, the remaining 10% is burned as fee.", "withdraw_warning": "Only 90% of the amount will be returned, the remaining 10% is burned as fee." }, "account_offers": { "offering": "Offering", "received": "Received", "status": "Status", "actions": "Actions", "revoke": "Revoke", "accepted": "Accepted", "revoked": "Revoked", "open": "Open", "deposit_to": "Deposit to" }, "account_offer_form": { "offer_amount": "Offer Amount", "offer_currency": "Offer Currency", "receive_amount": "Receive Amount", "receive_currency_contract": "Receive Currency Contract", "symbol": "Symbol", "offer": "Offer" }, "explore_menu": { "transactions": "Transactions", "farmers": "Farmers", "block_height": "block height", }, "explore_blocks": { "k": "K", "tx": "TX", "score": "Score", "tdiff": "T-Diff", "sdiff": "S-Diff", "size": "Size", "cost": "Cost" }, "explore_transactions": { "n_in": "N(in)", "n_out": "N(out)", "n_op": "N(op)", "transaction_id": "Transaction ID" }, "explore_farmers": { "no_blocks": "No. Blocks", "farmer_key": "Farmer Key" }, "block_view": { "previous": "Previous", "next": "Next", "block": "Block", "no_such_block": "No such block!", "time_diff": "Time Diff", "space_diff": "Space Diff", "vdf_iterations": "VDF Iterations", "tx_base": "TX Base", "tx_count": "TX Count", "k_size": "K Size", "proof_score": "Proof Score", "plot_id": "Plot ID", "farmer_key": "Farmer Key", "inputs": "Inputs", "outputs": "Outputs", "operations": "Operations" }, "transaction_view": { "transaction": "Transaction", "message": "Message", "confirmed": "Confirmed", "expires": "Expires", "note": "Note", "sender": "Sender", "cost": "Cost", "input": "Input", "output": "Output", "no_such_transaction": "No such transaction!" }, "create_contract_menu": { "contract_type": "Contract Type" }, "account_contract_summary": { "deposit": "Deposit", "withdraw": "Withdraw" }, "node_settings": { "gui": "GUI", "language": "Language", "theme": "Theme", "light": "Light", "dark": "Dark", "general": "General", "enable_timelord": "Enable TimeLord", "enable_timelord_reward": "Enable TimeLord Rewards (requires one more CPU core)", "verify_timelord_reward": "Verify TimeLord Rewards (disable to speed up VDF verify)", "open_port": "Open network port to allow incoming connections (UPnP)", "reward": "Reward", "farmer_reward_address": "Farmer Reward Address", "timeLord_reward_address": "TimeLord Reward Address", "restart_needed": "(restart needed to apply)", "opencl_device": "OpenCL Device", "blockchain": "Blockchain", "revert_db_to_height": "Revert DB to height", "revert": "Revert" }, "harvester_settings": { "harvester_reload_interval": "Harvester Reload Interval (sec)", "plot_directory": "Plot Directory", "add_directory": "Add Directory" }, "wallet_settings": { "token_whitelist": "Token Whitelist", "token_address": "Token Address", "add_token": "Add Token" }, "build_version": { "build": "Build", "version": "Version", "commit": "Commit" }, "create_locked_contract": { "owner_address": "Owner Address", "unlock_height": "Unlock at Chain Height" }, "create_virtual_plot_contract": { "farmer_public_key": "Farmer Public Key", "reward_address": "Reward Address (optional, for pooling)" }, "account_details": { "copy_keys_to_plotter": "Copy keys to plotter" }, "account_actions": { "reset_cache": "Reset Cache", "show_seed": "Show Seed" }, "create_account": { "account_index": "Account Index", "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "create_account": "Create Account" }, "create_wallet": { "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "use_custom_seed": "Use Custom Seed", "use_passphrase": "With Passphrase", "seed_words": "Mnemonic Seed Words (optional, 24 words)", "passphrase": "Passphrase (secure password, 10+ characters)", "placeholder": "", "create_wallet": "Create Wallet" }, "market_menu": { "they_offer": "They Offer", "they_ask": "They Ask", "anything": "Anything", "offers": "Offers", "history": "History" }, "market_offers": { "accept_offer": "Accept Offer", "wallet_ballance": "Wallet Balance", "you_send": "You send", "you_receive": "You Receive", "you_pay": "You Pay", "increase": "Increase", "trade": "Trade" }, "login": { "password_label": "Password (see PASSWD file)", "login": "Login" }, "account_history_form": { "spend": "Spend", "receive": "Receive", "reward": "Reward", "tx_fee": "TX Fee" }, "farmer_menu": { "plots": "Plots", "blocks": "Blocks", "proofs": "Proofs" }, "farmer_plots": { "type": "Type", "count": "Count", "reload_plots": "Reload Plots" }, "farmer_plot_dirs": { "path": "Path" }, "swap": { "swap": "Swap", "pool_balance": "Pool Balance", "volume": "Volume", "24h": "24h", "7d": "7 days", "apy": "APY", "trade": "Trade", "history": "History", "my_liquidity": "My Liquidity", "pool_state": "Pool State", "my_balance": "My Balance", "fees_earned": "Fees Earned", "fee_level": "Fee Level", "unlock_height": "Unlock Height", "user_total": "User Total", "token_amount": "Token Amount", "currency_amount": "Currency Amount", "price_match": "Price Match", "payout": "Payout", "switch_fee": "Switch Fee", "add_liquidity": "Add Liquidity", "remove_iquidity": "Remove Liquidity", "remove_all": "Remove All", "wallet_ballance": "Wallet Balance", "buy_amount": "Buy Amount", "sell_amount": "Sell Amount", "trade_fee_estimated": "Trade Fee (estimated)", "you_receive_estimated": "You receive (estimated)", "sell": "Sell", "buy": "Buy" }, "$vuetify": { close: 'Close', dataIterator: { pageText: '{0}-{1} of {2}', noResultsText: 'No matching records found', loadingText: 'Loading items...', }, dataTable: { itemsPerPageText: 'Rows per page:', ariaLabel: { sortDescending: ': Sorted descending. Activate to remove sorting.', sortAscending: ': Sorted ascending. Activate to sort descending.', sortNone: ': Not sorted. Activate to sort ascending.', }, sortBy: 'Sort by', }, dataFooter: { itemsPerPageText: 'Items per page:', itemsPerPageAll: 'All', nextPage: 'Next page', prevPage: 'Previous page', firstPage: 'First page', lastPage: 'Last page', }, datePicker: { itemsSelected: '{0} selected', }, noDataText: 'No data available', carousel: { prev: 'Previous visual', next: 'Next visual', }, calendar: { moreEvents: '{0} more', }, fileInput: { counter: '{0} files', counterSize: '{0} files ({1} in total)', }, } } ================================================ FILE: www/web-gui/public/locales/es.json ================================================ { "common": { "yes": "Si", "no": "No", "default": "por defecto", "node": "Nodo", "wallet": "Billetera", "height": "Altura", "blocks": "Bloques", "balance": "Saldo", "token": "Token", "hash": "Hash", "reward": "Recompensa", "amount": "Cantidad", "address": "Dirección", "type": "Tipo", "time": "hora", "fee": "Comisión", "pending": "pendiente", "confirm": "Confirmar", "deploy": "Desplegar", "create": "Crear", "transaction_has_been_sent": "La transacción ha sido enviada", "failed_with": "Fallado con", "deployed_as": "Desplegado como", "link": "Enlace" }, "main_menu": { "explore": "Explorar", "market": "Mercado", "exchange": "Exchange", "settings": "Ajustes", "logout": "Cerrar sesión" }, "node_common": { "vdf_speed": "Velocidad VDF", "block_reward": "Recompensa de bloque", "tx_fees": "Comisión de transacción", "netspace": "Espacio de la red" }, "node_menu": { "log": "Log", "peers": "Pares" }, "node_info": { "synced": "Sincronizado", "supply": "Suministro", "no_addresses": "Numero de dirección" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Granjero", "harvester": "Harvester", "timelord": "Servidor de hora" }, "node_peers": { "version": "Versión", "received": "Recibido", "send": "Enviar", "ping": "Ping", "duration": "Duración", "credits": "Creditos", "tx_gas": "TX Gas", "connection": "Conexión", "outbound": "saliente", "inbound": "entrante" }, "wallet_summary": { "new": "Nuevo" }, "account_menu": { "nfts": "NFTs", "contracts": "Contratos", "addresses": "Direcciones", "send": "Enviar", "offer": "Ofrecer", "history": "Historial", "details": "Detalles" }, "account_send_form": { "source_address": "Direccion Origen", "destination": "destino", "destination_address": "Dirección Destino", "address_input": "Direccion de entrada", "currency": "Divisa", "send": "Enviar" }, "balance_table": { "locked": "Bloqueado", "spendable": "Gastable", "contract": "Contrato" }, "account_balance": { "reserved": "Reservado" }, "account_offers": { "offer": "Oferta", "receive": "Recibir", "status": "Estado", "actions": "Acciones", "revoke": "Revocar", "accepted": "Aceptado", "revoked": "Revocado", "open": "Abierto" }, "account_offer_form": { "offer_amount": "Cantidad ofrecida", "offer_currency": "Divisa de la oferta", "receive_amount": "Cantidad a recibir", "receive_currency_contract": "Recibir divisa contrato", "symbol": "símbolo", "offer": "Oferta" }, "explore_menu": { "transactions": "Transacciones", "block_height": "Altura de bloque" }, "explore_blocks": { "score": "Puntucación" }, "explore_transactions": { "transaction_id": "ID de Transacción" }, "block_view": { "previous": "Anterior", "next": "Siguiente", "block": "Bloque", "no_such_block": "No existe bloque!", "time_diff": "Diferencia de tiempo", "space_diff": "Diferencia de tamaño", "vdf_iterations": "Iteraciones VDF", "tx_base": "Base de TX", "tx_count": "conteo de TX", "k_size": "Tamaño de K", "proof_score": "Puntucuación de prueba", "plot_id": "ID de Plot", "farmer_key": "Llave de Farmer", "inputs": "Entradas", "outputs": "Salidas", "operations": "Operaciones" }, "transaction_view": { "transaction": "Transacción", "confirmed": "Confirmado", "expires": "Caduca", "note": "Nota", "sender": "Enviador", "cost": "Coste", "input": "Entrada", "output": "Salida" }, "create_contract_menu": { "contract_type": "Tipo de Contrato" }, "account_contract_summary": { "deposit": "Depositar", "withdraw": "Retirar" }, "node_settings": { "language": "Idioma", "enable_timelord": "Habilitar servidor de tiempo", "farmer_reward_address": "Direccion de granjero para recompensas", "timeLord_reward_address": "Direccion de servidor de tiempo para recompensas", "reward_address_placeholder": "<по умолчанию>", "restart_needed": "(Se requiere reinicio para aplicar)" }, "create_locked_contract": { "owner_address": "Direccion de dueño", "unlock_height": "Desbloquear en altura de cadena" }, "create_virtual_plot_contract": { "farmer_public_key": "Llave pública granjero", "reward_address": "Direccion de recompensa (opcional, para pooling)" }, "account_details": { "copy_keys_to_plotter": "Copiar claves al plotter" }, "account_actions": { "reset_cache": "Reiniciar Cache", "show_seed": "Mostrar semilla" }, "create_account": { "account_index": "Numero de la cuenta", "account_name": "Nombre de la cuenta", "number_of_addresses": "Numero de direcciones", "create_account": "Crear cuenta" }, "create_wallet": { "use_custom_seed": "Usar semilla personalizada", "seed_hash": "Hash de la semilla (opcional, cadena hex de 64 caracteres)", "placeholder": "", "create_wallet": "Crear billetera" }, "market_menu": { "they_offer": "Ellos ofrecen", "they_ask": "Ellos preguntan", "anything": "Cualquiera", "offers": "Ofertas" }, "market_offers": { "price": "Precio", "accept": "Aceptar", "cancel": "Cancelar", "accept_offer": "Aceptar Oferta", "you_receive": "Tu recibes", "you_pay": "Tu pagas" }, "login": { "password_label": "Contraseña (mirar fichero PASSWD)", "login": "Login" } } ================================================ FILE: www/web-gui/public/locales/id.json ================================================ { "common": { "Indonesian_Translation_Version": "v0.1 by limsandy", "yes": "Ya", "no": "Tidak", "default": "Setelan Awal", "node": "Node", "wallet": "Dompet", "height": "Ketinggian", "blocks": "Blok", "balance": "Saldo", "token": "Token", "hash": "Hash", "reward": "Imbalan", "amount": "Jumlah", "address": "Alamat", "type": "Tipe", "time": "Waktu", "fee": "Biaya", "pending": "Menunggu", "confirm": "Memastikan", "deploy": "Terapkan", "create": "Buat", "transaction_has_been_sent": "Transaksi telah dikirim", "failed_with": "Gagal karena", "deployed_as": "Diterapkan sebagai", "link": "Tautan" }, "main_menu": { "explore": "Jelajah", "market": "Bursa", "exchange": "Exchange", "settings": "Pengaturan", "logout": "Keluar" }, "node_common": { "vdf_speed": "Kecepatan VDF", "block_reward": "Imbalan Blok", "netspace": "Ruang di Jaringan" }, "node_menu": { "log": "Berkas", "peers": "Rekan" }, "node_info": { "synced": "Sinkronisasi", "supply": "Pasokan", "no_addresses": "Jumlah Alamat" }, "node_log": { "terminal": "Terminal", "router": "Ruter", "farmer": "Farmer", "harvester": "Harvester", "timelord": "TimeLord" }, "node_peers": { "version": "Versi", "received": "Diterima", "send": "Kirim", "ping": "Ping", "duration": "Durasi", "credits": "Kredit", "tx_gas": "Biaya TX", "connection": "Koneksi", "outbound": "Keluar", "inbound": "Masuk" }, "wallet_summary": { "new": "Baru" }, "account_menu": { "nfts": "NFTs", "contracts": "Kontrak", "addresses": "Alamat", "send": "Kirim", "offer": "Tawarkan", "history": "Sejarah", "details": "Rincian" }, "account_send_form": { "source_address": "Alamat Sumber", "destination": "Tujuan", "destination_address": "Alamat Tujuan", "address_input": "Alamat Masukan", "currency": "Mata Uang", "send": "Kirim" }, "balance_table": { "locked": "Dikunci", "spendable": "Bisa Dibelanjakan", "contract": "Kontrak" }, "account_balance": { "reserved": "Cadangan" }, "account_offers": { "offer": "Tawaran", "receive": "Terima", "status": "Status", "actions": "Tindakan", "revoke": "Batalkan", "accepted": "Diterima", "revoked": "Dibatalkan", "open": "Buka" }, "account_offer_form": { "offer_amount": "Jumlah Tawaran", "offer_currency": "Mata Uang Tawaran", "receive_amount": "Jumlah Diterima", "receive_currency_contract": "Terima Mata Uang Kontrak", "symbol": "Simbol", "offer": "Tawaran" }, "explore_menu": { "transactions": "Transaksi", "block_height": "Ketinggian blok" }, "explore_blocks": { "score": "Skor" }, "explore_transactions": { "transaction_id": "ID Transaksi" }, "block_view": { "previous": "Sebelumnya", "next": "Berikutnya", "block": "Blok", "no_such_block": "Tidak ada blok demikian!", "time_diff": "Perbedaan Waktu", "space_diff": "Perbedaan Ruang", "vdf_iterations": "VDF Iterasi", "tx_base": "TX Dasar", "tx_count": "TX Jumlah", "k_size": "Ukuran k", "proof_score": "Skor Bukti", "plot_id": "ID Plot", "farmer_key": "Kunci Farmer", "inputs": "Masukan", "outputs": "Keluaran", "operations": "Operasi" }, "transaction_view": { "transaction": "Transaksi", "confirmed": "Dipastikan", "expires": "Lewat Kadaluarsa", "note": "Catatan", "sender": "Pengirim", "cost": "Biaya", "input": "Masukan", "output": "Keluaran" }, "create_contract_menu": { "contract_type": "Tipe Kontrak" }, "account_contract_summary": { "deposit": "Setoran", "withdraw": "Tarikan" }, "node_settings": { "language": "Bahasa", "enable_timelord": "Nyalakan TimeLord", "farmer_reward_address": "Alamat Imbalan Farmer", "timeLord_reward_address": "Alamat Imbalan TimeLord", "reward_address_placeholder": "Alamat Imbalan Sementara", "restart_needed": "Perlu Dimulai Ulang" }, "create_locked_contract": { "owner_address": "Alamat Pemilik", "unlock_height": "Dibuat Pada Ketinggian Blok" }, "create_virtual_plot_contract": { "farmer_public_key": "Kunci Umum Farmer", "reward_address": "Alamat Imbalan (untuk pooling)" }, "account_details": { "copy_keys_to_plotter": "Salin Kunci ke plotter" }, "account_actions": { "reset_cache": "Bersihkan Cache", "show_seed": "Tunjukkan Seed" }, "create_account": { "account_index": "Indeks Akun", "account_name": "Nama Akun", "number_of_addresses": "Jumlah Alamat", "create_account": "Buat Akun" }, "create_wallet": { "use_custom_seed": "Pakai Seed Sendiri", "seed_hash": "Seed Hash (optional, hex string, 64 karakter)", "placeholder": "Sementara", "create_wallet": "Buat Dompet" }, "market_menu": { "they_offer": "Tawaran Mereka", "they_ask": "Tuntutan Mereka", "anything": "Apa Aja", "offers": "Tawaran" }, "market_offers": { "price": "Harga", "accept": "Terima", "cancel": "Batalkan", "accept_offer": "Terima Tawaran", "you_receive": "Kamu Menerima", "you_pay": "Kamu Bayar" }, "login": { "password_label": "Password (lihat file PASSWD)", "login": "Masuk" } } ================================================ FILE: www/web-gui/public/locales/nl.json ================================================ { "common": { "yes": "Ja", "no": "Nee", "default": "standaard", "node": "Node", "wallet": "Portemonnee", "height": "Hoogte", "blocks": "Blokken", "balance": "Saldo", "token": "Token", "hash": "Hash", "reward": "Beloning", "amount": "Aantal", "address": "Adres", "type": "Type", "time": "Tijd", "fee": "Tarief", "pending": "in afwachting", "confirm": "Bevestigen", "deploy": "Implementeren", "create": "Creëren", "transaction_has_been_sent": "Transactie is verzonden", "failed_with": "Mislukt met", "deployed_as": "Geïmplementeerd als", "link": "Link" }, "main_menu": { "explore": "Ontdekken", "market": "Markt", "exchange": "Beurs", "settings": "Instellingen", "logout": "Uitloggen" }, "node_common": { "vdf_speed": "VDF snelheid", "block_reward": "Blok beloning", "netspace": "Netruimte" }, "node_menu": { "log": "Log", "peers": "Peers" }, "node_info": { "synced": "Gesynchroniseerd", "supply": "Aanbod", "no_addresses": "Nr. adressen" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "harvester": "Harvester", "timelord": "TimeLord" }, "node_peers": { "version": "Versie", "received": "Ontvangen", "send": "Verzonden", "ping": "Ping", "duration": "Looptijd", "credits": "Krediet", "tx_gas": "TX Gas", "connection": "Verbinding", "outbound": "uitgaand", "inbound": "inkomend" }, "wallet_summary": { "new": "Nieuw" }, "account_menu": { "nfts": "NFTs", "contracts": "Contracten", "addresses": "Adressen", "send": "Versturen", "offer": "Bieden", "history": "Geschiedenis", "details": "Details" }, "account_send_form": { "source_address": "Bronadres", "destination": "Bestemming", "destination_address": "Bestemmingsadres", "address_input": "Adresinvoer", "currency": "Valuta", "send": "Versturen" }, "balance_table": { "locked": "Op slot", "spendable": "Besteedbaar", "contract": "Contract" }, "account_balance": { "reserved": "Gereserveerd" }, "account_offers": { "offer": "Bieden", "receive": "Ontvangen", "status": "Status", "actions": "Acties", "revoke": "Intrekken", "accepted": "Geaccepteerd", "revoked": "Ingetrokken", "open": "Open" }, "account_offer_form": { "offer_amount": "Te verzenden bedrag", "offer_currency": "Te verzenden valuta", "receive_amount": "Te ontvangen bedrag", "receive_currency_contract": "Te ontvangen valuta contract", "symbol": "Symbool", "offer": "Bieden" }, "explore_menu": { "transactions": "Transacties", "block_height": "blokhoogte" }, "explore_blocks": { "score": "Score" }, "explore_transactions": { "transaction_id": "Transactie ID" }, "block_view": { "previous": "Vorige", "next": "Volgende", "block": "Blok", "no_such_block": "Blok bestaat niet!", "time_diff": "Tijdsverschil", "space_diff": "Ruimte verschil", "vdf_iterations": "VDF iteraties", "tx_base": "TX basis", "tx_count": "TX aantal", "k_size": "K maat", "proof_score": "Bewijsscore", "plot_id": "Plot ID", "farmer_key": "Farmer sleutel", "inputs": "Ingangen", "outputs": "Uitgangen", "operations": "Operaties" }, "transaction_view": { "transaction": "Transactie", "confirmed": "Bevestigd", "expires": "Verloopt", "note": "Opmerking", "sender": "Afzender", "cost": "Kosten", "input": "Invoer", "output": "Uitvoer" }, "create_contract_menu": { "contract_type": "Contract type" }, "account_contract_summary": { "deposit": "Storten", "withdraw": "Opnemen" }, "node_settings": { "language": "Taal", "enable_timelord": "TimeLord inschakelen", "farmer_reward_address": "Farmer beloningsadres", "timeLord_reward_address": "TimeLord beloningsadres", "reward_address_placeholder": "beloningsadres", "restart_needed": "(herstart nodig om toe te passen)" }, "create_locked_contract": { "owner_address": "Eigenaar adres", "unlock_height": "Ontgrendelen op blokhoogte" }, "create_virtual_plot_contract": { "farmer_public_key": "Farmer publieke sleutel", "reward_address": "Beloningsadres (optioneel, voor poolen)" }, "account_details": { "copy_keys_to_plotter": "Kopieer sleutels naar plotter" }, "account_actions": { "reset_cache": "Cache resetten", "show_seed": "Toon seed" }, "create_account": { "account_index": "Account index", "account_name": "Accountnaam", "number_of_addresses": "Aantal adressen", "create_account": "Account aanmaken" }, "create_wallet": { "use_custom_seed": "Gebruik aangepaste seed", "seed_hash": "Seed hash (optioneel, hex string, 64 karakters)", "placeholder": "", "create_wallet": "Portemonnee maken" }, "market_menu": { "they_offer": "Zij bieden aan", "they_ask": "Zij vragen", "anything": "Alles", "offers": "Aanbiedingen" }, "market_offers": { "price": "Prijs", "accept": "Accepteren", "cancel": "Annuleren", "accept_offer": "Aanbieding accepteren", "you_receive": "Jij ontvangt", "you_pay": "Jij betaald" }, "login": { "password_label": "Wachtwoord (zie PASSWD bestand)", "login": "Log in" } } ================================================ FILE: www/web-gui/public/locales/pt.json ================================================ { "common": { "yes": "Sim", "no": "Não", "default": "Por omissão", "node": "Node", "wallet": "Wallet", "height": "Height", "blocks": "Blocks", "balance": "Saldo", "token": "Token", "hash": "Hash", "reward": "Recompensa", "amount": "Montante", "address": "Endereço", "type": "Tipo", "time": "Tempo", "fee": "Taxa", "pending": "pendente", "confirm": "Confirmar", "deploy": "Deploy", "create": "Criar", "transaction_has_been_sent": "A transacção foi enviada", "failed_with": "Falhou com ", "deployed_as": "Deployed as", "link": "Link" }, "main_menu": { "explore": "Explorar", "market": "Mercado", "exchange": "Exchange", "settings": "Definições", "logout": "Sair" }, "node_common": { "vdf_speed": "Velocidade do VDF", "block_reward": "Recompensa pelo bloco", "netspace": "Dimensão da rede" }, "node_menu": { "log": "Log", "peers": "Peers" }, "node_info": { "synced": "Sincronizado", "supply": "Oferta", "no_addresses": "Num endereços" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "harvester": "Harvester", "timelord": "TimeLord" }, "node_peers": { "version": "Versão", "received": "Recebido", "send": "Enviar", "ping": "Ping", "duration": "Duração", "credits": "Créditos", "tx_gas": "TX Gas", "connection": "Conexão", "outbound": "saída", "inbound": "entrada" }, "wallet_summary": { "new": "Criar" }, "account_menu": { "nfts": "NFTs", "contracts": "Contratos", "addresses": "Endereços", "send": "Enviar", "offer": "Oferta", "history": "Histórico", "details": "Detalhes" }, "account_send_form": { "source_address": "Endereço de origem", "destination": "Destino", "destination_address": "Endereço de destino", "address_input": "Introduza o endereço", "currency": "Moeda", "send": "Enviar" }, "balance_table": { "locked": "Bloqueado", "spendable": "Pode ser gasto", "contract": "Contrato" }, "account_balance": { "reserved": "Reservado" }, "account_offers": { "offer": "Oferta", "receive": "Receber", "status": "Estado", "actions": "Acções", "revoke": "Revogar", "accepted": "Aceite", "revoked": "Revogado", "open": "Abrir" }, "account_offer_form": { "offer_amount": "Montante da oferta", "offer_currency": "Moeda da oferta", "receive_amount": "Montante recebido", "receive_currency_contract": "Contrato para receber a moeda", "symbol": "Simbolo", "offer": "Oferta" }, "explore_menu": { "transactions": "Transacções", "block_height": "height do bloco" }, "explore_blocks": { "score": "Pontuação" }, "explore_transactions": { "transaction_id": "ID da transacção" }, "block_view": { "previous": "Anterior", "next": "Seguinte", "block": "Bloco", "no_such_block": "O bloco não existe!", "time_diff": "Diferença de tempo", "space_diff": "Diferença de espaço", "vdf_iterations": "Iterações VDF", "tx_base": "TX Base", "tx_count": "TX Contador", "k_size": "K Tamanho", "proof_score": "Prova da pontuação", "plot_id": "Plot ID", "farmer_key": "Chave do Farmer", "inputs": "Entradas", "outputs": "Saidas", "operations": "Operações" }, "transaction_view": { "transaction": "Transacção", "confirmed": "Confirmado", "expires": "Expira", "note": "Nota", "sender": "Quem enviou", "cost": "Custo", "input": "Entrada", "output": "Saida" }, "create_contract_menu": { "contract_type": "Tipo de contrato" }, "account_contract_summary": { "deposit": "Depositar", "withdraw": "Levantar" }, "node_settings": { "language": "Idioma", "enable_timelord": "Activar o TimeLord", "farmer_reward_address": "Endereço de recompensa do Farmer", "timeLord_reward_address": "Endereço de recompensa do TimeLord", "reward_address_placeholder": "<по умолчанию>", "restart_needed": "(é necessário reiniciar para produzir efeito)" }, "create_locked_contract": { "owner_address": "Endereço do proprietário", "unlock_height": "Desbloqueado no Chain Height" }, "create_virtual_plot_contract": { "farmer_public_key": "Farmer Public Key", "reward_address": "Endereço de recompensa (opcional, para pooling)" }, "account_details": { "copy_keys_to_plotter": "Copiar chaves para o plotter" }, "account_actions": { "reset_cache": "Limpar Cache", "show_seed": "Mostrar Seed" }, "create_account": { "account_index": "Índice da conta", "account_name": "Nome da conta", "number_of_addresses": "Número de endereços", "create_account": "Criar conta" }, "create_wallet": { "use_custom_seed": "Usar Seed personalizada", "seed_hash": "Seed Hash (opcional, string hexadecimal, 64 caracteres)", "placeholder": "", "create_wallet": "Criar Wallet" }, "market_menu": { "they_offer": "Oferecido por outro", "they_ask": "Pediram", "anything": "Qualquer coisa", "offers": "Ofertas" }, "market_offers": { "price": "Preço", "accept": "Aceitar", "cancel": "Cancelar", "accept_offer": "Aceitar oferta", "you_receive": "Vais receber", "you_pay": "Vais pagar" }, "login": { "password_label": "Palavra-passe (ver o ficheiro PASSWD)", "login": "Entrar" } } ================================================ FILE: www/web-gui/public/locales/ru.json ================================================ { "common": { "yes": "Да", "no": "Нет", "default": "по умолчанию", "node": "Узел", "wallet": "Кошелёк", "height": "Высота", "blocks": "Блоки", "balance": "Баланс", "name": "Название", "token": "Токен", "currency": "Валюта", "symbol": "Символ", "price": "Цена", "hash": "Хэш", "reward": "Награда", "amount": "Сумма", "address": "Адрес", "contract": "Контракт", "type": "Тип", "time": "Время", "fee": "Комиссия", "pending": "ожидается", "confirm": "Подтвердить", "deploy": "Развернуть", "create": "Создать", "remove": "Удалить", "accept": "Принять", "cancel": "Отмена", "transaction_has_been_sent": "Транзакция отправлена", "failed_with": "Ошибка", "deployed_as": "Развёрнут как", "any": "Все", "link": "Ссылка", "owner": "Владелец", "manage": "Управлять", "harvester": "Комбайн", "deposit": "Вклад", "user": "Пользователь" }, "main_menu": { "explore": "Обозреватель", "farmer": "Фермер", "market": "Торговля", "exchange": "Биржа", "settings": "Настройки", "logout": "Выйти" }, "node_status": { "disconnected": "Отключено от узла", "logged_off": "Вылогенненый", "connecting": "Подключение", "syncing": "Синхронизация", "synced": "Синхронизировано" }, "node_common": { "vdf_speed": "Скорость VDF", "block_reward": "Награда за блок", "block_size": "Объем блока", "tx_fees": "Комиссии", "netspace": "Пространство сети" }, "node_menu": { "log": "Журнал", "peers": "Пиры" }, "node_info": { "synced": "Синхронизировано", "supply": "Эмиссия", "no_addresses": "Количество адресов" }, "farmer_info": { "virtual_balance": "Виртуальный баланс", "virtual_size": "Виртуальный объем", "physical_size": "Физический объем", "total_farm_size": "Общий объем фермы" }, "node_log": { "terminal": "Терминал", "router": "Маршрутизатор", "farmer": "Фермер", "timelord": "Таймлорд" }, "node_log_table": { "module": "Модуль", "message": "Сообщение" }, "node_peers": { "version": "Версия", "received": "Загрузка", "send": "Отдача", "ping": "Пинг", "duration": "Время", "credits": "Кредиты", "tx_gas": "TX Газ", "connection": "Соединение", "outbound": "исходящее", "inbound": "входящее" }, "wallet_summary": { "new": "Новый" }, "account_menu": { "nfts": "NFT", "contracts": "Контракты", "addresses": "Адреса", "send": "Отправить", "plots": "Плоты", "offer": "Офферы", "history": "История", "liquidity": "Ликвидность", "info": "Информация", "details": "Подробности" }, "account_send_form": { "source_address": "Исходный адрес", "destination": "Получатель", "destination_address": "Адрес получателя", "address_input": "Ввод адреса", "send": "Отправить" }, "balance_table": { "locked": "Заблокировано", "spendable": "Доступно" }, "account_balance": { "reserved": "Зарезервировано", "show_unknown": "Показывать неизвестные" }, "account_plots": { "size": "Объём", "new_plot": "Новый плот", "from": "с", "to": "на", "deposit_warning": "Только 90% суммы депозита будет возвращено при снятии средств, остальное сжигается в качестве комиссии.", "withdraw_warning": "Возвращается только 90% суммы, остальное сжигается в качестве комиссии." }, "account_offers": { "offering": "Предложено", "received": "Получено", "status": "Статус", "actions": "Действия", "revoke": "Отозвать", "accepted": "Принято", "revoked": "Отозвано", "open": "Открыто", "deposit_to": "Сделать вклад на" }, "account_offer_form": { "offer_amount": "Сумма оффера", "offer_currency": "Валюта оффера", "receive_amount": "Сумма получения", "receive_currency_contract": "Валюта получения (контракт)", "symbol": "Символ", "offer": "Предложить" }, "explore_menu": { "transactions": "Транзакции", "farmers": "Фермеры", "block_height": "Высота блока" }, "explore_blocks": { "score": "Оценка", "size": "Объём", "cost": "Расходы" }, "explore_transactions": { "transaction_id": "ID транзакции" }, "explore_farmers": { "no_blocks": "Кол-во блоков", "farmer_key": "Ключ фермера" }, "block_view": { "previous": "Предыдущий", "next": "Следующий", "block": "Блок", "no_such_block": "Нет такого блока!", "time_diff": "Time Diff", "space_diff": "Space Diff", "vdf_iterations": "Итерации VDF", "tx_base": "TX Base", "tx_count": "Кол-во транзакций", "k_size": "K Размер", "proof_score": "Оценка доказательства", "plot_id": "ID плота", "farmer_key": "Ключ фермера", "inputs": "Входы", "outputs": "Выходы", "operations": "Операции" }, "transaction_view": { "transaction": "Транзакция", "confirmed": "Подтверждения", "expires": "Истекает", "note": "Заметка", "sender": "Отправитель", "cost": "Стоимость", "input": "Ввод", "output": "Вывод", "no_such_transaction": "Нет такой транзакции!" }, "create_contract_menu": { "contract_type": "Тип контракта" }, "account_contract_summary": { "deposit": "Вклад", "withdraw": "Вывод" }, "node_settings": { "gui": "Графический интерфейс", "language": "Язык", "theme": "Тема", "light": "Светлая", "dark": "Темная", "general": "Основные", "enable_timelord": "Включить Таймлорд", "enable_timelord_reward": "Включить вознаграждения Таймлорда (требуется еще одно ядро ЦП)", "verify_timelord_reward": "Подтверждать вознаграждения Таймлорда (отключить, чтобы ускорить проверку VDF)", "open_port": "Открыть сетевой порт, чтобы разрешить входящие подключения (UPnP)", "farmer_reward_address": "Адрес награды Фермера", "timeLord_reward_address": "Адрес награды Таймлорда", "restart_needed": "(необходим перезапуск)", "opencl_device": "Устройство OpenCL", "blockchain": "Блокчейн", "revert_db_to_height": "Откатить базу данных на высоту", "revert": "Откатить" }, "harvester_settings": { "harvester_reload_interval": "Интервал перезарядки комбайна (сек)", "plot_directory": "Каталог с плотами", "add_directory": "Добавить каталог" }, "wallet_settings": { "token_whitelist": "Белый список токенов", "token_address": "Адрес токена", "add_token": "Добавить токен" }, "create_locked_contract": { "owner_address": "Адрес владельца", "unlock_height": "Высота разблокировки" }, "create_virtual_plot_contract": { "farmer_public_key": "Публичный ключ Фермера", "reward_address": "Адрес награды (опционально, для пулинга)" }, "account_details": { "copy_keys_to_plotter": "Копировать ключи в плоттер" }, "account_actions": { "reset_cache": "Сбросить кэш", "show_seed": "Показать мнемонику" }, "create_account": { "account_index": "Индекс аккаунта", "account_name": "Имя аккаунта", "number_of_addresses": "Количество адресов", "create_account": "Создать аккаунт" }, "create_wallet": { "use_custom_seed": "Использовать пользовательскую мнемонику", "seed_hash": "Хеш мнемоники (опционально, шестнадцатеричная строка, 64 символа)", "placeholder": "<случайный>", "create_wallet": "Создать Кошелек" }, "market_menu": { "they_offer": "Предлагают", "they_ask": "Запрашивают", "anything": "Всё", "offers": "Офферы", "history": "История" }, "market_offers": { "accept_offer": "Принять оффер", "wallet_ballance": "Баланс кошелька", "you_send": "Вы отправляете", "you_receive": "Вы получите", "you_pay": "Вы платите", "increase": "Увеличить", "trade": "Обменять" }, "login": { "password_label": "Пароль (см. файл PASSWD)", "login": "Войти" }, "account_history_form": { "any": "Все", "spend": "Отправлено", "receive": "Получено", "reward": "Награды", "tx_fee": "TX Комиссии" }, "farmer_menu": { "plots": "Плоты", "blocks": "Блоки", "proofs": "Доказательства" }, "farmer_plots": { "type": "Тип", "count": "Кол-во", "reload_plots": "Перезагрузить плоты" }, "farmer_plot_dirs": { "path": "Путь" }, "swap": { "pool_balance": "Баланс пула", "volume": "Объем", "24h": "24ч", "7d": "7 дней", "trade": "Обмен", "history": "История", "my_liquidity": "Моя ликвидность", "pool_state": "Состояние пула", "my_balance": "Мой баланс", "fees_earned": "Заработанная комиссия", "fee_level": "Уровень комиссии", "unlock_height": "Высота разблокировки", "user_total": "Всего", "token_amount": "Количество токенов", "currency_amount": "Количество валюты", "price_match": "Price Match", "payout": "Выплата", "switch_fee": "Изменить уровень комиссии", "add_liquidity": "Добавить ликвидность", "remove_iquidity": "Забрать ликвидность", "remove_all": "Забрать всё", "wallet_ballance": "Баланс кошелька", "buy_amount": "Сумма покупки", "sell_amount": "Сумма продажи", "trade_fee_estimated": "Комиссия (предполагаемая)", "you_receive_estimated": "Вы получите (предположительно)", "sell": "Продать", "buy": "Kупить" }, "$vuetify": { "dataIterator": { "loadingText": "Данные загружаются..." }, "noDataText": "Данные отсутствуют" } } ================================================ FILE: www/web-gui/public/locales/template.json ================================================ { "common": { "yes": "Yes", "no": "No", "default": "default", "node": "Node", "wallet": "Wallet", "height": "Height", "blocks": "Blocks", "balance": "Balance", "token": "Token", "symbol": "Symbol", "hash": "Hash", "reward": "Reward", "amount": "Amount", "address": "Address", "contract": "Contract", "type": "Type", "time": "Time", "fee": "Fee", "status": "Status", "pending": "pending", "expired": "expired", "failed": "failed", "confirm": "Confirm", "deploy": "Deploy", "create": "Create", "remove": "Remove", "transaction_has_been_sent": "Transaction has been sent", "failed_with": "Failed with", "deployed_as": "Deployed as", "any": "Any", "link": "Link" }, "main_menu": { "explore": "Explore", "market": "Market", "farmer": "Farmer", "exchange": "Exchange", "settings": "Settings", "logout": "Logout" }, "node_common": { "vdf_speed": "VDF Speed", "block_reward": "Block Reward", "block_size": "Block Size", "tx_fees": "Transaction Fees", "netspace": "Netspace" }, "node_menu": { "log": "Log", "peers": "Peers" }, "node_info": { "synced": "Synced", "supply": "Supply", "no_addresses": "No. Addresses" }, "farmer_info": { "virtual_balance": "Virtual Balance", "virtual_size": "Virtual Size", "physical_size": "Physical Size", "total_farm_size": "Total Farm Size" }, "node_log": { "terminal": "Terminal", "router": "Router", "farmer": "Farmer", "harvester": "Harvester", "timelord": "TimeLord" }, "node_log_table": { "module": "Module", "message": "Message" }, "node_peers": { "version": "Version", "received": "Received", "send": "Send", "ping": "Ping", "duration": "Duration", "credits": "Credits", "tx_gas": "TX Gas", "connection": "Connection", "outbound": "outbound", "inbound": "inbound" }, "wallet_summary": { "new": "New" }, "account_menu": { "nfts": "NFTs", "contracts": "Contracts", "addresses": "Addresses", "send": "Send", "offer": "Offer", "history": "History", "details": "Details" }, "account_addresses": { "index": "#", "n_recv": "N(Recv)", "n_spend": "N(Spend)", "last_recv": "Last Recv", "last_spend": "Last Spend" }, "wallet_common": { "enter_passphrase": "Passphrase required" }, "account_send_form": { "source_address": "Source Address", "destination": "Destination", "destination_address": "Destination Address", "address_input": "Address Input", "currency": "Currency", "send": "Send" }, "balance_table": { "locked": "Locked", "spendable": "Spendable" }, "account_balance": { "reserved": "Reserved" }, "account_offers": { "offer": "Offer", "receive": "Receive", "status": "Status", "actions": "Actions", "revoke": "Revoke", "accepted": "Accepted", "revoked": "Revoked", "open": "Open" }, "account_offer_form": { "offer_amount": "Offer Amount", "offer_currency": "Offer Currency", "receive_amount": "Receive Amount", "receive_currency_contract": "Receive Currency Contract", "symbol": "Symbol", "offer": "Offer" }, "explore_menu": { "transactions": "Transactions", "block_height": "block height" }, "explore_blocks": { "score": "Score" }, "explore_transactions": { "transaction_id": "Transaction ID" }, "block_view": { "previous": "Previous", "next": "Next", "block": "Block", "no_such_block": "No such block!", "time_diff": "Time Diff", "space_diff": "Space Diff", "vdf_iterations": "VDF Iterations", "tx_base": "TX Base", "tx_count": "TX Count", "k_size": "K Size", "proof_score": "Proof Score", "plot_id": "Plot ID", "farmer_key": "Farmer Key", "inputs": "Inputs", "outputs": "Outputs", "operations": "Operations" }, "transaction_view": { "transaction": "Transaction", "message": "Message", "confirmed": "Confirmed", "expires": "Expires", "note": "Note", "sender": "Sender", "cost": "Cost", "input": "Input", "output": "Output", "no_such_transaction": "No such transaction!" }, "create_contract_menu": { "contract_type": "Contract Type" }, "account_contract_summary": { "deposit": "Deposit", "withdraw": "Withdraw" }, "node_settings": { "language": "Language", "enable_timelord": "Enable TimeLord", "farmer_reward_address": "Farmer Reward Address", "timeLord_reward_address": "TimeLord Reward Address", "restart_needed": "(restart needed to apply)", "theme": "Theme", "light": "Light", "dark": "Dark", "opencl_device": "OpenCL Device" }, "wallet_settings": { "token_whitelist": "Token Whitelist", "name": "Name", "token_address": "Token Address", "add_token": "Add Token" }, "create_locked_contract": { "owner_address": "Owner Address", "unlock_height": "Unlock at Chain Height" }, "create_virtual_plot_contract": { "farmer_public_key": "Farmer Public Key", "reward_address": "Reward Address (optional, for pooling)" }, "account_details": { "copy_keys_to_plotter": "Copy keys to plotter" }, "account_actions": { "reset_cache": "Reset Cache", "show_seed": "Show Seed" }, "create_account": { "account_index": "Account Index", "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "create_account": "Create Account" }, "create_wallet": { "account_name": "Account Name", "number_of_addresses": "Number of Addresses", "use_custom_seed": "Use Custom Seed", "use_passphrase": "With Passphrase", "seed_words": "Mnemonic Seed Words (optional, 24 words)", "passphrase": "Passphrase (secure password, 10+ characters)", "placeholder": "", "create_wallet": "Create Wallet" }, "market_menu": { "they_offer": "They Offer", "they_ask": "They Ask", "anything": "Anything", "offers": "Offers" }, "market_offers": { "price": "Price", "accept": "Accept", "cancel": "Cancel", "accept_offer": "Accept Offer", "you_receive": "You Receive", "you_pay": "You Pay" }, "login": { "password_label": "Password (see PASSWD file)", "login": "Login" }, "account_history_form": { "spend": "Spend", "receive": "Receive", "reward": "Reward", "tx_fee": "TX Fee" }, "farmer_menu": { "plots": "Plots", "blocks": "Blocks", "proofs": "Proofs" }, "farmer_plots": { "type": "Type", "count": "Count", "reload_plots": "Reload Plots" }, "farmer_plot_dirs": { "path": "Path" }, "$vuetify": { "dataIterator": { "loadingText": "Loading items..." }, "noDataText": "No data available" } } ================================================ FILE: www/web-gui/public/locales/uk.json ================================================ { "common": { "yes": "Так", "no": "Ні", "default": "за умовчанням", "node": "Вузол", "wallet": "Гаманець", "height": "Висота", "blocks": "Блоки", "balance": "Баланс", "token": "Токен", "hash": "Хеш", "reward": "Нагорода", "amount": "Сума", "address": "Адреса", "type": "Тип", "time": "Час", "fee": "Комісія", "pending": "очікується", "confirm": "Підтвердити", "deploy": "Розгорнути", "create": "Створити", "transaction_has_been_sent": "Переказ був надісланий", "failed_with": "Помилка", "deployed_as": "Розгорнути як", "link": "Посилання" }, "main_menu": { "explore": "Провідник", "market": "Торгівля", "exchange": "Біржа", "settings": "Налаштування", "logout": "Вийти" }, "node_common": { "vdf_speed": "Швидкість VDF", "block_reward": "Винагорода за блок", "netspace": "Мережевий простір" }, "node_menu": { "log": "Журнал", "peers": "Піри" }, "node_info": { "synced": "Синхронізовано", "supply": "Емісія", "no_addresses": "Кількість адрес" }, "node_log": { "terminal": "Термінал", "router": "Маршрутизатор", "farmer": "Фермер", "harvester": "Комбайн", "timelord": "Таймлорд" }, "node_peers": { "version": "Версія", "received": "Завантеження", "send": "Віддача", "ping": "Пінг", "duration": "Час", "credits": "Кредити", "tx_gas": "TX Газ", "connection": "З'єднання", "outbound": "вихідний", "inbound": "вхідний" }, "wallet_summary": { "new": "Новий" }, "account_menu": { "nfts": "NFT", "contracts": "Контракти", "addresses": "Адреси", "send": "Відправити", "offer": "Пропозиція", "history": "Історія", "details": "Детальніше" }, "account_send_form": { "source_address": "Адреса джерела", "destination": "Отримувач", "destination_address": "Адреса отримувача", "address_input": "Введення адреси", "currency": "Валюта", "send": "Відправити" }, "balance_table": { "locked": "Заблоковано", "spendable": "Доступно", "contract": "Контракт" }, "account_balance": { "reserved": "Зарезервовано" }, "account_history": { "link": "@:common.link" }, "account_offers": { "offer": "Пропонувати", "receive": "Отримати", "status": "Статус", "actions": "Дії", "revoke": "Відкликати", "accepted": "Прийнято", "revoked": "Скасовано", "open": "Відчинено" }, "account_offer_form": { "offer_amount": "Сума пропозиції", "offer_currency": "Валюта пропозиції", "receive_amount": "Отримати суму", "receive_currency_contract": "Валюта отримання (контракт)", "symbol": "Символ", "offer": "Пропозиція" }, "explore_menu": { "transactions": "Транзакції", "address": "Адреса", "block_height": "Висота блоку" }, "explore_blocks": { "score": "Оцінка" }, "explore_transactions": { "transaction_id": "ID Транзакції" }, "block_view": { "previous": "Попередній", "next": "Наступний", "block": "Блок", "no_such_block": "Немає такого блоку!", "time_diff": "Time Diff", "space_diff": "Space Diff", "vdf_iterations": "Ітерації VDF", "tx_base": "TX Base", "tx_count": "Кількість транзакцій", "k_size": "K Розмір", "proof_score": "Оцінка доказу", "plot_id": "ID плоту", "farmer_key": "Ключ фермера", "inputs": "Входи", "outputs": "Виходи", "operations": "Операції" }, "transaction_view": { "transaction": "Транзакція", "confirmed": "Підтверджено", "expires": "Термін дії закінчується", "note": "Замітка", "sender": "Відправник", "cost": "Вартість", "input": "Вхідні дані", "output": "Вихідні дані" }, "create_contract_menu": { "contract_type": "Тип контракту" }, "account_contract_summary": { "deposit": "Депозит", "withdraw": "Зняти" }, "node_settings": { "language": "Мова", "enable_timelord": "Вибрати Таймлорд", "farmer_reward_address": "Адреса винагороди фермера", "timeLord_reward_address": "Адреса винагороди Таймлорда", "reward_address_placeholder": "<за умовчанням>", "restart_needed": "(Для застосування необхідне перезавантеження)" }, "create_locked_contract": { "owner_address": "Адреса власника", "unlock_height": "Висота розблокування" }, "create_virtual_plot_contract": { "farmer_public_key": "Відкритий ключ фермера", "reward_address": "Алреса винагороди (опціонально, для об'єднання)" }, "account_details": { "copy_keys_to_plotter": "Копіювати ключі в плоттер" }, "account_actions": { "reset_cache": "Скинути кеш", "show_seed": "Показати мнемоніку" }, "create_account": { "account_index": "Індекс облікового запису", "account_name": "Ім'я облікового запису", "number_of_addresses": "Кількість адрес", "create_account": "Створити аккаунт" }, "create_wallet": { "use_custom_seed": "Використовувати мнемоніку користувача", "seed_hash": "Хеш мнемоніки (опціонально, шістнадцятирічний рядок, 64 символи)", "placeholder": "<Випадковий>", "create_wallet": "Створити гаманець" }, "market_menu": { "they_offer": "Пропонують", "they_ask": "Запитують", "anything": "Усе", "offers": "Пропозиції" }, "market_offers": { "price": "Ціна", "accept": "Прийняти", "cancel": "Відмінити", "accept_offer": "Прийняти пропозицію", "you_receive": "Ви отримуєте", "you_pay": "Ти платиш" }, "login": { "password_label": "Пароль (оглянути файл PASSWD)", "login": "Увійти" } } ================================================ FILE: www/web-gui/public/locales/zh.json ================================================ { "common": { "yes": "是的", "no": "否", "default": "默认的", "node": "节点", "wallet": "钱包", "height": "高度", "blocks": "区块", "balance": "余额", "token": "代币", "hash": "哈希", "reward": "奖励", "amount": "数量", "address": "地址", "type": "类型", "time": "时间", "fee": "费用", "pending": "等待中", "confirm": "确认", "deploy": " 部署", "create": "创建", "transaction_has_been_sent": "交易已发送 ", "failed_with": "失败原因", "deployed_as": "部署为 ", "link": "链接" }, "main_menu": { "explore": "浏览器", "market": "市场", "exchange": "交换", "settings": "设置", "logout": "退出" }, "node_common": { "vdf_speed": "VDF 速度", "block_reward": "区块奖励", "tx_fees": "交易费", "netspace": "网络空间" }, "node_menu": { "log": "日志", "peers": "节点" }, "node_info": { "synced": "已同步", "supply": "供应", "no_addresses": "No. Addresses" }, "node_log": { "terminal": "终端", "router": "路由", "farmer": "农民", "harvester": "收割机", "timelord": "时间领主" }, "node_peers": { "version": "版本", "received": "已接收", "send": "发送", "ping": "Ping", "duration": "期间", "credits": "信用", "tx_gas": "TX Gas", "connection": "连接", "outbound": "向外的", "inbound": "向内的" }, "wallet_summary": { "new": "新建" }, "account_menu": { "nfts": "NFTs", "contracts": "合同", "addresses": "地址", "send": "发送", "offer": "提供", "history": "历史", "details": "详情" }, "account_send_form": { "source_address": "源地址", "destination": "目的地", "destination_address": "目的地地址", "address_input": "地址输入", "currency": "货币", "send": "发送" }, "balance_table": { "locked": "已锁定", "spendable": "可花费", "contract": "合同" }, "account_balance": { "reserved": "保留的" }, "account_offers": { "offer": "提供", "receive": "收到", "status": "状态", "actions": "行动", "revoke": "撤销", "accepted": "已收到", "revoked": "已撤销", "open": "打开" }, "account_offer_form": { "offer_amount": "提供的数量", "offer_currency": "提供的货币", "receive_amount": "接收的数量", "receive_currency_contract": "接收货币合同", "symbol": "标志", "offer": "提供" }, "explore_menu": { "transactions": "交易", "block_height": "区块高度" }, "explore_blocks": { "score": "分数" }, "explore_transactions": { "transaction_id": "交易ID" }, "block_view": { "previous": "先前的", "next": "接下来的", "block": "区块", "no_such_block": "没有这个区块", "time_diff": "时间差异", "space_diff": "空间差异", "vdf_iterations": "VDF 迭代次数", "tx_base": "TX 基数", "tx_count": "TX 总数", "k_size": "K 大小", "proof_score": "证明分数", "plot_id": "Plot ID", "farmer_key": "农民密钥", "inputs": "输入", "outputs": "输出", "operations": "操作" }, "transaction_view": { "transaction": "交易", "confirmed": "确认的", "expires": "过期", "note": "笔记", "sender": "发送人", "cost": "费用", "input": "输入", "output": "输出" }, "create_contract_menu": { "contract_type": "合同类型" }, "account_contract_summary": { "deposit": "押金", "withdraw": "撤回" }, "node_settings": { "language": "语言", "enable_timelord": "开启时间领主", "farmer_reward_address": "农民奖励地址", "timeLord_reward_address": "时间领主奖励地址", "reward_address_placeholder": "<默认奖励地址>", "restart_needed": "(需要重新启动)" }, "create_locked_contract": { "owner_address": "所有者地址", "unlock_height": "在某区块高度解锁" }, "create_virtual_plot_contract": { "farmer_public_key": "农民公钥", "reward_address": "奖励地址 (可选的, 用于池)" }, "account_details": { "copy_keys_to_plotter": "将密钥复制到绘图仪" }, "account_actions": { "reset_cache": "重置缓存", "show_seed": "显示种子" }, "create_account": { "account_index": "账户序号", "account_name": "账户名称", "number_of_addresses": "地址数量", "create_account": "创建帐户" }, "create_wallet": { "use_custom_seed": "使用自定义种子", "seed_hash": "种子哈希 (可选的, 十六进制字符串, 64字符)", "placeholder": "", "create_wallet": "创建钱包" }, "market_menu": { "they_offer": "他们提供", "they_ask": "他们问", "anything": "任何事物", "offers": "提供物" }, "market_offers": { "price": "价格", "accept": "接受", "cancel": "取消", "accept_offer": "接受报价", "you_receive": "你收到", "you_pay": "你支付" }, "login": { "password_label": "密码 (查看密码文件)", "login": "登录" } } ================================================ FILE: www/web-gui/public/market.js ================================================ Vue.component('market-menu', { props: { wallet_: Number, page: String, loading: false }, data() { return { wallets: [], wallet: null, tokens: [], bid: null, ask: null, currentItem: 0 } }, methods: { update() { this.loading = true; fetch('/wapi/wallet/accounts') .then(response => response.json()) .then(data => { this.loading = false; this.wallets = data; if(this.wallet == null && data.length) { this.wallet = data[0].account; } }) .catch(error => { setTimeout(this.update, 1000); throw(error); }); fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => this.tokens = data); }, submit(page) { if(!page) { if(this.page) { page = this.page; } else { page = "offers"; } } localStorage.setItem('active_wallet', this.wallet); this.$router.push('/market/' + page + '/' + this.wallet + '/' + this.bid + '/' + this.ask).catch(()=>{}); } }, created() { if(this.wallet_ != null) { this.wallet = this.wallet_; } else { this.wallet = get_active_wallet(); } this.update(); }, watch: { wallet() { this.submit(); }, bid() { this.submit(); }, ask() { this.submit(); } }, computed: { selectItems() { var result = []; result.push({ text: this.$t('market_menu.anything'), value: null}); this.tokens.map(item => { var text = item.symbol; if(item.currency != MMX_ADDR) { text += ` - [${item.currency}]`; } result.push( { text: text, value: item.currency } ); }); return result; } }, template: `
{{ $t('market_menu.offers') }} {{ $t('market_menu.history') }}
` }) Vue.component('market-offers', { props: { wallet: Number, bid: null, ask: null, limit: Number }, data() { return { data: null, offer: {}, tokens: null, bid_symbol: null, bid_decimals: null, min_bid_amount: null, accepted: new Set(), timer: null, result: null, error: null, loading: false, trade_dialog: false, accept_dialog: false, trade_amount: null, trade_estimate: null, trade_estimate_data: null, wallet_balance: null, fee_ratio: 1024, fee_amount: null, } }, methods: { update() { if(this.tokens) { this.loading = true; let query = '/wapi/offers?limit=' + this.limit; if(this.bid) { query += '&bid=' + this.bid; } if(this.ask) { query += '&ask=' + this.ask; } if(this.min_bid_amount > 0) { query += '&min_bid=' + parseInt(this.min_bid_amount * Math.pow(10, this.bid_decimals)); } fetch(query) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); } else { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => { this.tokens = new Set(); for(const token of data) { if(token.currency == this.bid) { this.bid_symbol = token.symbol; this.bid_decimals = token.decimals; } this.tokens.add(token.currency); } this.update(); }); } }, update_estimate() { this.trade_estimate = null; fetch('/wapi/offer/trade_estimate?id=' + this.offer.address + '&amount=' + (this.trade_amount > 0 ? this.trade_amount : 0)) .then(response => response.json()) .then(data => { this.trade_estimate = data.trade.value; this.trade_estimate_data = data; }); this.submit_trade(true); }, update_fee_ratio(value) { this.fee_ratio = value; if(this.trade_dialog) { this.submit_trade(true); } if(this.accept_dialog) { this.submit_accept(true); } }, update_balance(currency) { this.wallet_balance = null; fetch('/wapi/wallet/balance?index=' + this.wallet + '¤cy=' + currency) .then(response => response.json()) .then(data => this.wallet_balance = data ? data.spendable : 0); }, trade(offer) { this.update_balance(offer.ask_currency); this.offer = offer; this.fee_amount = null; this.trade_amount = null; this.trade_estimate = null; this.trade_dialog = true; }, accept(offer) { this.update_balance(offer.ask_currency); this.offer = offer; this.fee_amount = null; this.submit_accept(true); this.accept_dialog = true; }, increase() { this.trade_amount = this.trade_estimate_data.next_input.value; }, submit_trade(estimate = false) { const req = {}; req.index = this.wallet; req.address = this.offer.address; req.amount = this.trade_amount; req.price = this.trade_estimate_data ? this.trade_estimate_data.inv_price : this.offer.inv_price; req.options = {}; req.options.fee_ratio = this.fee_ratio; if(estimate) { req.options.auto_send = false; } if(!(req.amount > 0)) { return; } fetch('/wapi/wallet/offer_trade', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => { this.error = null; if(estimate) { this.fee_amount = data.exec_result.total_fee_value; } else { this.result = data; } }); } else if(!estimate) { response.text().then(data => { this.error = data; this.result = null; }); } }); if(!estimate) { this.trade_dialog = false; } }, submit_accept(estimate = false) { const address = this.offer.address; const req = {}; req.index = this.wallet; req.address = address; req.price = this.offer.inv_price; req.options = {}; req.options.fee_ratio = this.fee_ratio; if(estimate) { req.options.auto_send = false; } fetch('/wapi/wallet/accept_offer', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => { this.error = null; if(estimate) { this.fee_amount = data.exec_result.total_fee_value; } else { this.result = data; this.accepted.add(address); } }); } else if(!estimate) { response.text().then(data => { this.error = data; this.result = null; }); } }); if(!estimate) { this.accept_dialog = false; } }, is_valid_trade() { const bid_amount = this.trade_estimate_data ? parseFloat(this.trade_estimate_data.trade.amount) : 0; return this.offer && this.trade_amount > 0 && this.trade_amount <= this.wallet_balance && bid_amount > 0 && bid_amount <= this.offer.bid_balance; }, is_valid_trade_amount() { if(this.trade_amount > this.wallet_balance) { return "insufficient funds"; } if(this.trade_amount == null || this.trade_amount == "" || this.trade_amount > 0) { return true; } return "invalid amount"; }, is_valid_bid_amount() { if(this.trade_estimate != null) { if(this.trade_estimate > this.offer.bid_balance_value) { return "exceeding offer"; } } return true; } }, watch: { trade_amount() { if(this.offer) { this.update_estimate(); } }, min_bid_amount() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('market-history', { props: { bid: null, ask: null, limit: Number }, data() { return { data: null, tokens: null, timer: null, loading: false } }, methods: { update() { if(this.tokens) { this.loading = true; let query = '/wapi/trade_history?limit=' + this.limit; if(this.bid) { query += '&bid=' + this.bid; } if(this.ask) { query += '&ask=' + this.ask; } fetch(query) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); } else { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => { this.tokens = new Set(); for(const token of data) { this.tokens.add(token.currency); } this.update(); }); } } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) ================================================ FILE: www/web-gui/public/mount.js ================================================ const routes = [ { path: '/', redirect: "/node" }, { path: '/login', component: Login, meta: { is_login: true } }, { path: '/wallet', component: Wallet, meta: { is_wallet: true } }, { path: '/wallet/create', component: WalletCreate, meta: { is_wallet: true } }, { path: '/wallet/account/:index', component: Account, meta: { is_wallet: true }, props: route => ({ index: parseInt(route.params.index) }), children: [ { path: '', component: AccountHome, meta: { page: 'balance' } }, { path: 'nfts', component: AccountNFTs, meta: { page: 'nfts' } }, { path: 'contracts', component: AccountContracts, meta: { page: 'contracts' } }, { path: 'send/:target?', component: AccountSend, meta: { page: 'send' } }, { path: 'send_from/:source?', component: AccountSendFrom, meta: { page: 'send' } }, { path: 'split', component: AccountSplit, meta: { page: 'split' } }, { path: 'offer', component: AccountOffer, meta: { page: 'offer' } }, { path: 'history', component: AccountHistory, meta: { page: 'history' } }, { path: 'log', component: AccountLog, meta: { page: 'log' } }, { path: 'liquid', component: AccountLiquid, meta: { page: 'liquid' } }, { path: 'plotnfts', component: AccountPlotNFTs, meta: { page: 'plotnfts' } }, { path: 'details', component: AccountDetails, meta: { page: 'details' } }, { path: 'options', component: AccountOptions, meta: { page: 'options' } }, { path: 'create/locked', component: AccountCreateLocked }, ] }, { path: '/market', component: Market, redirect: '/market/offers/null/null/null', meta: { is_market: true }, props: route => ({ wallet: route.params.wallet == 'null' ? null : parseInt(route.params.wallet), bid: route.params.bid == 'null' ? null : route.params.bid, ask: route.params.ask == 'null' ? null : route.params.ask, }), children: [ { path: 'offers/:wallet/:bid/:ask', component: MarketOffers, meta: { page: 'offers' } }, { path: 'history/:wallet/:bid/:ask', component: MarketHistory, meta: { page: 'history' } }, ] }, { path: '/swap', component: Swap, redirect: '/swap/market/null/null', meta: { is_swap: true }, props: route => ({ address: route.params.address }), children: [ { path: 'market/:token/:currency', component: SwapMarket, meta: { page: 'market' } }, { path: 'trade/:address', component: SwapTrade, meta: { page: 'trade' } }, { path: 'history/:address', component: SwapHistory, meta: { page: 'history' } }, { path: 'liquid/:address', component: SwapLiquid, meta: { page: 'liquid' } }, { path: 'pool/:address', component: SwapPool, meta: { page: 'pool' } }, ] }, { path: '/explore', component: Explore, redirect: "/explore/blocks", meta: { is_explorer: true }, children: [ { path: 'blocks', component: ExploreBlocks, meta: { page: 'blocks' } }, { path: 'transactions', component: ExploreTransactions, meta: { page: 'transactions' } }, { path: 'farmers', component: ExploreFarmers, meta: { page: 'farmers' } }, { path: 'block/hash/:hash', component: ExploreBlock, meta: { page: 'block' } }, { path: 'block/height/:height', component: ExploreBlock, meta: { page: 'block' } }, { path: 'farmer/:id', component: ExploreFarmer, meta: { page: 'farmer' } }, { path: 'address/:address', component: ExploreAddress, meta: { page: 'address' } }, { path: 'transaction/:id', component: ExploreTransaction, meta: { page: 'transaction' } }, ] }, { path: '/node', component: NodeView, redirect: "/node/log", meta: { is_node: true }, children: [ { path: 'log', component: NodeLog, meta: { page: 'log' } }, { path: 'peers', component: NodePeers, meta: { page: 'peers' } }, { path: 'blocks', component: NodeBlocks, meta: { page: 'blocks' } }, { path: 'netspace', component: NodeNetspace, meta: { page: 'netspace' } }, { path: 'vdf_speed', component: NodeVDFSpeed, meta: { page: 'vdf_speed' } }, { path: 'reward', component: NodeBlockReward, meta: { page: 'reward' } }, ] }, { path: '/farmer', component: Farmer, redirect: "/farmer/plots", meta: { is_farmer: true }, children: [ { path: 'plots', component: FarmerPlots, meta: { page: 'plots' } }, { path: 'blocks', component: FarmerBlocks, meta: { page: 'blocks' } }, { path: 'proofs', component: FarmerProofs, meta: { page: 'proofs' } }, { path: 'plotnfts', component: FarmerPlotNFTs, meta: { page: 'plotnfts' } }, ] }, { path: '/settings', component: Settings, meta: { is_settings: true } }, ] const router = new VueRouter({ routes }) var vuetify = new Vuetify({ lang: { t: (key, ...params) => i18n.t(key, params), }, }); Vue.prototype.$isQtGUI = typeof window.mmx_qtgui !== 'undefined'; Vue.prototype.$isWinGUI = typeof window.mmx !== 'undefined'; (async () => { var locale; if(Vue.prototype.$isWinGUI) { locale = window.mmx.locale; } else { locale = localStorage.getItem('language'); } if (locale) { await loadLanguageAsync(locale); } else { setI18nLanguage('en'); } new Vue({ data: { farmer: false, wallet: false, local_node: false, params: null, nodeInfo: null }, el: '#app', vuetify: vuetify, router: router, i18n: i18n, beforeMount() { if(this.$isWinGUI) { this.$vuetify.theme.dark = window.mmx.theme_dark; setInterval( () => { var locale = window.mmx.locale; if (i18n.locale != locale) { loadLanguageAsync(locale); } this.$vuetify.theme.dark = window.mmx.theme_dark; }, 1000); } else { this.$vuetify.theme.dark = localStorage.getItem('theme_dark') === 'true'; } }, created() { fetch('/wapi/chain/info') .then(response => response.json()) .then(data => this.params = data); fetch('/wapi/config/get?key=farmer') .then(response => response.json()) .then(data => this.farmer = data || data == null ? true : false); fetch('/wapi/config/get?key=wallet') .then(response => response.json()) .then(data => this.wallet = data || data == null ? true : false); fetch('/wapi/config/get?key=local_node') .then(response => response.json()) .then(data => this.local_node = data || data == null ? true : false); } }); })(); ================================================ FILE: www/web-gui/public/node.js ================================================ Vue.component('node-menu', { template: ` {{ $t('node_menu.log') }} {{ $t('node_menu.peers') }} {{ $t('node_menu.blocks') }} {{ $t('node_menu.netspace') }} {{ $t('node_menu.vdf_speed') }} {{ $t('node_menu.block_reward') }} ` }) Vue.component('node-info', { data() { return { data: null, timer: null } }, methods: { update() { fetch('/wapi/node/info') .then(response => response.json()) .then(data => this.data = data); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 5000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ data.is_synced ? $t('common.yes') : $t('common.no') }}
{{ $t('node_info.synced') }}
{{ data.height }}
{{ $t('node_info.height') }}
{{ (data.total_space / Math.pow(1000, 2)).toFixed(3) }} PB
{{ $t('node_info.netspace') }}
{{ data.vdf_speed.toFixed(3) }} MH/s
{{ $t('node_info.vdf_speed') }}
{{ data.address_count }}
{{ $t('node_info.no_addresses') }}
{{ (data.block_size * 100).toFixed(2) }} %
{{ $t('node_info.block_size') }}
{{ data.average_txfee.value > 1 ? data.average_txfee.value.toPrecision(6) : data.average_txfee.value }} MMX
Avg. TX Fee
{{ (data.block_reward.value).toFixed(3) }} MMX
{{ $t('node_info.block_reward') }}
` }) Vue.component('node-peers', { data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('node_peers.ip'), value: 'address', width: "5%" }, { text: this.$t('node_peers.height'), value: 'height', width: "5%" }, { text: this.$t('node_peers.type'), value: 'type', width: "5%"}, { text: this.$t('node_peers.version'), value: 'version', width: "5%" }, { text: this.$t('node_peers.received'), value: 'received', width: "10%" }, { text: this.$t('node_peers.send'), value: 'send', width: "10%" }, { text: this.$t('node_peers.ping'), value: 'ping', width: "10%" }, { text: this.$t('node_peers.duration'), value: 'duration', width: "10%" }, { text: this.$t('node_peers.connection'), value: 'connection', width: "10%" }, { text: "Action", value: 'action'}, ] } }, methods: { update() { fetch('/api/router/get_peer_info') .then(response => response.json()) .then(data => { this.data = data; this.loaded = true; }); }, kick_peer(address) { const args = {}; args.address = address; fetch('/api/router/kick_peer', {body: JSON.stringify(args), method: "post"}) .then(response => { if(response.ok) { this.update(); } }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 5000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('netspace-graph', { props: { limit: Number, step: Number }, data() { return { data: null, layout: { title: this.$t('netspace_graph.title', ['PB']), xaxis: { title: this.$t('common.height') }, yaxis: { title: "PB" } }, timer: null, loading: false } }, methods: { update() { this.loading = true; fetch('/wapi/node/graph/blocks?limit=' + this.limit + '&step=' + (this.step ? this.step : 90)) .then(response => response.json()) .then(data => { const tmp = {x: [], y: [], type: "scatter"}; for(const item of data) { tmp.x.push(item.height); tmp.y.push(item.netspace); } this.loading = false; this.data = [tmp]; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60 * 1000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('vdf-speed-graph', { props: { limit: Number, step: Number }, data() { return { data: null, layout: { title: this.$t('vdf_speed_graph.title', ['MH/s']), xaxis: { title: this.$t('common.height') }, yaxis: { title: "MH/s" } }, timer: null, loading: false } }, methods: { update() { this.loading = true; fetch('/wapi/node/graph/blocks?limit=' + this.limit + '&step=' + (this.step ? this.step : 90)) .then(response => response.json()) .then(data => { const tmp = {x: [], y: [], type: "scatter"}; for(const item of data) { tmp.x.push(item.height); tmp.y.push(item.vdf_speed); } this.loading = false; this.data = [tmp]; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60 * 1000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('block-reward-graph', { props: { limit: Number, step: Number }, data() { return { base_data: null, fee_data: null, base_layout: { title: this.$t('block_reward_graph.title', ['MMX']), xaxis: { title: this.$t('common.height') }, yaxis: { title: "MMX" } }, fee_layout: { title: this.$t('tx_fees_graph.title', ['MMX']), xaxis: { title: this.$t('common.height') }, yaxis: { title: "MMX" } }, timer: null, loading: false } }, methods: { update() { this.loading = true; fetch('/wapi/node/graph/blocks?limit=' + this.limit + '&step=' + (this.step ? this.step : 90)) .then(response => response.json()) .then(data => { { const tmp = {x: [], y: [], type: "scatter"}; for(const item of data) { tmp.x.push(item.height); tmp.y.push(item.reward); } this.base_data = [tmp]; } { const tmp = {x: [], y: [], type: "scatter"}; for(const item of data) { tmp.x.push(item.height); tmp.y.push(item.tx_fees); } this.fee_data = [tmp]; } this.loading = false; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60 * 1000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('node-log', { data() { return { limit: 100, level: 3, module: null, currentItem: 0 } }, template: `
{{ $t('node_log.terminal') }} {{ $t('node_log.node') }} {{ $t('node_log.router') }} {{ $t('node_log.wallet') }} {{ $t('node_log.farmer') }} {{ $t('node_log.harvester') }} {{ $t('node_log.timelord') }}
` }) Vue.component('node-log-table', { props: { limit: Number, level: Number, module: String }, data() { return { data: [], timer: null, loaded: false } }, computed: { headers() { return [ { text: this.$t('node_log_table.time'), value: 'time', align: 'left', width: "10%"}, { text: this.$t('node_log_table.module'), value: 'module', width: "10%"}, { text: this.$t('node_log_table.message'), value: 'message' }, ] } }, methods: { update() { fetch('/wapi/node/log?limit=' + this.limit + "&level=" + this.level + (this.module ? "&module=" + this.module : "")) .then(response => response.json()) .then(data => { this.data = data; if(this.$isWinGUI) { this.data = this.data.filter( item => item.module != 'HttpServer'); } this.loaded = true; }); }, itemClass(item) { var result = ""; switch(item.level) { case 1: result = 'error'; break; case 2: result = 'warning'; break; default: result = ''; } return result; } }, watch: { limit() { this.update(); }, level() { this.update(); }, module() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 2000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) ================================================ FILE: www/web-gui/public/robots.txt ================================================ User-agent: * Disallow: / ================================================ FILE: www/web-gui/public/settings.js ================================================ Vue.component('node-settings', { data() { return { error: null, result: null, loading: true, timelord: null, open_port: null, allow_remote: null, cuda_enable: null, opencl_device_list_relidx: null, opencl_device: null, opencl_device_list: null, farmer_reward_addr: "null", timelord_reward_addr: "null", harv_num_threads: null, reload_interval: null, recursive_search: null, plot_dirs: [], new_plot_dir: null, revert_height: null, availableLanguages: availableLanguages } }, methods: { update() { fetch('/wapi/config/get') .then(response => response.json()) .then(data => { this.loading = false; this.timelord = data.timelord ? true : false; this.open_port = data["Router.open_port"] ? true : false; this.allow_remote = data["allow_remote"] ? true : false; this.cuda_enable = data["cuda.enable"] ? true : false; this.opencl_device = data["Node.opencl_device_select"] != null ? data["Node.opencl_device_select"] : -1; this.opencl_device_list_relidx = []; this.opencl_device_list = [{name: "None", value: -1}]; { let list = data["Node.opencl_device_list"]; if(list) { for(const [i, device] of list.entries()) { this.opencl_device_list_relidx.push({name: device[0], index: device[1]}); this.opencl_device_list.push({name: device[0], value: i}); } } } this.farmer_reward_addr = data["Farmer.reward_addr"]; this.timelord_reward_addr = data["TimeLord.reward_addr"]; this.harv_num_threads = data["Harvester.num_threads"]; this.reload_interval = data["Harvester.reload_interval"]; this.recursive_search = data["Harvester.recursive_search"]; this.plot_dirs = data["Harvester.plot_dirs"]; }); }, set_config(key, value, restart, tmp_only = false) { var req = {}; req.key = key; req.value = value; req.tmp_only = tmp_only; fetch('/wapi/config/set', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.result = {key: req.key, value: req.value, restart}; } else { response.text().then(data => { this.error = data; }); } }); }, add_plot_dir(path) { if(path == null || path == "") { return; } var req = {}; req.path = path; fetch('/api/harvester/add_plot_dir', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.update(); this.result = {key: "Harvester.plot_dirs", value: "+ " + req.path, restart: false}; } else { response.text().then(data => { this.error = data; }); } }); }, rem_plot_dir(path) { var req = {}; req.path = path; fetch('/api/harvester/rem_plot_dir', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.update(); this.result = {key: "Harvester.plot_dirs", value: "- " + req.path, restart: false}; } else { response.text().then(data => { this.error = data; }); } }); }, revert_sync(height) { if(height == null) { return; } height = parseInt(height) if(!(height >= 0)) { this.error = "invalid height"; return; } var req = {}; req.height = parseInt(height); fetch('/api/node/revert_sync', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.result = {key: "Node.revert_sync", value: height, restart: false}; } else { response.text().then(data => { this.error = data; }); } this.revert_height = null; }); } }, created() { this.update(); }, computed: { themes() { return [ { value: false, text: this.$t('node_settings.light') }, { value: true, text: this.$t('node_settings.dark') } ]; } }, watch: { timelord(value, prev) { if(prev != null) { this.set_config("timelord", value, true); } }, open_port(value, prev) { if(prev != null) { this.set_config("Router.open_port", value, true); } }, allow_remote(value, prev) { if(prev != null) { this.set_config("allow_remote", value, true); } }, opencl_device(value, prev) { if(prev != null) { this.set_config("Node.opencl_device_select", value, true, true); this.set_config("opencl.platform", null, true); this.set_config("Node.opencl_device", (value >= 0) ? this.opencl_device_list_relidx[value].index : -1, true); this.set_config("Node.opencl_device_name", (value >= 0) ? this.opencl_device_list_relidx[value].name : null, true); } }, cuda_enable(value, prev) { if(prev != null) { this.set_config("cuda.enable", value, true); } }, farmer_reward_addr(value, prev) { if(prev != "null") { this.set_config("Farmer.reward_addr", value.length ? value : null, true); } }, timelord_reward_addr(value, prev) { if(prev != "null") { this.set_config("TimeLord.reward_addr", value.length ? value : null, true); } }, enable_timelord_reward(value, prev) { if(prev != null) { this.set_config("TimeLord.enable_reward", value, true); } }, verify_timelord_reward(value, prev) { if(prev != null) { this.set_config("Node.verify_vdf_rewards", value, true); } }, harv_num_threads(value, prev) { if(prev != null) { this.set_config("Harvester.num_threads", value, true); } }, recursive_search(value, prev) { if(prev != null) { this.set_config("Harvester.recursive_search", value ? true : false, true); } }, reload_interval(value, prev) { if(prev != null) { this.set_config("Harvester.reload_interval", value, true); } }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } }, '$i18n.locale': async function (newVal, oldVal) { localStorage.setItem('language', newVal); await loadLanguageAsync(newVal); }, '$vuetify.theme.dark': async function (newVal, oldVal) { localStorage.setItem('theme_dark', newVal); } }, template: `
{{ $t('node_settings.gui') }} Node {{ $t('node_settings.reward') }} {{ $t('harvester_settings.harvester') }} {{ $t('harvester_settings.plot_directory') }} {{item}} Remove {{ $t('harvester_settings.add_directory') }} CUDA {{ $t('node_settings.blockchain') }} {{ $t('node_settings.revert') }} Set {{result.key}} to {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('wallet-settings', { data() { return { error: null, result: null, loading: true, tokens: [], new_token_addr: null } }, methods: { update() { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => {this.tokens = data; this.loading = false;}); }, add_token(address) { fetch('/api/wallet/add_token?address=' + address) .then(response => { if(response.ok) { this.update(); this.result = "Added token to whitelist: " + address; } else { response.text().then(data => { this.error = data; }); } }); }, rem_token(address) { fetch('/api/wallet/rem_token?address=' + address) .then(response => { if(response.ok) { this.update(); this.result = "Removed token from whitelist: " + address; } else { response.text().then(data => { this.error = data; }); } }); } }, created() { this.update(); }, watch: { result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, // TODO: i18n template: `
{{ $t('wallet_settings.token_whitelist') }} {{ $t('wallet_settings.name') }} {{ $t('wallet_settings.symbol') }} {{ $t('wallet_settings.contract') }} {{ $t('wallet_settings.add_token') }} {{result}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('build-version', { data() { return { version: null, commit: null } }, methods: { update() { fetch('/wapi/config/get?key=build') .then(response => response.json()) .then(data => { this.version = data.version; this.commit = data.commit; }); }, }, created() { this.update(); }, template: `
{{ $t('build_version.build') }} {{ $t('build_version.version') }} {{ this.version }} {{ $t('build_version.commit') }} {{ this.commit }}
` }) ================================================ FILE: www/web-gui/public/swap.js ================================================ Vue.component('swap-menu', { props: { loading: false }, data() { return { tokens: [], token: null, currency: null } }, methods: { update() { this.loading = true; fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => { this.tokens = data; this.loading = false; }); }, submit() { this.$router.push('/swap/market/' + this.token + '/' + this.currency).catch(()=>{}); } }, created() { this.update(); this.submit(); }, watch: { token() { this.submit(); }, currency() { this.submit(); } }, computed: { selectItems() { var result = []; result.push({ text: this.$t('market_menu.anything'), value: null}); this.tokens.map(item => { var text = item.symbol; if(item.currency != MMX_ADDR) { text += ` - [${item.currency}]`; } result.push( { text: text, value: item.currency } ); }); return result; } }, template: `
` }) Vue.component('swap-list', { props: { token: null, currency: null, limit: Number }, data() { return { data: null, offer: {}, tokens: null, timer: null, loading: false, } }, methods: { update() { if(this.tokens) { this.loading = true; let query = '/wapi/swap/list?limit=' + this.limit; if(this.token) { query += '&token=' + this.token; } if(this.currency) { query += '¤cy=' + this.currency; } fetch(query) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); } else { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => { this.tokens = new Set(); for(const token of data) { this.tokens.add(token.currency); } this.update(); }); } } }, watch: { token() { this.update(); }, currency() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('swap-sub-menu', { props: { address: String }, template: ` {{ $t('swap.trade') }} {{ $t('swap.history') }} {{ $t('swap.my_liquidity') }} {{ $t('swap.pool_state') }} ` }) Vue.component('swap-info', { props: { address: String }, data() { return { data: null, timer: null, loading: true, } }, methods: { update() { fetch('/wapi/swap/info?id=' + this.address) .then(response => response.json()) .then(data => { this.data = data; this.loading = false; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 5000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('swap.pool_balance') }} {{ $t('swap.volume') }} ({{ $t('swap.24h') }}) {{ $t('swap.volume') }} ({{ $t('swap.7d') }}) {{ $t('swap.apy') }} ({{ $t('swap.24h') }}) {{ $t('swap.apy') }} ({{ $t('swap.7d') }})
` }) Vue.component('swap-pool-info', { props: { address: String }, data() { return { data: null, timer: null, loading: true, } }, methods: { update() { fetch('/wapi/swap/info?id=' + this.address) .then(response => response.json()) .then(data => { this.data = data; this.loading = false; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('swap.fee_level') }} {{ $t('common.balance') }} {{ $t('common.balance') }} Price {{ $t('swap.user_total') }} {{ $t('swap.user_total') }}
` }) Vue.component('swap-user-info', { props: { address: String, user: String }, emits: [ "user-update" ], data() { return { data: null, timer: null, loading: true } }, methods: { update() { fetch('/wapi/swap/user_info?id=' + this.address + "&user=" + this.user) .then(response => response.json()) .then(data => { this.data = data; this.loading = false; this.$emit('user-update', data); }); } }, watch: { user(value) { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('swap.my_balance') }} {{ $t('swap.my_liquidity') }} {{ $t('swap.fees_earned') }} {{ $t('swap.fee_level') }} {{ $t('swap.unlock_height') }}
` }) Vue.component('swap-history', { props: { address: String, limit: Number }, data() { return { data: [], color_map: new Map([ ["BUY", "green"], ["SELL", "red"], ]), loading: true, } }, computed: { headers() { return [ { text: this.$t('common.height'), value: 'height' }, { text: this.$t('common.type'), value: 'type' }, { text: this.$t('common.amount'), value: 'value' }, { text: this.$t('common.symbol'), value: 'symbol' }, { text: this.$t('common.user'), value: 'user' }, { text: this.$t('common.link'), value: 'txid' }, { text: this.$t('common.time'), value: 'time' }, ] } }, methods: { update() { fetch('/wapi/swap/history?id=' + this.address + '&limit=' + this.limit) .then(response => response.json()) .then(data => { this.data = data; this.loading = false; }); }, }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('swap-trade', { props: { address: String, wallet: null }, data() { return { data: null, buy_fee: null, buy_price: null, buy_amount: null, buy_balance: null, buy_estimate: null, buy_num_iter: 5, buy_slippage: 0.98, buy_tx_fee_ratio: null, buy_tx_fee_amount: null, sell_fee: null, sell_price: null, sell_amount: null, sell_balance: null, sell_estimate: null, sell_num_iter: 5, sell_slippage: 0.98, sell_tx_fee_ratio: null, sell_tx_fee_amount: null, result: null, error: null, num_iter_items: [1, 5, 20, 100], slippage_items: [ {text: "0.5 %", value: 0.995}, {text: "1 %", value: 0.99}, {text: "2 %", value: 0.98}, {text: "5 %", value: 0.95}, {text: "10 %", value: 0.9}, ], } }, methods: { update() { fetch('/wapi/swap/info?id=' + this.address) .then(response => response.json()) .then(data => { this.data = data; this.update_wallet(); }); }, update_wallet() { fetch('/wapi/wallet/balance?index=' + this.wallet + '¤cy=' + this.data.tokens[0]) .then(response => response.json()) .then(data => this.sell_balance = data ? data.spendable : 0); fetch('/wapi/wallet/balance?index=' + this.wallet + '¤cy=' + this.data.tokens[1]) .then(response => response.json()) .then(data => this.buy_balance = data ? data.spendable : 0); }, submit(index, amount, min_trade, num_iter, fee_ratio, estimate = false) { const req = {}; req.wallet = this.wallet; req.address = this.address; req.index = index; req.amount = amount; req.min_trade = min_trade; req.num_iter = num_iter; req.options = {}; if(fee_ratio) { req.options.fee_ratio = fee_ratio; } if(estimate) { req.options.auto_send = false; } fetch('/wapi/wallet/swap/trade', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => { if(estimate) { if(index == 1) { this.buy_tx_fee_amount = data.exec_result.total_fee_value; } else { this.sell_tx_fee_amount = data.exec_result.total_fee_value; } } else { this.result = data; this.error = null; } }); } else if(!estimate) { response.text().then(data => { this.result = null; this.error = data; }); } }); if(!estimate) { if(index == 1) { this.buy_amount = null; } else { this.sell_amount = null; } } }, submit_buy(estimate = false) { this.submit(1, this.buy_amount, this.buy_estimate * this.buy_slippage, this.buy_num_iter, this.buy_tx_fee_ratio, estimate); }, submit_sell(estimate = false) { this.submit(0, this.sell_amount, this.sell_estimate * this.sell_slippage, this.sell_num_iter, this.sell_tx_fee_ratio, estimate); }, update_buy_estimate() { this.buy_fee = null; this.buy_price = null; this.buy_estimate = null; if(this.is_valid_buy()) { fetch('/wapi/swap/trade_estimate?id=' + this.address + '&index=1&amount=' + this.buy_amount + '&iters=' + this.buy_num_iter) .then(response => response.json()) .then(data => { this.buy_fee = data.fee_percent.toFixed(2); this.buy_price = parseFloat((1 / data.avg_price).toPrecision(6)); this.buy_estimate = data.trade.value; }); this.submit_buy(true); } else { this.buy_tx_fee_amount = null; } }, update_sell_estimate() { this.sell_fee = null; this.sell_price = null; this.sell_estimate = null; if(this.is_valid_sell()) { fetch('/wapi/swap/trade_estimate?id=' + this.address + '&index=0&amount=' + this.sell_amount + '&iters=' + this.sell_num_iter) .then(response => response.json()) .then(data => { this.sell_fee = data.fee_percent.toFixed(2); this.sell_price = parseFloat(data.avg_price.toPrecision(6)); this.sell_estimate = data.trade.value; }); this.submit_sell(true); } else { this.sell_tx_fee_amount = null; } }, is_valid_buy_amount(value) { return value < this.buy_balance ? true : "insufficient funds"; }, is_valid_sell_amount(value) { return value < this.sell_balance ? true : "insufficient funds"; }, is_valid_buy() { return this.buy_amount > 0 && this.buy_amount <= this.buy_balance; }, is_valid_sell() { return this.sell_amount > 0 && this.sell_amount <= this.sell_balance; } }, watch: { wallet() { if(this.data) { this.update_wallet(); } }, buy_amount() { this.update_buy_estimate(); }, buy_num_iter() { this.update_buy_estimate(); }, buy_tx_fee_ratio() { this.update_buy_estimate(); }, sell_amount() { this.update_sell_estimate(); }, sell_num_iter() { this.update_sell_estimate(); }, sell_tx_fee_ratio() { this.update_sell_estimate(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
Update {{ $t('swap.buy') }} Update {{ $t('swap.sell') }} {{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('swap-liquid', { props: { address: String, wallet: null }, data() { return { data: null, paid: false, user: null, user_address: null, pool_idx: -1, amount_0: null, amount_1: null, balance_0: null, balance_1: null, fee_ratio: 1024, price: null, result: null, error: null, loading: true, } }, methods: { update() { if(this.wallet != null) { this.update_user(); } fetch('/wapi/swap/info?id=' + this.address) .then(response => response.json()) .then(data => { this.data = data; this.loading = false; this.update_wallet(); }); }, update_wallet() { if(!this.data) { return; } fetch('/wapi/wallet/balance?index=' + this.wallet + '¤cy=' + this.data.tokens[0]) .then(response => response.json()) .then(data => this.balance_0 = data ? data.spendable : 0); fetch('/wapi/wallet/balance?index=' + this.wallet + '¤cy=' + this.data.tokens[1]) .then(response => response.json()) .then(data => this.balance_1 = data ? data.spendable : 0); }, update_user() { fetch('/wapi/wallet/address?index=' + this.wallet) .then(response => response.json()) .then(data => this.user_address = data); this.update_wallet(); }, update_price() { if(this.amount_0 && this.amount_1) { this.price = (this.amount_1 / this.amount_0).toPrecision(6); } else { this.price = null; } }, match() { if(this.amount_0 && !this.amount_1) { this.amount_1 = parseFloat((this.amount_0 * this.data.price).toFixed(this.data.decimals[1])); } else if(!this.amount_0 && this.amount_1) { this.amount_0 = parseFloat((this.amount_1 / this.data.price).toFixed(this.data.decimals[0])); } }, on_response(response, type) { if(response.ok) { response.json().then(data => { this.result = data; this.error = null; if(type == "payout") { this.paid = true; } }); } else { response.text().then(data => { this.result = null; this.error = data; }); } }, submit(mode) { const req = {options: {}}; req.index = this.wallet; req.address = this.address; req.pool_idx = this.pool_idx; req.amount = [this.amount_0, this.amount_1]; req.options.fee_ratio = this.fee_ratio; fetch('/wapi/wallet/swap/' + (mode ? "add" : "rem") + "_liquid", {body: JSON.stringify(req), method: "post"}) .then(response => this.on_response(response)); this.amount_0 = null; this.amount_1 = null; }, payout() { const req = {options: {}}; req.index = this.wallet; req.address = this.address; req.options.fee_ratio = this.fee_ratio; fetch('/wapi/wallet/swap/payout', {body: JSON.stringify(req), method: "post"}) .then(response => this.on_response(response, "payout")); }, switch_pool() { const req = {options: {}}; req.index = this.wallet; req.address = this.address; req.pool_idx = this.pool_idx; req.options.fee_ratio = this.fee_ratio; fetch('/wapi/wallet/swap/switch_pool', {body: JSON.stringify(req), method: "post"}) .then(response => this.on_response(response, "switch_pool")); }, rem_all_liquid() { const req = {options: {}}; req.index = this.wallet; req.address = this.address; req.options.fee_ratio = this.fee_ratio; fetch('/wapi/wallet/swap/rem_all_liquid', {body: JSON.stringify(req), method: "post"}) .then(response => this.on_response(response, "rem_all_liquid")); } }, watch: { data(value) { var fee_rates = []; for(let i = 0; i < value.fee_rates.length; ++i) { fee_rates.push({text: (value.fee_rates[i] * 100).toFixed(2) + " %", value: i}); } this.fee_rates = fee_rates; }, user(value) { if(value && this.pool_idx < 0 && value.pool_idx >= 0) { this.pool_idx = value.pool_idx; } }, wallet() { this.paid = false; this.pool_idx = -1; this.update_user(); }, amount_0() { this.update_price(); }, amount_1() { this.update_price(); } }, computed: { disable_add_rem() { return !(this.amount_0 || this.amount_1) || this.pool_idx < 0; }, disable_add() { return (this.user.pool_idx >= 0 && this.pool_idx != this.user.pool_idx && (this.user.balance[0].amount != 0 || this.user.balance[1].amount != 0)); }, disable_payout() { return !this.user || this.paid || !(this.user.fees_earned[0].amount != 0 || this.user.fees_earned[1].amount != 0); }, disable_switch() { return this.pool_idx < 0 || this.user.pool_idx < 0 || this.pool_idx == this.user.pool_idx || (this.user && this.user.balance[0].amount == 0 && this.user.balance[1].amount == 0); }, disable_rem_all() { return this.amount_0 || this.amount_1 || !this.user || !(this.user.balance[0].amount != 0 || this.user.balance[1].amount != 0); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 30000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('swap.payout') }} {{ $t('swap.switch_fee') }} {{ $t('swap.price_match') }} {{ $t('swap.add_liquidity') }} {{ $t('swap.remove_iquidity') }} {{ $t('swap.remove_all') }} {{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) ================================================ FILE: www/web-gui/public/vue-plotly.js ================================================ const eventsName = [ "AfterExport", "AfterPlot", "Animated", "AnimatingFrame", "AnimationInterrupted", "AutoSize", "BeforeExport", "ButtonClicked", "Click", "ClickAnnotation", "Deselect", "DoubleClick", "Framework", "Hover", "LegendClick", "LegendDoubleClick", "Relayout", "Restyle", "Redraw", "Selected", "Selecting", "SliderChange", "SliderEnd", "SliderStart", "Transitioning", "TransitionInterrupted", "Unhover" ]; const eventsP = eventsName .map(evt => evt.toLocaleLowerCase()) .map(eventName => ({ completeName: "plotly_" + eventName, handler: context => (...args) => { context.$emit.apply(context, [eventName, ...args]); } })); const plotlyFunctions = ["restyle", "relayout", "update", "addTraces", "deleteTraces", "moveTraces", "extendTraces", "prependTraces", "purge"]; const methods = plotlyFunctions.reduce((all, functionName) => { all[functionName] = function(...args) { return Plotly[functionName].apply(Plotly, [this.$el, ...args]); }; return all; }, {}); function cached(fn) { const cache = Object.create(null); return function cachedFn(str) { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; } const regex = /-(\w)/g; const camelizeP = cached(str => str.replace(regex, (_, c) => (c ? c.toUpperCase() : ""))); const darkTemplate = { "data": { "barpolar": [ { "marker": { "line": { "color": "rgb(30,30,30)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "bar": [ { "error_x": { "color": "#f2f5fa" }, "error_y": { "color": "#f2f5fa" }, "marker": { "line": { "color": "rgb(30,30,30)", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "baxis": { "endlinecolor": "#A2B1C6", "gridcolor": "#506784", "linecolor": "#506784", "minorgridcolor": "#506784", "startlinecolor": "#A2B1C6" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "contour" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "heatmapgl" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "heatmap" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "histogram2dcontour" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "histogram2d" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "line": { "color": "#283442" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatter": [ { "marker": { "line": { "color": "#283442" } }, "type": "scatter" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#506784" }, "line": { "color": "rgb(30,30,30)" } }, "header": { "fill": { "color": "#2a3f5f" }, "line": { "color": "rgb(30,30,30)" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#f2f5fa", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ], "sequentialminus": [ [ 0.0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1.0, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#f2f5fa" }, "geo": { "bgcolor": "rgb(30,30,30)", "lakecolor": "rgb(30,30,30)", "landcolor": "rgb(30,30,30)", "showlakes": true, "showland": true, "subunitcolor": "#506784" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "dark" }, "paper_bgcolor": "rgb(30,30,30)", "plot_bgcolor": "rgb(30,30,30)", "polar": { "angularaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(30,30,30)", "radialaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "rgb(30,30,30)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "yaxis": { "backgroundcolor": "rgb(30,30,30)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" }, "zaxis": { "backgroundcolor": "rgb(30,30,30)", "gridcolor": "#506784", "gridwidth": 2, "linecolor": "#506784", "showbackground": true, "ticks": "", "zerolinecolor": "#C8D4E3" } }, "shapedefaults": { "line": { "color": "#f2f5fa" } }, "sliderdefaults": { "bgcolor": "#C8D4E3", "bordercolor": "rgb(30,30,30)", "borderwidth": 1, "tickwidth": 0 }, "ternary": { "aaxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "baxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" }, "bgcolor": "rgb(30,30,30)", "caxis": { "gridcolor": "#506784", "linecolor": "#506784", "ticks": "" } }, "updatemenudefaults": { "bgcolor": "#506784", "borderwidth": 0 }, "xaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "#283442", "linecolor": "#506784", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "#283442", "zerolinewidth": 2 } } } Vue.component('vue-plotly', { inheritAttrs: false, props: { data: { type: Array }, layout: { type: Object }, id: { type: String, required: false, default: null } }, data() { return { scheduled: null, innerLayout: { ...this.layout } }; }, mounted() { this.innerLayout = { ...this.layout, template: this.template }; Plotly.newPlot(this.$el, this.data, this.innerLayout, this.options); eventsP.forEach(evt => { this.$el.on(evt.completeName, evt.handler(this)); }); }, watch: { data: { handler() { this.schedule({ replot: true }); }, deep: true }, options: { handler(value, old) { if (JSON.stringify(value) === JSON.stringify(old)) { return; } this.schedule({ replot: true }); }, deep: true }, layout(layout) { this.innerLayout = { ...layout, template: this.template }; this.schedule({ replot: false }); } }, computed: { template() { return this.$vuetify.theme.dark? darkTemplate : null; }, options() { const optionsFromAttrs = Object.keys(this.$attrs).reduce((acc, key) => { acc[camelizeP(key)] = this.$attrs[key]; return acc; }, {}); return { responsive: false, ...optionsFromAttrs }; } }, beforeDestroy() { eventsP.forEach(event => this.$el.removeAllListeners(event.completeName)); Plotly.purge(this.$el); }, methods: { ...methods, onResize() { Plotly.Plots.resize(this.$el); }, schedule(context) { const { scheduled } = this; if (scheduled) { scheduled.replot = scheduled.replot || context.replot; return; } this.scheduled = context; this.$nextTick(() => { const { scheduled: { replot } } = this; this.scheduled = null; if (replot) { this.react(); return; } this.relayout(this.innerLayout); }); }, toImage(options) { const allOptions = Object.assign(this.getPrintOptions(), options); return Plotly.toImage(this.$el, allOptions); }, downloadImage(options) { const filename = `plot--${new Date().toISOString()}`; const allOptions = Object.assign(this.getPrintOptions(), { filename }, options); return Plotly.downloadImage(this.$el, allOptions); }, getPrintOptions() { const { $el } = this; return { format: "png", width: $el.clientWidth, height: $el.clientHeight }; }, react() { Plotly.react(this.$el, this.data, this.innerLayout, this.options); } }, template: `
` }) ================================================ FILE: www/web-gui/public/wallet.js ================================================ Vue.component('wallet-summary', { data() { return { data: null, loading: false } }, methods: { update() { this.loading = true; fetch('/wapi/wallet/accounts') .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }) } }, created() { this.update(); }, template: `
{{ $t('wallet_summary.new_wallet') }}
` }) Vue.component('account-menu', { props: { index: Number }, template: ` {{ $t('account_menu.balance') }} {{ $t('account_menu.nfts') }} {{ $t('account_menu.contracts') }} {{ $t('account_menu.send') }} {{ $t('account_menu.history') }} {{ $t('account_menu.log') }} {{ $t('account_menu.offer') }} {{ $t('account_menu.liquidity') }} PlotNFTs {{ $t('account_menu.info') }} mdi-cog ` }) Vue.component('account-header', { props: { index: Number, account: Object }, data() { return { info: { name: null, index: null, address: null, with_passphrase: null }, is_locked: null, passphrase_dialog: false } }, computed: { address() { return this.info.address ? this.info.address : "N/A"; } }, methods: { update() { if(this.account) { this.info = this.account; } else { fetch('/wapi/wallet/account?index=' + this.index) .then(response => response.json()) .then(data => this.info = data); } this.update_lock(); }, update_lock() { fetch('/api/wallet/is_locked?index=' + this.index) .then(response => response.json()) .then(data => this.is_locked = data); }, toggle_lock() { if(this.is_locked) { this.passphrase_dialog = true; } else { const req = {}; req.index = this.index; fetch('/api/wallet/lock', {body: JSON.stringify(req), method: "post"}) .then(() => this.update_lock()); } }, unlock(passphrase) { const req = {}; req.index = this.index; req.passphrase = passphrase; fetch('/api/wallet/unlock', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.update(); } else { response.text().then(data => { alert(data); }); } }); }, copyToClipboard(address) { navigator.clipboard.writeText(address); } }, created() { this.update(); this.timer = setInterval(() => { this.update_lock(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('account_header.wallet') }} #{{index}} {{info.name}} {{ is_locked ? "mdi-lock" : "mdi-lock-open-variant" }}
` }) Vue.component('account-summary', { props: { index: Number, account: Object }, template: ` ` }) Vue.component('account-balance', { props: { index: Number, }, data() { return { data: [], loaded: false, timer: null } }, computed: { headers() { return [ { text: this.$t('account_balance.balance'), value: 'total' }, { text: this.$t('account_balance.reserved'), value: 'reserved' }, { text: this.$t('account_balance.spendable'), value: 'spendable' }, { text: this.$t('account_balance.token'), value: 'token' }, { text: this.$t('account_balance.contract'), value: 'contract', width: '50%' }, ] } }, methods: { update() { fetch('/wapi/wallet/balance?index=' + this.index) .then(response => response.json()) .then(data => { this.loaded = true; this.data = data.balances; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('balance-table', { props: { address: String, show_empty: Boolean }, data() { return { data: [], loading: false, loaded: false, timer: null } }, computed: { headers() { return [ { text: this.$t('balance_table.balance'), value: 'total'}, { text: this.$t('balance_table.locked'), value: 'locked'}, { text: this.$t('balance_table.spendable'), value: 'spendable'}, { text: this.$t('balance_table.token'), value: 'symbol'}, { text: this.$t('balance_table.contract'), value: 'contract', width: '50%'}, ] } }, methods: { update() { this.loading = true; fetch('/wapi/balance?id=' + this.address) .then(response => response.json()) .then(data => { this.loading = false; this.loaded = true; this.data = data.balances; }); } }, watch: { address() { this.update(); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('nft-table', { props: { index: Number }, data() { return { nfts: [] } }, computed: { headers() { return [ { text: 'NFT', value: 'item' }, ] } }, methods: { update() { fetch('/wapi/wallet/balance?index=' + this.index) .then(response => response.json()) .then(data => this.nfts = data.nfts); } }, created() { this.update() }, template: ` ` }) Vue.component('account-history', { props: { index: Number, limit: Number, memo: { default: null, type: String }, type: { default: null, type: String }, currency: { default: null, type: String } }, data() { return { data: [], loading: true, timer: null } }, computed: { headers() { return [ { text: this.$t('account_history.height'), value: 'height' }, { text: this.$t('account_history.type'), value: 'type' }, { text: this.$t('account_history.amount'), value: 'value' }, { text: this.$t('account_history.token'), value: 'token' }, { text: this.$t('account_history.address'), value: 'address' }, { text: "Memo", value: 'memo' }, { text: this.$t('account_history.link'), value: 'link' }, { text: this.$t('account_history.time'), value: 'time' }, ] } }, methods: { update(reload) { if(reload) { this.data = []; this.loading = true; } fetch('/wapi/wallet/history?limit=' + this.limit + '&index=' + this.index + '&type=' + this.type + '&memo=' + this.memo + '¤cy=' + this.currency) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); } }, watch: { type() { this.update(true); }, currency() { this.update(true); }, memo() { this.update(false); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('account-history-form', { props: { index: Number, limit: Number }, data() { return { type: null, currency: null, memo: null, tokens: [] } }, methods: { update() { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => this.tokens = data); } }, computed: { select_types() { return [ {text: this.$t('account_history_form.any'), value: null}, {text: this.$t('account_history_form.spend'), value: "SPEND"}, {text: this.$t('account_history_form.receive'), value: "RECEIVE"}, {text: this.$t('account_history_form.reward'), value: "REWARD"}, {text: "VDF " + this.$t('account_history_form.reward'), value: "VDF_REWARD"}, {text: this.$t('account_history_form.tx_fee'), value: "TXFEE"} ]; }, select_tokens() { const res = [{text: this.$t('account_history_form.any'), value: null}]; for(const token of this.tokens) { let text = token.symbol; if(!token.is_native) { text += " - [" + token.currency + "]"; } res.push({text: text, value: token.currency}); } return res; } }, created() { this.update(); }, template: `
` }) Vue.component('account-tx-history', { props: { index: Number, limit: Number }, data() { return { data: [], loading: true, timer: null } }, computed: { headers() { return [ { text: this.$t('account_tx_history.height'), value: 'height' }, { text: "Type", value: 'note' }, { text: "Fee", value: 'fee' }, { text: this.$t('account_tx_history.confirmed'), value: 'confirmed' }, { text: this.$t('account_tx_history.status'), value: 'state' }, { text: this.$t('account_tx_history.transaction_id'), value: 'transaction_id' }, { text: this.$t('account_tx_history.time'), value: 'time' }, ] } }, methods: { update() { fetch('/wapi/wallet/tx_history?limit=' + this.limit + '&index=' + this.index) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` }) Vue.component('account-contract-summary', { props: { index: Number, address: String, contract: Object }, methods: { deposit() { this.$router.push("/wallet/account/" + this.index + "/send/" + this.address); }, withdraw() { this.$router.push("/wallet/account/" + this.index + "/send_from/" + this.address); } }, template: ` {{contract.__type}} {{address}}
{{ $t('account_contract_summary.deposit') }} {{ $t('account_contract_summary.withdraw') }}
` }) Vue.component('account-contracts', { props: { index: Number }, data() { return { data: null, loading: false, contractFilter: [], contractFilterValues: [] } }, methods: { update() { this.loading = true; fetch('/wapi/wallet/contracts?index=' + this.index) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; this.contractFilter = Array.from(Array(data.length).keys()) this.contractFilterValues = data.map(item => item.__type).filter((value, index, self) => self.indexOf(value) === index) }); } }, created() { this.update(); }, computed: { selectedContractFilterValues() { return this.contractFilterValues.filter((value, index, self) => this.contractFilter.some( i => i === index) ); }, filteredData() { if(this.data) { return this.data.filter( (item, index, self) => this.selectedContractFilterValues.some( r => item.__type == r) ); } return null; } }, template: ` {{item}} ` }) Vue.component('account-liquid', { props: { index: Number, limit: Number }, data() { return { data: [], loading: true, } }, computed: { headers() { return [ { text: this.$t('common.balance'), value: 'balance' }, { text: this.$t('common.symbol'), value: 'symbol' }, { text: this.$t('common.address'), value: 'address' }, { text: "", value: 'actions' }, ] } }, methods: { update() { fetch('/wapi/wallet/swap/liquid?index=' + this.index) .then(response => response.json()) .then(data => { this.loading = false; this.data = data; }); }, }, created() { this.update() }, template: `
` }) Vue.component('account-details', { props: { index: Number }, data() { return { account: null, addresses: null, keys: null } }, methods: { update() { fetch('/wapi/wallet/account?index=' + this.index) .then(response => response.json()) .then(data => { delete data.is_hidden; this.account = data; }); fetch('/wapi/wallet/address?index=' + this.index + '&limit=1000') .then(response => response.json()) .then(data => this.addresses = data); fetch('/wapi/wallet/keys?index=' + this.index) .then(response => response.json()) .then(data => this.keys = data); }, copyKeysToPlotter() { window.mmx.copyKeysToPlotter(JSON.stringify(this.keys)) } }, created() { this.update(); }, template: `
{{ $t('account_details.copy_keys_to_plotter') }} IndexAddress {{index}} {{address}}
` }) Vue.component('account-actions', { props: { index: Number }, data() { return { account: null, seed: null, info: null, name: null, num_addresses: null, error: null, seed_dialog: false, remove_dialog: false } }, methods: { update() { fetch('/wapi/wallet/account?index=' + this.index) .then(response => response.json()) .then(data => { this.account = data; this.name = data.name; this.num_addresses = data.num_addresses; }); }, reset_cache() { const req = {}; req.index = this.index; fetch('/api/wallet/reset_cache', {body: JSON.stringify(req), method: "post"}) .then(res => this.on_response(res)); }, update_config() { if(this.num_addresses != this.account.num_addresses) { fetch('/api/wallet/set_address_count?index=' + this.index + "&count=" + this.num_addresses) .then(res => this.on_response(res)); } }, show_seed() { fetch('/wapi/wallet/seed?index=' + this.index) .then(response => response.json()) .then(data => { this.seed = data; this.seed_dialog = true; }); }, remove() { fetch('/api/wallet/remove_account?index=' + this.index + "&account=" + this.account.index) .then(response => { if(response.ok) this.$router.push('/wallet/'); }); }, on_response(res) { if(res.ok) { this.info = "Success"; this.error = null; } else { res.text().then(data => { this.info = null; this.error = data; }); } }, copyToClipboard(value) { navigator.clipboard.writeText(value).then(() => {}); } }, created() { this.update(); }, template: `
Update {{ $t('account_actions.reset_cache') }} {{info}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('create-account', { props: { index: Number }, data() { return { data: null, name: null, offset: null, num_addresses: 1, error: null } }, methods: { update() { fetch('/wapi/wallet/account?index=' + this.index) .then(response => response.json()) .then(data => this.data = data); }, submit() { if(this.offset < 1) { this.error = "'Account Index' cannot be less than 1"; return; } const req = {}; req.config = {}; req.config.name = this.name; req.config.index = this.offset; req.config.key_file = this.data.key_file; req.config.num_addresses = this.num_addresses; fetch('/api/wallet/create_account', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.$router.push('/wallet/'); } else { response.text().then(data => { this.error = data; }); } }); } }, created() { this.update(); }, template: `
{{ $t('create_account.create_account') }} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('create-wallet', { data() { return { name: null, num_addresses: 1, with_seed: false, with_passphrase: false, seed: null, passphrase: null, finger_print: null, error: null, show_passphrase: false } }, methods: { submit() { const req = {}; req.config = {}; req.config.name = this.name; req.config.num_addresses = this.num_addresses; if(this.with_seed) { req.words = this.seed; } if(this.with_passphrase) { req.passphrase = this.passphrase; } fetch('/api/wallet/create_wallet', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.$router.push('/wallet/'); } else { response.text().then(data => { this.error = data; }); } }); }, validate() { if(this.with_seed && this.with_passphrase && this.finger_print) { const req = {}; req.words = this.seed; req.finger_print = this.finger_print; req.passphrase = this.passphrase; fetch('/wapi/passphrase/validate', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.submit(); } else { this.error = "Wrong passphrase!"; } }); } else { this.submit(); } } }, template: `
{{$t('create_wallet.seed_words')}} {{ $t('create_wallet.create_wallet') }} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('passphrase-dialog', { props: { show: Boolean }, data() { return { passphrase: null, show_passphrase: false } }, model: { prop: 'show', event: 'close' }, methods: { onSubmit() { this.$emit('submit', this.passphrase); this.passphrase = null; this.onClose(); }, onClose() { this.show = false this.$emit('close'); } }, template: ` ` }) Vue.component('account-send-form', { props: { index: Number, target_: String, // fixed destination address (optional) source_: String, // withdraw from contract (optional) }, data() { return { accounts: [], balances: [], amount: null, target: null, source: null, memo: null, address: "", currency: null, fee_ratio: 1024, fee_amount: null, confirmed: false, result: null, error: null, passphrase_dialog: false } }, methods: { update() { fetch('/wapi/wallet/accounts') .then(response => response.json()) .then(data => this.accounts = data); if(this.source) { fetch('/wapi/address?id=' + this.source) .then(response => response.json()) .then(data => this.balances = data.balances); } else { fetch('/wapi/wallet/balance?index=' + this.index) .then(response => response.json()) .then(data => this.balances = data.balances); } }, async is_locked() { return fetch('/api/wallet/is_locked?index=' + this.index).then(res => res.json()); }, async update_fee() { if(await this.is_locked() || !this.is_valid()) { this.fee_amount = "?"; return; } const req = this.create_request(); req.options.auto_send = false; fetch('/wapi/wallet/send', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(tx => this.fee_amount = tx.exec_result.total_fee_value); } else { this.fee_amount = "?"; } }); }, create_request() { const req = {options: {}}; req.index = this.index; req.amount = this.amount; req.currency = this.currency; if(this.source) { req.src_addr = this.source; } req.dst_addr = this.target; req.options.memo = this.memo ? this.memo : null; req.options.fee_ratio = this.fee_ratio; return req; }, async submit() { if(await this.is_locked()) { this.passphrase_dialog = true; } else { this.submit_ex(null); } }, submit_ex(passphrase) { this.confirmed = false; if(!validate_address(this.target)) { this.error = "invalid destination address"; return; } const req = this.create_request(); req.options.passphrase = passphrase; fetch('/wapi/wallet/send', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => this.result = data); } else { response.text().then(data => this.error = data); } this.update(); this.$refs.balance.update(); this.$refs.history.update(); }); }, memo_rule(value) { if(value && value.length > 64) { return "maximum length is 64"; } return true; }, is_valid() { return this.target && this.currency && validate_amount(this.amount) == true; } }, created() { if(this.source_) { this.source = this.source_; } if(this.target_) { this.address = ""; this.target = this.target_; } this.update(); }, watch: { address(value) { if(value) { this.target = value; } else { this.target = null; } this.confirmed = false; }, target() { this.confirmed = false; }, currency() { this.confirmed = false; }, amount() { this.confirmed = false; }, memo() { this.confirmed = false; }, fee_ratio() { if(this.confirmed) { this.update_fee(); } }, confirmed(value) { if(value) { this.update_fee(); } else { this.fee_amount = null; } }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, computed: { selectAccounts() { var result = []; result.push({ text: this.$t('account_send_form.address_input'), value: ""}); this.accounts.map(item => { result.push( { text: `${this.$t('account_send_form.wallet') } #${item.account} (${item.address})`, value: item.address } ); }); return result; } }, template: `
{{ $t('account_send_form.send') }} {{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('account-offer-form', { props: { index: Number }, data() { return { tokens: [], balances: [], price: null, bid_amount: null, ask_symbol: null, bid_symbol: null, bid_currency: null, ask_currency: null, fee_ratio: 1024, fee_amount: null, confirmed: false, timer: null, result: null, error: null } }, methods: { update() { fetch('/wapi/wallet/tokens') .then(response => response.json()) .then(data => this.tokens = data); fetch('/wapi/wallet/balance?index=' + this.index) .then(response => response.json()) .then(data => this.balances = data.balances); }, update_fee() { if(this.is_valid()) { const req = this.create_request(); req.options.auto_send = false; fetch('/wapi/wallet/make_offer', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(tx => this.fee_amount = tx.exec_result.total_fee_value); } else { this.fee_amount = null; } }); } else { this.fee_amount = null; } }, create_request() { const req = {options: {}}; req.index = this.index; req.bid = this.bid_amount; req.price = this.price; req.bid_currency = this.bid_currency.contract; req.ask_currency = this.ask_currency.currency; req.options.fee_ratio = this.fee_ratio; return req; }, submit() { this.confirmed = false; fetch('/wapi/wallet/make_offer', {body: JSON.stringify(this.create_request()), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => this.result = data); } else { response.text().then(data => this.error = data); } }); }, is_valid() { return this.bid_currency && this.ask_currency && validate_address(this.bid_currency.contract) && validate_address(this.ask_currency.currency) && validate_amount(this.bid_amount) == true && this.price > 0; } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, watch: { price() { this.confirmed = false; }, bid_amount() { this.confirmed = false; }, ask_currency() { this.confirmed = false; }, bid_currency() { this.confirmed = false; }, fee_ratio() { this.update_fee(); }, confirmed(value) { if(value) { this.update_fee(); } }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, template: `
{{ $t('account_offer_form.offer') }} {{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('account-offers', { props: { index: Number }, data() { return { data: [], error: null, result: null, timer: null, state: true, dialog_item: null, dialog_cancel: false, dialog_deposit: false, dialog_withdraw: false, dialog_update: false, deposit_amount: null, new_price: null, fee_amount: null, request: null, request_url: null, canceled: new Set(), withdrawn: new Set() } }, computed: { select_states() { return [ {text: this.$t('account_offers.any'), value: false}, {text: this.$t('account_offers.open'), value: true}, ]; }, }, methods: { update() { fetch('/wapi/wallet/offers?index=' + this.index + '&state=' + this.state) .then(response => response.json()) .then(data => this.data = data.sort((L, R) => R.height - L.height)); }, update_fee() { if(this.request) { const req = this.request; const url = this.request_url; req.options.auto_send = false; fetch(url, {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(tx => this.fee_amount = tx.exec_result.total_fee_value); } else { this.fee_amount = null; } }); } else { this.fee_amount = null; } }, update_fee_ratio(value) { if(this.request) { this.request.options.fee_ratio = value; this.update_fee(); } }, cancel(item) { const args = {options: {}}; args.index = this.index; args.address = item.address; this.request = args; this.request_url = '/wapi/wallet/cancel_offer'; this.update_fee(); this.dialog_item = item; this.dialog_cancel = true; }, withdraw(item) { const args = {options: {}}; args.index = this.index; args.address = item.address; this.request = args; this.request_url = '/wapi/wallet/offer_withdraw'; this.update_fee(); this.dialog_item = item; this.dialog_withdraw = true; }, deposit(item) { const args = {options: {}}; args.index = this.index; args.currency = item.bid_currency; args.dst_addr = item.address; this.request = args; this.request_url = '/wapi/wallet/send'; this.dialog_item = item; this.deposit_amount = null; this.dialog_deposit = true; }, update_price(item) { const args = {options: { user: item.owner }}; args.index = this.index; args.address = item.address; args.method = "set_price"; args.args = [1]; this.request = args; this.request_url = '/wapi/wallet/execute'; this.update_fee(); this.dialog_item = item; this.new_price = null; this.dialog_update = true; }, submit() { const url = this.request_url; const item = this.dialog_item; const req = this.request; req.options.auto_send = true; fetch(url, {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { if(url == '/wapi/wallet/send') { this.canceled.delete(item.address); } if(url == '/wapi/wallet/cancel_offer') { this.canceled.add(item.address); } if(url == '/wapi/wallet/offer_withdraw') { this.withdrawn.add(item.address); } response.json().then(data => { this.result = data; }); } else { response.text().then(data => this.error = data); } }); this.dialog_cancel = false; this.dialog_withdraw = false; this.dialog_deposit = false; this.dialog_update = false; this.request = null; this.request_url = null; this.deposit_amount = null; } }, watch: { state(value) { this.update(); }, index(value) { this.update(); }, deposit_amount(value) { if(this.request) { this.request.amount = value; this.update_fee(); } }, new_price(value) { if(this.request) { const new_price = value * Math.pow(2, 64) * Math.pow(10, this.dialog_item.bid_decimals - this.dialog_item.ask_decimals); this.request.args = [to_string_hex(new_price)]; this.update_fee(); } }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, created() { this.update(); this.timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
{{ $t('account_offers.offering') }} {{ $t('account_offers.received') }} {{ $t('account_offers.price') }} {{item.bid_balance_value}} {{item.bid_symbol}} {{item.ask_balance_value}} {{item.ask_symbol}} {{parseFloat((1/item.display_price).toPrecision(6))}} {{item.bid_symbol}} / {{item.ask_symbol}} TX {{ $t('account_offers.deposit') }} Update {{ $t('common.transaction_has_been_sent') }}: {{result.id}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('create-contract-menu', { props: { index: Number }, data() { return { type: null, types: [ // { value: "virtualplot", text: "mmx.contract.VirtualPlot" }, ] } }, methods: { submit() { this.$router.push("/wallet/account/" + this.index + "/create/" + this.type); } }, template: ` {{ $t('common.create') }} ` }) Vue.component('create-locked-contract', { props: { index: Number }, data() { return { owner: null, unlock_height: null, valid: false, confirmed: false, result: null, error: null } }, methods: { check_valid() { this.valid = validate_address(this.owner) && this.unlock_height; if(!this.valid) { this.confirmed = false; } }, submit() { // TODO }, submit_ex(passphrase) { this.confirmed = false; const contract = {}; contract.__type = "mmx.contract.Executable"; // TODO contract.owner = this.owner; contract.unlock_height = this.unlock_height; const req = {}; req.index = this.index; req.payload = contract; req.options = {passphrase: passphrase}; fetch('/wapi/wallet/deploy', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { response.json().then(data => this.result = data); } else { response.text().then(data => this.error = data); } }); } }, watch: { owner(value) { this.check_valid(); }, unlock_height(value) { this.check_valid(); }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, template: `
{{ $t('common.create') }} mmx.contract.TimeLock
{{ $t('common.deploy') }}
{{ $t('common.deployed_as') }}: {{result}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('create-plotnft', { props: { index: Number }, data() { return { name: null, valid: false, fee_ratio: 1024, confirmed: false, result: null, error: null } }, methods: { check_valid() { this.valid = this.name && this.name.length > 0; if(!this.valid) { this.confirmed = false; } }, submit() { this.submit_ex(null); }, submit_ex(passphrase) { this.confirmed = false; const req = {}; req.index = this.index; req.name = this.name; req.options = { fee_ratio: this.fee_ratio, passphrase: passphrase }; fetch('/api/wallet/plotnft_create', {body: JSON.stringify(req), method: "post"}) .then(response => { if(response.ok) { this.result = this.name; this.name = null; } else { response.text().then(data => this.error = data); } }); } }, computed: { fee_amount() { return parseFloat((0.095 * this.fee_ratio / 1024).toFixed(3)); } }, watch: { name(value) { this.confirmed = false; this.check_valid(); }, result(value) { if(value) { this.error = null; } }, error(value) { if(value) { this.result = null; } } }, template: `
{{ $t('common.create') }} Created new PlotNFT: {{result}} {{ $t('common.failed_with') }}: {{error}}
` }) Vue.component('account-plotnfts', { props: { index: Number }, data() { return { list: [], timer: null, } }, methods: { update() { if(!this.$root.params) { setTimeout(() => { this.update(); }, 500); return; } fetch('/wapi/wallet/contracts?index=' + this.index + '&type_hash=' + this.$root.params.plot_nft_binary + '&owned=true') .then(response => response.json()) .then(data => this.list = data); } }, created() { this.update(); timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: `
` }) Vue.component('plotnft-control', { props: { address: String }, data() { return { data: null, timer: null, } }, methods: { update() { fetch('/wapi/plotnft?id=' + this.address) .then(response => response.json()) .then(data => this.data = data); } }, created() { this.update(); timer = setInterval(() => { this.update(); }, 10000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` {{data.name}} Address {{data.address}} Pool Server {{data.server_url}} N/A (solo farming) Unlock Height {{data.unlock_height}} ` }); Vue.component('wallet-menu', { data() { return { wallets: [], wallet: null, timer: null, } }, emits: [ "wallet-select" ], methods: { update() { fetch('/wapi/wallet/accounts') .then(response => response.json()) .then(data => { this.wallets = data; if(this.wallet == null && data.length) { this.wallet = data[0].account; } }); } }, watch: { wallet(value) { localStorage.setItem('active_wallet', value); this.$emit('wallet-select', value); } }, created() { this.wallet = get_active_wallet(); this.update(); this.timer = setInterval(() => { this.update(); }, 60000); }, beforeDestroy() { clearInterval(this.timer); }, template: ` ` })