@nftvillage/presale-sdk
v0.1.17
Published
Presale Hooks and functions to interect with Presale contract.
Downloads
13
Keywords
Readme
@nftvillage/presale-sdk
Presale Hooks and functions to interect with Presale contract.
Dependencies
"@react-dapp/utils": "^0.0.20",
"bignumber.js": "^9.0.1",
"ethereum-multicall": "^2.9.0",
"ethers": "^5.5.1",
"react": "^17.0.2",
Presale Hooks
useBuyPack
- buy
this hook takes packId as numbeer
- Return values
this hook returns createState enum
Enum STATE {
IDLE = 0,
BUSY = 1,
FAILED = 2,
SUCCEED = 3
}
useGetPackInfo
- getPackInfo
this hook takes packId as numbeer
- Return values
this hook returns Packs interface and getState enum
Packs {
nft:string
tokenIds:number[]
nftType: TokenStandard
paymentToken:string
price:string,
displayPrice:string
enabled:boolean
}
TokenStandard { ERC721, ERC1155 }
useGetAllPacks
getAllPacks
Return values
this hook returns array of Packs interface and getState enum
[
Packs {
nft:string
tokenIds:number[]
nftType: TokenStandard
paymentToken:string
price:string,
displayPrice:string
enabled:boolean
}
]