Change coin type to 17 for GRS

This commit is contained in:
HashEngineering 2021-01-23 10:14:58 -08:00
parent 28395823cf
commit 965a4d1249
No known key found for this signature in database
GPG key ID: A615EB0C5CEBDEDE

View file

@ -17,7 +17,7 @@ import static com.sparrowwallet.drongo.protocol.ScriptOpCodes.*;
import static com.sparrowwallet.drongo.protocol.Transaction.WITNESS_SCALE_FACTOR;
public enum ScriptType {
P2PK("P2PK", "m/44'/0'/0'") {
P2PK("P2PK", "m/44'/17'/0'") {
@Override
public Address getAddress(byte[] pubKey) {
return new P2PKAddress(pubKey);
@ -131,7 +131,7 @@ public enum ScriptType {
return List.of(SINGLE);
}
},
P2PKH("P2PKH", "m/44'/0'/0'") {
P2PKH("P2PKH", "m/44'/17'/0'") {
@Override
public Address getAddress(byte[] pubKeyHash) {
return new P2PKHAddress(pubKeyHash);
@ -244,7 +244,7 @@ public enum ScriptType {
return List.of(SINGLE);
}
},
MULTISIG("Bare Multisig", "m/44'/0'/0'") {
MULTISIG("Bare Multisig", "m/44'/17'/0'") {
@Override
public Address getAddress(byte[] bytes) {
throw new ProtocolException("No single address for multisig script type");
@ -555,7 +555,7 @@ public enum ScriptType {
return List.of(MULTI);
}
},
P2SH_P2WPKH("P2SH-P2WPKH", "m/49'/0'/0'") {
P2SH_P2WPKH("P2SH-P2WPKH", "m/49'/17'/0'") {
@Override
public Address getAddress(byte[] scriptHash) {
return P2SH.getAddress(scriptHash);
@ -658,7 +658,7 @@ public enum ScriptType {
return List.of(SINGLE);
}
},
P2SH_P2WSH("P2SH-P2WSH", "m/48'/0'/0'/1'") {
P2SH_P2WSH("P2SH-P2WSH", "m/48'/17'/0'/1'") {
@Override
public Address getAddress(byte[] scriptHash) {
return P2SH.getAddress(scriptHash);
@ -759,7 +759,7 @@ public enum ScriptType {
return List.of(MULTI, CUSTOM);
}
},
P2WPKH("P2WPKH", "m/84'/0'/0'") {
P2WPKH("P2WPKH", "m/84'/17'/0'") {
@Override
public Address getAddress(byte[] pubKeyHash) {
return new P2WPKHAddress(pubKeyHash);
@ -864,7 +864,7 @@ public enum ScriptType {
return List.of(SINGLE);
}
},
P2WSH("P2WSH", "m/48'/0'/0'/2'") {
P2WSH("P2WSH", "m/48'/17'/0'/2'") {
@Override
public Address getAddress(byte[] scriptHash) {
return new P2WSHAddress(scriptHash);