@allo-team/allo-v2-sdk
Version:
38 lines (37 loc) • 2.27 kB
TypeScript
import { ConstructorArgs, TransactionData } from "../Common/types";
import { CreatePoolArgs, Pool, UpdateMetaDataArgs } from "./types";
export declare class Allo {
private client;
private contract;
private addr;
constructor({ chain, rpc }: ConstructorArgs);
address(): `0x${string}`;
getFeeDenominator(): Promise<bigint>;
isPoolAdmin(poolId: bigint, address: string): Promise<boolean>;
isPoolManager(poolId: bigint, address: string): Promise<boolean>;
getStrategy(poolId: bigint): Promise<string>;
getPercentFee(): Promise<bigint>;
getBaseFee(): Promise<bigint>;
getTreasury(): Promise<string>;
getRegistry(): Promise<string>;
isCloneableStrategy(): Promise<boolean>;
getPool(poolId: bigint): Promise<Pool>;
createPoolWithCustomStrategy({ profileId, strategy, initStrategyData, token, amount, metadata, managers, }: CreatePoolArgs): TransactionData;
createPool({ profileId, strategy, initStrategyData, token, amount, metadata, managers, }: CreatePoolArgs): TransactionData;
updatePoolMetadata({ poolId, metadata, }: UpdateMetaDataArgs): TransactionData;
updateRegistry(registry: `0x${string}`): TransactionData;
updateTreasury(registry: `0x${string}`): TransactionData;
updatePercentFee(percentage: bigint): TransactionData;
updateBaseFee(percentage: bigint): TransactionData;
addToCloneableStrategies(strategy: `0x${string}`): TransactionData;
removeFromCloneableStrategies(strategy: `0x${string}`): TransactionData;
addPoolManager(poolId: bigint, manager: `0x${string}`): TransactionData;
removePoolManager(poolId: bigint, manager: `0x${string}`): TransactionData;
recoverFunds(token: `0x${string}`, recipient: `0x${string}`): TransactionData;
registerRecipient(poolId: bigint, strategyData: `0x${string}`): TransactionData;
batchRegisterRecipient(poolIds: bigint[], strategyData: `0x${string}`[]): TransactionData;
fundPool(poolId: bigint, amount: bigint): TransactionData;
allocate(poolId: bigint, strategyData: `0x${string}`): TransactionData;
batchAllocate(poolIds: bigint[], strategyData: `0x${string}`[]): TransactionData;
distribute(poolId: bigint, recipientId: `0x${string}`[], strategyData: `0x${string}`): TransactionData;
}