-
Notifications
You must be signed in to change notification settings - Fork 4
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
f2152d2
commit 6dd4865
Showing
30 changed files
with
10,309 additions
and
582 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.vergepay.core.coins; | ||
|
||
import com.vergepay.core.coins.families.NxtFamily; | ||
|
||
/** | ||
* @author John L. Jegutanis | ||
*/ | ||
public class NxtMain extends NxtFamily { | ||
|
||
private NxtMain() { | ||
id = "nxt.main"; | ||
|
||
name = "NXT"; | ||
symbol = "NXT"; | ||
uriScheme = "nxt"; | ||
bip44Index = 29; | ||
unitExponent = 8; | ||
addressPrefix = "NXT-"; | ||
feeValue = oneCoin(); | ||
minNonDust = value(1); | ||
feePolicy = FeePolicy.FLAT_FEE; | ||
} | ||
|
||
private static final NxtMain instance = new NxtMain(); | ||
public static synchronized CoinType get() { | ||
return instance; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
core/src/main/java/com/vergepay/core/coins/families/NxtFamily.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,40 @@ | ||
package com.vergepay.core.coins.families; | ||
|
||
import com.vergepay.core.coins.CoinType; | ||
import com.vergepay.core.exceptions.AddressMalformedException; | ||
import com.vergepay.core.messages.MessageFactory; | ||
import com.vergepay.core.wallet.AbstractAddress; | ||
import com.vergepay.core.wallet.families.nxt.NxtAddress; | ||
import com.vergepay.core.wallet.families.nxt.NxtTxMessage; | ||
|
||
import javax.annotation.Nullable; | ||
|
||
|
||
/** | ||
* @author John L. Jegutanis | ||
* | ||
* Coins that belong to this family are: NXT, Burst, etc | ||
*/ | ||
public abstract class NxtFamily extends CoinType { | ||
public static final short DEFAULT_DEADLINE = 1440; | ||
|
||
{ | ||
family = Families.NXT; | ||
} | ||
|
||
@Override | ||
public AbstractAddress newAddress(String addressStr) throws AddressMalformedException { | ||
return NxtAddress.fromString(this, addressStr); | ||
} | ||
|
||
@Override | ||
public boolean canHandleMessages() { | ||
return true; | ||
} | ||
|
||
@Override | ||
@Nullable | ||
public MessageFactory getMessagesFactory() { | ||
return NxtTxMessage.getFactory(); | ||
} | ||
} |
Oops, something went wrong.