Class: NftCollectionService
Gala Launchpad SDK 9.0.0-rc.5 / index / NftCollectionService
Class: NftCollectionService
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:45
NFT Collection Service
Manages all NFT-related operations including collection claims, token class creation, and NFT minting on GalaChain.
Fee Structure:
- Collection Claim: 10,000 GALA
- Token Class Create: 1,000 GALA
- Mint NFT: Dynamic fee (estimated via DryRun)
Example
const service = new NftCollectionService(httpClient, galaChainClient);
// Get collection claim fee
const fee = service.getCollectionClaimFee(); // "10000"
// Claim a collection
const result = await service.claimCollection({
collectionName: 'my-collection'
});
Extends
BaseService
Constructors
Constructor
new NftCollectionService(
httpClient):NftCollectionService
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:46
Parameters
httpClient
HttpClient
Returns
NftCollectionService
Overrides
BaseService.constructor
Methods
claimCollection()
claimCollection(
params):Promise<ClaimCollectionResult>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:79
Claim an NFT collection name
Parameters
params
Collection claim parameters
Returns
Promise<ClaimCollectionResult>
Claim result with transaction ID
Throws
Error if collection name is invalid or already claimed
createTokenClass()
createTokenClass(
params):Promise<CreateTokenClassResult>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:106
Create a token class within an NFT collection
Parameters
params
Token class creation parameters
Returns
Promise<CreateTokenClassResult>
Creation result with transaction ID
Throws
Error if parameters are invalid or user lacks authorization
estimateMintFee()
estimateMintFee(
params):Promise<string>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:64
Estimate minting fee for NFTs via DryRun
Parameters
params
Mint parameters (collection, type, category, quantity, owner)
Returns
Promise<string>
Estimated fee in GALA
Throws
Error if DryRun fails
estimateNftOperationFees()
estimateNftOperationFees(
params):NftFeeEstimate
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:71
Calculate total fees for multiple NFT operations
Parameters
params
Operations to estimate (claimCollection, createTokenClasses count)
Returns
Fee breakdown with total
fetchNftBalances()
fetchNftBalances(
ownerAddress,collectionFilter?):Promise<NftBalance[]>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:131
Fetch NFT balances for an owner: the owner's GalaChain balance records (FetchBalances) that
hold at least one token instance, optionally of one collection.
Parameters
ownerAddress
string
Owner wallet address (eth|<40 hex>)
collectionFilter?
string
Optional collection name to filter by
Returns
Promise<NftBalance[]>
List of NFT balances
fetchTokenClasses()
fetchTokenClasses(
params):Promise<NftTokenClassWithSupply[]>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:114
Fetch the token classes of a collection (FetchTokenClassesWithPagination, page by page,
bounded), optionally narrowed by type and category.
Parameters
params
Query parameters (collection, type, category)
Returns
Promise<NftTokenClassWithSupply[]>
List of token classes with supply info
fetchUserCollections()
fetchUserCollections(
walletAddress):Promise<NftCollectionAuthorization[]>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:89
Fetch all NFT collections authorized to a user: every collection authorization on GalaChain
(FetchNftCollectionAuthorizationsWithPagination, page by page, bounded) whose authorized users
include walletAddress.
Parameters
walletAddress
string
Wallet address to fetch collections for (eth|<40 hex>)
Returns
Promise<NftCollectionAuthorization[]>
List of authorized collections
Throws
Error for an address that is not eth|<40 hex>; the read's errors otherwise
getCollectionClaimFee()
getCollectionClaimFee():
string
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:51
Get the fee to claim an NFT collection
Returns
string
Fee amount in GALA as string ("10000")
getTokenClassCreateFee()
getTokenClassCreateFee():
string
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:56
Get the fee to create a token class
Returns
string
Fee amount in GALA as string ("1000")
isCollectionAvailable()
isCollectionAvailable(
collectionName):Promise<boolean>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:98
Check if an NFT collection name is available: no collection authorization on GalaChain names it. A read that fails (or a set of authorizations larger than the read's page bound) throws: it is never reported as "available".
Parameters
collectionName
string
Collection name to check
Returns
Promise<boolean>
True if available, false if already claimed
mintNft()
mintNft(
params):Promise<MintNftResult>
Defined in: packages/launchpad-sdk/dist/services/NftCollectionService.d.ts:122
Mint NFTs from a token class
Parameters
params
Minting parameters
Returns
Promise<MintNftResult>
Minting result with transaction ID
Throws
Error if parameters invalid or user lacks balance
setJwtAuth()
setJwtAuth(
jwtAuth):void
Defined in: packages/launchpad-sdk/dist/services/BaseService.d.ts:50
Set the JWT authentication manager. Allows dynamic configuration of JWT auth after service creation.
Parameters
jwtAuth
JwtAuth
JWT auth manager instance
Returns
void
Inherited from
BaseService.setJwtAuth