@0xsplits/splits-sdk
Version:
SDK for the 0xSplits protocol
82 lines (81 loc) • 4.46 kB
TypeScript
import { Address, GetContractReturnType, Hash, Hex, Log } from 'viem';
import { BaseClientMixin, BaseGasEstimatesMixin, BaseTransactions } from './base';
import { passThroughWalletAbi } from '../constants/abi/passThroughWallet';
import type { CallData, CreatePassThroughWalletConfig, PassThroughTokensConfig, PassThroughWalletExecCallsConfig, PassThroughWalletPauseConfig, SetPassThroughConfig, SplitsClientConfig, SplitsPublicClient, TransactionConfig, TransactionFormat } from '../types';
type PassThroughWalletAbi = typeof passThroughWalletAbi;
declare class PassThroughWalletTransactions extends BaseTransactions {
constructor(transactionClientArgs: SplitsClientConfig & TransactionConfig);
protected _createPassThroughWalletTransaction({ owner, paused, passThrough, chainId, transactionOverrides, }: CreatePassThroughWalletConfig): Promise<TransactionFormat>;
protected _passThroughTokensTransaction({ passThroughWalletAddress, tokens, transactionOverrides, }: PassThroughTokensConfig): Promise<TransactionFormat>;
protected _setPassThroughTransaction({ passThroughWalletAddress, passThrough, transactionOverrides, }: SetPassThroughConfig): Promise<TransactionFormat>;
protected _setPausedTransaction({ passThroughWalletAddress, paused, transactionOverrides, }: PassThroughWalletPauseConfig): Promise<TransactionFormat>;
protected _execCallsTransaction({ passThroughWalletAddress, calls, transactionOverrides, }: PassThroughWalletExecCallsConfig): Promise<TransactionFormat>;
private _requireOwner;
protected _getPassThroughWalletContract(passThroughWallet: string, chainId: number): GetContractReturnType<PassThroughWalletAbi, SplitsPublicClient>;
}
export declare class PassThroughWalletClient extends PassThroughWalletTransactions {
readonly eventTopics: {
[key: string]: Hex[];
};
readonly callData: PassThroughWalletCallData;
readonly estimateGas: PassThroughWalletGasEstimates;
constructor(clientArgs: SplitsClientConfig);
_submitCreatePassThroughWalletTransaction(createPassThroughArgs: CreatePassThroughWalletConfig): Promise<{
txHash: Hash;
}>;
createPassThroughWallet(createPassThroughArgs: CreatePassThroughWalletConfig): Promise<{
passThroughWalletAddress: Address;
event: Log;
}>;
_submitPassThroughTokensTransaction(passThroughArgs: PassThroughTokensConfig): Promise<{
txHash: Hash;
}>;
passThroughTokens(passThroughArgs: PassThroughTokensConfig): Promise<{
event: Log;
}>;
_submitSetPassThroughTransaction(args: SetPassThroughConfig): Promise<{
txHash: Hash;
}>;
setPassThrough(args: SetPassThroughConfig): Promise<{
event: Log;
}>;
_submitSetPausedTransaction(pauseArgs: PassThroughWalletPauseConfig): Promise<{
txHash: Hash;
}>;
setPaused(pauseArgs: PassThroughWalletPauseConfig): Promise<{
event: Log;
}>;
_submitExecCallsTransaction(args: PassThroughWalletExecCallsConfig): Promise<{
txHash: Hash;
}>;
execCalls(args: PassThroughWalletExecCallsConfig): Promise<{
event: Log;
}>;
getPassThrough({ passThroughWalletAddress, chainId, }: {
passThroughWalletAddress: string;
chainId?: number;
}): Promise<{
passThrough: string;
}>;
}
export interface PassThroughWalletClient extends BaseClientMixin {
}
declare class PassThroughWalletGasEstimates extends PassThroughWalletTransactions {
constructor(clientArgs: SplitsClientConfig);
createPassThroughWallet(args: CreatePassThroughWalletConfig): Promise<bigint>;
passThroughTokens(args: PassThroughTokensConfig): Promise<bigint>;
setPassThrough(args: SetPassThroughConfig): Promise<bigint>;
setPaused(args: PassThroughWalletPauseConfig): Promise<bigint>;
execCalls(args: PassThroughWalletExecCallsConfig): Promise<bigint>;
}
interface PassThroughWalletGasEstimates extends BaseGasEstimatesMixin {
}
declare class PassThroughWalletCallData extends PassThroughWalletTransactions {
constructor(clientArgs: SplitsClientConfig);
createPassThroughWallet(args: CreatePassThroughWalletConfig): Promise<CallData>;
passThroughTokens(args: PassThroughTokensConfig): Promise<CallData>;
setPassThrough(args: SetPassThroughConfig): Promise<CallData>;
setPaused(args: PassThroughWalletPauseConfig): Promise<CallData>;
execCalls(args: PassThroughWalletExecCallsConfig): Promise<CallData>;
}
export {};