Skip to content

hyle-team/zano_native_lib

Repository files navigation

  1. Description
  2. Build your project with Zano
  1. Wallet Library API Documentation
  1. Build Zano

Zano Wallet Library (native)

Zano is an open-source layer-1 blockchain where every transaction is private by default. Amounts, addresses, and even asset types are hidden. This is enforced at the protocol level, not opt-in.

This repository provides prebuilt binaries of the Zano core, specifically optimized for developers who need a streamlined integration. It focuses primarily on the Plain Wallet API, a simplified interface that abstracts the complexities of the protocol into easy-to-use functions.

Currently available for:

  • ios (arm64, x86_64),
  • android (arm64-v8a, armeabi-v7a, x86, x86_64),
  • linux (arm64, x86_64),
  • windows (arm64, x86_64),
  • macosx (arm64, x86_64)

Build your project with Zano

Artifacts folders structure

This repository provides Zano artifacts:

  • ios:
    • ./_install_ios/lib/libzano-plain-wallet.xcframework - contains all the neccesary dependencies inside (Boost and OpenSSL)
    • ./_install_ios/lib/libzano.xcframework
    • ./_install_ios/lib/thirdparty/libboost.xcframework
    • ./_install_ios/lib/thirdparty/libopenssl.xcframework
  • android (ARCH: arm64-v8a, armeabi-v7a, x86, x86_64):
    • ./_install_android/${ARCH}/lib - zano libraries
    • ./_install_android/include-plain-wallet - zano plain wallet includes
    • ./_install_android/include - zano includes
    • ./_libs_android/boost/${ARCH}/lib - boost libraries
    • ./_libs_android/boost/include - boost includes
    • ./_libs_android/openssl/${ARCH}/lib - openssl libraries
    • ./_libs_android/openssl/include - openssl includes
  • macosx:
    • ./_install_macosx/libzano-plain-wallet.xcframework - contains all the neccesary dependencies inside (Boost and OpenSSL)
    • ./_install_macosx/libzano.xcframework
    • ./_install_macosx/libboost.xcframework
    • ./_install_macosx/libopenssl.xcframework
    • ./_install_macosx/libiconv.xcframework
  • linux (ARCH: arm64, x86_64):
    • ./_install_linux/zano/${ARCH}/lib - zano libraries
    • ./_install_linux/zano/${ARCH}/include-plain-wallet - zano plain wallet includes
    • ./_install_linux/zano/${ARCH}/include - zano includes
    • ./_install_linux/boost/${ARCH}/lib - boost libraries
    • ./_install_linux/boost/${ARCH}/include-plain-wallet - boost plain wallet includes
    • ./_install_linux/boost/${ARCH}/include - boost includes
    • ./_install_linux/openssl/${ARCH}/lib - openssl libraries
    • ./_install_linux/openssl/${ARCH}/include-plain-wallet - openssl plain wallet includes
    • ./_install_linux/openssl/${ARCH}/include - openssl includes
    • ./_install_linux/iconv/${ARCH}/lib - iconv libraries
    • ./_install_linux/iconv/${ARCH}/include-plain-wallet - iconv plain wallet includes
    • ./_install_linux/iconv/${ARCH}/include - iconv includes
  • windows (ARCH: arm64, x86_64):
    • ./_install_windows/zano/${ARCH}/lib - zano libraries
    • ./_install_windows/zano/${ARCH}/include-plain-wallet - zano plain wallet includes
    • ./_install_windows/zano/${ARCH}/include - zano includes
    • ./_install_windows/boost/${ARCH}/lib - boost libraries
    • ./_install_windows/boost/${ARCH}/include-plain-wallet - boost plain wallet includes
    • ./_install_windows/boost/${ARCH}/include - boost includes
    • ./_install_windows/openssl/${ARCH}/lib - openssl libraries
    • ./_install_windows/openssl/${ARCH}/include-plain-wallet - openssl plain wallet includes
    • ./_install_windows/openssl/${ARCH}/include - openssl includes

iOS

To build your iOS project with Zano use ./_install_ios/lib/libzano-plain-wallet.xcframework (include Zano and it's dependencies and provides only plain wallet api).

If you are using Boost or OpenSSL directly or not using plain_wallet_api you need to use ./_install_ios/lib/libzano.xcframework with Boost and OpenSSL provided separately. This repo also provides them as frameworks:

  • ./_install_ios/lib/thirdparty/libboost.xcframework
  • ./_install_ios/lib/thirdparty/libopenssl.xcframework

Android

To build your Android project with Zano here is what you need to do:

  • include this folder: ./_install_android/include-plain-wallet
  • or, if you need more then plain_wallet_api: ./_install_android/include
  • add this libraries (order matters):
    • ./_install_android/${ARCH}/lib/libcurrency_core.a
    • ./_install_android/${ARCH}/lib/libcommon.a
    • ./_install_android/${ARCH}/lib/libcrypto.a
    • ./_install_android/${ARCH}/lib/libwallet.a
    • ./_install_android/${ARCH}/lib/libz.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_atomic.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_chrono.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_date_time.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_filesystem.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_regex.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_serialization.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_system.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_thread.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_timer.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_program_options.a
    • ./_libs_android/boost/${ARCH}/lib/libboost_wserialization.a
    • ./_libs_android/openssl/${ARCH}/lib/libssl.a
    • ./_libs_android/openssl/${ARCH}/lib/libcrypto.a

Example cmake

include_directories(${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/include-plain-wallet)
target_link_libraries(
  // YOUR TARGET NAME HERE
  ${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/lib/libcurrency_core.a
  ${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/lib/libcommon.a
  ${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/lib/libcrypto.a
  ${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/lib/libwallet.a
  ${ZANO_NATIVE_LIB_PATH}/_install_android/${ANDROID_ABI}/lib/libz.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_atomic.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_chrono.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_date_time.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_filesystem.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_regex.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_serialization.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_system.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_thread.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_timer.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_program_options.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/boost/${ANDROID_ABI}/lib/libboost_wserialization.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/openssl/${ANDROID_ABI}/lib/libssl.a
  ${ZANO_NATIVE_LIB_PATH}/_libs_android/openssl/${ANDROID_ABI}/lib/libcrypto.a
)

MacOSX

To build your MacOSX project with Zano use ./_install_macosx/libzano-plain-wallet.xcframework (include Zano and it's dependencies and provides only plain wallet api).

If you are using Boost or OpenSSL directly or not using plain_wallet_api you need to use ./_install_macosx/libzano.xcframework with Boost and OpenSSL provided separately. This repo also provides them as frameworks:

  • ./_install_macosx/libboost.xcframework
  • ./_install_macosx/libopenssl.xcframework

Linux

To build your Linux project with Zano here is what you need to do:

  • include this folder: ./_install_linux/zano/include-plain-wallet
  • or, if you need more then plain_wallet_api: ./_install_linux/zano/include
  • add this libraries (order matters):
    • ./_install_linux/zano/${ARCH}/lib/libcurrency_core.a
    • ./_install_linux/zano/${ARCH}/lib/libcommon.a
    • ./_install_linux/zano/${ARCH}/lib/libcrypto.a
    • ./_install_linux/zano/${ARCH}/lib/libwallet.a
    • ./_install_linux/zano/${ARCH}/lib/libz.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_atomic.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_chrono.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_date_time.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_filesystem.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_regex.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_serialization.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_system.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_thread.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_timer.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_program_options.a
    • ./_install_linux/boost/${ARCH}/lib/libboost_wserialization.a
    • ./_install_linux/openssl/${ARCH}/lib/libssl.a
    • ./_install_linux/openssl/${ARCH}/lib/libcrypto.a

Example cmake

include_directories(${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/include-plain-wallet)
target_link_libraries(
  // YOUR TARGET NAME HERE
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/lib/libcurrency_core.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/lib/libcommon.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/lib/libcrypto.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/lib/libwallet.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/zano/${ANDROID_ABI}/lib/libz.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_atomic.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_chrono.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_date_time.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_filesystem.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_regex.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_serialization.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_system.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_thread.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_timer.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_program_options.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/boost/${ANDROID_ABI}/lib/libboost_wserialization.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/openssl/${ANDROID_ABI}/lib/libssl.a
  ${ZANO_NATIVE_LIB_PATH}/_install_linux/openssl/${ANDROID_ABI}/lib/libcrypto.a
)

Windows

To build your Windows project with Zano here is what you need to do:

  • include this folder: ./_install_windows/zano/include-plain-wallet
  • or, if you need more then plain_wallet_api: ./_install_windows/zano/include
  • add this libraries:
    • ./_install_windows/zano/${ARCH}/lib/*.lib
    • ./_install_windows/boost/${ARCH}/lib/*.lib
    • ./_install_windows/openssl/${ARCH}/lib/*.lib

Example cmake

include_directories(${ZANO_NATIVE_LIB_PATH}/_install_windows/zano/${ANDROID_ABI}/include-plain-wallet)
file(GLOB LIBZANO_LIBS
  "${ZANO_NATIVE_LIB_PATH}/_install_windows/zano/${ARCH}/lib/*.lib"
  "${ZANO_NATIVE_LIB_PATH}/_install_windows/boost/${ARCH}/lib/*.lib"
  "${ZANO_NATIVE_LIB_PATH}/_install_windows/openssl/${ARCH}/lib/*.lib"
)
target_link_libraries(${PROJECT_NAME} PRIVATE ntdll crypt32 ${LIBZANO_LIBS})

Wallet Library API Documentation

Namespace: plain_wallet

Typedef

  • hwallet
    A type representing a wallet handle, defined as int64_t.

Initialization Functions

  • std::string init(const std::string& address, const std::string& working_dir, int log_level)
    Initializes the wallet using the specified address(http://127.0.0.1:2222), working directory, and log level.

  • std::string init(const std::string& ip, const std::string& port, const std::string& working_dir, int log_level)
    Initializes the wallet using the specified IP address, port, working directory, and log level.

Note: The path that passed to init as working_dir should be available for writing, here is a possible code for iOS/Android: Code for android it use this code (java):

String myString = getReactApplicationContext().getFilesDir().getAbsolutePath();

Code for ios it use this code (objectiveC)

NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *docsDir = [fileManager URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
NSString *strX = [docsDir path];

Utility Functions

  • std::string reset()
    Quicly close all opened wallets(withut saving files).

  • std::string set_log_level(int log_level)
    Sets the log level for the wallet.(default is 0, -1 disabled)

  • std::string get_version()
    Retrieves the version string of the wallet library.
    Returns: 2.0.0.317[2f535f0]

  • std::string get_wallet_files()
    Retrieves list of wallet files contained in app working folder, returned as JSON strings array.
    Response:
{
  "items": [
    "11.newtmp_1723818128",
    "3wetw",
    "te",
    "23",
    "test1",
    "weq",
    "234",
    "11",
    "111",
    "1"
  ]
}



  • std::string get_export_private_info(const std::string& target_dir)
    Retrieves private information and exports it to the specified directory.

  • std::string delete_wallet(const std::string& file_name)
    Deletes the wallet with the specified file name.
    Response:
{
  "id": 0,
  "jsonrpc": "",
  "result": {
    "return_code": "OK"
  }
}



  • std::string get_address_info(const std::string& addr)
    Retrieves information about a specific address, validate it.
    Example: get_address_info("ZxDQxh9WKrzKPAzJLubti7BiidsnrvDNHbwDjAAXPnrtSVX4Mfc51ZiUafLMdMDBL54mp9J25mZxkGjLQxizxzbX1JzGyRbW5")
    Response:
{
  "valid": true,
  "auditable": false,
  "payment_id": false,
  "wrap": false
}



Configuration Functions

  • std::string set_appconfig(const std::string& conf_str, const std::string& encryption_key)
    Sets the application configuration an a free text form (common way to store it in JSON) using the specified configuration string and encryption key. This text is encrypted and stored in application system folder. Might be used to storing list of opened wallet files and it's passwords.

  • std::string get_appconfig(const std::string& encryption_key)
    Retrieves the application configuration using the specified encryption key, used for application level secure config storing.

  • std::string generate_random_key(uint64_t length)
    Generates a random string of the specified length(by using a secure random generation algorithms). Used secure random algorithm.

  • std::string get_logs_buffer()
    Retrieves the logs buffer, userful for debugging.

  • std::string truncate_log()
    Truncates the log file.

  • std::string get_connectivity_status()
    Retrieves the connectivity status.
    Response:

{
  "is_online": true,
  "is_server_busy": false,
  "last_daemon_is_disconnected": false,
  "last_proxy_communicate_timestamp": 1726314483
}


Wallet Management Functions

  • std::string open(const std::string& path, const std::string& password)
    Opens a wallet from the specified path using the provided password, the path is relative to the app wallet home dir. This is synchronous function, recommend to use async form of this call by calling async_api_call('open', 0, {path: "file_name", pass: "password"}); Response:
{
    "id": 0,
    "jsonrpc": "",
    "result": {
        "name": "",
        "pass": "",
        "recent_history": {
            "last_item_index": 0,
            "total_history_items": 0
        },
        "recovered": false,
        "seed": "invite invite invite invite invite invite invite invite invite invite invite invite invite invite invite invite invite invite limb total season behind burden after hour please",
        "wallet_file_size": 597,
        "wallet_id": 1,
        "wallet_local_bc_size": 2809794,
        "wi": {
            "address": "ZxBkXtnk5NA1X7VDdetzUyQsvHtn6E5KfGax32JdGwghabhYYRSpdJnQEdtkvyLHLogoQFXs2MqJTSnHhazLPwf92bXtw4vup",
            "balances": [...],
            "has_bare_unspent_outputs": false,
            "is_auditable": false,
            "is_watch_only": false,
            "mined_total": 0,
            "path": "/data/user/0/com.zano_mobile/files/wallets/1",
            "view_sec_key": "815f67e73733773fa249eb58787b1efbe3cd2c7306fe54834f929de7e0aa1205"
        }
    }
}



  • std::string restore(const std::string& seed, const std::string& path, const std::string& password, const std::string& seed_password)
    Restores a wallet using the provided seed (and seed's password if it's secured seed). Restored wallet saved to path, and encrypted with password.
    Response:
{
  "id": 0,
  "jsonrpc": "",
  "result": {
    "name": "",
    "pass": "",
    "recent_history": {
      "last_item_index": 0,
      "total_history_items": 0
    },
    "recovered": false,
    "seed": "invite invite invite invite invite invite invite invite invite invite terror funny money answer handle inner scream cream limb total season behind burden after hour please",
    "wallet_file_size": 0,
    "wallet_id": 1,
    "wallet_local_bc_size": 0,
    "wi": {
      "address": "ZxBkXtnk5NA1X7VDdetzUyQsvHtn6E5KfGax32JdGwghabhYYRSpdJnQEdtkvyLHLogoQFXs2MqJTSnHhazLPwf92bXtw4vup",
      "balances": [
        {
          "asset_info": {
            "asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
            "current_supply": 0,
            "decimal_point": 12,
            "full_name": "Zano",
            "hidden_supply": false,
            "meta_info": "",
            "owner": "0000000000000000000000000000000000000000000000000000000000000000",
            "ticker": "ZANO",
            "total_max_supply": 0
          },
          "awaiting_in": 0,
          "awaiting_out": 0,
          "total": 0,
          "unlocked": 0
        }
      ],
      "has_bare_unspent_outputs": false,
      "is_auditable": false,
      "is_watch_only": false,
      "mined_total": 0,
      "path": "/data/user/0/com.zano_mobile/files/wallets/11111",
      "view_sec_key": "815f67e73fc1fedfa249eb5878773efbe3cd233306fe54834f929de7e0aa1205"
    }
  }
}



  • std::string generate(const std::string& path, const std::string& password)
    Generates a new wallet at the specified path with the provided password. Response:
{
  "id": 0,
  "jsonrpc": "",
  "result": {
    "name": "",
    "pass": "",
    "recent_history": {
      "last_item_index": 0,
      "total_history_items": 0
    },
    "recovered": false,
    "seed": "invite invite invite invite invite invite invite invite invite invite invite funny money answer handle inner scream cream limb total season behind burden after hour please",
    "wallet_file_size": 0,
    "wallet_id": 0,
    "wallet_local_bc_size": 0,
    "wi": {
      "address": "ZxBkXtnk5NA1X7VDdetzUyQsvHtn6E5KfGax32JdGwghabhYYRSpdJnQEdtkvyLHLogoQFXs2MqJTSnHhazLPwf92bXtw4vup",
      "balances": [
        {
          "asset_info": {
            "asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
            "current_supply": 0,
            "decimal_point": 12,
            "full_name": "Zano",
            "hidden_supply": false,
            "meta_info": "",
            "owner": "0000000000000000000000000000000000000000000000000000000000000000",
            "ticker": "ZANO",
            "total_max_supply": 0
          },
          "awaiting_in": 0,
          "awaiting_out": 0,
          "total": 0,
          "unlocked": 0
        }
      ],
      "has_bare_unspent_outputs": false,
      "is_auditable": false,
      "is_watch_only": false,
      "mined_total": 0,
      "path": "/data/user/0/com.zano_mobile/files/wallets/1",
      "view_sec_key": "815f67e73fc1fedfa249eb58787b1efbe3cd233306fe54834f929de7e0aa1205"
    }
  }
}



  • std::string get_opened_wallets()
    Retrieves list of currently opened wallets with it's handles(wallet_id). Response:
{
  "id": 0,
  "jsonrpc": "",
  "result": [
    {
      "name": "1",
      "pass": "1",
      "recent_history": {
        "last_item_index": 0,
        "total_history_items": 0
      },
      "recovered": false,
      "seed": "",
      "wallet_file_size": 597,
      "wallet_id": 1,
      "wallet_local_bc_size": 2809799,
      "wi": {
        "address": "ZxBkXtnk5NA1X7VDdetzUyQsvHtn6E5KfGax32JdGwghabhYYRSpdJnQEdtkvyLHLogoQFXs2MqJTSnHhazLPwf92bXtw4vup",
        "balances": [
          {
            "asset_info": {
              "asset_id": "d6329b5b1f7c0805b5c345f4957554002a2f557845f64d7645dae0e051a6498a",
              "current_supply": 0,
              "decimal_point": 12,
              "full_name": "Zano",
              "hidden_supply": false,
              "meta_info": "",
              "owner": "0000000000000000000000000000000000000000000000000000000000000000",
              "ticker": "ZANO",
              "total_max_supply": 0
            },
            "awaiting_in": 0,
            "awaiting_out": 0,
            "total": 0,
            "unlocked": 0
          }
        ],
        "has_bare_unspent_outputs": false,
        "is_auditable": false,
        "is_watch_only": false,
        "mined_total": 0,
        "path": "/data/user/0/com.zano_mobile/files/wallets/1",
        "view_sec_key": "815f67e73fc1fedfa249eb58787b1efbe3cd2ccc06fe54834f929de7e0aa1205"
      }
    }
  ]
}



Wallet Operations

  • std::string get_wallet_status(hwallet h)
    Retrieves the status of the wallet with the specified handle. Response:
{
  "current_daemon_height": 2809788,
  "current_wallet_height": 2282031,
  "is_daemon_connected": true,
  "is_in_long_refresh": true,
  "progress": 0,
  "wallet_state": 1
}



  • std::string close_wallet(hwallet h)
    Closes the wallet with the specified handle. This is synchronous function, recommend to use async form of this call by calling async_api_call('close', wallet_id, ''); Response:
{
  "return_code": "OK"
}



  • std::string invoke(hwallet h, const std::string& params)
    Basically invokes an call to the wallet native library by using JSON RPC format, documented in the official wallet RPC documentation. This call normally don't do any network communications, it's just JSON-based gateway to wallet native library. It's recommended yo use this via async_api_call method to avoid lags with heavy calls. Example: await async_api_call( 'invoke', 0, "{ \"method\": \"store\", }"); This example calls "invoke" api of this library, for the wallet with handle 0, and pass string "{ \"method\": \"store\", }" to this "invoke" as argument, which address wallet RPC method "store". Method "store" might be heavy and time consuming, for that reason it's called by using async_api_call

Asynchronous API Functions

  • std::string async_call(const std::string& method_name, uint64_t wallet_id, const std::string& params)
    Initiates an asynchronous call of on of the following functions:
    • "close"
    • "open",
    • "restore"
    • "get_seed_phrase_info",
    • "invoke" (this is proxy to wallet JSON RPC API, documented in the official documentation)
    • "get_wallet_status"

Return job_id, and result should be fetched with try_pull_result() by passing given job_id, normally try_pull_result() is done in the background with some reasonable sleep interval around 100 ms.

{
  "job_id": 4093
}



  • std::string try_pull_result(uint64_t job_id)
    Tries to pull the result of a previous asynchronous call.

  • std::string sync_call(const std::string& method_name, uint64_t instance_id, const std::string& params)
    This is internal function and normally not used by front end.

Cake Wallet API Extension

  • bool is_wallet_exist(const std::string& path)
    Checks if a wallet exists at the specified path.

  • std::string get_wallet_info(hwallet h)
    Retrieves extended information about the wallet with the specified handle(including secret keys and seed).

  • std::string reset_wallet_password(hwallet h, const std::string& password)
    Resets the password of the wallet with the specified handle.

  • uint64_t get_current_tx_fee(uint64_t priority)
    Retrieves the current transaction fee based on priority.

Build Zano

To build Zano library run this scripts:

  • iOS: ./build/ios/framework.sh
  • MacOSX: ./build/macosx/framework.sh
  • Android: ./build/android/build-all.sh
  • Linux: ./build/linux/build-all.sh
  • Windows: ./build/windows/build-all.sh

Boost dependency

  • iOS: ./thirdparty/boost/ios/build.sh
  • MacOSX: ./thirdparty/boost/macosx/framework.sh
  • Android: ./thirdparty/boost/android/build.sh
  • Linux: ./thirdparty/boost/linux/build-all.sh
  • Windows: ./thirdparty/boost/windows/build-all.sh

OpenSSL dependency

  • iOS: ./build/ios/framework.sh
  • MacOSX: ./build/macosx/framework.sh
  • Android: ./build/android/build-all.sh
  • Linux: ./build/linux/build-all.sh
  • Windows: ./build/windows/build-all.sh

GNU libiconv dependency

  • MacOSX: ./build/macosx/framework.sh
  • Linux: ./build/linux/build-all.sh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors