@rep3/rep3-sdk
Version:
`rep3-sdk` is the ts package for projects to integrate rep3-protocol and services in their projects. This documentation will provide various ways and code snippets for the same. To know more about the protocol head over to our [docs](https://docs.rep3.gg/
52 lines (51 loc) • 3.13 kB
TypeScript
import { IContract, IContractAbi, IContractAddress, IContractFactory, IMembershipVoucherV1, IMembershipVoucherV2, IConfig } from '../types';
import Web3 from 'web3';
declare class Rep3 {
signer: any;
signerAddress: string;
config: IConfig;
ContractAbi: IContractAbi;
ContractAddress: IContractAddress;
chainId: number;
Instance: IContract;
contractInfo: IContractFactory;
ProxyContractInstance: any;
biconomyInstance: any;
networkWeb3: any;
walletWeb3: any;
packageInitialised: boolean;
constructor(getSigner: any, walletProvider: typeof Web3.givenProvider, chainId: number, contractAddressConfig: IContractAddress | any, config: IConfig | undefined);
createInstance: () => Promise<typeof Rep3>;
deploy: (daoName: string, daoSymbol: string, approverAddresses: [string], transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
_generateEnd: (to: [string]) => number[];
createMembershipVoucher: (proxyAddress: string, levels: [number], categories: [number], to: [string], tokenUris: string, signType?: string) => Promise<{
signature: any;
} | {
signature: any;
data: number[];
end: any;
to: [string];
tokenUris: string;
} | {
signature: any;
levelCategory: number[];
end: any;
to: [string];
tokenUris: string;
}>;
claimMembership: (contractAddress: string, voucher: IMembershipVoucherV1 | IMembershipVoucherV2, approvedAddressIndex: number, signType: string | undefined, gas: number, gasLimit: number, transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
upgradeMembership: (contractAddress: string, tokenId: number, level: number, category: number, metaDataHash: string, gas: number, gasLimit: number, transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
createAssociationBadgeVoucher: (proxyAddress: string, memberTokenIds: [string], badgeTypes: [number], tokenUri: [string], nonces: [string], data: [number]) => Promise<{
signature: any;
index: number;
memberTokenIds: [string];
type_: [number];
tokenUri: string;
data: [number];
nonces: [string];
}>;
claimAssociationBadges: (contractAddress: string, voucher: any, memberTokenId: number, approveIndex: [number], gas: number, gasLimit: number, transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
updateApprovers: (approverAddresses: [string], contractAddress: string, subgraphUrl: string, gas: number, gasLimit: number, transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
directIssueBadgeBatch: (contractAddress: string, memberTokenIds: [number], type_: [number], data: [number], arrayOfTokenUri: [string], signType: string, gas: number, gasLimit: number, transactionHashCallback: Function, callbackFunction?: Function | undefined) => Promise<void>;
}
export default Rep3;