Skip to content

Add WebAPI external signer support#7

Merged
bytetang merged 5 commits into
celer-network:mainfrom
bytetang:sdk-signer-webapi
May 6, 2026
Merged

Add WebAPI external signer support#7
bytetang merged 5 commits into
celer-network:mainfrom
bytetang:sdk-signer-webapi

Conversation

@bytetang
Copy link
Copy Markdown
Contributor

@bytetang bytetang commented May 6, 2026

Adds external signer constructor for WebAPI server.

bytetang and others added 3 commits May 3, 2026 09:39
…back type

appSessionCallbackMap was initialized in the constructor but appSessionCallback
type was removed when the OSP dispute-subscription methods were stripped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bytetang bytetang requested a review from hhl42 May 6, 2026 03:15
@hhl42 hhl42 requested a review from Copilot May 6, 2026 03:29
Copy link
Copy Markdown

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 adds an alternate WebAPI server construction path that initializes the underlying Celer client using an externally-provided signer callback, enabling WebAPI usage without directly loading a keystore/private key in the WebAPI process.

Changes:

  • Added NewApiServerWithExternalSigner to initialize celersdk via InitClientWithSigner using a caller-provided ExternalSignerCallback.
  • Refactored NewApiServer to share common initialization logic via newApiServerWithClientInit.
  • Added NewInternalApiServerWithExternalSigner plus an optional register(*grpc.Server) hook invoked before WebAPI service registration.

Reviewed changes

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

File Description
webapi/internal_api_server.go Adds an internal-server constructor for external signer usage and an optional gRPC registration hook during server startup.
webapi/api_server.go Introduces an external-signer ApiServer constructor and factors shared client-init/wait logic into a helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread webapi/api_server.go Outdated
@bytetang bytetang merged commit 7cc1331 into celer-network:main May 6, 2026
2 checks passed
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.

3 participants