@learncard/claimable-boosts-plugin 1.0.30 → 1.0.31

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.
@@ -3366,7 +3366,7 @@ var getClaimableBoostsPlugin = /* @__PURE__ */ __name((learnCard) => {
3366
3366
  description: "Simple claimable boost creation plugin that handles signing authority management.",
3367
3367
  methods: {
3368
3368
  generateBoostClaimLink: async (_learnCard, boostURI, options) => {
3369
- console.log("Generating boost claim link...", boostURI, options);
3369
+ _learnCard.debug?.("Generating boost claim link...", boostURI, options);
3370
3370
  return _generateBoostClaimLink(_learnCard, boostURI, options);
3371
3371
  }
3372
3372
  }
@@ -3375,10 +3375,10 @@ var getClaimableBoostsPlugin = /* @__PURE__ */ __name((learnCard) => {
3375
3375
  var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI, options) => {
3376
3376
  try {
3377
3377
  const rsas = await _learnCard.invoke.getRegisteredSigningAuthorities();
3378
- console.log("Registered Signing Authorities", rsas);
3378
+ _learnCard.debug?.("Registered Signing Authorities", rsas);
3379
3379
  if (rsas?.length > 0) {
3380
3380
  const rsa2 = rsas[0];
3381
- console.log("Using Existing Signing Authority", rsa2);
3381
+ _learnCard.debug?.("Using Existing Signing Authority", rsa2);
3382
3382
  const _boostClaimLink2 = await _learnCard.invoke.generateClaimLink(
3383
3383
  boostURI,
3384
3384
  {
@@ -3393,7 +3393,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3393
3393
  return `https://learncard.app/claim/boost?claim=true&boostUri=${_boostClaimLink2.boostUri}&challenge=${_boostClaimLink2.challenge}`;
3394
3394
  }
3395
3395
  const signingAuthorities = await _learnCard.invoke.getSigningAuthorities();
3396
- console.log("Existing Signing Authorities", signingAuthorities);
3396
+ _learnCard.debug?.("Existing Signing Authorities", signingAuthorities);
3397
3397
  let sa;
3398
3398
  if (signingAuthorities && Array.isArray(signingAuthorities)) {
3399
3399
  sa = signingAuthorities.find(
@@ -3402,7 +3402,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3402
3402
  }
3403
3403
  if (!sa) {
3404
3404
  const newSa = await _learnCard.invoke.createSigningAuthority(DEFAULT_RELATIONSHIP_NAME);
3405
- console.log("Creating New Signing Authority", newSa);
3405
+ _learnCard.debug?.("Creating New Signing Authority", newSa);
3406
3406
  if (!newSa) {
3407
3407
  throw new Error("Failed to create signing authority");
3408
3408
  }
@@ -3418,7 +3418,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3418
3418
  sa?.name || "",
3419
3419
  sa?.did || ""
3420
3420
  );
3421
- console.log("Registering Signing Authority with Network", sa);
3421
+ _learnCard.debug?.("Registering Signing Authority with Network", sa);
3422
3422
  if (!rsa) {
3423
3423
  throw new Error("Failed to register signing authority");
3424
3424
  }
@@ -3430,13 +3430,13 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3430
3430
  },
3431
3431
  options
3432
3432
  );
3433
- console.log("Generating Claim Link", _boostClaimLink);
3433
+ _learnCard.debug?.("Generating Claim Link", _boostClaimLink);
3434
3434
  if (!_boostClaimLink) {
3435
3435
  throw new Error("Failed to generate claim link");
3436
3436
  }
3437
3437
  return `https://learncard.app/claim/boost?claim=true&boostUri=${_boostClaimLink.boostUri}&challenge=${_boostClaimLink.challenge}`;
3438
3438
  } catch (error) {
3439
- console.error("Error generateBoostClaimLink:", error);
3439
+ _learnCard.debug?.("Error generateBoostClaimLink:", error);
3440
3440
  throw new Error("Failed to generate boost claim link: " + error.message);
3441
3441
  }
3442
3442
  }, "_generateBoostClaimLink");