mintclub
SDK
A brief introduction on common patterns.
Introduction
mintclub
You will most likely find everything needed within the mintclub
module exported from mint.club-v2-sdk
.
app.ts
import { mintclub } from 'mint.club-v2-sdk'
network
The SDK follows a common pattern of having a network
method to set the network to interact with.
app.ts
import { mintclub } from 'mint.club-v2-sdk';
mintclub.network('ethereumbaseblastcyberdegenoptimismarbitrumavalanchepolygonbnbchainsepoliakaiahamshibariumbasesepoliaavalanchefujiblastsepoliacybertestnet'
app.ts
import { mintclub } from 'mint.club-v2-sdk';
mintclub.network(111010913711155111111557560168587773
token
| nft
Then follows the token
and nft
methods to interact with.
token
represents fungible ERC-20 tokens, while nft
represents non-fungible ERC-1155 tokens.
It takes in a string
parameter which could be the token symbol or address.
app.ts
import { mintclub } from 'mint.club-v2-sdk'
const symbolOrAddress: string = 'CHICKEN'
mintclub.network('base').token(const symbolOrAddress: stringsymbolOrAddress)
functionName
Lastly, you can call the functions on the token or nft.
app.ts
import { mintclub } from 'mint.club-v2-sdk'
const symbolOrAddress: string = 'CHICKEN'
mintclub.network('base').token(symbolOrAddress).ggetAllowancegetBalanceOfgetBondAddressgetBuyEstimationgetDecimalsgetDetailgetMaxSupplygetMintClubMetadatagetNamegetPriceForNextMintgetReserveTokengetReserveTokenAddressgetSellEstimationgetStepsgetSymbolgetTokenAddressgetTokenBondgetTotalSupplygetUsdRate