-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1009ee4
commit ef7ebe0
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
core/src/main/java/org/bitcorej/chain/divi/DIVINetParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.bitcorej.chain.divi; | ||
|
||
import org.bitcoinj.params.AbstractBitcoinNetParams; | ||
import org.bitcorej.chain.dash.DashNetParameters; | ||
|
||
public class DIVINetParameters extends AbstractBitcoinNetParams { | ||
|
||
public DIVINetParameters() { | ||
super(); | ||
addressHeader = 30; | ||
p2shHeader = 13; | ||
acceptableAddressCodes = new int[] { addressHeader, p2shHeader }; | ||
dumpedPrivateKeyHeader = 212; | ||
} | ||
|
||
private static DIVINetParameters instance; | ||
public static synchronized DIVINetParameters get() { | ||
if (instance == null) { | ||
instance = new DIVINetParameters(); | ||
} | ||
return instance; | ||
} | ||
|
||
@Override | ||
public String getPaymentProtocolId() { | ||
return "main"; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
core/src/main/java/org/bitcorej/chain/divi/DIVIStateProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.bitcorej.chain.divi; | ||
|
||
import org.bitcorej.chain.bitcoin.BitcoinStateProvider; | ||
import org.bitcorej.core.Network; | ||
|
||
public class DIVIStateProvider extends BitcoinStateProvider { | ||
public DIVIStateProvider(Network network) { | ||
super(network); | ||
super.params = DIVINetParameters.get(); | ||
} | ||
} |