-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi-gpt-ledger.json
More file actions
4592 lines (4592 loc) · 130 KB
/
Copy pathopenapi-gpt-ledger.json
File metadata and controls
4592 lines (4592 loc) · 130 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.1.0",
"info": {
"title": "Regen Network API (GPT)",
"description": "GPT-optimized API for Regen Network. Combines blockchain ledger data and knowledge base search.\n\n**IMPORTANT**: Call /regen-api/summary first to understand available endpoints.\n\nUnified API for Regen Network combining blockchain ledger data and knowledge base search.\n\n## Two API Modules\n\n### 1. Ledger API (`/regen-api/*`)\nQuery Regen Network blockchain for ecological credits, carbon markets, governance, and staking.\n- **Ecocredits** (4): Credit types, classes, projects, batches\n- **Marketplace** (2): Sell orders, allowed denoms\n- **Baskets** (3): Basket tokens with balances\n- **Bank** (5): Accounts, balances, supply, metadata, params\n- **Distribution** (4): Staking rewards, validator/delegator info\n- **Governance** (4): Proposals, voting, params, community pool\n- **Analytics** (3): Portfolio analysis, market trends, methodology comparison\n\n### 2. Knowledge API (`/api/koi/*`)\nSemantic search across 6,500+ documents about regenerative agriculture, Regen Network, and ecological credits.\n- **Search**: Hybrid semantic search with RRF ranking\n- **Stats**: Knowledge base statistics\n- **Weekly Digest**: Curated weekly summaries\n\nAll queries are read-only.",
"version": "3.0.0"
},
"servers": [
{
"url": "https://regen.gaiaai.xyz",
"description": "Production API (Ledger Action)"
}
],
"components": {
"schemas": {
"DataSourceEnum": {
"type": "string",
"enum": [
"on-chain",
"koi-derived",
"estimated",
"cached",
"metadata"
],
"description": "Data source classification"
},
"OnChainAsOf": {
"type": "object",
"properties": {
"chain_id": {
"type": "string",
"default": "regen-1",
"description": "Blockchain chain ID"
},
"block_height": {
"type": "integer",
"description": "Block height when data was queried"
},
"block_time": {
"type": "string",
"description": "Block timestamp (ISO 8601)"
}
}
},
"KoiAsOf": {
"type": "object",
"properties": {
"corpus_version": {
"type": "string",
"description": "KOI corpus version identifier"
},
"indexed_at": {
"type": "string",
"description": "When the KOI data was last indexed (ISO 8601)"
}
}
},
"MetadataAsOf": {
"type": "object",
"properties": {
"iri": {
"type": "string",
"description": "Metadata IRI that was resolved"
},
"resolved_at": {
"type": "string",
"description": "When metadata was resolved (ISO 8601)"
}
}
},
"AsOf": {
"type": "object",
"description": "Data freshness metadata",
"properties": {
"on_chain": {
"$ref": "#/components/schemas/OnChainAsOf"
},
"koi": {
"$ref": "#/components/schemas/KoiAsOf"
},
"metadata": {
"$ref": "#/components/schemas/MetadataAsOf"
}
}
},
"ToolTrace": {
"type": "object",
"description": "Trace entry for operations executed",
"properties": {
"tool": {
"type": "string",
"description": "Tool or operation name"
},
"params_summary": {
"type": "string",
"description": "Redacted summary of params"
},
"timestamp": {
"type": "string",
"description": "When the tool was invoked (ISO 8601)"
},
"data_source": {
"$ref": "#/components/schemas/DataSourceEnum"
},
"duration_ms": {
"type": "number",
"description": "Operation duration in milliseconds"
}
},
"required": [
"tool",
"params_summary",
"timestamp",
"data_source"
]
},
"ApiError": {
"type": "object",
"description": "Structured error with retryability information",
"properties": {
"code": {
"type": "string",
"description": "Error code (e.g., 'GOVERNANCE_UNAVAILABLE')"
},
"message": {
"type": "string",
"description": "Human-readable error message"
},
"retryable": {
"type": "boolean",
"default": false,
"description": "Whether the client should retry"
},
"retry_after_ms": {
"type": "integer",
"description": "Suggested wait time before retry (ms)"
},
"details": {
"type": "object",
"description": "Additional error context"
}
},
"required": [
"code",
"message"
]
},
"Citation": {
"type": "object",
"description": "Citation for KOI-derived data",
"properties": {
"rid": {
"type": "string",
"description": "KOI record ID"
},
"url": {
"type": "string",
"description": "Canonical URL to source"
},
"title": {
"type": "string",
"description": "Source title"
},
"excerpt": {
"type": "string",
"description": "Relevant excerpt/quote"
},
"verified": {
"type": "boolean",
"description": "Whether the link has been verified"
},
"checked_at": {
"type": "string",
"description": "When link was last verified (ISO 8601)"
}
},
"required": [
"rid"
]
},
"PaginationMeta": {
"type": "object",
"description": "Standardized pagination metadata",
"properties": {
"offset": {
"type": "integer",
"default": 0,
"description": "Current offset"
},
"limit": {
"type": "integer",
"default": 100,
"description": "Page size limit"
},
"total": {
"type": "integer",
"description": "Total number of items (if known)"
},
"has_more": {
"type": "boolean",
"description": "Whether more results exist"
},
"next_offset": {
"type": "integer",
"description": "Offset for next page (if has_more)"
}
}
},
"Coin": {
"type": "object",
"description": "Cosmos SDK coin representation",
"properties": {
"denom": {
"type": "string",
"description": "Token denomination"
},
"amount": {
"type": "string",
"description": "Token amount as string"
}
},
"required": [
"denom",
"amount"
]
},
"CreditType": {
"type": "object",
"description": "Credit type information",
"properties": {
"abbreviation": {
"type": "string",
"description": "Credit type abbreviation (e.g., 'C')"
},
"name": {
"type": "string",
"description": "Full credit type name"
},
"unit": {
"type": "string",
"description": "Unit of measurement"
},
"precision": {
"type": "integer",
"description": "Decimal precision"
}
},
"required": [
"abbreviation",
"name",
"unit",
"precision"
]
},
"CreditClass": {
"type": "object",
"description": "Credit class (methodology) information",
"properties": {
"id": {
"type": "string",
"description": "Class ID"
},
"admin": {
"type": "string",
"description": "Class administrator address"
},
"metadata": {
"type": "string",
"description": "Class metadata IRI"
},
"credit_type_abbrev": {
"type": "string",
"description": "Credit type abbreviation"
}
},
"required": [
"id",
"admin",
"metadata",
"credit_type_abbrev"
]
},
"Project": {
"type": "object",
"description": "Ecological project information",
"properties": {
"id": {
"type": "string",
"description": "Project ID"
},
"admin": {
"type": "string",
"description": "Project administrator address"
},
"class_id": {
"type": "string",
"description": "Associated credit class ID"
},
"jurisdiction": {
"type": "string",
"description": "Project jurisdiction"
},
"metadata": {
"type": "string",
"description": "Project metadata IRI"
},
"reference_id": {
"type": "string",
"description": "External reference ID"
},
"hectares": {
"type": "number",
"description": "Project area in hectares (when include_offchain_metrics=true)"
},
"hectares_citation": {
"$ref": "#/components/schemas/Citation"
}
},
"required": [
"id",
"admin",
"class_id",
"jurisdiction",
"metadata"
]
},
"CreditBatch": {
"type": "object",
"description": "Credit batch information",
"properties": {
"issuer": {
"type": "string",
"description": "Batch issuer address"
},
"project_id": {
"type": "string",
"description": "Associated project ID"
},
"denom": {
"type": "string",
"description": "Batch denomination"
},
"metadata": {
"type": "string",
"description": "Batch metadata IRI"
},
"start_date": {
"type": "string",
"description": "Monitoring start date"
},
"end_date": {
"type": "string",
"description": "Monitoring end date"
},
"issuance_date": {
"type": "string",
"description": "Issuance date"
},
"open": {
"type": "boolean",
"description": "Whether batch is open for additional issuance"
}
},
"required": [
"issuer",
"project_id",
"denom",
"metadata",
"open"
]
},
"SellOrder": {
"type": "object",
"description": "Marketplace sell order",
"properties": {
"id": {
"type": "string",
"description": "Sell order ID"
},
"seller": {
"type": "string",
"description": "Seller address"
},
"batch_denom": {
"type": "string",
"description": "Credit batch denomination"
},
"quantity": {
"type": "string",
"description": "Credit quantity for sale"
},
"ask_denom": {
"type": "string",
"description": "Ask denomination"
},
"ask_amount": {
"type": "string",
"description": "Ask amount per credit"
},
"disable_auto_retire": {
"type": "boolean",
"description": "Whether auto-retire is disabled"
},
"expiration": {
"type": "string",
"description": "Order expiration (ISO 8601)"
}
},
"required": [
"id",
"seller",
"batch_denom",
"quantity"
]
},
"AllowedDenom": {
"type": "object",
"description": "Allowed denomination for marketplace payments",
"properties": {
"bank_denom": {
"type": "string",
"description": "Bank denomination"
},
"display_denom": {
"type": "string",
"description": "Display denomination"
},
"exponent": {
"type": "integer",
"description": "Decimal exponent"
}
},
"required": [
"bank_denom",
"display_denom",
"exponent"
]
},
"Basket": {
"type": "object",
"description": "Ecocredit basket information",
"properties": {
"basket_denom": {
"type": "string",
"description": "Basket denomination"
},
"name": {
"type": "string",
"description": "Basket name"
},
"disable_auto_retire": {
"type": "boolean",
"description": "Whether auto-retire is disabled"
},
"credit_type_abbrev": {
"type": "string",
"description": "Credit type abbreviation"
},
"date_criteria": {
"type": "object",
"description": "Date acceptance criteria"
},
"exponent": {
"type": "integer",
"description": "Decimal exponent"
},
"curator": {
"type": "string",
"description": "Basket curator address"
}
},
"required": [
"basket_denom",
"name",
"credit_type_abbrev",
"curator"
]
},
"BasketBalance": {
"type": "object",
"description": "Balance of credits in a basket",
"properties": {
"batch_denom": {
"type": "string",
"description": "Batch denomination"
},
"balance": {
"type": "string",
"description": "Balance amount"
}
},
"required": [
"batch_denom",
"balance"
]
},
"AccountInfo": {
"type": "object",
"description": "Account information",
"properties": {
"address": {
"type": "string",
"description": "Account address"
},
"account_number": {
"type": "string",
"description": "Account number"
},
"sequence": {
"type": "string",
"description": "Account sequence"
}
},
"required": [
"address"
]
},
"TokenMetadata": {
"type": "object",
"description": "Token denomination metadata",
"properties": {
"description": {
"type": "string",
"description": "Token description"
},
"denom_units": {
"type": "array",
"items": {
"type": "object"
},
"description": "Denomination units"
},
"base": {
"type": "string",
"description": "Base denomination"
},
"display": {
"type": "string",
"description": "Display denomination"
},
"name": {
"type": "string",
"description": "Token name"
},
"symbol": {
"type": "string",
"description": "Token symbol"
}
},
"required": [
"base",
"display"
]
},
"DistributionParams": {
"type": "object",
"description": "Distribution module parameters",
"properties": {
"community_tax": {
"type": "string",
"description": "Community tax rate"
},
"base_proposer_reward": {
"type": "string",
"description": "Base proposer reward"
},
"bonus_proposer_reward": {
"type": "string",
"description": "Bonus proposer reward"
},
"withdraw_addr_enabled": {
"type": "boolean",
"description": "Whether withdraw address changes are enabled"
}
}
},
"ValidatorDistribution": {
"type": "object",
"description": "Validator distribution information",
"properties": {
"operator_address": {
"type": "string",
"description": "Validator operator address"
},
"outstanding_rewards": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Coin"
},
"description": "Outstanding rewards"
},
"commission": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Coin"
},
"description": "Commission"
},
"slashes": {
"type": "array",
"items": {
"type": "object"
},
"description": "Slashing events"
}
},
"required": [
"operator_address"
]
},
"DelegatorDistribution": {
"type": "object",
"description": "Delegator distribution information",
"properties": {
"delegator_address": {
"type": "string",
"description": "Delegator address"
},
"rewards": {
"type": "array",
"items": {
"type": "object"
},
"description": "Rewards per validator"
},
"total": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Coin"
},
"description": "Total rewards"
},
"withdraw_address": {
"type": "string",
"description": "Withdraw address"
}
},
"required": [
"delegator_address"
]
},
"GovernanceParams": {
"type": "object",
"description": "Governance module parameters",
"properties": {
"voting_params": {
"type": "object",
"description": "Voting parameters"
},
"deposit_params": {
"type": "object",
"description": "Deposit parameters"
},
"tally_params": {
"type": "object",
"description": "Tally parameters"
}
}
},
"Proposal": {
"type": "object",
"description": "Governance proposal",
"properties": {
"proposal_id": {
"type": "string",
"description": "Proposal ID"
},
"content": {
"type": "object",
"description": "Proposal content"
},
"status": {
"type": "string",
"description": "Proposal status"
},
"final_tally_result": {
"type": "object",
"description": "Final vote tally"
},
"submit_time": {
"type": "string",
"description": "Submission time"
},
"deposit_end_time": {
"type": "string",
"description": "Deposit end time"
},
"total_deposit": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Coin"
},
"description": "Total deposited"
},
"voting_start_time": {
"type": "string",
"description": "Voting start time"
},
"voting_end_time": {
"type": "string",
"description": "Voting end time"
}
},
"required": [
"proposal_id",
"status"
]
},
"ProposalFull": {
"type": "object",
"description": "Full proposal details with votes and deposits",
"properties": {
"proposal": {
"$ref": "#/components/schemas/Proposal"
},
"votes": {
"type": "array",
"items": {
"type": "object"
},
"description": "Votes on the proposal"
},
"deposits": {
"type": "array",
"items": {
"type": "object"
},
"description": "Deposits on the proposal"
},
"tally": {
"type": "object",
"description": "Current tally result"
}
},
"required": [
"proposal"
]
},
"PortfolioAnalysis": {
"type": "object",
"description": "Portfolio impact analysis",
"properties": {
"address": {
"type": "string",
"description": "Analyzed address"
},
"analysis_type": {
"type": "string",
"description": "Type of analysis performed"
},
"total_credits": {
"type": "number",
"description": "Total credits held"
},
"credit_breakdown": {
"type": "object",
"description": "Breakdown by credit type"
},
"ecological_impact": {
"type": "object",
"description": "Ecological impact metrics"
},
"recommendations": {
"type": "array",
"items": {
"type": "string"
},
"description": "Portfolio recommendations"
}
},
"required": [
"address",
"analysis_type"
]
},
"MarketTrends": {
"type": "object",
"description": "Market trends analysis",
"properties": {
"time_period": {
"type": "string",
"description": "Analysis time period"
},
"credit_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Analyzed credit types"
},
"trends": {
"type": "object",
"description": "Trend data by credit type"
},
"summary": {
"type": "object",
"description": "Summary statistics"
}
},
"required": [
"time_period"
]
},
"MethodologyComparison": {
"type": "object",
"description": "Credit methodology comparison",
"properties": {
"class_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Compared class IDs"
},
"comparison": {
"type": "object",
"description": "Comparison results"
},
"recommendations": {
"type": "array",
"items": {
"type": "string"
},
"description": "Recommendations"
}
},
"required": [
"class_ids"
]
},
"ApiCapabilities": {
"type": "object",
"description": "API capabilities summary",
"properties": {
"name": {
"type": "string",
"description": "API name"
},
"description": {
"type": "string",
"description": "API description"
},
"capabilities": {
"type": "object",
"description": "Available API capabilities grouped by category"
}
},
"required": [
"name",
"capabilities"
]
},
"KoiSearchResult": {
"type": "object",
"description": "Individual search result",
"properties": {
"title": {
"type": "string",
"description": "Document title"
},
"content": {
"type": "string",
"description": "Content excerpt"
},
"score": {
"type": "number",
"description": "Relevance score"
},
"source": {
"type": "string",
"description": "Source type"
},
"rid": {
"type": "string",
"description": "Record ID"
},
"metadata": {
"type": "object",
"description": "Additional metadata"
}
},
"required": [
"title",
"content",
"score",
"rid"
]
},
"KoiSearchResponse": {
"type": "object",
"description": "Knowledge base search response",
"properties": {
"question": {
"type": "string",
"description": "Original search query"
},
"total_results": {
"type": "integer",
"description": "Total results found"
},
"confidence": {
"type": "number",
"description": "Overall confidence score"
},
"execution_time": {
"type": "number",
"description": "Query execution time in seconds"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/KoiSearchResult"
},
"description": "Search results"
},
"answerable": {
"type": "boolean",
"description": "Whether the query can be reliably answered with available evidence"
},
"answerability_reason": {
"type": "string",
"enum": [
"sufficient_evidence",
"no_recent_sources",
"no_dated_sources",
"sources_only_identity_mentions",
"policy_filtered_all_sources",
"ambiguous_entity",
"insufficient_candidates"
],
"description": "Reason for answerability status"
},
"evidence_summary": {
"type": "string",
"description": "Summary of supporting evidence found (when answerable)"
},
"profile_debug": {
"type": "object",
"description": "Retrieval profile debug info",
"properties": {
"profile_name": {
"type": "string",
"description": "Name of the profile used"
},
"profile_version": {
"type": "string",
"description": "Version of the profile"
},
"effective_policy": {
"type": "string",
"enum": [
"public",
"internal_ok"
],
"description": "Effective policy after auth check"
},
"recency_window_used": {
"type": "integer",
"description": "Recency window in months (0 = none)"
},
"candidates_total": {
"type": "integer",
"description": "Candidates before filtering"
},
"candidates_filtered": {
"type": "integer",
"description": "Candidates removed by profile"
},
"candidates_kept": {
"type": "integer",
"description": "Candidates kept after filtering"
}
}
}
},
"required": [
"question",
"total_results",
"results"
]
},
"KoiGraphResponse": {
"type": "object",
"description": "Code graph query response",
"properties": {
"query_type": {
"type": "string",
"description": "Type of query performed"
},
"total_results": {
"type": "integer",
"description": "Total results"
},
"results": {
"type": "array",
"items": {
"type": "object"
},
"description": "Query results"
}