client-aftermath-ts-sdk
Version:
Client Aftermath TypeScript SDK
85 lines • 3.77 kB
TypeScript
import { CallerConfig, ObjectId } from "../../types";
import { Caller } from "../../general/utils/caller";
import { SuiAddress } from "../../types";
import { ApiDCAsOwnedBody, ApiDcaTransactionForCreateOrderBody, ApiDcaTransactionForCloseOrderBody, DcaOrderObject, DcaOrdersObject, ApiDcaCreateUserBody } from "./dcaTypes";
import { Transaction } from "@mysten/sui/transactions";
export declare class Dca extends Caller {
static readonly constants: {
gasAmount: bigint;
};
constructor(config?: CallerConfig);
/**
* Fetches the API for dollar cost averaging orders list.
* @deprecated please use `getActiveDcaOrders` and `getPastDcaOrders` instead
*/
getAllDcaOrders(inputs: ApiDCAsOwnedBody): Promise<DcaOrdersObject>;
/**
* Fetches the API for dollar cost averaging active orders list.
* @async
* @param { ApiDCAsOwnedBody } inputs - An object containing the walletAddress.
* @returns { Promise<DcaOrderObject[]> } A promise that resolves to object with array of fetched events for active dca's.
*/
getActiveDcaOrders(inputs: {
walletAddress: SuiAddress;
}): Promise<DcaOrderObject[]>;
/**
* Fetches the API for dollar cost averaging past orders list.
* @async
* @param { ApiDCAsOwnedBody } inputs - An object containing the walletAddress.
* @returns { Promise<DcaOrderObject[]> } A promise that resolves to object with array of fetched events for past dca's.
*/
getPastDcaOrders(inputs: {
walletAddress: SuiAddress;
}): Promise<DcaOrderObject[]>;
/**
* Fetches the API transaction for creating DCA order.
* @param { ApiDcaTransactionForCreateOrderBody } inputs - The inputs for the transaction.
* @returns { Promise<Transaction> } A promise that resolves with the API transaction.
*/
getCreateDcaOrderTx(inputs: ApiDcaTransactionForCreateOrderBody): Promise<Transaction>;
/**
* Fetches the API for canceling DCA order.
* @param inputs - The inputs for the transaction.
* @returns { Promise<boolean> } A promise that resolves with transaction execution status.
*/
closeDcaOrder(inputs: ApiDcaTransactionForCloseOrderBody): Promise<boolean>;
/**
* Method for getting the cancellation dca order message to sign.
* @param inputs - The inputs for the message.
* @returns Message to sign.
*/
closeDcaOrdersMessageToSign(inputs: {
orderIds: ObjectId[];
}): {
action: string;
order_object_ids: string[];
};
/**
* Method for getting the creation user message to sign.
* @param inputs - The inputs for the message.
* @returns Message to sign.
* @deprecated please use method from `userData` package instead
*/
createUserAccountMessageToSign(): {
action: string;
};
/**
* Fetches the API for users public key.
* @async
* @param { ApiDCAsOwnedBody } inputs - An object containing the walletAddress.
* @returns { Promise<string | undefined> } A promise that resolves users public key.
* @deprecated please use method `getUserPublicKey` from `userData` package instead
*/
getUserPublicKey(inputs: {
walletAddress: SuiAddress;
}): Promise<string | undefined>;
/**
* Fetches the API to create users public key.
* @async
* @param { ApiDcaCreateUserBody } inputs - The inputs for creating users public key on BE side.
* @returns { Promise<boolean> } A promise that resolves to result if user pk has been created.
* @deprecated please use method `createUserPublicKey` from `userData` package instead
*/
createUserPublicKey(inputs: ApiDcaCreateUserBody): Promise<boolean>;
}
//# sourceMappingURL=dca.d.ts.map