import { FunctionPermission, TargetPermission, TupleScopings } from "./index-CLa7bsge.mjs"; import { BaseContract, ContractTransaction, ContractTransactionResponse, FunctionFragment, TransactionRequest } from "ethers"; import * as ethSdk from "@gnosis-guild/eth-sdk-client"; //#region src/kit/typings.d.ts type PickByValue = { [P in keyof T as T[P] extends Value ? P extends string ? P : never : never]: T[P] }; type Options = { /** Allow sending an Ether value */ send?: boolean; /** Allow making delegate calls */ delegatecall?: boolean; /** Restrict the total Ether value sent using the specified allowance */ etherWithinAllowance?: `0x${string}`; /** Restrict the call rate using the specified allowance */ callWithinAllowance?: `0x${string}`; }; /** We need to skip over functions with "view" state mutability. We do this by matching the ethers ContractMethod type */ interface StateMutatingContractMethod { (): Promise; name: string; fragment: FunctionFragment; getFragment(): FunctionFragment; populateTransaction(): Promise; staticCall(): Promise; send(): Promise; estimateGas(): Promise; staticCallResult(): Promise; } type StateMutatingContractMethods = PickByValue; type BaseOverrides = Omit; type NonPayableOverrides = Omit; type PayableOverrides = Omit; type AllowFunctionParameters = MethodArgs extends [...any, NonPayableOverrides | PayableOverrides] ? never : [...TupleScopings, options?: Options]; type AllowFunctions = { [key in keyof StateMutatingContractMethods]: (...args: AllowFunctionParameters any) ? C[key] : never>>) => FunctionPermission }; type AllowContract = { [EVERYTHING]: (options?: Options) => TargetPermission; } & AllowFunctions; declare const EVERYTHING: unique symbol; type EthSdk = { [key: string]: EthSdk | BaseContract; }; type AllowKit = { [Key in keyof S]: S[Key] extends BaseContract ? AllowContract : S[Key] extends EthSdk ? AllowKit : never }; type SdkGetterName = Exclude; type NetworkName = S extends `get${infer N}Sdk` ? Uncapitalize : never; type AllowKitMap = { [Key in NetworkName]: AllowKit}Sdk`]>> }; declare const allow: AllowKitMap; //#endregion export { EVERYTHING, allow }; //# sourceMappingURL=kit.d.mts.map