{"openapi":"3.0.0","paths":{"/api/v1/metrics":{"get":{"operationId":"PrometheusController_index","parameters":[],"responses":{"200":{"description":""}},"tags":["Prometheus"]}},"/api/v1/health":{"get":{"operationId":"HealthController_check","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"tags":["Health"]}},"/api/v1/health/ready":{"get":{"operationId":"HealthController_ready","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"tags":["Health"]}},"/api/v1/health/live":{"get":{"operationId":"HealthController_live","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"tags":["Health"]}},"/api/v1/smart-wallets":{"post":{"operationId":"SmartWalletController_createWallet","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSmartWalletRequestDto"}}}},"responses":{"201":{"description":"Smart wallet created successfully"},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"409":{"description":"Wallet already exists for user on this chain"}},"security":[{"bearer":[]}],"summary":"Create a new smart wallet","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/me":{"get":{"operationId":"SmartWalletController_getMyWallets","parameters":[],"responses":{"200":{"description":"User wallets retrieved"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Get all wallets for the authenticated user","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/{id}":{"get":{"operationId":"SmartWalletController_getWallet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Wallet details retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Not your wallet"},"404":{"description":"Wallet not found"}},"security":[{"bearer":[]}],"summary":"Get smart wallet details","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/user/{userId}":{"get":{"operationId":"SmartWalletController_getUserWallets","parameters":[{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"User wallets retrieved"},"401":{"description":"Unauthorized"}},"security":[{"bearer":[]}],"summary":"Get all wallets for a user (uses authenticated user ID)","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/{id}/session-keys":{"post":{"operationId":"SmartWalletController_createSessionKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionKeyRequestDto"}}}},"responses":{"201":{"description":"Session key created successfully"},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"403":{"description":"Not your wallet"},"404":{"description":"Wallet not found"}},"security":[{"bearer":[]}],"summary":"Create a session key for mobile auth","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/{id}/execute":{"post":{"operationId":"SmartWalletController_executeTransaction","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteTransactionRequestDto"}}}},"responses":{"200":{"description":"Transaction submitted successfully"},"400":{"description":"Invalid input"},"401":{"description":"Unauthorized"},"403":{"description":"Not your wallet"},"404":{"description":"Wallet not found"},"429":{"description":"Rate limit exceeded"}},"security":[{"bearer":[]}],"summary":"Execute a gasless transaction","tags":["Smart Wallets"]}},"/api/v1/smart-wallets/session-keys/{id}/revoke":{"post":{"operationId":"SmartWalletController_revokeSessionKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Session key revoked successfully"},"401":{"description":"Unauthorized"},"403":{"description":"Not your wallet"},"404":{"description":"Session key not found"}},"security":[{"bearer":[]}],"summary":"Revoke a session key","tags":["Smart Wallets"]}}},"info":{"title":"Smart Wallets API","description":"PXL8 Smart Wallets Service - ERC-4337 Account Abstraction with ZeroDev","version":"1.0","contact":{}},"tags":[{"name":"Smart Wallets","description":"Smart wallet management endpoints"}],"servers":[{"url":"https://api.pxl8.io","description":"Production API"},{"url":"http://localhost:3004","description":"Local Development"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CreateSmartWalletRequestDto":{"type":"object","properties":{"ownerAddress":{"type":"string","description":"Owner address (EOA that controls the smart wallet)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"},"chainId":{"type":"number","description":"Chain ID","example":80002,"enum":[1,137,8453,80002,11155111,84532]},"metadata":{"type":"object","description":"Additional metadata","example":{"purpose":"mobile wallet"}}},"required":["ownerAddress","chainId"]},"CreateSessionKeyRequestDto":{"type":"object","properties":{"publicKey":{"type":"string","description":"Public key for the session","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"},"permissions":{"type":"object","description":"Session key permissions","example":{"targets":["0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"],"selectors":["0xa9059cbb"],"maxValuePerUse":"1000000000000000000"}},"expiryDays":{"type":"number","description":"Number of days until expiry (default: 30)","example":30,"minimum":1,"maximum":365},"metadata":{"type":"object","description":"Additional metadata","example":{"device":"mobile","platform":"ios"}}},"required":["publicKey"]},"ExecuteTransactionRequestDto":{"type":"object","properties":{"to":{"type":"string","description":"Target address","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"},"value":{"type":"string","description":"Value in wei","example":"1000000000000000000","default":"0"},"data":{"type":"string","description":"Transaction data (hex encoded)","example":"0xa9059cbb000000000000000000000000742d35cc6634c0532925a3b844bc9e7595f0beb00000000000000000000000000000000000000000000000000de0b6b3a7640000","default":"0x"},"usePaymaster":{"type":"boolean","description":"Use paymaster for gas sponsorship","example":true,"default":true},"metadata":{"type":"object","description":"Additional metadata","example":{"description":"Token transfer"}}},"required":["to","value","data"]}}}}