@hemergy/core-sdk
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -24,4 +24,5 @@ import { AxiosInstance } from 'axios'; | ||
createAccount(): Promise<string>; | ||
createProject(accountAddress: string, beneficiaries: string[] | undefined, totalSupply: number, tokenPrice: number, projectURI: string): Promise<string>; | ||
createProject(accountAddress: string, beneficiaries: string[] | undefined, totalSupply: number, tokenPrice: number, projectURI: string, midcap: number): Promise<string>; | ||
investInProject(projectAddress: string, investorAccountAddress: string, amount: number): Promise<void>; | ||
kickstartProject(projectAddress: string): Promise<void>; | ||
divestInProject(projectAddress: string, investorAccountAddress: string, amount: number): Promise<void>; | ||
@@ -28,0 +29,0 @@ withdrawTokens(investorWalletAddress: string, projectAddress: string): Promise<void>; |
@@ -77,3 +77,3 @@ "use strict"; | ||
]); | ||
const { logs } = yield this.signAndBroadcast('/accounts', { endUserAddress: signerAddress }); | ||
const { logs } = yield this.signAndBroadcast('/accounts', { endUserAddress: signerAddress, accountURI: 'ipfs://' }); | ||
const accountEvent = accountsFactoryContract.interface.parseLog(logs[0]); | ||
@@ -84,3 +84,3 @@ const accountAddress = accountEvent.args.account; | ||
} | ||
createProject(accountAddress, beneficiaries = [], totalSupply, tokenPrice, projectURI) { | ||
createProject(accountAddress, beneficiaries = [], totalSupply, tokenPrice, projectURI, midcap) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -98,2 +98,3 @@ const [{ projectsFactoryContract }, signerAddress] = yield Promise.all([ | ||
projectURI, | ||
midcap, | ||
}); | ||
@@ -124,2 +125,11 @@ const projectEvent = projectsFactoryContract.interface.parseLog(logs[2]); | ||
} | ||
kickstartProject(projectAddress) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const signerAddress = yield this.getSignerAddress(); | ||
yield this.signAndBroadcast(`/projects/${projectAddress}/kickstart`, { | ||
endUserAddress: signerAddress, | ||
projectAddress, | ||
}); | ||
}); | ||
} | ||
divestInProject(projectAddress, investorAccountAddress, amount) { | ||
@@ -126,0 +136,0 @@ return __awaiter(this, void 0, void 0, function* () { |
{ | ||
"name": "@hemergy/core-sdk", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "TypeScript NPM Module for Hemergy Core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
14372
233