Browse Source

Added PirateChain.isValidWalletKey()

pirate-chain
CalDescent 2 years ago
parent
commit
767ef62b64
  1. 7
      src/main/java/org/qortal/crosschain/PirateChain.java

7
src/main/java/org/qortal/crosschain/PirateChain.java

@ -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. */
public String deriveP2shAddress(byte[] redeemScriptBytes) {
Context.propagate(bitcoinjContext);

Loading…
Cancel
Save