UNPKG

dp-contract-proxy-kit

Version:

Enable batched transactions and contract account interactions using a unique deterministic Gnosis Safe.

44 lines (43 loc) 1.52 kB
import SafeAppsSDK, { SafeInfo, TxServiceModel } from '@gnosis.pm/safe-apps-sdk'; import { Address } from '../utils/basicTypes'; import { SimpleTransactionResult, StandardTransaction } from '../utils/transactions'; interface SafeTransactionParams { safeTxGas?: number; } declare class SafeAppsSdkConnector { #private; constructor(); /** * Checks if the CPK is running as a Safe App or as a standalone app. * * @returns TRUE if the CPK is running as a Safe App */ get isSafeApp(): boolean; /** * Returns the Safe address connected to the CPK if the CPK is running as a Safe App. * * @returns The Safe address */ get safeAddress(): Address | undefined; /** * Returns an instance of the Safe Apps SDK used by the CPK. * * @returns The Safe Apps SDK instance */ get appsSdk(): SafeAppsSDK; /** * Returns the information of the connected Safe App. * * @returns The information of the connected Safe App */ getSafeInfo(): Promise<SafeInfo>; /** * Returns the transaction response for the given Safe transaction hash. * * @param safeTxHash - The desired Safe transaction hash * @returns The transaction response for the Safe transaction hash */ getBySafeTxHash(safeTxHash: string): Promise<TxServiceModel>; sendTransactions(transactions: StandardTransaction[], params: SafeTransactionParams): Promise<SimpleTransactionResult>; } export default SafeAppsSdkConnector;