Examples of OTAPI_Func


Examples of com.moneychanger.core.util.OTAPI_Func

    }

    public static String getAssetTypeNameForRegNym(String assetTypeID, String serverID, String nymID) {

        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.GET_CONTRACT, serverID, nymID, assetTypeID);
        String strResponse = OTAPI_Func.SendRequest(theRequest, "GET_CONTRACT");

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN getAssetTypeNameForRegNym: OTAPI_Func.SendRequest(() failed. (I give up.) ");
            return null;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

    public boolean issueAssetType(String serverID, String nymID, String contract) throws InterruptedException {

        if (!otapiJNI.OTAPI_Basic_IsNym_RegisteredAtServer(nymID, serverID)) {

            OTAPI_Func  theRequest   = new OTAPI_Func(OTAPI_Func.FT.CREATE_USER_ACCT, serverID, nymID);
            String      strResponse  = OTAPI_Func.SendRequest(theRequest, "CREATE_USER_ACCT");

            if (!Utility.VerifyStringVal(strResponse))
            {
                System.out.println("IN issueAssetType: OTAPI_Func.SendRequest(() failed. (I give up.) ");
                return false;
            }
        }
        // -----------------------------------------------
        OTAPI_Func  theRequest   = new OTAPI_Func(OTAPI_Func.FT.ISSUE_ASSET_TYPE, serverID, nymID, contract);
        String      strResponse  = OTAPI_Func.SendRequest(theRequest, "ISSUE_ASSET_TYPE");

        if (!Utility.VerifyStringVal(strResponse))
        {
            System.out.println("IN issueAssetType: OTAPI_Func.SendRequest(() failed. (I give up.) ");
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

        this.nymID = nymID;
    }

    private boolean createAssetAccount(String serverID, String nymID, String assetID) {

        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.CREATE_ASSET_ACCT, serverID, nymID, assetID);
        String strResponse = OTAPI_Func.SendRequest(theRequest, "CREATE_ASSET_ACCT");

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN createAssetAccount: OTAPI_Func.SendRequest(() failed. (I give up.) ");
            return false;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

        try {
            // If the Nym's not registered at the server, we do that first...
            //
            if (!otapiJNI.OTAPI_Basic_IsNym_RegisteredAtServer(nymID, serverID)) {

                OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.CREATE_USER_ACCT, serverID, nymID);
                String strResponse = OTAPI_Func.SendRequest(theRequest, "CREATE_USER_ACCT");

                if (!Utility.VerifyStringVal(strResponse)) {
                    System.out.println("IN createAccount: OTAPI_Func.SendRequest(() failed. (I give up.) ");
                    return false;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

            System.out.println("deleteAccount: unable. There must still be open receipts, or a nonzero balance?");
            return false;
        }
        // ----------------------------------------

        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.DELETE_ASSET_ACCT, serverID, nymID, accountID);
        String strResponse = OTAPI_Func.SendRequest(theRequest, "DELETE_ASSET_ACCT");

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN deleteAccount: OTAPI_Func.SendRequest(() failed. (I give up.) ");
            return false;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

        String IN_FUNCTION = new String("exchangeBasket");
        System.out.println("In " + IN_FUNCTION + " serverID:" + serverID + " accountID:" + accountID + " nymID:" + nymID + " assetID:" + assetID + " basket:" + basket + " inXchange is " + inXchange + " memberCount:" + memberCount);

        // ----------------------------------------
        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.EXCHANGE_BASKET, serverID, nymID, assetID, basket, accountID, inXchange, (memberCount + 2));
        String strResponse = OTAPI_Func.SendTransaction(theRequest, "EXCHANGE_BASKET");

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN exchangeBasket: OTAPI_Func.SendTransaction(() failed. (I give up.) ");
            return false;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

        if (!Utility.VerifyStringVal(otapiJNI.OTAPI_Basic_LoadAssetContract(assetID))) {
            System.out.println("IN showBasket, OT_API_LoadAssetContract is null");

            // ----------------------------------------
            OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.GET_CONTRACT, serverID, nymID, assetID);
            String strResponse = OTAPI_Func.SendRequest(theRequest, "GET_CONTRACT");

            if (!Utility.VerifyStringVal(strResponse)) {
                System.out.println("IN showBasket: OTAPI_Func.SendRequest(() failed. (I give up.) ");
                return null;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

        // -------------------------------------------------------------------
        // SEND THE PROCESS INBOX MESSAGE (to server.)
        // ----------------------------------------

        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.PROCESS_INBOX, serverID, nymID, accountID, accountLedger);
        String strResponse = OTAPI_Func.SendTransaction(theRequest, "PROCESS_INBOX");

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN processInbox: OTAPI_Func.SendTransaction(() failed. (I give up.) ");
            return false;
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

                Helpers.setOtDepositCash(oldPurse);
                return false;
            }
        }
        // ----------------------------------------
        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.DEPOSIT_CASH, serverID, nymID, accountID, purse);
        String strResponse = OTAPI_Func.SendTransaction(theRequest, "DEPOSIT_CASH"); // <========================

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("IN depositCash: OTAPI_Func.SendTransaction(() failed. (I give up.) ");
View Full Code Here

Examples of com.moneychanger.core.util.OTAPI_Func

    public String withdrawVoucher(String serverID, String nymID, String accountID, String amount, String chequeMemo, String recepientNymID) {

        System.out.println("In withdrawVoucher serverID:" + serverID + " nymID:" + nymID + " acount ID:" + accountID);

        // ---------------------------------------------------
        OTAPI_Func theRequest = new OTAPI_Func(OTAPI_Func.FT.WITHDRAW_VOUCHER, serverID, nymID, accountID, recepientNymID, chequeMemo, amount);
        String strResponse = OTAPI_Func.SendTransaction(theRequest, "WITHDRAW_VOUCHER"); // <========================

        if (!Utility.VerifyStringVal(strResponse)) {
            System.out.println("OTAPI_Func.SendTransaction() failed, in withdrawVoucher.");
            return null;
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.