| 68 | } |
| 69 | |
| 70 | std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key) |
| 71 | { |
| 72 | PKHash keyid(key); |
| 73 | CTxDestination p2pkh{keyid}; |
| 74 | if (key.IsCompressed()) { |
| 75 | CTxDestination segwit = WitnessV0KeyHash(keyid); |
| 76 | CTxDestination p2sh = ScriptHash(GetScriptForDestination(segwit)); |
| 77 | return Vector(std::move(p2pkh), std::move(p2sh), std::move(segwit)); |
| 78 | } else { |
| 79 | return Vector(std::move(p2pkh)); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore, const CScript& script, OutputType type) |
| 84 | { |