@t2000/sdk 10.16.1 → 10.17.0

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.
package/dist/index.cjs CHANGED
@@ -1169,7 +1169,6 @@ async function payWithMpp(args) {
1169
1169
  }
1170
1170
  assertNotSelfPayment(signer.getAddress(), requirements.payTo);
1171
1171
  const result = await payViaX402({ signer, client, options, reqInit, requirements });
1172
- await reportDirectPayment(result, options.url);
1173
1172
  return result;
1174
1173
  }
1175
1174
  const headerChallenge = await parseMppSuiChallenge(probe);
@@ -1183,7 +1182,6 @@ async function payWithMpp(args) {
1183
1182
  }
1184
1183
  assertNotSelfPayment(signer.getAddress(), headerChallenge.recipient);
1185
1184
  const result = await payViaMppHeader({ signer, client, options });
1186
- await reportDirectPayment(result, options.url);
1187
1185
  return result;
1188
1186
  }
1189
1187
  if (pick.kind === "incomplete") {
@@ -1198,21 +1196,6 @@ async function payWithMpp(args) {
1198
1196
  `Endpoint returned 402 without an x402 'exact' / sui:${client.network} requirement in the body or an MPP 'sui' challenge in WWW-Authenticate. Nothing this SDK can pay.`
1199
1197
  );
1200
1198
  }
1201
- var MPP_REPORT_URL = "https://mpp.t2000.ai/api/mpp/report";
1202
- var REPORT_TIMEOUT_MS = 2e3;
1203
- async function reportDirectPayment(result, url) {
1204
- if (!result.paid || !result.receipt?.reference) return;
1205
- try {
1206
- if (new URL(url).origin === new URL(MPP_REPORT_URL).origin) return;
1207
- await fetch(MPP_REPORT_URL, {
1208
- method: "POST",
1209
- headers: { "content-type": "application/json" },
1210
- body: JSON.stringify({ digest: result.receipt.reference, url }),
1211
- signal: AbortSignal.timeout(REPORT_TIMEOUT_MS)
1212
- });
1213
- } catch {
1214
- }
1215
- }
1216
1199
  async function parseMppSuiChallenge(response) {
1217
1200
  try {
1218
1201
  const { Challenge } = await import('mppx');
@@ -2112,7 +2095,7 @@ function resolveApiKey(apiKey) {
2112
2095
  if (!key) {
2113
2096
  throw new exports.T2000Error(
2114
2097
  "INVALID_KEY",
2115
- "No Private Inference key. Pass `apiKey` or set T2000_API_KEY. Generate one at agents.t2000.ai/manage."
2098
+ "No Private Inference key. Pass `apiKey` or set T2000_API_KEY. Generate one at t2000.ai/manage."
2116
2099
  );
2117
2100
  }
2118
2101
  return key;