import { type Address } from "viem"; import type { DepositWalletOnchainProbe } from "./probe"; /** * Beacon-aware deposit wallet address resolution. * * Algorithm copied from Polymarket's `RelayClient.deriveDepositWalletAddress()`: * @see https://github.com/Polymarket/builder-relayer-client/blob/main/src/client.ts * @see https://docs.polymarket.com/trading/deposit-wallets#wallet-implementation * * CREATE2 helpers: UUPS via root `deriveDepositWallet` (alias for * `deriveUupsDepositWallet`); BeaconProxy via `dist/builder/derive` until * Polymarket re-exports it from the package root. * * Related: MMAI-812, PRED-1071. */ export type DeriveDepositWalletAddressOptions = { factory?: Address; implementation?: Address; probe?: DepositWalletOnchainProbe; }; /** * Computes the legacy ERC-1967 UUPS deposit wallet address for an owner. * Wraps `deriveDepositWallet` (`deriveUupsDepositWallet` alias) from * `@polymarket/builder-relayer-client`. * New users on beacon-enabled factories should use {@link resolveDepositWalletAddress} * instead so the beacon proxy variant is selected when appropriate. */ export declare function deriveUupsDepositWalletAddress(owner: Address, options?: DeriveDepositWalletAddressOptions): Address; /** * Computes the ERC-1967 BeaconProxy deposit wallet address for an owner. * Wraps `deriveBeaconDepositWallet` from `@polymarket/builder-relayer-client/dist/builder/derive`. */ export declare function deriveBeaconDepositWalletAddress(owner: Address, beacon: Address, options?: Pick): Address; /** * Resolves the deposit wallet address for an owner. * * Mirrors `RelayClient.deriveDepositWalletAddress()` in * `@polymarket/builder-relayer-client` (`client.ts`): * * 1. Compute the UUPS candidate (`deriveUupsDepositWallet`). * 2. Read factory `BEACON()`; if zero, return the UUPS address. * 3. If the UUPS candidate has on-chain bytecode, return it (legacy users). * 4. Otherwise return the BeaconProxy variant (`deriveBeaconDepositWallet`). */ export declare function resolveDepositWalletAddress(owner: Address, options?: DeriveDepositWalletAddressOptions): Promise
; /** * @deprecated Use {@link resolveDepositWalletAddress}. This helper only derives * legacy UUPS deposit wallet addresses. */ export declare function deriveDepositWalletAddress(owner: Address, options?: DeriveDepositWalletAddressOptions): Address;