| 1095 | } |
| 1096 | |
| 1097 | std::vector<uint8_t> CLI::parseSignature(const std::string &sig) const { |
| 1098 | // Parse a signature as a vector of 32-byte arrays from hex |
| 1099 | std::vector<uint8_t> bytes = fromHex(sig); |
| 1100 | if (bytes.size() % 32 != 0) { |
| 1101 | throw std::runtime_error("Invalid signature length"); |
| 1102 | } |
| 1103 | return bytes; |
| 1104 | } |
| 1105 | |
| 1106 | std::vector<uint8_t> CLI::parsePrivateKey(const std::string &key) const { |
| 1107 | // Parse a 32-byte private key from hex |