import { UndefinedOr } from '@devprotocol/util-ts'; import { TransactionResponse, ethers, TransactionReceipt, ContractRunner } from 'ethers'; type Positions = { readonly property: string; readonly amount: string; readonly price: string; readonly cumulativeReward: string; readonly pendingReward: string; }; type Rewards = { readonly entireReward: string; readonly cumulativeReward: string; readonly withdrawableReward: string; }; type TokenURI = { readonly name: string; readonly description: string; readonly image: string; readonly attributes: readonly [ { readonly trait_type: 'Destination'; readonly value: string; }, { readonly trait_type: 'Locked Amount'; readonly display_type: 'number'; readonly value: number; }, { readonly trait_type: 'Payload'; readonly value: string; } ]; }; type TokenURISimProps = { readonly tokenId?: number; readonly owner?: string; readonly positions?: { readonly property?: string; readonly amount?: string; readonly price?: string; readonly cumulativeReward?: string; readonly pendingReward?: string; }; readonly rewards?: { readonly entireReward?: string; readonly cumulativeReward?: string; readonly withdrawableReward?: string; }; readonly payload?: string | Uint8Array; }; type STokensContract = { readonly positions: (tokenId: number) => Promise; readonly isFreezed: (tokenId: number) => Promise; readonly freezeTokenURI: (tokenId: number, overrides?: FallbackableOverrides) => Promise; readonly setTokenURIImage: (tokenId: number, data: string, overrides?: FallbackableOverrides) => Promise; readonly setSTokenRoyaltyForProperty: (propertyAddress: string, royalty: number, overrides?: FallbackableOverrides) => Promise; readonly royaltyOf: (propertyAddress: string) => Promise; readonly setTokenURIDescriptor: (propertyAddress: string, descriptorAddress: string, payloads?: ReadonlyArray, overrides?: FallbackableOverrides) => Promise; readonly ownerOf: (tokenId: number) => Promise; readonly rewards: (tokenId: number) => Promise; readonly tokenURI: (tokenId: number) => Promise; readonly tokenURISim: (props?: TokenURISimProps) => Promise; readonly positionsOfProperty: (propertyAddress: string) => Promise; readonly positionsOfOwner: (accountAddress: string) => Promise; readonly contract: () => ethers.Contract; readonly payloadOf: (tokenId: number) => Promise; readonly descriptorOf: (propertyAddress: string) => Promise; readonly descriptorOfPropertyByPayload: (propertyAddress: string, payload: string | Uint8Array) => Promise; }; type Overrides = { readonly gasLimit?: number; readonly from?: string; readonly value?: string; }; type FallbackableOverrides = { readonly overrides?: Overrides; readonly fallback?: Overrides; }; type ApproveIfNeededResultForApproveIsNeeded = { readonly approvalNeeded: true; readonly approveIfNeeded: (options?: { readonly amount?: string; readonly overrides?: FallbackableOverrides; }) => Promise Promise<(TransactionReceipt | null) & { readonly run: () => Promise; }>; }>; }; type ApproveIfNeededResultForApproveIsNotNeeded = { readonly approvalNeeded: false; readonly approveIfNeeded: (options?: { readonly amount?: string; readonly overrides?: FallbackableOverrides; }) => Promise<{ readonly waitNeeded: false; readonly waitOrSkipApproval: () => Promise<{ readonly run: () => Promise; }>; }>; }; type ApproveIfNeededResult = ApproveIfNeededResultForApproveIsNeeded | ApproveIfNeededResultForApproveIsNotNeeded; type ApproveIfNeeded = (factoryOptions: { readonly provider: ContractRunner; readonly requiredAmount: string; readonly from: string; readonly to?: string; readonly token?: string; readonly callback: (receipt?: TransactionReceipt | null) => Promise; }) => Promise>; declare const approveIfNeeded: ApproveIfNeeded; type PositionsCreate = (options: { readonly provider: ContractRunner; readonly from: string; readonly destination: string; readonly amount: string; readonly payload?: string | Uint8Array; readonly overrides?: FallbackableOverrides; }) => Promise>; declare const positionsCreate: PositionsCreate; type PositionsCreateWithEth = (options: { readonly provider: ContractRunner; readonly ethAmount?: string; readonly devAmount?: string; readonly destination: string; readonly deadline?: number; readonly gatewayAddress?: string; readonly gatewayBasisPoints?: number; readonly payload?: string | Uint8Array; readonly overrides?: FallbackableOverrides; }) => Promise<{ readonly estimatedDev: string; readonly estimatedEth: string; readonly create: () => Promise; }>; declare const positionsCreateWithEth: PositionsCreateWithEth; type PositionsCreateWithEthForPolygon = (options: { readonly provider: ContractRunner; readonly ethAmount?: string; readonly devAmount?: string; readonly destination: string; readonly from?: string; readonly overrides?: FallbackableOverrides; readonly payload?: string | Uint8Array; readonly deadline?: number; readonly gatewayAddress?: string; readonly gatewayBasisPoints?: number; }) => Promise<{ readonly estimatedDev: string; readonly estimatedEth: string; readonly create: () => Promise>; }>; declare const positionsCreateWithEthForPolygon: PositionsCreateWithEthForPolygon; type Params = { readonly provider: ContractRunner; readonly mintTo: string; readonly destination: string; readonly path: readonly (string | bigint)[]; readonly token?: string; readonly tokenAmount?: string; readonly devAmount?: string; readonly devAmountOut?: string; readonly from?: string; readonly overrides?: FallbackableOverrides; readonly payload?: string | Uint8Array; readonly deadline?: number; readonly gatewayAddress?: string; readonly gatewayBasisPoints?: number; }; type ParamsWithToken = Omit & { readonly token: string; }; type ReturnOfPositionsCreateWithAnyTokensERC20 = Promise Promise; }>>; type ReturnOfPositionsCreateWithAnyTokensNative = Promise Promise; }>>; declare function positionsCreateWithAnyTokens(opts: ParamsWithToken): ReturnOfPositionsCreateWithAnyTokensERC20; declare function positionsCreateWithAnyTokens(opts: Params): ReturnOfPositionsCreateWithAnyTokensNative; type EstimationsAPY = (options: { readonly provider: ContractRunner; }) => Promise, UndefinedOr]>; declare const estimationsAPY: EstimationsAPY; type Asset = { readonly market: string; readonly marketSlug?: string; readonly id: string; }; type PropertiesAssets = (options: { readonly provider: ContractRunner; readonly destination: string; }) => Promise>; declare const propertiesAssets: PropertiesAssets; type DevContract$1 = { readonly totalSupply: () => Promise; readonly balanceOf: (address: string) => Promise; readonly transfer: (to: string, value: string) => Promise; readonly allowance: (from: string, to: string) => Promise; readonly approve: (to: string, value: string) => Promise; readonly transferFrom: (from: string, to: string, value: string) => Promise; readonly name: () => Promise; readonly symbol: () => Promise; readonly decimals: () => Promise; readonly deposit: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly contract: () => ethers.Contract; }; type Erc20Contract = { readonly totalSupply: () => Promise; readonly balanceOf: (address: string) => Promise; readonly transfer: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly allowance: (from: string, to: string) => Promise; readonly approve: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly transferFrom: (from: string, to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly name: () => Promise; readonly symbol: () => Promise; readonly decimals: () => Promise; }; type DevContract = Erc20Contract; type Results$a = readonly [UndefinedOr, UndefinedOr]; declare const clientsDev: (provider: ContractRunner) => Promise; type LockupContract$1 = { readonly getValue: (propertyAddress: string, accountAddress: string) => Promise; readonly getAllValue: () => Promise; readonly getPropertyValue: (address: string) => Promise; readonly withdrawByPosition: (positionTokenId: string, amount: string, overrides?: FallbackableOverrides) => Promise; readonly withdraw: (propertyAddress: string, amount: string, overrides?: FallbackableOverrides) => Promise; readonly calculateWithdrawableInterestAmountByPosition: (positionTokenId: string) => Promise; readonly calculateWithdrawableInterestAmount: (propertyAddress: string, accountAddress: string) => Promise; readonly calculateCumulativeHoldersRewardAmount: (propertyAddress: string) => Promise; readonly getStorageWithdrawalStatus: (propertyAddress: string, accountAddress: string) => Promise; readonly calculateCumulativeRewardPrices: () => Promise; readonly calculateRewardAmount: (propertyAddress: string) => Promise; readonly cap: () => Promise; readonly depositToProperty: (propertyAddress: string, amount: string, payload?: string | Uint8Array, overrides?: FallbackableOverrides) => Promise; readonly depositToPosition: (positionTokenId: string, amount: string, overrides?: FallbackableOverrides) => Promise; readonly migrateToSTokens: (positionTokenId: string, overrides?: FallbackableOverrides) => Promise; readonly contract: () => ethers.Contract; }; type LockedupProperty = Readonly<{ readonly property: string; readonly value: string; }>; type LockupContract = { readonly withdrawByPosition: (positionTokenId: string, amount: string, overrides?: FallbackableOverrides) => Promise; readonly calculateWithdrawableInterestAmountByPosition: (positionTokenId: string) => Promise; readonly calculateCumulativeHoldersRewardAmount: (propertyAddress: string) => Promise; readonly calculateCumulativeRewardPrices: () => Promise; readonly calculateRewardAmount: (propertyAddress: string) => Promise; readonly cap: () => Promise; readonly depositToProperty: (propertyAddress: string, amount: string, payload?: string | Uint8Array, overrides?: FallbackableOverrides) => Promise; readonly depositToPosition: (positionTokenId: string, amount: string, overrides?: FallbackableOverrides) => Promise; readonly totalLocked: () => Promise; readonly totalLockedForProperty: (address: string) => Promise; readonly getLockedupProperties: () => Promise; readonly contract: () => ethers.Contract; }; type Results$9 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsLockup: (provider: ContractRunner) => Promise; type MarketFactoryContract$1 = { readonly create: (marketBehaviorAddress: string, overrides?: FallbackableOverrides) => Promise; readonly contract: () => ethers.Contract; }; type MarketFactoryContract = { readonly create: (marketBehaviorAddress: string) => Promise; readonly getEnabledMarkets: () => Promise; readonly contract: () => ethers.Contract; }; type Results$8 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsMarketFactory: (provider: ContractRunner) => Promise; type MetricsFactoryContract = { readonly authenticatedPropertiesCount: () => Promise; readonly metricsCount: () => Promise; readonly metricsOfProperty: (propertyAddress: string) => Promise; readonly contract: () => ethers.Contract; }; type Results$7 = readonly [undefined, UndefinedOr]; declare const clientsMetricsFactory: (provider: ContractRunner) => Promise; type PropertyContract$1 = { readonly totalSupply: () => Promise; readonly balanceOf: (address: string) => Promise; readonly transfer: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly allowance: (from: string, to: string) => Promise; readonly approve: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly transferFrom: (from: string, to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly name: () => Promise; readonly symbol: () => Promise; readonly decimals: () => Promise; readonly author: () => Promise; readonly changeAuthor: (nextAuthor: string, overrides?: FallbackableOverrides) => Promise; readonly changeName: (nextName: string, overrides?: FallbackableOverrides) => Promise; readonly changeSymbol: (nextSymbol: string, overrides?: FallbackableOverrides) => Promise; readonly contract: () => ethers.Contract; }; type PropertyBalance = Readonly<{ readonly account: string; readonly balance: string; }>; type PropertyContract = { readonly totalSupply: () => Promise; readonly balanceOf: (address: string) => Promise; readonly transfer: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly allowance: (from: string, to: string) => Promise; readonly approve: (to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly transferFrom: (from: string, to: string, value: string, overrides?: FallbackableOverrides) => Promise; readonly name: () => Promise; readonly symbol: () => Promise; readonly decimals: () => Promise; readonly author: () => Promise; readonly changeName: (nextName: string, overrides?: FallbackableOverrides) => Promise; readonly changeSymbol: (nextSymbol: string, overrides?: FallbackableOverrides) => Promise; readonly getBalances: () => Promise; readonly contract: () => ethers.Contract; }; type Results$6 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsProperty: (provider: ContractRunner, tokenAddress: string) => Promise; type WaitForEventOptions = { readonly metricsFactoryAddress: string; }; type PropertyFactoryContract$1 = { readonly create: (name: string, symbol: string, author: string, overrides?: FallbackableOverrides) => Promise; readonly createAndAuthenticate: (name: string, symbol: string, marketAddress: string, args: readonly string[], options: WaitForEventOptions, overrides?: FallbackableOverrides) => Promise<{ readonly property: string; readonly transaction: TransactionResponse; readonly waitForAuthentication: () => Promise; }>; readonly contract: () => ethers.Contract; }; type PropertyFactoryContract = { readonly create: (name: string, symbol: string, author: string, overrides?: FallbackableOverrides) => Promise; readonly createAndAuthenticate: (name: string, symbol: string, marketAddress: string, args: readonly string[], options: WaitForEventOptions, overrides?: FallbackableOverrides) => Promise<{ readonly property: string; readonly transaction: TransactionResponse; readonly waitForAuthentication: () => Promise; }>; readonly getPropertiesOfAuthor: (author: string) => Promise; readonly contract: () => ethers.Contract; }; type Results$5 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsPropertyFactory: (provider: ContractRunner) => Promise; type RegistryContract$1 = { readonly allocator: () => Promise; readonly allocatorStorage: () => Promise; readonly lockup: () => Promise; readonly lockupStorage: () => Promise; readonly marketFactory: () => Promise; readonly marketGroup: () => Promise; readonly metricsFactory: () => Promise; readonly metricsGroup: () => Promise; readonly policy: () => Promise; readonly policyFactory: () => Promise; readonly policySet: () => Promise; readonly policyGroup: () => Promise; readonly propertyFactory: () => Promise; readonly propertyGroup: () => Promise; readonly token: () => Promise; readonly withdraw: () => Promise; readonly withdrawStorage: () => Promise; readonly contract: () => ethers.Contract; }; type RegistryContract = { readonly registries: (key: string) => Promise; readonly contract: () => ethers.Contract; }; type Results$4 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsRegistry: (provider: ContractRunner) => Promise; type PolicyContract$1 = { readonly holdersShare: (amount: string, lockups: string) => Promise; readonly rewards: (lockups: string, assets: string) => Promise; readonly authenticationFee: (assets: string, propertyAssets: string) => Promise; readonly marketVotingBlocks: () => Promise; readonly policyVotingBlocks: () => Promise; readonly shareOfTreasury: (supply: string) => Promise; readonly treasury: () => Promise; readonly capSetter: () => Promise; readonly contract: () => ethers.Contract; }; type PolicyContract = { readonly holdersShare: (amount: string, lockups: string) => Promise; readonly rewards: (lockups: string, assets: string) => Promise; readonly authenticationFee: (assets: string, propertyAssets: string) => Promise; readonly marketVotingSeconds: () => Promise; readonly policyVotingSeconds: () => Promise; readonly shareOfTreasury: (supply: string) => Promise; readonly contract: () => ethers.Contract; }; type Results$3 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsPolicy: (provider: ContractRunner) => Promise; type Results$2 = readonly [ UndefinedOr, UndefinedOr ]; declare const clientsSTokens: (provider: ContractRunner) => Promise; type SwapContract = { readonly getEstimatedDevForEth: (ethAmount: string) => Promise; readonly getEstimatedEthForDev: (devAmount: string) => Promise; readonly swapEthAndStakeDevCaller: (propertyAddress: string, deadline: number, payload: string | Uint8Array, overrides: FallbackableOverrides, gatewayAddress?: string, gatewayBasisPoints?: string) => Promise; readonly swapEthAndStakeDevPolygonCaller: (propertyAddress: string, amount: string, deadline: number, payload: string | Uint8Array, overrides: FallbackableOverrides, gatewayAddress?: string, gatewayBasisPoints?: string) => Promise; readonly contract: () => ethers.Contract; }; type Results$1 = readonly [ undefined, UndefinedOr, UndefinedOr ]; declare const clientsUtilsSwapForStake: (provider: ContractRunner) => Promise; type SwapArbitraryTokensContract = { readonly getEstimatedDevForTokens: (path: readonly (string | bigint)[], tokenAmount: string) => Promise; readonly getEstimatedTokensForDev: (path: readonly (string | bigint)[], devAmount: string) => Promise; readonly swapTokensAndStakeDev: (to: string, path: readonly (string | bigint)[], propertyAddress: string, amountOut: string, deadline: number, amount: string, payload?: string | Uint8Array, token?: string, gatewayAddress?: string, gatewayBasisPoints?: string, overrides?: FallbackableOverrides) => Promise; readonly contract: () => ethers.Contract; }; type Results = readonly [undefined, UndefinedOr]; declare const clientsUtilsSwapTokensForStake: (provider: ContractRunner) => Promise; declare const agentAddresses: { readonly eth: { readonly main: { readonly swap: { readonly v2: "0x6400264F991de614048838a7d4B536733BCE3069"; readonly v3: undefined; }; }; }; readonly arbitrum: { readonly one: { readonly swap: { readonly v2: undefined; readonly v3: "0x60Ca7E3960e5F143DdB42B19B64F65c27cAD561d"; }; }; readonly rinkeby: { readonly swap: { readonly v2: undefined; readonly v3: "0x4cd6B431B7A242D51B4D96aE5839a8b8f060F7A9"; }; }; }; readonly polygon: { readonly mainnet: { readonly swap: { readonly v2: undefined; readonly v3: "0x9265Cf9e6Dc5B163bDB75d51661Ca8EA3b6150c4"; }; readonly swapArbitraryTokens: { readonly swap: "0xad7CaC908DfF8Dcd1D0d8d0FE3edD25bf339EB57"; }; readonly usdc: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"; readonly weth: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619"; }; readonly mumbai: { readonly swap: { readonly v2: undefined; readonly v3: "0x60650E5a95864b989C8b7B0357a2d4979a34c6AF"; }; readonly swapArbitraryTokens: { readonly swap: "0x927B51D9Edd43BFDE3586E99BfaCBE08135374AA"; }; readonly usdc: "0xFEca406dA9727A25E71e732F9961F680059eF1F9"; readonly weth: "0x3c8d6A6420C922c88577352983aFFdf7b0F977cA"; }; }; }; export { type ApproveIfNeeded, type ApproveIfNeededResult, type ApproveIfNeededResultForApproveIsNeeded, type ApproveIfNeededResultForApproveIsNotNeeded, type ReturnOfPositionsCreateWithAnyTokensERC20, type ReturnOfPositionsCreateWithAnyTokensNative, agentAddresses, approveIfNeeded, clientsDev, clientsLockup, clientsMarketFactory, clientsMetricsFactory, clientsPolicy, clientsProperty, clientsPropertyFactory, clientsRegistry, clientsSTokens, clientsUtilsSwapForStake, clientsUtilsSwapTokensForStake as clientsUtilsSwapUsdcForStake, estimationsAPY, positionsCreate, positionsCreateWithAnyTokens, positionsCreateWithEth, positionsCreateWithEthForPolygon, propertiesAssets };