Improve merchant creation with automatic keypair generation
Enhance the merchant creation process by automatically generating Nostr keypairs for users who don't have them, and streamline the API interface. Changes: - Add CreateMerchantRequest model to simplify merchant creation API - Auto-generate Nostr keypairs for users without existing keys - Update merchant creation endpoint to use user account keypairs - Improve error handling and validation in merchant creation flow - Clean up frontend JavaScript for merchant creation This ensures all merchants have proper Nostr keypairs for marketplace functionality without requiring manual key management from users. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7c7d6c7953
commit
7245123e49
3 changed files with 56 additions and 46 deletions
|
|
@ -49,6 +49,10 @@ class MerchantConfig(MerchantProfile):
|
|||
restore_in_progress: bool | None = False
|
||||
|
||||
|
||||
class CreateMerchantRequest(BaseModel):
|
||||
config: MerchantConfig = MerchantConfig()
|
||||
|
||||
|
||||
class PartialMerchant(BaseModel):
|
||||
private_key: str
|
||||
public_key: str
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue