Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lidangzzz committed May 3, 2023
1 parent f229f3d commit 0ad0f32
Show file tree
Hide file tree
Showing 57 changed files with 2,199 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ cache
artifacts

# Docusaurus files
darc-docs/.docusaurus
darc-docs/.docusaurus
darc-docs/build
74 changes: 74 additions & 0 deletions darc-js/dist/DARC/DARC.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import { ethers } from 'ethers';
import * as darcBinary from '../darcBinary/darcBinary';
export declare type InitParam = {
address: string;
version: darcBinary.DARC_VERSION;
wallet?: ethers.Wallet;
provider?: ethers.providers.Provider;
};
export declare type TokenInfo = {
votingWeight: BigInt;
dividendWeight: BigInt;
tokenInfo: string;
totalSupply: BigInt;
};
export declare type MemberInfo = {
bIsInitialized: boolean;
bIsSuspened: boolean;
name: string;
role: bigint;
};
/**
* The DARC class is used to interact with the DARC contract.
*/
export declare class DARC {
private darcContract;
private darcAddress;
private darcVersion;
private wallet;
private provider;
/**
* The constructor of the DARC class.
* @param param: the init param including the address, version, wallet and/or provider.
*/
constructor(param: InitParam);
/**
* Run the program on the DARC contract.
* @param program: the program to be run.
*/
entrance(program: any): Promise<void>;
/**
* Below are all DARC's dashboard functions, read parameters from the DARC contract.
*/
getTokenOwners(tokenClass: BigInt): Promise<string[]>;
getTokenInfo(tokenClass: BigInt): Promise<TokenInfo>;
/**
* Return the address of the DARC contract.
* @returns the address of the DARC contract.
*/
address(): string;
/**
* Return the number of token classes.
* @returns the number of token classes.
*/
getNumberOfTokenClasses(): Promise<BigInt>;
/**
* Return the balance of the owner for the token class.
* @param tokenClass the index of the token class.
* @param owner the address of the owner.
* @returns the balance of the owner for the token class.
*/
getTokenOwnerBalance(tokenClass: BigInt, owner: string): Promise<BigInt>;
/**
* Get the DARC plugins.
* @returns the number of token classes.
*/
getPluginInfo(): Promise<any>;
/**
* Get the DARC member list.
* @returns the DARC member list.
*/
getMemberList(): Promise<string[]>;
getMemberInfo(): Promise<any>;
}
//# sourceMappingURL=DARC.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/DARC/DARC.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

126 changes: 126 additions & 0 deletions darc-js/dist/DARC/DARC.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/DARC/DARC.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions darc-js/dist/codeGenerator/codeGenerator.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare function codeGenerator(): void;
//# sourceMappingURL=codeGenerator.d.ts.map
1 change: 1 addition & 0 deletions darc-js/dist/codeGenerator/codeGenerator.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions darc-js/dist/codeGenerator/codeGenerator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions darc-js/dist/codeGenerator/codeGenerator.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0ad0f32

Please sign in to comment.