Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

Addresses review feedback on #47 to use the SECP256K1_PUBLIC_MULTIBASE_PREFIX constant instead of a hardcoded string for consistency.

Changes:

  • Updated getRotationPublicKeyMultibase() to use the constant in both the validation check and error message
// Before
if (!multibase.startsWith('zQ3sh')) {
  throw new RotationKeyInputError(
    `Invalid rotation key format. Expected a Secp256k1 key starting with 'zQ3sh', got '${multibase.slice(0, 5)}...'`,
  );
}

// After
if (!multibase.startsWith(SECP256K1_PUBLIC_MULTIBASE_PREFIX)) {
  throw new RotationKeyInputError(
    `Invalid rotation key format. Expected a Secp256k1 key starting with '${SECP256K1_PUBLIC_MULTIBASE_PREFIX}', got '${multibase.slice(0, 5)}...'`,
  );
}

This aligns with line 313 which already uses the constant.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…tant

Co-authored-by: johnbillion <208434+johnbillion@users.noreply.github.com>
Copilot AI changed the title [WIP] Add implementation to address rotation key validity check feedback Replace hardcoded 'zQ3sh' with SECP256K1_PUBLIC_MULTIBASE_PREFIX constant Jan 18, 2026
Copilot AI requested a review from johnbillion January 18, 2026 23:48
@johnbillion johnbillion marked this pull request as ready for review January 19, 2026 10:53
@johnbillion johnbillion merged commit a653f35 into claude/implement-issue-41-UGAc0 Jan 19, 2026
@johnbillion johnbillion deleted the copilot/sub-pr-47 branch January 19, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants