@zkp2p/sdk 0.10.0-rc.6 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as _zkp2p_indexer_schema from '@zkp2p/indexer-schema';
2
2
  import { Deposit, DepositStatus as DepositStatus$2, IntentStatus as IntentStatus$1, DepositPaymentMethod, MethodCurrency, Intent as Intent$1, MakerProfitSnapshot, RateManager, ManagerAggregateStats, RateManagerRate, ManagerStats, DepositFundActivity, DepositDailySnapshot, ManagerDailySnapshot } from '@zkp2p/indexer-schema';
3
- import { Address, Hex, AccessList, AuthorizationList, Hash, WalletClient, PublicClient, Transport } from 'viem';
3
+ import { Address, Hex, AccessList, AuthorizationList, Hash, PublicClient, WalletClient, Transport } from 'viem';
4
4
  import { Abi } from 'abitype';
5
5
  import { IdentityPlatform, IdentityAttestationOutputFor as IdentityAttestationOutputFor$1, IdentityActionTypeByPlatform, IdentityParamsByPlatform } from '@zkp2p/zkp2p-attestation';
6
6
 
@@ -13,16 +13,6 @@ import { IdentityPlatform, IdentityAttestationOutputFor as IdentityAttestationOu
13
13
  * @module contracts
14
14
  */
15
15
 
16
- /** Reviewed OrchestratorV3 intent-lifecycle ABI. */
17
- declare const ORCHESTRATOR_V3_ABI: Abi;
18
- /** Reviewed post-PR #200 RiskManager policy, keeper, and settlement ABI. */
19
- declare const RISK_MANAGER_ABI: Abi;
20
- /** Reviewed post-PR #200 StakeVault ledger ABI (stake/lock/claim/delegation). */
21
- declare const STAKE_VAULT_ABI: Abi;
22
- /** Focused ABI for decoding RiskPositionSettled receipts. */
23
- declare const RISK_POSITION_SETTLED_EVENT_ABI: Abi;
24
- /** Focused ABI for decoding DeferredSettlementFunded receipts. */
25
- declare const DEFERRED_SETTLEMENT_FUNDED_EVENT_ABI: Abi;
26
16
  /**
27
17
  * Contract addresses for a specific deployment.
28
18
  */
@@ -37,8 +27,6 @@ type V2ContractAddresses = {
37
27
  orchestrator?: `0x${string}`;
38
28
  /** OrchestratorV2 contract (queries EscrowV2 effective rates) */
39
29
  orchestratorV2?: `0x${string}`;
40
- /** OrchestratorV3 contract (stake-risk intent lifecycle) */
41
- orchestratorV3?: `0x${string}`;
42
30
  /** All supported orchestrator addresses for the current deployment */
43
31
  orchestratorAddresses?: `0x${string}`[];
44
32
  /** UnifiedPaymentVerifier contract (verifies payment proofs) */
@@ -66,10 +54,16 @@ type V2ContractAddresses = {
66
54
  chainlinkOracleAdapter?: `0x${string}`;
67
55
  /** PythOracleAdapter contract */
68
56
  pythOracleAdapter?: `0x${string}`;
69
- /** StakeVault contract for taker stake and delegation */
70
- stakeVault?: `0x${string}`;
71
- /** RiskManager contract for stake reservation and settlement recovery */
72
- riskManager?: `0x${string}`;
57
+ /**
58
+ * Standalone prepaid IntentGuardian. Production and staging resolve from
59
+ * distinct deployment bundles. Undefined wherever the selected bundle omits
60
+ * the guardian or exports a zero-address placeholder.
61
+ */
62
+ intentGuardian?: `0x${string}`;
63
+ /** AddressGroupRegistry contract */
64
+ addressGroupRegistry?: `0x${string}`;
65
+ /** WhitelistPolicy contract for deposit access policies */
66
+ whitelistPolicy?: `0x${string}`;
73
67
  };
74
68
  /**
75
69
  * Contract ABIs for a specific deployment.
@@ -79,7 +73,6 @@ type V2ContractAbis = {
79
73
  escrowV2?: Abi;
80
74
  orchestrator?: Abi;
81
75
  orchestratorV2?: Abi;
82
- orchestratorV3?: Abi;
83
76
  unifiedPaymentVerifier?: Abi;
84
77
  unifiedPaymentVerifierV2?: Abi;
85
78
  protocolViewer?: Abi;
@@ -87,8 +80,9 @@ type V2ContractAbis = {
87
80
  orchestratorRegistry?: Abi;
88
81
  rateManagerRegistry?: Abi;
89
82
  rateManagerController?: Abi;
90
- stakeVault?: Abi;
91
- riskManager?: Abi;
83
+ intentGuardian?: Abi;
84
+ addressGroupRegistry?: Abi;
85
+ whitelistPolicy?: Abi;
92
86
  };
93
87
  /**
94
88
  * Runtime environment: 'production' for mainnet, 'preproduction' for preprod
@@ -165,26 +159,20 @@ declare function getRateManagerContracts(chainId: number, env?: RuntimeEnv): {
165
159
  };
166
160
  };
167
161
  /**
168
- * Resolve the user-facing StakeVault contract for a deployment.
162
+ * Resolve the standalone IntentGuardian for a deployment, failing closed when
163
+ * no guardian is configured.
169
164
  *
170
- * Throws when the environment has no StakeVault deployment so callers fail
171
- * closed instead of accidentally targeting another environment.
165
+ * Both Base and Base staging use chain ID 8453, so the deployment environment —
166
+ * not the chain ID — decides which address is returned. Production and staging
167
+ * currently resolve distinct guardians. Any bundle without a usable deployment
168
+ * throws rather than substituting another environment's address.
172
169
  */
173
- declare function getStakeVaultContract(chainId: number, env?: RuntimeEnv): {
174
- address: `0x${string}`;
175
- abi: Abi;
176
- stakeToken: `0x${string}`;
177
- };
178
- /** Resolve OrchestratorV3 for a deployment, failing closed when unavailable. */
179
- declare function getOrchestratorV3Contract(chainId: number, env?: RuntimeEnv): {
180
- address: `0x${string}`;
181
- abi: Abi;
182
- };
183
- /** Resolve RiskManager for a deployment, failing closed when unavailable. */
184
- declare function getRiskManagerContract(chainId: number, env?: RuntimeEnv): {
170
+ declare function getIntentGuardianContract(chainId: number, env?: RuntimeEnv): {
185
171
  address: `0x${string}`;
186
172
  abi: Abi;
187
173
  };
174
+ /** True when the deployment has a usable guardian. Use to gate UI affordances. */
175
+ declare function hasIntentGuardian(chainId: number, env?: RuntimeEnv): boolean;
188
176
 
189
177
  /**
190
178
  * Minimal fetch-based GraphQL client for the ZKP2P indexer.
@@ -584,6 +572,18 @@ type PreparedTransaction = {
584
572
  /** Chain ID for the transaction */
585
573
  chainId: number;
586
574
  };
575
+ /**
576
+ * Extended prepared transaction with ABI info for simulation.
577
+ * Used internally; external callers typically only need PreparedTransaction.
578
+ */
579
+ type PreparedTransactionWithAbi = PreparedTransaction & {
580
+ /** Contract ABI for simulation */
581
+ abi: Abi;
582
+ /** Function name for simulation */
583
+ functionName: string;
584
+ /** Encoded args (before ABI encoding) */
585
+ args: readonly unknown[];
586
+ };
587
587
  /**
588
588
  * A method that can be called directly or via .prepare()
589
589
  *
@@ -1585,93 +1585,111 @@ type OrderStats = {
1585
1585
  };
1586
1586
  /** @deprecated No corresponding SDK method; will be removed in 0.8. */
1587
1587
  type DepositIntentStatistics = OrderStats;
1588
- type UsdcAmount = {
1589
- /** USDC base units (6 decimals), stringified integer. */
1590
- raw: string;
1591
- /** Display decimal (e.g. "1250" or "0.059792"). */
1592
- formatted: string;
1593
- };
1594
- type StakeEnvironment = 'base' | 'base_staging';
1595
- type TakerStakeBalances = {
1596
- /** All principal owned by the stake owner, including locked principal. */
1597
- totalUsdc: string;
1598
- /** Principal committed to active RiskManager locks. */
1599
- lockedUsdc: string;
1600
- /** Principal withdrawable or lockable immediately. */
1601
- freeUsdc: string;
1602
- };
1603
- type TakerStake = {
1604
- chainId: number;
1605
- environment: StakeEnvironment;
1606
- taker: `0x${string}`;
1607
- /** Effective stake owner from `stakeOwnerOf(taker)`. */
1608
- stakeOwner: `0x${string}`;
1609
- /** Raw selection; only meaningful while `selectionAuthorized` is true. */
1610
- selectedStakeOwner: `0x${string}` | null;
1611
- selectionAuthorized: boolean;
1612
- /** Balances of the EFFECTIVE stake owner; never summed with taker self-stake. */
1613
- stake: TakerStakeBalances;
1614
- /** Non-stake USDC owed to the taker, withdrawable with `claim()`. */
1615
- claimableUsdc: string;
1616
- riskTakingPaused: boolean;
1617
- indexedBlockNumber: string;
1618
- };
1619
- type GetTakerStakeRequest = {
1620
- owner: string;
1621
- chainId: number;
1622
- };
1623
- type GetTakerStakeResponse = {
1624
- success: boolean;
1625
- message: string;
1626
- responseObject: TakerStake;
1627
- statusCode?: number;
1628
- };
1629
- /**
1630
- * Explicit unbounded-by-stake state: non-chargebackable platforms admit any
1631
- * amount without coverage stake and must not render as zero capacity.
1632
- */
1633
- type PlatformStakeBackedCapacity = {
1634
- unboundedByStake: true;
1635
- amountUsdc: null;
1636
- } | {
1637
- unboundedByStake: false;
1638
- amountUsdc: string;
1588
+ type TakerTierStats = {
1589
+ lifetimeSignaledCount: number;
1590
+ lifetimeFulfilledCount: number;
1591
+ lifetimeManualReleaseCount: number;
1592
+ lifetimePruneCount: number;
1593
+ totalCancelledVolume: string;
1594
+ totalFulfilledVolume: string;
1595
+ lockScore: string;
1596
+ lockScoreDiluted: string;
1597
+ firstSeenAt: string;
1598
+ lastIntentAt: string;
1599
+ updatedAt: string;
1639
1600
  };
1640
- type PlatformCapacity = {
1601
+ type TakerTierLevel = 'PEASANT' | 'PEER' | 'PLUS' | 'PRO' | 'PLATINUM';
1602
+ type PlatformRiskLevel = 'LOW' | 'MEDIUM_HIGH' | 'HIGH' | 'HIGHEST';
1603
+ type PlatformLimit = {
1641
1604
  paymentMethodHash: string;
1642
1605
  platformName: string;
1643
- enabled: boolean;
1644
- chargebackable: boolean;
1645
- /** Alternative settlement mode when free stake is insufficient; never added to capacity. */
1646
- deferredPayoutEnabled: boolean;
1647
- riskWindowSeconds: string;
1648
- /** Zero disables paid intent extensions. */
1649
- extensionPenaltyBpsPerHour: number;
1606
+ /** Legacy risk category. Current curator cap-grid responses omit this. */
1607
+ riskLevel?: PlatformRiskLevel;
1608
+ /** Legacy multiplier. Current curator cap-grid responses omit this. */
1609
+ capMultiplier?: number;
1610
+ effectiveCap: string;
1611
+ effectiveCapDisplay: string;
1612
+ hasCooldown: boolean;
1613
+ cooldownHours: number;
1614
+ isLocked: boolean;
1615
+ minTierRequired: TakerTierLevel | null;
1650
1616
  /**
1651
- * 1:1 stake-backed capacity from the effective owner's free stake.
1652
- * Platform capacities are alternative views of one shared stake-owner
1653
- * portfolio; never sum capacity across platforms.
1617
+ * Whether the rail is chargeback-reversible. Reversible rails backed by a
1618
+ * seller-automated-release (SAR) credential are takeable only through Peer
1619
+ * Pay, so the intent-sign path rejects them with "peer pay only". Optional:
1620
+ * older curator deployments (current prod) omit this field.
1654
1621
  */
1655
- stakeBacked: PlatformStakeBackedCapacity;
1622
+ reversible?: boolean;
1656
1623
  };
1657
- type TakerCapacity = {
1624
+ type TakerTierVolumeBreakdown = {
1625
+ platformName: string;
1626
+ paymentMethodHash: string;
1627
+ volumeBaseUnits: string;
1628
+ volumeDisplay: string;
1629
+ multiplierBps: number;
1630
+ weightedVolumeBaseUnits: string;
1631
+ weightedVolumeDisplay: string;
1632
+ };
1633
+ /** How the curator resolved the taker tier (see curator tier engine). */
1634
+ type TakerTierSource = 'computed' | 'fallback' | 'override' | 'blocklist';
1635
+ type TakerTier = {
1636
+ owner: string;
1658
1637
  chainId: number;
1659
- environment: StakeEnvironment;
1660
- taker: `0x${string}`;
1661
- stakeOwner: `0x${string}`;
1662
- stake: TakerStakeBalances;
1663
- riskTakingPaused: boolean;
1664
- platforms: PlatformCapacity[];
1665
- indexedBlockNumber: string;
1666
- };
1667
- type GetTakerCapacityRequest = {
1638
+ tier: TakerTierLevel;
1639
+ /** Legacy base cap. Current curator responses expose enforced caps in platformLimits. */
1640
+ perIntentCapBaseUnits?: string;
1641
+ /** Legacy formatted base cap. */
1642
+ perIntentCapDisplay?: string;
1643
+ lastUpdated: string;
1644
+ source: TakerTierSource;
1645
+ stats: TakerTierStats | null;
1646
+ cooldownHours: number;
1647
+ cooldownSeconds: number;
1648
+ cooldownActive: boolean;
1649
+ cooldownRemainingSeconds: number;
1650
+ nextIntentAvailableAt: string | null;
1651
+ /**
1652
+ * Server-authoritative platform cap grid. Use this for enforced caps; do not
1653
+ * derive platform caps from top-level tier caps or risk multipliers.
1654
+ */
1655
+ platformLimits?: PlatformLimit[];
1656
+ /**
1657
+ * Server-authoritative tier fields (curator PR #461/#463/#478 contract). All
1658
+ * optional because the current production deployment still serves the older
1659
+ * payload that omits them — read them when present and fall back gracefully.
1660
+ * Amounts are USDC base-unit strings (6 decimals).
1661
+ */
1662
+ /** Base per-intent cap before platform risk multipliers (alias of perIntentCapBaseUnits). */
1663
+ maxOrderSize?: string;
1664
+ maxOrderSizeDisplay?: string;
1665
+ /** Peer Pay volume floor that qualifies the current tier. */
1666
+ minVolumeForTier?: string;
1667
+ minVolumeForTierDisplay?: string;
1668
+ /** Next tier up the volume ladder, or null at the top / off-ladder tiers. */
1669
+ nextTier?: TakerTierLevel | null;
1670
+ /** Remaining Peer Pay volume to reach `nextTier`. */
1671
+ volumeToNextTier?: string | null;
1672
+ volumeToNextTierDisplay?: string | null;
1673
+ nextTierMaxOrderSize?: string | null;
1674
+ nextTierMaxOrderSizeDisplay?: string | null;
1675
+ /**
1676
+ * Compatibility name retained by curator. Current semantics preserve
1677
+ * historical maker tiers through July 1, 2026 UTC, then add forward Peer Pay
1678
+ * volume only. Present on deployments with the PR #461/#463 progression
1679
+ * contract.
1680
+ */
1681
+ peerPayVolume?: string;
1682
+ /** Auditable tier progression inputs. Current curator may return a synthetic Peer Pay row. */
1683
+ volumeBreakdown?: TakerTierVolumeBreakdown[];
1684
+ };
1685
+ type GetTakerTierRequest = {
1668
1686
  owner: string;
1669
1687
  chainId: number;
1670
1688
  };
1671
- type GetTakerCapacityResponse = {
1689
+ type GetTakerTierResponse = {
1672
1690
  success: boolean;
1673
1691
  message: string;
1674
- responseObject: TakerCapacity;
1692
+ responseObject: TakerTier;
1675
1693
  statusCode?: number;
1676
1694
  };
1677
1695
  type GetDepositBundleParams = DepositBundleRequest;
@@ -1704,6 +1722,7 @@ type OrderbookEntry = {
1704
1722
  currency: string;
1705
1723
  paymentMethodHash: string;
1706
1724
  payeeDetailsHash: string;
1725
+ feeBps: number;
1707
1726
  sellerAutomatedReleaseAvailable?: boolean;
1708
1727
  escrowAddress: string;
1709
1728
  chainId: number;
@@ -1804,46 +1823,273 @@ type UpdateReferralCodeSignatureOptions$1 = ReferralSignatureOptions$1 & {
1804
1823
  oldCode: string;
1805
1824
  };
1806
1825
 
1807
- type StakeVaultWriteFunction = 'depositStake' | 'withdrawStake' | 'claim' | 'setTakerAuthorization' | 'selectStakeOwner' | 'clearStakeOwner';
1808
- type StakeWriteBase = {
1809
- txOverrides?: TxOverrides;
1826
+ /**
1827
+ * Deterministic persisted -> draft diff for a deposit's access policy.
1828
+ *
1829
+ * `WhitelistPolicy` cannot replace a policy in one call: `configureDeposit`
1830
+ * replaces only the enabled flag and *appends* groups and takers, so removals
1831
+ * are always separate calls. A single "Save policy" action is therefore a plan
1832
+ * of one or more steps, and the ordering matters:
1833
+ *
1834
+ * - Staying or becoming Restricted: add before removing, so the deposit is
1835
+ * never left enforcing against an empty allow set.
1836
+ * - Becoming Public: disable first, so the fail-open switch lands before any
1837
+ * destructive cleanup and a partially applied plan cannot strand the deposit
1838
+ * enforcing a half-removed list.
1839
+ * - Swapping more groups than the cap allows: fail open, remove, add, then
1840
+ * restore enforcement, because `addAllowedGroups` reverts once the stored
1841
+ * array reaches the maximum.
1842
+ *
1843
+ * Every step is idempotent at the contract level (duplicate adds and absent
1844
+ * removals are no-ops), so a partially applied plan can be retried from the
1845
+ * beginning without corrupting state.
1846
+ */
1847
+ declare const MAX_GROUPS_PER_DEPOSIT = 10;
1848
+ /**
1849
+ * Direct addresses written per transaction.
1850
+ *
1851
+ * `WhitelistPolicy` caps groups at ten but places no limit on the taker array,
1852
+ * so an unchunked editor draft becomes one call whose calldata and per-entry
1853
+ * storage writes can exceed what a wallet will submit or a block will accept —
1854
+ * an unmineable transaction rather than a clean revert. Fifty entries keeps a
1855
+ * single call comfortably inside a normal wallet gas ceiling.
1856
+ */
1857
+ declare const MAX_ADDRESSES_PER_CALL = 50;
1858
+ /**
1859
+ * Total direct addresses one deposit may hold from this client.
1860
+ *
1861
+ * The contract has no such limit; this is a product cap, chosen so the worst
1862
+ * case is ten address transactions rather than an unbounded confirmation queue.
1863
+ * Groups are the intended mechanism for admitting many takers — a maker who
1864
+ * needs more than this wants a group, not a longer list.
1865
+ */
1866
+ declare const MAX_WHITELISTED_ADDRESSES = 500;
1867
+ type AccessPolicyState = {
1868
+ enabled: boolean;
1869
+ groupIds: string[];
1870
+ addresses: string[];
1810
1871
  };
1811
- type StakeVaultWriteParams = {
1812
- depositStake: StakeWriteBase & {
1813
- amount: bigint;
1814
- };
1815
- withdrawStake: StakeWriteBase & {
1816
- amount: bigint;
1817
- };
1818
- claim: StakeWriteBase;
1819
- setTakerAuthorization: StakeWriteBase & {
1872
+ type AccessPolicyPlanStep = {
1873
+ kind: 'configureDeposit';
1874
+ enabled: boolean;
1875
+ groupIds: string[];
1876
+ takers: string[];
1877
+ } | {
1878
+ kind: 'setEnabled';
1879
+ enabled: boolean;
1880
+ } | {
1881
+ kind: 'addAllowedGroups';
1882
+ groupIds: string[];
1883
+ } | {
1884
+ kind: 'removeAllowedGroups';
1885
+ groupIds: string[];
1886
+ } | {
1887
+ kind: 'addWhitelistedAddresses';
1888
+ takers: string[];
1889
+ } | {
1890
+ kind: 'removeWhitelistedAddresses';
1891
+ takers: string[];
1892
+ };
1893
+ type AccessPolicyViolation = 'group-cap-exceeded' | 'empty-restricted-policy' | 'address-cap-exceeded';
1894
+ type AccessPolicyOrdering = 'no-changes' | 'additions-first' | 'removals-first' | 'disable-first';
1895
+ type AccessPolicyDiff = {
1896
+ addedGroupIds: string[];
1897
+ removedGroupIds: string[];
1898
+ addedAddresses: string[];
1899
+ removedAddresses: string[];
1900
+ enabledChanged: boolean;
1901
+ };
1902
+ type AccessPolicyPlan = {
1903
+ diff: AccessPolicyDiff;
1904
+ steps: AccessPolicyPlanStep[];
1905
+ hasChanges: boolean;
1906
+ ordering: AccessPolicyOrdering;
1907
+ /** Non-empty means the draft must not be submitted. */
1908
+ violations: AccessPolicyViolation[];
1909
+ /** Group count once the plan has fully applied. */
1910
+ resultingGroupCount: number;
1911
+ };
1912
+ /** Normalizes a state so callers cannot smuggle duplicates or casing through. */
1913
+ declare const normalizeAccessPolicyState: (state: AccessPolicyState) => AccessPolicyState;
1914
+ declare const diffAccessPolicy: (persistedInput: AccessPolicyState, draftInput: AccessPolicyState) => AccessPolicyDiff;
1915
+ declare const planAccessPolicyUpdate: (persistedInput: AccessPolicyState, draftInput: AccessPolicyState) => AccessPolicyPlan;
1916
+
1917
+ type AccessPolicyOperationsConfig = {
1918
+ getPublicClient: () => PublicClient;
1919
+ /** Undefined wherever the policy is not deployed. */
1920
+ getPolicyAddress: () => Address | undefined;
1921
+ getPolicyAbi: () => Abi | undefined;
1922
+ getRegistryAddress: () => Address | undefined;
1923
+ getRegistryAbi: () => Abi | undefined;
1924
+ prepareContractTransaction: (opts: {
1925
+ address: Address;
1926
+ abi: Abi;
1927
+ functionName: string;
1928
+ args?: readonly unknown[];
1929
+ txOverrides?: TxOverrides;
1930
+ }) => PreparedTransactionWithAbi;
1931
+ };
1932
+ declare class AccessPolicyUnsupportedError extends Error {
1933
+ constructor(contract: 'WhitelistPolicy' | 'AddressGroupRegistry');
1934
+ }
1935
+ /**
1936
+ * Reads and prepareable writes for `WhitelistPolicy` and `AddressGroupRegistry`.
1937
+ *
1938
+ * Writes are depositor-only at the contract level: `onlyDepositor` resolves the
1939
+ * escrow's recorded depositor, so a deposit delegate is rejected. Callers must
1940
+ * gate the UI on that rather than relying on a revert.
1941
+ *
1942
+ * Nothing here enforces admission. Until the intent path consumes the policy,
1943
+ * a saved configuration is stored intent, not active gating.
1944
+ */
1945
+ declare class AccessPolicyOperations {
1946
+ private readonly config;
1947
+ constructor(config: AccessPolicyOperationsConfig);
1948
+ get isSupported(): boolean;
1949
+ private requirePolicy;
1950
+ private requireRegistry;
1951
+ isEnabled(params: {
1952
+ escrow: Address;
1953
+ depositId: bigint;
1954
+ }): Promise<boolean>;
1955
+ /** Groups are enumerable onchain; direct addresses deliberately are not. */
1956
+ getAllowedGroups(params: {
1957
+ escrow: Address;
1958
+ depositId: bigint;
1959
+ }): Promise<Hex[]>;
1960
+ /**
1961
+ * Point check for one address. There is no enumeration getter, so this can
1962
+ * confirm a known address but can never reconstruct a missing list.
1963
+ */
1964
+ isWhitelisted(params: {
1965
+ escrow: Address;
1966
+ depositId: bigint;
1820
1967
  taker: Address;
1821
- authorized: boolean;
1822
- };
1823
- selectStakeOwner: StakeWriteBase & {
1824
- stakeOwner: Address;
1968
+ }): Promise<boolean>;
1969
+ maxGroupsPerDeposit(): Promise<bigint>;
1970
+ groupExists(groupId: Hex): Promise<boolean>;
1971
+ /** Curated membership OR resolver. Resolver failures fail closed. */
1972
+ isMember(params: {
1973
+ groupId: Hex;
1974
+ account: Address;
1975
+ }): Promise<boolean>;
1976
+ private preparePolicyCall;
1977
+ prepareConfigureDeposit(params: {
1978
+ escrow: Address;
1979
+ depositId: bigint;
1980
+ enabled: boolean;
1981
+ groupIds: readonly Hex[];
1982
+ takers: readonly Address[];
1983
+ txOverrides?: TxOverrides;
1984
+ }): PreparedTransactionWithAbi;
1985
+ prepareSetEnabled(params: {
1986
+ escrow: Address;
1987
+ depositId: bigint;
1988
+ enabled: boolean;
1989
+ txOverrides?: TxOverrides;
1990
+ }): PreparedTransactionWithAbi;
1991
+ prepareAddAllowedGroups(params: {
1992
+ escrow: Address;
1993
+ depositId: bigint;
1994
+ groupIds: readonly Hex[];
1995
+ txOverrides?: TxOverrides;
1996
+ }): PreparedTransactionWithAbi;
1997
+ prepareRemoveAllowedGroups(params: {
1998
+ escrow: Address;
1999
+ depositId: bigint;
2000
+ groupIds: readonly Hex[];
2001
+ txOverrides?: TxOverrides;
2002
+ }): PreparedTransactionWithAbi;
2003
+ prepareAddWhitelistedAddresses(params: {
2004
+ escrow: Address;
2005
+ depositId: bigint;
2006
+ takers: readonly Address[];
2007
+ txOverrides?: TxOverrides;
2008
+ }): PreparedTransactionWithAbi;
2009
+ prepareRemoveWhitelistedAddresses(params: {
2010
+ escrow: Address;
2011
+ depositId: bigint;
2012
+ takers: readonly Address[];
2013
+ txOverrides?: TxOverrides;
2014
+ }): PreparedTransactionWithAbi;
2015
+ /** Encodes one planner step. */
2016
+ preparePlanStep(params: {
2017
+ escrow: Address;
2018
+ depositId: bigint;
2019
+ step: AccessPolicyPlanStep;
2020
+ txOverrides?: TxOverrides;
2021
+ }): PreparedTransactionWithAbi;
2022
+ /**
2023
+ * Encodes a whole plan, in order.
2024
+ *
2025
+ * A plan with violations encodes to nothing: an invalid draft must be
2026
+ * rejected before a wallet is ever opened.
2027
+ */
2028
+ preparePlan(params: {
2029
+ escrow: Address;
2030
+ depositId: bigint;
2031
+ plan: AccessPolicyPlan;
2032
+ txOverrides?: TxOverrides;
2033
+ }): PreparedTransactionWithAbi[];
2034
+ }
2035
+
2036
+ type IntentGuardianWriteFunction = 'extendIntent';
2037
+ type GuardianWriteBase = {
2038
+ txOverrides?: TxOverrides;
2039
+ };
2040
+ type IntentGuardianWriteParams = {
2041
+ extendIntent: GuardianWriteBase & {
2042
+ escrow: Address;
2043
+ depositId: bigint;
2044
+ intentHash: Hex;
2045
+ /** Additional lifetime in seconds. */
2046
+ additionalTime: bigint;
2047
+ /**
2048
+ * Payer-confirmed ceiling on cost. The contract reverts with
2049
+ * ExtensionCostExceedsMax rather than overcharging, which is what makes a
2050
+ * governance fee change between quote and execution safe.
2051
+ */
2052
+ maxCost: bigint;
1825
2053
  };
1826
- clearStakeOwner: StakeWriteBase;
1827
2054
  };
1828
2055
  /**
1829
- * Post-PR #200 Vault accounting for one staker plus the delegation view for
1830
- * one taker. `stakeOwner` is the EFFECTIVE owner from `stakeOwnerOf(taker)`;
1831
- * `selectedStakeOwner` is the raw selection, which is only meaningful while
1832
- * `selectionAuthorized` remains true. The two must never be conflated: a
1833
- * stale selection falls back to self-stake on the contract side.
2056
+ * Live guardian policy. Read immediately before quoting or signing — the fee is
2057
+ * owner-governed and may change at any time, so a cached value is only ever a
2058
+ * display hint, never a commitment.
2059
+ */
2060
+ type IntentGuardianPolicy = {
2061
+ guardian: Address;
2062
+ /** Zero means governance has disabled extensions entirely. */
2063
+ extensionFeeBpsPerHour: bigint;
2064
+ extensionsEnabled: boolean;
2065
+ maxExtensionFeeBpsPerHour: bigint;
2066
+ /** Escrow-enforced ceiling on total intent lifetime, in seconds. */
2067
+ maxTotalIntentLifetime: bigint;
2068
+ owner: Address;
2069
+ pendingOwner: Address;
2070
+ };
2071
+ /**
2072
+ * A quote is a point-in-time read. It is not a reservation: governance can move
2073
+ * the fee before the transaction lands, which is why `maxCost` is required.
1834
2074
  */
1835
- type StakeVaultState = {
1836
- staker: Address;
1837
- taker: Address;
1838
- stakeToken: Address;
1839
- stakeOwner: Address;
1840
- selectedStakeOwner: Address | null;
1841
- selectionAuthorized: boolean;
1842
- staked: bigint;
1843
- locked: bigint;
1844
- free: bigint;
1845
- claimable: bigint;
2075
+ type IntentGuardianQuote = {
2076
+ intentAmount: bigint;
2077
+ additionalTime: bigint;
2078
+ extensionFeeBpsPerHour: bigint;
2079
+ cost: bigint;
2080
+ quotedAt: number;
1846
2081
  };
2082
+ /**
2083
+ * Classified guardian failure. The raw contract error name is preserved in
2084
+ * `code` so diagnostics stay precise while the UI can branch on the class.
2085
+ */
2086
+ type IntentGuardianErrorCode = 'EXTENSIONS_DISABLED' | 'COST_EXCEEDS_MAX' | 'FEE_EXCEEDS_INTENT_AMOUNT' | 'INTENT_ALREADY_EXPIRED' | 'ESCROW_NOT_WHITELISTED' | 'ZERO_ADDRESS' | 'UNKNOWN';
2087
+ /**
2088
+ * Map a thrown guardian error onto a stable code. Falls back to UNKNOWN rather
2089
+ * than guessing, so an unmapped revert is never silently presented as a known
2090
+ * condition.
2091
+ */
2092
+ declare function classifyIntentGuardianError(error: unknown): IntentGuardianErrorCode;
1847
2093
 
1848
2094
  type PV_ReferralFee = {
1849
2095
  recipient: `0x${string}`;
@@ -2313,10 +2559,7 @@ type SignalIntentMethodParams = {
2313
2559
  data?: `0x${string}`;
2314
2560
  /** Optional escrow override (auto-routes orchestrator when provided) */
2315
2561
  escrowAddress?: Address;
2316
- /**
2317
- * Optional caller-pinned orchestrator target. Explicit addresses outside the
2318
- * configured deployment are honored with the OrchestratorV3 ABI.
2319
- */
2562
+ /** Optional orchestrator override */
2320
2563
  orchestratorAddress?: Address;
2321
2564
  /** Pre-obtained signature (if not auto-fetching) */
2322
2565
  gatingServiceSignature?: `0x${string}`;
@@ -2332,10 +2575,7 @@ type SignalIntentMethodParams = {
2332
2575
  type CancelIntentMethodParams = {
2333
2576
  /** The intent hash to cancel (0x-prefixed, 32 bytes) */
2334
2577
  intentHash: `0x${string}`;
2335
- /**
2336
- * Optional caller-pinned orchestrator target. Explicit addresses outside the
2337
- * configured deployment are honored with the OrchestratorV3 ABI.
2338
- */
2578
+ /** Optional orchestrator override */
2339
2579
  orchestratorAddress?: Address;
2340
2580
  /** Optional viem transaction overrides */
2341
2581
  txOverrides?: TxOverrides;
@@ -2358,10 +2598,7 @@ type FulfillIntentMethodParams = {
2358
2598
  attestationServiceFallbackUrls?: string[];
2359
2599
  /** Override attestation service URL */
2360
2600
  attestationServiceUrl?: string;
2361
- /**
2362
- * Optional caller-pinned orchestrator target. Explicit addresses outside the
2363
- * configured deployment are honored with the OrchestratorV3 ABI.
2364
- */
2601
+ /** Optional orchestrator override */
2365
2602
  orchestratorAddress?: Address;
2366
2603
  /** Data to pass to post-intent hook */
2367
2604
  postIntentHookData?: `0x${string}`;
@@ -2491,10 +2728,6 @@ declare class Zkp2pClient {
2491
2728
  readonly orchestratorV2Address?: Address;
2492
2729
  /** OrchestratorV2 ABI */
2493
2730
  readonly orchestratorV2Abi?: Abi;
2494
- /** OrchestratorV3 address (undefined when stake-risk intents are not deployed) */
2495
- readonly orchestratorV3Address?: Address;
2496
- /** OrchestratorV3 ABI */
2497
- readonly orchestratorV3Abi?: Abi;
2498
2731
  /** All supported upgraded orchestrator addresses (current first, then historical) */
2499
2732
  readonly orchestratorAddresses: Address[];
2500
2733
  /** UnifiedPaymentVerifier contract address */
@@ -2505,6 +2738,14 @@ declare class Zkp2pClient {
2505
2738
  readonly protocolViewerAbi?: Abi;
2506
2739
  /** Ordered list of all ProtocolViewer instances (primary first, legacy fallback after) */
2507
2740
  private readonly _protocolViewerEntries;
2741
+ /** AddressGroupRegistry contract address (undefined where not deployed) */
2742
+ readonly addressGroupRegistryAddress?: Address;
2743
+ /** AddressGroupRegistry ABI */
2744
+ readonly addressGroupRegistryAbi?: Abi;
2745
+ /** WhitelistPolicy contract address (undefined where not deployed) */
2746
+ readonly whitelistPolicyAddress?: Address;
2747
+ /** WhitelistPolicy ABI */
2748
+ readonly whitelistPolicyAbi?: Abi;
2508
2749
  /** DepositRateManagerRegistryV1 contract address */
2509
2750
  readonly rateManagerRegistryAddress?: Address;
2510
2751
  /** DepositRateManagerRegistryV1 ABI */
@@ -2517,18 +2758,19 @@ declare class Zkp2pClient {
2517
2758
  readonly rateManagerControllerAddress?: Address;
2518
2759
  /** DepositRateManagerController ABI */
2519
2760
  readonly rateManagerControllerAbi?: Abi;
2761
+ /**
2762
+ * Standalone prepaid IntentGuardian contract. Undefined where no guardian is
2763
+ * deployed, so intent extensions fail closed there.
2764
+ *
2765
+ * Not to be confused with the per-deposit `intentGuardian` parameter on
2766
+ * `createDeposit`, which is an Escrow-level intent-approval guardian.
2767
+ */
2768
+ readonly intentGuardianAddress?: Address;
2769
+ readonly intentGuardianAbi?: Abi;
2520
2770
  /** OrchestratorRegistry address */
2521
2771
  readonly orchestratorRegistryAddress?: Address;
2522
2772
  /** OrchestratorRegistry ABI */
2523
2773
  readonly orchestratorRegistryAbi?: Abi;
2524
- /** StakeVault address (undefined when staking is not deployed) */
2525
- readonly stakeVaultAddress?: Address;
2526
- /** StakeVault ABI */
2527
- readonly stakeVaultAbi?: Abi;
2528
- /** RiskManager address (undefined when stake-risk settlement is not deployed) */
2529
- readonly riskManagerAddress?: Address;
2530
- /** RiskManager ABI */
2531
- readonly riskManagerAbi?: Abi;
2532
2774
  /** Base API URL for ZKP2P services */
2533
2775
  readonly baseApiUrl?: string;
2534
2776
  /** Optional internal curator API key (`x-api-key`) for internal seller verification */
@@ -2546,9 +2788,10 @@ declare class Zkp2pClient {
2546
2788
  private readonly _router;
2547
2789
  private readonly _pvReader;
2548
2790
  private readonly _vaultOps;
2549
- private readonly _stakeOps;
2791
+ private readonly _intentGuardianOps;
2550
2792
  private readonly _intentOps;
2551
2793
  private readonly _referralOps;
2794
+ private readonly _accessPolicyOps;
2552
2795
  private _rateManagerInitError?;
2553
2796
  /**
2554
2797
  * Creates a new Zkp2pClient instance.
@@ -2614,8 +2857,7 @@ declare class Zkp2pClient {
2614
2857
  private prepareResolvedOrchestratorTransaction;
2615
2858
  private prepareContractTransaction;
2616
2859
  private buildContractMethod;
2617
- private buildStakeVaultMethod;
2618
- private buildRiskManagerMethod;
2860
+ private buildIntentGuardianMethod;
2619
2861
  private buildEscrowMethod;
2620
2862
  private buildOrchestratorMethod;
2621
2863
  /**
@@ -2918,116 +3160,6 @@ declare class Zkp2pClient {
2918
3160
  hadAllowance: boolean;
2919
3161
  hash?: Hash;
2920
3162
  }>;
2921
- /**
2922
- * Return the resolved StakeVault coordinates for advanced wallet, relayer,
2923
- * or reactive read integrations.
2924
- */
2925
- getStakeVaultContract(): {
2926
- address: Address;
2927
- abi: Abi;
2928
- stakeToken: Address;
2929
- };
2930
- /** Return the resolved OrchestratorV3 coordinates for advanced integrations. */
2931
- getOrchestratorV3Contract(): {
2932
- address: Address;
2933
- abi: Abi;
2934
- };
2935
- /** Return the resolved RiskManager coordinates for keeper integrations. */
2936
- getRiskManagerContract(): {
2937
- address: Address;
2938
- abi: Abi;
2939
- };
2940
- /**
2941
- * Ensure the connected wallet has approved enough USDC for StakeVault.
2942
- * If an approval is submitted, wait for it to confirm before depositing.
2943
- */
2944
- ensureStakeAllowance(params: {
2945
- amount: bigint;
2946
- maxApprove?: boolean;
2947
- txOverrides?: TxOverrides;
2948
- }): Promise<{
2949
- hadAllowance: boolean;
2950
- hash?: Hash;
2951
- }>;
2952
- /** Deposit USDC stake owned by the transaction sender. */
2953
- readonly depositStake: PrepareableMethod<{
2954
- txOverrides?: TxOverrides;
2955
- } & {
2956
- amount: bigint;
2957
- }, `0x${string}`>;
2958
- /** Withdraw the sender's free stake immediately; locked stake cannot move. */
2959
- readonly withdrawStake: PrepareableMethod<{
2960
- txOverrides?: TxOverrides;
2961
- } & {
2962
- amount: bigint;
2963
- }, `0x${string}`>;
2964
- /** Withdraw the sender's complete claimable USDC balance. */
2965
- readonly claim: PrepareableMethod<{
2966
- txOverrides?: TxOverrides;
2967
- }, `0x${string}`>;
2968
- /** Grant or revoke a taker's access to the sender's stake. */
2969
- readonly setTakerAuthorization: PrepareableMethod<{
2970
- txOverrides?: TxOverrides;
2971
- } & {
2972
- taker: Address;
2973
- authorized: boolean;
2974
- }, `0x${string}`>;
2975
- /** Select the authorizing stake owner that backs the connected taker. */
2976
- readonly selectStakeOwner: PrepareableMethod<{
2977
- txOverrides?: TxOverrides;
2978
- } & {
2979
- stakeOwner: Address;
2980
- }, `0x${string}`>;
2981
- /** Clear the connected taker's selection and return to self-stake. */
2982
- readonly clearStakeOwner: PrepareableMethod<{
2983
- txOverrides?: TxOverrides;
2984
- }, `0x${string}`>;
2985
- /** Read total stake owned by an address directly from StakeVault. */
2986
- getStakeBalance(stakeOwner: Address): Promise<bigint>;
2987
- /** Read stake committed to active RiskManager locks. */
2988
- getLockedStake(stakeOwner: Address): Promise<bigint>;
2989
- /** Read stake available for immediate withdrawal or a new lock. */
2990
- getFreeStake(stakeOwner: Address): Promise<bigint>;
2991
- /** Read the non-stake USDC withdrawable by a beneficiary with `claim()`. */
2992
- getClaimable(beneficiary: Address): Promise<bigint>;
2993
- /** Resolve the effective stake owner backing a taker. */
2994
- getStakeOwner(taker: Address): Promise<Address>;
2995
- /** Read a taker's raw selection, which is stale once authorization is revoked. */
2996
- getSelectedStakeOwner(taker: Address): Promise<Address>;
2997
- /** Read whether a stake owner currently authorizes a taker. */
2998
- getTakerAuthorization(stakeOwner: Address, taker: Address): Promise<boolean>;
2999
- /** Read the complete authoritative StakeVault state needed by a staking UI. */
3000
- getStakeVaultState(params: {
3001
- staker: Address;
3002
- taker?: Address;
3003
- }): Promise<StakeVaultState>;
3004
- /**
3005
- * Release one or more RiskManager positions whose chargeback window matured.
3006
- * Pass `riskManagerAddress` to pin the transaction to a snapshotted deployment.
3007
- */
3008
- readonly releaseMaturedPositions: PrepareableMethod<{
3009
- intentHashes: readonly `0x${string}`[];
3010
- riskManagerAddress?: Address;
3011
- txOverrides?: TxOverrides;
3012
- }, `0x${string}`>;
3013
- /**
3014
- * Reconcile one failed OrchestratorV3 cancellation callback.
3015
- * Pass `riskManagerAddress` to pin the transaction to a snapshotted deployment.
3016
- */
3017
- readonly reconcileCancellation: PrepareableMethod<{
3018
- intentHash: `0x${string}`;
3019
- riskManagerAddress?: Address;
3020
- txOverrides?: TxOverrides;
3021
- }, `0x${string}`>;
3022
- /**
3023
- * Reconcile multiple failed OrchestratorV3 cancellation callbacks.
3024
- * Pass `riskManagerAddress` to pin the transaction to a snapshotted deployment.
3025
- */
3026
- readonly reconcileCancellations: PrepareableMethod<{
3027
- intentHashes: readonly `0x${string}`[];
3028
- riskManagerAddress?: Address;
3029
- txOverrides?: TxOverrides;
3030
- }, `0x${string}`>;
3031
3163
  /**
3032
3164
  * Registers payee details with the curator API and returns hashed on-chain IDs.
3033
3165
  *
@@ -3431,6 +3563,58 @@ declare class Zkp2pClient {
3431
3563
  rates: bigint[][];
3432
3564
  txOverrides?: TxOverrides;
3433
3565
  }, Hash>;
3566
+ /**
3567
+ * Pay to extend a live intent through the standalone prepaid IntentGuardian.
3568
+ *
3569
+ * Payment is prepaid and non-refundable and transfers to the deposit owner,
3570
+ * not the protocol. Any account may pay for any live intent — the payer does
3571
+ * not have to be the taker — so the deposit token must be approved to the
3572
+ * guardian by whoever signs this.
3573
+ *
3574
+ * `maxCost` is required slippage protection: the guardian fee is
3575
+ * owner-governed and may change between quoting and execution, in which case
3576
+ * the call reverts with ExtensionCostExceedsMax instead of overcharging.
3577
+ * Never pass an unbounded maximum.
3578
+ *
3579
+ * Escrow still enforces the cumulative intent lifetime cap; the guardian does
3580
+ * not bypass it. After confirmation, refetch the intent — canonical expiry
3581
+ * comes from Escrow's IntentExpiryExtended event, not from guardian events.
3582
+ */
3583
+ readonly extendIntentLifetime: PrepareableMethod<{
3584
+ txOverrides?: TxOverrides;
3585
+ } & {
3586
+ escrow: Address;
3587
+ depositId: bigint;
3588
+ intentHash: Hex;
3589
+ additionalTime: bigint;
3590
+ maxCost: bigint;
3591
+ }, `0x${string}`>;
3592
+ /**
3593
+ * Live guardian policy, including whether governance has disabled extensions
3594
+ * by setting the fee to zero. Read this rather than caching a fee value.
3595
+ */
3596
+ getIntentGuardianPolicy(): Promise<IntentGuardianPolicy>;
3597
+ /**
3598
+ * Authoritative on-chain extension quote. Call immediately before signing and
3599
+ * derive `maxCost` from the result — a displayed quote is never a commitment.
3600
+ */
3601
+ quoteIntentExtension(params: {
3602
+ intentAmount: bigint;
3603
+ additionalTime: bigint;
3604
+ }): Promise<IntentGuardianQuote>;
3605
+ /**
3606
+ * Payer allowance/balance against the guardian for the target deposit token.
3607
+ * The guardian charges `deposit.token`, which is not necessarily USDC.
3608
+ */
3609
+ getIntentGuardianPayerFunding(params: {
3610
+ payer: Address;
3611
+ token: Address;
3612
+ }): Promise<{
3613
+ allowance: bigint;
3614
+ balance: bigint;
3615
+ }>;
3616
+ /** True when this deployment has a usable guardian. Gate UI on this. */
3617
+ hasIntentGuardian(): boolean;
3434
3618
  /**
3435
3619
  * Update vault manager fee.
3436
3620
  */
@@ -3711,6 +3895,14 @@ declare class Zkp2pClient {
3711
3895
  orchestratorAddress?: Address;
3712
3896
  txOverrides?: TxOverrides;
3713
3897
  }, Hash>;
3898
+ /**
3899
+ * Deposit access policies and verified address groups.
3900
+ *
3901
+ * `accessPolicy.isSupported` is false wherever the contracts are not
3902
+ * deployed. Writes are depositor-only, and saving a policy configures storage
3903
+ * rather than enforcing admission.
3904
+ */
3905
+ get accessPolicy(): AccessPolicyOperations;
3714
3906
  /**
3715
3907
  * Configure a whitelist hook for a deposit on OrchestratorV2.
3716
3908
  */
@@ -3861,36 +4053,18 @@ declare class Zkp2pClient {
3861
4053
  timeoutMs?: number;
3862
4054
  }): Promise<GetBestByPlatformResponse>;
3863
4055
  /**
3864
- * **Supporting Method** - Fetches the stake portfolio backing a taker:
3865
- * staked/pending-withdrawal/eligible/reserved/free balances, reservation
3866
- * aggregates, delegation, and exit state.
3867
- *
3868
- * @param req - Stake request parameters
3869
- * @param req.owner - Taker address (the resolved stake owner may differ)
3870
- * @param req.chainId - Chain ID
3871
- * @param opts - Optional overrides for API URL and timeout
3872
- * @returns Taker stake response
3873
- */
3874
- getTakerStake(req: GetTakerStakeRequest, opts?: {
3875
- baseApiUrl?: string;
3876
- timeoutMs?: number;
3877
- }): Promise<GetTakerStakeResponse>;
3878
- /**
3879
- * **Supporting Method** - Fetches per-platform bonded taking capacity, free
3880
- * takes, curve terms, warnings, and operational gates for a taker's shared
3881
- * stake portfolio. Platform capacities are alternative views of one shared
3882
- * balance and must never be summed.
4056
+ * **Supporting Method** - Fetches taker tier information for an address.
3883
4057
  *
3884
- * @param req - Capacity request parameters
3885
- * @param req.owner - Taker address (the resolved stake owner may differ)
4058
+ * @param req - Taker tier request parameters
4059
+ * @param req.owner - Taker address
3886
4060
  * @param req.chainId - Chain ID
3887
4061
  * @param opts - Optional overrides for API URL and timeout
3888
- * @returns Taker capacity response
4062
+ * @returns Taker tier response
3889
4063
  */
3890
- getTakerCapacity(req: GetTakerCapacityRequest, opts?: {
4064
+ getTakerTier(req: GetTakerTierRequest, opts?: {
3891
4065
  baseApiUrl?: string;
3892
4066
  timeoutMs?: number;
3893
- }): Promise<GetTakerCapacityResponse>;
4067
+ }): Promise<GetTakerTierResponse>;
3894
4068
  /**
3895
4069
  * Fetch a referral dashboard. Pass `address` for a public wallet-keyed read;
3896
4070
  * omit it to use the authenticated caller mode.
@@ -4053,15 +4227,12 @@ declare class Zkp2pClient {
4053
4227
  escrowAddresses: Address[];
4054
4228
  orchestrator?: Address;
4055
4229
  orchestratorV2?: Address;
4056
- orchestratorV3?: Address;
4057
4230
  orchestratorAddresses: Address[];
4058
4231
  protocolViewer?: Address;
4059
4232
  protocolViewerEntries: Address[];
4060
4233
  unifiedPaymentVerifier?: Address;
4061
4234
  rateManagerV1?: Address;
4062
4235
  orchestratorRegistry?: Address;
4063
- stakeVault?: Address;
4064
- riskManager?: Address;
4065
4236
  usdc?: Address;
4066
4237
  };
4067
4238
  /**
@@ -4146,4 +4317,4 @@ type SendBatchFn = (txs: Array<{
4146
4317
  value?: bigint;
4147
4318
  }>) => Promise<string>;
4148
4319
 
4149
- export { type ReferralSignatureOptions as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type GetTakerStakeRequest as E, type GetTakerStakeResponse as F, type GoogleOAuthSellerCredentialPlatform as G, type GetTakerCapacityRequest as H, type IntentEntity as I, type GetTakerCapacityResponse as J, type GetDepositBundleParams as K, type GetDepositBundleResponse as L, type GetOrderbookParams as M, type GetOrderbookResponse as N, type GetOrderbookTableResponse as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type CurrencyType as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type PaymentMethodCatalog as W, type TxOverrides as X, type ReferralBearerWriteOptions as Y, Zkp2pClient as Z, type ReferralReadOptions as _, type IdentityAttestationRequestBody as a, type WiseProfileInfo as a$, type RedeemReferralCodeSignatureOptions as a0, type SignalIntentReferralFee as a1, type SignalIntentMethodParams as a2, type FulfillIntentMethodParams as a3, type CancelIntentMethodParams as a4, type UpdateReferralCodeSignatureOptions as a5, type Zkp2pNextOptions as a6, type StakeVaultState as a7, type StakeVaultWriteFunction as a8, type StakeVaultWriteParams as a9, type QuoteSingleResponse as aA, type QuoteIntentResponse as aB, type QuoteFeesResponse as aC, type FiatResponse as aD, type TokenResponse as aE, type NearbyQuote as aF, type NearbySuggestions as aG, type ApiDeposit as aH, type DepositVerifier as aI, type DepositVerifierCurrency as aJ, type DepositStatus$1 as aK, type GetDepositByIdRequest as aL, type GetDepositByIdResponse as aM, type Intent as aN, type ApiIntentStatus as aO, type GetOwnerIntentsRequest as aP, type GetOwnerIntentsResponse as aQ, type GetIntentsByDepositRequest as aR, type GetIntentsByDepositResponse as aS, type GetIntentByHashRequest as aT, type GetIntentByHashResponse as aU, type RegisterPayeeDetailsRequest as aV, type RegisterPayeeDetailsResponse as aW, type SellerPlatform as aX, type VenmoSessionMaterial as aY, type CashAppSessionMaterial as aZ, type WiseSessionMaterial as a_, type AuthorizationTokenProvider as aa, type TimeoutConfig as ab, type ActionCallback as ac, type ReferralRedemption as ad, type ReferralSignatureBody as ae, type CreateDepositParams as af, type CreateDepositConversionRate as ag, type Range as ah, type WithdrawDepositParams as ai, type SignalIntentParams as aj, type FulfillIntentParams as ak, type ReleaseFundsToPayerParams as al, type CancelIntentParams as am, type BestByPlatformResponseObject as an, type GetBestByPlatformResponse as ao, type GetBestByPlatformResponseObject as ap, type GetPlatformQuote as aq, type PlatformQuote as ar, type QuoteRequest as as, type GetNearbyQuote as at, type GetNearbySuggestions as au, type GetQuoteResponse as av, type GetQuoteResponseObject as aw, type GetQuoteSingleResponse as ax, type QuoteResponse as ay, type QuoteResponseObject as az, type AttestationServiceSellerVerifyResponse as b, type IntentFulfilledEntity as b$, type WiseProfileSelectionRequired as b0, type WiseProfileNotFound as b1, type PayPalGoogleOAuthSellerCredentialUploadBody as b2, type VenmoCredentialUploadInput as b3, type CashAppCredentialUploadInput as b4, type WiseCredentialUploadInput as b5, type SellerCredentialUploadInputByPlatform as b6, type SellerCiphertextBundle as b7, type SellerSignedCiphertextBundle as b8, type SellerVerifyIntentDetails as b9, type IdentityAttestationActionType as bA, type IdentityAttestationOutput as bB, type IdentityAttestationOutputFor as bC, type IdentityAttestationParams as bD, type MakerIdentityAttestationRequestBody as bE, type MakerIdentityPlatform as bF, type OnchainCurrency as bG, type DepositVerifierData as bH, type PreparedTransaction as bI, type OrderStats as bJ, type DepositIntentStatistics as bK, type UsdcAmount as bL, type StakeEnvironment as bM, type TakerStakeBalances as bN, type TakerStake as bO, type PlatformStakeBackedCapacity as bP, type PlatformCapacity as bQ, type TakerCapacity as bR, type OrderbookEntry as bS, type OrderbookTableRow as bT, IndexerClient as bU, defaultIndexerEndpoint as bV, IndexerDepositService as bW, IndexerRateManagerService as bX, compareEventCursorIdsByRecency as bY, fetchFulfillmentAndPayment as bZ, type DepositEntity as b_, type SellerVerifyInput as ba, type SellerProbeInput as bb, type SellerCredentialBundleUpload as bc, type SellerCredentialStatusValue as bd, type SellerCredentialStatus as be, type SellerVerifyProxyBody as bf, type SellerTypedDataField as bg, type SellerTypedDataSpec as bh, type SellerPaymentTypedDataValue as bi, type SellerAttestationOutput as bj, type SellerCredentialProbeResponse as bk, type FulfillIntentAttestationResponse as bl, type AttestationServiceSellerCredentialProbeResponse as bm, type BuyerTeePaymentParams as bn, type BuyerTeePaymentProofInput as bo, type BuyerTeeSessionMaterial as bp, type CuratorSellerCredentialStatusResponse as bq, type CuratorSellerVerifyResponse as br, type RegisteredSellerCredentialPlatform as bs, type UploadSellerCredentialParams as bt, type RegisteredUploadSellerCredentialParams as bu, type UploadSellerCredentialOptions as bv, type GetSellerCredentialStatusParams as bw, type UploadPayPalGoogleOAuthSellerCredentialParams as bx, type UploadGoogleOAuthSellerCredentialParams as by, type VerifySellerPaymentParams as bz, type SellerCredentialUploadInput as c, type PV_ReferralFee as c$, type IntentFulfillmentAmountsEntity as c0, type DepositPaymentMethodEntity as c1, type MethodCurrencyEntity as c2, type IntentStatus as c3, type RateManagerEntity as c4, type RateManagerRateEntity as c5, type RateManagerDelegationEntity as c6, type ManagerAggregateStatsEntity as c7, type ManagerStatsEntity as c8, type ManagerDailySnapshotEntity as c9, getCurrencyCodeFromHash as cA, isSupportedCurrencyHash as cB, mapConversionRatesToOnchainMinRate as cC, type CurrencyData as cD, getContracts as cE, getRateManagerContracts as cF, getStakeVaultContract as cG, getOrchestratorV3Contract as cH, getRiskManagerContract as cI, getPaymentMethodsCatalog as cJ, getGatingServiceAddress as cK, ORCHESTRATOR_V3_ABI as cL, RISK_MANAGER_ABI as cM, STAKE_VAULT_ABI as cN, RISK_POSITION_SETTLED_EVENT_ABI as cO, DEFERRED_SETTLEMENT_FUNDED_EVENT_ABI as cP, type RuntimeEnv as cQ, type V2ContractAddresses as cR, type V2ContractAbis as cS, parseDepositView as cT, parseIntentView as cU, enrichPvDepositView as cV, enrichPvIntentView as cW, type PV_DepositView as cX, type PV_Deposit as cY, type PV_PaymentMethodData as cZ, type PV_Currency as c_, type RateManagerListItem as ca, type RateManagerDetail as cb, type ManualRateUpdateEntity as cc, type OracleConfigUpdateEntity as cd, type DepositFundActivityEntity as ce, type DepositDailySnapshotEntity as cf, type DepositFundActivityType as cg, type DepositFilter as ch, type PaginationOptions as ci, type DepositOrderField as cj, type OrderDirection$1 as ck, type RateManagerFilter as cl, type RateManagerPaginationOptions as cm, type RateManagerDelegationPaginationOptions as cn, type RateManagerOrderField as co, type OrderDirection as cp, type DeploymentEnv as cq, type FulfillmentRecord as cr, type PaymentVerifiedRecord as cs, type FulfillmentAndPaymentResponse as ct, PAYMENT_PLATFORMS as cu, type PaymentPlatformType as cv, Currency as cw, currencyInfo as cx, getCurrencyInfoFromHash as cy, getCurrencyInfoFromCountryCode as cz, type SellerCredentialUploadPlatform as d, type PV_IntentView as d0, type PV_Intent as d1, ZERO_RATE_MANAGER_ID as d2, isZeroRateManagerId as d3, normalizeRateManagerId as d4, normalizeRegistry as d5, getDelegationRoute as d6, classifyDelegationState as d7, type DelegationRoute as d8, type DelegationState as d9, type DelegationDepositTarget as da, type BatchResult as db, type SendTransactionFn as dc, type SendBatchFn as dd, ZERO_ADDRESS as de, asErrorMessage as df, assertDelegationMethodSupport as dg, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type CreateReferralCodeRequest as h, type ApiAdapterOptions as i, type CreateReferralCodeResponse as j, type ReferralReadRequest as k, type ReferralDashboardResponse as l, type ReferralEarningsResponse as m, type ReferralCodeLookupResponse as n, type RedeemReferralCodeRequest as o, type RedeemReferralCodeResponse as p, type UpdateReferralCodeRequest as q, type UpdateReferralCodeResponse as r, type GoogleOAuthSellerCredentialUploadBodyByPlatform as s, type BestByPlatformResponse as t, type ValidatePayeeDetailsResponse as u, type PostDepositDetailsResponse as v, type GetPayeeDetailsRequest as w, type GetPayeeDetailsResponse as x, type GetOwnerDepositsRequest as y, type GetOwnerDepositsResponse as z };
4320
+ export { type RedeemReferralCodeSignatureOptions as $, type AttestationServiceIdentityResponse as A, type BuyerTeeVerifyPaymentBody as B, type CuratorSellerCredentialUploadResponse as C, type DepositWithRelations as D, type GetTakerTierRequest as E, type GetTakerTierResponse as F, type GoogleOAuthSellerCredentialPlatform as G, type GetDepositBundleParams as H, type IntentEntity as I, type GetDepositBundleResponse as J, type GetOrderbookParams as K, type GetOrderbookResponse as L, type GetOrderbookTableResponse as M, type CurrencyType as N, type PaymentMethodCatalog as O, type PostDepositDetailsRequest as P, type QuotesBestByPlatformRequest as Q, type ReferrerFeeConfig as R, type SellerCredentialBundle as S, type TakerTierLevel as T, type UploadSellerCredentialBundleParams as U, type ValidatePayeeDetailsRequest as V, type TxOverrides as W, type ReferralBearerWriteOptions as X, type ReferralReadOptions as Y, Zkp2pClient as Z, type ReferralSignatureOptions as _, type IdentityAttestationRequestBody as a, type CashAppSessionMaterial as a$, type SignalIntentReferralFee as a0, type SignalIntentMethodParams as a1, type FulfillIntentMethodParams as a2, type CancelIntentMethodParams as a3, type UpdateReferralCodeSignatureOptions as a4, type Zkp2pNextOptions as a5, type IntentGuardianPolicy as a6, type IntentGuardianQuote as a7, type IntentGuardianWriteFunction as a8, type IntentGuardianWriteParams as a9, type QuoteResponse as aA, type QuoteResponseObject as aB, type QuoteSingleResponse as aC, type QuoteIntentResponse as aD, type QuoteFeesResponse as aE, type FiatResponse as aF, type TokenResponse as aG, type NearbyQuote as aH, type NearbySuggestions as aI, type ApiDeposit as aJ, type DepositVerifier as aK, type DepositVerifierCurrency as aL, type DepositStatus$1 as aM, type GetDepositByIdRequest as aN, type GetDepositByIdResponse as aO, type Intent as aP, type ApiIntentStatus as aQ, type GetOwnerIntentsRequest as aR, type GetOwnerIntentsResponse as aS, type GetIntentsByDepositRequest as aT, type GetIntentsByDepositResponse as aU, type GetIntentByHashRequest as aV, type GetIntentByHashResponse as aW, type RegisterPayeeDetailsRequest as aX, type RegisterPayeeDetailsResponse as aY, type SellerPlatform as aZ, type VenmoSessionMaterial as a_, type IntentGuardianErrorCode as aa, classifyIntentGuardianError as ab, type AuthorizationTokenProvider as ac, type TimeoutConfig as ad, type ActionCallback as ae, type ReferralRedemption as af, type ReferralSignatureBody as ag, type CreateDepositParams as ah, type CreateDepositConversionRate as ai, type Range as aj, type WithdrawDepositParams as ak, type SignalIntentParams as al, type FulfillIntentParams as am, type ReleaseFundsToPayerParams as an, type CancelIntentParams as ao, type BestByPlatformResponseObject as ap, type GetBestByPlatformResponse as aq, type GetBestByPlatformResponseObject as ar, type GetPlatformQuote as as, type PlatformQuote as at, type QuoteRequest as au, type GetNearbyQuote as av, type GetNearbySuggestions as aw, type GetQuoteResponse as ax, type GetQuoteResponseObject as ay, type GetQuoteSingleResponse as az, type AttestationServiceSellerVerifyResponse as b, type DepositEntity as b$, type WiseSessionMaterial as b0, type WiseProfileInfo as b1, type WiseProfileSelectionRequired as b2, type WiseProfileNotFound as b3, type PayPalGoogleOAuthSellerCredentialUploadBody as b4, type VenmoCredentialUploadInput as b5, type CashAppCredentialUploadInput as b6, type WiseCredentialUploadInput as b7, type SellerCredentialUploadInputByPlatform as b8, type SellerCiphertextBundle as b9, type UploadGoogleOAuthSellerCredentialParams as bA, type VerifySellerPaymentParams as bB, type IdentityAttestationActionType as bC, type IdentityAttestationOutput as bD, type IdentityAttestationOutputFor as bE, type IdentityAttestationParams as bF, type MakerIdentityAttestationRequestBody as bG, type MakerIdentityPlatform as bH, type OnchainCurrency as bI, type DepositVerifierData as bJ, type PreparedTransaction as bK, type OrderStats as bL, type DepositIntentStatistics as bM, type TakerTier as bN, type TakerTierVolumeBreakdown as bO, type TakerTierStats as bP, type TakerTierSource as bQ, type PlatformLimit as bR, type PlatformRiskLevel as bS, type OrderbookEntry as bT, type OrderbookTableRow as bU, IndexerClient as bV, defaultIndexerEndpoint as bW, IndexerDepositService as bX, IndexerRateManagerService as bY, compareEventCursorIdsByRecency as bZ, fetchFulfillmentAndPayment as b_, type SellerSignedCiphertextBundle as ba, type SellerVerifyIntentDetails as bb, type SellerVerifyInput as bc, type SellerProbeInput as bd, type SellerCredentialBundleUpload as be, type SellerCredentialStatusValue as bf, type SellerCredentialStatus as bg, type SellerVerifyProxyBody as bh, type SellerTypedDataField as bi, type SellerTypedDataSpec as bj, type SellerPaymentTypedDataValue as bk, type SellerAttestationOutput as bl, type SellerCredentialProbeResponse as bm, type FulfillIntentAttestationResponse as bn, type AttestationServiceSellerCredentialProbeResponse as bo, type BuyerTeePaymentParams as bp, type BuyerTeePaymentProofInput as bq, type BuyerTeeSessionMaterial as br, type CuratorSellerCredentialStatusResponse as bs, type CuratorSellerVerifyResponse as bt, type RegisteredSellerCredentialPlatform as bu, type UploadSellerCredentialParams as bv, type RegisteredUploadSellerCredentialParams as bw, type UploadSellerCredentialOptions as bx, type GetSellerCredentialStatusParams as by, type UploadPayPalGoogleOAuthSellerCredentialParams as bz, type SellerCredentialUploadInput as c, getDelegationRoute as c$, type IntentFulfilledEntity as c0, type IntentFulfillmentAmountsEntity as c1, type DepositPaymentMethodEntity as c2, type MethodCurrencyEntity as c3, type IntentStatus as c4, type RateManagerEntity as c5, type RateManagerRateEntity as c6, type RateManagerDelegationEntity as c7, type ManagerAggregateStatsEntity as c8, type ManagerStatsEntity as c9, getCurrencyInfoFromCountryCode as cA, getCurrencyCodeFromHash as cB, isSupportedCurrencyHash as cC, mapConversionRatesToOnchainMinRate as cD, type CurrencyData as cE, getContracts as cF, getIntentGuardianContract as cG, hasIntentGuardian as cH, getRateManagerContracts as cI, getPaymentMethodsCatalog as cJ, getGatingServiceAddress as cK, type RuntimeEnv as cL, parseDepositView as cM, parseIntentView as cN, enrichPvDepositView as cO, enrichPvIntentView as cP, type PV_DepositView as cQ, type PV_Deposit as cR, type PV_PaymentMethodData as cS, type PV_Currency as cT, type PV_ReferralFee as cU, type PV_IntentView as cV, type PV_Intent as cW, ZERO_RATE_MANAGER_ID as cX, isZeroRateManagerId as cY, normalizeRateManagerId as cZ, normalizeRegistry as c_, type ManagerDailySnapshotEntity as ca, type RateManagerListItem as cb, type RateManagerDetail as cc, type ManualRateUpdateEntity as cd, type OracleConfigUpdateEntity as ce, type DepositFundActivityEntity as cf, type DepositDailySnapshotEntity as cg, type DepositFundActivityType as ch, type DepositFilter as ci, type PaginationOptions as cj, type DepositOrderField as ck, type OrderDirection$1 as cl, type RateManagerFilter as cm, type RateManagerPaginationOptions as cn, type RateManagerDelegationPaginationOptions as co, type RateManagerOrderField as cp, type OrderDirection as cq, type DeploymentEnv as cr, type FulfillmentRecord as cs, type PaymentVerifiedRecord as ct, type FulfillmentAndPaymentResponse as cu, PAYMENT_PLATFORMS as cv, type PaymentPlatformType as cw, Currency as cx, currencyInfo as cy, getCurrencyInfoFromHash as cz, type SellerCredentialUploadPlatform as d, classifyDelegationState as d0, type DelegationRoute as d1, type DelegationState as d2, type DelegationDepositTarget as d3, type BatchResult as d4, type SendTransactionFn as d5, type SendBatchFn as d6, AccessPolicyOperations as d7, AccessPolicyUnsupportedError as d8, MAX_GROUPS_PER_DEPOSIT as d9, MAX_ADDRESSES_PER_CALL as da, MAX_WHITELISTED_ADDRESSES as db, diffAccessPolicy as dc, normalizeAccessPolicyState as dd, planAccessPolicyUpdate as de, type AccessPolicyDiff as df, type AccessPolicyOrdering as dg, type AccessPolicyPlan as dh, type AccessPolicyPlanStep as di, type AccessPolicyState as dj, type AccessPolicyViolation as dk, ZERO_ADDRESS as dl, asErrorMessage as dm, assertDelegationMethodSupport as dn, type SellerCredentialAttestationRuntime as e, type AttestationServiceSellerCredentialUploadResponse as f, type BuyerTeeSessionMaterialEncryptionInput as g, type CreateReferralCodeRequest as h, type ApiAdapterOptions as i, type CreateReferralCodeResponse as j, type ReferralReadRequest as k, type ReferralDashboardResponse as l, type ReferralEarningsResponse as m, type ReferralCodeLookupResponse as n, type RedeemReferralCodeRequest as o, type RedeemReferralCodeResponse as p, type UpdateReferralCodeRequest as q, type UpdateReferralCodeResponse as r, type GoogleOAuthSellerCredentialUploadBodyByPlatform as s, type BestByPlatformResponse as t, type ValidatePayeeDetailsResponse as u, type PostDepositDetailsResponse as v, type GetPayeeDetailsRequest as w, type GetPayeeDetailsResponse as x, type GetOwnerDepositsRequest as y, type GetOwnerDepositsResponse as z };