{"openapi":"3.1.0","info":{"title":"HALOWERK govwerk","version":"1.0.0","description":"HALOWERK govwerk — bezahlte Endpunkte nach x402. Preise in USDC auf Base Mainnet.","contact":{"url":"https://gov.halowerk.com/"}},"servers":[{"url":"https://gov.halowerk.com"}],"paths":{"/v1/proposal-summary":{"post":{"operationId":"govwerk_proposal_summary","summary":"Produces an extractive proposal summary and ranked keywords.","description":"Splits caller-supplied proposal text into sentences, scores each sentence by normalized non-stopword frequency, and returns the highest-scoring sentences in source order. It does not infer unstated intent, verify claims, or produce an abstractive interpretation.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","minLength":20,"maxLength":50000,"description":"Proposal text to summarize."},"max_sentences":{"type":"integer","minimum":1,"maximum":10,"description":"Maximum number of source sentences to return."},"max_keywords":{"type":"integer","minimum":1,"maximum":30,"description":"Maximum number of frequency-ranked keywords."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/vote-buying-detect":{"post":{"operationId":"govwerk_vote_buying_detect","summary":"Flags vote records with unusually large, recent, or repeated associated transfers.","description":"Scores caller-supplied vote/transfer observations using cohort-relative transfer size, transfer recency, and repeated-counterparty count. The output is an investigative triage heuristic, not proof of vote buying, identity linkage, or wrongdoing.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["observations"],"additionalProperties":false,"properties":{"observations":{"type":"array","minItems":3,"maxItems":10000,"items":{"type":"object","required":["voter_id","choice","associated_transfer_amount","transfer_age_hours","repeated_counterparty_count"],"additionalProperties":false,"properties":{"voter_id":{"type":"string","minLength":1,"maxLength":128},"choice":{"type":"string","enum":["for","against","abstain"]},"associated_transfer_amount":{"type":"number","minimum":0,"maximum":1000000000000000,"description":"Caller-linked transfer amount in one consistent unit."},"transfer_age_hours":{"type":"number","minimum":0,"maximum":8760,"description":"Hours between transfer and vote."},"repeated_counterparty_count":{"type":"integer","minimum":0,"maximum":100000,"description":"Prior linked transfers with the same counterparty."}}}},"flag_threshold":{"type":"number","minimum":0,"maximum":1,"description":"Risk-score threshold used only for triage."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/delegate-alignment":{"post":{"operationId":"govwerk_delegate_alignment","summary":"Measures voting alignment between a delegate and a reference profile.","description":"Joins caller-supplied vote vectors by proposal ID, encodes against/abstain/for as -1/0/1, and computes weighted cosine similarity plus exact agreement. It describes only supplied overlapping votes and does not infer ideology or future behavior.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["delegate_votes","reference_votes"],"additionalProperties":false,"properties":{"delegate_votes":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["proposal_id","vote"],"additionalProperties":false,"properties":{"proposal_id":{"type":"string","minLength":1,"maxLength":128},"vote":{"type":"integer","enum":[-1,0,1]},"weight":{"type":"number","minimum":0.000001,"maximum":1000000000000}}}},"reference_votes":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["proposal_id","vote"],"additionalProperties":false,"properties":{"proposal_id":{"type":"string","minLength":1,"maxLength":128},"vote":{"type":"integer","enum":[-1,0,1]}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/treasury-runway":{"post":{"operationId":"govwerk_treasury_runway","summary":"Projects treasury balances and reports the first unfunded month.","description":"Subtracts committed liabilities at month zero, then projects recurring inflow and operating outflow with caller-supplied monthly growth rates. It is a scenario calculation, not a forecast of prices, token liquidity, exchange rates, or future governance decisions.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["starting_balance","committed_liabilities","monthly_inflow","monthly_outflow","horizon_months"],"additionalProperties":false,"properties":{"starting_balance":{"type":"number","minimum":0,"maximum":1000000000000000000},"committed_liabilities":{"type":"number","minimum":0,"maximum":1000000000000000000},"monthly_inflow":{"type":"number","minimum":0,"maximum":1000000000000000000},"monthly_outflow":{"type":"number","minimum":0,"maximum":1000000000000000000},"monthly_inflow_growth_percent":{"type":"number","minimum":-100,"maximum":1000},"monthly_outflow_growth_percent":{"type":"number","minimum":-100,"maximum":1000},"horizon_months":{"type":"integer","minimum":1,"maximum":240}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/quadratic-funding-calc":{"post":{"operationId":"govwerk_quadratic_funding_calc","summary":"Calculates quadratic-funding match scores and a proportional budget allocation.","description":"Caps individual contributions when requested, computes each project’s raw quadratic match as (sum sqrt(contribution))² minus direct contributions, and allocates a fixed matching pool proportionally. It does not detect Sybil identities, move funds, or decide project eligibility.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contributions","matching_pool"],"additionalProperties":false,"properties":{"contributions":{"type":"array","minItems":1,"maxItems":50000,"items":{"type":"object","required":["project_id","contributor_id","amount"],"additionalProperties":false,"properties":{"project_id":{"type":"string","minLength":1,"maxLength":128},"contributor_id":{"type":"string","minLength":1,"maxLength":128},"amount":{"type":"number","minimum":0.000001,"maximum":1000000000000000}}}},"matching_pool":{"type":"number","minimum":0,"maximum":1000000000000000000},"per_contribution_cap":{"type":"number","minimum":0.000001,"maximum":1000000000000000}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/snapshot-verify":{"post":{"operationId":"govwerk_snapshot_verify","summary":"Canonicalizes snapshot entries, computes their SHA-256 digest, and checks a claimed digest.","description":"Sorts unique scalar key/value entries through canonical JSON serialization and computes SHA-256. It verifies byte-level agreement with an optional claimed digest only; it does not prove block inclusion, timestamp, signer identity, or chain consensus.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["entries"],"additionalProperties":false,"properties":{"entries":{"type":"array","minItems":1,"maxItems":50000,"items":{"type":"object","required":["key","value"],"additionalProperties":false,"properties":{"key":{"type":"string","minLength":1,"maxLength":256},"value":{"type":["string","number","boolean","null"]}}}},"claimed_sha256":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/regulatory-check":{"post":{"operationId":"govwerk_regulatory_check","summary":"Evaluates structured facts against explicit caller-supplied compliance rules.","description":"Joins scalar facts by field name and evaluates explicit equals, not-equals, numeric bound, membership, contains, and existence rules. It does not retrieve law, determine which rules apply, provide legal advice, or certify regulatory compliance.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["facts","rules"],"additionalProperties":false,"properties":{"facts":{"type":"array","maxItems":10000,"items":{"type":"object","required":["field","value"],"additionalProperties":false,"properties":{"field":{"type":"string","minLength":1,"maxLength":256},"value":{"type":["string","number","boolean","null"]}}}},"rules":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["rule_id","field","operator"],"additionalProperties":false,"properties":{"rule_id":{"type":"string","minLength":1,"maxLength":128},"field":{"type":"string","minLength":1,"maxLength":256},"operator":{"type":"string","enum":["equals","not_equals","gte","lte","in","contains","exists"]},"expected":{"type":["string","number","boolean","null"]},"allowed_values":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":["string","number","boolean","null"]}}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/sentiment-analysis":{"post":{"operationId":"govwerk_sentiment_analysis","summary":"Counts positive and negative lexicon matches in governance text.","description":"Tokenizes caller-supplied text and counts matches against a small declared English/German unigram lexicon. It reports coverage and a normalized polarity score; it does not understand context, sarcasm, negation, policy merit, or public opinion.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["text"],"additionalProperties":false,"properties":{"text":{"type":"string","minLength":1,"maxLength":50000,"description":"Text to score."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/voter-turnout-predict":{"post":{"operationId":"govwerk_voter_turnout_predict","summary":"Estimates turnout from prior turnout, campaign reminders, voting window, and participation trend.","description":"Applies a fixed, published logistic equation to aggregate caller-supplied features and reports an estimated turnout range. It is an untrained scenario heuristic, not a calibrated election forecast, individual propensity score, or basis for voter targeting.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["eligible_voters","prior_turnout_rate","participation_trend_percentage_points","voting_window_days","reminders_per_voter","proposal_count"],"additionalProperties":false,"properties":{"eligible_voters":{"type":"integer","minimum":1,"maximum":1000000000},"prior_turnout_rate":{"type":"number","minimum":0,"maximum":1},"participation_trend_percentage_points":{"type":"number","minimum":-100,"maximum":100},"voting_window_days":{"type":"number","minimum":0.01,"maximum":365},"reminders_per_voter":{"type":"number","minimum":0,"maximum":100},"proposal_count":{"type":"integer","minimum":1,"maximum":10000}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/token-gini-index":{"post":{"operationId":"govwerk_token_gini_index","summary":"Computes the Gini coefficient and top-holder shares for supplied token balances.","description":"Sorts caller-supplied non-negative balances and computes the standard finite-sample Gini coefficient plus top-one and top-ten-percent shares. Results cover only supplied accounts and do not identify common ownership, custodians, vesting, delegation, or off-chain claims.","tags":["govwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["holders"],"additionalProperties":false,"properties":{"holders":{"type":"array","minItems":1,"maxItems":100000,"items":{"type":"object","required":["holder_id","balance"],"additionalProperties":false,"properties":{"holder_id":{"type":"string","minLength":1,"maxLength":128},"balance":{"type":"number","minimum":0,"maximum":1e+24}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}}},"components":{"schemas":{"PaymentRequired":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}}}}},"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 Zahlungsnachweis"}}}}