@medialane/sdk 0.131.0 → 0.133.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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-JkeKc3cu.cjs';
2
- export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-JkeKc3cu.cjs';
1
+ import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-DEz42hh5.cjs';
2
+ export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-DEz42hh5.cjs';
3
3
  import { C as Chain } from './types-CuSlc_YE.cjs';
4
4
  export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-CuSlc_YE.cjs';
5
5
  import 'zod';
@@ -480,7 +480,6 @@ declare function createFailoverFetch(urls: string[], options?: FailoverFetchOpti
480
480
  interface RpcProxyConfig {
481
481
  backendUrl: string;
482
482
  apiKey: string | undefined;
483
- checkRateLimit: (ip: string) => boolean;
484
483
  fetchImpl?: typeof fetch;
485
484
  }
486
485
  declare function createRpcProxyHandler(config: RpcProxyConfig): (req: Request) => Promise<Response>;
@@ -489,7 +488,6 @@ interface BackendProxyConfig {
489
488
  path: string;
490
489
  backendUrl: string;
491
490
  apiKey: string | undefined;
492
- checkRateLimit: (ip: string) => boolean;
493
491
  fetchImpl?: typeof fetch;
494
492
  forwardCookie?: {
495
493
  name: string;
@@ -513,7 +511,6 @@ declare function validateUrl(raw: string, options?: {
513
511
  declare function isPrivateOrInsecureUrl(raw: string, requireHttps?: boolean): boolean;
514
512
 
515
513
  interface ImageProxyConfig {
516
- checkRateLimit: (ip: string) => boolean;
517
514
  resolveHostname: (hostname: string) => Promise<string[]>;
518
515
  fetchImpl?: typeof fetch;
519
516
  userAgent?: string;
@@ -547,15 +544,8 @@ declare function uploadDirectoryToBackend(config: BackendMetadataConfig, files:
547
544
  }>;
548
545
  declare function getBackendSignedUrl(config: BackendMetadataConfig, kind?: "image" | "document" | "media"): Promise<string>;
549
546
 
550
- declare function createRateLimiter(windowMs: number, max: number): (key: string) => boolean;
551
- declare const TRUSTED_APP_IP_HEADER = "x-medialane-client-ip";
552
- declare function requestIp(req: Request): string;
553
-
554
547
  declare function isSameOrigin(req: Request): boolean;
555
548
 
556
- declare function isSpoofableForwardingHeader(name: string): boolean;
557
- declare function trustedClientIp(req: Request): string;
558
-
559
549
  declare const IDENTITY_TTL_SECONDS = 86400;
560
550
  declare const ACCOUNT_SESSION_TTL_SECONDS: number;
561
551
  interface SiwsIdentity {
@@ -623,4 +613,4 @@ declare const IPFS_SAFE_CONTENT_TYPE_PREFIXES: readonly ["image/jpeg", "image/pn
623
613
  declare function resolveSafeImageContentType(contentType: string): string;
624
614
  declare const MAX_IPFS_GATEWAY_RESPONSE_BYTES: number;
625
615
 
626
- export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, type AssetAttribute, type AssetMetadata, type BackendMetadataConfig, type BackendProxyConfig, type BackendUploadResult, type BuildAssetMetadataInput, type CanonicalHash, type CappedBody, Chain, DEFAULT_CURRENCY, type FailoverFetchOptions, type FeeEnv, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, type ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, POLICY_REFUSAL_CODES, RESERVED_TRAITS, type RemixPolicy, type RemixPolicyInput, ResolvedFeeConfig, type RpcProxyConfig, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, ServiceCapability, ServiceDefinition, type ServiceId, type SiwsIdentity, type SupportedToken, type SupportedTokenSymbol, TRUSTED_APP_IP_HEADER, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isSpoofableForwardingHeader, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, requestIp, resolveAppFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, trustedClientIp, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
616
+ export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, type AssetAttribute, type AssetMetadata, type BackendMetadataConfig, type BackendProxyConfig, type BackendUploadResult, type BuildAssetMetadataInput, type CanonicalHash, type CappedBody, Chain, DEFAULT_CURRENCY, type FailoverFetchOptions, type FeeEnv, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, type ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, POLICY_REFUSAL_CODES, RESERVED_TRAITS, type RemixPolicy, type RemixPolicyInput, ResolvedFeeConfig, type RpcProxyConfig, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, ServiceCapability, ServiceDefinition, type ServiceId, type SiwsIdentity, type SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, resolveAppFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-HTG0DcWa.js';
2
- export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-HTG0DcWa.js';
1
+ import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-DxBa5Wne.js';
2
+ export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-DxBa5Wne.js';
3
3
  import { C as Chain } from './types-CuSlc_YE.js';
4
4
  export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-CuSlc_YE.js';
5
5
  import 'zod';
@@ -480,7 +480,6 @@ declare function createFailoverFetch(urls: string[], options?: FailoverFetchOpti
480
480
  interface RpcProxyConfig {
481
481
  backendUrl: string;
482
482
  apiKey: string | undefined;
483
- checkRateLimit: (ip: string) => boolean;
484
483
  fetchImpl?: typeof fetch;
485
484
  }
486
485
  declare function createRpcProxyHandler(config: RpcProxyConfig): (req: Request) => Promise<Response>;
@@ -489,7 +488,6 @@ interface BackendProxyConfig {
489
488
  path: string;
490
489
  backendUrl: string;
491
490
  apiKey: string | undefined;
492
- checkRateLimit: (ip: string) => boolean;
493
491
  fetchImpl?: typeof fetch;
494
492
  forwardCookie?: {
495
493
  name: string;
@@ -513,7 +511,6 @@ declare function validateUrl(raw: string, options?: {
513
511
  declare function isPrivateOrInsecureUrl(raw: string, requireHttps?: boolean): boolean;
514
512
 
515
513
  interface ImageProxyConfig {
516
- checkRateLimit: (ip: string) => boolean;
517
514
  resolveHostname: (hostname: string) => Promise<string[]>;
518
515
  fetchImpl?: typeof fetch;
519
516
  userAgent?: string;
@@ -547,15 +544,8 @@ declare function uploadDirectoryToBackend(config: BackendMetadataConfig, files:
547
544
  }>;
548
545
  declare function getBackendSignedUrl(config: BackendMetadataConfig, kind?: "image" | "document" | "media"): Promise<string>;
549
546
 
550
- declare function createRateLimiter(windowMs: number, max: number): (key: string) => boolean;
551
- declare const TRUSTED_APP_IP_HEADER = "x-medialane-client-ip";
552
- declare function requestIp(req: Request): string;
553
-
554
547
  declare function isSameOrigin(req: Request): boolean;
555
548
 
556
- declare function isSpoofableForwardingHeader(name: string): boolean;
557
- declare function trustedClientIp(req: Request): string;
558
-
559
549
  declare const IDENTITY_TTL_SECONDS = 86400;
560
550
  declare const ACCOUNT_SESSION_TTL_SECONDS: number;
561
551
  interface SiwsIdentity {
@@ -623,4 +613,4 @@ declare const IPFS_SAFE_CONTENT_TYPE_PREFIXES: readonly ["image/jpeg", "image/pn
623
613
  declare function resolveSafeImageContentType(contentType: string): string;
624
614
  declare const MAX_IPFS_GATEWAY_RESPONSE_BYTES: number;
625
615
 
626
- export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, type AssetAttribute, type AssetMetadata, type BackendMetadataConfig, type BackendProxyConfig, type BackendUploadResult, type BuildAssetMetadataInput, type CanonicalHash, type CappedBody, Chain, DEFAULT_CURRENCY, type FailoverFetchOptions, type FeeEnv, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, type ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, POLICY_REFUSAL_CODES, RESERVED_TRAITS, type RemixPolicy, type RemixPolicyInput, ResolvedFeeConfig, type RpcProxyConfig, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, ServiceCapability, ServiceDefinition, type ServiceId, type SiwsIdentity, type SupportedToken, type SupportedTokenSymbol, TRUSTED_APP_IP_HEADER, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isSpoofableForwardingHeader, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, requestIp, resolveAppFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, trustedClientIp, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
616
+ export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, type AssetAttribute, type AssetMetadata, type BackendMetadataConfig, type BackendProxyConfig, type BackendUploadResult, type BuildAssetMetadataInput, type CanonicalHash, type CappedBody, Chain, DEFAULT_CURRENCY, type FailoverFetchOptions, type FeeEnv, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, type ImageProxyConfig, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, POLICY_REFUSAL_CODES, RESERVED_TRAITS, type RemixPolicy, type RemixPolicyInput, ResolvedFeeConfig, type RpcProxyConfig, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, ServiceCapability, ServiceDefinition, type ServiceId, type SiwsIdentity, type SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, resolveAppFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
package/dist/index.js CHANGED
@@ -758,11 +758,9 @@ var ApiClient = class {
758
758
  }
759
759
  async upsertMyWallet(siwsToken, options = {}) {
760
760
  const body = {
761
- walletType: options.walletType ?? "UNKNOWN",
762
- appSource: options.appSource ?? "MEDIALANE_SDK"
761
+ walletType: options.walletType ?? "UNKNOWN"
763
762
  };
764
763
  if (options.chain) body.chain = options.chain;
765
- if (options.emailVerificationToken) body.emailVerificationToken = options.emailVerificationToken;
766
764
  if (options.email) body.email = options.email;
767
765
  if (options.accountToken) body.accountToken = options.accountToken;
768
766
  return this.request("/v1/users/me", {
@@ -785,7 +783,7 @@ var ApiClient = class {
785
783
  }
786
784
  async verifyEmailCode(email, code) {
787
785
  const body = await this.post("/v1/auth/email/verify-code", { email, code });
788
- return { token: body.token, waitingWallets: body.waitingWallets ?? [] };
786
+ return { waitingWallets: body.waitingWallets ?? [] };
789
787
  }
790
788
  claimWallet(params) {
791
789
  return this.post("/v1/users/me/claim-wallet", params);
@@ -1504,41 +1502,6 @@ function createFailoverFetch(urls, options = {}) {
1504
1502
  return failover;
1505
1503
  }
1506
1504
 
1507
- // src/server/rate-limit.ts
1508
- function createRateLimiter(windowMs, max) {
1509
- const counts = /* @__PURE__ */ new Map();
1510
- let nextSweepAt = Date.now() + windowMs;
1511
- return function checkRateLimit(key) {
1512
- const now = Date.now();
1513
- if (now >= nextSweepAt) {
1514
- for (const [k, entry2] of counts) {
1515
- if (now >= entry2.resetAt) counts.delete(k);
1516
- }
1517
- nextSweepAt = now + windowMs;
1518
- }
1519
- const entry = counts.get(key);
1520
- if (!entry || now >= entry.resetAt) {
1521
- counts.set(key, { count: 1, resetAt: now + windowMs });
1522
- return true;
1523
- }
1524
- if (entry.count >= max) return false;
1525
- entry.count += 1;
1526
- return true;
1527
- };
1528
- }
1529
- var TRUSTED_APP_IP_HEADER = "x-medialane-client-ip";
1530
- function requestIp(req) {
1531
- const fromEdge = req.headers.get("x-vercel-forwarded-for")?.split(",")[0]?.trim();
1532
- if (fromEdge) return fromEdge;
1533
- const forwarded = req.headers.get("x-forwarded-for");
1534
- if (forwarded) {
1535
- const hops = forwarded.split(",").map((hop) => hop.trim()).filter(Boolean);
1536
- const nearest = hops[hops.length - 1];
1537
- if (nearest) return nearest;
1538
- }
1539
- return "unknown";
1540
- }
1541
-
1542
1505
  // src/server/origin.ts
1543
1506
  function isSameOrigin(req) {
1544
1507
  const origin = req.headers.get("origin");
@@ -1572,9 +1535,6 @@ function createBackendProxyHandler(config) {
1572
1535
  if (!isSameOrigin(req)) {
1573
1536
  return proxyError(-32600, "Cross-origin requests are not allowed", 403);
1574
1537
  }
1575
- if (!config.checkRateLimit(requestIp(req))) {
1576
- return proxyError(-32005, "Too many requests", 429);
1577
- }
1578
1538
  if (!config.apiKey) {
1579
1539
  return proxyError(-32003, "No API key configured \u2014 request not forwarded", 402);
1580
1540
  }
@@ -1832,9 +1792,6 @@ function createImageProxyHandler(config) {
1832
1792
  return res;
1833
1793
  }
1834
1794
  return async function handleImageProxy(req) {
1835
- if (!config.checkRateLimit(requestIp(req))) {
1836
- return jsonError("Too many requests", 429);
1837
- }
1838
1795
  const raw = new URL(req.url).searchParams.get("url");
1839
1796
  if (!raw) return jsonError("Missing url", 400);
1840
1797
  const validated = validateUrl(raw);
@@ -1916,30 +1873,6 @@ async function getBackendSignedUrl(config, kind = "image") {
1916
1873
  if (!res.ok || !data.data) throw new Error(data.error ?? "Failed to create upload URL");
1917
1874
  return data.data.url;
1918
1875
  }
1919
-
1920
- // src/server/trusted-client-ip.ts
1921
- var SPOOFABLE_FORWARDING_HEADERS = [
1922
- "x-forwarded-for",
1923
- "x-real-ip",
1924
- "x-client-ip",
1925
- "true-client-ip",
1926
- "cf-connecting-ip",
1927
- TRUSTED_APP_IP_HEADER
1928
- ];
1929
- function isSpoofableForwardingHeader(name) {
1930
- return SPOOFABLE_FORWARDING_HEADERS.includes(name.toLowerCase());
1931
- }
1932
- function trustedClientIp(req) {
1933
- const vercel = req.headers.get("x-vercel-forwarded-for")?.split(",")[0]?.trim();
1934
- if (vercel) return vercel;
1935
- const forwarded = req.headers.get("x-forwarded-for");
1936
- if (forwarded) {
1937
- const hops = forwarded.split(",").map((hop) => hop.trim()).filter(Boolean);
1938
- const nearest = hops[hops.length - 1];
1939
- if (nearest) return nearest;
1940
- }
1941
- return "unknown";
1942
- }
1943
1876
  var IDENTITY_PREFIX = "siws_";
1944
1877
  var ACCOUNT_SESSION_PREFIX = "account_session_";
1945
1878
  var IDENTITY_DOMAIN = "siws-identity-v1";
@@ -2116,6 +2049,6 @@ var UserFacingError = class extends Error {
2116
2049
  }
2117
2050
  };
2118
2051
 
2119
- export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, ApiClient, CHAINS, DEFAULT_CHAIN, DEFAULT_CURRENCY, FeeConfigSchema, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, MedialaneApiError, OPEN_LICENSES, POLICY_REFUSAL_CODES, PasskeyCancelledError, RESERVED_TRAITS, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, TRUSTED_APP_IP_HEADER, UserFacingError, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getCoordinates, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getStarknetCoordinates, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isSpoofableForwardingHeader, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, requestIp, resolveAppFeeConfig, resolveConfig, resolveFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, trustedClientIp, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
2052
+ export { ACCOUNT_SESSION_TTL_SECONDS, ALLOWED_IMAGE_CONTENT_TYPES, ApiClient, CHAINS, DEFAULT_CHAIN, DEFAULT_CURRENCY, FeeConfigSchema, IDENTITY_TTL_SECONDS, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IMAGE_PROXY_BYTES, MAX_IMAGE_REDIRECTS, MAX_IPFS_GATEWAY_RESPONSE_BYTES, MedialaneApiError, OPEN_LICENSES, POLICY_REFUSAL_CODES, PasskeyCancelledError, RESERVED_TRAITS, STARKNET_COLLECTION_1155_CLASS_HASH, STARKNET_COLLECTION_1155_CONTRACT, STARKNET_COLLECTION_1155_FACTORY_CLASS_HASH, STARKNET_COLLECTION_1155_START_BLOCK, STARKNET_COLLECTION_721_CONTRACT, STARKNET_COLLECTION_721_START_BLOCK, STARKNET_CREATOR_COIN_CLASS_HASH, STARKNET_CREATOR_COIN_EKUBO_LAUNCHER, STARKNET_CREATOR_COIN_FACTORY_CLASS_HASH, STARKNET_CREATOR_COIN_FACTORY_CONTRACT, STARKNET_CREATOR_COIN_START_BLOCK, STARKNET_DATA_TOKENIZATION_721_CONTRACT, STARKNET_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, STARKNET_GENESIS_MINT_BR_CONTRACT, STARKNET_GENESIS_MINT_GLOBAL_CONTRACT, STARKNET_GENESIS_MINT_LAUNCH_CONTRACT, STARKNET_IPCOLLECTION_CLASS_HASH, STARKNET_IPNFT_CLASS_HASH, STARKNET_IP_CLUB_COLLECTION_CLASS_HASH, STARKNET_IP_CLUB_FACTORY_CONTRACT, STARKNET_IP_SPONSORSHIP_CLASS_HASH, STARKNET_IP_SPONSORSHIP_CONTRACT, STARKNET_IP_TICKETS_FACTORY_CONTRACT, STARKNET_IP_TICKET_COLLECTION_CLASS_HASH, STARKNET_MARKETPLACE_1155_CLASS_HASH, STARKNET_MARKETPLACE_1155_CONTRACT, STARKNET_MARKETPLACE_1155_START_BLOCK, STARKNET_MARKETPLACE_721_CLASS_HASH, STARKNET_MARKETPLACE_721_CONTRACT, STARKNET_MARKETPLACE_721_START_BLOCK, STARKNET_NFTCOMMENTS_CONTRACT, STARKNET_POP_COLLECTION_CLASS_HASH, STARKNET_POP_FACTORY_CONTRACT, SUPPORTED_TOKENS, SUPPORTED_URL_CHAINS, UserFacingError, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createBackendProxyHandler, createFailoverFetch, createImageProxyHandler, createRpcProxyHandler, encodeU256, formatAmount, getBackendSignedUrl, getCoordinates, getDerivativesTerm, getListableTokens, getService, getServicesByCapability, getStarknetCoordinates, getTokenByAddress, getTokenBySymbol, hasCapability, isPolicyRefusal, isPrivateHost, isPrivateOrInsecureUrl, isSameOrigin, isServiceId, isTransientRpcError, isValidIpfsCidPath, issueAccountSessionToken, issueSiwsToken, listServices, normalizeAddress, normalizeHash, parseAmount, readBodyWithCap, resolveAppFeeConfig, resolveConfig, resolveFeeConfig, resolveRemixPolicy, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt, uploadDirectoryToBackend, uploadFileToBackend, uploadJsonToBackend, validateUrl, verifyAccountSessionToken, verifySiwsToken };
2120
2053
  //# sourceMappingURL=index.js.map
2121
2054
  //# sourceMappingURL=index.js.map