MCPcopy Create free account
hub / github.com/QuipNetwork/cpp-sdk / handleGetBalance

Method handleGetBalance

src/cli.cpp:848–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

846}
847
848bool CLI::handleGetBalance(const std::vector<std::string> &args) {
849 if (args.size() != 1) {
850 std::cerr << "Usage: balance <address>" << std::endl;
851 return false;
852 }
853
854 try {
855 Address address = parseAddress(args[0]);
856 auto wallet = createWallet(address);
857 Amount balance = wallet->getBalance();
858 std::cout << "Balance: " << balance << std::endl;
859 return true;
860 } catch (const std::exception &e) {
861 std::cerr << "Error: " << e.what() << std::endl;
862 return false;
863 }
864}
865
866bool CLI::handleGetPqOwner(const std::vector<std::string> &args) {
867 if (args.size() != 1) {

Callers

nothing calls this directly

Calls 1

getBalanceMethod · 0.45

Tested by

no test coverage detected