@cryptodo-temp/frontend-sdk
v1.1.72
Published
Reusable module for cryptodo web3 logic based on ethers and usedApp. For now module contains: 1. Hooks 1.1 useAuth - handle authorization logic (Metamask only for now) 1.2 useWallet - used for checking and setting wallet balance (Metamask only for now) 1.
Downloads
37
Readme
@cryptodo/frontend-sdk
Reusable module for cryptodo web3 logic based on ethers and usedApp. For now module contains:
Hooks 1.1 useAuth - handle authorization logic (Metamask only for now) 1.2 useWallet - used for checking and setting wallet balance (Metamask only for now) 1.3 useContractWeb3 - contains specific logic for creating and deploying contracts
switchToRightNetwork - function that checks and refreshesh network (Metamask only for now)
Web3Provider - wrapper for main app
Usage
1. Install module
npm install --save @cryptodo/frontend-sdk
2. Make sure you install all peer dependencies
{
"@usedapp/core": ">=1.1.5",
"ethers": ">=5.7.1",
"react": ">=18.2.0",
"react-use": ">=17.4.0"
}
npm install --save @usedapp/core ethers react react-use
Development
Project usage
Install all modules in project root folder
npm install
Publish new version
To publish new library versions you need to create and configure npm user
- You should install all dependencies in project root folder
npm install
- Increase version field in package.json
- Build module with
npm run publish:prepare
- Publish new version with
npm publish ./dist.publish