@medialane/sdk 0.102.0 → 0.104.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.
@@ -1,4 +1,4 @@
1
- import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig, C as ApiIntentCreated } from '../services-DzFMDXse.cjs';
1
+ import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig, C as ApiIntentCreated } from '../services-DhcDmDVP.cjs';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-BzLfeLF9.cjs';
4
4
  import 'zod';
@@ -1,4 +1,4 @@
1
- import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig, C as ApiIntentCreated } from '../services-DnNPohyZ.js';
1
+ import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig, C as ApiIntentCreated } from '../services-CtdateUS.js';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-BzLfeLF9.js';
4
4
  import 'zod';
@@ -901,8 +901,23 @@ var PUBLIC_RPC_FALLBACKS = [
901
901
  "https://rpc.starknet.lava.build"
902
902
  ];
903
903
  var TRANSIENT_BODY_RE = /"code"\s*:\s*-32001|"code"\s*:\s*-32603|unable to complete|rate.?limit|too many|throttl|exceed.*quota|temporarily unavailable|service unavailable|overload|gateway.*time|upstream.*time|backend.*error/i;
904
+ var POLICY_REFUSAL_CODES = [-32003, -32005, -32600];
905
+ function isPolicyRefusal(input) {
906
+ let body = input.body;
907
+ if (typeof body === "string") {
908
+ try {
909
+ body = JSON.parse(body);
910
+ } catch {
911
+ return false;
912
+ }
913
+ }
914
+ const err = body?.error;
915
+ const code = err && typeof err === "object" ? err.code : void 0;
916
+ return typeof code === "number" && POLICY_REFUSAL_CODES.includes(code);
917
+ }
904
918
  function isTransientRpcError(input) {
905
919
  const { status, body } = input;
920
+ if (isPolicyRefusal({ body })) return false;
906
921
  if (typeof status === "number" && (status === 429 || status >= 500)) return true;
907
922
  if (body == null) return false;
908
923
  if (typeof body === "object") {