@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.
@@ -3341,7 +3341,7 @@ var getClaimableBoostsPlugin = /* @__PURE__ */ __name((learnCard) => {
3341
3341
  description: "Simple claimable boost creation plugin that handles signing authority management.",
3342
3342
  methods: {
3343
3343
  generateBoostClaimLink: async (_learnCard, boostURI, options) => {
3344
- console.log("Generating boost claim link...", boostURI, options);
3344
+ _learnCard.debug?.("Generating boost claim link...", boostURI, options);
3345
3345
  return _generateBoostClaimLink(_learnCard, boostURI, options);
3346
3346
  }
3347
3347
  }
@@ -3350,10 +3350,10 @@ var getClaimableBoostsPlugin = /* @__PURE__ */ __name((learnCard) => {
3350
3350
  var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI, options) => {
3351
3351
  try {
3352
3352
  const rsas = await _learnCard.invoke.getRegisteredSigningAuthorities();
3353
- console.log("Registered Signing Authorities", rsas);
3353
+ _learnCard.debug?.("Registered Signing Authorities", rsas);
3354
3354
  if (rsas?.length > 0) {
3355
3355
  const rsa2 = rsas[0];
3356
- console.log("Using Existing Signing Authority", rsa2);
3356
+ _learnCard.debug?.("Using Existing Signing Authority", rsa2);
3357
3357
  const _boostClaimLink2 = await _learnCard.invoke.generateClaimLink(
3358
3358
  boostURI,
3359
3359
  {
@@ -3368,7 +3368,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3368
3368
  return `https://learncard.app/claim/boost?claim=true&boostUri=${_boostClaimLink2.boostUri}&challenge=${_boostClaimLink2.challenge}`;
3369
3369
  }
3370
3370
  const signingAuthorities = await _learnCard.invoke.getSigningAuthorities();
3371
- console.log("Existing Signing Authorities", signingAuthorities);
3371
+ _learnCard.debug?.("Existing Signing Authorities", signingAuthorities);
3372
3372
  let sa;
3373
3373
  if (signingAuthorities && Array.isArray(signingAuthorities)) {
3374
3374
  sa = signingAuthorities.find(
@@ -3377,7 +3377,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3377
3377
  }
3378
3378
  if (!sa) {
3379
3379
  const newSa = await _learnCard.invoke.createSigningAuthority(DEFAULT_RELATIONSHIP_NAME);
3380
- console.log("Creating New Signing Authority", newSa);
3380
+ _learnCard.debug?.("Creating New Signing Authority", newSa);
3381
3381
  if (!newSa) {
3382
3382
  throw new Error("Failed to create signing authority");
3383
3383
  }
@@ -3393,7 +3393,7 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3393
3393
  sa?.name || "",
3394
3394
  sa?.did || ""
3395
3395
  );
3396
- console.log("Registering Signing Authority with Network", sa);
3396
+ _learnCard.debug?.("Registering Signing Authority with Network", sa);
3397
3397
  if (!rsa) {
3398
3398
  throw new Error("Failed to register signing authority");
3399
3399
  }
@@ -3405,13 +3405,13 @@ var _generateBoostClaimLink = /* @__PURE__ */ __name(async (_learnCard, boostURI
3405
3405
  },
3406
3406
  options
3407
3407
  );
3408
- console.log("Generating Claim Link", _boostClaimLink);
3408
+ _learnCard.debug?.("Generating Claim Link", _boostClaimLink);
3409
3409
  if (!_boostClaimLink) {
3410
3410
  throw new Error("Failed to generate claim link");
3411
3411
  }
3412
3412
  return `https://learncard.app/claim/boost?claim=true&boostUri=${_boostClaimLink.boostUri}&challenge=${_boostClaimLink.challenge}`;
3413
3413
  } catch (error) {
3414
- console.error("Error generateBoostClaimLink:", error);
3414
+ _learnCard.debug?.("Error generateBoostClaimLink:", error);
3415
3415
  throw new Error("Failed to generate boost claim link: " + error.message);
3416
3416
  }
3417
3417
  }, "_generateBoostClaimLink");