forked from Qortal/qortal
Added PirateChain.isValidWalletKey()
This commit is contained in:
parent
f7e6d1e5c8
commit
767ef62b64
@ -236,6 +236,13 @@ public class PirateChain extends Bitcoiny {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValidWalletKey(String walletKey) {
|
||||||
|
// For Pirate Chain, we only care that the key is a random string
|
||||||
|
// 32 characters in length, as it is used as entropy for the seed.
|
||||||
|
return walletKey != null && Base58.decode(walletKey).length == 32;
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns P2SH address using passed redeem script. */
|
/** Returns P2SH address using passed redeem script. */
|
||||||
public String deriveP2shAddress(byte[] redeemScriptBytes) {
|
public String deriveP2shAddress(byte[] redeemScriptBytes) {
|
||||||
Context.propagate(bitcoinjContext);
|
Context.propagate(bitcoinjContext);
|
||||||
|
Loading…
Reference in New Issue
Block a user