mirror of
https://github.com/sparrowwallet/drongo.git
synced 2025-11-05 11:56:38 +00:00
Change coin type to 17 for GRS
This commit is contained in:
parent
28395823cf
commit
965a4d1249
1 changed files with 7 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ import static com.sparrowwallet.drongo.protocol.ScriptOpCodes.*;
|
||||||
import static com.sparrowwallet.drongo.protocol.Transaction.WITNESS_SCALE_FACTOR;
|
import static com.sparrowwallet.drongo.protocol.Transaction.WITNESS_SCALE_FACTOR;
|
||||||
|
|
||||||
public enum ScriptType {
|
public enum ScriptType {
|
||||||
P2PK("P2PK", "m/44'/0'/0'") {
|
P2PK("P2PK", "m/44'/17'/0'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] pubKey) {
|
public Address getAddress(byte[] pubKey) {
|
||||||
return new P2PKAddress(pubKey);
|
return new P2PKAddress(pubKey);
|
||||||
|
|
@ -131,7 +131,7 @@ public enum ScriptType {
|
||||||
return List.of(SINGLE);
|
return List.of(SINGLE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2PKH("P2PKH", "m/44'/0'/0'") {
|
P2PKH("P2PKH", "m/44'/17'/0'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] pubKeyHash) {
|
public Address getAddress(byte[] pubKeyHash) {
|
||||||
return new P2PKHAddress(pubKeyHash);
|
return new P2PKHAddress(pubKeyHash);
|
||||||
|
|
@ -244,7 +244,7 @@ public enum ScriptType {
|
||||||
return List.of(SINGLE);
|
return List.of(SINGLE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MULTISIG("Bare Multisig", "m/44'/0'/0'") {
|
MULTISIG("Bare Multisig", "m/44'/17'/0'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] bytes) {
|
public Address getAddress(byte[] bytes) {
|
||||||
throw new ProtocolException("No single address for multisig script type");
|
throw new ProtocolException("No single address for multisig script type");
|
||||||
|
|
@ -555,7 +555,7 @@ public enum ScriptType {
|
||||||
return List.of(MULTI);
|
return List.of(MULTI);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2SH_P2WPKH("P2SH-P2WPKH", "m/49'/0'/0'") {
|
P2SH_P2WPKH("P2SH-P2WPKH", "m/49'/17'/0'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] scriptHash) {
|
public Address getAddress(byte[] scriptHash) {
|
||||||
return P2SH.getAddress(scriptHash);
|
return P2SH.getAddress(scriptHash);
|
||||||
|
|
@ -658,7 +658,7 @@ public enum ScriptType {
|
||||||
return List.of(SINGLE);
|
return List.of(SINGLE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2SH_P2WSH("P2SH-P2WSH", "m/48'/0'/0'/1'") {
|
P2SH_P2WSH("P2SH-P2WSH", "m/48'/17'/0'/1'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] scriptHash) {
|
public Address getAddress(byte[] scriptHash) {
|
||||||
return P2SH.getAddress(scriptHash);
|
return P2SH.getAddress(scriptHash);
|
||||||
|
|
@ -759,7 +759,7 @@ public enum ScriptType {
|
||||||
return List.of(MULTI, CUSTOM);
|
return List.of(MULTI, CUSTOM);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2WPKH("P2WPKH", "m/84'/0'/0'") {
|
P2WPKH("P2WPKH", "m/84'/17'/0'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] pubKeyHash) {
|
public Address getAddress(byte[] pubKeyHash) {
|
||||||
return new P2WPKHAddress(pubKeyHash);
|
return new P2WPKHAddress(pubKeyHash);
|
||||||
|
|
@ -864,7 +864,7 @@ public enum ScriptType {
|
||||||
return List.of(SINGLE);
|
return List.of(SINGLE);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
P2WSH("P2WSH", "m/48'/0'/0'/2'") {
|
P2WSH("P2WSH", "m/48'/17'/0'/2'") {
|
||||||
@Override
|
@Override
|
||||||
public Address getAddress(byte[] scriptHash) {
|
public Address getAddress(byte[] scriptHash) {
|
||||||
return new P2WSHAddress(scriptHash);
|
return new P2WSHAddress(scriptHash);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue