@medialane/sdk 0.127.0 → 0.128.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.
@@ -11622,6 +11622,14 @@ async function requestSiwsToken({
11622
11622
  return token;
11623
11623
  }
11624
11624
 
11625
+ // src/errors.ts
11626
+ var UserFacingError = class extends Error {
11627
+ constructor(message) {
11628
+ super(message);
11629
+ this.name = "UserFacingError";
11630
+ }
11631
+ };
11632
+
11625
11633
  // src/starknet/services/executeIntent.ts
11626
11634
  async function confirmIntentBestEffort(client, intentId, txHash) {
11627
11635
  await client.api.confirmIntent(intentId, txHash).catch(() => {
@@ -11651,14 +11659,14 @@ async function assertTransactionSucceeded(provider, txHash, retryDelaysMs = RECE
11651
11659
  const receipt = await provider.getTransactionReceipt(txHash);
11652
11660
  const status = receipt.execution_status ?? receipt.status;
11653
11661
  if (status === "REVERTED" || status === "REJECTED") {
11654
- throw new Error("Transaction was submitted but reverted onchain. Please check your balance and try again.");
11662
+ throw new UserFacingError("Transaction was submitted but reverted onchain. Please check your balance and try again.");
11655
11663
  }
11656
11664
  if (status) return receipt;
11657
11665
  } catch (err) {
11658
11666
  if (err instanceof Error && err.message.includes("reverted onchain")) throw err;
11659
11667
  }
11660
11668
  }
11661
- throw new Error("Verification timed out. Check your account for the transaction status.");
11669
+ throw new UserFacingError("Verification timed out. Check your account for the transaction status.");
11662
11670
  }
11663
11671
  async function executeIntent(provider, signer, client, intent, opts = {}) {
11664
11672
  let calls;
@@ -12929,6 +12937,7 @@ exports.SponsoredCallRejectedError = SponsoredCallRejectedError;
12929
12937
  exports.SponsorshipService = SponsorshipService;
12930
12938
  exports.StarknetVenue = StarknetVenue;
12931
12939
  exports.TicketService = TicketService;
12940
+ exports.UserFacingError = UserFacingError;
12932
12941
  exports.VALIDATED_EKUBO_PARAMS = VALIDATED_EKUBO_PARAMS;
12933
12942
  exports.accountFor = accountFor;
12934
12943
  exports.adminRequestDigest = adminRequestDigest;