mirror of
https://github.com/Qortal/qortal.git
synced 2025-04-22 19:07:51 +00:00
Merge branch 'segwit'
This commit is contained in:
commit
c333d18cd0
@ -122,7 +122,7 @@ public class CrossChainBitcoinResource {
|
|||||||
@Path("/send")
|
@Path("/send")
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "Sends BTC from hierarchical, deterministic BIP32 wallet to specific address",
|
summary = "Sends BTC from hierarchical, deterministic BIP32 wallet to specific address",
|
||||||
description = "Currently only supports 'legacy' P2PKH Bitcoin addresses. Supply BIP32 'm' private key in base58, starting with 'xprv' for mainnet, 'tprv' for testnet",
|
description = "Currently supports 'legacy' P2PKH Bitcoin addresses and Native SegWit (P2WPKH) addresses. Supply BIP32 'm' private key in base58, starting with 'xprv' for mainnet, 'tprv' for testnet",
|
||||||
requestBody = @RequestBody(
|
requestBody = @RequestBody(
|
||||||
required = true,
|
required = true,
|
||||||
content = @Content(
|
content = @Content(
|
||||||
|
@ -122,7 +122,7 @@ public class CrossChainLitecoinResource {
|
|||||||
@Path("/send")
|
@Path("/send")
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "Sends LTC from hierarchical, deterministic BIP32 wallet to specific address",
|
summary = "Sends LTC from hierarchical, deterministic BIP32 wallet to specific address",
|
||||||
description = "Currently only supports 'legacy' P2PKH Litecoin addresses. Supply BIP32 'm' private key in base58, starting with 'xprv' for mainnet, 'tprv' for testnet",
|
description = "Currently supports 'legacy' P2PKH Litecoin addresses and Native SegWit (P2WPKH) addresses. Supply BIP32 'm' private key in base58, starting with 'xprv' for mainnet, 'tprv' for testnet",
|
||||||
requestBody = @RequestBody(
|
requestBody = @RequestBody(
|
||||||
required = true,
|
required = true,
|
||||||
content = @Content(
|
content = @Content(
|
||||||
|
@ -104,8 +104,9 @@ public abstract class Bitcoiny implements ForeignBlockchain {
|
|||||||
try {
|
try {
|
||||||
ScriptType addressType = Address.fromString(this.params, address).getOutputScriptType();
|
ScriptType addressType = Address.fromString(this.params, address).getOutputScriptType();
|
||||||
|
|
||||||
return addressType == ScriptType.P2PKH || addressType == ScriptType.P2SH;
|
return addressType == ScriptType.P2PKH || addressType == ScriptType.P2SH || addressType == ScriptType.P2WPKH;
|
||||||
} catch (AddressFormatException e) {
|
} catch (AddressFormatException e) {
|
||||||
|
LOGGER.error(String.format("Unrecognised address format: %s", address));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user