diff --git a/java/com/samourai/wallet/api/pairing/PairingPayload.java b/java/com/samourai/wallet/api/pairing/PairingPayload.java index e57c2e8..382502d 100644 --- a/java/com/samourai/wallet/api/pairing/PairingPayload.java +++ b/java/com/samourai/wallet/api/pairing/PairingPayload.java @@ -9,8 +9,12 @@ public class PairingPayload { private CliPairingValue pairing; - public PairingPayload(PairingType type, PairingVersion version, PairingNetwork network, String mnemonic) { - this.pairing = new CliPairingValue(type, version, network, mnemonic); + public PairingPayload() { + this.pairing = new CliPairingValue(); + } + + public PairingPayload(PairingType type, PairingVersion version, PairingNetwork network, String mnemonic, Boolean passphrase) { + this.pairing = new CliPairingValue(type, version, network, mnemonic, passphrase); } protected void validate() throws Exception { @@ -33,12 +37,18 @@ public static class CliPairingValue { private PairingVersion version; private PairingNetwork network; private String mnemonic; + private Boolean passphrase; // NULL for V1 + + public CliPairingValue() { + + } - public CliPairingValue(PairingType type, PairingVersion version, PairingNetwork network, String mnemonic) { + public CliPairingValue(PairingType type, PairingVersion version, PairingNetwork network, String mnemonic, Boolean passphrase) { this.type = type; this.version = version; this.network = network; this.mnemonic = mnemonic; + this.passphrase = passphrase; } protected void validate() throws Exception { @@ -90,6 +100,14 @@ public String getMnemonic() { public void setMnemonic(String mnemonic) { this.mnemonic = mnemonic; } + + public Boolean getPassphrase() { + return passphrase; + } + + public void setPassphrase(Boolean passphrase) { + this.passphrase = passphrase; + } } } diff --git a/java/com/samourai/wallet/api/pairing/PairingVersion.java b/java/com/samourai/wallet/api/pairing/PairingVersion.java index d17e83f..6d80b45 100644 --- a/java/com/samourai/wallet/api/pairing/PairingVersion.java +++ b/java/com/samourai/wallet/api/pairing/PairingVersion.java @@ -4,7 +4,8 @@ import com.google.common.base.Optional; public enum PairingVersion { - V1_0_0("1.0.0"); + V1_0_0("1.0.0"), + V2_0_0("2.0.0"); private String value;