package wallettemplate;

import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.kits.WalletAppKit;
import org.bitcoinj.params.TestNet3Params;
//import org.bitcoinj.params.BCCTestNet3Params;

import java.io.File;

public class TestHybrid {
    //Bitcoin
    public static NetworkParameters params = TestNet3Params.get();
    public static WalletAppKit kit = new WalletAppKit(params, new File("."), 
"bitcoin");
    //Bitcoin Cash
    //public static NetworkParameters params1 = BCCTestNet3Params.get();
    //public static WalletAppKit kit1 = new WalletAppKit(params1, new 
File("."), "bitcoincash");

    public static void main(String[] args) {
        kit.startAsync();
        kit.awaitRunning();
        System.out.println(kit.wallet().currentReceiveAddress().toString());
    }
}


BCCTestNet3Params.get(); shows up in red. saying it cannot resolve.

are all the other bitcoinj forks work the same way such as this?

For example...litecoinj, dashj and other forks from here 
--> https://pastebin.com/UYW7gUtH

And also how would you merge these into 1 program since theya re from 
different modules. Im currently using Intellij.

On Monday, May 7, 2018 at 2:09:40 AM UTC-4, Jimmy Morales wrote:
>
> What distinguishes between bitcoin and bitcoincash are the Network 
> Parameters 
> <https://github.com/Stash-Crypto/bitcoincashj/tree/release-0.14/core/src/main/java/org/bitcoinj/params>
>  
> classes. Use BCCMainNetParams for bitcoincash, BCCTestNet3Params for 
> testnet bitcoincash, MainNetParams for bitcoin and TestNet3Params for 
> testnet bitcoin.
>
> On Sunday, 6 May 2018 14:08:14 UTC-6, Bobby_Bouche wrote:
>>
>> That is embarassing, i was only doing ctrl+F.
>>
>> Moving on. So i went through the code but im still not quite 
>> understanding how it distinguishes between bitcoin and bitcoincash.
>>
>> I got Wallet.java, SendRequest.java and TransactionSigner.java opened.
>>
>> On Sunday, May 6, 2018 at 2:15:28 PM UTC-4, Carlos López-Camey wrote:
>>>
>>> Sure man, normally you can CTRL + SHIFT + F for global search in 
>>> intellij no?
>>>
>>> Result here: https://pastebin.com/jMEHpeeL
>>>
>>> 2018-05-06 12:12 GMT-06:00 Bobby_Bouche <[email protected]>:
>>>
>>>> im using only windows .....:S sorry. It appears intellij doesnt have a 
>>>> global search button.
>>>>
>>>> Do you know the directory for this?
>>>>
>>>> On Sunday, May 6, 2018 at 1:38:18 PM UTC-4, Carlos López-Camey wrote:
>>>>>
>>>>> If you are using Linux or cygwin, try grep:
>>>>>
>>>>> ```
>>>>> find $PATH_TO_BITCOINJ_SOURCE -type f |grep java$ |xargs grep 
>>>>> getUseForkId
>>>>> ```
>>>>>
>>>>> You should find getUseForkId.
>>>>>
>>>>> 2018-05-06 11:20 GMT-06:00 Bobby_Bouche <[email protected]>:
>>>>>
>>>>>> I got bitcoinj-cash-0.14 and tried searching for "getUseForkId()" but 
>>>>>> found nothing...Im using intellij
>>>>>>
>>>>>>
>>>>>> On Sunday, May 6, 2018 at 12:59:50 PM UTC-4, Carlos López-Camey wrote:
>>>>>>>
>>>>>>> It's not very different because an address is just a representation 
>>>>>>> of a public key and they use the same type for public key.
>>>>>>>
>>>>>>>
>>>>>>> If you search the code for `getUseForkId()` you will find some "ifs" 
>>>>>>> for the protocol implementation, like special transactiom signing (for 
>>>>>>> replay protection) or connecting to the right nodes. But there are not 
>>>>>>> so 
>>>>>>> many differences, as you said both projects look like a mirror
>>>>>>>
>>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "bitcoinj" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "bitcoinj" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"bitcoinj" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to