@medialane/sdk 0.4.6 → 0.4.8
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/README.md +17 -1
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -203,6 +203,7 @@ declare class MarketplaceModule {
|
|
|
203
203
|
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
type IPType = "Audio" | "Art" | "Documents" | "NFT" | "Video" | "Photography" | "Patents" | "Posts" | "Publications" | "RWA" | "Software" | "Custom";
|
|
206
207
|
type CollectionSort = "recent" | "supply" | "floor" | "volume" | "name";
|
|
207
208
|
interface ApiCollectionsQuery {
|
|
208
209
|
page?: number;
|
|
@@ -402,6 +403,17 @@ interface ApiActivitiesQuery {
|
|
|
402
403
|
page?: number;
|
|
403
404
|
limit?: number;
|
|
404
405
|
}
|
|
406
|
+
interface ApiComment {
|
|
407
|
+
id: string;
|
|
408
|
+
chain: string;
|
|
409
|
+
contractAddress: string;
|
|
410
|
+
tokenId: string;
|
|
411
|
+
author: string;
|
|
412
|
+
content: string;
|
|
413
|
+
txHash: string | null;
|
|
414
|
+
blockNumber: string;
|
|
415
|
+
postedAt: string;
|
|
416
|
+
}
|
|
405
417
|
interface ApiSearchTokenResult {
|
|
406
418
|
contractAddress: string;
|
|
407
419
|
tokenId: string;
|
|
@@ -631,6 +643,10 @@ declare class ApiClient {
|
|
|
631
643
|
getCollectionTokens(contract: string, page?: number, limit?: number): Promise<ApiResponse<ApiToken[]>>;
|
|
632
644
|
getActivities(query?: ApiActivitiesQuery): Promise<ApiResponse<ApiActivity[]>>;
|
|
633
645
|
getActivitiesByAddress(address: string, page?: number, limit?: number): Promise<ApiResponse<ApiActivity[]>>;
|
|
646
|
+
getTokenComments(contract: string, tokenId: string, opts?: {
|
|
647
|
+
page?: number;
|
|
648
|
+
limit?: number;
|
|
649
|
+
}): Promise<ApiResponse<ApiComment[]>>;
|
|
634
650
|
search(q: string, limit?: number): Promise<ApiResponse<ApiSearchResult> & {
|
|
635
651
|
query: string;
|
|
636
652
|
}>;
|
|
@@ -1157,4 +1173,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
|
|
|
1157
1173
|
*/
|
|
1158
1174
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1159
1175
|
|
|
1160
|
-
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1176
|
+
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.d.ts
CHANGED
|
@@ -203,6 +203,7 @@ declare class MarketplaceModule {
|
|
|
203
203
|
buildCancellationTypedData(params: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
+
type IPType = "Audio" | "Art" | "Documents" | "NFT" | "Video" | "Photography" | "Patents" | "Posts" | "Publications" | "RWA" | "Software" | "Custom";
|
|
206
207
|
type CollectionSort = "recent" | "supply" | "floor" | "volume" | "name";
|
|
207
208
|
interface ApiCollectionsQuery {
|
|
208
209
|
page?: number;
|
|
@@ -402,6 +403,17 @@ interface ApiActivitiesQuery {
|
|
|
402
403
|
page?: number;
|
|
403
404
|
limit?: number;
|
|
404
405
|
}
|
|
406
|
+
interface ApiComment {
|
|
407
|
+
id: string;
|
|
408
|
+
chain: string;
|
|
409
|
+
contractAddress: string;
|
|
410
|
+
tokenId: string;
|
|
411
|
+
author: string;
|
|
412
|
+
content: string;
|
|
413
|
+
txHash: string | null;
|
|
414
|
+
blockNumber: string;
|
|
415
|
+
postedAt: string;
|
|
416
|
+
}
|
|
405
417
|
interface ApiSearchTokenResult {
|
|
406
418
|
contractAddress: string;
|
|
407
419
|
tokenId: string;
|
|
@@ -631,6 +643,10 @@ declare class ApiClient {
|
|
|
631
643
|
getCollectionTokens(contract: string, page?: number, limit?: number): Promise<ApiResponse<ApiToken[]>>;
|
|
632
644
|
getActivities(query?: ApiActivitiesQuery): Promise<ApiResponse<ApiActivity[]>>;
|
|
633
645
|
getActivitiesByAddress(address: string, page?: number, limit?: number): Promise<ApiResponse<ApiActivity[]>>;
|
|
646
|
+
getTokenComments(contract: string, tokenId: string, opts?: {
|
|
647
|
+
page?: number;
|
|
648
|
+
limit?: number;
|
|
649
|
+
}): Promise<ApiResponse<ApiComment[]>>;
|
|
634
650
|
search(q: string, limit?: number): Promise<ApiResponse<ApiSearchResult> & {
|
|
635
651
|
query: string;
|
|
636
652
|
}>;
|
|
@@ -1157,4 +1173,4 @@ declare function buildFulfillmentTypedData(message: Record<string, unknown>, cha
|
|
|
1157
1173
|
*/
|
|
1158
1174
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId): TypedData;
|
|
1159
1175
|
|
|
1160
|
-
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
|
1176
|
+
export { type ActivityType, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, ApiClient, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionsQuery, type ApiComment, type ApiCreatorListResult, type ApiCreatorProfile, type ApiIntent, type ApiIntentCreated, type ApiKeyStatus, type ApiMeta, type ApiMetadataSignedUrl, type ApiMetadataUpload, type ApiOrder, type ApiOrderConsideration, type ApiOrderOffer, type ApiOrderPrice, type ApiOrderTokenMeta, type ApiOrderTxHash, type ApiOrdersQuery, type ApiPortalKey, type ApiPortalKeyCreated, type ApiPortalMe, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, COLLECTION_CONTRACT_MAINNET, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type CollectionSort, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreateWebhookParams, DEFAULT_RPC_URLS, type FulfillOrderIntentParams, type FulfillOrderParams, type Fulfillment, IPMarketplaceABI, type IPType, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, MARKETPLACE_CONTRACT_MAINNET, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintParams, type Network, type OfferItem, type Order, type OrderParameters, type OrderStatus, type ResolvedConfig, type RetryOptions, SUPPORTED_NETWORKS, SUPPORTED_TOKENS, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, type WebhookEventType, type WebhookStatus, buildCancellationTypedData, buildFulfillmentTypedData, buildOrderTypedData, formatAmount, getListableTokens, getTokenByAddress, getTokenBySymbol, normalizeAddress, parseAmount, resolveConfig, shortenAddress, stringifyBigInts, u256ToBigInt };
|
package/dist/index.js
CHANGED
|
@@ -1103,6 +1103,16 @@ var ApiClient = class {
|
|
|
1103
1103
|
`/v1/activities/${normalizeAddress(address)}?page=${page}&limit=${limit}`
|
|
1104
1104
|
);
|
|
1105
1105
|
}
|
|
1106
|
+
// ─── Comments ──────────────────────────────────────────────────────────────
|
|
1107
|
+
getTokenComments(contract, tokenId, opts = {}) {
|
|
1108
|
+
const params = new URLSearchParams();
|
|
1109
|
+
if (opts.page !== void 0) params.set("page", String(opts.page));
|
|
1110
|
+
if (opts.limit !== void 0) params.set("limit", String(opts.limit));
|
|
1111
|
+
const qs = params.toString();
|
|
1112
|
+
return this.get(
|
|
1113
|
+
`/v1/tokens/${normalizeAddress(contract)}/${tokenId}/comments${qs ? `?${qs}` : ""}`
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1106
1116
|
// ─── Search ────────────────────────────────────────────────────────────────
|
|
1107
1117
|
search(q, limit = 10) {
|
|
1108
1118
|
const params = new URLSearchParams({ q, limit: String(limit) });
|