@medialane/sdk 0.85.11 → 0.85.13
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.cjs +32 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +31 -5
- package/dist/index.js.map +1 -1
- package/dist/{services-B_7IX3dM.d.ts → services-BMVi2U8T.d.ts} +1 -1
- package/dist/{services-BN4c7iT1.d.cts → services-yppVbYf6.d.cts} +1 -1
- package/dist/starknet/index.cjs +3 -2
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +3 -2
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as ServiceDefinition, a as ServiceCapability } from './services-
|
|
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 ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-
|
|
1
|
+
import { S as ServiceDefinition, a as ServiceCapability } from './services-yppVbYf6.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 ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-yppVbYf6.cjs';
|
|
3
3
|
import { C as Chain } from './types-nPIXtCF5.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-nPIXtCF5.cjs';
|
|
5
5
|
import 'zod';
|
|
@@ -411,6 +411,9 @@ interface RpcProxyConfig {
|
|
|
411
411
|
}
|
|
412
412
|
declare function createRpcProxyHandler(config: RpcProxyConfig): (req: Request) => Promise<Response>;
|
|
413
413
|
|
|
414
|
+
declare function createRateLimiter(windowMs: number, max: number): (key: string) => boolean;
|
|
415
|
+
declare function requestIp(req: Request): string;
|
|
416
|
+
|
|
414
417
|
type AssetAttribute = {
|
|
415
418
|
trait_type: string;
|
|
416
419
|
value: string;
|
|
@@ -451,4 +454,4 @@ declare const IPFS_SAFE_CONTENT_TYPE_PREFIXES: readonly ["image/jpeg", "image/pn
|
|
|
451
454
|
declare function resolveSafeImageContentType(contentType: string): string;
|
|
452
455
|
declare const MAX_IPFS_GATEWAY_RESPONSE_BYTES: number;
|
|
453
456
|
|
|
454
|
-
export { type AssetAttribute, type AssetMetadata, type BuildAssetMetadataInput, Chain, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, type FailoverFetchOptions, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, PUBLIC_RPC_FALLBACKS, RESERVED_TRAITS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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 SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRpcProxyHandler, encodeU256, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
457
|
+
export { type AssetAttribute, type AssetMetadata, type BuildAssetMetadataInput, Chain, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, type FailoverFetchOptions, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, PUBLIC_RPC_FALLBACKS, RESERVED_TRAITS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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 SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, requestIp, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as ServiceDefinition, a as ServiceCapability } from './services-
|
|
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 ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-
|
|
1
|
+
import { S as ServiceDefinition, a as ServiceCapability } from './services-BMVi2U8T.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 ApiCoinsQuery, o as ApiCollection, p as ApiCollectionClaim, q as ApiCollectionProfile, r as ApiCollectionSlugClaim, s as ApiCollectionsQuery, t as ApiComment, u as ApiCounterOffersQuery, v as ApiCreatorListResult, w as ApiCreatorProfile, x as ApiIntent, y as ApiIntentCreated, z as ApiKeyStatus, B as ApiMeta, C as ApiMetadataSignedUrl, D as ApiMetadataUpload, E as ApiOrder, F as ApiOrderConsideration, G as ApiOrderOffer, H as ApiOrderPrice, I as ApiOrderTokenMeta, J as ApiOrderTxHash, K as ApiOrdersQuery, L as ApiPointEvent, M as ApiPortalKey, N as ApiPortalKeyCreated, O as ApiPortalMe, P as ApiPublicRemix, Q as ApiRemixOffer, R as ApiRemixOfferPrice, T as ApiRemixOffersQuery, U as ApiResponse, V as ApiRewardsBadge, W as ApiRewardsBatchEntry, X as ApiRewardsConfig, Y as ApiRewardsLeaderboardEntry, Z as ApiRewardsLevel, _ as ApiSearchCollectionResult, $ as ApiSearchCreatorResult, a0 as ApiSearchResult, a1 as ApiSearchTokenResult, a2 as ApiToken, a3 as ApiTokenBalance, a4 as ApiTokenMetadata, a5 as ApiUsageDay, a6 as ApiUserRewards, a7 as ApiUserWallet, a8 as ApiWalletActivity, a9 as ApiWebhookCreated, aa as ApiWebhookEndpoint, ab as AutoRemixOfferParams, ac as CancelOrderIntentParams, ad as ChainFilter, ae as ClaimConditions, af as CollectionServiceId, ag as CollectionSort, ah as CollectionTokensSort, ai as ConfirmRemixOfferParams, aj as ConfirmSelfRemixParams, ak as ConsiderationItem, al as CreateCheckoutIntentParams, am as CreateCoinIntentParams, an as CreateCollectionIntentParams, ao as CreateCounterOfferIntentParams, ap as CreateDropParams, aq as CreateListingIntentParams, ar as CreateMembershipParams, as as CreateMintIntentParams, at as CreatePopCollectionParams, au as CreateRemixOfferParams, av as CreateSponsorshipOfferIntentParams, aw as CreateSponsorshipOfferParams, ax as CreateSponsorshipProposalIntentParams, ay as CreateTicketParams, az as CreateTierIntentParams, aA as CreateWebhookParams, aB as DropMintStatus, aC as EnforcementDeclaration, aD as FactoryFamilyServiceId, aE as FeeConfig, aF as FeeConfigSchema, aG as FulfillOrderIntentParams, aH as IPType, aI as IntentCall, aJ as IntentStatus, aK as IntentType, aL as IpAttribute, aM as IpNftMetadata, aN as LaunchCoinIntentParams, aO as MakeOfferIntentParams, aP as MedialaneApiError, aQ as MedialaneConfig, aR as MedialaneErrorCode, aS as MintMembershipsParams, aT as MintTicketsParams, aU as OPEN_LICENSES, aV as OfferItem, aW as OpenLicense, aX as Order, aY as OrderDetails, aZ as OrderParameters, a_ as OrderStatus, a$ as PlaceSponsorshipBidIntentParams, b0 as PopBatchEligibilityItem, b1 as PopClaimStatus, b2 as PopEventType, b3 as ProposeSponsorshipParams, b4 as RejectSponsorshipProposalIntentParams, b5 as RemixOfferStatus, b6 as ResolvedConfig, b7 as ResolvedFeeConfig, b8 as RetractSponsorshipBidIntentParams, b9 as RetryOptions, ba as ServiceEventDeclaration, bb as SetSponsorshipOfferOpenIntentParams, bc as SortOrder, bd as TenantPlan, be as TierServiceId, bf as TxResult, bg as WebhookEventType, bh as WebhookStatus, bi as WithdrawSponsorshipProposalIntentParams, bj as resolveConfig, bk as resolveFeeConfig } from './services-BMVi2U8T.js';
|
|
3
3
|
import { C as Chain } from './types-nPIXtCF5.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-nPIXtCF5.js';
|
|
5
5
|
import 'zod';
|
|
@@ -411,6 +411,9 @@ interface RpcProxyConfig {
|
|
|
411
411
|
}
|
|
412
412
|
declare function createRpcProxyHandler(config: RpcProxyConfig): (req: Request) => Promise<Response>;
|
|
413
413
|
|
|
414
|
+
declare function createRateLimiter(windowMs: number, max: number): (key: string) => boolean;
|
|
415
|
+
declare function requestIp(req: Request): string;
|
|
416
|
+
|
|
414
417
|
type AssetAttribute = {
|
|
415
418
|
trait_type: string;
|
|
416
419
|
value: string;
|
|
@@ -451,4 +454,4 @@ declare const IPFS_SAFE_CONTENT_TYPE_PREFIXES: readonly ["image/jpeg", "image/pn
|
|
|
451
454
|
declare function resolveSafeImageContentType(contentType: string): string;
|
|
452
455
|
declare const MAX_IPFS_GATEWAY_RESPONSE_BYTES: number;
|
|
453
456
|
|
|
454
|
-
export { type AssetAttribute, type AssetMetadata, type BuildAssetMetadataInput, Chain, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, type FailoverFetchOptions, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, PUBLIC_RPC_FALLBACKS, RESERVED_TRAITS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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 SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRpcProxyHandler, encodeU256, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
457
|
+
export { type AssetAttribute, type AssetMetadata, type BuildAssetMetadataInput, Chain, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, type FailoverFetchOptions, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, PUBLIC_RPC_FALLBACKS, RESERVED_TRAITS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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 SupportedToken, type SupportedTokenSymbol, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, requestIp, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.js
CHANGED
|
@@ -493,8 +493,9 @@ var ApiClient = class {
|
|
|
493
493
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
494
494
|
return this.get(`/v1/orders/counter-offers?${params}`);
|
|
495
495
|
}
|
|
496
|
-
getMetadataSignedUrl() {
|
|
497
|
-
|
|
496
|
+
getMetadataSignedUrl(kind) {
|
|
497
|
+
const params = kind ? `?kind=${kind}` : "";
|
|
498
|
+
return this.get(`/v1/metadata/signed-url${params}`);
|
|
498
499
|
}
|
|
499
500
|
uploadMetadata(metadata) {
|
|
500
501
|
return this.post("/v1/metadata/upload", metadata);
|
|
@@ -1279,6 +1280,32 @@ function createFailoverFetch(urls, options = {}) {
|
|
|
1279
1280
|
return failover;
|
|
1280
1281
|
}
|
|
1281
1282
|
|
|
1283
|
+
// src/server/rate-limit.ts
|
|
1284
|
+
function createRateLimiter(windowMs, max) {
|
|
1285
|
+
const counts = /* @__PURE__ */ new Map();
|
|
1286
|
+
let nextSweepAt = Date.now() + windowMs;
|
|
1287
|
+
return function checkRateLimit(key) {
|
|
1288
|
+
const now = Date.now();
|
|
1289
|
+
if (now >= nextSweepAt) {
|
|
1290
|
+
for (const [k, entry2] of counts) {
|
|
1291
|
+
if (now >= entry2.resetAt) counts.delete(k);
|
|
1292
|
+
}
|
|
1293
|
+
nextSweepAt = now + windowMs;
|
|
1294
|
+
}
|
|
1295
|
+
const entry = counts.get(key);
|
|
1296
|
+
if (!entry || now >= entry.resetAt) {
|
|
1297
|
+
counts.set(key, { count: 1, resetAt: now + windowMs });
|
|
1298
|
+
return true;
|
|
1299
|
+
}
|
|
1300
|
+
if (entry.count >= max) return false;
|
|
1301
|
+
entry.count += 1;
|
|
1302
|
+
return true;
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
function requestIp(req) {
|
|
1306
|
+
return req.headers.get("x-forwarded-for")?.split(",")[0].trim() ?? "unknown";
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1282
1309
|
// src/server/rpc-proxy.ts
|
|
1283
1310
|
var DEFAULT_STARKNET_RPC_METHODS = [
|
|
1284
1311
|
"starknet_call",
|
|
@@ -1357,8 +1384,7 @@ function createRpcProxyHandler(config) {
|
|
|
1357
1384
|
if (!isSameOrigin(req)) {
|
|
1358
1385
|
return rpcError(-32600, "Cross-origin requests are not allowed", 403);
|
|
1359
1386
|
}
|
|
1360
|
-
|
|
1361
|
-
if (!config.checkRateLimit(ip)) {
|
|
1387
|
+
if (!config.checkRateLimit(requestIp(req))) {
|
|
1362
1388
|
return rpcError(-32005, "Too many requests", 429);
|
|
1363
1389
|
}
|
|
1364
1390
|
let body;
|
|
@@ -1504,6 +1530,6 @@ function resolveSafeImageContentType(contentType) {
|
|
|
1504
1530
|
}
|
|
1505
1531
|
var MAX_IPFS_GATEWAY_RESPONSE_BYTES = 25 * 1024 * 1024;
|
|
1506
1532
|
|
|
1507
|
-
export { ApiClient, CHAINS, DEFAULT_CHAIN, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, FeeConfigSchema, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, MedialaneApiError, OPEN_LICENSES, PUBLIC_RPC_FALLBACKS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRpcProxyHandler, encodeU256, formatAmount, getCoordinates, getListableTokens, getService, getServicesByCapability, getStarknetCoordinates, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, resolveConfig, resolveFeeConfig, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1533
|
+
export { ApiClient, CHAINS, DEFAULT_CHAIN, DEFAULT_CURRENCY, DEFAULT_STARKNET_RPC_METHODS, FeeConfigSchema, IPFS_SAFE_CONTENT_TYPE_PREFIXES, MAX_IPFS_GATEWAY_RESPONSE_BYTES, MedialaneApiError, OPEN_LICENSES, PUBLIC_RPC_FALLBACKS, 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_DROP_COLLECTION_CLASS_HASH, STARKNET_DROP_FACTORY_CONTRACT, STARKNET_EKUBO_CORE, 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, assetHref, buildAssetMetadata, chainFromSlug, chainSlug, coinHref, collectionHref, createFailoverFetch, createRateLimiter, createRpcProxyHandler, encodeU256, formatAmount, getCoordinates, getListableTokens, getService, getServicesByCapability, getStarknetCoordinates, getTokenByAddress, getTokenBySymbol, hasCapability, isServiceId, isTransientRpcError, isValidIpfsCidPath, listServices, normalizeAddress, normalizeHash, parseAmount, requestIp, resolveConfig, resolveFeeConfig, resolveSafeImageContentType, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1508
1534
|
//# sourceMappingURL=index.js.map
|
|
1509
1535
|
//# sourceMappingURL=index.js.map
|