import { WalletWithStarknetFeatures } from "@starknet-io/get-starknet-core"; import { AddDeclareTransactionParameters, AddStarknetChainParameters, Events, RpcTypeToMessageMap, SwitchStarknetChainParameters, TypedData, WatchAssetParameters } from "@starknet-io/types-js"; import { Address, Address as Address$1, Chain } from "@starknet-start/chains"; import { GetStarknetProvider, useStarknetProvider } from "@starknet-io/get-starknet-modal"; import { ChainPaymasterFactory } from "@starknet-start/providers/paymaster"; import { InfiniteData, QueryClient, QueryKey, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutationOptions, UseMutationResult, UseQueryOptions, UseQueryResult } from "@tanstack/react-query"; import React$1 from "react"; import { Abi as Abi$1, AccountInterface, BigNumberish, BlockNumber, Call, CallResult, CompiledContract, CompiledSierraCasm, Contract, DeployContractResponse, EstimateFeeResponseOverhead, GetBlockResponse, GetTransactionReceiptResponse, InvokeFunctionResponse, Nonce, PaymasterDetails, PaymasterFeeEstimate, PaymasterInterface, ProviderInterface, RawArgs, TokenData, UniversalDetails, constants } from "starknet"; import * as react_jsx_runtime0 from "react/jsx-runtime"; import { CallQueryArgs, ConnectVariables, DeployAccountVariables, EstimateFeesArgs, EventsQueryKeyParams, PaymasterEstimateFeesArgs, RequestArgs, RequestMessageTypes, RequestResult, StarkProfileResponse, UseContractArgs, UseContractResult, balanceQueryKey, blockNumberQueryKey, blockQueryKey, callQueryKey, estimateFeesQueryKey, eventsQueryKey, nonceForAddressQueryKey, paymasterEstimateFeesQueryKey, paymasterGasTokensQueryKey, starkAddressQueryKey, starkNameQueryKey, starkProfileQueryKey, transactionReceiptQueryKey } from "@starknet-start/query"; import { Abi, Abi as Abi$2 } from "abi-wan-kanabi"; import { Explorer, ExplorerFactory } from "@starknet-start/explorers"; import { ChainProviderFactory } from "@starknet-start/providers"; import { Abi as Abi$3, ExtractAbiFunction, ExtractAbiFunctionNames, ExtractArgs, FunctionRet } from "abi-wan-kanabi/kanabi"; //#region src/connectors/mock.d.ts type MockWalletOptions = { id: string; name: string; icon?: string; available?: boolean; failConnect?: boolean; rejectRequest?: boolean; rejectDeclare?: boolean; }; type MockWalletAccounts = { sepolia: AccountInterface[]; mainnet: AccountInterface[]; }; type IdentifierString = `${string}:${string}`; declare class MockWallet implements WalletWithStarknetFeatures { readonly version: "1.0.0"; readonly name: string; readonly icon: `data:image/svg+xml;base64,${string}`; private _accounts; private _accountIndex; private _connected; private _chainId; private _options; private _listeners; constructor(accounts: MockWalletAccounts, options: MockWalletOptions); get chains(): readonly IdentifierString[]; get accounts(): { address: string; publicKey: Uint8Array; chains: `${string}:${string}`[]; features: never[]; }[]; get features(): WalletWithStarknetFeatures["features"]; switchChain(chainId: bigint): void; switchAccount(accountIndex: number): void; readonly instanceId: string; updateOptions(options: Partial): void; private _connect; private _disconnect; private _on; private _off; private _emit; private _request; private get _currentAccount(); private _getCurrentChain; } //#endregion //#region src/context/starknet.d.ts type Simplify = { [K in keyof T]: T[K] } & {}; type GetStarknetProviderProps = Parameters[0]; type StarknetProviderProps = Simplify & { children?: React.ReactNode; }>; type StarknetProviderInnerProps = { /** Chains supported by the app. */ chains: Chain[]; /** Provider to use. */ provider: ChainProviderFactory; /** Paymaster provider to use. */ paymasterProvider?: ChainPaymasterFactory; /** Explorer to use. */ explorer?: ExplorerFactory; /** Connect the first available connector on page load. */ autoConnect?: boolean; /** React-query client to use. */ queryClient?: QueryClient; /** Application. */ children?: React.ReactNode; /** Default chain to use when wallet is not connected */ defaultChainId?: bigint; }; declare function starknetChainId(chainId: bigint): constants.StarknetChainId | undefined; //#endregion //#region src/context/account.d.ts declare function AccountProvider({ address, account, children }: { address?: Address$1; account?: AccountInterface; children: React$1.ReactNode; }): react_jsx_runtime0.JSX.Element; //#endregion //#region src/context/index.d.ts type StarknetConfigProps = StarknetProviderProps; declare function StarknetConfig({ children, ...config }: StarknetConfigProps): react_jsx_runtime0.JSX.Element; //#endregion //#region src/errors.d.ts declare class ConnectorAlreadyConnectedError extends Error { name: string; message: string; } declare class ConnectorNotConnectedError extends Error { name: string; message: string; } declare class ConnectorNotFoundError extends Error { name: string; message: string; } declare class UserRejectedRequestError extends Error { name: string; message: string; } declare class WalletRequestError extends Error { constructor(error?: string | Error | unknown, _cause?: Error | unknown); } declare class UserNotConnectedError extends Error { name: string; message: string; } declare class UnsupportedAccountInterfaceError extends Error { name: string; message: string; } //#endregion //#region src/hooks/use-account.d.ts /** Account connection status. */ type AccountStatus = "connected" | "disconnected" | "connecting" | "reconnecting"; /** Value returned from `useAccount`. */ type UseAccountResult = { /** The address of the connected account. */ address?: Address$1; /** The connected connector. */ connector?: WalletWithStarknetFeatures; /** Connector's chain id */ chainId?: bigint; /** True if connecting. */ isConnecting?: boolean; /** True if reconnecting. */ isReconnecting?: boolean; /** True if connected. */ isConnected?: boolean; /** True if disconnected. */ isDisconnected?: boolean; /** The connection status. */ status: AccountStatus; }; /** * Hook for accessing the account and its connection status. * * @remarks * * This hook is used to access the `AccountInterface` object provided by the * currently connected wallet. */ declare function useAccount(): UseAccountResult; //#endregion //#region src/query.d.ts type UseQueryProps = Pick, "enabled" | "refetchInterval" | "retry" | "retryDelay">; type UseQueryResult$1 = Pick, "data" | "error" | "status" | "isSuccess" | "isError" | "isPending" | "fetchStatus" | "isFetching" | "isLoading" | "refetch">; type UseMutationProps = Pick, "onSuccess" | "onError" | "onMutate" | "onSettled">; type UseMutationResult$1 = Pick, "data" | "error" | "isError" | "isIdle" | "isPending" | "isPaused" | "isSuccess" | "reset" | "mutate" | "mutateAsync" | "status" | "variables">; type UseInfiniteQueryProps = Pick, "enabled" | "refetchInterval" | "retry" | "retryDelay">; type UseInfiniteQueryResult$1 = Pick, TError>, "data" | "error" | "status" | "isSuccess" | "isError" | "isPending" | "fetchStatus" | "isFetching" | "isLoading" | "refetch" | "fetchNextPage" | "fetchPreviousPage" | "hasNextPage" | "hasPreviousPage" | "isFetchingNextPage" | "isFetchingPreviousPage">; //#endregion //#region src/hooks/use-wallet-request.d.ts type MutationResult$3 = UseMutationResult$1>; /** Arguments for `useWalletRequest` hook. */ type UseWalletRequestProps = RequestArgs & UseMutationProps, Error, RequestArgs>; /** Value returned from `useWalletRequest`. */ type UseWalletRequestResult = Omit, "mutate" | "mutateAsync"> & { request: (args?: RequestArgs) => void; requestAsync: (args?: RequestArgs) => Promise>; }; /** Hook to perform request calls to connected wallet */ declare function useWalletRequest(props: UseWalletRequestProps): UseWalletRequestResult; //#endregion //#region src/hooks/use-add-chain.d.ts type UseAddChainArgs = AddStarknetChainParameters; type UseAddChainProps = Omit, keyof RequestArgs<"wallet_addStarknetChain">> & { params?: UseAddChainArgs; }; type UseAddChainResult = Omit, "request" | "requestAsync"> & { addChain: (args?: UseAddChainArgs) => void; addChainAsync: (args?: UseAddChainArgs) => Promise>; }; /** * Hook to add a new network in the list of networks of the wallet. */ declare function useAddChain(props: UseAddChainProps): UseAddChainResult; //#endregion //#region src/hooks/use-balance.d.ts type Balance = { decimals: number; symbol: string; formatted: string; value: bigint; }; type UseBalanceProps = UseQueryProps> & { /** The contract's address. Defaults to the native currency. */ token?: Address$1; /** The address to fetch balance for. */ address?: Address$1; /** Whether to watch for changes. */ watch?: boolean; /** Block identifier used when performing call. */ blockIdentifier?: BlockNumber; }; type UseBalanceResult = UseQueryResult$1; /** * Fetch the balance for the provided address and token. * * If no token is provided, the native currency is used. */ declare function useBalance({ token: token_, address, refetchInterval: refetchInterval_, watch, enabled: enabled_, blockIdentifier, ...props }: UseBalanceProps): UseQueryResult$1<{ value: bigint; decimals: number; symbol: string; formatted: string; }, Error>; //#endregion //#region src/hooks/use-block.d.ts /** Arguments for `useBlock`. */ type UseBlockProps = UseQueryProps> & { /** Identifier for the block to fetch. */ blockIdentifier?: BlockNumber; }; /** Value returned from `useBlock`. */ type UseBlockResult = UseQueryResult$1; /** * Hook for fetching a block. * * @remarks * * Specify which block to fetch with the `blockIdentifier` argument. * Control if and how often data is refreshed with `refetchInterval`. */ declare function useBlock({ blockIdentifier, ...props }?: UseBlockProps): UseBlockResult; //#endregion //#region src/hooks/use-block-number.d.ts /** Arguments for `useBlockNumber`. */ type UseBlockNumberProps = UseQueryProps> & { /** Identifier for the block to fetch. */ blockIdentifier?: BlockNumber; }; /** Value returned from `useBlockNumber`. */ type UseBlockNumberResult = UseQueryResult$1; /** * Hook for fetching the current block number. * * @remarks * * Control if and how often data is refreshed with `refetchInterval`. */ declare function useBlockNumber({ blockIdentifier, ...props }?: UseBlockNumberProps): UseBlockNumberResult; //#endregion //#region src/hooks/use-call.d.ts type CallQueryKey = typeof callQueryKey; /** Options for `useCall`. */ type UseCallProps = CallQueryArgs & UseQueryProps> & { /** The target contract's ABI. */ abi?: Abi$1; /** The target contract's address. */ address?: Address$1; /** Refresh data at every block. */ watch?: boolean; }; /** Value returned from `useCall`. */ type UseCallResult = UseQueryResult$1; /** * Hook to perform a read-only contract call. * * @remarks * * The hook only performs a call if the target `abi`, `address`, * `functionName`, and `args` are not undefined. * */ declare function useCall({ abi, address, functionName, args, blockIdentifier, refetchInterval: refetchInterval_, watch, enabled: enabled_, parseArgs, parseResult, ...props }: UseCallProps): UseCallResult; //#endregion //#region src/hooks/use-connect.d.ts type MutationResult$2 = UseMutationResult$1; type UseConnectProps = UseMutationProps; /** Value returned from `useConnect`. */ type UseConnectResult = Omit & { /** Current connector. */ connector?: WalletWithStarknetFeatures; /** Connectors available for the current chain. */ connectors: WalletWithStarknetFeatures[]; /** Connector waiting approval for connection. */ pendingConnector?: WalletWithStarknetFeatures; /** Connect to a new connector. */ connect: (args?: ConnectVariables) => void; /** Connect to a new connector. */ connectAsync: (args?: ConnectVariables) => Promise; }; /** * Hook for connecting to a StarkNet wallet. * * @remarks * * Use this to implement a "connect wallet" component. * * ``` */ declare function useConnect(props?: UseConnectProps): UseConnectResult; //#endregion //#region src/hooks/use-contract.d.ts /** * Hook to bind a `Contract` instance. * * @remarks * * - The returned contract is a starknet.js `Contract` object. * - Must pass `abi` as const for strict type safety * */ declare function useContract({ abi, address, provider: providedProvider }: UseContractArgs): UseContractResult; //#endregion //#region src/hooks/use-contract-factory.d.ts /** Arguments for `useContractFactory`. */ interface UseContractFactoryProps { /** The compiled contract (for declare and deploy). */ compiledContract?: CompiledContract; /** The CASM contract (required when declaring). */ casm?: CompiledSierraCasm; /** The class hash (for deploy-only mode). */ classHash?: string; /** The contract abi. */ abi?: Abi$1; } /** Options for deploying a contract. */ interface DeployContractOptions { /** Constructor calldata. */ constructorCalldata?: RawArgs; /** Salt for address generation. */ salt?: string; /** Make the address unique. */ unique?: boolean; /** Additional transaction details. */ details?: UniversalDetails; } /** Value returned from `useContractFactory`. */ interface UseContractFactoryResult { /** Function to deploy the contract. */ deployContract?: (options?: DeployContractOptions) => Promise; } /** * Hook to deploy contracts using the new Contract.factory() method. * * @remarks * * This hook provides a function to deploy contracts using starknet.js v8's * Contract.factory() static method. * * For declare and deploy, provide compiledContract and casm. * For deploy-only, provide classHash and optionally abi. */ declare function useContractFactory({ compiledContract, casm, classHash, abi }: UseContractFactoryProps): UseContractFactoryResult; //#endregion //#region src/hooks/use-declare-contract.d.ts type UseDeclareContractArgs = AddDeclareTransactionParameters; type UseDeclareContractProps = Omit, keyof RequestArgs<"wallet_addDeclareTransaction">> & { params?: UseDeclareContractArgs; }; type UseDeclareContractResult = Omit, "request" | "requestAsync"> & { declare: (args?: UseDeclareContractArgs) => void; declareAsync: (args?: UseDeclareContractArgs) => Promise>; }; /** * Hook to declare a new class in the current network. * */ declare function useDeclareContract(props: UseDeclareContractProps): UseDeclareContractResult; //#endregion //#region src/hooks/use-deploy-account.d.ts type UseDeployAccountProps = DeployAccountVariables & UseMutationProps; type MutationResult$1 = UseMutationResult$1; type UseDeployAccountResult = Omit & { /** Deploy account. */ deployAccount: MutationResult$1["mutate"]; /** Deploy account. */ deployAccountAsync: MutationResult$1["mutateAsync"]; }; /** * Hook for deploying a contract. * * @remarks * * This hook deploys a new contract from the currently connected account. */ declare function useDeployAccount({ classHash, constructorCalldata, addressSalt, contractAddress, options, ...props }: UseDeployAccountProps): UseDeployAccountResult; //#endregion //#region src/hooks/use-disconnect.d.ts type MutationResult = UseMutationResult$1; type UseDisconnectProps = UseMutationProps; /** Value returned from `useDisconnect`. */ type UseDisconnectResult = Omit & { /** Disconnect wallet. */ disconnect: MutationResult["mutate"]; /** Disconnect wallet. */ disconnectAsync: MutationResult["mutateAsync"]; }; /** * * Hook for disconnecting connected wallet. */ declare function useDisconnect(props?: UseDisconnectProps): UseDisconnectResult; //#endregion //#region src/hooks/use-estimate-fees.d.ts /** Options for `useEstimateFees`. */ type UseEstimateFeesProps = EstimateFeesArgs & UseQueryProps> & { /** Refresh data at every block. */ watch?: boolean; }; /** Value returned from `useEstimateFees`. */ type UseEstimateFeesResult = UseQueryResult$1; /** * Hook to estimate fees for smart contract calls. * * @remarks * * The hook only performs estimation if the `calls` is not undefined. */ declare function useEstimateFees({ calls, options, watch, enabled: enabled_, ...props }: UseEstimateFeesProps): UseEstimateFeesResult; //#endregion //#region src/hooks/use-events.d.ts /** Arguments for `useEvents`. */ type UseEventsProps = UseInfiniteQueryProps, string> & EventsQueryKeyParams; /** Value returned from `useEvents`. */ type UseEventsResult = Omit, "fetchPreviousPage" | "isFetchingPreviousPage" | "hasPreviousPage">; /** * Hook to fetch events continuously * * The parameters could be used to filter the events by contract address, name * or specify a range of blocks to get the events from * * The returned object contain different functions and props to fetch next pages */ declare function useEvents({ address, eventName, fromBlock: fromBlock_, toBlock: toBlock_, pageSize }: UseEventsProps): UseEventsResult; //#endregion //#region src/hooks/use-explorer.d.ts /** Access the current explorer, should be inside a StarknetConfig. */ declare function useExplorer(): Explorer; //#endregion //#region src/hooks/use-invalidate-on-block.d.ts /** * Invalidate the given query on every new block. */ declare function useInvalidateOnBlock({ enabled, queryKey }: { enabled?: boolean; queryKey: QueryKey; }): void; //#endregion //#region src/hooks/use-network.d.ts /** Value returned from `useNetwork`. */ type UseNetworkResult = { /** The current chain. */ chain: Chain; /** List of supported chains. */ chains: Chain[]; }; /** * Hook for accessing the current connected chain. * * @remarks * * The network object contains information about the * network. * */ declare function useNetwork(): UseNetworkResult; //#endregion //#region src/hooks/use-nonce-for-address.d.ts /** Arguments for `useNonceForAddress`. */ type UseNonceForAddressProps = UseQueryProps> & { /** Address to fetch nonce for. */ address?: Address$1; /** Identifier for the block to fetch. */ blockIdentifier?: BlockNumber; }; /** Value returned from `useNonceForAddress`. */ type UseNonceForAddressResult = UseQueryResult$1; /** * Hook for fetching the nonce for the given address. */ declare function useNonceForAddress({ address, blockIdentifier, ...props }: UseNonceForAddressProps): UseNonceForAddressResult; //#endregion //#region src/hooks/use-paymaster-estimate-fees.d.ts /** Options for `useEstimateFees`. */ type UsePaymasterEstimateFeesProps = PaymasterEstimateFeesArgs & UseQueryProps> & { /** Refresh data at every block. */ watch?: boolean; }; /** Value returned from `useEstimateFees`. */ type UsePaymasterEstimateFeesResult = UseQueryResult$1; /** * Hook to estimate fees for smart contract calls. * * @remarks * * The hook only performs estimation if the `calls` is not undefined. */ declare function usePaymasterEstimateFees({ calls, options, watch, enabled: enabled_, ...props }: UsePaymasterEstimateFeesProps): UsePaymasterEstimateFeesResult; //#endregion //#region src/hooks/use-paymaster-gas-tokens.d.ts /** Options for `usePaymasterGasTokens`. */ type UsePaymasterGasTokensProps = UseQueryProps> & { /** Refresh data at every block. */ watch?: boolean; }; /** Value returned from `usePaymasterGasTokens`. */ type UsePaymasterGasTokensResult = UseQueryResult$1; /** * Hook to fetch all gas token supported by the Paymaster. * * @remarks * * The hook only performs fetch if the `paymasterProvider` is not undefined. */ declare function usePaymasterGasTokens({ watch, enabled: enabled_, ...props }?: UsePaymasterGasTokensProps): UsePaymasterGasTokensResult; //#endregion //#region src/hooks/use-paymaster-send-transaction.d.ts type UsePaymasterSendTransactionArgs = { /** List of smart contract calls to execute. */ calls?: Call[]; /** Paymaster details. */ options?: PaymasterDetails; /** Max fee in gas token. */ maxFeeInGasToken?: BigNumberish; }; /** Value returned from `usePaymasterSendTransaction`. */ type UsePaymasterSendTransactionResult = Omit, "mutate" | "mutateAsync"> & { send: (args?: Call[]) => void; sendAsync: (args?: Call[]) => Promise; }; /** Hook to send one or several transaction(s) to the network through a paymaster. */ declare function usePaymasterSendTransaction(props: UsePaymasterSendTransactionArgs): UsePaymasterSendTransactionResult; //#endregion //#region src/hooks/use-provider.d.ts /** Value returned from `useProvider`. */ interface UseProviderResult { /** The current provider. */ provider: ProviderInterface; /** The current paymaster provider. */ paymasterProvider?: PaymasterInterface; } /** * Hook for accessing the current provider. * * @remarks * * Use this hook to access the current provider object * implementing starknet.js `ProviderInterface`. */ declare function useProvider(): UseProviderResult; //#endregion //#region src/hooks/use-read-contract.d.ts type Result> = FunctionRet; /** Options for `useReadContract`. */ type UseReadContractProps> = UseQueryProps, Error, Result, ReturnType> & { /** The target contract's ABI. * * @remarks * * You must pass ABI as const * */ abi?: TAbi; /** The target contract's address. */ address?: Address$1; /** Refresh data at every block. */ watch?: boolean; /** The contract's function name. */ functionName: TFunctionName; /** Read arguments. */ args?: ExtractArgs>; /** Block identifier used when performing call. */ blockIdentifier?: BlockNumber; }; /** Value returned from `useReadContract`. */ type UseReadContractResult> = UseQueryResult$1, Error>; /** * Perform a read-only contract call. If the specified block identifier is pending, * the hook will periodically refetch data automatically. * * @remarks * * - The hook only performs a call if the target `abi`, `address`, * `functionName`, and `args` are not undefined. * * - You must pass `abi` as `const` for autocomplete to work. */ declare function useReadContract>(props: UseReadContractProps): UseReadContractResult; //#endregion //#region src/hooks/use-send-transaction.d.ts type UseSendTransactionArgs = { /** List of smart contract calls to execute. */ calls?: Call[]; }; type UseSendTransactionProps = UseSendTransactionArgs & Omit, keyof RequestArgs<"wallet_addInvokeTransaction">>; type UseSendTransactionResult = Omit, "request" | "requestAsync"> & { send: (args?: Call[]) => void; sendAsync: (args?: Call[]) => Promise>; }; /** Hook to send one or several transaction(s) to the network. */ declare function useSendTransaction(props: UseSendTransactionProps): UseSendTransactionResult; //#endregion //#region src/hooks/use-sign.d.ts type UseSignTypedDataArgs = TypedData; type UseSignTypedDataProps = Omit, keyof RequestArgs<"wallet_signTypedData">> & { params?: UseSignTypedDataArgs; }; type UseSignTypedDataResult = Omit, "request" | "requestAsync"> & { signTypedData: (args?: UseSignTypedDataArgs) => void; signTypedDataAsync: (args?: UseSignTypedDataArgs) => Promise>; }; declare function useSignTypedData(props: UseSignTypedDataProps): UseSignTypedDataResult; //#endregion //#region src/hooks/use-stark-address.d.ts type UseStarkAddressProps = UseQueryProps> & { /** Stark name. */ name?: string; /** Naming contract to use . */ contract?: Address$1; }; type UseStarkAddressResult = UseQueryResult$1; /** * Hook to get the address associated to a stark name. * * @remarks * * This hook fetches the address of the specified stark name * It defaults to the starknetID contract but a different contract can be targetted by specifying its address * If stark name does not have an associated address, it will return "0x0" * */ declare function useStarkAddress({ name, contract, enabled: enabled_, ...props }: UseStarkAddressProps): UseStarkAddressResult; //#endregion //#region src/hooks/use-stark-name.d.ts /** Arguments for `useStarkName` hook. */ type StarkNameArgs = UseQueryProps> & { /** Account address. */ address?: Address$1; /** Naming contract to use . */ contract?: Address$1; }; /** Value returned by `useStarkName` hook. */ type StarkNameResult = UseQueryResult$1; /** * Hook for fetching Stark name for address. * * @remarks * * This hook fetches the stark name of the specified address. * It defaults to the starknet.id contract but a different contract can be * targetted by specifying its contract address * If address does not have a stark name, it will return "stark" */ declare function useStarkName({ address, contract, enabled: enabled_, ...props }: StarkNameArgs): StarkNameResult; //#endregion //#region src/hooks/use-stark-profile.d.ts /** Arguments for `useStarkProfile` hook. */ type StarkProfileArgs = UseQueryProps> & { /** Account address. */ address?: Address$1; /** Get Starknet ID default pfp url if no profile picture is set */ useDefaultPfp?: boolean; /** Naming contract to use. */ namingContract?: Address$1; /** Identity contract to use. */ identityContract?: Address$1; }; /** Value returned by `useStarkProfile` hook. */ type GetStarkprofileResponse = StarkProfileResponse; type UseStarkProfileResult = UseQueryResult$1; /** * Hook for fetching Stark profile for address. */ declare function useStarkProfile({ address, useDefaultPfp, namingContract, identityContract, enabled: enabled_, ...props }: StarkProfileArgs): UseStarkProfileResult; //#endregion //#region src/hooks/use-switch-chain.d.ts type UseSwitchChainArgs = SwitchStarknetChainParameters; type UseSwitchChainProps = Omit, keyof RequestArgs<"wallet_switchStarknetChain">> & { params?: UseSwitchChainArgs; }; type UseSwitchChainResult = Omit, "request" | "requestAsync"> & { switchChain: (args?: UseSwitchChainArgs) => void; switchChainAsync: (args?: UseSwitchChainArgs) => Promise>; }; /** * Hook to change the current network of the wallet. * */ declare function useSwitchChain(props: UseSwitchChainProps): UseSwitchChainResult; //#endregion //#region src/hooks/use-transaction-receipt.d.ts /** Arguments for the `useTransactionReceipt` hook. */ type UseTransactionReceiptProps = UseQueryProps> & { /** The transaction hash. */ hash?: string; /** Refresh data at every block. */ watch?: boolean; }; type UseTransactionReceiptResult = UseQueryResult$1; /** * Hook to fetch a single transaction receipt. * * @remarks * * This hook keeps a cache of receipts by chain and transaction hash * so that you can use the hook freely in your application without worrying * about sending duplicate network requests. * * If you need to refresh the transaction receipt data, set `watch: true` in * the props. The hook will periodically refresh the transaction data in the * background. * */ declare function useTransactionReceipt({ hash, watch, enabled: enabled_, ...props }: UseTransactionReceiptProps): UseTransactionReceiptResult; //#endregion //#region src/hooks/use-universal-deployer-contract.d.ts type UseUniversalDeployerContractProps = { /** UDC contract's address. * * @remarks * Overrides the default address of the Universal Deployer contract. * */ address?: Address$1; /** The provider, by default it will be the current one. */ provider?: ProviderInterface | null; }; type UseUniversalDeployerContractResult = { udc: UseContractResult["contract"]; }; /** * Hook to bind a `Contract` instance for the Universal Deployer contract. * * @returns The `Contract` instance for the Universal Deployer contract. * * @remarks * * - The returned contract is a starknet.js `Contract` object. * */ declare function useUniversalDeployerContract(props?: UseUniversalDeployerContractProps): UseUniversalDeployerContractResult; /** * https://docs.openzeppelin.com/contracts-cairo/0.20.0/udc * The Universal Deployer contract's ABI. */ declare const abi$1: readonly [{ readonly name: "UniversalDeployerImpl"; readonly type: "impl"; readonly interface_name: "openzeppelin::utils::universal_deployer::interface::IUniversalDeployer"; }, { readonly name: "core::bool"; readonly type: "enum"; readonly variants: readonly [{ readonly name: "False"; readonly type: "()"; }, { readonly name: "True"; readonly type: "()"; }]; }, { readonly name: "core::array::Span::"; readonly type: "struct"; readonly members: readonly [{ readonly name: "snapshot"; readonly type: "@core::array::Array::"; }]; }, { readonly name: "openzeppelin::utils::universal_deployer::interface::IUniversalDeployer"; readonly type: "interface"; readonly items: readonly [{ readonly name: "deploy_contract"; readonly type: "function"; readonly inputs: readonly [{ readonly name: "class_hash"; readonly type: "core::starknet::class_hash::ClassHash"; }, { readonly name: "salt"; readonly type: "core::felt252"; }, { readonly name: "from_zero"; readonly type: "core::bool"; }, { readonly name: "calldata"; readonly type: "core::array::Span::"; }]; readonly outputs: readonly [{ readonly type: "core::starknet::contract_address::ContractAddress"; }]; readonly state_mutability: "external"; }]; }, { readonly kind: "struct"; readonly name: "openzeppelin::presets::universal_deployer::UniversalDeployer::ContractDeployed"; readonly type: "event"; readonly members: readonly [{ readonly kind: "data"; readonly name: "address"; readonly type: "core::starknet::contract_address::ContractAddress"; }, { readonly kind: "data"; readonly name: "deployer"; readonly type: "core::starknet::contract_address::ContractAddress"; }, { readonly kind: "data"; readonly name: "from_zero"; readonly type: "core::bool"; }, { readonly kind: "data"; readonly name: "class_hash"; readonly type: "core::starknet::class_hash::ClassHash"; }, { readonly kind: "data"; readonly name: "calldata"; readonly type: "core::array::Span::"; }, { readonly kind: "data"; readonly name: "salt"; readonly type: "core::felt252"; }]; }, { readonly kind: "enum"; readonly name: "openzeppelin::presets::universal_deployer::UniversalDeployer::Event"; readonly type: "event"; readonly variants: readonly [{ readonly kind: "nested"; readonly name: "ContractDeployed"; readonly type: "openzeppelin::presets::universal_deployer::UniversalDeployer::ContractDeployed"; }]; }]; //#endregion //#region src/hooks/use-watch-asset.d.ts type UseWatchAssetArgs = WatchAssetParameters; type UseWatchAssetProps = Omit, keyof RequestArgs<"wallet_watchAsset">> & { params?: UseWatchAssetArgs; }; type UseWatchAssetResult = Omit, "request" | "requestAsync"> & { watchAsset: (args?: UseWatchAssetArgs) => void; watchAssetAsync: (args?: UseWatchAssetArgs) => Promise>; }; /** * Hook to watch an asset in the wallet. * */ declare function useWatchAsset(props: UseWatchAssetProps): UseWatchAssetResult; //#endregion //#region src/utils.d.ts /** * Validate and format the address. * * @param address - The address string to validate. * @returns The validated and formatted address as Address type. */ declare function getAddress(address: string): Address$1; //#endregion export { type Abi, AccountStatus, type Address, Balance, CallQueryKey, type ConnectVariables, ConnectorAlreadyConnectedError, ConnectorNotConnectedError, ConnectorNotFoundError, type DeployAccountVariables, DeployContractOptions, GetStarkprofileResponse, MockWallet, type MockWalletAccounts, type MockWalletOptions, AccountProvider as OverrideAccount, type RequestArgs, type RequestMessageTypes, type RequestResult, StarkNameArgs, StarkNameResult, StarkProfileArgs, StarknetConfig, StarknetConfigProps, UnsupportedAccountInterfaceError, UseAccountResult, UseAddChainArgs, UseAddChainProps, UseAddChainResult, UseBalanceProps, UseBalanceResult, UseBlockNumberProps, UseBlockNumberResult, UseBlockProps, UseBlockResult, UseCallProps, UseCallResult, UseConnectProps, UseConnectResult, UseContractFactoryProps, UseContractFactoryResult, UseDeclareContractArgs, UseDeclareContractProps, UseDeclareContractResult, UseDeployAccountProps, UseDeployAccountResult, UseDisconnectProps, UseDisconnectResult, UseEstimateFeesProps, UseEstimateFeesResult, UseEventsProps, UseEventsResult, UseNetworkResult, UseNonceForAddressProps, UseNonceForAddressResult, UsePaymasterEstimateFeesProps, UsePaymasterEstimateFeesResult, UsePaymasterGasTokensProps, UsePaymasterGasTokensResult, UsePaymasterSendTransactionArgs, UsePaymasterSendTransactionResult, UseProviderResult, UseReadContractProps, UseReadContractResult, UseSendTransactionArgs, UseSendTransactionProps, UseSendTransactionResult, UseSignTypedDataArgs, UseSignTypedDataProps, UseSignTypedDataResult, UseStarkAddressProps, UseStarkAddressResult, UseStarkProfileResult, UseSwitchChainArgs, UseSwitchChainProps, UseSwitchChainResult, UseTransactionReceiptProps, UseTransactionReceiptResult, UseUniversalDeployerContractProps, UseUniversalDeployerContractResult, UseWalletRequestProps, UseWalletRequestResult, UseWatchAssetArgs, UseWatchAssetProps, UseWatchAssetResult, UserNotConnectedError, UserRejectedRequestError, WalletRequestError, getAddress, starknetChainId, useAccount, useAddChain, useBalance, useBlock, useBlockNumber, useCall, useConnect, useContract, useContractFactory, useDeclareContract, useDeployAccount, useDisconnect, useEstimateFees, useEvents, useExplorer, useInvalidateOnBlock, useNetwork, useNonceForAddress, usePaymasterEstimateFees, usePaymasterGasTokens, usePaymasterSendTransaction, useProvider, useReadContract, useSendTransaction, useSignTypedData, useStarkAddress, useStarkName, useStarkProfile, useSwitchChain, useTransactionReceipt, useUniversalDeployerContract, useWalletRequest, useWatchAsset }; //# sourceMappingURL=index.d.mts.map