@hemergy/core-sdk
v0.0.20
Published
TypeScript NPM Module for Hemergy Core
Downloads
3
Keywords
Readme
Hemergy SDK
Usage
import Hermegy from '@hemergy/core-sdk'
const signer = await ethersProvider.getSigner(); // ethers signer to be used in all endpoint calls as endUserAddress
const hemergy = new Hemergy({ baseURL: 'https://dev-core.hemergy.com', signer });
const account = await hemergy.createAccount(); // Create an account managed by the signer
const isKYCed = await hemergy.isKYCed(account); // Check if the account is KYCed
const project = await hemergy.createProject(account); // Create an project under an account. Note: the account should be KYCed
API
| Function | Description | | ----------- | ----------- | | getContracts | Return the ether contracts to interact with | | getSignerAddress | Return the signer address | | createAccount | Create an account signer by the signer | | isKYCed | Check if the account is KYCed | | createProject | Create a project under a specific account | | addProjectBeneficiaries | Add beneficiaries to a project | | investInProject | Allow an investor to invest in a project | | divestInProject | Allow an investor to divest in a project | | approveAccountAmount | Approve an amount sent to an account | | mint | Get some amount in user account (Only available in dev and testnet environment ) | | getBalance | Get balance of user account (Only available in dev and testnet environment ) |