| 1423 | SHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "sh") {} |
| 1424 | |
| 1425 | std::optional<OutputType> GetOutputType() const override |
| 1426 | { |
| 1427 | assert(m_subdescriptor_args.size() == 1); |
| 1428 | if (IsSegwit()) return OutputType::P2SH_SEGWIT; |
| 1429 | return OutputType::LEGACY; |
| 1430 | } |
| 1431 | bool IsSingleType() const final { return true; } |
| 1432 | |
| 1433 | std::optional<int64_t> ScriptSize() const override { return 1 + 1 + 20 + 1; } |