@medialane/sdk 0.39.0 → 0.41.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.cjs +174 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +131 -105
- package/dist/index.d.ts +131 -105
- package/dist/index.js +164 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1118,7 +1118,6 @@ interface ApiCreatorListResult {
|
|
|
1118
1118
|
page: number;
|
|
1119
1119
|
limit: number;
|
|
1120
1120
|
}
|
|
1121
|
-
type ApiWalletType = "ARGENT" | "BRAAVOS" | "CARTRIDGE" | "PRIVY" | "CHIPIPAY" | "INJECTED" | "UNKNOWN";
|
|
1122
1121
|
type ApiAppSource = "MEDIALANE_STARKNET" | "MEDIALANE_IO" | "MEDIALANE_PORTAL" | "MEDIALANE_SDK" | "MEDIALANE_DAPP";
|
|
1123
1122
|
type ApiChain = "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
1124
1123
|
interface ApiUserWallet {
|
|
@@ -1415,7 +1414,7 @@ interface CreateDropParams {
|
|
|
1415
1414
|
|
|
1416
1415
|
declare class PopService {
|
|
1417
1416
|
private readonly factoryAddress;
|
|
1418
|
-
constructor(
|
|
1417
|
+
constructor(config: ResolvedConfig);
|
|
1419
1418
|
private _collection;
|
|
1420
1419
|
claim(account: AccountInterface, collectionAddress: string): Promise<TxResult>;
|
|
1421
1420
|
adminMint(account: AccountInterface, params: {
|
|
@@ -1731,29 +1730,133 @@ declare class MedialaneClient {
|
|
|
1731
1730
|
get marketplaceContract(): string;
|
|
1732
1731
|
}
|
|
1733
1732
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1733
|
+
declare const ADMIN_SCOPE = "admin-api";
|
|
1734
|
+
/** The wallet-signed authorization for a session key. */
|
|
1735
|
+
interface AdminGrant {
|
|
1736
|
+
wallet: string;
|
|
1737
|
+
chain: string;
|
|
1738
|
+
sessionPublicKey: string;
|
|
1739
|
+
sessionKeyHash: string;
|
|
1740
|
+
scope: string;
|
|
1741
|
+
issuedAt: number;
|
|
1742
|
+
expiresAt: number;
|
|
1743
|
+
walletSig: string[];
|
|
1744
|
+
}
|
|
1745
|
+
interface AdminSession {
|
|
1746
|
+
grant: AdminGrant;
|
|
1747
|
+
sessionPrivateKey: string;
|
|
1748
|
+
}
|
|
1749
|
+
interface AdminRequest {
|
|
1750
|
+
method: string;
|
|
1751
|
+
path: string;
|
|
1752
|
+
body: string;
|
|
1753
|
+
nonce: string;
|
|
1754
|
+
ts: number;
|
|
1755
|
+
}
|
|
1756
|
+
/** Compact session-key signature over adminRequestDigest. */
|
|
1757
|
+
type AdminRequestSig = string;
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* Canonical felt digest of a request — the SINGLE definition shared by signer
|
|
1761
|
+
* (portal/agent) and verifier (backend). Binds method+path+query+body+nonce+ts,
|
|
1762
|
+
* so a captured request cannot be retargeted or mutated without invalidating it.
|
|
1763
|
+
*/
|
|
1764
|
+
declare function adminRequestDigest(req: AdminRequest): string;
|
|
1765
|
+
|
|
1766
|
+
/** Sign a request with the session private key. */
|
|
1767
|
+
declare function signAdminRequest(sessionPrivateKey: string, req: AdminRequest): AdminRequestSig;
|
|
1768
|
+
/** Verify a request signature against the full session public key. */
|
|
1769
|
+
declare function verifyAdminRequestSig(sessionPublicKey: string, req: AdminRequest, sig: AdminRequestSig): boolean;
|
|
1770
|
+
|
|
1771
|
+
interface AdminSessionTypedDataInput {
|
|
1772
|
+
sessionKeyHash: string;
|
|
1773
|
+
scope: string;
|
|
1774
|
+
issuedAt: number;
|
|
1775
|
+
expiresAt: number;
|
|
1776
|
+
chainId?: string;
|
|
1777
|
+
}
|
|
1778
|
+
/** The SNIP-12 typed data the wallet signs — rebuilt identically on the backend. */
|
|
1779
|
+
declare function buildAdminSessionTypedData(p: AdminSessionTypedDataInput): {
|
|
1780
|
+
readonly types: {
|
|
1781
|
+
readonly StarknetDomain: readonly [{
|
|
1782
|
+
readonly name: "name";
|
|
1783
|
+
readonly type: "shortstring";
|
|
1784
|
+
}, {
|
|
1785
|
+
readonly name: "version";
|
|
1786
|
+
readonly type: "shortstring";
|
|
1787
|
+
}, {
|
|
1788
|
+
readonly name: "chainId";
|
|
1789
|
+
readonly type: "shortstring";
|
|
1790
|
+
}, {
|
|
1791
|
+
readonly name: "revision";
|
|
1792
|
+
readonly type: "shortstring";
|
|
1793
|
+
}];
|
|
1794
|
+
readonly AdminSession: readonly [{
|
|
1795
|
+
readonly name: "sessionKeyHash";
|
|
1796
|
+
readonly type: "felt";
|
|
1797
|
+
}, {
|
|
1798
|
+
readonly name: "scope";
|
|
1799
|
+
readonly type: "shortstring";
|
|
1800
|
+
}, {
|
|
1801
|
+
readonly name: "issuedAt";
|
|
1802
|
+
readonly type: "felt";
|
|
1803
|
+
}, {
|
|
1804
|
+
readonly name: "expiresAt";
|
|
1805
|
+
readonly type: "felt";
|
|
1806
|
+
}];
|
|
1807
|
+
};
|
|
1808
|
+
readonly primaryType: "AdminSession";
|
|
1809
|
+
readonly domain: {
|
|
1810
|
+
readonly name: "Medialane Admin";
|
|
1811
|
+
readonly version: "1";
|
|
1812
|
+
readonly chainId: string;
|
|
1813
|
+
readonly revision: "1";
|
|
1814
|
+
};
|
|
1815
|
+
readonly message: {
|
|
1816
|
+
readonly sessionKeyHash: string;
|
|
1817
|
+
readonly scope: string;
|
|
1818
|
+
readonly issuedAt: string;
|
|
1819
|
+
readonly expiresAt: string;
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
/** felt commitment to a full session public key (fits in the signed message). */
|
|
1823
|
+
declare function sessionKeyHashOf(sessionPublicKey: string): string;
|
|
1824
|
+
interface CreateGrantOpts {
|
|
1825
|
+
wallet: string;
|
|
1826
|
+
chain?: string;
|
|
1827
|
+
chainId?: string;
|
|
1828
|
+
ttlSeconds?: number;
|
|
1829
|
+
now?: () => number;
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* Generate an ephemeral session keypair and have `signTypedData` (the connected
|
|
1833
|
+
* wallet's signMessage) sign the grant. The private key never leaves the caller.
|
|
1834
|
+
*/
|
|
1835
|
+
declare function createAdminSessionGrant(signTypedData: (data: ReturnType<typeof buildAdminSessionTypedData>) => Promise<string[]>, opts: CreateGrantOpts): Promise<AdminSession>;
|
|
1836
|
+
|
|
1837
|
+
declare const ADMIN_HEADERS: {
|
|
1838
|
+
readonly grant: "x-ml-admin-grant";
|
|
1839
|
+
readonly sig: "x-ml-admin-sig";
|
|
1840
|
+
readonly nonce: "x-ml-admin-nonce";
|
|
1841
|
+
readonly ts: "x-ml-admin-ts";
|
|
1842
|
+
};
|
|
1843
|
+
declare function randomNonce(): string;
|
|
1844
|
+
/** Build the four request headers from a session + (method, path, body). */
|
|
1845
|
+
declare function encodeAdminHeaders(session: AdminSession, reqInit: {
|
|
1846
|
+
method: string;
|
|
1847
|
+
path: string;
|
|
1848
|
+
body?: string;
|
|
1849
|
+
now?: () => number;
|
|
1850
|
+
}): Record<string, string>;
|
|
1851
|
+
interface ParsedAdminHeaders {
|
|
1852
|
+
grant: AdminGrant;
|
|
1853
|
+
sig: string;
|
|
1854
|
+
nonce: string;
|
|
1855
|
+
ts: number;
|
|
1856
|
+
}
|
|
1857
|
+
/** Parse + shape-check the headers on the backend. Returns null if malformed. */
|
|
1858
|
+
declare function parseAdminHeaders(get: (name: string) => string | null | undefined): ParsedAdminHeaders | null;
|
|
1859
|
+
|
|
1757
1860
|
declare const SUPPORTED_TOKENS: readonly [{
|
|
1758
1861
|
readonly symbol: "USDC";
|
|
1759
1862
|
readonly address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb";
|
|
@@ -1781,29 +1884,8 @@ declare const SUPPORTED_TOKENS: readonly [{
|
|
|
1781
1884
|
readonly listable: true;
|
|
1782
1885
|
}];
|
|
1783
1886
|
type SupportedTokenSymbol = (typeof SUPPORTED_TOKENS)[number]["symbol"];
|
|
1784
|
-
|
|
1785
|
-
declare const
|
|
1786
|
-
/** IPCollectionFactory v0.3.0 (deployed mainnet 2026-06-10): sequential on-chain
|
|
1787
|
-
* edition ids, ownerless/immutable. New collections deploy from here. */
|
|
1788
|
-
declare const COLLECTION_1155_CONTRACT_MAINNET: string;
|
|
1789
|
-
/** Class hash of the IPCollectionFactory v0.3.0 implementation. */
|
|
1790
|
-
declare const COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1791
|
-
/** Class hash of the IPCollection ERC-1155 v0.3.0 implementation. */
|
|
1792
|
-
declare const COLLECTION_1155_CLASS_HASH_MAINNET: string;
|
|
1793
|
-
/** First mainnet block of the v0.3.0 ERC-1155 factory deployment. */
|
|
1794
|
-
declare const COLLECTION_1155_START_BLOCK_MAINNET: number;
|
|
1795
|
-
/** Creator Coin Factory — entrypoint: create_creator_coin + launch_on_ekubo. */
|
|
1796
|
-
declare const CREATOR_COIN_FACTORY_CONTRACT_MAINNET: string;
|
|
1797
|
-
/** EkuboLauncher — permanently holds (locks) each Creator Coin's LP position. */
|
|
1798
|
-
declare const CREATOR_COIN_EKUBO_LAUNCHER_MAINNET: string;
|
|
1799
|
-
/** Class hash of the per-coin CreatorCoin ERC-20 the Factory deploys. */
|
|
1800
|
-
declare const CREATOR_COIN_CLASS_HASH_MAINNET: string;
|
|
1801
|
-
/** Class hash of the Creator Coin Factory. */
|
|
1802
|
-
declare const CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1803
|
-
/** First mainnet block of the Factory deployment. */
|
|
1804
|
-
declare const CREATOR_COIN_START_BLOCK_MAINNET: number;
|
|
1805
|
-
/** Ekubo Core (Starknet mainnet) — Creator Coin pools live here; read spot price via `get_pool_price`. */
|
|
1806
|
-
declare const EKUBO_CORE_MAINNET: string;
|
|
1887
|
+
/** Default currency for listings and offers — Circle-native USDC on Starknet. */
|
|
1888
|
+
declare const DEFAULT_CURRENCY: SupportedTokenSymbol;
|
|
1807
1889
|
|
|
1808
1890
|
declare const IPMarketplaceABI: readonly [{
|
|
1809
1891
|
readonly type: "impl";
|
|
@@ -2692,62 +2774,6 @@ declare const DropFactoryABI: readonly [{
|
|
|
2692
2774
|
readonly state_mutability: "external";
|
|
2693
2775
|
}];
|
|
2694
2776
|
|
|
2695
|
-
declare const CollectionRegistryABI: readonly [{
|
|
2696
|
-
readonly type: "struct";
|
|
2697
|
-
readonly name: "core::byte_array::ByteArray";
|
|
2698
|
-
readonly members: readonly [{
|
|
2699
|
-
readonly name: "data";
|
|
2700
|
-
readonly type: "core::array::Array::<core::felt252>";
|
|
2701
|
-
}, {
|
|
2702
|
-
readonly name: "pending_word";
|
|
2703
|
-
readonly type: "core::felt252";
|
|
2704
|
-
}, {
|
|
2705
|
-
readonly name: "pending_word_len";
|
|
2706
|
-
readonly type: "core::integer::u32";
|
|
2707
|
-
}];
|
|
2708
|
-
}, {
|
|
2709
|
-
readonly type: "struct";
|
|
2710
|
-
readonly name: "ip_collection_erc_721::types::Collection";
|
|
2711
|
-
readonly members: readonly [{
|
|
2712
|
-
readonly name: "name";
|
|
2713
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2714
|
-
}, {
|
|
2715
|
-
readonly name: "symbol";
|
|
2716
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2717
|
-
}, {
|
|
2718
|
-
readonly name: "base_uri";
|
|
2719
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2720
|
-
}, {
|
|
2721
|
-
readonly name: "owner";
|
|
2722
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2723
|
-
}, {
|
|
2724
|
-
readonly name: "ip_nft";
|
|
2725
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2726
|
-
}];
|
|
2727
|
-
}, {
|
|
2728
|
-
readonly type: "function";
|
|
2729
|
-
readonly name: "list_user_collections";
|
|
2730
|
-
readonly inputs: readonly [{
|
|
2731
|
-
readonly name: "user";
|
|
2732
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2733
|
-
}];
|
|
2734
|
-
readonly outputs: readonly [{
|
|
2735
|
-
readonly type: "core::array::Span::<core::integer::u256>";
|
|
2736
|
-
}];
|
|
2737
|
-
readonly state_mutability: "view";
|
|
2738
|
-
}, {
|
|
2739
|
-
readonly type: "function";
|
|
2740
|
-
readonly name: "get_collection";
|
|
2741
|
-
readonly inputs: readonly [{
|
|
2742
|
-
readonly name: "collection_id";
|
|
2743
|
-
readonly type: "core::integer::u256";
|
|
2744
|
-
}];
|
|
2745
|
-
readonly outputs: readonly [{
|
|
2746
|
-
readonly type: "ip_collection_erc_721::types::Collection";
|
|
2747
|
-
}];
|
|
2748
|
-
readonly state_mutability: "view";
|
|
2749
|
-
}];
|
|
2750
|
-
|
|
2751
2777
|
declare const Medialane1155ABI: readonly [{
|
|
2752
2778
|
readonly type: "impl";
|
|
2753
2779
|
readonly name: "Medialane1155Impl";
|
|
@@ -6110,4 +6136,4 @@ declare function build1155OrderTypedData(message: Record<string, unknown>, chain
|
|
|
6110
6136
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
6111
6137
|
declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
6112
6138
|
|
|
6113
|
-
export { type ActivityType, type AddSupplyParams, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCoin, type ApiCoinsQuery, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, 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 ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type
|
|
6139
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type ActivityType, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCoin, type ApiCoinsQuery, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, 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 ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintEditionParams, type BuildFeeCallParams, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type Chain, type ChainCoordinates, type ClaimConditions, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateCreatorCoinParams, type CreateDropParams, type CreateGrantOpts, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EnforcementDeclaration, type FailoverFetchOptions, type FeeConfig, FeeConfigSchema, type FeeSurface, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNftABI, type IPType, type IntentCall, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, LAUNCH_PRICE_QUOTE_PER_COIN, type MakeOffer1155Params, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintEditionParams, type MintParams, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderDetails, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, PUBLIC_RPC_FALLBACKS, type ParsedAdminHeaders, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type ResolvedFeeConfig, type RetryOptions, SUPPORTED_TOKENS, type ServiceCapability, type ServiceDefinition, type ServiceEventDeclaration, type ServiceId, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, VALIDATED_EKUBO_PARAMS, type WebhookEventType, type WebhookStatus, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, createFailoverFetch, encodeAdminHeaders, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCreatorCoinPrice, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, isServiceId, isTransientRpcError, listServices, normalizeAddress, normalizeHash, parseAdminHeaders, parseAmount, parseCreatorCoinCreated, randomNonce, resolveConfig, resolveFeeConfig, sessionKeyHashOf, shortenAddress, signAdminRequest, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1118,7 +1118,6 @@ interface ApiCreatorListResult {
|
|
|
1118
1118
|
page: number;
|
|
1119
1119
|
limit: number;
|
|
1120
1120
|
}
|
|
1121
|
-
type ApiWalletType = "ARGENT" | "BRAAVOS" | "CARTRIDGE" | "PRIVY" | "CHIPIPAY" | "INJECTED" | "UNKNOWN";
|
|
1122
1121
|
type ApiAppSource = "MEDIALANE_STARKNET" | "MEDIALANE_IO" | "MEDIALANE_PORTAL" | "MEDIALANE_SDK" | "MEDIALANE_DAPP";
|
|
1123
1122
|
type ApiChain = "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "BITCOIN";
|
|
1124
1123
|
interface ApiUserWallet {
|
|
@@ -1415,7 +1414,7 @@ interface CreateDropParams {
|
|
|
1415
1414
|
|
|
1416
1415
|
declare class PopService {
|
|
1417
1416
|
private readonly factoryAddress;
|
|
1418
|
-
constructor(
|
|
1417
|
+
constructor(config: ResolvedConfig);
|
|
1419
1418
|
private _collection;
|
|
1420
1419
|
claim(account: AccountInterface, collectionAddress: string): Promise<TxResult>;
|
|
1421
1420
|
adminMint(account: AccountInterface, params: {
|
|
@@ -1731,29 +1730,133 @@ declare class MedialaneClient {
|
|
|
1731
1730
|
get marketplaceContract(): string;
|
|
1732
1731
|
}
|
|
1733
1732
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1733
|
+
declare const ADMIN_SCOPE = "admin-api";
|
|
1734
|
+
/** The wallet-signed authorization for a session key. */
|
|
1735
|
+
interface AdminGrant {
|
|
1736
|
+
wallet: string;
|
|
1737
|
+
chain: string;
|
|
1738
|
+
sessionPublicKey: string;
|
|
1739
|
+
sessionKeyHash: string;
|
|
1740
|
+
scope: string;
|
|
1741
|
+
issuedAt: number;
|
|
1742
|
+
expiresAt: number;
|
|
1743
|
+
walletSig: string[];
|
|
1744
|
+
}
|
|
1745
|
+
interface AdminSession {
|
|
1746
|
+
grant: AdminGrant;
|
|
1747
|
+
sessionPrivateKey: string;
|
|
1748
|
+
}
|
|
1749
|
+
interface AdminRequest {
|
|
1750
|
+
method: string;
|
|
1751
|
+
path: string;
|
|
1752
|
+
body: string;
|
|
1753
|
+
nonce: string;
|
|
1754
|
+
ts: number;
|
|
1755
|
+
}
|
|
1756
|
+
/** Compact session-key signature over adminRequestDigest. */
|
|
1757
|
+
type AdminRequestSig = string;
|
|
1758
|
+
|
|
1759
|
+
/**
|
|
1760
|
+
* Canonical felt digest of a request — the SINGLE definition shared by signer
|
|
1761
|
+
* (portal/agent) and verifier (backend). Binds method+path+query+body+nonce+ts,
|
|
1762
|
+
* so a captured request cannot be retargeted or mutated without invalidating it.
|
|
1763
|
+
*/
|
|
1764
|
+
declare function adminRequestDigest(req: AdminRequest): string;
|
|
1765
|
+
|
|
1766
|
+
/** Sign a request with the session private key. */
|
|
1767
|
+
declare function signAdminRequest(sessionPrivateKey: string, req: AdminRequest): AdminRequestSig;
|
|
1768
|
+
/** Verify a request signature against the full session public key. */
|
|
1769
|
+
declare function verifyAdminRequestSig(sessionPublicKey: string, req: AdminRequest, sig: AdminRequestSig): boolean;
|
|
1770
|
+
|
|
1771
|
+
interface AdminSessionTypedDataInput {
|
|
1772
|
+
sessionKeyHash: string;
|
|
1773
|
+
scope: string;
|
|
1774
|
+
issuedAt: number;
|
|
1775
|
+
expiresAt: number;
|
|
1776
|
+
chainId?: string;
|
|
1777
|
+
}
|
|
1778
|
+
/** The SNIP-12 typed data the wallet signs — rebuilt identically on the backend. */
|
|
1779
|
+
declare function buildAdminSessionTypedData(p: AdminSessionTypedDataInput): {
|
|
1780
|
+
readonly types: {
|
|
1781
|
+
readonly StarknetDomain: readonly [{
|
|
1782
|
+
readonly name: "name";
|
|
1783
|
+
readonly type: "shortstring";
|
|
1784
|
+
}, {
|
|
1785
|
+
readonly name: "version";
|
|
1786
|
+
readonly type: "shortstring";
|
|
1787
|
+
}, {
|
|
1788
|
+
readonly name: "chainId";
|
|
1789
|
+
readonly type: "shortstring";
|
|
1790
|
+
}, {
|
|
1791
|
+
readonly name: "revision";
|
|
1792
|
+
readonly type: "shortstring";
|
|
1793
|
+
}];
|
|
1794
|
+
readonly AdminSession: readonly [{
|
|
1795
|
+
readonly name: "sessionKeyHash";
|
|
1796
|
+
readonly type: "felt";
|
|
1797
|
+
}, {
|
|
1798
|
+
readonly name: "scope";
|
|
1799
|
+
readonly type: "shortstring";
|
|
1800
|
+
}, {
|
|
1801
|
+
readonly name: "issuedAt";
|
|
1802
|
+
readonly type: "felt";
|
|
1803
|
+
}, {
|
|
1804
|
+
readonly name: "expiresAt";
|
|
1805
|
+
readonly type: "felt";
|
|
1806
|
+
}];
|
|
1807
|
+
};
|
|
1808
|
+
readonly primaryType: "AdminSession";
|
|
1809
|
+
readonly domain: {
|
|
1810
|
+
readonly name: "Medialane Admin";
|
|
1811
|
+
readonly version: "1";
|
|
1812
|
+
readonly chainId: string;
|
|
1813
|
+
readonly revision: "1";
|
|
1814
|
+
};
|
|
1815
|
+
readonly message: {
|
|
1816
|
+
readonly sessionKeyHash: string;
|
|
1817
|
+
readonly scope: string;
|
|
1818
|
+
readonly issuedAt: string;
|
|
1819
|
+
readonly expiresAt: string;
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
/** felt commitment to a full session public key (fits in the signed message). */
|
|
1823
|
+
declare function sessionKeyHashOf(sessionPublicKey: string): string;
|
|
1824
|
+
interface CreateGrantOpts {
|
|
1825
|
+
wallet: string;
|
|
1826
|
+
chain?: string;
|
|
1827
|
+
chainId?: string;
|
|
1828
|
+
ttlSeconds?: number;
|
|
1829
|
+
now?: () => number;
|
|
1830
|
+
}
|
|
1831
|
+
/**
|
|
1832
|
+
* Generate an ephemeral session keypair and have `signTypedData` (the connected
|
|
1833
|
+
* wallet's signMessage) sign the grant. The private key never leaves the caller.
|
|
1834
|
+
*/
|
|
1835
|
+
declare function createAdminSessionGrant(signTypedData: (data: ReturnType<typeof buildAdminSessionTypedData>) => Promise<string[]>, opts: CreateGrantOpts): Promise<AdminSession>;
|
|
1836
|
+
|
|
1837
|
+
declare const ADMIN_HEADERS: {
|
|
1838
|
+
readonly grant: "x-ml-admin-grant";
|
|
1839
|
+
readonly sig: "x-ml-admin-sig";
|
|
1840
|
+
readonly nonce: "x-ml-admin-nonce";
|
|
1841
|
+
readonly ts: "x-ml-admin-ts";
|
|
1842
|
+
};
|
|
1843
|
+
declare function randomNonce(): string;
|
|
1844
|
+
/** Build the four request headers from a session + (method, path, body). */
|
|
1845
|
+
declare function encodeAdminHeaders(session: AdminSession, reqInit: {
|
|
1846
|
+
method: string;
|
|
1847
|
+
path: string;
|
|
1848
|
+
body?: string;
|
|
1849
|
+
now?: () => number;
|
|
1850
|
+
}): Record<string, string>;
|
|
1851
|
+
interface ParsedAdminHeaders {
|
|
1852
|
+
grant: AdminGrant;
|
|
1853
|
+
sig: string;
|
|
1854
|
+
nonce: string;
|
|
1855
|
+
ts: number;
|
|
1856
|
+
}
|
|
1857
|
+
/** Parse + shape-check the headers on the backend. Returns null if malformed. */
|
|
1858
|
+
declare function parseAdminHeaders(get: (name: string) => string | null | undefined): ParsedAdminHeaders | null;
|
|
1859
|
+
|
|
1757
1860
|
declare const SUPPORTED_TOKENS: readonly [{
|
|
1758
1861
|
readonly symbol: "USDC";
|
|
1759
1862
|
readonly address: "0x033068f6539f8e6e6b131e6b2b814e6c34a5224bc66947c47dab9dfee93b35fb";
|
|
@@ -1781,29 +1884,8 @@ declare const SUPPORTED_TOKENS: readonly [{
|
|
|
1781
1884
|
readonly listable: true;
|
|
1782
1885
|
}];
|
|
1783
1886
|
type SupportedTokenSymbol = (typeof SUPPORTED_TOKENS)[number]["symbol"];
|
|
1784
|
-
|
|
1785
|
-
declare const
|
|
1786
|
-
/** IPCollectionFactory v0.3.0 (deployed mainnet 2026-06-10): sequential on-chain
|
|
1787
|
-
* edition ids, ownerless/immutable. New collections deploy from here. */
|
|
1788
|
-
declare const COLLECTION_1155_CONTRACT_MAINNET: string;
|
|
1789
|
-
/** Class hash of the IPCollectionFactory v0.3.0 implementation. */
|
|
1790
|
-
declare const COLLECTION_1155_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1791
|
-
/** Class hash of the IPCollection ERC-1155 v0.3.0 implementation. */
|
|
1792
|
-
declare const COLLECTION_1155_CLASS_HASH_MAINNET: string;
|
|
1793
|
-
/** First mainnet block of the v0.3.0 ERC-1155 factory deployment. */
|
|
1794
|
-
declare const COLLECTION_1155_START_BLOCK_MAINNET: number;
|
|
1795
|
-
/** Creator Coin Factory — entrypoint: create_creator_coin + launch_on_ekubo. */
|
|
1796
|
-
declare const CREATOR_COIN_FACTORY_CONTRACT_MAINNET: string;
|
|
1797
|
-
/** EkuboLauncher — permanently holds (locks) each Creator Coin's LP position. */
|
|
1798
|
-
declare const CREATOR_COIN_EKUBO_LAUNCHER_MAINNET: string;
|
|
1799
|
-
/** Class hash of the per-coin CreatorCoin ERC-20 the Factory deploys. */
|
|
1800
|
-
declare const CREATOR_COIN_CLASS_HASH_MAINNET: string;
|
|
1801
|
-
/** Class hash of the Creator Coin Factory. */
|
|
1802
|
-
declare const CREATOR_COIN_FACTORY_CLASS_HASH_MAINNET: string;
|
|
1803
|
-
/** First mainnet block of the Factory deployment. */
|
|
1804
|
-
declare const CREATOR_COIN_START_BLOCK_MAINNET: number;
|
|
1805
|
-
/** Ekubo Core (Starknet mainnet) — Creator Coin pools live here; read spot price via `get_pool_price`. */
|
|
1806
|
-
declare const EKUBO_CORE_MAINNET: string;
|
|
1887
|
+
/** Default currency for listings and offers — Circle-native USDC on Starknet. */
|
|
1888
|
+
declare const DEFAULT_CURRENCY: SupportedTokenSymbol;
|
|
1807
1889
|
|
|
1808
1890
|
declare const IPMarketplaceABI: readonly [{
|
|
1809
1891
|
readonly type: "impl";
|
|
@@ -2692,62 +2774,6 @@ declare const DropFactoryABI: readonly [{
|
|
|
2692
2774
|
readonly state_mutability: "external";
|
|
2693
2775
|
}];
|
|
2694
2776
|
|
|
2695
|
-
declare const CollectionRegistryABI: readonly [{
|
|
2696
|
-
readonly type: "struct";
|
|
2697
|
-
readonly name: "core::byte_array::ByteArray";
|
|
2698
|
-
readonly members: readonly [{
|
|
2699
|
-
readonly name: "data";
|
|
2700
|
-
readonly type: "core::array::Array::<core::felt252>";
|
|
2701
|
-
}, {
|
|
2702
|
-
readonly name: "pending_word";
|
|
2703
|
-
readonly type: "core::felt252";
|
|
2704
|
-
}, {
|
|
2705
|
-
readonly name: "pending_word_len";
|
|
2706
|
-
readonly type: "core::integer::u32";
|
|
2707
|
-
}];
|
|
2708
|
-
}, {
|
|
2709
|
-
readonly type: "struct";
|
|
2710
|
-
readonly name: "ip_collection_erc_721::types::Collection";
|
|
2711
|
-
readonly members: readonly [{
|
|
2712
|
-
readonly name: "name";
|
|
2713
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2714
|
-
}, {
|
|
2715
|
-
readonly name: "symbol";
|
|
2716
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2717
|
-
}, {
|
|
2718
|
-
readonly name: "base_uri";
|
|
2719
|
-
readonly type: "core::byte_array::ByteArray";
|
|
2720
|
-
}, {
|
|
2721
|
-
readonly name: "owner";
|
|
2722
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2723
|
-
}, {
|
|
2724
|
-
readonly name: "ip_nft";
|
|
2725
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2726
|
-
}];
|
|
2727
|
-
}, {
|
|
2728
|
-
readonly type: "function";
|
|
2729
|
-
readonly name: "list_user_collections";
|
|
2730
|
-
readonly inputs: readonly [{
|
|
2731
|
-
readonly name: "user";
|
|
2732
|
-
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
2733
|
-
}];
|
|
2734
|
-
readonly outputs: readonly [{
|
|
2735
|
-
readonly type: "core::array::Span::<core::integer::u256>";
|
|
2736
|
-
}];
|
|
2737
|
-
readonly state_mutability: "view";
|
|
2738
|
-
}, {
|
|
2739
|
-
readonly type: "function";
|
|
2740
|
-
readonly name: "get_collection";
|
|
2741
|
-
readonly inputs: readonly [{
|
|
2742
|
-
readonly name: "collection_id";
|
|
2743
|
-
readonly type: "core::integer::u256";
|
|
2744
|
-
}];
|
|
2745
|
-
readonly outputs: readonly [{
|
|
2746
|
-
readonly type: "ip_collection_erc_721::types::Collection";
|
|
2747
|
-
}];
|
|
2748
|
-
readonly state_mutability: "view";
|
|
2749
|
-
}];
|
|
2750
|
-
|
|
2751
2777
|
declare const Medialane1155ABI: readonly [{
|
|
2752
2778
|
readonly type: "impl";
|
|
2753
2779
|
readonly name: "Medialane1155Impl";
|
|
@@ -6110,4 +6136,4 @@ declare function build1155OrderTypedData(message: Record<string, unknown>, chain
|
|
|
6110
6136
|
declare function buildCancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
6111
6137
|
declare function build1155CancellationTypedData(message: Record<string, unknown>, chainId: constants.StarknetChainId | string): TypedData;
|
|
6112
6138
|
|
|
6113
|
-
export { type ActivityType, type AddSupplyParams, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCoin, type ApiCoinsQuery, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, 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 ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type
|
|
6139
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type ActivityType, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type ApiActivitiesQuery, type ApiActivity, type ApiActivityPrice, type ApiAdminCollectionClaim, type ApiAppSource, type ApiChain, ApiClient, type ApiCoin, type ApiCoinsQuery, type ApiCollection, type ApiCollectionClaim, type ApiCollectionProfile, type ApiCollectionSlugClaim, type ApiCollectionsQuery, type ApiComment, type ApiCounterOffersQuery, 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 ApiPublicRemix, type ApiRemixOffer, type ApiRemixOfferPrice, type ApiRemixOffersQuery, type ApiResponse, type ApiSearchCollectionResult, type ApiSearchCreatorResult, type ApiSearchResult, type ApiSearchTokenResult, type ApiToken, type ApiTokenBalance, type ApiTokenMetadata, type ApiUsageDay, type ApiUserWallet, type ApiWebhookCreated, type ApiWebhookEndpoint, type AutoRemixOfferParams, type BatchMintEditionParams, type BuildFeeCallParams, CHAINS, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, type CancelOrder1155Params, type CancelOrderIntentParams, type CancelOrderParams, type Cancelation, type CartItem, type Chain, type ChainCoordinates, type ClaimConditions, type CollectionSort, type ConfirmRemixOfferParams, type ConfirmSelfRemixParams, type ConsiderationItem, type CreateCollectionIntentParams, type CreateCollectionParams, type CreateCounterOfferIntentParams, type CreateCreatorCoinParams, type CreateDropParams, type CreateGrantOpts, type CreateListing1155Params, type CreateListingIntentParams, type CreateListingParams, type CreateMintIntentParams, type CreatePopCollectionParams, type CreateRemixOfferParams, type CreateWebhookParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, DEFAULT_CHAIN, DEFAULT_CURRENCY, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, type DropMintStatus, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EnforcementDeclaration, type FailoverFetchOptions, type FeeConfig, FeeConfigSchema, type FeeSurface, type FulfillOrder1155Params, type FulfillOrderIntentParams, type FulfillOrderParams, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPMarketplaceABI, IPNftABI, type IPType, type IntentCall, type IntentStatus, type IntentType, type IpAttribute, type IpNftMetadata, LAUNCH_PRICE_QUOTE_PER_COIN, type MakeOffer1155Params, type MakeOfferIntentParams, type MakeOfferParams, MarketplaceModule, Medialane1155ABI, Medialane1155Module, MedialaneApiError, MedialaneClient, type MedialaneConfig, MedialaneError, type MedialaneErrorCode, type MintEditionParams, type MintParams, OPEN_LICENSES, type OfferItem, type OpenLicense, type Order, type OrderDetails, type OrderParameters, type OrderStatus, POPCollectionABI, POPFactoryABI, PUBLIC_RPC_FALLBACKS, type ParsedAdminHeaders, type PopBatchEligibilityItem, type PopClaimStatus, type PopEventType, PopService, type RemixOfferStatus, type ResolvedConfig, type ResolvedFeeConfig, type RetryOptions, SUPPORTED_TOKENS, type ServiceCapability, type ServiceDefinition, type ServiceEventDeclaration, type ServiceId, type SortOrder, type SupportedToken, type SupportedTokenSymbol, type TenantPlan, type TxResult, VALIDATED_EKUBO_PARAMS, type WebhookEventType, type WebhookStatus, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildCreateCreatorCoinCall, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, createAdminSessionGrant, createFailoverFetch, encodeAdminHeaders, encodeByteArray, fdvHuman, formatAmount, getCoordinates, getCreatorCoinPrice, getListableTokens, getService, getServicesByCapability, getTokenByAddress, getTokenBySymbol, isServiceId, isTransientRpcError, listServices, normalizeAddress, normalizeHash, parseAdminHeaders, parseAmount, parseCreatorCoinCreated, randomNonce, resolveConfig, resolveFeeConfig, sessionKeyHashOf, shortenAddress, signAdminRequest, stringifyBigInts, teamCoinsRaw, u256ToBigInt, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
|