UNPKG

@kanalabs/solver-lp-sdk

Version:
82 lines (81 loc) 2.73 kB
import { Aptos, Account, AccountAddress, AnyRawTransaction, AccountAuthenticator, PendingTransactionResponse } from '@aptos-labs/ts-sdk'; import { SdkOptions, WalletProviderLike, ApiResponse, TransactionPayload, TransactionOptions } from './interfaces'; import { SuiClient, SuiTransactionBlockResponse } from '@mysten/sui/client'; import { Transaction } from '@mysten/sui/transactions'; import { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519'; export declare class PaymasterSdk { wallet?: Account; suiwallet: Ed25519Keypair; aptosClient: Aptos; suiClient: SuiClient; suiAddress: string; private projectKey; private baseUrl; private network; private chain; private apiKey; constructor(walletProvider: WalletProviderLike, apiKey: string, optionsLike: SdkOptions); initAccount(args?: { address?: string; coin?: string; }): Promise<any>; addFeePayer(): Promise<any>; addToWhitelist(args?: { address?: string; }): Promise<ApiResponse>; disableUser(args?: { address?: string; }): Promise<ApiResponse>; enableUser(args?: { address?: string; }): Promise<ApiResponse>; isWhitelisted(args?: { address?: string; }): Promise<ApiResponse>; sponsoredTxn(args: { data: TransactionPayload; options?: TransactionOptions; }): Promise<PendingTransactionResponse>; sponseredSuiTxn(args: { transactionBlock: Transaction; }): Promise<SuiTransactionBlockResponse>; sponserLiquidity(args: { recieptant: string; coinType: string; amount: string; feePayer?: string; }): Promise<string>; swapTokens(args: { sponserAddress: string; fromToken: string; amountIn: string; data: TransactionPayload | string; options?: TransactionOptions; }): Promise<string>; deposit(args: { senderAddress: string; reciever: string; coinType: string; amount: string; splitCount?: string; }): Promise<string>; sponsoredTxnWithSenderAuth(args: { transaction: AnyRawTransaction; senderAuth: AccountAuthenticator; additionalAuthenticators?: AccountAuthenticator[]; additionalAddresses?: AccountAddress[]; }): Promise<PendingTransactionResponse>; addWhitelistFunctions(args: { functions: { module_name: string; function_name: string; module_address: string; }[]; }): Promise<ApiResponse>; addModuleWhitelistFunctions(args: { functions: { module_address: string; }[]; }): Promise<ApiResponse>; private getCommonHeaders; }