| 181 | } |
| 182 | |
| 183 | std::vector<CKeyID> XOnlyPubKey::GetKeyIDs() const |
| 184 | { |
| 185 | std::vector<CKeyID> out; |
| 186 | // For now, use the old full pubkey-based key derivation logic. As it is indexed by |
| 187 | // Hash160(full pubkey), we need to return both a version prefixed with 0x02, and one |
| 188 | // with 0x03. |
| 189 | unsigned char b[33] = {0x02}; |
| 190 | std::copy(m_keydata.begin(), m_keydata.end(), b + 1); |
| 191 | CPubKey fullpubkey; |
| 192 | fullpubkey.Set(b, b + 33); |
| 193 | out.push_back(fullpubkey.GetID()); |
| 194 | b[0] = 0x03; |
| 195 | fullpubkey.Set(b, b + 33); |
| 196 | out.push_back(fullpubkey.GetID()); |
| 197 | return out; |
| 198 | } |
| 199 | |
| 200 | bool XOnlyPubKey::IsFullyValid() const |
| 201 | { |
no test coverage detected