Examples of WalletData


Examples of org.opentransactions.otapi.WalletData

    public static void getKeyFromName(String name) {
    }

    public static WalletData getWalletData() {

        WalletData walletData = null;
        Storable storable = null;
        if (otapi.Exists("moneychanger", "gui_wallet.dat")) {
            storable = otapi.QueryObject(StoredObjectType.STORED_OBJ_WALLET_DATA, "moneychanger", "gui_wallet.dat");
            if (storable == null) {
                return null;
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

    }

    public String[] loadServerDetails(String serverID){

        String[] details = null;
        WalletData walletData = Helpers.getWalletData();
        if (walletData == null) {
            System.out.println("loadServerDetails - walletData returns null");
            return null;
        }
        for (int i = 0; i < walletData.GetRippleServerCount(); i++) {
            RippleServer rippleServer = walletData.GetRippleServer(i);
            if (rippleServer == null) {
                continue;
            }
            System.out.println("serverID:" + serverID + " rippleServer.getServer_id():" + rippleServer.getServer_id());
            if (serverID.equals(rippleServer.getServer_id())) {
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

public class StorageHelper {

    //Other Tab
    public static String addBitcoinServer(String label, String host, String user, String pwd, String port) {
        String serverID = Helpers.generateID();
        WalletData walletData = Helpers.getWalletData();

        if (walletData == null) {
            System.out.println("addBitcoinServer - walletData returns null");
            return null;
        }
        BitcoinServer btcServer = null;
        Storable storable = otapi.CreateObject(StoredObjectType.STORED_OBJ_BITCOIN_SERVER);
        if (storable != null) {
            btcServer = BitcoinServer.ot_dynamic_cast(storable);
            if (btcServer != null) {
                btcServer.setServer_host(host);
                btcServer.setBitcoin_password(pwd);
                btcServer.setBitcoin_username(user);
                btcServer.setServer_port(port);
                btcServer.setGui_label(label);
                btcServer.setServer_id(serverID);
                btcServer.setServer_type("Bitcoin");
                boolean status = walletData.AddBitcoinServer(btcServer);
                System.out.println("status walletData.AddBitcoinServer:" + status);
                status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
                System.out.println("status otapi.StoreObject:" + status);
                System.out.println("addBitcoinServer - serverID:" + serverID);
            }
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

    }
    //Ripple,Loom

    public static String addRippleServer(String label, String url, String user, String pwd, String userTextID, String pwdTextID) {
        String serverID = Helpers.generateID();
        WalletData walletData = Helpers.getWalletData();

        if (walletData == null) {
            System.out.println("addRippleServer - walletData returns null");
            return null;
        }
        RippleServer rippleServer = null;
        Storable storable = otapi.CreateObject(StoredObjectType.STORED_OBJ_RIPPLE_SERVER);
        if (storable != null) {
            rippleServer = RippleServer.ot_dynamic_cast(storable);
            if (rippleServer != null) {
                rippleServer.setServer_host(url);
                rippleServer.setRipple_password(pwd);
                rippleServer.setRipple_username(user);
                rippleServer.setNamefield_id(userTextID);
                rippleServer.setPassfield_id(pwdTextID);
                rippleServer.setGui_label(label);
                rippleServer.setServer_id(serverID);
                rippleServer.setServer_type("Ripple");
                boolean status = walletData.AddRippleServer(rippleServer);
                System.out.println("status walletData.AddRippleServer:" + status);
                status = otapi.StoreObject(walletData, "moneychanger", "gui_wallet.dat");
                System.out.println("status otapi.StoreObject:" + status);
                System.out.println("addRippleServer - serverID:" + serverID);
            }
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

        return serverID;
    }

    public static Map getOtherTabServerList(String type) {

        WalletData walletData = Helpers.getWalletData();
        HashMap dataMap = new HashMap();

        if (walletData == null) {
            System.out.println("getOtherTabServerList walletData returns null");
            return dataMap;
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

    }

    public static boolean editOtherTabServerLabel(String serverID, String newLabel, String type) {

        boolean status = false;
        WalletData walletData = Helpers.getWalletData();
        if (walletData == null) {
            System.out.println("editOtherTabServerLabel - walletData returns null");
            return false;
        }
View Full Code Here

Examples of org.opentransactions.otapi.WalletData

    }

    public static boolean removeOtherTabServer(String serverID, String type) {

        boolean status = false;
        WalletData walletData = Helpers.getWalletData();
        if (walletData == null) {
            System.out.println("removeOtherTabServer - walletData returns null");
            return false;
        }
        System.out.println("TYPE:" + type);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.