grid402 2.5.3__tar.gz → 2.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {grid402-2.5.3 → grid402-2.6.0}/PKG-INFO +4 -4
- {grid402-2.5.3 → grid402-2.6.0}/README.md +2 -2
- {grid402-2.5.3 → grid402-2.6.0}/grid402/__init__.py +1 -1
- grid402-2.6.0/grid402/agentkit.py +413 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402/client.py +122 -7
- {grid402-2.5.3 → grid402-2.6.0}/grid402.egg-info/PKG-INFO +4 -4
- {grid402-2.5.3 → grid402-2.6.0}/pyproject.toml +2 -2
- {grid402-2.5.3 → grid402-2.6.0}/tests/test_sdk.py +88 -21
- grid402-2.5.3/grid402/agentkit.py +0 -216
- {grid402-2.5.3 → grid402-2.6.0}/LICENSE +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402/exceptions.py +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402/models.py +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402/py.typed +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402.egg-info/SOURCES.txt +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402.egg-info/dependency_links.txt +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402.egg-info/requires.txt +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/grid402.egg-info/top_level.txt +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/setup.cfg +0 -0
- {grid402-2.5.3 → grid402-2.6.0}/tests/test_live_sandbox.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: grid402
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: Official Grid402 Python SDK -
|
|
3
|
+
Version: 2.6.0
|
|
4
|
+
Summary: Official Grid402 Python SDK - 25 Open-Data, Web-to-Markdown, Zero-PII Email Verify, KYB 360 AI Dossier and Network Utility Microservices with Multi-Chain HTTP x402, Session Pass, RapidAPI and ECDSA Oracle Proof
|
|
5
5
|
Author-email: Grid402 Team <contato@grid402.online>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://grid402.online
|
|
@@ -40,7 +40,7 @@ Projetada especificamente para agentes autonomos de inteligencia artificial, fra
|
|
|
40
40
|
|
|
41
41
|
## Recursos Principais
|
|
42
42
|
|
|
43
|
-
- **Ecossistema Grid402 (
|
|
43
|
+
- **Ecossistema Grid402 (25 Endpoints):** Suporte direto aos métodos tipados (`status`, `forex`, `crypto`, `dns`, `ssl`, `asn`, `cep`, `cnpj`, `indicators`, `holidays`, `workdays`, `extract`, `email-verify`, `dossier` e demais rotas) e acesso padronizado HTTP x402 (`0.0050` a `0.0500 USDC` em Base, Polygon, Arbitrum e Solana ou via Session Pass `1 crédito = 0.0050 USDC`).
|
|
44
44
|
- **Gestão Segura de Carteiras:** Nunca armazene chaves privadas no código; utilize carteiras dedicadas de agente com limite de saldo (Spend Controls) ou `X-Payment: pass_g402_...`.
|
|
45
45
|
- **Zero Cadastro e Zero Friccao:** Sem necessidade de chaves de API estaticas ou contratos mensais.
|
|
46
46
|
- **Modo Sandbox Gratuito:** Teste e homologue localmente sem custos informando `sandbox=True`.
|
|
@@ -181,7 +181,7 @@ else:
|
|
|
181
181
|
| `get_ssl(host)` | Inspecao e auditoria de certificado TLS e SSL na porta 443 | 0.0050 |
|
|
182
182
|
| `get_asn(ip)` | Inteligencia de roteamento BGP, bloco alocado e ASN | 0.0050 |
|
|
183
183
|
| `get_cep(code)` | Consulta de logradouro postal brasileiro e codigo IBGE | 0.0050 |
|
|
184
|
-
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.
|
|
184
|
+
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.0100 |
|
|
185
185
|
| `get_indicators()` | Indicadores macroeconomicos oficiais (Selic meta e diaria, CDI anual e IPCA) | 0.0050 |
|
|
186
186
|
| `get_holidays(year)` | Calendario oficial de feriados nacionais e bancarios ANBIMA | 0.0050 |
|
|
187
187
|
| `get_workdays(start_date?, end_date?, days?, date?)` | Calculadora de dias uteis financeiros e projecao de vencimentos ANBIMA | 0.0050 |
|
|
@@ -8,7 +8,7 @@ Projetada especificamente para agentes autonomos de inteligencia artificial, fra
|
|
|
8
8
|
|
|
9
9
|
## Recursos Principais
|
|
10
10
|
|
|
11
|
-
- **Ecossistema Grid402 (
|
|
11
|
+
- **Ecossistema Grid402 (25 Endpoints):** Suporte direto aos métodos tipados (`status`, `forex`, `crypto`, `dns`, `ssl`, `asn`, `cep`, `cnpj`, `indicators`, `holidays`, `workdays`, `extract`, `email-verify`, `dossier` e demais rotas) e acesso padronizado HTTP x402 (`0.0050` a `0.0500 USDC` em Base, Polygon, Arbitrum e Solana ou via Session Pass `1 crédito = 0.0050 USDC`).
|
|
12
12
|
- **Gestão Segura de Carteiras:** Nunca armazene chaves privadas no código; utilize carteiras dedicadas de agente com limite de saldo (Spend Controls) ou `X-Payment: pass_g402_...`.
|
|
13
13
|
- **Zero Cadastro e Zero Friccao:** Sem necessidade de chaves de API estaticas ou contratos mensais.
|
|
14
14
|
- **Modo Sandbox Gratuito:** Teste e homologue localmente sem custos informando `sandbox=True`.
|
|
@@ -149,7 +149,7 @@ else:
|
|
|
149
149
|
| `get_ssl(host)` | Inspecao e auditoria de certificado TLS e SSL na porta 443 | 0.0050 |
|
|
150
150
|
| `get_asn(ip)` | Inteligencia de roteamento BGP, bloco alocado e ASN | 0.0050 |
|
|
151
151
|
| `get_cep(code)` | Consulta de logradouro postal brasileiro e codigo IBGE | 0.0050 |
|
|
152
|
-
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.
|
|
152
|
+
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.0100 |
|
|
153
153
|
| `get_indicators()` | Indicadores macroeconomicos oficiais (Selic meta e diaria, CDI anual e IPCA) | 0.0050 |
|
|
154
154
|
| `get_holidays(year)` | Calendario oficial de feriados nacionais e bancarios ANBIMA | 0.0050 |
|
|
155
155
|
| `get_workdays(start_date?, end_date?, days?, date?)` | Calculadora de dias uteis financeiros e projecao de vencimentos ANBIMA | 0.0050 |
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Grid402 Action Provider para Coinbase AgentKit, LangChain e CrewAI.
|
|
3
|
+
|
|
4
|
+
Permite que agentes autonomos com carteiras CDP (Coinbase Developer Platform)
|
|
5
|
+
na rede Base ou Session Pass pre-pago consultem todos os 25 servicos publicos
|
|
6
|
+
e utilitarios de rede do Grid402 com auto-liquidacao x402.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from typing import Any, Dict, Optional
|
|
10
|
+
import json
|
|
11
|
+
import os
|
|
12
|
+
import ssl
|
|
13
|
+
import time
|
|
14
|
+
import urllib.error
|
|
15
|
+
import urllib.parse
|
|
16
|
+
import urllib.request
|
|
17
|
+
|
|
18
|
+
from grid402.client import DEFAULT_ENDPOINT
|
|
19
|
+
from grid402.models import (
|
|
20
|
+
AsnInput,
|
|
21
|
+
CepInput,
|
|
22
|
+
CnpjInput,
|
|
23
|
+
CryptoInput,
|
|
24
|
+
DnsInput,
|
|
25
|
+
HolidaysInput,
|
|
26
|
+
SslInput,
|
|
27
|
+
WorkdaysInput,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
GRID402_ORACLE_WALLET = "0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90"
|
|
32
|
+
BASE_USDC_CONTRACT = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _encode_erc20_transfer_data(recipient: str, raw_units: int) -> str:
|
|
36
|
+
"""Codifica calldata ABI para ERC-20 transfer(address,uint256)."""
|
|
37
|
+
clean_recipient = str(recipient or "").lower().replace("0x", "").rjust(64, "0")
|
|
38
|
+
amount_hex = hex(int(raw_units))[2:].rjust(64, "0")
|
|
39
|
+
return f"0xa9059cbb{clean_recipient}{amount_hex}"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Grid402ActionProvider:
|
|
43
|
+
"""
|
|
44
|
+
Provedor de acoes do Grid402 compativel com Coinbase AgentKit, LangChain e CrewAI.
|
|
45
|
+
|
|
46
|
+
Suporta:
|
|
47
|
+
- Session Pass pre-pago (`session_pass` ou env `GRID402_SESSION_PASS`) para latencia <15ms;
|
|
48
|
+
- Auto-liquidacao on-chain via CDP AgentKit moderno (`send_transaction` ERC-20) ou `transfer` legado,
|
|
49
|
+
aguardando confirmacao do bloco antes do retry e validando HTTP 200;
|
|
50
|
+
- Todos os 25 micro-servicos do catalogo Grid402.
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
def __init__(
|
|
54
|
+
self,
|
|
55
|
+
base_url: str = DEFAULT_ENDPOINT,
|
|
56
|
+
sandbox: bool = False,
|
|
57
|
+
session_pass: Optional[str] = None,
|
|
58
|
+
):
|
|
59
|
+
self.base_url = base_url.rstrip("/")
|
|
60
|
+
self.sandbox = sandbox
|
|
61
|
+
self.session_pass = session_pass or os.environ.get("GRID402_SESSION_PASS") or None
|
|
62
|
+
|
|
63
|
+
def _get_ssl_context(self) -> ssl.SSLContext:
|
|
64
|
+
ctx = ssl.create_default_context()
|
|
65
|
+
if "hostingersite.com" in self.base_url:
|
|
66
|
+
ctx.check_hostname = False
|
|
67
|
+
ctx.verify_mode = ssl.CERT_NONE
|
|
68
|
+
return ctx
|
|
69
|
+
|
|
70
|
+
def _send_and_confirm_usdc(
|
|
71
|
+
self,
|
|
72
|
+
wallet_provider: Any,
|
|
73
|
+
recipient: str,
|
|
74
|
+
price_usdc: str,
|
|
75
|
+
raw_units: int,
|
|
76
|
+
token_contract: str,
|
|
77
|
+
) -> str:
|
|
78
|
+
"""Executa transferencia ERC-20 USDC e aguarda confirmacao antes do retry."""
|
|
79
|
+
if callable(getattr(wallet_provider, "send_transaction", None)):
|
|
80
|
+
calldata = _encode_erc20_transfer_data(recipient, raw_units)
|
|
81
|
+
transfer_result = wallet_provider.send_transaction(
|
|
82
|
+
{"to": token_contract, "data": calldata, "value": 0}
|
|
83
|
+
)
|
|
84
|
+
elif callable(getattr(wallet_provider, "transfer", None)):
|
|
85
|
+
transfer_result = wallet_provider.transfer(
|
|
86
|
+
to=recipient,
|
|
87
|
+
amount=price_usdc,
|
|
88
|
+
asset_id="usdc",
|
|
89
|
+
)
|
|
90
|
+
else:
|
|
91
|
+
raise RuntimeError(
|
|
92
|
+
"wallet_provider deve implementar send_transaction() (CDP AgentKit v0.1+) ou transfer()."
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
if isinstance(transfer_result, str):
|
|
96
|
+
tx_hash = transfer_result
|
|
97
|
+
elif isinstance(transfer_result, dict):
|
|
98
|
+
tx_hash = str(
|
|
99
|
+
transfer_result.get("transaction_hash")
|
|
100
|
+
or transfer_result.get("transactionHash")
|
|
101
|
+
or transfer_result.get("hash")
|
|
102
|
+
or ""
|
|
103
|
+
)
|
|
104
|
+
else:
|
|
105
|
+
tx_hash = str(
|
|
106
|
+
getattr(transfer_result, "transaction_hash", None)
|
|
107
|
+
or getattr(transfer_result, "hash", None)
|
|
108
|
+
or transfer_result
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
wait_fn = getattr(transfer_result, "wait", None)
|
|
112
|
+
wait_receipt_fn = getattr(wallet_provider, "wait_for_transaction_receipt", None)
|
|
113
|
+
if callable(wait_fn):
|
|
114
|
+
wait_fn()
|
|
115
|
+
elif callable(wait_receipt_fn):
|
|
116
|
+
wait_receipt_fn(tx_hash)
|
|
117
|
+
else:
|
|
118
|
+
time.sleep(2.5)
|
|
119
|
+
|
|
120
|
+
return tx_hash
|
|
121
|
+
|
|
122
|
+
def _execute_with_settlement(
|
|
123
|
+
self,
|
|
124
|
+
path: str,
|
|
125
|
+
params: Optional[Dict[str, Any]] = None,
|
|
126
|
+
wallet_provider: Any = None,
|
|
127
|
+
) -> Dict[str, Any]:
|
|
128
|
+
"""Executa requisicao HTTP com Session Pass ou auto-liquidacao x402."""
|
|
129
|
+
filtered_params = {k: v for k, v in (params or {}).items() if v is not None and v != ""}
|
|
130
|
+
query_string = urllib.parse.urlencode(filtered_params)
|
|
131
|
+
|
|
132
|
+
url = f"{self.base_url}{path}"
|
|
133
|
+
if query_string:
|
|
134
|
+
url += f"?{query_string}"
|
|
135
|
+
|
|
136
|
+
headers = {
|
|
137
|
+
"Accept": "application/json",
|
|
138
|
+
"User-Agent": "Grid402-CoinbaseAgentKit-Python/2.0",
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if self.session_pass:
|
|
142
|
+
headers["X-Payment"] = str(self.session_pass).strip()
|
|
143
|
+
elif self.sandbox:
|
|
144
|
+
headers["X-Payment"] = "demo"
|
|
145
|
+
|
|
146
|
+
req = urllib.request.Request(url, headers=headers)
|
|
147
|
+
ctx = self._get_ssl_context()
|
|
148
|
+
|
|
149
|
+
# 1. Primeira tentativa de requisicao
|
|
150
|
+
try:
|
|
151
|
+
with urllib.request.urlopen(req, context=ctx, timeout=12) as response:
|
|
152
|
+
return json.loads(response.read().decode("utf-8"))
|
|
153
|
+
except urllib.error.HTTPError as exc:
|
|
154
|
+
raw_body = exc.read().decode("utf-8")
|
|
155
|
+
try:
|
|
156
|
+
challenge = json.loads(raw_body)
|
|
157
|
+
except Exception:
|
|
158
|
+
challenge = {"error": raw_body, "status_code": exc.code}
|
|
159
|
+
|
|
160
|
+
# 2. Se retornou HTTP 402 Payment Required
|
|
161
|
+
if exc.code == 402:
|
|
162
|
+
if wallet_provider is not None and not self.sandbox:
|
|
163
|
+
price_usdc = str(challenge.get("price_usdc", "0.0050"))
|
|
164
|
+
raw_units = int(challenge.get("price_raw_units") or round(float(price_usdc) * 1_000_000) or 5000)
|
|
165
|
+
recipient = str(challenge.get("recipient_wallet") or GRID402_ORACLE_WALLET)
|
|
166
|
+
token_contract = str(challenge.get("token_contract") or BASE_USDC_CONTRACT)
|
|
167
|
+
|
|
168
|
+
try:
|
|
169
|
+
tx_hash = self._send_and_confirm_usdc(
|
|
170
|
+
wallet_provider, recipient, price_usdc, raw_units, token_contract
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
headers["X-Payment"] = tx_hash
|
|
174
|
+
retry_req = urllib.request.Request(url, headers=headers)
|
|
175
|
+
try:
|
|
176
|
+
with urllib.request.urlopen(retry_req, context=ctx, timeout=12) as retry_res:
|
|
177
|
+
status_code = getattr(retry_res, "status", 200)
|
|
178
|
+
retry_body = retry_res.read().decode("utf-8")
|
|
179
|
+
data = json.loads(retry_body)
|
|
180
|
+
if status_code == 200:
|
|
181
|
+
data["_x402_settlement"] = {
|
|
182
|
+
"settled": True,
|
|
183
|
+
"tx_hash": tx_hash,
|
|
184
|
+
"price_usdc": price_usdc,
|
|
185
|
+
"network": "Base",
|
|
186
|
+
"token": "USDC",
|
|
187
|
+
}
|
|
188
|
+
return data
|
|
189
|
+
return {
|
|
190
|
+
"payment_required": status_code == 402,
|
|
191
|
+
"error": f"Post-payment request failed with HTTP {status_code}",
|
|
192
|
+
"http_status": status_code,
|
|
193
|
+
"server_response": data,
|
|
194
|
+
"_x402_settlement": {
|
|
195
|
+
"settled": False,
|
|
196
|
+
"tx_hash": tx_hash,
|
|
197
|
+
"price_usdc": price_usdc,
|
|
198
|
+
"network": "Base",
|
|
199
|
+
"token": "USDC",
|
|
200
|
+
},
|
|
201
|
+
}
|
|
202
|
+
except urllib.error.HTTPError as retry_exc:
|
|
203
|
+
retry_err_raw = retry_exc.read().decode("utf-8")
|
|
204
|
+
try:
|
|
205
|
+
retry_err_data = json.loads(retry_err_raw)
|
|
206
|
+
except Exception:
|
|
207
|
+
retry_err_data = {"raw_body": retry_err_raw}
|
|
208
|
+
return {
|
|
209
|
+
"payment_required": retry_exc.code == 402,
|
|
210
|
+
"error": f"Post-payment request failed with HTTP {retry_exc.code}",
|
|
211
|
+
"http_status": retry_exc.code,
|
|
212
|
+
"server_response": retry_err_data,
|
|
213
|
+
"_x402_settlement": {
|
|
214
|
+
"settled": False,
|
|
215
|
+
"tx_hash": tx_hash,
|
|
216
|
+
"price_usdc": price_usdc,
|
|
217
|
+
"network": "Base",
|
|
218
|
+
"token": "USDC",
|
|
219
|
+
},
|
|
220
|
+
}
|
|
221
|
+
except Exception as pay_err:
|
|
222
|
+
challenge["payment_error"] = str(pay_err)
|
|
223
|
+
challenge["payment_required"] = True
|
|
224
|
+
return challenge
|
|
225
|
+
|
|
226
|
+
challenge["payment_required"] = True
|
|
227
|
+
return challenge
|
|
228
|
+
raise
|
|
229
|
+
|
|
230
|
+
def get_summary(self) -> Dict[str, Any]:
|
|
231
|
+
"""Resumo operacional consolidado e disponibilidade do hub Grid402 (gratuito)."""
|
|
232
|
+
return self._execute_with_settlement("/status")
|
|
233
|
+
|
|
234
|
+
def query_forex(self, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
235
|
+
return self._execute_with_settlement("/api/v1/forex", {}, wallet_provider)
|
|
236
|
+
|
|
237
|
+
def query_crypto(
|
|
238
|
+
self, symbol: Optional[str] = None, wallet_provider: Any = None
|
|
239
|
+
) -> Dict[str, Any]:
|
|
240
|
+
params = {"symbol": symbol} if symbol else {}
|
|
241
|
+
return self._execute_with_settlement("/api/v1/crypto", params, wallet_provider)
|
|
242
|
+
|
|
243
|
+
def query_dns(self, domain: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
244
|
+
return self._execute_with_settlement("/api/v1/dns", {"domain": domain}, wallet_provider)
|
|
245
|
+
|
|
246
|
+
def query_ssl(self, host: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
247
|
+
return self._execute_with_settlement("/api/v1/ssl", {"host": host}, wallet_provider)
|
|
248
|
+
|
|
249
|
+
def query_asn(self, ip: Optional[str] = None, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
250
|
+
params = {"ip": ip} if ip else {}
|
|
251
|
+
return self._execute_with_settlement("/api/v1/asn", params, wallet_provider)
|
|
252
|
+
|
|
253
|
+
def query_cep(self, code: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
254
|
+
return self._execute_with_settlement("/api/v1/cep", {"code": code}, wallet_provider)
|
|
255
|
+
|
|
256
|
+
def query_cnpj(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
257
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
258
|
+
return self._execute_with_settlement("/api/v1/cnpj", {"cnpj": clean}, wallet_provider)
|
|
259
|
+
|
|
260
|
+
def query_indicators(self, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
261
|
+
return self._execute_with_settlement("/api/v1/indicators", {}, wallet_provider)
|
|
262
|
+
|
|
263
|
+
def query_holidays(
|
|
264
|
+
self, year: Optional[int] = None, wallet_provider: Any = None
|
|
265
|
+
) -> Dict[str, Any]:
|
|
266
|
+
params = {"year": year} if year is not None else {}
|
|
267
|
+
return self._execute_with_settlement("/api/v1/holidays", params, wallet_provider)
|
|
268
|
+
|
|
269
|
+
def query_workdays(
|
|
270
|
+
self,
|
|
271
|
+
start_date: Optional[str] = None,
|
|
272
|
+
end_date: Optional[str] = None,
|
|
273
|
+
days: Optional[int] = None,
|
|
274
|
+
date: Optional[str] = None,
|
|
275
|
+
wallet_provider: Any = None,
|
|
276
|
+
) -> Dict[str, Any]:
|
|
277
|
+
params: Dict[str, Any] = {}
|
|
278
|
+
if start_date is not None:
|
|
279
|
+
params["start_date"] = start_date
|
|
280
|
+
if end_date is not None:
|
|
281
|
+
params["end_date"] = end_date
|
|
282
|
+
if days is not None:
|
|
283
|
+
params["days"] = days
|
|
284
|
+
if date is not None:
|
|
285
|
+
params["date"] = date
|
|
286
|
+
return self._execute_with_settlement("/api/v1/workdays", params, wallet_provider)
|
|
287
|
+
|
|
288
|
+
def query_sanctions(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
289
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
290
|
+
return self._execute_with_settlement("/api/v1/sanctions", {"cnpj": clean}, wallet_provider)
|
|
291
|
+
|
|
292
|
+
def query_simples(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
293
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
294
|
+
return self._execute_with_settlement("/api/v1/simples", {"cnpj": clean}, wallet_provider)
|
|
295
|
+
|
|
296
|
+
def query_compliance(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
297
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
298
|
+
return self._execute_with_settlement("/api/v1/compliance", {"cnpj": clean}, wallet_provider)
|
|
299
|
+
|
|
300
|
+
def query_dossier_360(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
301
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
302
|
+
return self._execute_with_settlement("/api/v1/dossier", {"cnpj": clean}, wallet_provider)
|
|
303
|
+
|
|
304
|
+
def query_domain_audit(self, domain: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
305
|
+
return self._execute_with_settlement("/api/v1/domain-audit", {"domain": domain}, wallet_provider)
|
|
306
|
+
|
|
307
|
+
def query_kyb_audit(
|
|
308
|
+
self,
|
|
309
|
+
cnpj: str,
|
|
310
|
+
name: Optional[str] = None,
|
|
311
|
+
lei: Optional[str] = None,
|
|
312
|
+
wallet_provider: Any = None,
|
|
313
|
+
) -> Dict[str, Any]:
|
|
314
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
315
|
+
params: Dict[str, Any] = {"cnpj": clean}
|
|
316
|
+
if name:
|
|
317
|
+
params["name"] = name
|
|
318
|
+
if lei:
|
|
319
|
+
params["lei"] = lei
|
|
320
|
+
return self._execute_with_settlement("/api/v1/kyb-audit", params, wallet_provider)
|
|
321
|
+
|
|
322
|
+
def query_market_snapshot(self, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
323
|
+
return self._execute_with_settlement("/api/v1/market-snapshot", {}, wallet_provider)
|
|
324
|
+
|
|
325
|
+
def query_lei(self, lei: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
326
|
+
return self._execute_with_settlement("/api/v1/lei", {"lei": lei.strip()}, wallet_provider)
|
|
327
|
+
|
|
328
|
+
def query_ofac(self, target: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
329
|
+
return self._execute_with_settlement("/api/v1/ofac", {"target": target.strip()}, wallet_provider)
|
|
330
|
+
|
|
331
|
+
def query_notarize(self, content: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
332
|
+
return self._execute_with_settlement("/api/v1/notarize", {"content": content}, wallet_provider)
|
|
333
|
+
|
|
334
|
+
def query_global_markets(
|
|
335
|
+
self,
|
|
336
|
+
market: Optional[str] = None,
|
|
337
|
+
base: Optional[str] = None,
|
|
338
|
+
date: Optional[str] = None,
|
|
339
|
+
wallet_provider: Any = None,
|
|
340
|
+
) -> Dict[str, Any]:
|
|
341
|
+
params = {"market": market, "base": base, "date": date}
|
|
342
|
+
return self._execute_with_settlement("/api/v1/global-markets", params, wallet_provider)
|
|
343
|
+
|
|
344
|
+
def query_extract(
|
|
345
|
+
self,
|
|
346
|
+
url: str,
|
|
347
|
+
max_chars: Optional[int] = None,
|
|
348
|
+
wallet_provider: Any = None,
|
|
349
|
+
) -> Dict[str, Any]:
|
|
350
|
+
params: Dict[str, Any] = {"url": url}
|
|
351
|
+
if max_chars is not None:
|
|
352
|
+
params["max_chars"] = max_chars
|
|
353
|
+
return self._execute_with_settlement("/api/v1/extract", params, wallet_provider)
|
|
354
|
+
|
|
355
|
+
def query_email_verify(self, email: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
356
|
+
return self._execute_with_settlement("/api/v1/email-verify", {"email": email.strip()}, wallet_provider)
|
|
357
|
+
|
|
358
|
+
def query_pass(
|
|
359
|
+
self,
|
|
360
|
+
status: Optional[str] = None,
|
|
361
|
+
wallet_provider: Any = None,
|
|
362
|
+
) -> Dict[str, Any]:
|
|
363
|
+
params = {"status": status} if status else {}
|
|
364
|
+
return self._execute_with_settlement("/api/v1/pass", params, wallet_provider)
|
|
365
|
+
|
|
366
|
+
def get_pass_balance(self, token: Optional[str] = None) -> Dict[str, Any]:
|
|
367
|
+
t = token or self.session_pass or ""
|
|
368
|
+
return self._execute_with_settlement("/api/v1/pass/balance", {"token": t})
|
|
369
|
+
|
|
370
|
+
def verify_proof(self, payload: Any) -> Dict[str, Any]:
|
|
371
|
+
"""Validacao sem estado de prova criptografica de oraculo (_oracle_proof)."""
|
|
372
|
+
url = f"{self.base_url}/api/v1/verify"
|
|
373
|
+
post_data = payload if isinstance(payload, str) else json.dumps(payload)
|
|
374
|
+
req = urllib.request.Request(
|
|
375
|
+
url,
|
|
376
|
+
data=post_data.encode("utf-8"),
|
|
377
|
+
headers={
|
|
378
|
+
"Content-Type": "application/json",
|
|
379
|
+
"Accept": "application/json",
|
|
380
|
+
"User-Agent": "Grid402-CoinbaseAgentKit-Python/2.0",
|
|
381
|
+
},
|
|
382
|
+
method="POST",
|
|
383
|
+
)
|
|
384
|
+
ctx = self._get_ssl_context()
|
|
385
|
+
with urllib.request.urlopen(req, context=ctx, timeout=10) as resp:
|
|
386
|
+
return json.loads(resp.read().decode("utf-8"))
|
|
387
|
+
|
|
388
|
+
# Aliases no padrao snake_case das ferramentas MCP (todos os 25 servicos)
|
|
389
|
+
get_cnpj = query_cnpj
|
|
390
|
+
get_cep = query_cep
|
|
391
|
+
get_forex = query_forex
|
|
392
|
+
get_crypto = query_crypto
|
|
393
|
+
get_dns = query_dns
|
|
394
|
+
get_ssl = query_ssl
|
|
395
|
+
get_asn = query_asn
|
|
396
|
+
get_indicators = query_indicators
|
|
397
|
+
get_holidays = query_holidays
|
|
398
|
+
get_workdays = query_workdays
|
|
399
|
+
get_sanctions = query_sanctions
|
|
400
|
+
get_simples = query_simples
|
|
401
|
+
get_compliance = query_compliance
|
|
402
|
+
get_dossier_360 = query_dossier_360
|
|
403
|
+
get_dossier = query_dossier_360
|
|
404
|
+
get_domain_audit = query_domain_audit
|
|
405
|
+
get_kyb_audit = query_kyb_audit
|
|
406
|
+
get_market_snapshot = query_market_snapshot
|
|
407
|
+
get_lei = query_lei
|
|
408
|
+
get_ofac = query_ofac
|
|
409
|
+
notarize = query_notarize
|
|
410
|
+
get_global_markets = query_global_markets
|
|
411
|
+
extract = query_extract
|
|
412
|
+
email_verify = query_email_verify
|
|
413
|
+
get_pass = query_pass
|
|
@@ -15,6 +15,7 @@ from grid402.models import OracleVerificationResult, WorkdaysResponse
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
DEFAULT_ENDPOINT = "https://grid402.online"
|
|
18
|
+
DEFAULT_RAPIDAPI_HOST = "grid402-open-data-kyb-ai-utilities.p.rapidapi.com"
|
|
18
19
|
GRID402_ORACLE_WALLET = "0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90"
|
|
19
20
|
DEFAULT_ORACLE_PUBKEY = """-----BEGIN PUBLIC KEY-----
|
|
20
21
|
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEq8MF77hj4TAO3ktuRu5GPRdXQP9m9JhO
|
|
@@ -136,6 +137,9 @@ class Grid402Client:
|
|
|
136
137
|
base_url: str = DEFAULT_ENDPOINT,
|
|
137
138
|
sandbox: bool = False,
|
|
138
139
|
payment_tx_hash: Optional[str] = None,
|
|
140
|
+
session_pass: Optional[str] = None,
|
|
141
|
+
rapidapi_key: Optional[str] = None,
|
|
142
|
+
rapidapi_host: Optional[str] = None,
|
|
139
143
|
timeout: int = 10,
|
|
140
144
|
raise_for_payment: bool = False,
|
|
141
145
|
):
|
|
@@ -146,13 +150,21 @@ class Grid402Client:
|
|
|
146
150
|
base_url: Endereco base da API do Grid402.
|
|
147
151
|
sandbox: Se True, ativa o modo Sandbox gratuito para homologacao sem custo.
|
|
148
152
|
payment_tx_hash: Hash de transacao USDC opcional padrao para as requisicoes.
|
|
153
|
+
session_pass: Token pass_g402_... opcional para chamadas pre-pagas em <15ms.
|
|
154
|
+
rapidapi_key: Chave X-RapidAPI-Key opcional para assinaturas RapidAPI Hub.
|
|
155
|
+
rapidapi_host: Host proxy RapidAPI (default: grid402-open-data-kyb-ai-utilities.p.rapidapi.com).
|
|
149
156
|
timeout: Tempo limite em segundos para cada requisicao HTTP.
|
|
150
157
|
raise_for_payment: Se True, lanca Grid402PaymentRequiredError ao receber HTTP 402.
|
|
151
158
|
Se False, retorna o dicionario com o desafio e dados parciais.
|
|
152
159
|
"""
|
|
160
|
+
import os
|
|
153
161
|
self.base_url = base_url.rstrip("/")
|
|
154
162
|
self.sandbox = sandbox
|
|
155
|
-
self.
|
|
163
|
+
self.session_pass = session_pass or os.environ.get("GRID402_SESSION_PASS") or None
|
|
164
|
+
self.rapidapi_key = rapidapi_key or os.environ.get("GRID402_RAPIDAPI_KEY") or None
|
|
165
|
+
raw_rapid_host = rapidapi_host or os.environ.get("GRID402_RAPIDAPI_HOST") or DEFAULT_RAPIDAPI_HOST
|
|
166
|
+
self.rapidapi_host = raw_rapid_host.replace("https://", "").replace("http://", "").split("/")[0].strip()
|
|
167
|
+
self.payment_tx_hash = payment_tx_hash or self.session_pass
|
|
156
168
|
self.timeout = timeout
|
|
157
169
|
self.raise_for_payment = raise_for_payment
|
|
158
170
|
|
|
@@ -173,21 +185,33 @@ class Grid402Client:
|
|
|
173
185
|
filtered_params = {k: v for k, v in (params or {}).items() if v is not None}
|
|
174
186
|
query_string = urllib.parse.urlencode(filtered_params)
|
|
175
187
|
|
|
176
|
-
url = f"{self.base_url}{path}"
|
|
177
|
-
if query_string:
|
|
178
|
-
url += f"?{query_string}"
|
|
179
|
-
|
|
180
188
|
headers = {
|
|
181
189
|
"Accept": "application/json",
|
|
182
|
-
"User-Agent": "Grid402-Python-SDK/2.
|
|
190
|
+
"User-Agent": "Grid402-Python-SDK/2.7.0",
|
|
183
191
|
}
|
|
184
192
|
|
|
185
193
|
active_tx_hash = payment_tx_hash or self.payment_tx_hash
|
|
186
|
-
|
|
194
|
+
use_rapidapi_proxy = bool(self.rapidapi_key and not active_tx_hash)
|
|
195
|
+
|
|
196
|
+
effective_base_url = self.base_url
|
|
197
|
+
if use_rapidapi_proxy:
|
|
198
|
+
if ".p.rapidapi.com" in self.base_url:
|
|
199
|
+
parsed = urllib.parse.urlparse(self.base_url)
|
|
200
|
+
rapid_host_header = parsed.netloc or self.rapidapi_host
|
|
201
|
+
else:
|
|
202
|
+
effective_base_url = f"https://{self.rapidapi_host}"
|
|
203
|
+
rapid_host_header = self.rapidapi_host
|
|
204
|
+
headers["X-RapidAPI-Key"] = str(self.rapidapi_key).strip()
|
|
205
|
+
headers["X-RapidAPI-Host"] = rapid_host_header
|
|
206
|
+
elif active_tx_hash:
|
|
187
207
|
headers["X-Payment"] = active_tx_hash
|
|
188
208
|
elif self.sandbox:
|
|
189
209
|
headers["X-Payment"] = "demo"
|
|
190
210
|
|
|
211
|
+
url = f"{effective_base_url}{path}"
|
|
212
|
+
if query_string:
|
|
213
|
+
url += f"?{query_string}"
|
|
214
|
+
|
|
191
215
|
req = urllib.request.Request(url, headers=headers)
|
|
192
216
|
ctx = self._get_ssl_context()
|
|
193
217
|
|
|
@@ -287,6 +311,97 @@ class Grid402Client:
|
|
|
287
311
|
return inst
|
|
288
312
|
return raw
|
|
289
313
|
|
|
314
|
+
def get_sanctions(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
315
|
+
"""Consulta sancoes administrativas nos cadastros CEIS e CNEP da CGU."""
|
|
316
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
317
|
+
return self._request("/api/v1/sanctions", params={"cnpj": clean}, payment_tx_hash=payment_tx_hash)
|
|
318
|
+
|
|
319
|
+
def get_simples(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
320
|
+
"""Consulta enquadramento no Simples Nacional e MEI (SIMEI)."""
|
|
321
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
322
|
+
return self._request("/api/v1/simples", params={"cnpj": clean}, payment_tx_hash=payment_tx_hash)
|
|
323
|
+
|
|
324
|
+
def get_compliance(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
325
|
+
"""Calcula o Compliance Score 360 (0 a 100) cruzando Receita Federal e CGU."""
|
|
326
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
327
|
+
return self._request("/api/v1/compliance", params={"cnpj": clean}, payment_tx_hash=payment_tx_hash)
|
|
328
|
+
|
|
329
|
+
def get_dossier_360(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
330
|
+
"""Dossie 360 KYB Premium com Veredito Sintetizado para IA (APPROVED, FLAGGED, REJECTED)."""
|
|
331
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
332
|
+
return self._request("/api/v1/dossier", params={"cnpj": clean}, payment_tx_hash=payment_tx_hash)
|
|
333
|
+
|
|
334
|
+
def get_dossier(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
335
|
+
"""Alias para get_dossier_360."""
|
|
336
|
+
return self.get_dossier_360(cnpj, payment_tx_hash=payment_tx_hash)
|
|
337
|
+
|
|
338
|
+
def get_domain_audit(self, domain: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
339
|
+
"""Auditoria completa de infraestrutura de dominio (DNS + TLS/SSL + BGP/ASN)."""
|
|
340
|
+
return self._request("/api/v1/domain-audit", params={"domain": domain}, payment_tx_hash=payment_tx_hash)
|
|
341
|
+
|
|
342
|
+
def get_kyb_audit(self, cnpj: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
343
|
+
"""Auditoria corporativa global KYB em chamada unica (CNPJ + OFAC/ONU + GLEIF LEI)."""
|
|
344
|
+
clean = "".join(ch for ch in str(cnpj or "") if ch.isdigit())
|
|
345
|
+
return self._request("/api/v1/kyb-audit", params={"cnpj": clean}, payment_tx_hash=payment_tx_hash)
|
|
346
|
+
|
|
347
|
+
def get_market_snapshot(self, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
348
|
+
"""Panorama financeiro e macroeconomico consolidado em chamada unica."""
|
|
349
|
+
return self._request("/api/v1/market-snapshot", payment_tx_hash=payment_tx_hash)
|
|
350
|
+
|
|
351
|
+
def get_lei(self, lei: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
352
|
+
"""Consulta identidade corporativa internacional oficial (ISO 17442) via GLEIF."""
|
|
353
|
+
return self._request("/api/v1/lei", params={"lei": lei.strip()}, payment_tx_hash=payment_tx_hash)
|
|
354
|
+
|
|
355
|
+
def get_ofac(self, target: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
356
|
+
"""Triagem de sancoes globais (OFAC SDN / ONU) e risco AML Web3."""
|
|
357
|
+
return self._request("/api/v1/ofac", params={"target": target.strip()}, payment_tx_hash=payment_tx_hash)
|
|
358
|
+
|
|
359
|
+
def notarize(self, content: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
360
|
+
"""Carimbo do tempo criptografico M2M e prova de existencia SHA-256 assinada com ECDSA."""
|
|
361
|
+
return self._request("/api/v1/notarize", params={"content": content}, payment_tx_hash=payment_tx_hash)
|
|
362
|
+
|
|
363
|
+
def get_global_markets(
|
|
364
|
+
self,
|
|
365
|
+
market: Optional[str] = None,
|
|
366
|
+
base: Optional[str] = None,
|
|
367
|
+
date: Optional[str] = None,
|
|
368
|
+
payment_tx_hash: Optional[str] = None,
|
|
369
|
+
) -> Dict[str, Any]:
|
|
370
|
+
"""Calendario de liquidacao de bolsas globais (US, EU, UK, BR) e taxas de cambio BCE."""
|
|
371
|
+
params = {"market": market, "base": base, "date": date}
|
|
372
|
+
return self._request("/api/v1/global-markets", params=params, payment_tx_hash=payment_tx_hash)
|
|
373
|
+
|
|
374
|
+
def extract(
|
|
375
|
+
self,
|
|
376
|
+
url: str,
|
|
377
|
+
max_chars: Optional[int] = None,
|
|
378
|
+
payment_tx_hash: Optional[str] = None,
|
|
379
|
+
) -> Dict[str, Any]:
|
|
380
|
+
"""Extrai paginas web publicas HTTP/HTTPS para Markdown limpo pronto para LLMs e RAG."""
|
|
381
|
+
params: Dict[str, Any] = {"url": url}
|
|
382
|
+
if max_chars is not None:
|
|
383
|
+
params["max_chars"] = max_chars
|
|
384
|
+
return self._request("/api/v1/extract", params=params, payment_tx_hash=payment_tx_hash)
|
|
385
|
+
|
|
386
|
+
def email_verify(self, email: str, payment_tx_hash: Optional[str] = None) -> Dict[str, Any]:
|
|
387
|
+
"""Audita entregabilidade de e-mail B2B estritamente Zero-PII (RFC, MX, SPF, DMARC, disposable)."""
|
|
388
|
+
return self._request("/api/v1/email-verify", params={"email": email.strip()}, payment_tx_hash=payment_tx_hash)
|
|
389
|
+
|
|
390
|
+
def get_pass_balance(self, token: Optional[str] = None) -> Dict[str, Any]:
|
|
391
|
+
"""Consulta gratuita em tempo real do saldo de creditos e Spend Controls de um Session Pass."""
|
|
392
|
+
t = token or self.session_pass or self.payment_tx_hash or ""
|
|
393
|
+
return self._request("/api/v1/pass/balance", params={"token": t})
|
|
394
|
+
|
|
395
|
+
def get_pass_statement(
|
|
396
|
+
self,
|
|
397
|
+
token: Optional[str] = None,
|
|
398
|
+
endpoint: Optional[str] = None,
|
|
399
|
+
outcome: Optional[str] = None,
|
|
400
|
+
) -> Dict[str, Any]:
|
|
401
|
+
"""Consulta gratuita do extrato Zero-PII (ate 200 lancamentos recentes) de um Session Pass."""
|
|
402
|
+
t = token or self.session_pass or self.payment_tx_hash or ""
|
|
403
|
+
return self._request("/api/v1/pass/statement", params={"token": t, "endpoint": endpoint, "outcome": outcome})
|
|
404
|
+
|
|
290
405
|
def verify_proof(
|
|
291
406
|
self,
|
|
292
407
|
response: Any,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: grid402
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: Official Grid402 Python SDK -
|
|
3
|
+
Version: 2.6.0
|
|
4
|
+
Summary: Official Grid402 Python SDK - 25 Open-Data, Web-to-Markdown, Zero-PII Email Verify, KYB 360 AI Dossier and Network Utility Microservices with Multi-Chain HTTP x402, Session Pass, RapidAPI and ECDSA Oracle Proof
|
|
5
5
|
Author-email: Grid402 Team <contato@grid402.online>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://grid402.online
|
|
@@ -40,7 +40,7 @@ Projetada especificamente para agentes autonomos de inteligencia artificial, fra
|
|
|
40
40
|
|
|
41
41
|
## Recursos Principais
|
|
42
42
|
|
|
43
|
-
- **Ecossistema Grid402 (
|
|
43
|
+
- **Ecossistema Grid402 (25 Endpoints):** Suporte direto aos métodos tipados (`status`, `forex`, `crypto`, `dns`, `ssl`, `asn`, `cep`, `cnpj`, `indicators`, `holidays`, `workdays`, `extract`, `email-verify`, `dossier` e demais rotas) e acesso padronizado HTTP x402 (`0.0050` a `0.0500 USDC` em Base, Polygon, Arbitrum e Solana ou via Session Pass `1 crédito = 0.0050 USDC`).
|
|
44
44
|
- **Gestão Segura de Carteiras:** Nunca armazene chaves privadas no código; utilize carteiras dedicadas de agente com limite de saldo (Spend Controls) ou `X-Payment: pass_g402_...`.
|
|
45
45
|
- **Zero Cadastro e Zero Friccao:** Sem necessidade de chaves de API estaticas ou contratos mensais.
|
|
46
46
|
- **Modo Sandbox Gratuito:** Teste e homologue localmente sem custos informando `sandbox=True`.
|
|
@@ -181,7 +181,7 @@ else:
|
|
|
181
181
|
| `get_ssl(host)` | Inspecao e auditoria de certificado TLS e SSL na porta 443 | 0.0050 |
|
|
182
182
|
| `get_asn(ip)` | Inteligencia de roteamento BGP, bloco alocado e ASN | 0.0050 |
|
|
183
183
|
| `get_cep(code)` | Consulta de logradouro postal brasileiro e codigo IBGE | 0.0050 |
|
|
184
|
-
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.
|
|
184
|
+
| `get_cnpj(cnpj)` | Dados cadastrais completos de PJ na Receita Federal | 0.0100 |
|
|
185
185
|
| `get_indicators()` | Indicadores macroeconomicos oficiais (Selic meta e diaria, CDI anual e IPCA) | 0.0050 |
|
|
186
186
|
| `get_holidays(year)` | Calendario oficial de feriados nacionais e bancarios ANBIMA | 0.0050 |
|
|
187
187
|
| `get_workdays(start_date?, end_date?, days?, date?)` | Calculadora de dias uteis financeiros e projecao de vencimentos ANBIMA | 0.0050 |
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "grid402"
|
|
7
|
-
version = "2.
|
|
8
|
-
description = "Official Grid402 Python SDK -
|
|
7
|
+
version = "2.6.0"
|
|
8
|
+
description = "Official Grid402 Python SDK - 25 Open-Data, Web-to-Markdown, Zero-PII Email Verify, KYB 360 AI Dossier and Network Utility Microservices with Multi-Chain HTTP x402, Session Pass, RapidAPI and ECDSA Oracle Proof"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = "MIT"
|
|
@@ -76,7 +76,7 @@ class TestGrid402SDK(unittest.TestCase):
|
|
|
76
76
|
|
|
77
77
|
def test_version_and_exports(self) -> None:
|
|
78
78
|
"""Verifica versao semantica e exportacoes principais."""
|
|
79
|
-
self.assertEqual(__version__, "2.
|
|
79
|
+
self.assertEqual(__version__, "2.6.0")
|
|
80
80
|
self.assertTrue(issubclass(Grid402PaymentRequiredError, Grid402Error))
|
|
81
81
|
|
|
82
82
|
def test_pydantic_models(self) -> None:
|
|
@@ -206,45 +206,73 @@ class TestGrid402SDK(unittest.TestCase):
|
|
|
206
206
|
self.assertTrue(err.preview_data.get("sample"))
|
|
207
207
|
|
|
208
208
|
def test_agentkit_auto_settlement(self) -> None:
|
|
209
|
-
"""Simula auto-liquidacao on-chain com carteira CDP e
|
|
209
|
+
"""Simula auto-liquidacao on-chain com carteira CDP moderna (send_transaction) e fallback legado (transfer)."""
|
|
210
210
|
provider = Grid402ActionProvider(sandbox=False)
|
|
211
211
|
|
|
212
|
-
mock_wallet = MagicMock()
|
|
213
|
-
mock_transfer = MagicMock()
|
|
214
|
-
mock_transfer.transaction_hash = "0xmocked_tx_hash_12345"
|
|
215
|
-
mock_wallet.transfer.return_value = mock_transfer
|
|
216
|
-
|
|
217
212
|
challenge_bytes = (
|
|
218
|
-
b'{"price_usdc": "0.
|
|
213
|
+
b'{"price_usdc": "0.0100", "price_raw_units": 10000, '
|
|
219
214
|
b'"recipient_wallet": "0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90"}'
|
|
220
215
|
)
|
|
221
216
|
success_bytes = b'{"razao_social": "BANCO DO BRASIL SA", "cnpj": "00000000000191"}'
|
|
222
217
|
|
|
223
218
|
import urllib.error
|
|
224
|
-
|
|
219
|
+
|
|
220
|
+
# 1. Caminho moderno CDP AgentKit v0.1+: send_transaction ERC-20 + wait_for_transaction_receipt
|
|
221
|
+
mock_modern_wallet = MagicMock(spec=["send_transaction", "wait_for_transaction_receipt"])
|
|
222
|
+
mock_modern_wallet.send_transaction.return_value = "0xmocked_modern_tx_hash_999"
|
|
223
|
+
|
|
224
|
+
challenge_error_1 = urllib.error.HTTPError(
|
|
225
225
|
url="https://grid402.online/api/v1/cnpj",
|
|
226
226
|
code=402,
|
|
227
227
|
msg="Payment Required",
|
|
228
228
|
hdrs={}, # type: ignore
|
|
229
229
|
fp=MagicMock(read=MagicMock(return_value=challenge_bytes)),
|
|
230
230
|
)
|
|
231
|
+
success_response_1 = MagicMock()
|
|
232
|
+
success_response_1.status = 200
|
|
233
|
+
success_response_1.read.return_value = success_bytes
|
|
234
|
+
success_response_1.__enter__.return_value = success_response_1
|
|
235
|
+
|
|
236
|
+
with patch("urllib.request.urlopen", side_effect=[challenge_error_1, success_response_1]):
|
|
237
|
+
res = provider.query_cnpj("00000000000191", wallet_provider=mock_modern_wallet)
|
|
238
|
+
mock_modern_wallet.send_transaction.assert_called_once()
|
|
239
|
+
tx_payload = mock_modern_wallet.send_transaction.call_args[0][0]
|
|
240
|
+
self.assertEqual(tx_payload["to"], "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913")
|
|
241
|
+
self.assertTrue(tx_payload["data"].startswith("0xa9059cbb"))
|
|
242
|
+
mock_modern_wallet.wait_for_transaction_receipt.assert_called_once_with("0xmocked_modern_tx_hash_999")
|
|
243
|
+
self.assertEqual(res.get("razao_social"), "BANCO DO BRASIL SA")
|
|
244
|
+
self.assertTrue(res.get("_x402_settlement", {}).get("settled"))
|
|
245
|
+
self.assertEqual(res.get("_x402_settlement", {}).get("tx_hash"), "0xmocked_modern_tx_hash_999")
|
|
231
246
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
with patch("urllib.request.urlopen", side_effect=[challenge_error, success_response]):
|
|
238
|
-
res = provider.query_cnpj("00000000000191", wallet_provider=mock_wallet)
|
|
247
|
+
# 2. Fallback legado: wallet com apenas transfer() + transfer_result.wait()
|
|
248
|
+
mock_legacy_wallet = MagicMock(spec=["transfer"])
|
|
249
|
+
mock_transfer = MagicMock(spec=["transaction_hash", "wait"])
|
|
250
|
+
mock_transfer.transaction_hash = "0xmocked_tx_hash_12345"
|
|
251
|
+
mock_legacy_wallet.transfer.return_value = mock_transfer
|
|
239
252
|
|
|
240
|
-
|
|
253
|
+
challenge_error_2 = urllib.error.HTTPError(
|
|
254
|
+
url="https://grid402.online/api/v1/cnpj",
|
|
255
|
+
code=402,
|
|
256
|
+
msg="Payment Required",
|
|
257
|
+
hdrs={}, # type: ignore
|
|
258
|
+
fp=MagicMock(read=MagicMock(return_value=challenge_bytes)),
|
|
259
|
+
)
|
|
260
|
+
success_response_2 = MagicMock()
|
|
261
|
+
success_response_2.status = 200
|
|
262
|
+
success_response_2.read.return_value = success_bytes
|
|
263
|
+
success_response_2.__enter__.return_value = success_response_2
|
|
264
|
+
|
|
265
|
+
with patch("urllib.request.urlopen", side_effect=[challenge_error_2, success_response_2]):
|
|
266
|
+
res_legacy = provider.query_cnpj("00000000000191", wallet_provider=mock_legacy_wallet)
|
|
267
|
+
mock_legacy_wallet.transfer.assert_called_once_with(
|
|
241
268
|
to="0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90",
|
|
242
|
-
amount="0.
|
|
269
|
+
amount="0.0100",
|
|
243
270
|
asset_id="usdc",
|
|
244
271
|
)
|
|
245
|
-
|
|
246
|
-
self.
|
|
247
|
-
self.
|
|
272
|
+
mock_transfer.wait.assert_called_once()
|
|
273
|
+
self.assertEqual(res_legacy.get("razao_social"), "BANCO DO BRASIL SA")
|
|
274
|
+
self.assertTrue(res_legacy.get("_x402_settlement", {}).get("settled"))
|
|
275
|
+
self.assertEqual(res_legacy.get("_x402_settlement", {}).get("tx_hash"), "0xmocked_tx_hash_12345")
|
|
248
276
|
|
|
249
277
|
def test_client_indicators_and_holidays(self) -> None:
|
|
250
278
|
"""Verifica chamadas a get_indicators e get_holidays no Grid402Client."""
|
|
@@ -345,6 +373,45 @@ class TestGrid402SDK(unittest.TestCase):
|
|
|
345
373
|
res = client.verify_proof(signed, oracle_public_key=TEST_ORACLE_PUBKEY_PEM)
|
|
346
374
|
self.assertFalse(res.valid)
|
|
347
375
|
|
|
376
|
+
def test_client_rapidapi_proxy_routing(self) -> None:
|
|
377
|
+
"""V-08: Verifica roteamento pelo proxy RapidAPI com X-RapidAPI-Key e X-RapidAPI-Host."""
|
|
378
|
+
client = Grid402Client(rapidapi_key="rapid_key_test_123")
|
|
379
|
+
mock_response = MagicMock()
|
|
380
|
+
mock_response.read.return_value = b'{"status": "success", "service": "forex"}'
|
|
381
|
+
mock_response.__enter__.return_value = mock_response
|
|
382
|
+
|
|
383
|
+
with patch("urllib.request.urlopen", return_value=mock_response) as mock_urlopen:
|
|
384
|
+
res = client.get_forex()
|
|
385
|
+
self.assertEqual(res.get("service"), "forex")
|
|
386
|
+
req_arg = mock_urlopen.call_args[0][0]
|
|
387
|
+
self.assertEqual(
|
|
388
|
+
req_arg.full_url,
|
|
389
|
+
"https://grid402-open-data-kyb-ai-utilities.p.rapidapi.com/api/v1/forex",
|
|
390
|
+
)
|
|
391
|
+
self.assertEqual(req_arg.headers.get("X-rapidapi-key"), "rapid_key_test_123")
|
|
392
|
+
self.assertEqual(
|
|
393
|
+
req_arg.headers.get("X-rapidapi-host"),
|
|
394
|
+
"grid402-open-data-kyb-ai-utilities.p.rapidapi.com",
|
|
395
|
+
)
|
|
396
|
+
self.assertNotIn("X-payment", req_arg.headers)
|
|
397
|
+
|
|
398
|
+
custom_client = Grid402Client(
|
|
399
|
+
rapidapi_key="rapid_key_custom_456",
|
|
400
|
+
rapidapi_host="https://brazil-kyb-cnpj-cgu-sanctions-anbima-workdays-api.p.rapidapi.com/",
|
|
401
|
+
)
|
|
402
|
+
with patch("urllib.request.urlopen", return_value=mock_response) as mock_urlopen:
|
|
403
|
+
custom_client.get_cnpj("00000000000191")
|
|
404
|
+
req_arg = mock_urlopen.call_args[0][0]
|
|
405
|
+
self.assertTrue(
|
|
406
|
+
req_arg.full_url.startswith(
|
|
407
|
+
"https://brazil-kyb-cnpj-cgu-sanctions-anbima-workdays-api.p.rapidapi.com/api/v1/cnpj"
|
|
408
|
+
)
|
|
409
|
+
)
|
|
410
|
+
self.assertEqual(
|
|
411
|
+
req_arg.headers.get("X-rapidapi-host"),
|
|
412
|
+
"brazil-kyb-cnpj-cgu-sanctions-anbima-workdays-api.p.rapidapi.com",
|
|
413
|
+
)
|
|
414
|
+
|
|
348
415
|
def test_oracle_proof_sandbox_mode(self) -> None:
|
|
349
416
|
"""Verifica validacao de prova emitida em modo Sandbox."""
|
|
350
417
|
client = Grid402Client(sandbox=True)
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Grid402 Action Provider para Coinbase AgentKit, LangChain e CrewAI.
|
|
3
|
-
|
|
4
|
-
Permite que agentes autonomos com carteiras CDP (Coinbase Developer Platform)
|
|
5
|
-
na rede Base consultem dados cadastrais e utilitarios de rede com auto-liquidacao x402.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from typing import Any, Dict, Optional
|
|
9
|
-
import json
|
|
10
|
-
import ssl
|
|
11
|
-
import urllib.error
|
|
12
|
-
import urllib.parse
|
|
13
|
-
import urllib.request
|
|
14
|
-
|
|
15
|
-
from grid402.client import DEFAULT_ENDPOINT
|
|
16
|
-
from grid402.models import (
|
|
17
|
-
AsnInput,
|
|
18
|
-
CepInput,
|
|
19
|
-
CnpjInput,
|
|
20
|
-
CryptoInput,
|
|
21
|
-
DnsInput,
|
|
22
|
-
HolidaysInput,
|
|
23
|
-
SslInput,
|
|
24
|
-
WorkdaysInput,
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
GRID402_ORACLE_WALLET = "0xa592625adbceb8e025ac383f1a3fd8ebb6a63f90"
|
|
29
|
-
BASE_USDC_CONTRACT = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class Grid402ActionProvider:
|
|
33
|
-
"""
|
|
34
|
-
Provedor de acoes do Grid402 compativel com Coinbase AgentKit, LangChain e CrewAI.
|
|
35
|
-
|
|
36
|
-
Gerencia o ciclo de vida completo de micropagamentos x402 de forma autonoma,
|
|
37
|
-
detectando desafios HTTP 402, efetuando a transferencia de USDC on-chain
|
|
38
|
-
na Base e reenviando a requisicao com o comprovante criptografico.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
def __init__(self, base_url: str = DEFAULT_ENDPOINT, sandbox: bool = False):
|
|
42
|
-
"""
|
|
43
|
-
Inicializa o provedor de acoes Grid402.
|
|
44
|
-
|
|
45
|
-
Args:
|
|
46
|
-
base_url: URL base da API do Grid402.
|
|
47
|
-
sandbox: Se True, opera em modo Sandbox gratuito sem consumir USDC real.
|
|
48
|
-
"""
|
|
49
|
-
self.base_url = base_url.rstrip("/")
|
|
50
|
-
self.sandbox = sandbox
|
|
51
|
-
|
|
52
|
-
def _get_ssl_context(self) -> ssl.SSLContext:
|
|
53
|
-
ctx = ssl.create_default_context()
|
|
54
|
-
if "hostingersite.com" in self.base_url:
|
|
55
|
-
ctx.check_hostname = False
|
|
56
|
-
ctx.verify_mode = ssl.CERT_NONE
|
|
57
|
-
return ctx
|
|
58
|
-
|
|
59
|
-
def _execute_with_settlement(
|
|
60
|
-
self,
|
|
61
|
-
path: str,
|
|
62
|
-
params: Optional[Dict[str, Any]] = None,
|
|
63
|
-
wallet_provider: Any = None,
|
|
64
|
-
) -> Dict[str, Any]:
|
|
65
|
-
"""
|
|
66
|
-
Executa a requisicao HTTP com auto-liquidacao de desafio x402.
|
|
67
|
-
|
|
68
|
-
Se o endpoint retornar HTTP 402 e um wallet_provider estiver disponivel,
|
|
69
|
-
executa a transferencia de micropagamento em USDC na Base e repete a chamada.
|
|
70
|
-
"""
|
|
71
|
-
filtered_params = {k: v for k, v in (params or {}).items() if v is not None}
|
|
72
|
-
query_string = urllib.parse.urlencode(filtered_params)
|
|
73
|
-
|
|
74
|
-
url = f"{self.base_url}{path}"
|
|
75
|
-
if query_string:
|
|
76
|
-
url += f"?{query_string}"
|
|
77
|
-
|
|
78
|
-
headers = {
|
|
79
|
-
"Accept": "application/json",
|
|
80
|
-
"User-Agent": "Grid402-CoinbaseAgentKit-Python/1.0",
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if self.sandbox:
|
|
84
|
-
headers["X-Payment"] = "demo"
|
|
85
|
-
|
|
86
|
-
req = urllib.request.Request(url, headers=headers)
|
|
87
|
-
ctx = self._get_ssl_context()
|
|
88
|
-
|
|
89
|
-
# 1. Primeira tentativa de requisicao
|
|
90
|
-
try:
|
|
91
|
-
with urllib.request.urlopen(req, context=ctx, timeout=10) as response:
|
|
92
|
-
return json.loads(response.read().decode("utf-8"))
|
|
93
|
-
except urllib.error.HTTPError as exc:
|
|
94
|
-
raw_body = exc.read().decode("utf-8")
|
|
95
|
-
try:
|
|
96
|
-
challenge = json.loads(raw_body)
|
|
97
|
-
except Exception:
|
|
98
|
-
challenge = {"error": raw_body, "status_code": exc.code}
|
|
99
|
-
|
|
100
|
-
# 2. Se retornou HTTP 402 Payment Required
|
|
101
|
-
if exc.code == 402:
|
|
102
|
-
# Se temos wallet_provider e nao estamos no sandbox, auto-liquida on-chain
|
|
103
|
-
if wallet_provider is not None and not self.sandbox:
|
|
104
|
-
price_usdc = challenge.get("price_usdc", "0.0050")
|
|
105
|
-
recipient = challenge.get("recipient_wallet", GRID402_ORACLE_WALLET)
|
|
106
|
-
|
|
107
|
-
try:
|
|
108
|
-
# Executa transferencia de USDC na Base usando a carteira CDP
|
|
109
|
-
transfer_result = wallet_provider.transfer(
|
|
110
|
-
to=recipient,
|
|
111
|
-
amount=price_usdc,
|
|
112
|
-
asset_id="usdc",
|
|
113
|
-
)
|
|
114
|
-
tx_hash = getattr(transfer_result, "transaction_hash", str(transfer_result))
|
|
115
|
-
|
|
116
|
-
# Reenvia com cabecalho X-Payment
|
|
117
|
-
headers["X-Payment"] = tx_hash
|
|
118
|
-
retry_req = urllib.request.Request(url, headers=headers)
|
|
119
|
-
with urllib.request.urlopen(retry_req, context=ctx, timeout=10) as retry_res:
|
|
120
|
-
data = json.loads(retry_res.read().decode("utf-8"))
|
|
121
|
-
data["_x402_settlement"] = {
|
|
122
|
-
"settled": True,
|
|
123
|
-
"tx_hash": tx_hash,
|
|
124
|
-
"price_usdc": price_usdc,
|
|
125
|
-
"network": "Base",
|
|
126
|
-
"token": "USDC",
|
|
127
|
-
}
|
|
128
|
-
return data
|
|
129
|
-
except Exception as pay_err:
|
|
130
|
-
challenge["payment_error"] = str(pay_err)
|
|
131
|
-
challenge["payment_required"] = True
|
|
132
|
-
return challenge
|
|
133
|
-
|
|
134
|
-
challenge["payment_required"] = True
|
|
135
|
-
return challenge
|
|
136
|
-
raise
|
|
137
|
-
|
|
138
|
-
def get_summary(self) -> Dict[str, Any]:
|
|
139
|
-
"""Resumo operacional consolidado e disponibilidade do hub Grid402 (gratuito)."""
|
|
140
|
-
return self._execute_with_settlement("/status")
|
|
141
|
-
|
|
142
|
-
def query_forex(self, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
143
|
-
"""Consulta cotacoes fiduciarias de USD, EUR e GBP para BRL em tempo real."""
|
|
144
|
-
return self._execute_with_settlement("/api/v1/forex", {}, wallet_provider)
|
|
145
|
-
|
|
146
|
-
def query_crypto(
|
|
147
|
-
self, symbol: Optional[str] = None, wallet_provider: Any = None
|
|
148
|
-
) -> Dict[str, Any]:
|
|
149
|
-
"""Consulta precos de mercado spot de criptoativos em USD e BRL."""
|
|
150
|
-
params = {"symbol": symbol} if symbol else {}
|
|
151
|
-
return self._execute_with_settlement("/api/v1/crypto", params, wallet_provider)
|
|
152
|
-
|
|
153
|
-
def query_dns(self, domain: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
154
|
-
"""Executa resolucao autoritativa de registros DNS para qualquer dominio."""
|
|
155
|
-
return self._execute_with_settlement("/api/v1/dns", {"domain": domain}, wallet_provider)
|
|
156
|
-
|
|
157
|
-
def query_ssl(self, host: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
158
|
-
"""Inspeciona e audita certificado TLS e SSL na porta 443 de um host."""
|
|
159
|
-
return self._execute_with_settlement("/api/v1/ssl", {"host": host}, wallet_provider)
|
|
160
|
-
|
|
161
|
-
def query_asn(self, ip: Optional[str] = None, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
162
|
-
"""Consulta inteligencia de rede BGP, numero de ASN e organizacao titular."""
|
|
163
|
-
params = {"ip": ip} if ip else {}
|
|
164
|
-
return self._execute_with_settlement("/api/v1/asn", params, wallet_provider)
|
|
165
|
-
|
|
166
|
-
def query_cep(self, code: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
167
|
-
"""Consulta endereco postal brasileiro e codigo oficial IBGE por CEP."""
|
|
168
|
-
return self._execute_with_settlement("/api/v1/cep", {"code": code}, wallet_provider)
|
|
169
|
-
|
|
170
|
-
def query_cnpj(self, cnpj: str, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
171
|
-
"""Consulta dados cadastrais de Pessoa Juridica na Receita Federal."""
|
|
172
|
-
return self._execute_with_settlement("/api/v1/cnpj", {"cnpj": cnpj}, wallet_provider)
|
|
173
|
-
|
|
174
|
-
def query_indicators(self, wallet_provider: Any = None) -> Dict[str, Any]:
|
|
175
|
-
"""Consulta taxas oficiais Selic meta e diaria, CDI anual e diario, IPCA 12m e mensal."""
|
|
176
|
-
return self._execute_with_settlement("/api/v1/indicators", {}, wallet_provider)
|
|
177
|
-
|
|
178
|
-
def query_holidays(
|
|
179
|
-
self, year: Optional[int] = None, wallet_provider: Any = None
|
|
180
|
-
) -> Dict[str, Any]:
|
|
181
|
-
"""Consulta o calendario oficial de feriados nacionais e dias sem expediente bancario."""
|
|
182
|
-
params = {"year": year} if year is not None else {}
|
|
183
|
-
return self._execute_with_settlement("/api/v1/holidays", params, wallet_provider)
|
|
184
|
-
|
|
185
|
-
def query_workdays(
|
|
186
|
-
self,
|
|
187
|
-
start_date: Optional[str] = None,
|
|
188
|
-
end_date: Optional[str] = None,
|
|
189
|
-
days: Optional[int] = None,
|
|
190
|
-
date: Optional[str] = None,
|
|
191
|
-
wallet_provider: Any = None,
|
|
192
|
-
) -> Dict[str, Any]:
|
|
193
|
-
"""Calcula dias uteis financeiros e projecao de vencimentos ANBIMA."""
|
|
194
|
-
params: Dict[str, Any] = {}
|
|
195
|
-
if start_date is not None:
|
|
196
|
-
params["start_date"] = start_date
|
|
197
|
-
if end_date is not None:
|
|
198
|
-
params["end_date"] = end_date
|
|
199
|
-
if days is not None:
|
|
200
|
-
params["days"] = days
|
|
201
|
-
if date is not None:
|
|
202
|
-
params["date"] = date
|
|
203
|
-
return self._execute_with_settlement("/api/v1/workdays", params, wallet_provider)
|
|
204
|
-
|
|
205
|
-
# Aliases no padrao snake_case das ferramentas MCP
|
|
206
|
-
get_cnpj = query_cnpj
|
|
207
|
-
get_cep = query_cep
|
|
208
|
-
get_forex = query_forex
|
|
209
|
-
get_crypto = query_crypto
|
|
210
|
-
get_dns = query_dns
|
|
211
|
-
get_ssl = query_ssl
|
|
212
|
-
get_asn = query_asn
|
|
213
|
-
get_indicators = query_indicators
|
|
214
|
-
get_holidays = query_holidays
|
|
215
|
-
get_workdays = query_workdays
|
|
216
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|