Skip to content

Conversation

jakubmkowalski
Copy link
Collaborator

Closes #608

This pull request introduces a new example implementation for a certificate signing server using the BSV blockchain SDK. It includes configuration management, server setup, certificate validation and signing logic, local and remote storage support, and an HTTP transport layer for handling certificate signing requests. The changes establish a modular structure with clear separation of concerns, making it easier to extend and maintain.

Server and Application Setup:

  • Added a main entry point in main.go that loads configuration, validates it, initializes the server, and starts listening for HTTP requests.
  • Implemented the Server struct and its initialization logic, including certifier wallet setup and HTTP route handling in internal/server/server.go.

Configuration and Constants:

  • Added configuration loading, validation, and defaulting logic in internal/config/config.go, supporting both local and remote storage setups.
  • Introduced a sample YAML config file and constants for field names, server port, and certificate types. [1] [2]

Certificate Domain and Service Logic:

  • Implemented certificate validation logic and conversion utilities in internal/domain/certificate.go.
  • Added the certificate signing service, which validates requests, decrypts fields, and issues signed certificates in internal/service/certificate_service.go.

Storage and Example Setup:

  • Provided utilities for setting up local SQLite-backed storage and wallet creation, supporting both local and remote storage providers in internal/example_setup/create_storage.go and internal/example_setup/setup.go. [1] [2]

HTTP Transport Layer:

  • Added an HTTP handler for certificate signing requests, including request parsing, error handling, and response serialization in internal/transport/http/certificate.go.

- Implemented configuration loading and validation in config package.
- Added constants for configuration and certificate validation.
- Created domain logic for certificate validation and signing.
- Developed example setup for local and remote storage management.
- Established server structure with HTTP routing for certificate signing requests.
- Integrated service layer for handling certificate operations.
- Implemented HTTP transport for processing certificate signing requests.
@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 10:13
Copy link
Contributor

Manual Tests

ℹ️ Remember to ask team members to perform manual tests and to assign tested label after testing.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a comprehensive certificate signing server example implementation using the BSV blockchain SDK. It demonstrates certificate validation, signing workflows, and HTTP transport layer functionality.

Key changes include:

  • Implementation of a complete certificate signing server with HTTP endpoints and configuration management
  • Addition of certificate validation logic and service layer for handling signing requests
  • Creation of local and remote storage support utilities with SQLite backing

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cmd/server/main.go Main entry point for the certificate server application
internal/config/config.go Configuration loading and validation with YAML support
internal/constants/constants.go Application constants for ports, certificate types, and field names
internal/domain/certificate.go Certificate validation logic and field conversion utilities
internal/service/certificate_service.go Core certificate signing service with field decryption
internal/server/server.go Server initialization and HTTP route setup
internal/transport/http/certificate.go HTTP handler for certificate signing requests
internal/example_setup/setup.go Wallet creation utilities supporting local and remote storage
internal/example_setup/create_storage.go Local SQLite storage provider creation with monitoring
test_sign_certificate/main.go Test client for certificate signing workflow validation
go.mod Go module definition with BSV SDK dependencies
config.example.yaml Example configuration file with wallet and server settings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Copilot Copilot AI review requested due to automatic review settings September 26, 2025 10:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jakubmkowalski jakubmkowalski self-assigned this Sep 26, 2025
@Copilot Copilot AI review requested due to automatic review settings September 29, 2025 07:26
Copy link

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jakubmkowalski jakubmkowalski merged commit 07d8aaf into main Sep 29, 2025
10 checks passed
@jakubmkowalski jakubmkowalski deleted the feat/add_certificate_server_example branch September 29, 2025 07:34
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.

[Task] Prepare simple example of acquiring certificate

3 participants