{"openapi": "3.1.0", "info": {"title": "NinjaAPI", "version": "1.0.0", "description": ""}, "paths": {"/ceramic-cache/stamps/bulk": {"post": {"operationId": "ceramic_cache_api_v1_cache_stamps", "summary": "Cache Stamps", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetStampsWithInternalV2ScoreResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CacheStampPayload"}, "title": "Payload", "type": "array"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}, "patch": {"operationId": "ceramic_cache_api_v1_patch_stamps", "summary": "Patch Stamps", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetStampsWithInternalV2ScoreResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/CacheStampPayload"}, "title": "Payload", "type": "array"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}, "delete": {"operationId": "ceramic_cache_api_v1_delete_stamps", "summary": "Delete Stamps", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetStampResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/DeleteStampPayload"}, "title": "Payload", "type": "array"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/stamps/bulk/meta/compose-db": {"patch": {"operationId": "ceramic_cache_api_v1_update_compose_db_status", "summary": "Update Compose Db Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ComporeDBStatusResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ComposeDBStatusPayload"}, "title": "Payload", "type": "array"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/weights": {"get": {"operationId": "ceramic_cache_api_v1_get_scorer_weights", "summary": "Get Scorer Weights", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": {"type": "number"}, "title": "Response", "type": "object"}}}}}}}, "/ceramic-cache/stamp": {"get": {"operationId": "ceramic_cache_api_v1_get_stamps", "summary": "Get Stamps", "parameters": [{"in": "query", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetStampResponse"}}}}}}}, "/ceramic-cache/score/{address}": {"get": {"operationId": "ceramic_cache_api_v1_get_score", "summary": "Get Score", "parameters": [{"in": "path", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}, {"in": "query", "name": "alternate_scorer_id", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Alternate Scorer Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalV2ScoreResponse"}}}}}, "security": [{"JWTDidAuth": []}]}, "post": {"operationId": "ceramic_cache_api_v1_calc_score", "summary": "Calc Score", "parameters": [{"in": "path", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalV2ScoreResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CalcScorePayload"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/stake/gtc": {"get": {"operationId": "ceramic_cache_api_v1_get_staked_gtc", "summary": "Get Staked Gtc", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StakeResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessageResponse"}}}}}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/tos/accepted/{tos_type}/{address}": {"get": {"operationId": "ceramic_cache_api_v1_tos_check_accepted", "summary": "Check that tos was accepted", "parameters": [{"in": "path", "name": "tos_type", "schema": {"title": "Tos Type", "type": "string"}, "required": true}, {"in": "path", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TosAccepted"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessageResponse"}}}}}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/tos/message-to-sign/{tos_type}/{address}": {"get": {"operationId": "ceramic_cache_api_v1_get_tos_to_sign", "summary": "Get the tos message to sign", "parameters": [{"in": "path", "name": "tos_type", "schema": {"title": "Tos Type", "type": "string"}, "required": true}, {"in": "path", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TosToSign"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessageResponse"}}}}}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/tos/signed-message/{tos_type}/{address}": {"post": {"operationId": "ceramic_cache_api_v1_accept_tos", "summary": "Accept the tos", "parameters": [{"in": "path", "name": "tos_type", "schema": {"title": "Tos Type", "type": "string"}, "required": true}, {"in": "path", "name": "address", "schema": {"title": "Address", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorMessageResponse"}}}}}, "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TosSigned"}}}, "required": true}, "security": [{"JWTDidAuth": []}]}}, "/ceramic-cache/authenticate/v2": {"post": {"operationId": "ceramic_cache_api_v1_authenticate_v2", "summary": "Authenticate V2", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccessTokenResponse"}}}}}, "description": "SIWE-based authentication endpoint that supports both EOA and smart contract wallets.\nAccepts SIWE message + signature instead of DagJWS/CACAO.\nReturns JWT with `did` claim in format `did:pkh:eip155:1:0xADDRESS`", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiweVerifySubmit"}}}, "required": true}}}}, "components": {"schemas": {"CachedStampResponse": {"properties": {"id": {"title": "Id", "type": "integer"}, "address": {"title": "Address", "type": "string"}, "provider": {"title": "Provider", "type": "string"}, "stamp": {"title": "Stamp"}}, "required": ["id", "address", "provider", "stamp"], "title": "CachedStampResponse", "type": "object"}, "GetStampsWithInternalV2ScoreResponse": {"description": "Internal response that includes stamps and score with human points data", "properties": {"success": {"title": "Success", "type": "boolean"}, "stamps": {"items": {"$ref": "#/components/schemas/CachedStampResponse"}, "title": "Stamps", "type": "array"}, "score": {"$ref": "#/components/schemas/InternalV2ScoreResponse"}}, "required": ["success", "stamps", "score"], "title": "GetStampsWithInternalV2ScoreResponse", "type": "object"}, "InternalV2ScoreResponse": {"description": "Internal score response that includes human points data when available", "properties": {"address": {"title": "Address", "type": "string"}, "score": {"anyOf": [{"type": "number"}, {"type": "string"}, {"type": "null"}], "title": "Score"}, "passing_score": {"title": "Passing Score", "type": "boolean"}, "last_score_timestamp": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Score Timestamp"}, "expiration_timestamp": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expiration Timestamp"}, "threshold": {"anyOf": [{"type": "number"}, {"type": "string"}], "title": "Threshold"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "stamps": {"anyOf": [{"additionalProperties": {"$ref": "#/components/schemas/V2StampScoreResponse"}, "type": "object"}, {"type": "null"}], "title": "Stamps"}, "points_data": {"anyOf": [{"$ref": "#/components/schemas/PointsData"}, {"type": "null"}]}, "possible_points_data": {"anyOf": [{"$ref": "#/components/schemas/PointsData"}, {"type": "null"}]}, "linked_score": {"anyOf": [{"$ref": "#/components/schemas/LinkedScoreResponse"}, {"type": "null"}]}}, "required": ["address", "score", "passing_score", "last_score_timestamp", "expiration_timestamp", "threshold", "error", "stamps"], "title": "InternalV2ScoreResponse", "type": "object"}, "LinkedScoreResponse": {"description": "Score data from the canonical wallet in a linked wallet group.", "properties": {"address": {"title": "Address", "type": "string"}, "score": {"anyOf": [{"type": "number"}, {"type": "string"}, {"type": "null"}], "title": "Score"}, "passing_score": {"title": "Passing Score", "type": "boolean"}, "last_score_timestamp": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Score Timestamp"}, "expiration_timestamp": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expiration Timestamp"}, "threshold": {"anyOf": [{"type": "number"}, {"type": "string"}], "title": "Threshold"}, "stamps": {"anyOf": [{"additionalProperties": {"$ref": "#/components/schemas/V2StampScoreResponse"}, "type": "object"}, {"type": "null"}], "title": "Stamps"}, "wallet_stamps": {"anyOf": [{"additionalProperties": {"additionalProperties": {"$ref": "#/components/schemas/V2StampScoreResponse"}, "type": "object"}, "type": "object"}, {"type": "null"}], "title": "Wallet Stamps"}}, "required": ["address", "score", "passing_score", "last_score_timestamp", "expiration_timestamp", "threshold", "stamps"], "title": "LinkedScoreResponse", "type": "object"}, "PointsData": {"properties": {"total_points": {"title": "Total Points", "type": "integer"}, "is_eligible": {"title": "Is Eligible", "type": "boolean"}, "multiplier": {"title": "Multiplier", "type": "integer"}, "breakdown": {"additionalProperties": {"type": "integer"}, "title": "Breakdown", "type": "object"}}, "required": ["total_points", "is_eligible", "multiplier", "breakdown"], "title": "PointsData", "type": "object"}, "V2StampScoreResponse": {"properties": {"score": {"title": "Score", "type": "string"}, "dedup": {"title": "Dedup", "type": "boolean"}, "expiration_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expiration Date"}, "source_wallet": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Wallet"}}, "required": ["score", "dedup", "expiration_date"], "title": "V2StampScoreResponse", "type": "object"}, "CacheStampPayload": {"properties": {"address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "provider": {"title": "Provider", "type": "string"}, "stamp": {"anyOf": [{}, {"type": "null"}], "title": "Stamp"}}, "required": ["provider"], "title": "CacheStampPayload", "type": "object"}, "GetStampResponse": {"properties": {"success": {"title": "Success", "type": "boolean"}, "stamps": {"items": {"$ref": "#/components/schemas/CachedStampResponse"}, "title": "Stamps", "type": "array"}}, "required": ["success", "stamps"], "title": "GetStampResponse", "type": "object"}, "DeleteStampPayload": {"properties": {"address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "provider": {"title": "Provider", "type": "string"}}, "required": ["provider"], "title": "DeleteStampPayload", "type": "object"}, "ComporeDBStatusResponse": {"properties": {"updated": {"items": {"type": "integer"}, "title": "Updated", "type": "array"}}, "required": ["updated"], "title": "ComporeDBStatusResponse", "type": "object"}, "ComposeDBSaveStatus": {"enum": ["pending", "saved", "failed"], "title": "ComposeDBSaveStatus", "type": "string"}, "ComposeDBStatusPayload": {"properties": {"id": {"title": "Id", "type": "integer"}, "compose_db_save_status": {"$ref": "#/components/schemas/ComposeDBSaveStatus"}, "compose_db_stream_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Compose Db Stream Id"}}, "required": ["id", "compose_db_save_status"], "title": "ComposeDBStatusPayload", "type": "object"}, "CalcScorePayload": {"properties": {"alternate_scorer_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Alternate Scorer Id"}}, "title": "CalcScorePayload", "type": "object"}, "StakeResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/StakeSchema"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "StakeResponse", "type": "object"}, "StakeSchema": {"properties": {"chain": {"title": "Chain", "type": "integer"}, "staker": {"title": "Staker", "type": "string"}, "stakee": {"title": "Stakee", "type": "string"}, "amount": {"anyOf": [{"type": "number"}, {"type": "string"}], "title": "Amount"}, "unlock_time": {"title": "Unlock Time", "type": "string"}, "lock_time": {"title": "Lock Time", "type": "string"}, "last_updated_in_block": {"title": "Last Updated In Block", "type": "integer"}}, "required": ["chain", "staker", "stakee", "amount", "unlock_time", "lock_time", "last_updated_in_block"], "title": "StakeSchema", "type": "object"}, "ErrorMessageResponse": {"properties": {"detail": {"title": "Detail", "type": "string"}}, "required": ["detail"], "title": "ErrorMessageResponse", "type": "object"}, "TosAccepted": {"properties": {"accepted": {"title": "Accepted", "type": "boolean"}}, "required": ["accepted"], "title": "TosAccepted", "type": "object"}, "TosToSign": {"properties": {"text": {"title": "Text", "type": "string"}, "nonce": {"title": "Nonce", "type": "string"}}, "required": ["text", "nonce"], "title": "TosToSign", "type": "object"}, "TosSigned": {"properties": {"tos_type": {"title": "Tos Type", "type": "string"}, "nonce": {"title": "Nonce", "type": "string"}, "signature": {"title": "Signature", "type": "string"}}, "required": ["tos_type", "nonce", "signature"], "title": "TosSigned", "type": "object"}, "AccessTokenResponse": {"properties": {"access": {"title": "Access", "type": "string"}, "intercom_user_hash": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Intercom User Hash"}}, "required": ["access"], "title": "AccessTokenResponse", "type": "object"}, "SiweVerifySubmit": {"properties": {"message": {"title": "Message", "type": "object"}, "signature": {"title": "Signature", "type": "string"}}, "required": ["message", "signature"], "title": "SiweVerifySubmit", "type": "object"}}, "securitySchemes": {"JWTDidAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}