import * as starknet from 'starknet'; import { constants, GetTransactionReceiptResponse, Account, AccountInterface, AllowArray, Call, BigNumberish, ByteArray } from 'starknet'; import { DojoProvider, DojoCall } from '@dojoengine/core'; import { ToriiClient } from '@dojoengine/torii-client'; import * as _dojoengine_sdk from '@dojoengine/sdk'; import { SDK, ToriiQueryBuilder } from '@dojoengine/sdk'; import { p as SchemaType, q as Role, s as MarketplaceOptions } from './types-BZP9_ZsO.js'; export { V as AttributeFilterInput, U as AttributeFilterInputValue, y as BookInterface, B as BookModel, K as Category, d as CategoryType, H as Collection, e as CollectionListingsOptions, C as CollectionOrdersOptions, j as CollectionSummaryOptions, $ as CollectionTokensError, _ as CollectionTokensPage, I as Collections, F as FetchCollectionTokensOptions, k as FetchCollectionTokensResult, i as FetchTokenBalancesOptions, m as FetchTokenBalancesResult, L as ListingEvent, A as ListingInterface, J as Marketplace, a as MarketplaceClient, M as MarketplaceClientConfig, n as MarketplaceFees, G as MarketplaceModel, c as MarketplaceReadRuntime, b as MarketplaceRuntimeMode, x as ModeratorInterface, t as ModeratorModel, N as NormalizedCollection, Z as NormalizedToken, v as OfferEvent, D as OfferInterface, z as OrderInterface, O as OrderModel, Y as ResolveContractImage, X as ResolveTokenImage, R as ResolvedMarketplaceRuntimeMode, Q as RoleType, o as RoyaltyFee, h as RoyaltyFeeOptions, u as SDKOrder, w as SaleEvent, E as SaleInterface, P as Status, S as StatusType, a1 as TokenBalancesError, a0 as TokenBalancesPage, l as TokenDetails, f as TokenDetailsOptions, T as ToriiTransport, W as WithCount, g as getMarketplaceClientRuntimeMode, r as resolveMarketplaceRuntimeMode } from './types-BZP9_ZsO.js'; import { ToriiGrpcClient } from '@dojoengine/grpc'; import * as _dojoengine_torii_wasm_node from '@dojoengine/torii-wasm/node'; export { createMarketplaceClient, fetchCollectionTokens, fetchTokenBalances } from './marketplace/index.js'; export { MarketplaceClientContext, MarketplaceClientContextValue, MarketplaceClientProvider, MarketplaceClientProviderProps, MarketplaceClientStatus, marketplaceKeys, useInvalidateCollection, useInvalidateMarketplace, useMarketplaceClient, useMarketplaceCollection, useMarketplaceCollectionListings, useMarketplaceCollectionOrders, useMarketplaceCollectionTokens, useMarketplaceFees, useMarketplaceRoyaltyFee, useMarketplaceToken, useMarketplaceTokenBalances } from './marketplace/react.js'; export { A as ActiveFilters, l as AvailableFilters, C as CollectionTraitMetadataError, m as CollectionTraitMetadataPage, F as FetchCollectionTraitMetadataOptions, n as FetchCollectionTraitMetadataResult, o as FetchExpandedTraitsMetadataOptions, p as FetchTraitNamesSummaryOptions, q as FetchTraitNamesSummaryResult, r as FetchTraitValuesOptions, s as FetchTraitValuesResult, P as PrecomputedFilterData, u as PrecomputedFilterProperty, T as TraitMetadataRow, v as TraitNameSummary, w as TraitNameSummaryPage, x as TraitSelection, y as TraitValuePage, z as TraitValueRow, d as aggregateTraitMetadata, e as aggregateTraitNamesSummary, g as aggregateTraitValues, h as buildAvailableFilters, i as buildPrecomputedFilters, f as fetchCollectionTraitMetadata, a as fetchExpandedTraitsMetadata, b as fetchTraitNamesSummary, c as fetchTraitValues, k as filterTokensByMetadata, j as flattenActiveFilters, t as tokenMatchesFilters } from './filters-CyogrU7I.js'; export { Token, ToriiClient } from '@dojoengine/torii-wasm/types'; import 'react/jsx-runtime'; import 'react'; import '@tanstack/react-query'; declare const NAMESPACE = "ARCADE"; /** * Collection address mappings per project. * Extracted from torii config files in configs/. * Used to filter inventory by collection_address when browsing a specific game. */ type ProjectCollections = Record; declare const PROJECT_COLLECTIONS: ProjectCollections; /** * Get collection addresses for a given project. * Returns undefined if the project has no known collections. */ declare function getProjectCollections(project: string): string[] | undefined; /** * Check if a collection address belongs to a specific project. */ declare function isCollectionInProject(project: string, collectionAddress: string): boolean; declare const configs: { "0x534e5f5345504f4c4941": { rpcUrl: string; toriiUrl: string; masterAddress: string; masterPrivateKey: string; accountClassHash: string; feeTokenAddress: string; manifest: any; }; "0x534e5f4d41494e": { rpcUrl: string; toriiUrl: string; masterAddress: string; masterPrivateKey: string; accountClassHash: string; feeTokenAddress: string; manifest: any; }; }; type Constructor = new (...args: TArgs) => TInstance; type ToriiClientCtor = Constructor<[ { toriiUrl: string; worldAddress: string; } ], ToriiClient>; interface BaseProviderOptions { namespace: string; torii: { ToriiClient: ToriiClientCtor; }; } interface InvokeContext { entrypoint?: string; } type WithoutIndexSignature = { [K in keyof T as K extends string ? string extends K ? never : K : K extends number ? number extends K ? never : K : K extends symbol ? symbol extends K ? never : K : K]: T[K]; }; type DojoProviderInstanceLike = WithoutIndexSignature>; type DojoProviderConstructorLike = new (...args: ConstructorParameters) => DojoProviderInstanceLike; declare const DojoProviderBaseCtor: DojoProviderConstructorLike; declare class BaseProvider extends DojoProviderBaseCtor { manifest: DojoProviderInstanceLike["manifest"] & { abis: readonly Record[]; }; protected readonly namespace: string; protected readonly toriiCtor: ToriiClientCtor; constructor(chainId: constants.StarknetChainId, { namespace, torii }: BaseProviderOptions); getToriiClient(toriiUrl: string): ToriiClient; protected onTransactionReverted(_receipt: GetTransactionReceiptResponse): void; protected onInvokeCompleted(_receipt: GetTransactionReceiptResponse, _context?: InvokeContext): void; process(transactionHash: string): Promise; invoke(signer: Account | AccountInterface, calls: AllowArray, context?: InvokeContext): Promise; } declare enum TransactionType { FOLLOW = "follow", UNFOLLOW = "unfollow", CREATE_ALLIANCE = "create_alliance", OPEN_ALLIANCE = "open_alliance", CLOSE_ALLIANCE = "close_alliance", CROWN_GUILD = "crown_guild", HIRE_GUILD = "hire_guild", FIRE_GUILD = "fire_guild", REQUEST_ALLIANCE = "request_alliance", CANCEL_ALLIANCE = "cancel_alliance", LEAVE_ALLIANCE = "leave_alliance", CREATE_GUILD = "create_guild", OPEN_GUILD = "open_guild", CLOSE_GUILD = "close_guild", CROWN_MEMBER = "crown_member", PROMOTE_MEMBER = "promote_member", DEMOTE_MEMBER = "demote_member", HIRE_MEMBER = "hire_member", FIRE_MEMBER = "fire_member", REQUEST_GUILD = "request_guild", CANCEL_GUILD = "cancel_guild", LEAVE_GUILD = "leave_guild", PIN = "pin", UNPIN = "unpin", REGISTER_GAME = "register_game", UPDATE_GAME = "update_game", PUBLISH_GAME = "publish_game", HIDE_GAME = "hide_game", WHITELIST_GAME = "whitelist_game", BLACKLIST_GAME = "blacklist_game", REMOVE_GAME = "remove_game", REGISTER_EDITION = "register_edition", UPDATE_EDITION = "update_edition", PRIORITIZE_EDITION = "prioritize_edition", PUBLISH_EDITION = "publish_edition", HIDE_EDITION = "hide_edition", WHITELIST_EDITION = "whitelist_edition", BLACKLIST_EDITION = "blacklist_edition", REMOVE_EDITION = "remove_edition", DEPLOY = "deploy", REMOVE = "remove", HIRE = "hire", FIRE = "fire" } interface SocialFollowProps { target: BigNumberish; } interface SocialUnfollowProps { target: BigNumberish; } interface SocialCreateAllianceProps { metadata: ByteArray; socials: ByteArray; } interface SocialOpenAllianceProps { free: boolean; } interface SocialCrownGuildProps { guildId: BigNumberish; } interface SocialHireGuildProps { guildId: BigNumberish; } interface SocialFireGuildProps { guildId: BigNumberish; } interface SocialRequestAllianceProps { allianceId: BigNumberish; } interface SocialCreateGuildProps { metadata: ByteArray; socials: ByteArray; } interface SocialOpenGuildProps { free: boolean; } interface SocialCrownMemberProps { memberId: BigNumberish; } interface SocialPromoteMemberProps { memberId: BigNumberish; } interface SocialDemoteMemberProps { memberId: BigNumberish; } interface SocialHireMemberProps { memberId: BigNumberish; } interface SocialFireMemberProps { memberId: BigNumberish; } interface SocialRequestGuildProps { guildId: BigNumberish; } interface RegistryPinProps { achievementId: BigNumberish; } interface RegistryUnpinProps { achievementId: BigNumberish; } interface RegistryRegisterGameProps { worldAddress: BigNumberish; namespace: BigNumberish; project: ByteArray; rpc: ByteArray; policies: ByteArray; color: ByteArray; game_image: ByteArray; edition_image: ByteArray; external_url: ByteArray; description: ByteArray; game_name: ByteArray; edition_name: ByteArray; game_attributes: ByteArray; edition_attributes: ByteArray; animation_url: ByteArray; youtube_url: ByteArray; properties: ByteArray; game_socials: ByteArray; edition_socials: ByteArray; } interface RegistryUpdateGameProps { gameId: BigNumberish; color: ByteArray; image: ByteArray; image_data: ByteArray; external_url: ByteArray; description: ByteArray; name: ByteArray; attributes: ByteArray; animation_url: ByteArray; youtube_url: ByteArray; properties: ByteArray; socials: ByteArray; } interface RegistryPublishGameProps { gameId: BigNumberish; } interface RegistryHideGameProps { gameId: BigNumberish; } interface RegistryWhitelistGameProps { gameId: BigNumberish; } interface RegistryBlacklistGameProps { gameId: BigNumberish; } interface RegistryRemoveGameProps { gameId: BigNumberish; } interface RegistryRegisterEditionProps { worldAddress: BigNumberish; namespace: BigNumberish; gameId: BigNumberish; project: ByteArray; rpc: ByteArray; policies: ByteArray; color: ByteArray; image: ByteArray; image_data: ByteArray; external_url: ByteArray; description: ByteArray; name: ByteArray; attributes: ByteArray; animation_url: ByteArray; youtube_url: ByteArray; properties: ByteArray; socials: ByteArray; } interface RegistryUpdateEditionProps { editionId: BigNumberish; project: ByteArray; rpc: ByteArray; policies: ByteArray; color: ByteArray; image: ByteArray; image_data: ByteArray; external_url: ByteArray; description: ByteArray; name: ByteArray; attributes: ByteArray; animation_url: ByteArray; youtube_url: ByteArray; properties: ByteArray; socials: ByteArray; } interface RegistryPrioritizeEditionProps { editionId: BigNumberish; priority: BigNumberish; } interface RegistryPublishEditionProps { editionId: BigNumberish; } interface RegistryHideEditionProps { editionId: BigNumberish; } interface RegistryWhitelistEditionProps { editionId: BigNumberish; } interface RegistryBlacklistEditionProps { editionId: BigNumberish; } interface RegistryRemoveEditionProps { editionId: BigNumberish; } interface SlotDeployProps { service: BigNumberish; project: BigNumberish; tier: BigNumberish; } interface SlotRemoveProps { service: BigNumberish; project: BigNumberish; } interface SlotHireProps { project: BigNumberish; accountId: BigNumberish; role: BigNumberish; } interface SlotFireProps { project: BigNumberish; accountId: BigNumberish; } declare class Social$1 { private manifest; private name; constructor(manifest: any); pin(props: RegistryPinProps): AllowArray; unpin(props: RegistryUnpinProps): AllowArray; follow(props: SocialFollowProps): AllowArray; unfollow(props: SocialUnfollowProps): AllowArray; create_alliance(props: SocialCreateAllianceProps): AllowArray; open_alliance(props: SocialOpenAllianceProps): AllowArray; close_alliance(): AllowArray; crown_guild(props: SocialCrownGuildProps): AllowArray; hire_guild(props: SocialHireGuildProps): AllowArray; fire_guild(props: SocialFireGuildProps): AllowArray; request_alliance(props: SocialRequestAllianceProps): AllowArray; cancel_alliance(): AllowArray; leave_alliance(): AllowArray; create_guild(props: SocialCreateGuildProps): AllowArray; open_guild(props: SocialOpenGuildProps): AllowArray; close_guild(): AllowArray; crown_member(props: SocialCrownMemberProps): AllowArray; promote_member(props: SocialPromoteMemberProps): AllowArray; demote_member(props: SocialDemoteMemberProps): AllowArray; hire_member(props: SocialHireMemberProps): AllowArray; fire_member(props: SocialFireMemberProps): AllowArray; request_guild(props: SocialRequestGuildProps): AllowArray; cancel_guild(): AllowArray; leave_guild(): AllowArray; } declare class Registry$1 { private manifest; private name; constructor(manifest: any); register_game(props: RegistryRegisterGameProps): AllowArray; update_game(props: RegistryUpdateGameProps): AllowArray; publish_game(props: RegistryPublishGameProps): AllowArray; hide_game(props: RegistryHideGameProps): AllowArray; whitelist_game(props: RegistryWhitelistGameProps): AllowArray; blacklist_game(props: RegistryBlacklistGameProps): AllowArray; remove_game(props: RegistryRemoveGameProps): AllowArray; register_edition(props: RegistryRegisterEditionProps): AllowArray; update_edition(props: RegistryUpdateEditionProps): AllowArray; prioritize_edition(props: RegistryPrioritizeEditionProps): AllowArray; publish_edition(props: RegistryPublishEditionProps): AllowArray; hide_edition(props: RegistryHideEditionProps): AllowArray; whitelist_edition(props: RegistryWhitelistEditionProps): AllowArray; blacklist_edition(props: RegistryBlacklistEditionProps): AllowArray; remove_edition(props: RegistryRemoveEditionProps): AllowArray; } declare class Slot { private manifest; private name; constructor(manifest: any); deploy(props: SlotDeployProps): AllowArray; remove(props: SlotRemoveProps): AllowArray; hire(props: SlotHireProps): AllowArray; fire(props: SlotFireProps): AllowArray; } declare function setupWorld(provider: DojoProvider): { Marketplace: { cancel: (snAccount: Account | AccountInterface, orderId: BigNumberish, collection: string, tokenId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildCancelCalldata: (orderId: BigNumberish, collection: string, tokenId: BigNumberish) => DojoCall; execute: (snAccount: Account | AccountInterface, orderId: BigNumberish, collection: string, tokenId: BigNumberish, assetId: BigNumberish, quantity: BigNumberish, royalties: boolean, clientFee: BigNumberish, clientReceiver: string) => Promise<{ transaction_hash: string; }>; buildExecuteCalldata: (orderId: BigNumberish, collection: string, tokenId: BigNumberish, assetId: BigNumberish, quantity: BigNumberish, royalties: boolean, clientFee: BigNumberish, clientReceiver: string) => DojoCall; getValidities: (orders: Array<[BigNumberish, string, BigNumberish]>) => Promise; buildGetValiditiesCalldata: (orders: Array<[BigNumberish, string, BigNumberish]>) => DojoCall; getValidity: (orderId: BigNumberish, collection: string, tokenId: BigNumberish) => Promise; buildGetValidityCalldata: (orderId: BigNumberish, collection: string, tokenId: BigNumberish) => DojoCall; grantRole: (snAccount: Account | AccountInterface, account: string, roleId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildGrantRoleCalldata: (account: string, roleId: BigNumberish) => DojoCall; intent: (snAccount: Account | AccountInterface, collection: string, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish) => Promise<{ transaction_hash: string; }>; buildIntentCalldata: (collection: string, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish) => DojoCall; list: (snAccount: Account | AccountInterface, collection: string, tokenId: BigNumberish, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish, royalties: boolean) => Promise<{ transaction_hash: string; }>; buildListCalldata: (collection: string, tokenId: BigNumberish, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish, royalties: boolean) => DojoCall; offer: (snAccount: Account | AccountInterface, collection: string, tokenId: BigNumberish, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish) => Promise<{ transaction_hash: string; }>; buildOfferCalldata: (collection: string, tokenId: BigNumberish, quantity: BigNumberish, price: BigNumberish, currency: string, expiration: BigNumberish) => DojoCall; pause: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildPauseCalldata: () => DojoCall; remove: (snAccount: Account | AccountInterface, orderId: BigNumberish, collection: string, tokenId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRemoveCalldata: (orderId: BigNumberish, collection: string, tokenId: BigNumberish) => DojoCall; resume: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildResumeCalldata: () => DojoCall; revokeRole: (snAccount: Account | AccountInterface, account: string) => Promise<{ transaction_hash: string; }>; buildRevokeRoleCalldata: (account: string) => DojoCall; setFee: (snAccount: Account | AccountInterface, feeNum: BigNumberish, feeReceiver: string) => Promise<{ transaction_hash: string; }>; buildSetFeeCalldata: (feeNum: BigNumberish, feeReceiver: string) => DojoCall; setRoyalties: (snAccount: Account | AccountInterface, enabled: boolean) => Promise<{ transaction_hash: string; }>; buildSetRoyaltiesCalldata: (enabled: boolean) => DojoCall; }; Registry: { associateCollection: (snAccount: Account | AccountInterface, collectionAddress: string, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildAssociateCollectionCalldata: (collectionAddress: string, editionId: BigNumberish) => DojoCall; blacklistEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildBlacklistEditionCalldata: (editionId: BigNumberish) => DojoCall; blacklistGame: (snAccount: Account | AccountInterface, gameId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildBlacklistGameCalldata: (gameId: BigNumberish) => DojoCall; dissociateCollection: (snAccount: Account | AccountInterface, collectionAddress: string, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildDissociateCollectionCalldata: (collectionAddress: string, editionId: BigNumberish) => DojoCall; grant: (snAccount: Account | AccountInterface, account: string, roleId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildGrantCalldata: (account: string, roleId: BigNumberish) => DojoCall; hideEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildHideEditionCalldata: (editionId: BigNumberish) => DojoCall; hideGame: (snAccount: Account | AccountInterface, gameId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildHideGameCalldata: (gameId: BigNumberish) => DojoCall; prioritizeEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish, priority: BigNumberish) => Promise<{ transaction_hash: string; }>; buildPrioritizeEditionCalldata: (editionId: BigNumberish, priority: BigNumberish) => DojoCall; publishEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildPublishEditionCalldata: (editionId: BigNumberish) => DojoCall; publishGame: (snAccount: Account | AccountInterface, gameId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildPublishGameCalldata: (gameId: BigNumberish) => DojoCall; registerCollection: (snAccount: Account | AccountInterface, collectionAddress: string) => Promise<{ transaction_hash: string; }>; buildRegisterCollectionCalldata: (collectionAddress: string) => DojoCall; registerEdition: (snAccount: Account | AccountInterface, worldAddress: string, namespace: BigNumberish, gameId: BigNumberish, project: string, rpc: string, policies: string, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => Promise<{ transaction_hash: string; }>; buildRegisterEditionCalldata: (worldAddress: string, namespace: BigNumberish, gameId: BigNumberish, project: string, rpc: string, policies: string, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => DojoCall; registerGame: (snAccount: Account | AccountInterface, worldAddress: string, namespace: BigNumberish, project: string, rpc: string, policies: string, color: string, gameImage: string, editionImage: string, externalUrl: string, description: string, gameName: string, editionName: string, gameAttributes: string, editionAttributes: string, animationUrl: string, youtubeUrl: string, properties: string, gameSocials: string, editionSocials: string) => Promise<{ transaction_hash: string; }>; buildRegisterGameCalldata: (worldAddress: string, namespace: BigNumberish, project: string, rpc: string, policies: string, color: string, gameImage: string, editionImage: string, externalUrl: string, description: string, gameName: string, editionName: string, gameAttributes: string, editionAttributes: string, animationUrl: string, youtubeUrl: string, properties: string, gameSocials: string, editionSocials: string) => DojoCall; removeEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRemoveEditionCalldata: (editionId: BigNumberish) => DojoCall; removeGame: (snAccount: Account | AccountInterface, gameId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRemoveGameCalldata: (gameId: BigNumberish) => DojoCall; revoke: (snAccount: Account | AccountInterface, account: string) => Promise<{ transaction_hash: string; }>; buildRevokeCalldata: (account: string) => DojoCall; tokenUri: (tokenId: BigNumberish) => Promise; buildTokenUriCalldata: (tokenId: BigNumberish) => DojoCall; updateEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish, project: string, rpc: string, policies: string, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => Promise<{ transaction_hash: string; }>; buildUpdateEditionCalldata: (editionId: BigNumberish, project: string, rpc: string, policies: string, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => DojoCall; updateGame: (snAccount: Account | AccountInterface, gameId: BigNumberish, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => Promise<{ transaction_hash: string; }>; buildUpdateGameCalldata: (gameId: BigNumberish, color: string, image: string, imageData: string, externalUrl: string, description: string, name: string, attributes: string, animationUrl: string, youtubeUrl: string, properties: string, socials: string) => DojoCall; whitelistEdition: (snAccount: Account | AccountInterface, editionId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildWhitelistEditionCalldata: (editionId: BigNumberish) => DojoCall; whitelistGame: (snAccount: Account | AccountInterface, gameId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildWhitelistGameCalldata: (gameId: BigNumberish) => DojoCall; }; Slot: { deploy: (snAccount: Account | AccountInterface, service: BigNumberish, project: BigNumberish, tier: BigNumberish) => Promise<{ transaction_hash: string; }>; buildDeployCalldata: (service: BigNumberish, project: BigNumberish, tier: BigNumberish) => DojoCall; fire: (snAccount: Account | AccountInterface, project: BigNumberish, accountId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildFireCalldata: (project: BigNumberish, accountId: BigNumberish) => DojoCall; hire: (snAccount: Account | AccountInterface, project: BigNumberish, accountId: BigNumberish, role: BigNumberish) => Promise<{ transaction_hash: string; }>; buildHireCalldata: (project: BigNumberish, accountId: BigNumberish, role: BigNumberish) => DojoCall; remove: (snAccount: Account | AccountInterface, service: BigNumberish, project: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRemoveCalldata: (service: BigNumberish, project: BigNumberish) => DojoCall; }; Social: { cancelAlliance: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildCancelAllianceCalldata: () => DojoCall; cancelGuild: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildCancelGuildCalldata: () => DojoCall; closeAlliance: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildCloseAllianceCalldata: () => DojoCall; closeGuild: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildCloseGuildCalldata: () => DojoCall; createAlliance: (snAccount: Account | AccountInterface, metadata: string, socials: string) => Promise<{ transaction_hash: string; }>; buildCreateAllianceCalldata: (metadata: string, socials: string) => DojoCall; createGuild: (snAccount: Account | AccountInterface, metadata: string, socials: string) => Promise<{ transaction_hash: string; }>; buildCreateGuildCalldata: (metadata: string, socials: string) => DojoCall; crownGuild: (snAccount: Account | AccountInterface, guildId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildCrownGuildCalldata: (guildId: BigNumberish) => DojoCall; crownMember: (snAccount: Account | AccountInterface, memberId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildCrownMemberCalldata: (memberId: BigNumberish) => DojoCall; demoteMember: (snAccount: Account | AccountInterface, memberId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildDemoteMemberCalldata: (memberId: BigNumberish) => DojoCall; fireGuild: (snAccount: Account | AccountInterface, guildId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildFireGuildCalldata: (guildId: BigNumberish) => DojoCall; fireMember: (snAccount: Account | AccountInterface, memberId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildFireMemberCalldata: (memberId: BigNumberish) => DojoCall; follow: (snAccount: Account | AccountInterface, target: BigNumberish) => Promise<{ transaction_hash: string; }>; buildFollowCalldata: (target: BigNumberish) => DojoCall; hireGuild: (snAccount: Account | AccountInterface, guildId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildHireGuildCalldata: (guildId: BigNumberish) => DojoCall; hireMember: (snAccount: Account | AccountInterface, memberId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildHireMemberCalldata: (memberId: BigNumberish) => DojoCall; leaveAlliance: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildLeaveAllianceCalldata: () => DojoCall; leaveGuild: (snAccount: Account | AccountInterface) => Promise<{ transaction_hash: string; }>; buildLeaveGuildCalldata: () => DojoCall; openAlliance: (snAccount: Account | AccountInterface, free: boolean) => Promise<{ transaction_hash: string; }>; buildOpenAllianceCalldata: (free: boolean) => DojoCall; openGuild: (snAccount: Account | AccountInterface, free: boolean) => Promise<{ transaction_hash: string; }>; buildOpenGuildCalldata: (free: boolean) => DojoCall; pin: (snAccount: Account | AccountInterface, achievementId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildPinCalldata: (achievementId: BigNumberish) => DojoCall; promoteMember: (snAccount: Account | AccountInterface, memberId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildPromoteMemberCalldata: (memberId: BigNumberish) => DojoCall; requestAlliance: (snAccount: Account | AccountInterface, allianceId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRequestAllianceCalldata: (allianceId: BigNumberish) => DojoCall; requestGuild: (snAccount: Account | AccountInterface, guildId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildRequestGuildCalldata: (guildId: BigNumberish) => DojoCall; unfollow: (snAccount: Account | AccountInterface, target: BigNumberish) => Promise<{ transaction_hash: string; }>; buildUnfollowCalldata: (target: BigNumberish) => DojoCall; unpin: (snAccount: Account | AccountInterface, achievementId: BigNumberish) => Promise<{ transaction_hash: string; }>; buildUnpinCalldata: (achievementId: BigNumberish) => DojoCall; }; }; declare class ArcadeProvider extends BaseProvider { world: ReturnType; social: Social$1; registry: Registry$1; slot: Slot; marketplace: ReturnType["Marketplace"]; /** * Create a new ArcadeProvider instance * * @param chainId - The chain ID */ constructor(chainId: constants.StarknetChainId); /** * Execute a transaction and emit its result * * @param signer - Account that will sign the transaction * @param calls - Transaction call data * @param entrypoint - Starknet entrypoint invoked * @returns Transaction receipt */ invoke(signer: Account | AccountInterface, calls: AllowArray, context?: InvokeContext): Promise; invoke(signer: Account | AccountInterface, calls: AllowArray, entrypoint: string): Promise; } interface DomainOptions { name: string; version?: string; revision?: string; } declare const createInitSDK: ({ name, version, revision, }: DomainOptions) => (chainId: constants.StarknetChainId) => Promise<_dojoengine_sdk.SDK>; declare const initArcadeSDK: (chainId: constants.StarknetChainId) => Promise<_dojoengine_sdk.SDK>; declare class Config { project: string; rpc: string; policies: string; constructor(project: string, rpc: string, policies: string); static default(): Config; static from(value: string): Config; } interface AttributesOptions { preset?: string; color?: string; game?: string; } declare class Attributes { preset?: string; color?: string; game?: string; constructor(options?: AttributesOptions); static default(): Attributes; static from(value: string): Attributes; compile(): ByteArray; clone(): Attributes; } interface PropertiesOptions { preset?: string; icon?: string; banner?: string; cover?: string; studio?: string; } declare class Properties { preset?: string; icon?: string; banner?: string; cover?: string; studio?: string; constructor(options?: PropertiesOptions); static default(): Properties; static from(value: string): Properties; compile(): ByteArray; clone(): Properties; } interface SocialsOptions { discord?: string; telegram?: string; twitter?: string; youtube?: string; website?: string; github?: string; videos?: string[]; images?: string[]; } declare class Socials { discord?: string; telegram?: string; twitter?: string; youtube?: string; website?: string; github?: string; videos?: string[]; images?: string[]; constructor(options?: SocialsOptions); static default(): Socials; static from(value: string): Socials; static merge(lhs: Socials | undefined, rhs: Socials | undefined): Socials; compile(): ByteArray; clone(): Socials; } declare class AccessModel { identifier: string; address: string; role: Role; type: string; constructor(identifier: string, address: string, role: Role); static from(identifier: string, model: any): AccessModel; static default(identifier: string): AccessModel; static isType(model: AccessModel): boolean; exists(): boolean; clone(): AccessModel; } declare class GameModel { identifier: string; id: number; published: boolean; whitelisted: boolean; color: string; image: string; image_data: string; external_url: string; description: string; name: string; animation_url: string; youtube_url: string; attributes: Attributes; properties: Properties; socials: Socials; type: string; constructor(identifier: string, id: number, published: boolean, whitelisted: boolean, color: string, image: string, image_data: string, external_url: string, description: string, name: string, animation_url: string, youtube_url: string, attributes: Attributes, properties: Properties, socials: Socials); static from(identifier: string, model: any): GameModel; static default(identifier: string): GameModel; static isType(model: GameModel): boolean; exists(): boolean; clone(): GameModel; } declare class EditionModel { identifier: string; id: number; worldAddress: string; namespace: string; published: boolean; whitelisted: boolean; priority: number; gameId: number; config: Config; color: string; image: string; image_data: string; external_url: string; description: string; name: string; animation_url: string; youtube_url: string; attributes: Attributes; properties: Properties; socials: Socials; certified?: boolean | undefined; type: string; constructor(identifier: string, id: number, worldAddress: string, namespace: string, published: boolean, whitelisted: boolean, priority: number, gameId: number, config: Config, color: string, image: string, image_data: string, external_url: string, description: string, name: string, animation_url: string, youtube_url: string, attributes: Attributes, properties: Properties, socials: Socials, certified?: boolean | undefined); static from(identifier: string, model: any): EditionModel; static default(identifier: string): EditionModel; static isType(model: EditionModel): boolean; exists(): boolean; clone(): EditionModel; } declare class CollectionEditionModel { identifier: string; collection: string; edition: string; active: boolean; type: string; constructor(identifier: string, collection: string, edition: string, active: boolean); static from(identifier: string, model: any): CollectionEditionModel; static default(identifier: string): CollectionEditionModel; static isType(model: CollectionEditionModel): boolean; exists(): boolean; clone(): CollectionEditionModel; } type RegistryOptions = { access?: boolean; game?: boolean; edition?: boolean; collectionEdition?: boolean; }; declare const getRegistryPolicies: (chainId: constants.StarknetChainId, options?: RegistryOptions) => { contracts: { [x: string]: { name: string; description: string; methods: { name: string; entrypoint: string; description: string; }[]; }; }; }; type RegistryModel = AccessModel | GameModel | EditionModel | CollectionEditionModel; declare const Registry: { sdk: SDK | undefined; unsubEntities: (() => void) | undefined; init: (chainId: constants.StarknetChainId) => Promise; isEntityQueryable(options: RegistryOptions): boolean | undefined; getEntityQuery: (_options?: RegistryOptions) => ToriiQueryBuilder; fetchEntities: (callback: (models: RegistryModel[]) => void, options: RegistryOptions) => Promise; subEntities: (callback: (models: RegistryModel[]) => void, options: RegistryOptions) => Promise; fetch: (callback: (models: RegistryModel[]) => void, options?: RegistryOptions) => Promise; sub: (callback: (models: RegistryModel[]) => void, options?: RegistryOptions) => Promise; unsub: () => void; }; declare class PinEvent { identifier: string; playerId: string; achievementId: string; time: number; type: string; constructor(identifier: string, playerId: string, achievementId: string, time: number); static from(identifier: string, model: any): PinEvent; static isType(model: PinEvent): boolean; static default(identifier: string): PinEvent; exists(): boolean; } declare class FollowEvent { identifier: string; follower: string; followed: string; time: number; type: string; constructor(identifier: string, follower: string, followed: string, time: number); static from(identifier: string, model: any): FollowEvent; static default(identifier: string): FollowEvent; static isType(model: FollowEvent): boolean; exists(): boolean; } declare class GuildModel { identifier: string; id: number; open: boolean; free: boolean; guildCount: number; metadata: Properties; socials: Socials; type: string; constructor(identifier: string, id: number, open: boolean, free: boolean, guildCount: number, metadata: Properties, socials: Socials); static from(identifier: string, model: any): GuildModel; static isType(model: GuildModel): boolean; static default(identifier: string): GuildModel; exists(): boolean; } declare class AllianceModel { identifier: string; id: number; open: boolean; free: boolean; guildCount: number; metadata: Properties; socials: Socials; type: string; constructor(identifier: string, id: number, open: boolean, free: boolean, guildCount: number, metadata: Properties, socials: Socials); static from(identifier: string, model: any): AllianceModel; static default(identifier: string): AllianceModel; static isType(model: AllianceModel): boolean; exists(): boolean; } declare class MemberModel { identifier: string; id: string; role: number; guildId: number; pendingGuildId: number; type: string; constructor(identifier: string, id: string, role: number, guildId: number, pendingGuildId: number); static from(identifier: string, model: any): MemberModel; static isType(model: MemberModel): boolean; static default(identifier: string): MemberModel; exists(): boolean; } type SocialOptions = { pin?: boolean; follow?: boolean; member?: boolean; guild?: boolean; alliance?: boolean; }; declare const getSocialPolicies: (chainId: constants.StarknetChainId, options?: SocialOptions) => { contracts: { [x: string]: { name: string; description: string; methods: { name: string; entrypoint: string; description: string; }[]; }; }; }; type SocialModel = AllianceModel | GuildModel | MemberModel | PinEvent | FollowEvent; declare const Social: { sdk: SDK | undefined; unsubEntities: (() => void) | undefined; unsubEvents: (() => void) | undefined; init: (chainId: constants.StarknetChainId) => Promise; isEntityQueryable(options: SocialOptions): boolean | undefined; isEventQueryable(options: SocialOptions): boolean | undefined; getEntityQuery: (options?: SocialOptions) => ToriiQueryBuilder; getEventQuery: (options?: SocialOptions) => ToriiQueryBuilder; fetchEntities: (callback: (models: SocialModel[]) => void, options: SocialOptions) => Promise; fetchEvents: (callback: (models: SocialModel[]) => void, options: SocialOptions) => Promise; subEntities: (callback: (models: SocialModel[]) => void, options: SocialOptions) => Promise; subEvents: (callback: (models: SocialModel[]) => void, options: SocialOptions) => Promise; fetch: (callback: (models: SocialModel[]) => void, options?: SocialOptions) => Promise; sub: (callback: (models: SocialModel[]) => void, options?: SocialOptions) => Promise; unsub: () => void; }; declare const getMarketplacePolicies: (chainId: constants.StarknetChainId, options?: MarketplaceOptions) => { contracts: { [x: string]: { name: string; description: string; methods: { name: string; entrypoint: string; description: string; }[]; }; }; }; interface PaginationOptions { limit?: number; cursor?: string; direction?: "Forward" | "Backward"; } interface ClientCallbackParams { client: TNative extends true ? ToriiGrpcClient : ToriiClient; signal: AbortSignal; } interface FetchToriiOptionsBase { pagination?: PaginationOptions; } interface FetchToriiOptionsWithClient extends FetchToriiOptionsBase { /** * Dojo client callback transport. * For SQL transport, use `fetchToriisSql` from `./torii-sql-fetcher`. */ client: (params: ClientCallbackParams) => Promise | void | AsyncGenerator; native?: TNative; } type FetchToriiOptions = FetchToriiOptionsWithClient; interface FetchToriiResult { data: any[]; errors?: Error[]; metadata?: { totalEndpoints: number; successfulEndpoints: number; failedEndpoints: number; }; } interface FetchToriiStreamResult { endpoint: string; data?: any; error?: Error; metadata: { completed: number; total: number; isLast: boolean; }; } declare function fetchToriis(endpoints: string[], options: FetchToriiOptions): Promise; declare function fetchToriisStream(endpoints: string[], options: FetchToriiOptions): AsyncGenerator; interface FetchToriiSqlResult { data: any[]; errors?: Error[]; metadata?: { totalEndpoints: number; successfulEndpoints: number; failedEndpoints: number; }; } declare function fetchToriisSql(endpoints: string[], sql: string): Promise; declare function getToriiUrl(project: string): string; declare function getToriiSqlUrl(project: string): string; declare function getToriiGraphqlUrl(project: string): string; declare function getToriiAssetUrl(project: string, contractAddress: string, tokenId?: string): string; declare const Helpers: { getImage(image: string, preset?: string): Promise; }; declare function subscribeToTokenUpdatesClause(collectionAddress: string, tokenId: BigNumberish | undefined): _dojoengine_torii_wasm_node.Clause; declare function getTokenQuery(collectionAddress: string, tokenId: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getTokenOrders(collectionAddress: string, tokenId: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getListedTokensForCollection(collectionAddress: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function isTokenListed(collectionAddress: string, tokenId: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getTokenMetadataQuery(identity: string, collectionAddress: string, tokenId: BigNumberish): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getCollectionMetadataQuery(identity: string, collectionAddress: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getMetadataByTraitQuery(identity: string, collectionAddress: string, traitType: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function getMetadataByValueQuery(identity: string, collectionAddress: string, value: string): ToriiQueryBuilder<_dojoengine_sdk.SchemaType>; declare function subscribeToMetadataUpdatesClause(identity: string, collectionAddress: string, tokenId: BigNumberish | undefined): _dojoengine_torii_wasm_node.Clause; type TokenMetadataUI = { tokenId: string; attributes: Array<{ traitType: string; value: string; }>; }; type CollectionMetadataUI = { collectionAddress: string; tokens: TokenMetadataUI[]; }; declare function transformMetadataForUI(metadataEntities: any[]): TokenMetadataUI[]; declare function transformCollectionMetadataForUI(collectionAddress: string, metadataEntities: any[]): CollectionMetadataUI; declare function filterMetadataByTraits(metadata: TokenMetadataUI[], traitFilters: { traitType: string; value: string; }[]): TokenMetadataUI[]; type MetadataStatistic = { traitType: string; values: Array<{ value: string; count: number; percentage: number; }>; }; type MetadataStatistics = MetadataStatistic[]; declare function getMetadataStatistics(metadata: TokenMetadataUI[]): MetadataStatistics; /** * Represents a parsed semantic version. */ interface SemVer { /** Major version number (X in X.Y.Z) */ major: number; /** Minor version number (Y in X.Y.Z) */ minor: number; /** Patch version number (Z in X.Y.Z) */ patch: number; /** Prerelease version identifier (e.g., "alpha.1" in "1.0.0-alpha.1") */ prerelease?: string; /** Build metadata (e.g., "build.123" in "1.0.0+build.123") */ build?: string; /** The original version string */ raw: string; } /** * Parses a semantic version string into its components. * @param version - The version string to parse (e.g., "1.2.3", "v1.2.3-alpha.1+build.123") * @returns Parsed semantic version object * @throws Error if the version string is invalid */ declare function parseSemVer(version: string): SemVer; /** * Compares two semantic versions. * @param a - First version to compare * @param b - Second version to compare * @returns Negative if a < b, positive if a > b, 0 if equal */ declare function compareSemVer(a: SemVer, b: SemVer): number; /** * Checks if a version meets the specified requirements. * @param current - The current version * @param required - Required version constraints * @returns True if the current version satisfies the requirements */ declare function isVersionCompatible(current: SemVer, required: { major?: number; minor?: number; patch?: number; }): boolean; /** * Response structure from Torii version endpoint. */ interface ToriiVersionResponse { /** Version string (e.g., "1.5.8-preview.4 (main 5392c8a)") */ version: string; /** Service name (should be "torii") */ service: string; /** Indicates if the request was successful */ success: boolean; } /** * Extended semantic version with Torii-specific metadata. */ interface ToriiSemVer extends SemVer { /** Git branch name (e.g., "main", "develop") */ branch?: string; /** Git commit hash (7-40 characters) */ commit?: string; } /** * Function type for fetching version information from a URL. */ type VersionFetcher = (url: string) => Promise; /** * Default implementation for fetching Torii version information. * Validates URL, handles network errors, and parses JSON response. * @param url - The URL to fetch version information from * @returns Promise resolving to version response * @throws Error for invalid URL, network errors, or JSON parsing failures */ declare const defaultFetcher: VersionFetcher; /** * Parses a Torii version string including branch and commit information. * Supports format: "1.5.8-preview.4 (main 5392c8a)" * @param version - The version string to parse * @returns Parsed version with branch and commit information */ declare function parseToriiVersion(version: string): ToriiSemVer; /** * Retrieves and parses version information from a Torii service. * @param toriiUrl - The URL of the Torii service * @param fetcher - Optional custom fetcher function * @returns Promise resolving to parsed Torii version information * @throws Error if service is not "torii", response indicates failure, or version is invalid */ declare function getToriiVersion(toriiUrl: string, fetcher?: VersionFetcher): Promise; export { AccessModel, AllianceModel, ArcadeProvider, Attributes, type ClientCallbackParams, CollectionEditionModel, type CollectionMetadataUI, Config, EditionModel, type FetchToriiOptions, type FetchToriiOptionsBase, type FetchToriiOptionsWithClient, type FetchToriiResult, type FetchToriiSqlResult, type FetchToriiStreamResult, FollowEvent, GameModel, GuildModel, Helpers, MarketplaceOptions, MemberModel, type MetadataStatistic, type MetadataStatistics, NAMESPACE, PROJECT_COLLECTIONS, type PaginationOptions, PinEvent, type ProjectCollections, Properties, Registry, type RegistryModel, type RegistryOptions, Role, type SemVer, Social, type SocialModel, type SocialOptions, Socials, type TokenMetadataUI, type ToriiSemVer, type ToriiVersionResponse, TransactionType, type VersionFetcher, compareSemVer, configs, createInitSDK, defaultFetcher, fetchToriis, fetchToriisSql, fetchToriisStream, filterMetadataByTraits, getCollectionMetadataQuery, getListedTokensForCollection, getMarketplacePolicies, getMetadataByTraitQuery, getMetadataByValueQuery, getMetadataStatistics, getProjectCollections, getRegistryPolicies, getSocialPolicies, getTokenMetadataQuery, getTokenOrders, getTokenQuery, getToriiAssetUrl, getToriiGraphqlUrl, getToriiSqlUrl, getToriiUrl, getToriiVersion, initArcadeSDK, isCollectionInProject, isTokenListed, isVersionCompatible, parseSemVer, parseToriiVersion, subscribeToMetadataUpdatesClause, subscribeToTokenUpdatesClause, transformCollectionMetadataForUI, transformMetadataForUI };