@myclique/governance-sdk
Version:
The SDK is provides easy access to the high level interactions to be governance with an Clique DAO.
60 lines (59 loc) • 1.98 kB
TypeScript
import { AxiosInstance, AxiosPromise } from "axios";
import { Context } from "../../Context";
import { IClientRequestCore, ResponseType } from "../interfaces/core";
/**
* Backed request service
*/
export declare class RequestModule implements IClientRequestCore {
axiosInstance: AxiosInstance;
baseServeUrl: string;
constructor(context: Context);
get<T = any>(url: string, params?: {
[key: string]: any;
}): AxiosPromise<ResponseType<T>>;
post<T = any>(url: string, data: {
[key: string]: any;
}, params?: {}): AxiosPromise<ResponseType<T>>;
/**
* get proposal ids by dao
* @param chainId
* @param daoAddress
* @param status
* @param offset
* @param count
* @returns
*/
getProposalList(chainId: number | string, daoAddress: string, status: number | undefined, offset: number, count: number): AxiosPromise<ResponseType<any>>;
/**
* get proposal dev by proposal uuid
* @param uuid
* @returns
*/
getProposalContent(uuid: string): AxiosPromise<ResponseType<any>>;
/**
* get sign of create proposal and vote
* @param chainId
* @param account
* @param daoAddress
* @param signType
* @param proposalId
* @returns
*/
getSign(chainId: number, account: string, daoAddress: string, signType: number, proposalId: number): AxiosPromise<ResponseType<any>>;
/**
* Vote list by proposal id
* @param chainId
* @param daoAddress
* @param proposalId
* @param offset
* @param count
* @returns
*/
getProposalVotesList(chainId: number | string, daoAddress: string, proposalId: number, offset: number, count: number): AxiosPromise<ResponseType<any>>;
/**
* save proposal desc
* @param content proposal desc
* @returns
*/
saveProposalContent(content: string): AxiosPromise<ResponseType<any>>;
}