@chainpatrol/sdk 0.3.0 → 0.4.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.mjs CHANGED
@@ -477,7 +477,7 @@ z.object({
477
477
  description: z.string().optional().default("")
478
478
  });
479
479
 
480
- // ../../node_modules/luxon/src/errors.js
480
+ // ../../internal/validation/node_modules/luxon/src/errors.js
481
481
  var LuxonError = class extends Error {
482
482
  };
483
483
  var InvalidDateTimeError = class extends LuxonError {
@@ -510,7 +510,7 @@ var ZoneIsAbstractError = class extends LuxonError {
510
510
  }
511
511
  };
512
512
 
513
- // ../../node_modules/luxon/src/impl/formats.js
513
+ // ../../internal/validation/node_modules/luxon/src/impl/formats.js
514
514
  var n = "numeric";
515
515
  var s = "short";
516
516
  var l = "long";
@@ -662,7 +662,7 @@ var DATETIME_HUGE_WITH_SECONDS = {
662
662
  timeZoneName: l
663
663
  };
664
664
 
665
- // ../../node_modules/luxon/src/impl/util.js
665
+ // ../../internal/validation/node_modules/luxon/src/impl/util.js
666
666
  function isUndefined(o) {
667
667
  return typeof o === "undefined";
668
668
  }
@@ -854,7 +854,7 @@ function timeObject(obj) {
854
854
  }
855
855
  var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
856
856
 
857
- // ../../node_modules/luxon/src/impl/english.js
857
+ // ../../internal/validation/node_modules/luxon/src/impl/english.js
858
858
  var monthsLong = [
859
859
  "January",
860
860
  "February",
@@ -980,7 +980,7 @@ function formatRelativeTime(unit, count, numeric = "always", narrow = false) {
980
980
  return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;
981
981
  }
982
982
 
983
- // ../../node_modules/luxon/src/impl/formatter.js
983
+ // ../../internal/validation/node_modules/luxon/src/impl/formatter.js
984
984
  function stringifyTokens(splits, tokenToString) {
985
985
  let s2 = "";
986
986
  for (const token of splits) {
@@ -1258,7 +1258,7 @@ var Formatter = class _Formatter {
1258
1258
  }
1259
1259
  };
1260
1260
 
1261
- // ../../node_modules/luxon/src/impl/invalid.js
1261
+ // ../../internal/validation/node_modules/luxon/src/impl/invalid.js
1262
1262
  var Invalid = class {
1263
1263
  constructor(reason, explanation) {
1264
1264
  this.reason = reason;
@@ -1273,7 +1273,7 @@ var Invalid = class {
1273
1273
  }
1274
1274
  };
1275
1275
 
1276
- // ../../node_modules/luxon/src/zone.js
1276
+ // ../../internal/validation/node_modules/luxon/src/zone.js
1277
1277
  var Zone = class {
1278
1278
  /**
1279
1279
  * The type of zone
@@ -1353,7 +1353,7 @@ var Zone = class {
1353
1353
  }
1354
1354
  };
1355
1355
 
1356
- // ../../node_modules/luxon/src/zones/systemZone.js
1356
+ // ../../internal/validation/node_modules/luxon/src/zones/systemZone.js
1357
1357
  var singleton = null;
1358
1358
  var SystemZone = class _SystemZone extends Zone {
1359
1359
  /**
@@ -1400,7 +1400,7 @@ var SystemZone = class _SystemZone extends Zone {
1400
1400
  }
1401
1401
  };
1402
1402
 
1403
- // ../../node_modules/luxon/src/zones/IANAZone.js
1403
+ // ../../internal/validation/node_modules/luxon/src/zones/IANAZone.js
1404
1404
  var dtfCache = {};
1405
1405
  function makeDTF(zone) {
1406
1406
  if (!dtfCache[zone]) {
@@ -1555,7 +1555,7 @@ var IANAZone = class _IANAZone extends Zone {
1555
1555
  }
1556
1556
  };
1557
1557
 
1558
- // ../../node_modules/luxon/src/zones/fixedOffsetZone.js
1558
+ // ../../internal/validation/node_modules/luxon/src/zones/fixedOffsetZone.js
1559
1559
  var singleton2 = null;
1560
1560
  var FixedOffsetZone = class _FixedOffsetZone extends Zone {
1561
1561
  /**
@@ -1638,7 +1638,7 @@ var FixedOffsetZone = class _FixedOffsetZone extends Zone {
1638
1638
  }
1639
1639
  };
1640
1640
 
1641
- // ../../node_modules/luxon/src/zones/invalidZone.js
1641
+ // ../../internal/validation/node_modules/luxon/src/zones/invalidZone.js
1642
1642
  var InvalidZone = class extends Zone {
1643
1643
  constructor(zoneName) {
1644
1644
  super();
@@ -1678,7 +1678,7 @@ var InvalidZone = class extends Zone {
1678
1678
  }
1679
1679
  };
1680
1680
 
1681
- // ../../node_modules/luxon/src/impl/zoneUtil.js
1681
+ // ../../internal/validation/node_modules/luxon/src/impl/zoneUtil.js
1682
1682
  function normalizeZone(input, defaultZone2) {
1683
1683
  if (isUndefined(input) || input === null) {
1684
1684
  return defaultZone2;
@@ -1703,7 +1703,7 @@ function normalizeZone(input, defaultZone2) {
1703
1703
  }
1704
1704
  }
1705
1705
 
1706
- // ../../node_modules/luxon/src/settings.js
1706
+ // ../../internal/validation/node_modules/luxon/src/settings.js
1707
1707
  var now = () => Date.now();
1708
1708
  var defaultZone = "system";
1709
1709
  var defaultLocale = null;
@@ -1810,7 +1810,7 @@ var Settings = class {
1810
1810
  }
1811
1811
  };
1812
1812
 
1813
- // ../../node_modules/luxon/src/impl/locale.js
1813
+ // ../../internal/validation/node_modules/luxon/src/impl/locale.js
1814
1814
  var intlLFCache = {};
1815
1815
  function getCachedLF(locString, opts = {}) {
1816
1816
  const key = JSON.stringify([locString, opts]);
@@ -2142,7 +2142,7 @@ var Locale = class _Locale {
2142
2142
  }
2143
2143
  };
2144
2144
 
2145
- // ../../node_modules/luxon/src/impl/regexParser.js
2145
+ // ../../internal/validation/node_modules/luxon/src/impl/regexParser.js
2146
2146
  function combineRegexes(...regexes) {
2147
2147
  const full = regexes.reduce((f, r) => f + r.source, "");
2148
2148
  return RegExp(`^${full}$`);
@@ -2377,7 +2377,7 @@ function parseSQL(s2) {
2377
2377
  );
2378
2378
  }
2379
2379
 
2380
- // ../../node_modules/luxon/src/duration.js
2380
+ // ../../internal/validation/node_modules/luxon/src/duration.js
2381
2381
  var INVALID = "Invalid Duration";
2382
2382
  var lowOrderMatrix = {
2383
2383
  weeks: {
@@ -3172,7 +3172,7 @@ var Duration = class _Duration {
3172
3172
  }
3173
3173
  };
3174
3174
 
3175
- // ../../node_modules/luxon/src/interval.js
3175
+ // ../../internal/validation/node_modules/luxon/src/interval.js
3176
3176
  var INVALID2 = "Invalid Interval";
3177
3177
  function validateStartEnd(start, end) {
3178
3178
  if (!start || !start.isValid) {
@@ -3685,7 +3685,7 @@ var Interval = class _Interval {
3685
3685
  }
3686
3686
  };
3687
3687
 
3688
- // ../../node_modules/luxon/src/info.js
3688
+ // ../../internal/validation/node_modules/luxon/src/info.js
3689
3689
  var Info = class {
3690
3690
  /**
3691
3691
  * Return whether the specified zone contains a DST.
@@ -3826,7 +3826,7 @@ var Info = class {
3826
3826
  }
3827
3827
  };
3828
3828
 
3829
- // ../../node_modules/luxon/src/impl/diff.js
3829
+ // ../../internal/validation/node_modules/luxon/src/impl/diff.js
3830
3830
  function dayDiff(earlier, later) {
3831
3831
  const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier);
3832
3832
  return Math.floor(Duration.fromMillis(ms).as("days"));
@@ -3885,7 +3885,7 @@ function diff_default(earlier, later, units, opts) {
3885
3885
  }
3886
3886
  }
3887
3887
 
3888
- // ../../node_modules/luxon/src/impl/digits.js
3888
+ // ../../internal/validation/node_modules/luxon/src/impl/digits.js
3889
3889
  var numberingSystems = {
3890
3890
  arab: "[\u0660-\u0669]",
3891
3891
  arabext: "[\u06F0-\u06F9]",
@@ -3957,7 +3957,7 @@ function digitRegex({ numberingSystem }, append = "") {
3957
3957
  return new RegExp(`${numberingSystems[numberingSystem || "latn"]}${append}`);
3958
3958
  }
3959
3959
 
3960
- // ../../node_modules/luxon/src/impl/tokenParser.js
3960
+ // ../../internal/validation/node_modules/luxon/src/impl/tokenParser.js
3961
3961
  var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support";
3962
3962
  function intUnit(regex, post = (i) => i) {
3963
3963
  return { regex, deser: ([s2]) => post(parseDigits(s2)) };
@@ -4302,7 +4302,7 @@ function formatOptsToTokens(formatOpts, locale) {
4302
4302
  return parts.map((p) => tokenForPart(p, locale, formatOpts));
4303
4303
  }
4304
4304
 
4305
- // ../../node_modules/luxon/src/impl/conversions.js
4305
+ // ../../internal/validation/node_modules/luxon/src/impl/conversions.js
4306
4306
  var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
4307
4307
  var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
4308
4308
  function unitOutOfRange(unit, value) {
@@ -4411,7 +4411,7 @@ function hasInvalidTimeData(obj) {
4411
4411
  return false;
4412
4412
  }
4413
4413
 
4414
- // ../../node_modules/luxon/src/datetime.js
4414
+ // ../../internal/validation/node_modules/luxon/src/datetime.js
4415
4415
  var INVALID3 = "Invalid DateTime";
4416
4416
  var MAX_DATE = 864e13;
4417
4417
  function unsupportedZone(zone) {
@@ -6243,8 +6243,11 @@ var AssetType = {
6243
6243
  MEDIUM: "MEDIUM",
6244
6244
  CHROME_WEB_STORE: "CHROME_WEB_STORE",
6245
6245
  MOZILLA_ADDONS: "MOZILLA_ADDONS",
6246
+ OPERA_ADDONS: "OPERA_ADDONS",
6246
6247
  EMAIL: "EMAIL",
6247
- PATREON: "PATREON"
6248
+ PATREON: "PATREON",
6249
+ OPENSEA: "OPENSEA",
6250
+ FARCASTER: "FARCASTER"
6248
6251
  };
6249
6252
  var AssetStatus = {
6250
6253
  UNKNOWN: "UNKNOWN",
@@ -6474,11 +6477,19 @@ var ChainPatrolClientError = class extends Error {
6474
6477
  this.code = code;
6475
6478
  }
6476
6479
  };
6480
+ var ChainPatrolClientErrorCodes = /* @__PURE__ */ ((ChainPatrolClientErrorCodes2) => {
6481
+ ChainPatrolClientErrorCodes2["MISSING_API_KEY"] = "MISSING_API_KEY";
6482
+ ChainPatrolClientErrorCodes2["API_ERROR"] = "API_ERROR";
6483
+ return ChainPatrolClientErrorCodes2;
6484
+ })(ChainPatrolClientErrorCodes || {});
6477
6485
  var ChainPatrolClient = class {
6478
6486
  constructor(options) {
6479
6487
  var _a;
6480
6488
  if (!options.apiKey) {
6481
- throw new ChainPatrolClientError("Missing API key", "MISSING_API_KEY");
6489
+ throw new ChainPatrolClientError(
6490
+ "Missing API key",
6491
+ "MISSING_API_KEY" /* MISSING_API_KEY */
6492
+ );
6482
6493
  }
6483
6494
  this.baseUrl = (_a = options.baseUrl) != null ? _a : "https://app.chainpatrol.io/api/";
6484
6495
  this.logger = new Logger({ component: "ChainPatrolClient" });
@@ -6500,7 +6511,7 @@ var ChainPatrolClient = class {
6500
6511
  if (!res.ok) {
6501
6512
  const text = yield res.text();
6502
6513
  this.logger.error("fetch", { url, req, res: { status: res.status, text } });
6503
- throw new ChainPatrolClientError(text, "API_ERROR");
6514
+ throw new ChainPatrolClientError(text, "API_ERROR" /* API_ERROR */);
6504
6515
  }
6505
6516
  return res.json();
6506
6517
  });
@@ -6946,6 +6957,6 @@ _ThreatDetector.Schema = z.object({
6946
6957
  });
6947
6958
  var ThreatDetector = _ThreatDetector;
6948
6959
 
6949
- export { ChainPatrolClient, DomainParseError, Events, Relay, storage_exports as Storage, ThreatDetector };
6960
+ export { ChainPatrolClient, ChainPatrolClientError, ChainPatrolClientErrorCodes, DomainParseError, Events, Relay, storage_exports as Storage, ThreatDetector };
6950
6961
  //# sourceMappingURL=out.js.map
6951
6962
  //# sourceMappingURL=index.mjs.map