open-index/open-npm huggingface dataset:
npm package: @nftvillage/presale-sdk
Description: Presale Hooks and functions to interect with Presale contract.
Latest version: 0.1.17

# @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
 }
]
```