Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hemergy/core-sdk

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hemergy/core-sdk - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

5

lib/index.d.ts

@@ -18,2 +18,3 @@ import { AxiosInstance } from 'axios';

projectsFactoryContract: ethers.Contract;
usdcContract: ethers.Contract;
}>;

@@ -27,5 +28,5 @@ getSignerAddress(): Promise<string>;

divestInProject(projectAddress: string, investorAccountAddress: string, amount: number): Promise<void>;
mint(address: string): Promise<number>;
mint(address: string): Promise<ethers.BigNumber>;
isKYCed(accountAddress: string): Promise<boolean>;
getBalance(address: string): Promise<ethers.BigNumber>;
getBalance(address: string): Promise<any>;
}

13

lib/index.js

@@ -42,6 +42,7 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const { accountsFactoryAddress, accountsFactoryABI, projectsFactoryABI, projectsFactoryAddress } = yield this.getMeta();
const { accountsFactoryAddress, accountsFactoryABI, projectsFactoryABI, projectsFactoryAddress, usdcContractABI, usdcContractAddress, } = yield this.getMeta();
const accountsFactoryContract = new ethers_1.ethers.Contract(accountsFactoryAddress, accountsFactoryABI, this.signer);
const projectsFactoryContract = new ethers_1.ethers.Contract(projectsFactoryAddress, projectsFactoryABI, this.signer);
return { accountsFactoryContract, projectsFactoryContract };
const usdcContract = new ethers_1.ethers.Contract(usdcContractAddress, usdcContractABI, this.signer);
return { accountsFactoryContract, projectsFactoryContract, usdcContract };
});

@@ -132,3 +133,3 @@ }

return __awaiter(this, void 0, void 0, function* () {
const { data } = yield this.axiosClient.post('bank/mint', { address });
const { data } = yield this.axiosClient.post('/bank/mint', { address });
return data;

@@ -145,5 +146,9 @@ });

getBalance(address) {
return this.signer.provider.getBalance(address);
return __awaiter(this, void 0, void 0, function* () {
const { usdcContract } = yield this.getContracts();
const balance = yield usdcContract.balanceOf(address);
return balance;
});
}
}
exports.default = Hemergy;

@@ -10,2 +10,4 @@ export type Meta = {

projectContractABI: Record<string, any>[];
usdcContractAddress: string;
usdcContractABI: Record<string, any>[];
};
{
"name": "@hemergy/core-sdk",
"version": "0.0.6",
"version": "0.0.7",
"description": "TypeScript NPM Module for Hemergy Core",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc