nomadex-client
Version:
Client library to programmatically interact with https://voi.nomadex.app
862 lines • 43.2 kB
TypeScript
import type { ABIAppCallArg, AppCallTransactionResult, AppCallTransactionResultOfType, AppCompilationResult, AppReference, AppStorageSchema, CoreAppCallArgs, RawAppCallArgs, TealTemplateParams } from '@algorandfoundation/algokit-utils/types/app';
import type { AppClientCallCoreParams, AppClientCompilationParams, AppClientDeployCoreParams, AppDetails, ApplicationClient } from '@algorandfoundation/algokit-utils/types/app-client';
import type { AppSpec } from '@algorandfoundation/algokit-utils/types/app-spec';
import type { SendTransactionResult, TransactionToSign, SendTransactionFrom, SendTransactionParams } from '@algorandfoundation/algokit-utils/types/transaction';
import type { ABIResult, TransactionWithSigner } from 'algosdk';
import { Algodv2, OnApplicationComplete, Transaction, AtomicTransactionComposer, modelsv2 } from 'algosdk';
export declare const APP_SPEC: AppSpec;
/**
* Defines an onCompletionAction of 'no_op'
*/
export type OnCompleteNoOp = {
onCompleteAction?: 'no_op' | OnApplicationComplete.NoOpOC;
};
/**
* Defines an onCompletionAction of 'opt_in'
*/
export type OnCompleteOptIn = {
onCompleteAction: 'opt_in' | OnApplicationComplete.OptInOC;
};
/**
* Defines an onCompletionAction of 'close_out'
*/
export type OnCompleteCloseOut = {
onCompleteAction: 'close_out' | OnApplicationComplete.CloseOutOC;
};
/**
* Defines an onCompletionAction of 'delete_application'
*/
export type OnCompleteDelApp = {
onCompleteAction: 'delete_application' | OnApplicationComplete.DeleteApplicationOC;
};
/**
* Defines an onCompletionAction of 'update_application'
*/
export type OnCompleteUpdApp = {
onCompleteAction: 'update_application' | OnApplicationComplete.UpdateApplicationOC;
};
/**
* A state record containing a single unsigned integer
*/
export type IntegerState = {
/**
* Gets the state value as a BigInt.
*/
asBigInt(): bigint;
/**
* Gets the state value as a number.
*/
asNumber(): number;
};
/**
* A state record containing binary data
*/
export type BinaryState = {
/**
* Gets the state value as a Uint8Array
*/
asByteArray(): Uint8Array;
/**
* Gets the state value as a string
*/
asString(): string;
};
export type AppCreateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult> & AppReference;
export type AppUpdateCallTransactionResult = AppCallTransactionResult & Partial<AppCompilationResult>;
export type AppClientComposeCallCoreParams = Omit<AppClientCallCoreParams, 'sendParams'> & {
sendParams?: Omit<SendTransactionParams, 'skipSending' | 'atc' | 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources'>;
};
export type AppClientComposeExecuteParams = Pick<SendTransactionParams, 'skipWaiting' | 'maxRoundsToWaitForConfirmation' | 'populateAppCallResources' | 'suppressLog'>;
export type IncludeSchema = {
/**
* Any overrides for the storage schema to request for the created app; by default the schema indicated by the app spec is used.
*/
schema?: Partial<AppStorageSchema>;
};
/**
* Defines the types of available calls and state of the PoolFactory smart contract.
*/
export type PoolFactory = {
/**
* Maps method signatures / names to their argument and return types.
*/
methods: Record<'updateApplication()void' | 'updateApplication', {
argsObj: {};
argsTuple: [];
returns: void;
}> & Record<'deleteApplication()void' | 'deleteApplication', {
argsObj: {};
argsTuple: [];
returns: void;
}> & Record<'manager()address' | 'manager', {
argsObj: {};
argsTuple: [];
returns: string;
}> & Record<'grant(address)void' | 'grant', {
argsObj: {
manager: string;
};
argsTuple: [manager: string];
returns: void;
}> & Record<'createApplication()void' | 'createApplication', {
argsObj: {};
argsTuple: [];
returns: void;
}> & Record<'createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64' | 'createPool', {
argsObj: {
payTxn: TransactionToSign | Transaction | Promise<SendTransactionResult>;
name: Uint8Array;
symbol: Uint8Array;
alphaId: bigint | number;
alphaType: number;
betaId: bigint | number;
betaType: number;
swapFee: bigint | number;
};
argsTuple: [payTxn: TransactionToSign | Transaction | Promise<SendTransactionResult>, name: Uint8Array, symbol: Uint8Array, alphaId: bigint | number, alphaType: number, betaId: bigint | number, betaType: number, swapFee: bigint | number];
returns: bigint;
}> & Record<'poolBootstrap(uint64)void' | 'poolBootstrap', {
argsObj: {
poolId: bigint | number;
};
argsTuple: [poolId: bigint | number];
returns: void;
}> & Record<'setFee(uint64)bool' | 'setFee', {
argsObj: {
fee: bigint | number;
};
argsTuple: [fee: bigint | number];
returns: boolean;
}> & Record<'setPlatformFee(uint256)bool' | 'setPlatformFee', {
argsObj: {
fee: bigint | number;
};
argsTuple: [fee: bigint | number];
returns: boolean;
}> & Record<'setPoolManager(uint64,address)void' | 'setPoolManager', {
argsObj: {
poolId: bigint | number;
manager: string;
};
argsTuple: [poolId: bigint | number, manager: string];
returns: void;
}> & Record<'setPoolFee(uint64,uint256)void' | 'setPoolFee', {
argsObj: {
poolId: bigint | number;
fee: bigint | number;
};
argsTuple: [poolId: bigint | number, fee: bigint | number];
returns: void;
}> & Record<'withdraw(address,uint256,(uint64,uint64))void' | 'withdraw', {
argsObj: {
to: string;
amount: bigint | number;
id: [bigint | number, bigint | number];
};
argsTuple: [to: string, amount: bigint | number, id: [bigint | number, bigint | number]];
returns: void;
}> & Record<'noop(uint64)void' | 'noop', {
argsObj: {
n: bigint | number;
};
argsTuple: [n: bigint | number];
returns: void;
}>;
/**
* Defines the shape of the global and local state of the application.
*/
state: {
global: {
warden?: BinaryState;
bootstrapFee?: IntegerState;
platformFee?: BinaryState;
};
};
};
/**
* Defines the possible abi call signatures
*/
export type PoolFactorySig = keyof PoolFactory['methods'];
/**
* Defines an object containing all relevant parameters for a single call to the contract. Where TSignature is undefined, a bare call is made
*/
export type TypedCallParams<TSignature extends PoolFactorySig | undefined> = {
method: TSignature;
methodArgs: TSignature extends undefined ? undefined : Array<ABIAppCallArg | undefined>;
} & AppClientCallCoreParams & CoreAppCallArgs;
/**
* Defines the arguments required for a bare call
*/
export type BareCallArgs = Omit<RawAppCallArgs, keyof CoreAppCallArgs>;
/**
* Maps a method signature from the PoolFactory smart contract to the method's arguments in either tuple of struct form
*/
export type MethodArgs<TSignature extends PoolFactorySig> = PoolFactory['methods'][TSignature]['argsObj' | 'argsTuple'];
/**
* Maps a method signature from the PoolFactory smart contract to the method's return type
*/
export type MethodReturn<TSignature extends PoolFactorySig> = PoolFactory['methods'][TSignature]['returns'];
/**
* A factory for available 'create' calls
*/
export type PoolFactoryCreateCalls = (typeof PoolFactoryCallFactory)['create'];
/**
* Defines supported create methods for this smart contract
*/
export type PoolFactoryCreateCallParams = (TypedCallParams<'createApplication()void'> & (OnCompleteNoOp));
/**
* A factory for available 'update' calls
*/
export type PoolFactoryUpdateCalls = (typeof PoolFactoryCallFactory)['update'];
/**
* Defines supported update methods for this smart contract
*/
export type PoolFactoryUpdateCallParams = TypedCallParams<'updateApplication()void'>;
/**
* A factory for available 'delete' calls
*/
export type PoolFactoryDeleteCalls = (typeof PoolFactoryCallFactory)['delete'];
/**
* Defines supported delete methods for this smart contract
*/
export type PoolFactoryDeleteCallParams = TypedCallParams<'deleteApplication()void'>;
/**
* Defines arguments required for the deploy method.
*/
export type PoolFactoryDeployArgs = {
deployTimeParams?: TealTemplateParams;
/**
* A delegate which takes a create call factory and returns the create call params for this smart contract
*/
createCall?: (callFactory: PoolFactoryCreateCalls) => PoolFactoryCreateCallParams;
/**
* A delegate which takes a update call factory and returns the update call params for this smart contract
*/
updateCall?: (callFactory: PoolFactoryUpdateCalls) => PoolFactoryUpdateCallParams;
/**
* A delegate which takes a delete call factory and returns the delete call params for this smart contract
*/
deleteCall?: (callFactory: PoolFactoryDeleteCalls) => PoolFactoryDeleteCallParams;
};
/**
* Exposes methods for constructing all available smart contract calls
*/
export declare abstract class PoolFactoryCallFactory {
/**
* Gets available create call factories
*/
static get create(): {
/**
* Constructs a create call for the PoolFactory smart contract using the createApplication()void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
createApplication(args: MethodArgs<"createApplication()void">, params?: AppClientCallCoreParams & CoreAppCallArgs & AppClientCompilationParams & (OnCompleteNoOp)): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
deployTimeParams?: TealTemplateParams;
updatable?: boolean;
deletable?: boolean;
onCompleteAction?: "no_op" | OnApplicationComplete.NoOpOC;
method: "createApplication()void";
methodArgs: any[];
};
};
/**
* Gets available update call factories
*/
static get update(): {
/**
* Constructs an update call for the PoolFactory smart contract using the updateApplication()void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
updateApplication(args: MethodArgs<"updateApplication()void">, params?: AppClientCallCoreParams & CoreAppCallArgs & AppClientCompilationParams): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
deployTimeParams?: TealTemplateParams;
updatable?: boolean;
deletable?: boolean;
method: "updateApplication()void";
methodArgs: any[];
};
};
/**
* Gets available delete call factories
*/
static get delete(): {
/**
* Constructs a delete call for the PoolFactory smart contract using the deleteApplication()void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
deleteApplication(args: MethodArgs<"deleteApplication()void">, params?: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "deleteApplication()void";
methodArgs: any[];
};
};
/**
* Constructs a no op call for the manager()address ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static manager(args: MethodArgs<'manager()address'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "manager()address";
methodArgs: any[];
};
/**
* Constructs a no op call for the grant(address)void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static grant(args: MethodArgs<'grant(address)void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "grant(address)void";
methodArgs: string[];
};
/**
* Constructs a no op call for the createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64 ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static createPool(args: MethodArgs<'createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64";
methodArgs: (number | bigint | Uint8Array<ArrayBufferLike> | Transaction | TransactionToSign | Promise<SendTransactionResult>)[];
};
/**
* Constructs a no op call for the poolBootstrap(uint64)void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static poolBootstrap(args: MethodArgs<'poolBootstrap(uint64)void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "poolBootstrap(uint64)void";
methodArgs: (number | bigint)[];
};
/**
* Constructs a no op call for the setFee(uint64)bool ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static setFee(args: MethodArgs<'setFee(uint64)bool'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "setFee(uint64)bool";
methodArgs: (number | bigint)[];
};
/**
* Constructs a no op call for the setPlatformFee(uint256)bool ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static setPlatformFee(args: MethodArgs<'setPlatformFee(uint256)bool'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "setPlatformFee(uint256)bool";
methodArgs: (number | bigint)[];
};
/**
* Constructs a no op call for the setPoolManager(uint64,address)void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static setPoolManager(args: MethodArgs<'setPoolManager(uint64,address)void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "setPoolManager(uint64,address)void";
methodArgs: (string | number | bigint)[];
};
/**
* Constructs a no op call for the setPoolFee(uint64,uint256)void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static setPoolFee(args: MethodArgs<'setPoolFee(uint64,uint256)void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "setPoolFee(uint64,uint256)void";
methodArgs: (number | bigint)[];
};
/**
* Constructs a no op call for the withdraw(address,uint256,(uint64,uint64))void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static withdraw(args: MethodArgs<'withdraw(address,uint256,(uint64,uint64))void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "withdraw(address,uint256,(uint64,uint64))void";
methodArgs: (string | number | bigint | [number | bigint, number | bigint])[];
};
/**
* Constructs a no op call for the noop(uint64)void ABI method
*
* @param args Any args for the contract call
* @param params Any additional parameters for the call
* @returns A TypedCallParams object for the call
*/
static noop(args: MethodArgs<'noop(uint64)void'>, params: AppClientCallCoreParams & CoreAppCallArgs): {
sender?: SendTransactionFrom;
note?: import("@algorandfoundation/algokit-utils/types/transaction").TransactionNote;
sendParams?: SendTransactionParams;
lease?: string | Uint8Array;
boxes?: (import("algosdk").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxReference | import("@algorandfoundation/algokit-utils/types/app").BoxIdentifier)[];
accounts?: (string | import("algosdk").Address)[];
apps?: number[];
assets?: number[];
rekeyTo?: SendTransactionFrom | string;
method: "noop(uint64)void";
methodArgs: (number | bigint)[];
};
}
/**
* A client to make calls to the PoolFactory smart contract
*/
export declare class PoolFactoryClient {
private algod;
/**
* The underlying `ApplicationClient` for when you want to have more flexibility
*/
readonly appClient: ApplicationClient;
private readonly sender;
/**
* Creates a new instance of `PoolFactoryClient`
*
* @param appDetails appDetails The details to identify the app to deploy
* @param algod An algod client instance
*/
constructor(appDetails: AppDetails, algod: Algodv2);
/**
* Checks for decode errors on the AppCallTransactionResult and maps the return value to the specified generic type
*
* @param result The AppCallTransactionResult to be mapped
* @param returnValueFormatter An optional delegate to format the return value if required
* @returns The smart contract response with an updated return value
*/
protected mapReturnValue<TReturn, TResult extends AppCallTransactionResult = AppCallTransactionResult>(result: AppCallTransactionResult, returnValueFormatter?: (value: any) => TReturn): AppCallTransactionResultOfType<TReturn> & TResult;
/**
* Calls the ABI method with the matching signature using an onCompletion code of NO_OP
*
* @param typedCallParams An object containing the method signature, args, and any other relevant parameters
* @param returnValueFormatter An optional delegate which when provided will be used to map non-undefined return values to the target type
* @returns The result of the smart contract call
*/
call<TSignature extends keyof PoolFactory['methods']>(typedCallParams: TypedCallParams<TSignature>, returnValueFormatter?: (value: any) => MethodReturn<TSignature>): Promise<AppCallTransactionResultOfType<MethodReturn<TSignature>> & AppCallTransactionResult>;
/**
* Idempotently deploys the PoolFactory smart contract.
*
* @param params The arguments for the contract calls and any additional parameters for the call
* @returns The deployment result
*/
deploy(params?: PoolFactoryDeployArgs & AppClientDeployCoreParams & IncludeSchema): ReturnType<ApplicationClient['deploy']>;
/**
* Gets available create methods
*/
get create(): {
/**
* Creates a new instance of the PoolFactory smart contract using the createApplication()void ABI method.
*
* @param args The arguments for the smart contract call
* @param params Any additional parameters for the call
* @returns The create result
*/
createApplication(args: MethodArgs<"createApplication()void">, params?: AppClientCallCoreParams & AppClientCompilationParams & IncludeSchema & CoreAppCallArgs & (OnCompleteNoOp)): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult & Partial<AppCompilationResult> & AppReference>;
};
/**
* Gets available update methods
*/
get update(): {
/**
* Updates an existing instance of the PoolFactory smart contract using the updateApplication()void ABI method.
*
* @param args The arguments for the smart contract call
* @param params Any additional parameters for the call
* @returns The update result
*/
updateApplication(args: MethodArgs<"updateApplication()void">, params?: AppClientCallCoreParams & AppClientCompilationParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult & Partial<AppCompilationResult>>;
};
/**
* Gets available delete methods
*/
get delete(): {
/**
* Deletes an existing instance of the PoolFactory smart contract using the deleteApplication()void ABI method.
*
* @param args The arguments for the smart contract call
* @param params Any additional parameters for the call
* @returns The delete result
*/
deleteApplication(args: MethodArgs<"deleteApplication()void">, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
};
/**
* Makes a clear_state call to an existing instance of the PoolFactory smart contract.
*
* @param args The arguments for the bare call
* @returns The clear_state result
*/
clearState(args?: BareCallArgs & AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResult>;
/**
* Calls the manager()address ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
manager(args: MethodArgs<'manager()address'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<string> & AppCallTransactionResult>;
/**
* Calls the grant(address)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
grant(args: MethodArgs<'grant(address)void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Calls the createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64 ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
createPool(args: MethodArgs<'createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<bigint> & AppCallTransactionResult>;
/**
* Calls the poolBootstrap(uint64)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
poolBootstrap(args: MethodArgs<'poolBootstrap(uint64)void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Calls the setFee(uint64)bool ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
setFee(args: MethodArgs<'setFee(uint64)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<boolean> & AppCallTransactionResult>;
/**
* Calls the setPlatformFee(uint256)bool ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
setPlatformFee(args: MethodArgs<'setPlatformFee(uint256)bool'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<boolean> & AppCallTransactionResult>;
/**
* Calls the setPoolManager(uint64,address)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
setPoolManager(args: MethodArgs<'setPoolManager(uint64,address)void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Calls the setPoolFee(uint64,uint256)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
setPoolFee(args: MethodArgs<'setPoolFee(uint64,uint256)void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Calls the withdraw(address,uint256,(uint64,uint64))void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
withdraw(args: MethodArgs<'withdraw(address,uint256,(uint64,uint64))void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Calls the noop(uint64)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The result of the call
*/
noop(args: MethodArgs<'noop(uint64)void'>, params?: AppClientCallCoreParams & CoreAppCallArgs): Promise<AppCallTransactionResultOfType<void> & AppCallTransactionResult>;
/**
* Extracts a binary state value out of an AppState dictionary
*
* @param state The state dictionary containing the state value
* @param key The key of the state value
* @returns A BinaryState instance containing the state value, or undefined if the key was not found
*/
private static getBinaryState;
/**
* Extracts a integer state value out of an AppState dictionary
*
* @param state The state dictionary containing the state value
* @param key The key of the state value
* @returns An IntegerState instance containing the state value, or undefined if the key was not found
*/
private static getIntegerState;
/**
* Returns the smart contract's global state wrapped in a strongly typed accessor with options to format the stored value
*/
getGlobalState(): Promise<PoolFactory['state']['global']>;
compose(): PoolFactoryComposer;
}
export type PoolFactoryComposer<TReturns extends [...any[]] = []> = {
/**
* Calls the manager()address ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
manager(args: MethodArgs<'manager()address'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'manager()address'>]>;
/**
* Calls the grant(address)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
grant(args: MethodArgs<'grant(address)void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'grant(address)void'>]>;
/**
* Calls the createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64 ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
createPool(args: MethodArgs<'createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'createPool(pay,byte[32],byte[8],uint64,uint8,uint64,uint8,uint256)uint64'>]>;
/**
* Calls the poolBootstrap(uint64)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
poolBootstrap(args: MethodArgs<'poolBootstrap(uint64)void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'poolBootstrap(uint64)void'>]>;
/**
* Calls the setFee(uint64)bool ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
setFee(args: MethodArgs<'setFee(uint64)bool'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'setFee(uint64)bool'>]>;
/**
* Calls the setPlatformFee(uint256)bool ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
setPlatformFee(args: MethodArgs<'setPlatformFee(uint256)bool'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'setPlatformFee(uint256)bool'>]>;
/**
* Calls the setPoolManager(uint64,address)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
setPoolManager(args: MethodArgs<'setPoolManager(uint64,address)void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'setPoolManager(uint64,address)void'>]>;
/**
* Calls the setPoolFee(uint64,uint256)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
setPoolFee(args: MethodArgs<'setPoolFee(uint64,uint256)void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'setPoolFee(uint64,uint256)void'>]>;
/**
* Calls the withdraw(address,uint256,(uint64,uint64))void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
withdraw(args: MethodArgs<'withdraw(address,uint256,(uint64,uint64))void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'withdraw(address,uint256,(uint64,uint64))void'>]>;
/**
* Calls the noop(uint64)void ABI method.
*
* @param args The arguments for the contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
noop(args: MethodArgs<'noop(uint64)void'>, params?: AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, MethodReturn<'noop(uint64)void'>]>;
/**
* Gets available update methods
*/
readonly update: {
/**
* Updates an existing instance of the PoolFactory smart contract using the updateApplication()void ABI method.
*
* @param args The arguments for the smart contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
updateApplication(args: MethodArgs<'updateApplication()void'>, params?: AppClientComposeCallCoreParams & AppClientCompilationParams): PoolFactoryComposer<[...TReturns, MethodReturn<'updateApplication()void'>]>;
};
/**
* Gets available delete methods
*/
readonly delete: {
/**
* Deletes an existing instance of the PoolFactory smart contract using the deleteApplication()void ABI method.
*
* @param args The arguments for the smart contract call
* @param params Any additional parameters for the call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
deleteApplication(args: MethodArgs<'deleteApplication()void'>, params?: AppClientComposeCallCoreParams): PoolFactoryComposer<[...TReturns, MethodReturn<'deleteApplication()void'>]>;
};
/**
* Makes a clear_state call to an existing instance of the PoolFactory smart contract.
*
* @param args The arguments for the bare call
* @returns The typed transaction composer so you can fluently chain multiple calls or call execute to execute all queued up transactions
*/
clearState(args?: BareCallArgs & AppClientComposeCallCoreParams & CoreAppCallArgs): PoolFactoryComposer<[...TReturns, undefined]>;
/**
* Adds a transaction to the composer
*
* @param txn One of: A TransactionWithSigner object (returned as is), a TransactionToSign object (signer is obtained from the signer property), a Transaction object (signer is extracted from the defaultSender parameter), an async SendTransactionResult returned by one of algokit utils helpers (signer is obtained from the defaultSender parameter)
* @param defaultSender The default sender to be used to obtain a signer where the object provided to the transaction parameter does not include a signer.
*/
addTransaction(txn: TransactionWithSigner | TransactionToSign | Transaction | Promise<SendTransactionResult>, defaultSender?: SendTransactionFrom): PoolFactoryComposer<TReturns>;
/**
* Returns the underlying AtomicTransactionComposer instance
*/
atc(): Promise<AtomicTransactionComposer>;
/**
* Simulates the transaction group and returns the result
*/
simulate(options?: SimulateOptions): Promise<PoolFactoryComposerSimulateResult<TReturns>>;
/**
* Executes the transaction group and returns the results
*/
execute(sendParams?: AppClientComposeExecuteParams): Promise<PoolFactoryComposerResults<TReturns>>;
};
export type SimulateOptions = Omit<ConstructorParameters<typeof modelsv2.SimulateRequest>[0], 'txnGroups'>;
export type PoolFactoryComposerSimulateResult<TReturns extends [...any[]]> = {
returns: TReturns;
methodResults: ABIResult[];
simulateResponse: modelsv2.SimulateResponse;
};
export type PoolFactoryComposerResults<TReturns extends [...any[]]> = {
returns: TReturns;
groupId: string;
txIds: string[];
transactions: Transaction[];
};
//# sourceMappingURL=PoolFactoryClient.d.ts.map