@zkp2p/sdk 0.14.8 → 0.15.0-rc.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.
package/dist/index.mjs CHANGED
@@ -2,376 +2,817 @@ import { IntentGuardianOperations } from './chunk-YA67SM3A.mjs';
2
2
  export { ZERO_RATE_MANAGER_ID, classifyDelegationState, classifyIntentGuardianError, getDelegationRoute, isZeroRateManagerId, normalizeRateManagerId, normalizeRegistry } from './chunk-YA67SM3A.mjs';
3
3
  import { NetworkError, ValidationError, ContractError, APIError } from './chunk-3J4FPMPW.mjs';
4
4
  export { APIError, ContractError, ErrorCode, NetworkError, ValidationError, ZKP2PError } from './chunk-3J4FPMPW.mjs';
5
- import { OrchestratorRegistry_default, DISPUTE_PROTECTION_POLICY_ABI, DisputeProtectionPolicy_default, METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, MultiAttestationVerifier_default, getContracts, getRateManagerContracts, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash, OrchestratorV3_default, DisputeNullifierRegistry_default, DisputeVerifier_default, WhitelistPolicy_default, StakeVault_default, IntentLifecycleHookV1_default } from './chunk-Q33OEQMR.mjs';
6
- export { DISPUTE_PROTECTION_POLICY_ABI2 as DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-Q33OEQMR.mjs';
5
+ import { METHOD_NAME_TO_HASH, matchesQuotePaymentMethod, matchesPaymentMethodNameAndHash, getDisputeStackAbis, NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI, getContracts, getRateManagerContracts, getPaymentValidationPolicyContract, getPaymentMethodsCatalog, resolvePaymentMethodHashFromCatalog, getGatingServiceAddress, parseBigIntLike, SUPPORTED_PAYMENT_METHOD_HASHES, getKnownStakeVaultContracts, getOrchestratorV3Contract, getDisputeProtectionPolicyContract, resolveFiatCurrencyBytes32, resolvePaymentMethodNameFromHash } from './chunk-ZYCDBPQR.mjs';
6
+ export { DISPUTE_PROTECTION_POLICY_ABI, NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI, ORCHESTRATOR_V3_ABI, PAYMENT_PLATFORMS, STAKE_VAULT_ABI, asciiToBytes32, enrichPvDepositView, enrichPvIntentView, ensureBytes32, getContracts, getDisputeProtectionPolicyContract, getGatingServiceAddress, getIntentGuardianContract, getOrchestratorV3Contract, getPaymentMethodsCatalog, getPaymentValidationPolicyContract, getRateManagerContracts, getStakeVaultContract, hasIntentGuardian, parseDepositView, parseIntentView, resolveFiatCurrencyBytes32, resolvePaymentMethodHash, resolvePaymentMethodHashFromCatalog, resolvePaymentMethodNameFromHash } from './chunk-ZYCDBPQR.mjs';
7
7
  import { Currency, currencyKeccak256 } from './chunk-WDEEWFEU.mjs';
8
8
  export { Currency, currencyInfo, getCurrencyCodeFromHash, getCurrencyInfoFromCountryCode, getCurrencyInfoFromHash, isSupportedCurrencyHash, mapConversionRatesToOnchainMinRate } from './chunk-WDEEWFEU.mjs';
9
- import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-HG27KAGT.mjs';
10
- import { keccak256, parseUnits, concatHex, encodeFunctionData, encodeAbiParameters, createPublicClient, http, parseEventLogs, isAddressEqual, isAddress, zeroAddress, formatUnits } from 'viem';
9
+ import { define_ZKP2P_SDK_BUILD_METADATA_default } from './chunk-6K2RTFER.mjs';
10
+ import { keccak256, parseUnits, concatHex, encodeFunctionData, encodeAbiParameters, decodeAbiParameters, parseAbi, isAddress, isHex, isAddressEqual, createPublicClient, http, parseEventLogs, zeroAddress, formatUnits } from 'viem';
11
11
  import { hardhat, base } from 'viem/chains';
12
12
  import { hashUtf8, createNitroAttestationClient, verifySellerCredentialBundle, NitroAttestationError, createEncryptedBuyerTeeSessionMaterial as createEncryptedBuyerTeeSessionMaterial$1, createEncryptedSellerCredentialUpload } from '@zkp2p/zkp2p-attestation';
13
13
  export { createNitroAttestationClient, verifyDisputeAttestation } from '@zkp2p/zkp2p-attestation';
14
14
  import { AbiCoder } from 'ethers';
15
15
  import { Attribution } from 'ox/erc8021';
16
16
 
17
- var currencyKeccak2562 = (inputString) => {
18
- const bytes = new TextEncoder().encode(inputString);
19
- return keccak256(bytes);
20
- };
21
- var Currency2 = {
22
- AED: "AED",
23
- ARS: "ARS",
24
- AUD: "AUD",
25
- BRL: "BRL",
26
- CAD: "CAD",
27
- CHF: "CHF",
28
- CNY: "CNY",
29
- CZK: "CZK",
30
- DKK: "DKK",
31
- EUR: "EUR",
32
- GBP: "GBP",
33
- HKD: "HKD",
34
- HUF: "HUF",
35
- IDR: "IDR",
36
- ILS: "ILS",
37
- INR: "INR",
38
- JPY: "JPY",
39
- KES: "KES",
40
- NOK: "NOK",
41
- MXN: "MXN",
42
- MYR: "MYR",
43
- NZD: "NZD",
44
- PHP: "PHP",
45
- PLN: "PLN",
46
- RON: "RON",
47
- SAR: "SAR",
48
- SEK: "SEK",
49
- SGD: "SGD",
50
- THB: "THB",
51
- TRY: "TRY",
52
- UGX: "UGX",
53
- UAH: "UAH",
54
- USD: "USD",
55
- VND: "VND",
56
- ZAR: "ZAR"
57
- };
58
- var currencyInfo2 = {
59
- [Currency2.AED]: {
60
- currency: Currency2.AED,
61
- currencyCode: "AED",
62
- currencyName: "United Arab Emirates Dirham",
63
- currencyCodeHash: currencyKeccak2562("AED"),
64
- currencySymbol: "\u062F.\u0625",
65
- countryCode: "ae"
17
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.5_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/base.js
18
+ var data = {
19
+ "schemaVersion": 2,
20
+ "network": "base",
21
+ "chainId": 8453,
22
+ "activeDisputeStack": {
23
+ "version": 2,
24
+ "selectionHash": "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c"
66
25
  },
67
- [Currency2.ARS]: {
68
- currency: Currency2.ARS,
69
- currencyCode: "ARS",
70
- currencyName: "Argentine Peso",
71
- currencyCodeHash: currencyKeccak2562("ARS"),
72
- currencySymbol: "$",
73
- countryCode: "ar"
26
+ "runtimeIdentities": {
27
+ "Orchestrator": {
28
+ "address": "0x88888883Ed048FF0a415271B28b2F52d431810D0",
29
+ "runtimeCodeHash": "0xf511343f2903dd1877c490796cc9423fac66b162b59004d55e522046c1ceb050"
30
+ },
31
+ "OrchestratorV2": {
32
+ "address": "0x888888359E981B5225CA48fbCdCeff702FC3b888",
33
+ "runtimeCodeHash": "0xcf70a08cc24fcc00799f9f365d0998abe37c718c93ee370a78d1ca06c60d01e0"
34
+ },
35
+ "OrchestratorV3": {
36
+ "address": "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7",
37
+ "runtimeCodeHash": "0x4e58f26129559301c017ff264b61dd2255ed2107593d308472ef32d07b8745e9"
38
+ },
39
+ "StakeVault": {
40
+ "address": "0x47c26258222e2f96424bD2B21bf173f0DA5034C7",
41
+ "runtimeCodeHash": "0xfd8d2a910b9ac2c55675ae06d0504f9aac43b02b7022755cf229b571156c681d"
42
+ },
43
+ "DisputeProtectionPolicy": {
44
+ "address": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
45
+ "runtimeCodeHash": "0xf5a7756f16556da69c91c55bdcffd9fd95cc8cbdb772699827ec4c66db136dfe"
46
+ },
47
+ "IntentLifecycleHookV1": {
48
+ "address": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
49
+ "runtimeCodeHash": "0x2b479a570ddea7a990f2cae8fa95eb3b8599fc8b367332b8dab92f7d0cebf7e0"
50
+ },
51
+ "RecognizedPredecessorHook": {
52
+ "address": "0x71467dCac3B50eeED5A485aC6a70f27B1EAC1970",
53
+ "runtimeCodeHash": "0x35789014e608a248f3244b61210fa259fee3566c33f50fd0e3fa1f5ae22e370b"
54
+ },
55
+ "RecognizedPredecessorPolicy": {
56
+ "address": "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA",
57
+ "runtimeCodeHash": "0x9c4be279da216021183638eaef79ebf98db248472685e9ecd0de3f24a513a641"
58
+ },
59
+ "OrchestratorRegistry": {
60
+ "address": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
61
+ "runtimeCodeHash": "0xf0d132d621ac03181a6fade6a93bd0968d33830c8bf393793236787e7978aee1"
62
+ },
63
+ "WhitelistPolicy": {
64
+ "address": "0x389Cd9bA91FfFcd83d267B241E975541892759Ce",
65
+ "runtimeCodeHash": "0xa83d138a5b89d2fd2861702febc6333e542dcdc8994ee76c345dcbd22fe685a4"
66
+ },
67
+ "DisputeVerifier": {
68
+ "address": "0x30d4947f005653637005eed991005119D9eB2f34",
69
+ "runtimeCodeHash": "0x65246e11392befc33d92246cf3ac2467d1f338a8b73c6514b76fab0a70a01ead"
70
+ },
71
+ "DisputeNullifierRegistry": {
72
+ "address": "0xA845615b5203F7a21321DdF5e3a1ca024D93a443",
73
+ "runtimeCodeHash": "0x1a711749b7700142265363c9c184c195ac81a1415e2142aa84edcbf1cd88142a"
74
+ },
75
+ "MultiAttestationVerifier": {
76
+ "address": "0x9Fe920b24e50e6a6362BA71a1BeB502A99c402d5",
77
+ "runtimeCodeHash": "0x828a5dae520d3eaed904dfed56994dc6e892eb6416b58ad952c079e220ef841a"
78
+ }
74
79
  },
75
- [Currency2.AUD]: {
76
- currency: Currency2.AUD,
77
- currencyCode: "AUD",
78
- currencyName: "Australian Dollar",
79
- currencyCodeHash: currencyKeccak2562("AUD"),
80
- currencySymbol: "A$",
81
- countryCode: "au"
80
+ "addressExpectations": {
81
+ "AddressGroupRegistry": "0x39F80118f9eB619135f116171b6Cb91D372C5AF2",
82
+ "EscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
83
+ "PaymentVerifierRegistry": "0x2b82D24437ff66Fb173eabDfD67ee2ACeb8bEb1e",
84
+ "RelayerRegistry": "0xEbA979889a9c97382A92472fF3703786fF180083",
85
+ "NullifierRegistryV2": "0x5455e761b866dfa6A2f5Dc6d6525825bf9C09aeB",
86
+ "StakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
82
87
  },
83
- [Currency2.BRL]: {
84
- currency: Currency2.BRL,
85
- currencyCode: "BRL",
86
- currencyName: "Brazilian Real",
87
- currencyCodeHash: currencyKeccak2562("BRL"),
88
- currencySymbol: "R$",
89
- countryCode: "br"
88
+ "expectedRelations": {
89
+ "activeLifecycleHook": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
90
+ "recognizedPredecessorPolicy": "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA",
91
+ "registeredOrchestrator": "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7",
92
+ "authorizedLifecycleHook": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
93
+ "disputeNullifierAuthorizedWriter": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
94
+ "orchestratorEscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
95
+ "orchestratorPaymentVerifierRegistry": "0x2b82D24437ff66Fb173eabDfD67ee2ACeb8bEb1e",
96
+ "orchestratorRelayerRegistry": "0xEbA979889a9c97382A92472fF3703786fF180083",
97
+ "hookOrchestratorRegistry": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
98
+ "hookWhitelistPolicy": "0x389Cd9bA91FfFcd83d267B241E975541892759Ce",
99
+ "hookDisputeProtectionPolicy": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
100
+ "whitelistGroupRegistry": "0x39F80118f9eB619135f116171b6Cb91D372C5AF2",
101
+ "whitelistEscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
102
+ "whitelistOrchestratorRegistry": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
103
+ "policyStakeVault": "0x47c26258222e2f96424bD2B21bf173f0DA5034C7",
104
+ "policyDisputeVerifier": "0x30d4947f005653637005eed991005119D9eB2f34",
105
+ "policyDisputeNullifierRegistry": "0xA845615b5203F7a21321DdF5e3a1ca024D93a443",
106
+ "disputeVerifierNullifierRegistry": "0x5455e761b866dfa6A2f5Dc6d6525825bf9C09aeB",
107
+ "disputeVerifierAttestationVerifier": "0x9Fe920b24e50e6a6362BA71a1BeB502A99c402d5",
108
+ "vaultController": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
109
+ "vaultStakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
90
110
  },
91
- [Currency2.CAD]: {
92
- currency: Currency2.CAD,
93
- currencyCode: "CAD",
94
- currencyName: "Canadian Dollar",
95
- currencyCodeHash: currencyKeccak2562("CAD"),
96
- currencySymbol: "C$",
97
- countryCode: "ca"
111
+ "expectedGovernance": {
112
+ "owner": "0x0bC26FF515411396DD588Abd6Ef6846E04470227",
113
+ "governedRuntimeIdentities": [
114
+ "OrchestratorRegistry",
115
+ "OrchestratorV3",
116
+ "StakeVault",
117
+ "DisputeProtectionPolicy",
118
+ "WhitelistPolicy",
119
+ "DisputeVerifier",
120
+ "DisputeNullifierRegistry",
121
+ "MultiAttestationVerifier"
122
+ ],
123
+ "pendingOwner": "0x0000000000000000000000000000000000000000",
124
+ "twoStepGovernedRuntimeIdentities": [
125
+ "StakeVault",
126
+ "DisputeProtectionPolicy",
127
+ "DisputeVerifier"
128
+ ]
98
129
  },
99
- [Currency2.CHF]: {
100
- currency: Currency2.CHF,
101
- currencyCode: "CHF",
102
- currencyName: "Swiss Franc",
103
- currencyCodeHash: currencyKeccak2562("CHF"),
104
- currencySymbol: "Fr",
105
- countryCode: "ch"
130
+ "attestationTrust": {
131
+ "requiredSignatures": "1",
132
+ "witnesses": [
133
+ "0xDB4Ed7FAF170F0f6493E3adaaCaaFaF47092c754",
134
+ "0xE078D93bFdd87A8c5C5cCA5905DCbA0Dd7A1F0BD"
135
+ ]
106
136
  },
107
- [Currency2.CNY]: {
108
- currency: Currency2.CNY,
109
- currencyCode: "CNY",
110
- currencyName: "Chinese Yuan",
111
- currencyCodeHash: currencyKeccak2562("CNY"),
112
- currencySymbol: "\xA5",
113
- countryCode: "cn"
137
+ "exactAuthorizationSets": {
138
+ "orchestratorAuthorizationFromBlock": "42878566",
139
+ "authorizedOrchestrators": [
140
+ "0x88888883Ed048FF0a415271B28b2F52d431810D0",
141
+ "0x888888359E981B5225CA48fbCdCeff702FC3b888",
142
+ "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7"
143
+ ],
144
+ "lifecycleHookAuthorizationFromBlock": "50537204",
145
+ "authorizedLifecycleHooks": [
146
+ "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031"
147
+ ],
148
+ "passiveDisputeNullifierWriters": [
149
+ "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA"
150
+ ],
151
+ "activeDisputeNullifierWriters": [
152
+ "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc"
153
+ ]
114
154
  },
115
- [Currency2.CZK]: {
116
- currency: Currency2.CZK,
117
- currencyCode: "CZK",
118
- currencyName: "Czech Koruna",
119
- currencyCodeHash: currencyKeccak2562("CZK"),
120
- currencySymbol: "K\u010D",
121
- countryCode: "cz"
155
+ "riskWindowSecondsByPaymentMethod": {
156
+ "0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
157
+ "0x1d966dbd6aeb8674d7c05174bd0ded7b56a798672bfb862ef20bbe8c2bbfce18": "0",
158
+ "0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
159
+ "0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
160
+ "0x5908bb0c9b87763ac6171d4104847667e7f02b4c47b574fe890c1f439ed128bb": "0",
161
+ "0x617f88ab82b5c1b014c539f7e75121427f0bb50a4c58b187a238531e7d58605d": "0",
162
+ "0x62c7ed738ad3e7618111348af32691b5767777fbaf46a2d8943237625552645c": "0",
163
+ "0x790dd0cc68b6e7f474649a6c0a5463a964be9d2589e2076b6dc99f5701543f51": "0",
164
+ "0x90262a3db0edd0be2369c6b28f9e8511ec0bac7136cefbada0880602f87e7268": "1209600",
165
+ "0xa5418819c024239299ea32e09defae8ec412c03e58f5c75f1b2fe84c857f5483": "0",
166
+ "0xcac9daea62d7b89d75ac73af4ee14dcf25721012ae82b568c2ea5c808eaa04ff": "0",
167
+ "0xe99a5081226cbbff9440a63da5caa04fa30f210c12c4dd9976132ac075054cd9": "0",
168
+ "0xf752c7d19698ecb0bb8988abf9b9a53a4c3657f3bc8850a6fb59fdf3e3ce8cd3": "0"
122
169
  },
123
- [Currency2.DKK]: {
124
- currency: Currency2.DKK,
125
- currencyCode: "DKK",
126
- currencyName: "Danish Krone",
127
- currencyCodeHash: currencyKeccak2562("DKK"),
128
- currencySymbol: "kr",
129
- countryCode: "dk"
170
+ "sentinel": {
171
+ "escrow": "0x0000000000000000000000000000000000000001",
172
+ "depositId": "0",
173
+ "expected": false
130
174
  },
131
- [Currency2.EUR]: {
132
- currency: Currency2.EUR,
133
- currencyCode: "EUR",
134
- currencyName: "Euro",
135
- currencyCodeHash: currencyKeccak2562("EUR"),
136
- currencySymbol: "\u20AC",
137
- countryCode: "eu"
138
- },
139
- [Currency2.GBP]: {
140
- currency: Currency2.GBP,
141
- currencyCode: "GBP",
142
- currencyName: "British Pound",
143
- currencyCodeHash: currencyKeccak2562("GBP"),
144
- currencySymbol: "\xA3",
145
- countryCode: "gb"
146
- },
147
- [Currency2.HKD]: {
148
- currency: Currency2.HKD,
149
- currencyCode: "HKD",
150
- currencyName: "Hong Kong Dollar",
151
- currencyCodeHash: currencyKeccak2562("HKD"),
152
- currencySymbol: "HK$",
153
- countryCode: "hk"
154
- },
155
- [Currency2.HUF]: {
156
- currency: Currency2.HUF,
157
- currencyCode: "HUF",
158
- currencyName: "Hungarian Forint",
159
- currencyCodeHash: currencyKeccak2562("HUF"),
160
- currencySymbol: "Ft",
161
- countryCode: "hu"
162
- },
163
- [Currency2.IDR]: {
164
- currency: Currency2.IDR,
165
- currencyCode: "IDR",
166
- currencyName: "Indonesian Rupiah",
167
- currencyCodeHash: currencyKeccak2562("IDR"),
168
- currencySymbol: "Rp",
169
- countryCode: "id"
170
- },
171
- [Currency2.INR]: {
172
- currency: Currency2.INR,
173
- currencyCode: "INR",
174
- currencyName: "Indian Rupee",
175
- currencyCodeHash: currencyKeccak2562("INR"),
176
- currencySymbol: "\u20B9",
177
- countryCode: "in"
178
- },
179
- [Currency2.ILS]: {
180
- currency: Currency2.ILS,
181
- currencyCode: "ILS",
182
- currencyName: "Israeli New Shekel",
183
- currencyCodeHash: currencyKeccak2562("ILS"),
184
- currencySymbol: "\u20AA",
185
- countryCode: "il"
175
+ "prerequisites": {
176
+ "orchestratorPaused": false,
177
+ "admissionsPaused": false,
178
+ "allowMultipleIntents": true,
179
+ "orchestratorRegistered": true,
180
+ "lifecycleHookAuthorized": true,
181
+ "disputeNullifierWriterAuthorized": true,
182
+ "vaultControllerActivated": true,
183
+ "vaultPendingController": "0x0000000000000000000000000000000000000000",
184
+ "vaultPendingControllerValidAt": "0",
185
+ "pendingCoverageMaturity": "18446744073709551615"
186
+ }
187
+ };
188
+ var base_default = data;
189
+
190
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.5_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/baseStaging.js
191
+ var data2 = {
192
+ "schemaVersion": 2,
193
+ "network": "base_staging",
194
+ "chainId": 8453,
195
+ "activeDisputeStack": {
196
+ "version": 2,
197
+ "selectionHash": "e3b360a09c2f541052ab7519987862e1f59c0efc9bc25daea09937e9ea59b783"
186
198
  },
187
- [Currency2.JPY]: {
188
- currency: Currency2.JPY,
189
- currencyCode: "JPY",
190
- currencyName: "Japanese Yen",
191
- currencyCodeHash: currencyKeccak2562("JPY"),
192
- currencySymbol: "\xA5",
193
- countryCode: "jp"
199
+ "runtimeIdentities": {
200
+ "Orchestrator": {
201
+ "address": "0xF9b9CD27Deea496B960b3cb5221b514705fCaF5e",
202
+ "runtimeCodeHash": "0xf511343f2903dd1877c490796cc9423fac66b162b59004d55e522046c1ceb050"
203
+ },
204
+ "OrchestratorV2": {
205
+ "address": "0xc17a59227B136c45fAa153086a15EF87ED14bE00",
206
+ "runtimeCodeHash": "0xcf70a08cc24fcc00799f9f365d0998abe37c718c93ee370a78d1ca06c60d01e0"
207
+ },
208
+ "OrchestratorV3": {
209
+ "address": "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f",
210
+ "runtimeCodeHash": "0x4e58f26129559301c017ff264b61dd2255ed2107593d308472ef32d07b8745e9"
211
+ },
212
+ "StakeVault": {
213
+ "address": "0x6b32df91EB92637F64bA444996702fC9582C87a1",
214
+ "runtimeCodeHash": "0x3ce00cf0a7e325a116e87ea330c8997b94df705e4e0653d3de9484fca614356e"
215
+ },
216
+ "DisputeProtectionPolicy": {
217
+ "address": "0x1a9C442E3Ae99fB08313242fCdA601431027B39C",
218
+ "runtimeCodeHash": "0x496cfd95e23692cb7e282cfe7911797d16056b973d2bacfb44ff30c179c719e0"
219
+ },
220
+ "IntentLifecycleHookV1": {
221
+ "address": "0xec27Cc47370267c843177375c3Fe43D29D498bB4",
222
+ "runtimeCodeHash": "0x42574848f3e7e0bda80a2715bbe10a6317134211e4de6c2455baaed4ef792f61"
223
+ },
224
+ "RecognizedPredecessorHook": {
225
+ "address": "0x5A7f6cb7397134da1fDEFA7E2D434b4Cf18E56D9",
226
+ "runtimeCodeHash": "0xb9ce42108c706f9241aeb41ffdc0da6b7584e8482183055452098b2f16c7abfd"
227
+ },
228
+ "RecognizedPredecessorPolicy": {
229
+ "address": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
230
+ "runtimeCodeHash": "0x70c43bfae8253a6a166f9697ddc27b2d77b4d9841e01fefc2db84037d9a98622"
231
+ },
232
+ "OrchestratorRegistry": {
233
+ "address": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
234
+ "runtimeCodeHash": "0xf0d132d621ac03181a6fade6a93bd0968d33830c8bf393793236787e7978aee1"
235
+ },
236
+ "WhitelistPolicy": {
237
+ "address": "0xF79aAD1BAaB617fF3Eb299225c80893F22F743Fe",
238
+ "runtimeCodeHash": "0x1ece96bb7be9cdd2433a2aad66c9b2d710e3e210a65876e0f8c1e43662ee5653"
239
+ },
240
+ "DisputeVerifier": {
241
+ "address": "0x973578148c5Fd49b9f68B50B26066555325AC708",
242
+ "runtimeCodeHash": "0xb3b34734cfd162cd129d0c84285461c751321545213ec20164745b8e72f9dd6c"
243
+ },
244
+ "DisputeNullifierRegistry": {
245
+ "address": "0xE0B05a9655AF0f31E32904267baa50FbC7f217ea",
246
+ "runtimeCodeHash": "0x1a711749b7700142265363c9c184c195ac81a1415e2142aa84edcbf1cd88142a"
247
+ },
248
+ "MultiAttestationVerifier": {
249
+ "address": "0x9855a39aC5975069632e91160d8712CBfF19e864",
250
+ "runtimeCodeHash": "0x828a5dae520d3eaed904dfed56994dc6e892eb6416b58ad952c079e220ef841a"
251
+ }
194
252
  },
195
- [Currency2.KES]: {
196
- currency: Currency2.KES,
197
- currencyCode: "KES",
198
- currencyName: "Kenyan Shilling",
199
- currencyCodeHash: currencyKeccak2562("KES"),
200
- currencySymbol: "KSh",
201
- countryCode: "ke"
253
+ "addressExpectations": {
254
+ "AddressGroupRegistry": "0x54Ff7788Cb42B46FE2F016a65Fd0f654Bb9BcF3D",
255
+ "EscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
256
+ "PaymentVerifierRegistry": "0x2261416DA54C85f975C73FA56EF4D2D6b0aEF7Cc",
257
+ "RelayerRegistry": "0xB214650b424E6b5fdcB1259566eB7A512D8Bd25E",
258
+ "NullifierRegistryV2": "0x2eb43d6C7c7Ec4220Aa6B8735BC053824a71778C",
259
+ "StakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
202
260
  },
203
- [Currency2.MXN]: {
204
- currency: Currency2.MXN,
205
- currencyCode: "MXN",
206
- currencyName: "Mexican Peso",
207
- currencyCodeHash: currencyKeccak2562("MXN"),
208
- currencySymbol: "$",
209
- countryCode: "mx"
261
+ "expectedRelations": {
262
+ "activeLifecycleHook": "0xec27Cc47370267c843177375c3Fe43D29D498bB4",
263
+ "recognizedPredecessorPolicy": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
264
+ "registeredOrchestrator": "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f",
265
+ "authorizedLifecycleHook": "0xec27Cc47370267c843177375c3Fe43D29D498bB4",
266
+ "disputeNullifierAuthorizedWriter": "0x1a9C442E3Ae99fB08313242fCdA601431027B39C",
267
+ "orchestratorEscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
268
+ "orchestratorPaymentVerifierRegistry": "0x2261416DA54C85f975C73FA56EF4D2D6b0aEF7Cc",
269
+ "orchestratorRelayerRegistry": "0xB214650b424E6b5fdcB1259566eB7A512D8Bd25E",
270
+ "hookOrchestratorRegistry": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
271
+ "hookWhitelistPolicy": "0xF79aAD1BAaB617fF3Eb299225c80893F22F743Fe",
272
+ "hookDisputeProtectionPolicy": "0x1a9C442E3Ae99fB08313242fCdA601431027B39C",
273
+ "whitelistGroupRegistry": "0x54Ff7788Cb42B46FE2F016a65Fd0f654Bb9BcF3D",
274
+ "whitelistEscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
275
+ "whitelistOrchestratorRegistry": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
276
+ "policyStakeVault": "0x6b32df91EB92637F64bA444996702fC9582C87a1",
277
+ "policyDisputeVerifier": "0x973578148c5Fd49b9f68B50B26066555325AC708",
278
+ "policyDisputeNullifierRegistry": "0xE0B05a9655AF0f31E32904267baa50FbC7f217ea",
279
+ "disputeVerifierNullifierRegistry": "0x2eb43d6C7c7Ec4220Aa6B8735BC053824a71778C",
280
+ "disputeVerifierAttestationVerifier": "0x9855a39aC5975069632e91160d8712CBfF19e864",
281
+ "vaultController": "0x1a9C442E3Ae99fB08313242fCdA601431027B39C",
282
+ "vaultStakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
210
283
  },
211
- [Currency2.MYR]: {
212
- currency: Currency2.MYR,
213
- currencyCode: "MYR",
214
- currencyName: "Malaysian Ringgit",
215
- currencyCodeHash: currencyKeccak2562("MYR"),
216
- currencySymbol: "RM",
217
- countryCode: "my"
284
+ "expectedGovernance": {
285
+ "owner": "0x84e113087C97Cd80eA9D78983D4B8Ff61ECa1929",
286
+ "governedRuntimeIdentities": [
287
+ "OrchestratorRegistry",
288
+ "OrchestratorV3",
289
+ "StakeVault",
290
+ "DisputeProtectionPolicy",
291
+ "WhitelistPolicy",
292
+ "DisputeVerifier",
293
+ "DisputeNullifierRegistry",
294
+ "MultiAttestationVerifier"
295
+ ],
296
+ "pendingOwner": "0x0000000000000000000000000000000000000000",
297
+ "twoStepGovernedRuntimeIdentities": [
298
+ "StakeVault",
299
+ "DisputeProtectionPolicy",
300
+ "DisputeVerifier"
301
+ ]
218
302
  },
219
- [Currency2.NOK]: {
220
- currency: Currency2.NOK,
221
- currencyCode: "NOK",
222
- currencyName: "Norwegian Krone",
223
- currencyCodeHash: currencyKeccak2562("NOK"),
224
- currencySymbol: "kr",
225
- countryCode: "no"
303
+ "attestationTrust": {
304
+ "requiredSignatures": "1",
305
+ "witnesses": [
306
+ "0x66649F896521b0fb487fE2077b4FBDA283d7f19a",
307
+ "0x4ab950AE1e3326578Bf7e643a2031E858aBa2927"
308
+ ]
226
309
  },
227
- [Currency2.NZD]: {
228
- currency: Currency2.NZD,
229
- currencyCode: "NZD",
230
- currencyName: "New Zealand Dollar",
231
- currencyCodeHash: currencyKeccak2562("NZD"),
232
- currencySymbol: "NZ$",
233
- countryCode: "nz"
310
+ "exactAuthorizationSets": {
311
+ "orchestratorAuthorizationFromBlock": "42614859",
312
+ "authorizedOrchestrators": [
313
+ "0xF9b9CD27Deea496B960b3cb5221b514705fCaF5e",
314
+ "0xc17a59227B136c45fAa153086a15EF87ED14bE00",
315
+ "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f"
316
+ ],
317
+ "lifecycleHookAuthorizationFromBlock": "52530944",
318
+ "authorizedLifecycleHooks": [
319
+ "0xec27Cc47370267c843177375c3Fe43D29D498bB4"
320
+ ],
321
+ "passiveDisputeNullifierWriters": [
322
+ "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c"
323
+ ],
324
+ "activeDisputeNullifierWriters": [
325
+ "0x1a9C442E3Ae99fB08313242fCdA601431027B39C"
326
+ ]
234
327
  },
235
- [Currency2.PHP]: {
236
- currency: Currency2.PHP,
237
- currencyCode: "PHP",
238
- currencyName: "Philippine Peso",
239
- currencyCodeHash: currencyKeccak2562("PHP"),
240
- currencySymbol: "\u20B1",
241
- countryCode: "ph"
328
+ "riskWindowSecondsByPaymentMethod": {
329
+ "0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
330
+ "0x1d966dbd6aeb8674d7c05174bd0ded7b56a798672bfb862ef20bbe8c2bbfce18": "0",
331
+ "0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
332
+ "0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
333
+ "0x5908bb0c9b87763ac6171d4104847667e7f02b4c47b574fe890c1f439ed128bb": "0",
334
+ "0x617f88ab82b5c1b014c539f7e75121427f0bb50a4c58b187a238531e7d58605d": "0",
335
+ "0x62c7ed738ad3e7618111348af32691b5767777fbaf46a2d8943237625552645c": "0",
336
+ "0x790dd0cc68b6e7f474649a6c0a5463a964be9d2589e2076b6dc99f5701543f51": "0",
337
+ "0x90262a3db0edd0be2369c6b28f9e8511ec0bac7136cefbada0880602f87e7268": "1209600",
338
+ "0xa5418819c024239299ea32e09defae8ec412c03e58f5c75f1b2fe84c857f5483": "0",
339
+ "0xcac9daea62d7b89d75ac73af4ee14dcf25721012ae82b568c2ea5c808eaa04ff": "0",
340
+ "0xe99a5081226cbbff9440a63da5caa04fa30f210c12c4dd9976132ac075054cd9": "0",
341
+ "0xf752c7d19698ecb0bb8988abf9b9a53a4c3657f3bc8850a6fb59fdf3e3ce8cd3": "0",
342
+ "0xf81480907d808d639ad3230869e4b05a3b01b2d34e323af40f2efab807effd32": "0"
242
343
  },
243
- [Currency2.PLN]: {
244
- currency: Currency2.PLN,
245
- currencyCode: "PLN",
246
- currencyName: "Polish Z\u0142oty",
247
- currencyCodeHash: currencyKeccak2562("PLN"),
248
- currencySymbol: "z\u0142",
249
- countryCode: "pl"
344
+ "sentinel": {
345
+ "escrow": "0x0000000000000000000000000000000000000001",
346
+ "depositId": "0",
347
+ "expected": false
250
348
  },
251
- [Currency2.RON]: {
252
- currency: Currency2.RON,
253
- currencyCode: "RON",
254
- currencyName: "Romanian Leu",
255
- currencyCodeHash: currencyKeccak2562("RON"),
256
- currencySymbol: "lei",
257
- countryCode: "ro"
258
- },
259
- [Currency2.SAR]: {
260
- currency: Currency2.SAR,
261
- currencyCode: "SAR",
262
- currencyName: "Saudi Riyal",
263
- currencyCodeHash: currencyKeccak2562("SAR"),
264
- currencySymbol: "\uFDFC",
265
- countryCode: "sa"
349
+ "prerequisites": {
350
+ "orchestratorPaused": false,
351
+ "admissionsPaused": false,
352
+ "allowMultipleIntents": false,
353
+ "orchestratorRegistered": true,
354
+ "lifecycleHookAuthorized": true,
355
+ "disputeNullifierWriterAuthorized": true,
356
+ "vaultControllerActivated": true,
357
+ "vaultPendingController": "0x0000000000000000000000000000000000000000",
358
+ "vaultPendingControllerValidAt": "0",
359
+ "pendingCoverageMaturity": "18446744073709551615"
360
+ }
361
+ };
362
+ var baseStaging_default = data2;
363
+ function getKnownPolicies(chainId, environment) {
364
+ const manifest = environment === "staging" ? baseStaging_default : base_default;
365
+ const { addresses } = getContracts(chainId, environment);
366
+ const candidates = [
367
+ getPaymentValidationPolicyContract(chainId, environment)?.address,
368
+ addresses.disputeProtectionPolicy,
369
+ ...manifest.chainId === chainId ? [
370
+ manifest.runtimeIdentities.DisputeProtectionPolicy.address,
371
+ manifest.runtimeIdentities.RecognizedPredecessorPolicy.address
372
+ ] : []
373
+ ];
374
+ return candidates.filter((address) => !!address && !isAddressEqual(address, zeroAddress)).filter(
375
+ (address, index, all) => all.findIndex((other) => isAddressEqual(other, address)) === index
376
+ );
377
+ }
378
+ function requireAddress(value, label) {
379
+ if (typeof value !== "string" || !isAddress(value)) throw new Error(`${label} is not an address`);
380
+ return value;
381
+ }
382
+ var LiveDisputeProtection = class {
383
+ constructor(publicClient, chainId, environment) {
384
+ this.publicClient = publicClient;
385
+ this.chainId = chainId;
386
+ this.environment = environment;
387
+ }
388
+ isKnownPolicy(address) {
389
+ return getKnownPolicies(this.chainId, this.environment).some(
390
+ (known) => isAddressEqual(known, address)
391
+ );
392
+ }
393
+ getKnownStakeVaults() {
394
+ return getKnownStakeVaultContracts(this.chainId, this.environment);
395
+ }
396
+ getStakeVaultContract(options) {
397
+ const vaults = this.getKnownStakeVaults();
398
+ const selected = options?.stakeVaultAddress;
399
+ const vault = selected ? vaults.find(({ address }) => isAddressEqual(address, selected)) : vaults[0];
400
+ if (!vault) throw new Error("Unknown StakeVault address");
401
+ return vault;
402
+ }
403
+ /** Share in-flight discovery for 30 seconds; rejected reads must be retried immediately. */
404
+ getActiveDisputeProtectionStack() {
405
+ if (this.cached && Date.now() < this.cached.expiresAt) return this.cached.promise;
406
+ const promise = this.resolveStack();
407
+ this.cached = { expiresAt: Date.now() + 3e4, promise };
408
+ void promise.catch(() => {
409
+ if (this.cached?.promise === promise) this.cached = void 0;
410
+ });
411
+ return promise;
412
+ }
413
+ async resolveStack() {
414
+ const orchestrator = getOrchestratorV3Contract(this.chainId, this.environment);
415
+ const abis = getDisputeStackAbis(this.environment);
416
+ const lifecycleHook = requireAddress(
417
+ await this.publicClient.readContract({ ...orchestrator, functionName: "lifecycleHook" }),
418
+ "OrchestratorV3.lifecycleHook"
419
+ );
420
+ if (isAddressEqual(lifecycleHook, zeroAddress)) return null;
421
+ const disputeProtectionPolicy = requireAddress(
422
+ await this.publicClient.readContract({
423
+ address: lifecycleHook,
424
+ abi: abis.IntentLifecycleHookV1,
425
+ functionName: "disputeProtectionPolicy"
426
+ }),
427
+ "IntentLifecycleHookV1.disputeProtectionPolicy"
428
+ );
429
+ if (!this.isKnownPolicy(disputeProtectionPolicy))
430
+ throw new Error("Unknown DisputeProtectionPolicy address");
431
+ const stakeVault = requireAddress(
432
+ await this.publicClient.readContract({
433
+ address: disputeProtectionPolicy,
434
+ abi: abis.DisputeProtectionPolicy,
435
+ functionName: "stakeVault"
436
+ }),
437
+ "DisputeProtectionPolicy.stakeVault"
438
+ );
439
+ this.getStakeVaultContract({ stakeVaultAddress: stakeVault });
440
+ return { lifecycleHook, disputeProtectionPolicy, stakeVault };
441
+ }
442
+ async getActiveStakeVaultContract() {
443
+ const stack = await this.getActiveDisputeProtectionStack();
444
+ return this.getStakeVaultContract({ stakeVaultAddress: stack?.stakeVault });
445
+ }
446
+ async getActivePolicyContract() {
447
+ const stack = await this.getActiveDisputeProtectionStack();
448
+ const canonical = getDisputeProtectionPolicyContract(this.chainId, this.environment);
449
+ return { ...canonical, address: stack?.disputeProtectionPolicy ?? canonical.address };
450
+ }
451
+ async isNoStakeAvailable() {
452
+ const policy = getPaymentValidationPolicyContract(this.chainId, this.environment);
453
+ if (!policy) return false;
454
+ const stack = await this.getActiveDisputeProtectionStack();
455
+ return !!stack && isAddressEqual(stack.disputeProtectionPolicy, policy.address);
456
+ }
457
+ };
458
+ var currencyKeccak2562 = (inputString) => {
459
+ const bytes = new TextEncoder().encode(inputString);
460
+ return keccak256(bytes);
461
+ };
462
+ var Currency2 = {
463
+ AED: "AED",
464
+ ARS: "ARS",
465
+ AUD: "AUD",
466
+ BRL: "BRL",
467
+ CAD: "CAD",
468
+ CHF: "CHF",
469
+ CNY: "CNY",
470
+ CZK: "CZK",
471
+ DKK: "DKK",
472
+ EUR: "EUR",
473
+ GBP: "GBP",
474
+ HKD: "HKD",
475
+ HUF: "HUF",
476
+ IDR: "IDR",
477
+ ILS: "ILS",
478
+ INR: "INR",
479
+ JPY: "JPY",
480
+ KES: "KES",
481
+ NOK: "NOK",
482
+ MXN: "MXN",
483
+ MYR: "MYR",
484
+ NZD: "NZD",
485
+ PHP: "PHP",
486
+ PLN: "PLN",
487
+ RON: "RON",
488
+ SAR: "SAR",
489
+ SEK: "SEK",
490
+ SGD: "SGD",
491
+ THB: "THB",
492
+ TRY: "TRY",
493
+ UGX: "UGX",
494
+ UAH: "UAH",
495
+ USD: "USD",
496
+ VND: "VND",
497
+ ZAR: "ZAR"
498
+ };
499
+ var currencyInfo2 = {
500
+ [Currency2.AED]: {
501
+ currency: Currency2.AED,
502
+ currencyCode: "AED",
503
+ currencyName: "United Arab Emirates Dirham",
504
+ currencyCodeHash: currencyKeccak2562("AED"),
505
+ currencySymbol: "\u062F.\u0625",
506
+ countryCode: "ae"
266
507
  },
267
- [Currency2.SEK]: {
268
- currency: Currency2.SEK,
269
- currencyCode: "SEK",
270
- currencyName: "Swedish Krona",
271
- currencyCodeHash: currencyKeccak2562("SEK"),
272
- currencySymbol: "kr",
273
- countryCode: "se"
508
+ [Currency2.ARS]: {
509
+ currency: Currency2.ARS,
510
+ currencyCode: "ARS",
511
+ currencyName: "Argentine Peso",
512
+ currencyCodeHash: currencyKeccak2562("ARS"),
513
+ currencySymbol: "$",
514
+ countryCode: "ar"
274
515
  },
275
- [Currency2.SGD]: {
276
- currency: Currency2.SGD,
277
- currencyCode: "SGD",
278
- currencyName: "Singapore Dollar",
279
- currencyCodeHash: currencyKeccak2562("SGD"),
280
- currencySymbol: "S$",
281
- countryCode: "sg"
516
+ [Currency2.AUD]: {
517
+ currency: Currency2.AUD,
518
+ currencyCode: "AUD",
519
+ currencyName: "Australian Dollar",
520
+ currencyCodeHash: currencyKeccak2562("AUD"),
521
+ currencySymbol: "A$",
522
+ countryCode: "au"
282
523
  },
283
- [Currency2.THB]: {
284
- currency: Currency2.THB,
285
- currencyCode: "THB",
286
- currencyName: "Thai Baht",
287
- currencyCodeHash: currencyKeccak2562("THB"),
288
- currencySymbol: "\u0E3F",
289
- countryCode: "th"
524
+ [Currency2.BRL]: {
525
+ currency: Currency2.BRL,
526
+ currencyCode: "BRL",
527
+ currencyName: "Brazilian Real",
528
+ currencyCodeHash: currencyKeccak2562("BRL"),
529
+ currencySymbol: "R$",
530
+ countryCode: "br"
290
531
  },
291
- [Currency2.TRY]: {
292
- currency: Currency2.TRY,
293
- currencyCode: "TRY",
294
- currencyName: "Turkish Lira",
295
- currencyCodeHash: currencyKeccak2562("TRY"),
296
- currencySymbol: "\u20BA",
297
- countryCode: "tr"
532
+ [Currency2.CAD]: {
533
+ currency: Currency2.CAD,
534
+ currencyCode: "CAD",
535
+ currencyName: "Canadian Dollar",
536
+ currencyCodeHash: currencyKeccak2562("CAD"),
537
+ currencySymbol: "C$",
538
+ countryCode: "ca"
298
539
  },
299
- [Currency2.UGX]: {
300
- currency: Currency2.UGX,
301
- currencyCode: "UGX",
302
- currencyName: "Ugandan Shilling",
303
- currencyCodeHash: currencyKeccak2562("UGX"),
304
- currencySymbol: "USh",
305
- countryCode: "ug"
540
+ [Currency2.CHF]: {
541
+ currency: Currency2.CHF,
542
+ currencyCode: "CHF",
543
+ currencyName: "Swiss Franc",
544
+ currencyCodeHash: currencyKeccak2562("CHF"),
545
+ currencySymbol: "Fr",
546
+ countryCode: "ch"
306
547
  },
307
- [Currency2.UAH]: {
308
- currency: Currency2.UAH,
309
- currencyCode: "UAH",
310
- currencyName: "Ukrainian Hryvnia",
311
- currencyCodeHash: currencyKeccak2562("UAH"),
312
- currencySymbol: "\u20B4",
313
- countryCode: "ua"
548
+ [Currency2.CNY]: {
549
+ currency: Currency2.CNY,
550
+ currencyCode: "CNY",
551
+ currencyName: "Chinese Yuan",
552
+ currencyCodeHash: currencyKeccak2562("CNY"),
553
+ currencySymbol: "\xA5",
554
+ countryCode: "cn"
314
555
  },
315
- [Currency2.USD]: {
316
- currency: Currency2.USD,
317
- currencyCode: "USD",
318
- currencyName: "United States Dollar",
319
- currencyCodeHash: currencyKeccak2562("USD"),
320
- currencySymbol: "$",
321
- countryCode: "us"
556
+ [Currency2.CZK]: {
557
+ currency: Currency2.CZK,
558
+ currencyCode: "CZK",
559
+ currencyName: "Czech Koruna",
560
+ currencyCodeHash: currencyKeccak2562("CZK"),
561
+ currencySymbol: "K\u010D",
562
+ countryCode: "cz"
322
563
  },
323
- [Currency2.VND]: {
324
- currency: Currency2.VND,
325
- currencyCode: "VND",
326
- currencyName: "Vietnamese Dong",
327
- currencyCodeHash: currencyKeccak2562("VND"),
328
- currencySymbol: "\u20AB",
329
- countryCode: "vn"
564
+ [Currency2.DKK]: {
565
+ currency: Currency2.DKK,
566
+ currencyCode: "DKK",
567
+ currencyName: "Danish Krone",
568
+ currencyCodeHash: currencyKeccak2562("DKK"),
569
+ currencySymbol: "kr",
570
+ countryCode: "dk"
330
571
  },
331
- [Currency2.ZAR]: {
332
- currency: Currency2.ZAR,
333
- currencyCode: "ZAR",
334
- currencyName: "South African Rand",
335
- currencyCodeHash: currencyKeccak2562("ZAR"),
336
- currencySymbol: "R",
337
- countryCode: "za"
338
- }
339
- };
340
- var PaymentPlatform = {
341
- VENMO: "venmo",
342
- CASHAPP: "cashapp",
343
- CHIME: "chime",
344
- LUXON: "luxon",
345
- REVOLUT: "revolut",
346
- WISE: "wise",
347
- MERCADO_PAGO: "mercadopago",
348
- ZELLE: "zelle",
349
- PAYPAL: "paypal",
350
- MONZO: "monzo",
351
- MONOBANK: "monobank",
352
- N26: "n26",
353
- ALIPAY: "alipay",
354
- UPI: "upi",
355
- X_MONEY: "xmoney"
356
- };
357
- [...Object.values(PaymentPlatform)];
358
- var encodeZelleRecipientId = (recipientId) => {
359
- const payload = {
360
- name: "",
361
- action: "payment",
362
- token: recipientId
363
- };
364
- return btoa(JSON.stringify(payload));
365
- };
366
- var zelleBankOfAmericaSendConfig = {
367
- paymentMethodName: "Bank of America",
368
- paymentMethodIcon: void 0,
369
- // Icon provided by client-side assets
370
- defaultPaymentMode: "QR_CODE",
371
- useCustomQRCode: true,
372
- troubleScanningQRCodeLink: (recipientId, sendCurrency, amountFiatToSend) => `https://www.bankofamerica.com/`,
373
- getFormattedSendLink: (recipientId, sendCurrency, amountFiatToSend) => {
374
- return `https://www.bankofamerica.com/movemoney`;
572
+ [Currency2.EUR]: {
573
+ currency: Currency2.EUR,
574
+ currencyCode: "EUR",
575
+ currencyName: "Euro",
576
+ currencyCodeHash: currencyKeccak2562("EUR"),
577
+ currencySymbol: "\u20AC",
578
+ countryCode: "eu"
579
+ },
580
+ [Currency2.GBP]: {
581
+ currency: Currency2.GBP,
582
+ currencyCode: "GBP",
583
+ currencyName: "British Pound",
584
+ currencyCodeHash: currencyKeccak2562("GBP"),
585
+ currencySymbol: "\xA3",
586
+ countryCode: "gb"
587
+ },
588
+ [Currency2.HKD]: {
589
+ currency: Currency2.HKD,
590
+ currencyCode: "HKD",
591
+ currencyName: "Hong Kong Dollar",
592
+ currencyCodeHash: currencyKeccak2562("HKD"),
593
+ currencySymbol: "HK$",
594
+ countryCode: "hk"
595
+ },
596
+ [Currency2.HUF]: {
597
+ currency: Currency2.HUF,
598
+ currencyCode: "HUF",
599
+ currencyName: "Hungarian Forint",
600
+ currencyCodeHash: currencyKeccak2562("HUF"),
601
+ currencySymbol: "Ft",
602
+ countryCode: "hu"
603
+ },
604
+ [Currency2.IDR]: {
605
+ currency: Currency2.IDR,
606
+ currencyCode: "IDR",
607
+ currencyName: "Indonesian Rupiah",
608
+ currencyCodeHash: currencyKeccak2562("IDR"),
609
+ currencySymbol: "Rp",
610
+ countryCode: "id"
611
+ },
612
+ [Currency2.INR]: {
613
+ currency: Currency2.INR,
614
+ currencyCode: "INR",
615
+ currencyName: "Indian Rupee",
616
+ currencyCodeHash: currencyKeccak2562("INR"),
617
+ currencySymbol: "\u20B9",
618
+ countryCode: "in"
619
+ },
620
+ [Currency2.ILS]: {
621
+ currency: Currency2.ILS,
622
+ currencyCode: "ILS",
623
+ currencyName: "Israeli New Shekel",
624
+ currencyCodeHash: currencyKeccak2562("ILS"),
625
+ currencySymbol: "\u20AA",
626
+ countryCode: "il"
627
+ },
628
+ [Currency2.JPY]: {
629
+ currency: Currency2.JPY,
630
+ currencyCode: "JPY",
631
+ currencyName: "Japanese Yen",
632
+ currencyCodeHash: currencyKeccak2562("JPY"),
633
+ currencySymbol: "\xA5",
634
+ countryCode: "jp"
635
+ },
636
+ [Currency2.KES]: {
637
+ currency: Currency2.KES,
638
+ currencyCode: "KES",
639
+ currencyName: "Kenyan Shilling",
640
+ currencyCodeHash: currencyKeccak2562("KES"),
641
+ currencySymbol: "KSh",
642
+ countryCode: "ke"
643
+ },
644
+ [Currency2.MXN]: {
645
+ currency: Currency2.MXN,
646
+ currencyCode: "MXN",
647
+ currencyName: "Mexican Peso",
648
+ currencyCodeHash: currencyKeccak2562("MXN"),
649
+ currencySymbol: "$",
650
+ countryCode: "mx"
651
+ },
652
+ [Currency2.MYR]: {
653
+ currency: Currency2.MYR,
654
+ currencyCode: "MYR",
655
+ currencyName: "Malaysian Ringgit",
656
+ currencyCodeHash: currencyKeccak2562("MYR"),
657
+ currencySymbol: "RM",
658
+ countryCode: "my"
659
+ },
660
+ [Currency2.NOK]: {
661
+ currency: Currency2.NOK,
662
+ currencyCode: "NOK",
663
+ currencyName: "Norwegian Krone",
664
+ currencyCodeHash: currencyKeccak2562("NOK"),
665
+ currencySymbol: "kr",
666
+ countryCode: "no"
667
+ },
668
+ [Currency2.NZD]: {
669
+ currency: Currency2.NZD,
670
+ currencyCode: "NZD",
671
+ currencyName: "New Zealand Dollar",
672
+ currencyCodeHash: currencyKeccak2562("NZD"),
673
+ currencySymbol: "NZ$",
674
+ countryCode: "nz"
675
+ },
676
+ [Currency2.PHP]: {
677
+ currency: Currency2.PHP,
678
+ currencyCode: "PHP",
679
+ currencyName: "Philippine Peso",
680
+ currencyCodeHash: currencyKeccak2562("PHP"),
681
+ currencySymbol: "\u20B1",
682
+ countryCode: "ph"
683
+ },
684
+ [Currency2.PLN]: {
685
+ currency: Currency2.PLN,
686
+ currencyCode: "PLN",
687
+ currencyName: "Polish Z\u0142oty",
688
+ currencyCodeHash: currencyKeccak2562("PLN"),
689
+ currencySymbol: "z\u0142",
690
+ countryCode: "pl"
691
+ },
692
+ [Currency2.RON]: {
693
+ currency: Currency2.RON,
694
+ currencyCode: "RON",
695
+ currencyName: "Romanian Leu",
696
+ currencyCodeHash: currencyKeccak2562("RON"),
697
+ currencySymbol: "lei",
698
+ countryCode: "ro"
699
+ },
700
+ [Currency2.SAR]: {
701
+ currency: Currency2.SAR,
702
+ currencyCode: "SAR",
703
+ currencyName: "Saudi Riyal",
704
+ currencyCodeHash: currencyKeccak2562("SAR"),
705
+ currencySymbol: "\uFDFC",
706
+ countryCode: "sa"
707
+ },
708
+ [Currency2.SEK]: {
709
+ currency: Currency2.SEK,
710
+ currencyCode: "SEK",
711
+ currencyName: "Swedish Krona",
712
+ currencyCodeHash: currencyKeccak2562("SEK"),
713
+ currencySymbol: "kr",
714
+ countryCode: "se"
715
+ },
716
+ [Currency2.SGD]: {
717
+ currency: Currency2.SGD,
718
+ currencyCode: "SGD",
719
+ currencyName: "Singapore Dollar",
720
+ currencyCodeHash: currencyKeccak2562("SGD"),
721
+ currencySymbol: "S$",
722
+ countryCode: "sg"
723
+ },
724
+ [Currency2.THB]: {
725
+ currency: Currency2.THB,
726
+ currencyCode: "THB",
727
+ currencyName: "Thai Baht",
728
+ currencyCodeHash: currencyKeccak2562("THB"),
729
+ currencySymbol: "\u0E3F",
730
+ countryCode: "th"
731
+ },
732
+ [Currency2.TRY]: {
733
+ currency: Currency2.TRY,
734
+ currencyCode: "TRY",
735
+ currencyName: "Turkish Lira",
736
+ currencyCodeHash: currencyKeccak2562("TRY"),
737
+ currencySymbol: "\u20BA",
738
+ countryCode: "tr"
739
+ },
740
+ [Currency2.UGX]: {
741
+ currency: Currency2.UGX,
742
+ currencyCode: "UGX",
743
+ currencyName: "Ugandan Shilling",
744
+ currencyCodeHash: currencyKeccak2562("UGX"),
745
+ currencySymbol: "USh",
746
+ countryCode: "ug"
747
+ },
748
+ [Currency2.UAH]: {
749
+ currency: Currency2.UAH,
750
+ currencyCode: "UAH",
751
+ currencyName: "Ukrainian Hryvnia",
752
+ currencyCodeHash: currencyKeccak2562("UAH"),
753
+ currencySymbol: "\u20B4",
754
+ countryCode: "ua"
755
+ },
756
+ [Currency2.USD]: {
757
+ currency: Currency2.USD,
758
+ currencyCode: "USD",
759
+ currencyName: "United States Dollar",
760
+ currencyCodeHash: currencyKeccak2562("USD"),
761
+ currencySymbol: "$",
762
+ countryCode: "us"
763
+ },
764
+ [Currency2.VND]: {
765
+ currency: Currency2.VND,
766
+ currencyCode: "VND",
767
+ currencyName: "Vietnamese Dong",
768
+ currencyCodeHash: currencyKeccak2562("VND"),
769
+ currencySymbol: "\u20AB",
770
+ countryCode: "vn"
771
+ },
772
+ [Currency2.ZAR]: {
773
+ currency: Currency2.ZAR,
774
+ currencyCode: "ZAR",
775
+ currencyName: "South African Rand",
776
+ currencyCodeHash: currencyKeccak2562("ZAR"),
777
+ currencySymbol: "R",
778
+ countryCode: "za"
779
+ }
780
+ };
781
+ var PaymentPlatform = {
782
+ VENMO: "venmo",
783
+ CASHAPP: "cashapp",
784
+ CHIME: "chime",
785
+ LUXON: "luxon",
786
+ REVOLUT: "revolut",
787
+ WISE: "wise",
788
+ MERCADO_PAGO: "mercadopago",
789
+ ZELLE: "zelle",
790
+ PAYPAL: "paypal",
791
+ MONZO: "monzo",
792
+ MONOBANK: "monobank",
793
+ N26: "n26",
794
+ ALIPAY: "alipay",
795
+ UPI: "upi",
796
+ X_MONEY: "xmoney"
797
+ };
798
+ [...Object.values(PaymentPlatform)];
799
+ var encodeZelleRecipientId = (recipientId) => {
800
+ const payload = {
801
+ name: "",
802
+ action: "payment",
803
+ token: recipientId
804
+ };
805
+ return btoa(JSON.stringify(payload));
806
+ };
807
+ var zelleBankOfAmericaSendConfig = {
808
+ paymentMethodName: "Bank of America",
809
+ paymentMethodIcon: void 0,
810
+ // Icon provided by client-side assets
811
+ defaultPaymentMode: "QR_CODE",
812
+ useCustomQRCode: true,
813
+ troubleScanningQRCodeLink: (recipientId, sendCurrency, amountFiatToSend) => `https://www.bankofamerica.com/`,
814
+ getFormattedSendLink: (recipientId, sendCurrency, amountFiatToSend) => {
815
+ return `https://www.bankofamerica.com/movemoney`;
375
816
  },
376
817
  deepLinkEmbedsRecipient: false,
377
818
  supportsSendingPaymentOnWeb: true,
@@ -684,8 +1125,9 @@ var usdcUnits = (amount) => {
684
1125
  return parseUnits(amount.toString(), 6);
685
1126
  };
686
1127
  ({
687
- singleOrderDeposit: {
688
- minDeposit: usdcUnits(10)}});
1128
+ orderCapDeposit: {
1129
+ minOrder: usdcUnits(5),
1130
+ maxOrder: usdcUnits(500)}});
689
1131
  var DISPUTE_PROTECTION_STAKE_PLATFORMS = [
690
1132
  PaymentPlatform.VENMO,
691
1133
  PaymentPlatform.PAYPAL
@@ -694,6 +1136,12 @@ new Set(
694
1136
  DISPUTE_PROTECTION_STAKE_PLATFORMS
695
1137
  );
696
1138
  var isCanonicalDisputeProtectionProjection = (projection) => typeof projection.disputeProtectionOptedOut === "boolean" && typeof projection.disputeProtectionRequiresStake === "boolean" && (!projection.disputeProtectionRequiresStake || !projection.disputeProtectionOptedOut);
1139
+ var DISPUTE_PROTECTION_NO_STAKE_PLATFORMS = [
1140
+ PaymentPlatform.VENMO
1141
+ ];
1142
+ new Set(
1143
+ DISPUTE_PROTECTION_NO_STAKE_PLATFORMS
1144
+ );
697
1145
 
698
1146
  // src/utils/address.ts
699
1147
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
@@ -1038,7 +1486,7 @@ async function withRetry(fn, maxRetries = 3, delayMs = 1e3, timeoutMs, shouldRet
1038
1486
  for (let i = 0; i < maxRetries; i++) {
1039
1487
  try {
1040
1488
  if (timeoutMs) {
1041
- const { withTimeout } = await import('./timeout-GGK4EEKQ.mjs');
1489
+ const { withTimeout } = await import('./timeout-CU53EYLL.mjs');
1042
1490
  return await withTimeout(fn(), timeoutMs, `Operation timed out after ${timeoutMs}ms`);
1043
1491
  }
1044
1492
  return await fn();
@@ -1567,11 +2015,29 @@ async function sendTransactionWithAttribution(walletClient, request, referrer, o
1567
2015
  ...optionalOverrides
1568
2016
  });
1569
2017
  }
2018
+ function encodePaymentValidationHookData(policy, noStake) {
2019
+ return encodeAbiParameters(
2020
+ [{ type: "address" }, { type: "bytes" }],
2021
+ [policy, encodeAbiParameters([{ type: "bool" }], [noStake])]
2022
+ );
2023
+ }
2024
+ function decodePaymentValidationHookData(data3) {
2025
+ try {
2026
+ const [policy, hookData] = decodeAbiParameters([{ type: "address" }, { type: "bytes" }], data3);
2027
+ const [noStake] = decodeAbiParameters([{ type: "bool" }], hookData);
2028
+ if (encodePaymentValidationHookData(policy, noStake).toLowerCase() !== data3.toLowerCase()) {
2029
+ return null;
2030
+ }
2031
+ return { policy, noStake };
2032
+ } catch {
2033
+ return null;
2034
+ }
2035
+ }
1570
2036
 
1571
2037
  // src/utils/constants.ts
1572
2038
  var DEFAULT_BASE_API_URL = "https://api.zkp2p.xyz";
1573
2039
 
1574
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
2040
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.5_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/oracleFeeds/chainlink.json
1575
2041
  var chainlink_default = {
1576
2042
  feeds: [
1577
2043
  {
@@ -1945,13 +2411,33 @@ function resolveBuyerTeeAttestationRoute(platformName, buyerTeeProof) {
1945
2411
  actionType: platformConfig.actionType
1946
2412
  };
1947
2413
  }
2414
+ function rejectRawSignalData(params) {
2415
+ if ("data" in params && params.data !== void 0 && params.data !== "0x") {
2416
+ throw new ValidationError(
2417
+ "UPV4 reads non-empty V3 data as a payment-validation envelope; pass noStake instead. Use postIntentHookData at fulfillment for post-intent hook inputs.",
2418
+ "data"
2419
+ );
2420
+ }
2421
+ }
1948
2422
  var IntentOperations = class {
1949
2423
  constructor(config) {
1950
2424
  this.config = config;
1951
2425
  }
1952
2426
  async prepareSignalIntent(params) {
1953
- const referrerFeeConfig = assertValidReferrerFeeConfig(
1954
- params.referrerFeeConfig,
2427
+ rejectRawSignalData(params);
2428
+ const policy = getPaymentValidationPolicyContract(
2429
+ this.config.getChainId(),
2430
+ this.config.getRuntimeEnv()
2431
+ );
2432
+ if (!policy && params.noStake === true) {
2433
+ throw new ValidationError(
2434
+ "No payment-validation policy is available for noStake in this deployment",
2435
+ "noStake"
2436
+ );
2437
+ }
2438
+ const paymentValidationData = policy ? encodePaymentValidationHookData(policy.address, params.noStake ?? false) : "0x";
2439
+ const referrerFeeConfig = assertValidReferrerFeeConfig(
2440
+ params.referrerFeeConfig,
1955
2441
  "signalIntent"
1956
2442
  );
1957
2443
  if (referrerFeeConfig && (params.referralFees !== void 0 || params.referrer !== void 0 || params.referrerFee !== void 0)) {
@@ -1976,6 +2462,11 @@ var IntentOperations = class {
1976
2462
  }
1977
2463
  const catalog = getPaymentMethodsCatalog(this.config.getChainId(), this.config.getRuntimeEnv());
1978
2464
  const paymentMethod = resolvePaymentMethodHashFromCatalog(params.processorName, catalog);
2465
+ if (params.noStake === true && !DISPUTE_PROTECTION_NO_STAKE_PLATFORMS.some(
2466
+ (platform) => catalog[platform]?.paymentMethodHash.toLowerCase() === paymentMethod.toLowerCase()
2467
+ )) {
2468
+ throw new ValidationError("noStake is only supported for Venmo payments", "noStake");
2469
+ }
1979
2470
  const fiatCurrency = resolveFiatCurrencyBytes32(params.fiatCurrencyCode);
1980
2471
  const depositId = parseRawDepositId(params.depositId);
1981
2472
  const amount = typeof params.amount === "bigint" ? params.amount : BigInt(params.amount);
@@ -2014,7 +2505,7 @@ var IntentOperations = class {
2014
2505
  fee: referralFee.fee.toString()
2015
2506
  })),
2016
2507
  postIntentHook: params.postIntentHook ?? ZERO_ADDRESS,
2017
- data: params.data ?? "0x"
2508
+ data: paymentValidationData
2018
2509
  },
2019
2510
  apiOpts
2020
2511
  );
@@ -2054,7 +2545,7 @@ var IntentOperations = class {
2054
2545
  gatingServiceSignature,
2055
2546
  signatureExpiration: typeof signatureExpiration === "bigint" ? signatureExpiration : BigInt(signatureExpiration),
2056
2547
  postIntentHook: params.postIntentHook ?? ZERO_ADDRESS,
2057
- data: params.data ?? "0x",
2548
+ data: paymentValidationData,
2058
2549
  referralFees,
2059
2550
  preIntentHookData: preIntentHookData ?? "0x"
2060
2551
  }
@@ -2658,7 +3149,7 @@ var ProtocolViewerReader = class {
2658
3149
  if (inputCount === null) {
2659
3150
  throw new Error("Configured ProtocolViewer ABI does not expose getDeposit");
2660
3151
  }
2661
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-6IAP5ZIJ.mjs');
3152
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-5IK7K5HX.mjs');
2662
3153
  if (inputCount >= 3) {
2663
3154
  return tryContexts(
2664
3155
  protocolViewerContexts,
@@ -2744,7 +3235,7 @@ var ProtocolViewerReader = class {
2744
3235
  return Promise.all(ids.map((id) => this.config.host.getPvDepositById(id)));
2745
3236
  }
2746
3237
  const bn = ids.map((id) => typeof id === "bigint" ? id : parseRawDepositId(id));
2747
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-6IAP5ZIJ.mjs');
3238
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-5IK7K5HX.mjs');
2748
3239
  if (inputCount >= 2) {
2749
3240
  const requests = ids.map((id, index) => ({
2750
3241
  index,
@@ -2849,7 +3340,7 @@ var ProtocolViewerReader = class {
2849
3340
  if (!protocolViewerAddress || !protocolViewerAbi || inputCount === null) {
2850
3341
  return this.config.host.getPvAccountDepositsFromIndexer(owner);
2851
3342
  }
2852
- const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-6IAP5ZIJ.mjs');
3343
+ const { parseDepositView: parseDepositView2 } = await import('./protocolViewerParsers-5IK7K5HX.mjs');
2853
3344
  const { address, abi } = this.config.host.requireProtocolViewer();
2854
3345
  if (inputCount >= 2) {
2855
3346
  const readAndFilter = async (raw2) => {
@@ -2920,7 +3411,7 @@ var ProtocolViewerReader = class {
2920
3411
  if (protocolViewerEntries.length === 0) {
2921
3412
  throw new Error("ProtocolViewer not available for this network");
2922
3413
  }
2923
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-6IAP5ZIJ.mjs');
3414
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-5IK7K5HX.mjs');
2924
3415
  const intentsByHash = /* @__PURE__ */ new Map();
2925
3416
  let attemptedRead = false;
2926
3417
  let hadSuccessfulRead = false;
@@ -3028,7 +3519,7 @@ var ProtocolViewerReader = class {
3028
3519
  if (protocolViewerEntries.length === 0) {
3029
3520
  throw new Error("ProtocolViewer not available for this network");
3030
3521
  }
3031
- const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-6IAP5ZIJ.mjs');
3522
+ const { parseIntentView: parseIntentView2 } = await import('./protocolViewerParsers-5IK7K5HX.mjs');
3032
3523
  let lastError;
3033
3524
  for (const pvEntry of protocolViewerEntries) {
3034
3525
  const inputCount = this.pvEntryFunctionInputCount(pvEntry, "getIntent");
@@ -5359,6 +5850,7 @@ async function apiGetQuote(req, optsOrBaseApiUrl, timeoutMsArg) {
5359
5850
  if (req.quotesToReturn) url += `?quotesToReturn=${req.quotesToReturn}`;
5360
5851
  const requestBody = {
5361
5852
  ...req,
5853
+ includeNoStakeCompatible: req.includeNoStakeCompatible === true ? true : void 0,
5362
5854
  [isExactFiat ? "exactFiatAmount" : "exactTokenAmount"]: String(req.amount),
5363
5855
  amount: void 0,
5364
5856
  isExactFiat: void 0,
@@ -5384,6 +5876,7 @@ async function apiGetQuotesBestByPlatform(req, optsOrBaseApiUrl, timeoutMsArg) {
5384
5876
  const url = `${withApiBase(baseApiUrl)}/v3/quote/${endpoint}`;
5385
5877
  const requestBody = {
5386
5878
  ...req,
5879
+ includeNoStakeCompatible: req.includeNoStakeCompatible === true ? true : void 0,
5387
5880
  [isExactFiat ? "exactFiatAmount" : "exactTokenAmount"]: String(req.amount),
5388
5881
  amount: void 0,
5389
5882
  isExactFiat: void 0,
@@ -5671,6 +6164,7 @@ async function apiGetOrderbook(params, optsOrBaseApiUrl, timeoutMs) {
5671
6164
  const query = new URLSearchParams();
5672
6165
  Object.entries(params).forEach(([key, value]) => {
5673
6166
  if (value === void 0 || value === null) return;
6167
+ if (key === "includeNoStakeCompatible" && value !== true) return;
5674
6168
  query.set(key, String(value));
5675
6169
  });
5676
6170
  const response = await apiFetch({
@@ -5712,6 +6206,7 @@ async function apiGetOrderbookTable(params, optsOrBaseApiUrl, timeoutMs) {
5712
6206
  const query = new URLSearchParams();
5713
6207
  Object.entries(params).forEach(([key, value]) => {
5714
6208
  if (value === void 0 || value === null) return;
6209
+ if (key === "includeNoStakeCompatible" && value !== true) return;
5715
6210
  query.set(key, String(value));
5716
6211
  });
5717
6212
  const response = await apiFetch({
@@ -6417,7 +6912,10 @@ var StakeOperations = class {
6417
6912
  constructor(config) {
6418
6913
  this.config = config;
6419
6914
  }
6420
- getContract() {
6915
+ getContract(options) {
6916
+ if (this.config.resolveVault) return this.config.resolveVault(options);
6917
+ if (options?.stakeVaultAddress && options.stakeVaultAddress.toLowerCase() !== this.config.getStakeVaultAddress()?.toLowerCase())
6918
+ throw new Error("Unknown StakeVault address");
6421
6919
  const address = this.config.getStakeVaultAddress();
6422
6920
  const abi = this.config.getStakeVaultAbi();
6423
6921
  const stakeToken = this.config.getStakeTokenAddress();
@@ -6434,8 +6932,14 @@ var StakeOperations = class {
6434
6932
  }
6435
6933
  return { address, abi };
6436
6934
  }
6437
- read(functionName, args = []) {
6438
- const { address, abi } = this.getContract();
6935
+ async resolveReadContract(stakeVaultAddress) {
6936
+ return stakeVaultAddress ? this.getContract({ stakeVaultAddress }) : this.config.resolveActiveVault();
6937
+ }
6938
+ async read(functionName, args = [], stakeVaultAddress) {
6939
+ const vault = await this.resolveReadContract(stakeVaultAddress);
6940
+ return this.readVault(vault, functionName, args);
6941
+ }
6942
+ readVault({ address, abi }, functionName, args) {
6439
6943
  return this.config.getPublicClient().readContract({
6440
6944
  address,
6441
6945
  abi,
@@ -6443,8 +6947,8 @@ var StakeOperations = class {
6443
6947
  args
6444
6948
  });
6445
6949
  }
6446
- readPolicy(functionName, args = []) {
6447
- const { address, abi } = this.getPolicyContract();
6950
+ async readPolicy(functionName, args = []) {
6951
+ const { address, abi } = this.config.resolveLivePolicy ? await this.config.resolveLivePolicy() : this.getPolicyContract();
6448
6952
  return this.config.getPublicClient().readContract({
6449
6953
  address,
6450
6954
  abi,
@@ -6452,26 +6956,26 @@ var StakeOperations = class {
6452
6956
  args
6453
6957
  });
6454
6958
  }
6455
- getStakeBalance(stakeOwner) {
6456
- return this.read("stakeBalance", [stakeOwner]);
6959
+ getStakeBalance(stakeOwner, options) {
6960
+ return this.read("stakeBalance", [stakeOwner], options?.stakeVaultAddress);
6457
6961
  }
6458
- getLockedStake(stakeOwner) {
6459
- return this.read("lockedStake", [stakeOwner]);
6962
+ getLockedStake(stakeOwner, options) {
6963
+ return this.read("lockedStake", [stakeOwner], options?.stakeVaultAddress);
6460
6964
  }
6461
- getFreeStake(stakeOwner) {
6462
- return this.read("freeStake", [stakeOwner]);
6965
+ getFreeStake(stakeOwner, options) {
6966
+ return this.read("freeStake", [stakeOwner], options?.stakeVaultAddress);
6463
6967
  }
6464
- getClaimable(beneficiary) {
6465
- return this.read("claimable", [beneficiary]);
6968
+ getClaimable(beneficiary, options) {
6969
+ return this.read("claimable", [beneficiary], options?.stakeVaultAddress);
6466
6970
  }
6467
- getStakeOwner(taker) {
6468
- return this.read("stakeOwnerOf", [taker]);
6971
+ getStakeOwner(taker, options) {
6972
+ return this.read("stakeOwnerOf", [taker], options?.stakeVaultAddress);
6469
6973
  }
6470
- getSelectedStakeOwner(taker) {
6471
- return this.read("selectedStakeOwner", [taker]);
6974
+ getSelectedStakeOwner(taker, options) {
6975
+ return this.read("selectedStakeOwner", [taker], options?.stakeVaultAddress);
6472
6976
  }
6473
- getTakerAuthorization(stakeOwner, taker) {
6474
- return this.read("authorizedTakers", [stakeOwner, taker]);
6977
+ getTakerAuthorization(stakeOwner, taker, options) {
6978
+ return this.read("authorizedTakers", [stakeOwner, taker], options?.stakeVaultAddress);
6475
6979
  }
6476
6980
  /** Whether the policy is refusing new dispute-protected admissions. */
6477
6981
  getAdmissionsPaused() {
@@ -6494,18 +6998,26 @@ var StakeOperations = class {
6494
6998
  }
6495
6999
  async getStakeVaultState(params) {
6496
7000
  const taker = params.taker ?? params.staker;
6497
- const { stakeToken } = this.getContract();
7001
+ const { address, abi, stakeToken } = await this.resolveReadContract(params.stakeVaultAddress);
7002
+ const read = (name, args = []) => this.readVault({ address, abi }, name, args);
7003
+ const controller = requireAddress(await read("controller"), "StakeVault.controller");
7004
+ const admissions = this.config.getPublicClient().readContract({
7005
+ address: controller,
7006
+ abi: this.getPolicyContract().abi,
7007
+ functionName: "admissionsPaused"
7008
+ });
6498
7009
  const [stakeOwner, rawSelection, staked, locked, free, claimable, admissionsPaused] = await Promise.all([
6499
- this.getStakeOwner(taker),
6500
- this.getSelectedStakeOwner(taker),
6501
- this.getStakeBalance(params.staker),
6502
- this.getLockedStake(params.staker),
6503
- this.getFreeStake(params.staker),
6504
- this.getClaimable(params.staker),
6505
- this.getAdmissionsPaused()
7010
+ read("stakeOwnerOf", [taker]),
7011
+ read("selectedStakeOwner", [taker]),
7012
+ read("stakeBalance", [params.staker]),
7013
+ read("lockedStake", [params.staker]),
7014
+ read("freeStake", [params.staker]),
7015
+ read("claimable", [params.staker]),
7016
+ admissions
6506
7017
  ]);
7018
+ if (typeof admissionsPaused !== "boolean") throw new Error("Malformed admissionsPaused");
6507
7019
  const selectedStakeOwner = rawSelection === zeroAddress ? null : rawSelection;
6508
- const selectionAuthorized = selectedStakeOwner ? await this.getTakerAuthorization(selectedStakeOwner, taker) : false;
7020
+ const selectionAuthorized = selectedStakeOwner ? await read("authorizedTakers", [selectedStakeOwner, taker]) : false;
6509
7021
  return {
6510
7022
  staker: params.staker,
6511
7023
  taker,
@@ -7894,411 +8406,64 @@ var IndexerStakingService = class {
7894
8406
  }));
7895
8407
  const riskWindows = data3.DisputeProtectionRiskWindow.map((row, index) => ({
7896
8408
  paymentMethod: row.paymentMethod,
7897
- riskWindowSeconds: normalizeDecimal(
7898
- row.riskWindow,
7899
- `DisputeProtectionRiskWindow[${index}].riskWindow`
7900
- ),
7901
- updatedAt: normalizeDecimal(row.updatedAt, `DisputeProtectionRiskWindow[${index}].updatedAt`)
7902
- }));
7903
- const takerFreshness = freshnessOf(takerState, "TakerStakeState");
7904
- const stakeFreshness = freshnessOf(stakeAccount, "StakeAccountState");
7905
- const claimFreshness = freshnessOf(claimAccount, "ClaimAccountState");
7906
- const vaultFreshness = freshnessOf(data3.StakeVaultConfig_by_pk, "StakeVaultConfig");
7907
- const authorizationFreshness = authorizations.map((authorization) => authorization.freshness);
7908
- return {
7909
- chainId: params.chainId,
7910
- environment: params.environment,
7911
- taker,
7912
- stakeOwner: indexedStakeOwner,
7913
- selectedStakeOwner,
7914
- selectionAuthorized: takerState?.selectionAuthorized ?? false,
7915
- stake: stakeAccount && stakeAccountMatchesEffectiveOwner ? {
7916
- totalUsdc: normalizeDecimal(stakeAccount.totalStake, "StakeAccountState.totalStake"),
7917
- lockedUsdc: normalizeDecimal(
7918
- stakeAccount.lockedStake,
7919
- "StakeAccountState.lockedStake"
7920
- ),
7921
- freeUsdc: normalizeDecimal(stakeAccount.freeStake, "StakeAccountState.freeStake")
7922
- } : { ...ZERO_STAKE },
7923
- claimableUsdc: claimAccount ? normalizeDecimal(claimAccount.claimableAmount, "ClaimAccountState.claimableAmount") : "0",
7924
- authorizations,
7925
- riskWindows,
7926
- vault: data3.StakeVaultConfig_by_pk ? {
7927
- controller: normalizeNullableAddress(
7928
- data3.StakeVaultConfig_by_pk.controller,
7929
- "StakeVaultConfig.controller"
7930
- ),
7931
- pendingController: normalizeNullableAddress(
7932
- data3.StakeVaultConfig_by_pk.pendingController,
7933
- "StakeVaultConfig.pendingController"
7934
- ),
7935
- pendingControllerValidAt: data3.StakeVaultConfig_by_pk.pendingControllerValidAt ? normalizeDecimal(
7936
- data3.StakeVaultConfig_by_pk.pendingControllerValidAt,
7937
- "StakeVaultConfig.pendingControllerValidAt"
7938
- ) : null
7939
- } : null,
7940
- stakeAccountMatchesEffectiveOwner,
7941
- freshness: {
7942
- takerStakeState: takerFreshness,
7943
- stakeAccountState: stakeFreshness,
7944
- claimAccountState: claimFreshness,
7945
- stakeVaultConfig: vaultFreshness,
7946
- authorizations: authorizationFreshness,
7947
- indexerHeadBlockNumber: indexerHeadBlockNumber(data3.chain_metadata, params.chainId)
7948
- }
7949
- };
7950
- }
7951
- };
7952
-
7953
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/index.js
7954
- var version = "0.4.4-rc.2";
7955
-
7956
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/base.js
7957
- var data = {
7958
- "schemaVersion": 2,
7959
- "network": "base",
7960
- "chainId": 8453,
7961
- "activeDisputeStack": {
7962
- "version": 2,
7963
- "selectionHash": "ba40c2954b408d0c658881a8d28e5bfcc9bade5cc3d953fd17eae1eca69d841c"
7964
- },
7965
- "runtimeIdentities": {
7966
- "Orchestrator": {
7967
- "address": "0x88888883Ed048FF0a415271B28b2F52d431810D0",
7968
- "runtimeCodeHash": "0xf511343f2903dd1877c490796cc9423fac66b162b59004d55e522046c1ceb050"
7969
- },
7970
- "OrchestratorV2": {
7971
- "address": "0x888888359E981B5225CA48fbCdCeff702FC3b888",
7972
- "runtimeCodeHash": "0xcf70a08cc24fcc00799f9f365d0998abe37c718c93ee370a78d1ca06c60d01e0"
7973
- },
7974
- "OrchestratorV3": {
7975
- "address": "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7",
7976
- "runtimeCodeHash": "0x4e58f26129559301c017ff264b61dd2255ed2107593d308472ef32d07b8745e9"
7977
- },
7978
- "StakeVault": {
7979
- "address": "0x47c26258222e2f96424bD2B21bf173f0DA5034C7",
7980
- "runtimeCodeHash": "0xfd8d2a910b9ac2c55675ae06d0504f9aac43b02b7022755cf229b571156c681d"
7981
- },
7982
- "DisputeProtectionPolicy": {
7983
- "address": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
7984
- "runtimeCodeHash": "0xf5a7756f16556da69c91c55bdcffd9fd95cc8cbdb772699827ec4c66db136dfe"
7985
- },
7986
- "IntentLifecycleHookV1": {
7987
- "address": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
7988
- "runtimeCodeHash": "0x2b479a570ddea7a990f2cae8fa95eb3b8599fc8b367332b8dab92f7d0cebf7e0"
7989
- },
7990
- "RecognizedPredecessorHook": {
7991
- "address": "0x71467dCac3B50eeED5A485aC6a70f27B1EAC1970",
7992
- "runtimeCodeHash": "0x35789014e608a248f3244b61210fa259fee3566c33f50fd0e3fa1f5ae22e370b"
7993
- },
7994
- "RecognizedPredecessorPolicy": {
7995
- "address": "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA",
7996
- "runtimeCodeHash": "0x9c4be279da216021183638eaef79ebf98db248472685e9ecd0de3f24a513a641"
7997
- },
7998
- "OrchestratorRegistry": {
7999
- "address": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
8000
- "runtimeCodeHash": "0xf0d132d621ac03181a6fade6a93bd0968d33830c8bf393793236787e7978aee1"
8001
- },
8002
- "WhitelistPolicy": {
8003
- "address": "0x389Cd9bA91FfFcd83d267B241E975541892759Ce",
8004
- "runtimeCodeHash": "0xa83d138a5b89d2fd2861702febc6333e542dcdc8994ee76c345dcbd22fe685a4"
8005
- },
8006
- "DisputeVerifier": {
8007
- "address": "0x30d4947f005653637005eed991005119D9eB2f34",
8008
- "runtimeCodeHash": "0x65246e11392befc33d92246cf3ac2467d1f338a8b73c6514b76fab0a70a01ead"
8009
- },
8010
- "DisputeNullifierRegistry": {
8011
- "address": "0xA845615b5203F7a21321DdF5e3a1ca024D93a443",
8012
- "runtimeCodeHash": "0x1a711749b7700142265363c9c184c195ac81a1415e2142aa84edcbf1cd88142a"
8013
- },
8014
- "MultiAttestationVerifier": {
8015
- "address": "0x9Fe920b24e50e6a6362BA71a1BeB502A99c402d5",
8016
- "runtimeCodeHash": "0x828a5dae520d3eaed904dfed56994dc6e892eb6416b58ad952c079e220ef841a"
8017
- }
8018
- },
8019
- "addressExpectations": {
8020
- "AddressGroupRegistry": "0x39F80118f9eB619135f116171b6Cb91D372C5AF2",
8021
- "EscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
8022
- "PaymentVerifierRegistry": "0x2b82D24437ff66Fb173eabDfD67ee2ACeb8bEb1e",
8023
- "RelayerRegistry": "0xEbA979889a9c97382A92472fF3703786fF180083",
8024
- "NullifierRegistryV2": "0x5455e761b866dfa6A2f5Dc6d6525825bf9C09aeB",
8025
- "StakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
8026
- },
8027
- "expectedRelations": {
8028
- "activeLifecycleHook": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
8029
- "recognizedPredecessorPolicy": "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA",
8030
- "registeredOrchestrator": "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7",
8031
- "authorizedLifecycleHook": "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031",
8032
- "disputeNullifierAuthorizedWriter": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
8033
- "orchestratorEscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
8034
- "orchestratorPaymentVerifierRegistry": "0x2b82D24437ff66Fb173eabDfD67ee2ACeb8bEb1e",
8035
- "orchestratorRelayerRegistry": "0xEbA979889a9c97382A92472fF3703786fF180083",
8036
- "hookOrchestratorRegistry": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
8037
- "hookWhitelistPolicy": "0x389Cd9bA91FfFcd83d267B241E975541892759Ce",
8038
- "hookDisputeProtectionPolicy": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
8039
- "whitelistGroupRegistry": "0x39F80118f9eB619135f116171b6Cb91D372C5AF2",
8040
- "whitelistEscrowRegistry": "0xeD0e847B101abc96E796260AC358e12BAa2f5B21",
8041
- "whitelistOrchestratorRegistry": "0xBe9fED15ED7A4B915C03EFcEcb9662739C3382A9",
8042
- "policyStakeVault": "0x47c26258222e2f96424bD2B21bf173f0DA5034C7",
8043
- "policyDisputeVerifier": "0x30d4947f005653637005eed991005119D9eB2f34",
8044
- "policyDisputeNullifierRegistry": "0xA845615b5203F7a21321DdF5e3a1ca024D93a443",
8045
- "disputeVerifierNullifierRegistry": "0x5455e761b866dfa6A2f5Dc6d6525825bf9C09aeB",
8046
- "disputeVerifierAttestationVerifier": "0x9Fe920b24e50e6a6362BA71a1BeB502A99c402d5",
8047
- "vaultController": "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc",
8048
- "vaultStakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
8049
- },
8050
- "expectedGovernance": {
8051
- "owner": "0x0bC26FF515411396DD588Abd6Ef6846E04470227",
8052
- "governedRuntimeIdentities": [
8053
- "OrchestratorRegistry",
8054
- "OrchestratorV3",
8055
- "StakeVault",
8056
- "DisputeProtectionPolicy",
8057
- "WhitelistPolicy",
8058
- "DisputeVerifier",
8059
- "DisputeNullifierRegistry",
8060
- "MultiAttestationVerifier"
8061
- ],
8062
- "pendingOwner": "0x0000000000000000000000000000000000000000",
8063
- "twoStepGovernedRuntimeIdentities": [
8064
- "StakeVault",
8065
- "DisputeProtectionPolicy",
8066
- "DisputeVerifier"
8067
- ]
8068
- },
8069
- "attestationTrust": {
8070
- "requiredSignatures": "1",
8071
- "witnesses": [
8072
- "0xDB4Ed7FAF170F0f6493E3adaaCaaFaF47092c754",
8073
- "0xE078D93bFdd87A8c5C5cCA5905DCbA0Dd7A1F0BD"
8074
- ]
8075
- },
8076
- "exactAuthorizationSets": {
8077
- "orchestratorAuthorizationFromBlock": "42878566",
8078
- "authorizedOrchestrators": [
8079
- "0x88888883Ed048FF0a415271B28b2F52d431810D0",
8080
- "0x888888359E981B5225CA48fbCdCeff702FC3b888",
8081
- "0x014025fDE093f8701d86e9f38e2C3a9b779cb5c7"
8082
- ],
8083
- "lifecycleHookAuthorizationFromBlock": "50537204",
8084
- "authorizedLifecycleHooks": [
8085
- "0x5Dd6C675a7406fE8C9f0D93394a36fd6e8c50031"
8086
- ],
8087
- "passiveDisputeNullifierWriters": [
8088
- "0xcEc48F7242eDBf02875BB4629115Bd927e1287aA"
8089
- ],
8090
- "activeDisputeNullifierWriters": [
8091
- "0xbF4B769dB70DBEc89b6b2c44988304a7aD2de4Fc"
8092
- ]
8093
- },
8094
- "riskWindowSecondsByPaymentMethod": {
8095
- "0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
8096
- "0x1d966dbd6aeb8674d7c05174bd0ded7b56a798672bfb862ef20bbe8c2bbfce18": "0",
8097
- "0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
8098
- "0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
8099
- "0x5908bb0c9b87763ac6171d4104847667e7f02b4c47b574fe890c1f439ed128bb": "0",
8100
- "0x617f88ab82b5c1b014c539f7e75121427f0bb50a4c58b187a238531e7d58605d": "0",
8101
- "0x62c7ed738ad3e7618111348af32691b5767777fbaf46a2d8943237625552645c": "0",
8102
- "0x790dd0cc68b6e7f474649a6c0a5463a964be9d2589e2076b6dc99f5701543f51": "0",
8103
- "0x90262a3db0edd0be2369c6b28f9e8511ec0bac7136cefbada0880602f87e7268": "1209600",
8104
- "0xa5418819c024239299ea32e09defae8ec412c03e58f5c75f1b2fe84c857f5483": "0",
8105
- "0xcac9daea62d7b89d75ac73af4ee14dcf25721012ae82b568c2ea5c808eaa04ff": "0",
8106
- "0xe99a5081226cbbff9440a63da5caa04fa30f210c12c4dd9976132ac075054cd9": "0",
8107
- "0xf752c7d19698ecb0bb8988abf9b9a53a4c3657f3bc8850a6fb59fdf3e3ce8cd3": "0"
8108
- },
8109
- "sentinel": {
8110
- "escrow": "0x0000000000000000000000000000000000000001",
8111
- "depositId": "0",
8112
- "expected": false
8113
- },
8114
- "prerequisites": {
8115
- "orchestratorPaused": false,
8116
- "admissionsPaused": false,
8117
- "allowMultipleIntents": true,
8118
- "orchestratorRegistered": true,
8119
- "lifecycleHookAuthorized": true,
8120
- "disputeNullifierWriterAuthorized": true,
8121
- "vaultControllerActivated": true,
8122
- "vaultPendingController": "0x0000000000000000000000000000000000000000",
8123
- "vaultPendingControllerValidAt": "0",
8124
- "pendingCoverageMaturity": "18446744073709551615"
8125
- }
8126
- };
8127
- var base_default = data;
8128
-
8129
- // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.2_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/disputeStack/baseStaging.js
8130
- var data2 = {
8131
- "schemaVersion": 2,
8132
- "network": "base_staging",
8133
- "chainId": 8453,
8134
- "activeDisputeStack": {
8135
- "version": 2,
8136
- "selectionHash": "6c49c1ce51eec594a22385c4efcab08aa9926b6b63a725e14a0027ec5d2f4fc9"
8137
- },
8138
- "runtimeIdentities": {
8139
- "Orchestrator": {
8140
- "address": "0xF9b9CD27Deea496B960b3cb5221b514705fCaF5e",
8141
- "runtimeCodeHash": "0xf511343f2903dd1877c490796cc9423fac66b162b59004d55e522046c1ceb050"
8142
- },
8143
- "OrchestratorV2": {
8144
- "address": "0xc17a59227B136c45fAa153086a15EF87ED14bE00",
8145
- "runtimeCodeHash": "0xcf70a08cc24fcc00799f9f365d0998abe37c718c93ee370a78d1ca06c60d01e0"
8146
- },
8147
- "OrchestratorV3": {
8148
- "address": "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f",
8149
- "runtimeCodeHash": "0x4e58f26129559301c017ff264b61dd2255ed2107593d308472ef32d07b8745e9"
8150
- },
8151
- "StakeVault": {
8152
- "address": "0x92d7B59E99e1CD2066540Cd2413b8714948b731f",
8153
- "runtimeCodeHash": "0xfd8d2a910b9ac2c55675ae06d0504f9aac43b02b7022755cf229b571156c681d"
8154
- },
8155
- "DisputeProtectionPolicy": {
8156
- "address": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
8157
- "runtimeCodeHash": "0x70c43bfae8253a6a166f9697ddc27b2d77b4d9841e01fefc2db84037d9a98622"
8158
- },
8159
- "IntentLifecycleHookV1": {
8160
- "address": "0x5A7f6cb7397134da1fDEFA7E2D434b4Cf18E56D9",
8161
- "runtimeCodeHash": "0xb9ce42108c706f9241aeb41ffdc0da6b7584e8482183055452098b2f16c7abfd"
8162
- },
8163
- "RecognizedPredecessorHook": {
8164
- "address": "0x19D9F0Fcb08C60D8bd0CD061C34eae27eF8b6e65",
8165
- "runtimeCodeHash": "0xba70239e37624f5808e2f79e100e83a17daeb1558f310543187f5d8a121ec367"
8166
- },
8167
- "RecognizedPredecessorPolicy": {
8168
- "address": "0x21517b7743E727ae47A66FafF93550B689c15020",
8169
- "runtimeCodeHash": "0x4e6617a94819ad15693289b173a9a66a78cfe1dd706f6b4fdc5a5f6ad6a32971"
8170
- },
8171
- "OrchestratorRegistry": {
8172
- "address": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
8173
- "runtimeCodeHash": "0xf0d132d621ac03181a6fade6a93bd0968d33830c8bf393793236787e7978aee1"
8174
- },
8175
- "WhitelistPolicy": {
8176
- "address": "0xF79aAD1BAaB617fF3Eb299225c80893F22F743Fe",
8177
- "runtimeCodeHash": "0x1ece96bb7be9cdd2433a2aad66c9b2d710e3e210a65876e0f8c1e43662ee5653"
8178
- },
8179
- "DisputeVerifier": {
8180
- "address": "0x973578148c5Fd49b9f68B50B26066555325AC708",
8181
- "runtimeCodeHash": "0xb3b34734cfd162cd129d0c84285461c751321545213ec20164745b8e72f9dd6c"
8182
- },
8183
- "DisputeNullifierRegistry": {
8184
- "address": "0xE0B05a9655AF0f31E32904267baa50FbC7f217ea",
8185
- "runtimeCodeHash": "0x1a711749b7700142265363c9c184c195ac81a1415e2142aa84edcbf1cd88142a"
8186
- },
8187
- "MultiAttestationVerifier": {
8188
- "address": "0x9855a39aC5975069632e91160d8712CBfF19e864",
8189
- "runtimeCodeHash": "0x828a5dae520d3eaed904dfed56994dc6e892eb6416b58ad952c079e220ef841a"
8190
- }
8191
- },
8192
- "addressExpectations": {
8193
- "AddressGroupRegistry": "0x54Ff7788Cb42B46FE2F016a65Fd0f654Bb9BcF3D",
8194
- "EscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
8195
- "PaymentVerifierRegistry": "0x2261416DA54C85f975C73FA56EF4D2D6b0aEF7Cc",
8196
- "RelayerRegistry": "0xB214650b424E6b5fdcB1259566eB7A512D8Bd25E",
8197
- "NullifierRegistryV2": "0x2eb43d6C7c7Ec4220Aa6B8735BC053824a71778C",
8198
- "StakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
8199
- },
8200
- "expectedRelations": {
8201
- "activeLifecycleHook": "0x5A7f6cb7397134da1fDEFA7E2D434b4Cf18E56D9",
8202
- "recognizedPredecessorPolicy": "0x21517b7743E727ae47A66FafF93550B689c15020",
8203
- "registeredOrchestrator": "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f",
8204
- "authorizedLifecycleHook": "0x5A7f6cb7397134da1fDEFA7E2D434b4Cf18E56D9",
8205
- "disputeNullifierAuthorizedWriter": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
8206
- "orchestratorEscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
8207
- "orchestratorPaymentVerifierRegistry": "0x2261416DA54C85f975C73FA56EF4D2D6b0aEF7Cc",
8208
- "orchestratorRelayerRegistry": "0xB214650b424E6b5fdcB1259566eB7A512D8Bd25E",
8209
- "hookOrchestratorRegistry": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
8210
- "hookWhitelistPolicy": "0xF79aAD1BAaB617fF3Eb299225c80893F22F743Fe",
8211
- "hookDisputeProtectionPolicy": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
8212
- "whitelistGroupRegistry": "0x54Ff7788Cb42B46FE2F016a65Fd0f654Bb9BcF3D",
8213
- "whitelistEscrowRegistry": "0xc545f336eC77E69bf115729acCbf2e557A00ac91",
8214
- "whitelistOrchestratorRegistry": "0xfA6384EB6176cfEC049540526A3d2126C3666d8A",
8215
- "policyStakeVault": "0x92d7B59E99e1CD2066540Cd2413b8714948b731f",
8216
- "policyDisputeVerifier": "0x973578148c5Fd49b9f68B50B26066555325AC708",
8217
- "policyDisputeNullifierRegistry": "0xE0B05a9655AF0f31E32904267baa50FbC7f217ea",
8218
- "disputeVerifierNullifierRegistry": "0x2eb43d6C7c7Ec4220Aa6B8735BC053824a71778C",
8219
- "disputeVerifierAttestationVerifier": "0x9855a39aC5975069632e91160d8712CBfF19e864",
8220
- "vaultController": "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c",
8221
- "vaultStakeToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
8222
- },
8223
- "expectedGovernance": {
8224
- "owner": "0x84e113087C97Cd80eA9D78983D4B8Ff61ECa1929",
8225
- "governedRuntimeIdentities": [
8226
- "OrchestratorRegistry",
8227
- "OrchestratorV3",
8228
- "StakeVault",
8229
- "DisputeProtectionPolicy",
8230
- "WhitelistPolicy",
8231
- "DisputeVerifier",
8232
- "DisputeNullifierRegistry",
8233
- "MultiAttestationVerifier"
8234
- ],
8235
- "pendingOwner": "0x0000000000000000000000000000000000000000",
8236
- "twoStepGovernedRuntimeIdentities": [
8237
- "StakeVault",
8238
- "DisputeProtectionPolicy",
8239
- "DisputeVerifier"
8240
- ]
8241
- },
8242
- "attestationTrust": {
8243
- "requiredSignatures": "1",
8244
- "witnesses": [
8245
- "0x66649F896521b0fb487fE2077b4FBDA283d7f19a",
8246
- "0x4ab950AE1e3326578Bf7e643a2031E858aBa2927"
8247
- ]
8248
- },
8249
- "exactAuthorizationSets": {
8250
- "orchestratorAuthorizationFromBlock": "42614859",
8251
- "authorizedOrchestrators": [
8252
- "0xF9b9CD27Deea496B960b3cb5221b514705fCaF5e",
8253
- "0xc17a59227B136c45fAa153086a15EF87ED14bE00",
8254
- "0x2b5E8Ab562e45fA89D73802605E145ED3E3EeF4f"
8255
- ],
8256
- "lifecycleHookAuthorizationFromBlock": "50536390",
8257
- "authorizedLifecycleHooks": [
8258
- "0x5A7f6cb7397134da1fDEFA7E2D434b4Cf18E56D9"
8259
- ],
8260
- "passiveDisputeNullifierWriters": [
8261
- "0x21517b7743E727ae47A66FafF93550B689c15020"
8262
- ],
8263
- "activeDisputeNullifierWriters": [
8264
- "0x484fA07F085eb66bb7C2b649Ea9d5894b2B6681c"
8265
- ]
8266
- },
8267
- "riskWindowSecondsByPaymentMethod": {
8268
- "0x10940ee67cfb3c6c064569ec92c0ee934cd7afa18dd2ca2d6a2254fcb009c17d": "0",
8269
- "0x1d966dbd6aeb8674d7c05174bd0ded7b56a798672bfb862ef20bbe8c2bbfce18": "0",
8270
- "0x3ccc3d4d5e769b1f82dc4988485551dc0cd3c7a3926d7d8a4dde91507199490f": "1209600",
8271
- "0x554a007c2217df766b977723b276671aee5ebb4adaea0edb6433c88b3e61dac5": "0",
8272
- "0x5908bb0c9b87763ac6171d4104847667e7f02b4c47b574fe890c1f439ed128bb": "0",
8273
- "0x617f88ab82b5c1b014c539f7e75121427f0bb50a4c58b187a238531e7d58605d": "0",
8274
- "0x62c7ed738ad3e7618111348af32691b5767777fbaf46a2d8943237625552645c": "0",
8275
- "0x790dd0cc68b6e7f474649a6c0a5463a964be9d2589e2076b6dc99f5701543f51": "0",
8276
- "0x90262a3db0edd0be2369c6b28f9e8511ec0bac7136cefbada0880602f87e7268": "1209600",
8277
- "0xa5418819c024239299ea32e09defae8ec412c03e58f5c75f1b2fe84c857f5483": "0",
8278
- "0xcac9daea62d7b89d75ac73af4ee14dcf25721012ae82b568c2ea5c808eaa04ff": "0",
8279
- "0xe99a5081226cbbff9440a63da5caa04fa30f210c12c4dd9976132ac075054cd9": "0",
8280
- "0xf752c7d19698ecb0bb8988abf9b9a53a4c3657f3bc8850a6fb59fdf3e3ce8cd3": "0",
8281
- "0xf81480907d808d639ad3230869e4b05a3b01b2d34e323af40f2efab807effd32": "0"
8282
- },
8283
- "sentinel": {
8284
- "escrow": "0x0000000000000000000000000000000000000001",
8285
- "depositId": "0",
8286
- "expected": false
8287
- },
8288
- "prerequisites": {
8289
- "orchestratorPaused": false,
8290
- "admissionsPaused": false,
8291
- "allowMultipleIntents": false,
8292
- "orchestratorRegistered": true,
8293
- "lifecycleHookAuthorized": true,
8294
- "disputeNullifierWriterAuthorized": true,
8295
- "vaultControllerActivated": true,
8296
- "vaultPendingController": "0x0000000000000000000000000000000000000000",
8297
- "vaultPendingControllerValidAt": "0",
8298
- "pendingCoverageMaturity": "18446744073709551615"
8409
+ riskWindowSeconds: normalizeDecimal(
8410
+ row.riskWindow,
8411
+ `DisputeProtectionRiskWindow[${index}].riskWindow`
8412
+ ),
8413
+ updatedAt: normalizeDecimal(row.updatedAt, `DisputeProtectionRiskWindow[${index}].updatedAt`)
8414
+ }));
8415
+ const takerFreshness = freshnessOf(takerState, "TakerStakeState");
8416
+ const stakeFreshness = freshnessOf(stakeAccount, "StakeAccountState");
8417
+ const claimFreshness = freshnessOf(claimAccount, "ClaimAccountState");
8418
+ const vaultFreshness = freshnessOf(data3.StakeVaultConfig_by_pk, "StakeVaultConfig");
8419
+ const authorizationFreshness = authorizations.map((authorization) => authorization.freshness);
8420
+ return {
8421
+ chainId: params.chainId,
8422
+ environment: params.environment,
8423
+ taker,
8424
+ stakeOwner: indexedStakeOwner,
8425
+ selectedStakeOwner,
8426
+ selectionAuthorized: takerState?.selectionAuthorized ?? false,
8427
+ stake: stakeAccount && stakeAccountMatchesEffectiveOwner ? {
8428
+ totalUsdc: normalizeDecimal(stakeAccount.totalStake, "StakeAccountState.totalStake"),
8429
+ lockedUsdc: normalizeDecimal(
8430
+ stakeAccount.lockedStake,
8431
+ "StakeAccountState.lockedStake"
8432
+ ),
8433
+ freeUsdc: normalizeDecimal(stakeAccount.freeStake, "StakeAccountState.freeStake")
8434
+ } : { ...ZERO_STAKE },
8435
+ claimableUsdc: claimAccount ? normalizeDecimal(claimAccount.claimableAmount, "ClaimAccountState.claimableAmount") : "0",
8436
+ authorizations,
8437
+ riskWindows,
8438
+ vault: data3.StakeVaultConfig_by_pk ? {
8439
+ controller: normalizeNullableAddress(
8440
+ data3.StakeVaultConfig_by_pk.controller,
8441
+ "StakeVaultConfig.controller"
8442
+ ),
8443
+ pendingController: normalizeNullableAddress(
8444
+ data3.StakeVaultConfig_by_pk.pendingController,
8445
+ "StakeVaultConfig.pendingController"
8446
+ ),
8447
+ pendingControllerValidAt: data3.StakeVaultConfig_by_pk.pendingControllerValidAt ? normalizeDecimal(
8448
+ data3.StakeVaultConfig_by_pk.pendingControllerValidAt,
8449
+ "StakeVaultConfig.pendingControllerValidAt"
8450
+ ) : null
8451
+ } : null,
8452
+ stakeAccountMatchesEffectiveOwner,
8453
+ freshness: {
8454
+ takerStakeState: takerFreshness,
8455
+ stakeAccountState: stakeFreshness,
8456
+ claimAccountState: claimFreshness,
8457
+ stakeVaultConfig: vaultFreshness,
8458
+ authorizations: authorizationFreshness,
8459
+ indexerHeadBlockNumber: indexerHeadBlockNumber(data3.chain_metadata, params.chainId)
8460
+ }
8461
+ };
8299
8462
  }
8300
8463
  };
8301
- var baseStaging_default = data2;
8464
+
8465
+ // ../../node_modules/.pnpm/@zkp2p+contracts-v2@0.4.4-rc.5_ethers@6.16.0_bufferutil@4.1.0_utf-8-validate@5.0.10__typescript@5.9.3_zod@4.5.4/node_modules/@zkp2p/contracts-v2/_esm/index.js
8466
+ var version = "0.4.4-rc.5";
8302
8467
 
8303
8468
  // src/buildMetadata.ts
8304
8469
  var DEVELOPMENT_BUILD_METADATA = {
@@ -8320,7 +8485,6 @@ var DEVELOPMENT_BUILD_METADATA = {
8320
8485
  var SDK_BUILD_METADATA = typeof define_ZKP2P_SDK_BUILD_METADATA_default === "undefined" ? DEVELOPMENT_BUILD_METADATA : define_ZKP2P_SDK_BUILD_METADATA_default;
8321
8486
 
8322
8487
  // src/client/DisputeProtectionReadiness.ts
8323
- var DisputeProtectionPolicy = DISPUTE_PROTECTION_POLICY_ABI ?? DisputeProtectionPolicy_default;
8324
8488
  var SUCCESSOR_RUNTIME_IDENTITIES = [
8325
8489
  "IntentLifecycleHookV1",
8326
8490
  "StakeVault",
@@ -8331,24 +8495,13 @@ var SUCCESSOR_RUNTIME_IDENTITIES = [
8331
8495
  "DisputeNullifierRegistry",
8332
8496
  "MultiAttestationVerifier"
8333
8497
  ];
8334
- var GOVERNANCE_ABIS = {
8335
- OrchestratorRegistry: OrchestratorRegistry_default,
8336
- OrchestratorV3: OrchestratorV3_default,
8337
- StakeVault: StakeVault_default,
8338
- DisputeProtectionPolicy,
8339
- WhitelistPolicy: WhitelistPolicy_default,
8340
- DisputeVerifier: DisputeVerifier_default,
8341
- DisputeNullifierRegistry: DisputeNullifierRegistry_default,
8342
- MultiAttestationVerifier: MultiAttestationVerifier_default
8343
- };
8344
- var ORCHESTRATOR_AUTHORIZATION_EVENTS = OrchestratorRegistry_default.filter(
8345
- (item) => item.type === "event" && (item.name === "OrchestratorAdded" || item.name === "OrchestratorRemoved")
8346
- );
8347
- var LIFECYCLE_HOOK_AUTHORIZATION_EVENTS = DisputeProtectionPolicy.filter(
8348
- (item) => item.type === "event" && item.name === "LifecycleHookAuthorizationUpdated"
8349
- );
8350
8498
  var FALLBACK_LOG_BLOCK_SPAN = 10000n;
8351
8499
  var LOG_QUERY_CONCURRENCY = 8;
8500
+ var DisputeProtectionVerifiedStack = /* @__PURE__ */ ((DisputeProtectionVerifiedStack2) => {
8501
+ DisputeProtectionVerifiedStack2["Manifest"] = "manifest";
8502
+ DisputeProtectionVerifiedStack2["BypassRecords"] = "bypass_records";
8503
+ return DisputeProtectionVerifiedStack2;
8504
+ })(DisputeProtectionVerifiedStack || {});
8352
8505
  var ReadinessMismatch = class extends Error {
8353
8506
  };
8354
8507
  function sameAddress(actual, expected) {
@@ -8443,7 +8596,8 @@ function manifestForEnvironment(environment) {
8443
8596
  async function readDisputeAttestationConfig({
8444
8597
  publicClient,
8445
8598
  chainId,
8446
- environment = "production"
8599
+ environment = "production",
8600
+ policyAddress
8447
8601
  }) {
8448
8602
  const manifest = manifestForEnvironment(environment);
8449
8603
  if (manifest.chainId !== chainId) {
@@ -8451,20 +8605,53 @@ async function readDisputeAttestationConfig({
8451
8605
  `Dispute attestation is unavailable for chainId=${chainId}, env=${environment}`
8452
8606
  );
8453
8607
  }
8608
+ const abis = getDisputeStackAbis(environment);
8609
+ const { MultiAttestationVerifier } = abis;
8610
+ const selectedPolicy = policyAddress ?? manifest.runtimeIdentities.DisputeProtectionPolicy.address;
8611
+ if (!getKnownPolicies(chainId, environment).some((known) => sameAddress(known, selectedPolicy))) {
8612
+ throw new Error("Unknown DisputeProtectionPolicy address");
8613
+ }
8454
8614
  const asOfBlock = await publicClient.getBlockNumber();
8455
- const attestationVerifier = manifest.runtimeIdentities.MultiAttestationVerifier.address;
8615
+ let verifierAddress = manifest.runtimeIdentities.DisputeVerifier.address;
8616
+ let attestationVerifier = manifest.runtimeIdentities.MultiAttestationVerifier.address;
8617
+ if (!sameAddress(selectedPolicy, manifest.runtimeIdentities.DisputeProtectionPolicy.address)) {
8618
+ verifierAddress = requireAddress(
8619
+ await publicClient.readContract({
8620
+ address: selectedPolicy,
8621
+ abi: abis.DisputeProtectionPolicy,
8622
+ functionName: "disputeVerifier",
8623
+ blockNumber: asOfBlock
8624
+ }),
8625
+ "DisputeProtectionPolicy.disputeVerifier"
8626
+ );
8627
+ const verifierAbi = abis.DisputeVerifier.some(
8628
+ (item) => item.type === "function" && item.name === "attestationVerifier"
8629
+ ) ? abis.DisputeVerifier : [
8630
+ ...abis.DisputeVerifier,
8631
+ ...parseAbi(["function attestationVerifier() view returns (address)"])
8632
+ ];
8633
+ attestationVerifier = requireAddress(
8634
+ await publicClient.readContract({
8635
+ address: verifierAddress,
8636
+ abi: verifierAbi,
8637
+ functionName: "attestationVerifier",
8638
+ blockNumber: asOfBlock
8639
+ }),
8640
+ "DisputeVerifier.attestationVerifier"
8641
+ );
8642
+ }
8456
8643
  const [rawRequiredSignatures, rawTrustedSigners] = await publicClient.multicall({
8457
8644
  allowFailure: false,
8458
8645
  blockNumber: asOfBlock,
8459
8646
  contracts: [
8460
8647
  {
8461
8648
  address: attestationVerifier,
8462
- abi: MultiAttestationVerifier_default,
8649
+ abi: MultiAttestationVerifier,
8463
8650
  functionName: "requiredSignatures"
8464
8651
  },
8465
8652
  {
8466
8653
  address: attestationVerifier,
8467
- abi: MultiAttestationVerifier_default,
8654
+ abi: MultiAttestationVerifier,
8468
8655
  functionName: "witnesses"
8469
8656
  }
8470
8657
  ]
@@ -8483,8 +8670,8 @@ async function readDisputeAttestationConfig({
8483
8670
  return {
8484
8671
  asOfBlock,
8485
8672
  chainId: manifest.chainId,
8486
- policyAddress: manifest.runtimeIdentities.DisputeProtectionPolicy.address,
8487
- verifierAddress: manifest.runtimeIdentities.DisputeVerifier.address,
8673
+ policyAddress: selectedPolicy,
8674
+ verifierAddress,
8488
8675
  trustedSigners,
8489
8676
  requiredSignatures
8490
8677
  };
@@ -8518,12 +8705,16 @@ function knownResult(state, readyForDisputeProtection, blockNumber, config, life
8518
8705
  activeLifecycleHook: lifecycleHook,
8519
8706
  orchestratorPaused: paused,
8520
8707
  allowMultipleIntents,
8521
- policyAdmissionsPaused
8708
+ policyAdmissionsPaused,
8709
+ verifiedStack: "manifest" /* Manifest */
8522
8710
  };
8523
8711
  }
8524
8712
  var DisputeProtectionReadinessReader = class {
8525
8713
  constructor(config) {
8526
8714
  this.config = config;
8715
+ this.abis = getDisputeStackAbis(
8716
+ config.manifest.network === "base_staging" ? "staging" : "production"
8717
+ );
8527
8718
  }
8528
8719
  async verifyRuntimeIdentities(names, blockNumber) {
8529
8720
  await Promise.all(
@@ -8549,13 +8740,21 @@ var DisputeProtectionReadinessReader = class {
8549
8740
  allowFailure: false,
8550
8741
  blockNumber,
8551
8742
  contracts: [
8552
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "lifecycleHook" },
8553
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "paused" },
8554
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "allowMultipleIntents" },
8555
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "chainId" },
8556
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "escrowRegistry" },
8557
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "paymentVerifierRegistry" },
8558
- { address: orchestrator, abi: OrchestratorV3_default, functionName: "relayerRegistry" }
8743
+ { address: orchestrator, abi: this.abis.OrchestratorV3, functionName: "lifecycleHook" },
8744
+ { address: orchestrator, abi: this.abis.OrchestratorV3, functionName: "paused" },
8745
+ {
8746
+ address: orchestrator,
8747
+ abi: this.abis.OrchestratorV3,
8748
+ functionName: "allowMultipleIntents"
8749
+ },
8750
+ { address: orchestrator, abi: this.abis.OrchestratorV3, functionName: "chainId" },
8751
+ { address: orchestrator, abi: this.abis.OrchestratorV3, functionName: "escrowRegistry" },
8752
+ {
8753
+ address: orchestrator,
8754
+ abi: this.abis.OrchestratorV3,
8755
+ functionName: "paymentVerifierRegistry"
8756
+ },
8757
+ { address: orchestrator, abi: this.abis.OrchestratorV3, functionName: "relayerRegistry" }
8559
8758
  ]
8560
8759
  });
8561
8760
  const lifecycleHook = result[0];
@@ -8592,12 +8791,12 @@ var DisputeProtectionReadinessReader = class {
8592
8791
  const governance = manifest.expectedGovernance;
8593
8792
  const ownerContracts = governance.governedRuntimeIdentities.map((name) => ({
8594
8793
  address: manifest.runtimeIdentities[name].address,
8595
- abi: GOVERNANCE_ABIS[name],
8794
+ abi: this.abis[name],
8596
8795
  functionName: "owner"
8597
8796
  }));
8598
8797
  const pendingOwnerContracts = governance.twoStepGovernedRuntimeIdentities.map((name) => ({
8599
8798
  address: manifest.runtimeIdentities[name].address,
8600
- abi: GOVERNANCE_ABIS[name],
8799
+ abi: this.abis[name],
8601
8800
  functionName: "pendingOwner"
8602
8801
  }));
8603
8802
  const results = await publicClient.multicall({
@@ -8625,10 +8824,10 @@ var DisputeProtectionReadinessReader = class {
8625
8824
  contracts: [
8626
8825
  {
8627
8826
  address: verifier,
8628
- abi: MultiAttestationVerifier_default,
8827
+ abi: this.abis.MultiAttestationVerifier,
8629
8828
  functionName: "requiredSignatures"
8630
8829
  },
8631
- { address: verifier, abi: MultiAttestationVerifier_default, functionName: "witnesses" }
8830
+ { address: verifier, abi: this.abis.MultiAttestationVerifier, functionName: "witnesses" }
8632
8831
  ]
8633
8832
  });
8634
8833
  expectBigInt(
@@ -8688,19 +8887,23 @@ var DisputeProtectionReadinessReader = class {
8688
8887
  const [orchestratorEvents, lifecycleHookEvents, writers] = await Promise.all([
8689
8888
  this.readAuthorizationEvents({
8690
8889
  address: identities.OrchestratorRegistry.address,
8691
- events: ORCHESTRATOR_AUTHORIZATION_EVENTS,
8890
+ events: this.abis.OrchestratorRegistry.filter(
8891
+ (item) => item.type === "event" && (item.name === "OrchestratorAdded" || item.name === "OrchestratorRemoved")
8892
+ ),
8692
8893
  fromBlock: BigInt(authorizations.orchestratorAuthorizationFromBlock),
8693
8894
  toBlock: blockNumber
8694
8895
  }),
8695
8896
  this.readAuthorizationEvents({
8696
8897
  address: identities.DisputeProtectionPolicy.address,
8697
- events: LIFECYCLE_HOOK_AUTHORIZATION_EVENTS,
8898
+ events: this.abis.DisputeProtectionPolicy.filter(
8899
+ (item) => item.type === "event" && item.name === "LifecycleHookAuthorizationUpdated"
8900
+ ),
8698
8901
  fromBlock: BigInt(authorizations.lifecycleHookAuthorizationFromBlock),
8699
8902
  toBlock: blockNumber
8700
8903
  }),
8701
8904
  publicClient.readContract({
8702
8905
  address: identities.DisputeNullifierRegistry.address,
8703
- abi: DisputeNullifierRegistry_default,
8906
+ abi: this.abis.DisputeNullifierRegistry,
8704
8907
  functionName: "getWriters",
8705
8908
  blockNumber
8706
8909
  })
@@ -8739,18 +8942,42 @@ var DisputeProtectionReadinessReader = class {
8739
8942
  lifecycleHooks,
8740
8943
  authorizations.authorizedLifecycleHooks
8741
8944
  );
8742
- expectAddressSet(
8743
- "DisputeNullifierRegistry writers",
8744
- writers,
8745
- successorActive ? authorizations.activeDisputeNullifierWriters : authorizations.passiveDisputeNullifierWriters
8945
+ if (successorActive) {
8946
+ await this.verifyActiveNullifierWriters(writers, blockNumber);
8947
+ } else {
8948
+ expectAddressSet(
8949
+ "DisputeNullifierRegistry writers",
8950
+ writers,
8951
+ authorizations.passiveDisputeNullifierWriters
8952
+ );
8953
+ }
8954
+ }
8955
+ /**
8956
+ * The recognized predecessor remains a writer while its old intents drain.
8957
+ * Fail closed on missing active writers or unknown writers, and prove any
8958
+ * retained predecessor against its packaged runtime hash at the pinned block.
8959
+ */
8960
+ async verifyActiveNullifierWriters(writers, blockNumber) {
8961
+ const { manifest } = this.config;
8962
+ const label = "DisputeNullifierRegistry writers";
8963
+ const actual = normalizeAddressSet(label, writers);
8964
+ const required = normalizeAddressSet(
8965
+ label,
8966
+ manifest.exactAuthorizationSets.activeDisputeNullifierWriters
8746
8967
  );
8968
+ const predecessor = manifest.runtimeIdentities.RecognizedPredecessorPolicy.address.toLowerCase();
8969
+ if (required.some((address) => !actual.includes(address))) {
8970
+ throw new ReadinessMismatch(`${label} is missing the active dispute policy`);
8971
+ }
8972
+ if (actual.some((address) => !required.includes(address) && address !== predecessor)) {
8973
+ throw new ReadinessMismatch(`${label} mismatch`);
8974
+ }
8975
+ if (actual.includes(predecessor)) {
8976
+ await this.verifyRuntimeIdentities(["RecognizedPredecessorPolicy"], blockNumber);
8977
+ }
8747
8978
  }
8748
- async verifySuccessorState(blockNumber, successorActive) {
8749
- const { manifest, publicClient } = this.config;
8750
- const identities = manifest.runtimeIdentities;
8751
- const relations = manifest.expectedRelations;
8752
- const prerequisite = manifest.prerequisites;
8753
- const policy = identities.DisputeProtectionPolicy.address;
8979
+ getRiskWindowEntries() {
8980
+ const { manifest } = this.config;
8754
8981
  const riskWindows = Object.entries(manifest.riskWindowSecondsByPaymentMethod).sort(
8755
8982
  ([left], [right]) => left.localeCompare(right)
8756
8983
  );
@@ -8758,65 +8985,74 @@ var DisputeProtectionReadinessReader = class {
8758
8985
  if (!sentinelPaymentMethod) {
8759
8986
  throw new ReadinessMismatch("DisputeProtectionPolicy sentinel payment method is missing");
8760
8987
  }
8988
+ return { riskWindows, sentinelPaymentMethod };
8989
+ }
8990
+ async verifySuccessorState(blockNumber, successorActive) {
8991
+ const { manifest, publicClient } = this.config;
8992
+ const identities = manifest.runtimeIdentities;
8993
+ const relations = manifest.expectedRelations;
8994
+ const prerequisite = manifest.prerequisites;
8995
+ const policy = identities.DisputeProtectionPolicy.address;
8996
+ const { riskWindows, sentinelPaymentMethod } = this.getRiskWindowEntries();
8761
8997
  const contracts = [
8762
8998
  {
8763
8999
  address: identities.IntentLifecycleHookV1.address,
8764
- abi: IntentLifecycleHookV1_default,
9000
+ abi: this.abis.IntentLifecycleHookV1,
8765
9001
  functionName: "orchestratorRegistry"
8766
9002
  },
8767
9003
  {
8768
9004
  address: identities.IntentLifecycleHookV1.address,
8769
- abi: IntentLifecycleHookV1_default,
9005
+ abi: this.abis.IntentLifecycleHookV1,
8770
9006
  functionName: "whitelistPolicy"
8771
9007
  },
8772
9008
  {
8773
9009
  address: identities.IntentLifecycleHookV1.address,
8774
- abi: IntentLifecycleHookV1_default,
9010
+ abi: this.abis.IntentLifecycleHookV1,
8775
9011
  functionName: "disputeProtectionPolicy"
8776
9012
  },
8777
9013
  {
8778
9014
  address: identities.OrchestratorRegistry.address,
8779
- abi: OrchestratorRegistry_default,
9015
+ abi: this.abis.OrchestratorRegistry,
8780
9016
  functionName: "isOrchestrator",
8781
9017
  args: [relations.registeredOrchestrator]
8782
9018
  },
8783
9019
  {
8784
9020
  address: identities.WhitelistPolicy.address,
8785
- abi: WhitelistPolicy_default,
9021
+ abi: this.abis.WhitelistPolicy,
8786
9022
  functionName: "groupRegistry"
8787
9023
  },
8788
9024
  {
8789
9025
  address: identities.WhitelistPolicy.address,
8790
- abi: WhitelistPolicy_default,
9026
+ abi: this.abis.WhitelistPolicy,
8791
9027
  functionName: "escrowRegistry"
8792
9028
  },
8793
9029
  {
8794
9030
  address: identities.WhitelistPolicy.address,
8795
- abi: WhitelistPolicy_default,
9031
+ abi: this.abis.WhitelistPolicy,
8796
9032
  functionName: "orchestratorRegistry"
8797
9033
  },
8798
- { address: policy, abi: DisputeProtectionPolicy, functionName: "stakeVault" },
8799
- { address: policy, abi: DisputeProtectionPolicy, functionName: "disputeVerifier" },
9034
+ { address: policy, abi: this.abis.DisputeProtectionPolicy, functionName: "stakeVault" },
9035
+ { address: policy, abi: this.abis.DisputeProtectionPolicy, functionName: "disputeVerifier" },
8800
9036
  {
8801
9037
  address: policy,
8802
- abi: DisputeProtectionPolicy,
9038
+ abi: this.abis.DisputeProtectionPolicy,
8803
9039
  functionName: "disputeNullifierRegistry"
8804
9040
  },
8805
9041
  {
8806
9042
  address: policy,
8807
- abi: DisputeProtectionPolicy,
9043
+ abi: this.abis.DisputeProtectionPolicy,
8808
9044
  functionName: "isLifecycleHookAuthorized",
8809
9045
  args: [relations.authorizedLifecycleHook]
8810
9046
  },
8811
- { address: policy, abi: DisputeProtectionPolicy, functionName: "admissionsPaused" },
9047
+ { address: policy, abi: this.abis.DisputeProtectionPolicy, functionName: "admissionsPaused" },
8812
9048
  {
8813
9049
  address: policy,
8814
- abi: DisputeProtectionPolicy,
9050
+ abi: this.abis.DisputeProtectionPolicy,
8815
9051
  functionName: "PENDING_COVERAGE_MATURITY"
8816
9052
  },
8817
9053
  {
8818
9054
  address: policy,
8819
- abi: DisputeProtectionPolicy,
9055
+ abi: this.abis.DisputeProtectionPolicy,
8820
9056
  functionName: "isDisputeProtectionEnabled",
8821
9057
  args: [
8822
9058
  manifest.sentinel.escrow,
@@ -8826,30 +9062,38 @@ var DisputeProtectionReadinessReader = class {
8826
9062
  },
8827
9063
  ...riskWindows.map(([paymentMethod]) => ({
8828
9064
  address: policy,
8829
- abi: DisputeProtectionPolicy,
9065
+ abi: this.abis.DisputeProtectionPolicy,
8830
9066
  functionName: "getRiskWindow",
8831
9067
  args: [paymentMethod]
8832
9068
  })),
8833
9069
  {
8834
9070
  address: identities.DisputeVerifier.address,
8835
- abi: DisputeVerifier_default,
9071
+ abi: this.abis.DisputeVerifier,
8836
9072
  functionName: "nullifierRegistry"
8837
9073
  },
8838
9074
  {
8839
9075
  address: identities.DisputeVerifier.address,
8840
- abi: DisputeVerifier_default,
9076
+ abi: this.abis.DisputeVerifier,
8841
9077
  functionName: "attestationVerifier"
8842
9078
  },
8843
- { address: identities.StakeVault.address, abi: StakeVault_default, functionName: "controller" },
8844
- { address: identities.StakeVault.address, abi: StakeVault_default, functionName: "stakeToken" },
8845
9079
  {
8846
9080
  address: identities.StakeVault.address,
8847
- abi: StakeVault_default,
9081
+ abi: this.abis.StakeVault,
9082
+ functionName: "controller"
9083
+ },
9084
+ {
9085
+ address: identities.StakeVault.address,
9086
+ abi: this.abis.StakeVault,
9087
+ functionName: "stakeToken"
9088
+ },
9089
+ {
9090
+ address: identities.StakeVault.address,
9091
+ abi: this.abis.StakeVault,
8848
9092
  functionName: "pendingController"
8849
9093
  },
8850
9094
  {
8851
9095
  address: identities.StakeVault.address,
8852
- abi: StakeVault_default,
9096
+ abi: this.abis.StakeVault,
8853
9097
  functionName: "pendingControllerValidAt"
8854
9098
  }
8855
9099
  ];
@@ -8941,6 +9185,166 @@ var DisputeProtectionReadinessReader = class {
8941
9185
  await this.verifyExactAuthorizationSets(blockNumber, successorActive);
8942
9186
  return policyAdmissionsPaused;
8943
9187
  }
9188
+ /** Bypass records have no manifest hashes yet: prove code presence and every rollout relation. */
9189
+ async verifyBypass(blockNumber) {
9190
+ const records = this.config.bypassRecords;
9191
+ if (!records) throw new ReadinessMismatch("Bypass records unavailable");
9192
+ const { publicClient, manifest } = this.config;
9193
+ for (const [name, address] of Object.entries(records)) {
9194
+ const code = await publicClient.getBytecode({ address, blockNumber });
9195
+ if (!code || code === "0x")
9196
+ throw new ReadinessMismatch(`Bypass ${name} runtime bytecode unavailable`);
9197
+ }
9198
+ const relations = manifest.expectedRelations;
9199
+ const { riskWindows, sentinelPaymentMethod } = this.getRiskWindowEntries();
9200
+ const contracts = [
9201
+ {
9202
+ address: records.lifecycleHook,
9203
+ abi: this.abis.IntentLifecycleHookV1,
9204
+ functionName: "orchestratorRegistry"
9205
+ },
9206
+ {
9207
+ address: records.lifecycleHook,
9208
+ abi: this.abis.IntentLifecycleHookV1,
9209
+ functionName: "whitelistPolicy"
9210
+ },
9211
+ {
9212
+ address: records.lifecycleHook,
9213
+ abi: this.abis.IntentLifecycleHookV1,
9214
+ functionName: "disputeProtectionPolicy"
9215
+ },
9216
+ {
9217
+ address: relations.hookOrchestratorRegistry,
9218
+ abi: this.abis.OrchestratorRegistry,
9219
+ functionName: "isOrchestrator",
9220
+ args: [manifest.runtimeIdentities.OrchestratorV3.address]
9221
+ },
9222
+ {
9223
+ address: records.policy,
9224
+ abi: this.abis.DisputeProtectionPolicy,
9225
+ functionName: "stakeVault"
9226
+ },
9227
+ {
9228
+ address: records.policy,
9229
+ abi: this.abis.DisputeProtectionPolicy,
9230
+ functionName: "isLifecycleHookAuthorized",
9231
+ args: [records.lifecycleHook]
9232
+ },
9233
+ {
9234
+ address: records.policy,
9235
+ abi: this.abis.DisputeProtectionPolicy,
9236
+ functionName: "PENDING_COVERAGE_MATURITY"
9237
+ },
9238
+ { address: records.vault, abi: this.abis.StakeVault, functionName: "controller" },
9239
+ { address: records.vault, abi: this.abis.StakeVault, functionName: "stakeToken" },
9240
+ { address: records.vault, abi: this.abis.StakeVault, functionName: "pendingController" },
9241
+ {
9242
+ address: records.policy,
9243
+ abi: this.abis.DisputeProtectionPolicy,
9244
+ functionName: "admissionsPaused"
9245
+ },
9246
+ {
9247
+ address: records.vault,
9248
+ abi: this.abis.StakeVault,
9249
+ functionName: "pendingControllerValidAt"
9250
+ },
9251
+ {
9252
+ address: records.policy,
9253
+ abi: this.abis.DisputeProtectionPolicy,
9254
+ functionName: "disputeVerifier"
9255
+ },
9256
+ {
9257
+ address: records.policy,
9258
+ abi: this.abis.DisputeProtectionPolicy,
9259
+ functionName: "disputeNullifierRegistry"
9260
+ },
9261
+ {
9262
+ address: records.policy,
9263
+ abi: this.abis.DisputeProtectionPolicy,
9264
+ functionName: "isDisputeProtectionEnabled",
9265
+ args: [
9266
+ manifest.sentinel.escrow,
9267
+ BigInt(manifest.sentinel.depositId),
9268
+ sentinelPaymentMethod
9269
+ ]
9270
+ },
9271
+ ...riskWindows.map(([paymentMethod]) => ({
9272
+ address: records.policy,
9273
+ abi: this.abis.DisputeProtectionPolicy,
9274
+ functionName: "getRiskWindow",
9275
+ args: [paymentMethod]
9276
+ })),
9277
+ {
9278
+ address: relations.policyDisputeVerifier,
9279
+ abi: this.abis.DisputeVerifier,
9280
+ functionName: "nullifierRegistry"
9281
+ },
9282
+ {
9283
+ address: relations.policyDisputeVerifier,
9284
+ abi: this.abis.DisputeVerifier,
9285
+ functionName: "attestationVerifier"
9286
+ },
9287
+ {
9288
+ address: relations.policyDisputeNullifierRegistry,
9289
+ abi: this.abis.DisputeNullifierRegistry,
9290
+ functionName: "getWriters"
9291
+ }
9292
+ ];
9293
+ const results = await publicClient.multicall({ allowFailure: false, blockNumber, contracts });
9294
+ expectAddress(
9295
+ "Bypass hook.orchestratorRegistry",
9296
+ results[0],
9297
+ relations.hookOrchestratorRegistry
9298
+ );
9299
+ expectAddress("Bypass hook.whitelistPolicy", results[1], relations.hookWhitelistPolicy);
9300
+ expectAddress("Bypass hook.disputeProtectionPolicy", results[2], records.policy);
9301
+ expectBoolean("Bypass registry.isOrchestrator", results[3], true);
9302
+ expectAddress("Bypass policy.stakeVault", results[4], records.vault);
9303
+ expectBoolean("Bypass policy.isLifecycleHookAuthorized", results[5], true);
9304
+ expectBigInt(
9305
+ "Bypass policy.PENDING_COVERAGE_MATURITY",
9306
+ results[6],
9307
+ BigInt(manifest.prerequisites.pendingCoverageMaturity)
9308
+ );
9309
+ expectAddress("Bypass vault.controller", results[7], records.policy);
9310
+ expectAddress("Bypass vault.stakeToken", results[8], relations.vaultStakeToken);
9311
+ expectAddress("Bypass vault.pendingController", results[9], zeroAddress);
9312
+ if (typeof results[10] !== "boolean")
9313
+ throw new ReadinessMismatch("Bypass policy.admissionsPaused is malformed");
9314
+ expectBigInt("Bypass vault.pendingControllerValidAt", results[11], 0n);
9315
+ expectAddress("Bypass policy.disputeVerifier", results[12], relations.policyDisputeVerifier);
9316
+ expectAddress(
9317
+ "Bypass policy.disputeNullifierRegistry",
9318
+ results[13],
9319
+ relations.policyDisputeNullifierRegistry
9320
+ );
9321
+ expectBoolean("Bypass policy.sentinel", results[14], manifest.sentinel.expected);
9322
+ let index = 15;
9323
+ for (const [paymentMethod, seconds] of riskWindows) {
9324
+ expectBigInt(
9325
+ `Bypass policy.getRiskWindow(${paymentMethod})`,
9326
+ results[index++],
9327
+ BigInt(seconds)
9328
+ );
9329
+ }
9330
+ expectAddress(
9331
+ "DisputeVerifier.nullifierRegistry",
9332
+ results[index++],
9333
+ relations.disputeVerifierNullifierRegistry
9334
+ );
9335
+ expectAddress(
9336
+ "DisputeVerifier.attestationVerifier",
9337
+ results[index++],
9338
+ relations.disputeVerifierAttestationVerifier
9339
+ );
9340
+ const writers = normalizeAddressSet("DisputeNullifierRegistry.getWriters", results[index]);
9341
+ if (!writers.includes(records.policy.toLowerCase())) {
9342
+ throw new ReadinessMismatch(
9343
+ "DisputeNullifierRegistry.getWriters is missing the Bypass policy"
9344
+ );
9345
+ }
9346
+ return results[10];
9347
+ }
8944
9348
  async read(options = {}) {
8945
9349
  const packageMismatch = validatePackagedIdentity(this.config);
8946
9350
  if (packageMismatch) {
@@ -8970,6 +9374,23 @@ var DisputeProtectionReadinessReader = class {
8970
9374
  null
8971
9375
  );
8972
9376
  }
9377
+ if (this.config.bypassRecords && sameAddress(hook, this.config.bypassRecords.lifecycleHook) && !sameAddress(hook, identities.IntentLifecycleHookV1.address)) {
9378
+ const policyAdmissionsPaused2 = await this.verifyBypass(blockNumber);
9379
+ const prerequisites = this.config.manifest.prerequisites;
9380
+ return {
9381
+ ...knownResult(
9382
+ "active_successor_verified",
9383
+ orchestrator.paused === prerequisites.orchestratorPaused && orchestrator.allowMultipleIntents === prerequisites.allowMultipleIntents && policyAdmissionsPaused2 === prerequisites.admissionsPaused,
9384
+ blockNumber,
9385
+ this.config,
9386
+ hook,
9387
+ orchestrator.paused,
9388
+ orchestrator.allowMultipleIntents,
9389
+ policyAdmissionsPaused2
9390
+ ),
9391
+ verifiedStack: "bypass_records" /* BypassRecords */
9392
+ };
9393
+ }
8973
9394
  if (sameAddress(hook, identities.RecognizedPredecessorHook.address)) {
8974
9395
  await this.verifyRuntimeIdentities(
8975
9396
  ["RecognizedPredecessorHook", "RecognizedPredecessorPolicy"],
@@ -9027,7 +9448,12 @@ var DisputeProtectionReadinessReader = class {
9027
9448
  }
9028
9449
  };
9029
9450
  function createDisputeProtectionReadinessReader(params) {
9451
+ const { addresses } = getContracts(params.chainId, params.environment);
9452
+ const lifecycleHook = addresses.intentLifecycleHookV1Bypass;
9453
+ const policy = addresses.disputeProtectionPolicyBypass;
9454
+ const vault = addresses.stakeVaultBypass;
9030
9455
  return new DisputeProtectionReadinessReader({
9456
+ bypassRecords: lifecycleHook && policy && vault ? { lifecycleHook, policy, vault } : void 0,
9031
9457
  publicClient: params.publicClient,
9032
9458
  chainId: params.chainId,
9033
9459
  manifest: manifestForEnvironment(params.environment),
@@ -9043,6 +9469,57 @@ async function fetchFulfillmentAndPayment(client, intentHash) {
9043
9469
  variables: { intentHash }
9044
9470
  });
9045
9471
  }
9472
+ var DisputeProtectionIntentStatus = /* @__PURE__ */ ((DisputeProtectionIntentStatus2) => {
9473
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["None"] = 0] = "None";
9474
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["Pending"] = 1] = "Pending";
9475
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["Cancelled"] = 2] = "Cancelled";
9476
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["Settled"] = 3] = "Settled";
9477
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["Released"] = 4] = "Released";
9478
+ DisputeProtectionIntentStatus2[DisputeProtectionIntentStatus2["Disputed"] = 5] = "Disputed";
9479
+ return DisputeProtectionIntentStatus2;
9480
+ })(DisputeProtectionIntentStatus || {});
9481
+ function isStatus(value) {
9482
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 /* None */ && value <= 5 /* Disputed */;
9483
+ }
9484
+ function isUint(value, bits) {
9485
+ return typeof value === "bigint" && value >= 0n && value < 1n << BigInt(bits);
9486
+ }
9487
+ function parseDisputeProtectionIntent(value) {
9488
+ if (typeof value !== "object" || value === null) return null;
9489
+ const fields2 = Array.isArray(value) ? value : [
9490
+ "taker" in value ? value.taker : void 0,
9491
+ "stakeOwner" in value ? value.stakeOwner : void 0,
9492
+ "depositor" in value ? value.depositor : void 0,
9493
+ "paymentMethod" in value ? value.paymentMethod : void 0,
9494
+ "status" in value ? value.status : void 0,
9495
+ "riskWindow" in value ? value.riskWindow : void 0,
9496
+ "releaseEligibleAt" in value ? value.releaseEligibleAt : void 0,
9497
+ "releaseAmount" in value ? value.releaseAmount : void 0
9498
+ ];
9499
+ if (fields2.length !== 8) return null;
9500
+ const [
9501
+ taker,
9502
+ stakeOwner,
9503
+ depositor,
9504
+ paymentMethod,
9505
+ status,
9506
+ riskWindow,
9507
+ releaseEligibleAt,
9508
+ releaseAmount
9509
+ ] = fields2;
9510
+ if (typeof taker !== "string" || !isAddress(taker, { strict: false }) || typeof stakeOwner !== "string" || !isAddress(stakeOwner, { strict: false }) || typeof depositor !== "string" || !isAddress(depositor, { strict: false }) || !isHex(paymentMethod, { strict: true }) || paymentMethod.length !== 66 || !isStatus(status) || !isUint(riskWindow, 64) || !isUint(releaseEligibleAt, 64) || !isUint(releaseAmount, 256))
9511
+ return null;
9512
+ return {
9513
+ taker,
9514
+ stakeOwner,
9515
+ depositor,
9516
+ paymentMethod,
9517
+ status,
9518
+ riskWindow,
9519
+ releaseEligibleAt,
9520
+ releaseAmount
9521
+ };
9522
+ }
9046
9523
  var ICloudMailCredentialError = class extends Error {
9047
9524
  constructor(reason, message, options = {}) {
9048
9525
  super(message);
@@ -9663,6 +10140,22 @@ var Zkp2pClient = class {
9663
10140
  * @throws Error if walletClient is missing an account
9664
10141
  */
9665
10142
  constructor(opts) {
10143
+ /** A mode change must name a configured orchestrator; it never follows the live hook. */
10144
+ this.setIntentNoStake = this.buildContractMethod(
10145
+ (params) => ({
10146
+ address: this.resolveNoStakePolicyAddress(params.disputeProtectionPolicyAddress),
10147
+ abi: NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI,
10148
+ label: "Payment-validation policy"
10149
+ }),
10150
+ "setIntentNoStake",
10151
+ (params) => {
10152
+ const orchestrator = params.orchestratorAddress ?? this.orchestratorV3Address;
10153
+ if (!orchestrator || !this.orchestratorAddresses.some((address) => isAddressEqual(address, orchestrator))) {
10154
+ throw new Error("setIntentNoStake requires a configured orchestrator");
10155
+ }
10156
+ return [orchestrator, params.intentHash, params.noStake];
10157
+ }
10158
+ );
9666
10159
  /** Deposit USDC stake owned by the transaction sender. */
9667
10160
  this.depositStake = this.buildStakeVaultMethod(
9668
10161
  "depositStake",
@@ -9688,12 +10181,14 @@ var Zkp2pClient = class {
9688
10181
  () => []
9689
10182
  );
9690
10183
  /** Enable or disable dispute protection for one deposit. */
9691
- this.setDisputeProtectionEnabled = this.buildDisputeProtectionPolicyMethod("setDisputeProtectionEnabled", (params) => [
9692
- params.escrow,
9693
- params.depositId,
9694
- params.paymentMethod,
9695
- params.enabled
9696
- ]);
10184
+ this.setDisputeProtectionEnabled = this.buildContractMethod(
10185
+ async (params) => ({
10186
+ ...params.disputeProtectionPolicyAddress ? { address: params.disputeProtectionPolicyAddress, abi: this.disputeProtectionPolicyAbi } : await this._liveDisputeProtection.getActivePolicyContract(),
10187
+ label: "DisputeProtectionPolicy"
10188
+ }),
10189
+ "setDisputeProtectionEnabled",
10190
+ (params) => [params.escrow, params.depositId, params.paymentMethod, params.enabled]
10191
+ );
9697
10192
  /**
9698
10193
  * Release one protected intent whose risk window matured, unlocking its
9699
10194
  * stake cover. Permissionless once mature. Pass `disputeProtectionPolicyAddress` to
@@ -10728,7 +11223,20 @@ var Zkp2pClient = class {
10728
11223
  prepareContractTransaction: (tx) => this.prepareContractTransaction(tx)
10729
11224
  }
10730
11225
  });
11226
+ this._liveDisputeProtection = new LiveDisputeProtection(
11227
+ this.publicClient,
11228
+ this.chainId,
11229
+ this.runtimeEnv
11230
+ );
10731
11231
  this._stakeOps = new StakeOperations({
11232
+ resolveVault: (options) => {
11233
+ if (!this.stakeVaultAddress || !this.stakeVaultAbi || !this._usdcAddress) {
11234
+ throw new Error("StakeVault not available for this chain/environment");
11235
+ }
11236
+ return this._liveDisputeProtection.getStakeVaultContract(options);
11237
+ },
11238
+ resolveActiveVault: () => this.resolveStakeContract({}),
11239
+ resolveLivePolicy: () => this._liveDisputeProtection.getActivePolicyContract(),
10732
11240
  getPublicClient: () => this.publicClient,
10733
11241
  getStakeVaultAddress: () => this.stakeVaultAddress,
10734
11242
  getStakeVaultAbi: () => this.stakeVaultAbi,
@@ -11151,7 +11659,7 @@ var Zkp2pClient = class {
11151
11659
  buildContractMethod(resolveContract, functionName, buildArgs, buildValue) {
11152
11660
  return Object.assign(
11153
11661
  async (params) => {
11154
- const contract = resolveContract(params);
11662
+ const contract = await resolveContract(params);
11155
11663
  if (!contract.address || !contract.abi) {
11156
11664
  throw new Error(`${contract.label} not available`);
11157
11665
  }
@@ -11167,7 +11675,7 @@ var Zkp2pClient = class {
11167
11675
  },
11168
11676
  {
11169
11677
  prepare: async (params) => {
11170
- const contract = resolveContract(params);
11678
+ const contract = await resolveContract(params);
11171
11679
  if (!contract.address || !contract.abi) {
11172
11680
  throw new Error(`${contract.label} not available`);
11173
11681
  }
@@ -11189,11 +11697,16 @@ var Zkp2pClient = class {
11189
11697
  }
11190
11698
  );
11191
11699
  }
11700
+ async resolveStakeContract(params) {
11701
+ if (!this.stakeVaultAddress || !this.stakeVaultAbi || !this._usdcAddress) {
11702
+ throw new Error("StakeVault not available for this chain/environment");
11703
+ }
11704
+ return params.stakeVaultAddress ? this.getStakeVaultContract({ stakeVaultAddress: params.stakeVaultAddress }) : this._liveDisputeProtection.getActiveStakeVaultContract();
11705
+ }
11192
11706
  buildStakeVaultMethod(functionName, buildArgs) {
11193
11707
  return this.buildContractMethod(
11194
- () => ({
11195
- address: this.stakeVaultAddress,
11196
- abi: this.stakeVaultAbi,
11708
+ async (params) => ({
11709
+ ...await this.resolveStakeContract(params),
11197
11710
  label: "StakeVault"
11198
11711
  }),
11199
11712
  functionName,
@@ -11718,11 +12231,25 @@ var Zkp2pClient = class {
11718
12231
  // ║ CORE: TAKER STAKING ║
11719
12232
  // ╚═══════════════════════════════════════════════════════════════════════════╝
11720
12233
  /**
11721
- * Return the resolved StakeVault coordinates for advanced wallet, relayer,
11722
- * or reactive read integrations.
12234
+ * Return bundle/canonical StakeVault coordinates when no address is supplied,
12235
+ * or validate and return an explicit known vault. This synchronous getter
12236
+ * does not discover the live stack. Use getActiveStakeVaultContract() for the
12237
+ * vault the live policy locks from, used by every implicit stake read and write.
11723
12238
  */
11724
- getStakeVaultContract() {
11725
- return this._stakeOps.getContract();
12239
+ getStakeVaultContract(options) {
12240
+ return this._stakeOps.getContract(options);
12241
+ }
12242
+ getKnownStakeVaults() {
12243
+ return this._liveDisputeProtection.getKnownStakeVaults();
12244
+ }
12245
+ getActiveDisputeProtectionStack() {
12246
+ return this._liveDisputeProtection.getActiveDisputeProtectionStack();
12247
+ }
12248
+ getActiveStakeVaultContract() {
12249
+ return this._liveDisputeProtection.getActiveStakeVaultContract();
12250
+ }
12251
+ isNoStakeAvailable() {
12252
+ return this._liveDisputeProtection.isNoStakeAvailable();
11726
12253
  }
11727
12254
  /** Return the resolved OrchestratorV3 coordinates for advanced integrations. */
11728
12255
  getOrchestratorV3Contract() {
@@ -11731,6 +12258,42 @@ var Zkp2pClient = class {
11731
12258
  }
11732
12259
  return { address: this.orchestratorV3Address, abi: this.orchestratorV3Abi };
11733
12260
  }
12261
+ getPaymentValidationPolicyContract() {
12262
+ return getPaymentValidationPolicyContract(this.chainId, this.runtimeEnv);
12263
+ }
12264
+ resolveNoStakePolicyAddress(address) {
12265
+ const policy = address ?? this.getPaymentValidationPolicyContract()?.address;
12266
+ if (!policy) {
12267
+ throw new Error(
12268
+ "Payment-validation policy not available for this chain/environment; supply disputeProtectionPolicyAddress"
12269
+ );
12270
+ }
12271
+ return policy;
12272
+ }
12273
+ async isIntentNoStake(intentHash, options) {
12274
+ return this.publicClient.readContract({
12275
+ address: this.resolveNoStakePolicyAddress(options?.disputeProtectionPolicyAddress),
12276
+ abi: NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI,
12277
+ functionName: "isIntentNoStake",
12278
+ args: [intentHash]
12279
+ });
12280
+ }
12281
+ /** The unchanged tuple getter also supports historical intents on the canonical policy. */
12282
+ async getDisputeProtectionIntent(intentHash, options) {
12283
+ const address = options?.disputeProtectionPolicyAddress ?? this.getPaymentValidationPolicyContract()?.address ?? this.disputeProtectionPolicyAddress;
12284
+ if (!address)
12285
+ throw new Error("DisputeProtectionPolicy not available for this chain/environment");
12286
+ const value = await this.publicClient.readContract({
12287
+ address,
12288
+ abi: NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI,
12289
+ functionName: "getDisputeProtectionIntent",
12290
+ args: [intentHash],
12291
+ blockNumber: options?.blockNumber
12292
+ });
12293
+ const intent = parseDisputeProtectionIntent(value);
12294
+ if (!intent) throw new Error("Malformed dispute-protection intent");
12295
+ return intent;
12296
+ }
11734
12297
  /** Return the resolved DisputeProtectionPolicy coordinates for keeper integrations. */
11735
12298
  getDisputeProtectionPolicyContract() {
11736
12299
  if (!this.disputeProtectionPolicyAddress || !this.disputeProtectionPolicyAbi) {
@@ -11743,7 +12306,7 @@ var Zkp2pClient = class {
11743
12306
  * If an approval is submitted, wait for it to confirm before depositing.
11744
12307
  */
11745
12308
  async ensureStakeAllowance(params) {
11746
- const { address, stakeToken } = this._stakeOps.getContract();
12309
+ const { address, stakeToken } = await this.resolveStakeContract(params);
11747
12310
  return this.ensureAllowance({
11748
12311
  token: stakeToken,
11749
12312
  spender: address,
@@ -11753,32 +12316,32 @@ var Zkp2pClient = class {
11753
12316
  });
11754
12317
  }
11755
12318
  /** Read total stake owned by an address directly from StakeVault. */
11756
- getStakeBalance(stakeOwner) {
11757
- return this._stakeOps.getStakeBalance(stakeOwner);
12319
+ getStakeBalance(stakeOwner, options) {
12320
+ return this._stakeOps.getStakeBalance(stakeOwner, options);
11758
12321
  }
11759
12322
  /** Read stake committed to active StakeVault locks. */
11760
- getLockedStake(stakeOwner) {
11761
- return this._stakeOps.getLockedStake(stakeOwner);
12323
+ getLockedStake(stakeOwner, options) {
12324
+ return this._stakeOps.getLockedStake(stakeOwner, options);
11762
12325
  }
11763
12326
  /** Read stake available for immediate withdrawal or a new lock. */
11764
- getFreeStake(stakeOwner) {
11765
- return this._stakeOps.getFreeStake(stakeOwner);
12327
+ getFreeStake(stakeOwner, options) {
12328
+ return this._stakeOps.getFreeStake(stakeOwner, options);
11766
12329
  }
11767
12330
  /** Read the non-stake USDC withdrawable by a beneficiary with `claim()`. */
11768
- getClaimable(beneficiary) {
11769
- return this._stakeOps.getClaimable(beneficiary);
12331
+ getClaimable(beneficiary, options) {
12332
+ return this._stakeOps.getClaimable(beneficiary, options);
11770
12333
  }
11771
12334
  /** Resolve the effective stake owner backing a taker. */
11772
- getStakeOwner(taker) {
11773
- return this._stakeOps.getStakeOwner(taker);
12335
+ getStakeOwner(taker, options) {
12336
+ return this._stakeOps.getStakeOwner(taker, options);
11774
12337
  }
11775
12338
  /** Read a taker's raw selection, which is stale once authorization is revoked. */
11776
- getSelectedStakeOwner(taker) {
11777
- return this._stakeOps.getSelectedStakeOwner(taker);
12339
+ getSelectedStakeOwner(taker, options) {
12340
+ return this._stakeOps.getSelectedStakeOwner(taker, options);
11778
12341
  }
11779
12342
  /** Read whether a stake owner currently authorizes a taker. */
11780
- getTakerAuthorization(stakeOwner, taker) {
11781
- return this._stakeOps.getTakerAuthorization(stakeOwner, taker);
12343
+ getTakerAuthorization(stakeOwner, taker, options) {
12344
+ return this._stakeOps.getTakerAuthorization(stakeOwner, taker, options);
11782
12345
  }
11783
12346
  /** Read the complete authoritative StakeVault state needed by a staking UI. */
11784
12347
  getStakeVaultState(params) {
@@ -12085,7 +12648,7 @@ var Zkp2pClient = class {
12085
12648
  }
12086
12649
  }
12087
12650
  });
12088
- const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-ELLII4P5.mjs');
12651
+ const { mapConversionRatesToOnchainMinRate: mapConversionRatesToOnchainMinRate2 } = await import('./currency-CSMMPWY5.mjs');
12089
12652
  currencies = mapConversionRatesToOnchainMinRate2(
12090
12653
  params.conversionRates,
12091
12654
  paymentMethods.length
@@ -13007,6 +13570,55 @@ function openVenmoGmailConnect(options) {
13007
13570
  });
13008
13571
  }
13009
13572
 
13010
- export { AccessPolicyOperations, AccessPolicyUnsupportedError, BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, ICloudMailCredentialError, IndexerClient, IndexerDepositService, IndexerRateManagerService, IndexerStakingService, Zkp2pClient as OfframpClient, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, VenmoGmailConnectError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig, buildStakingEntityIds, calculateRequiredCoverage, calculateStakeBackedCapacity, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, defaultIndexerEndpoint, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, getAmazonPaySellerIdentity, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, getVenmoGmailConnectUrl, isMailboxSellerCredentialType, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, openVenmoGmailConnect, parseReferrerFeeConfig, parseVenmoGmailAppearance, peerExtensionSdk, readDisputeAttestationConfig, referrerFeeConfigToPreciseUnits, selectRiskMode, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
13573
+ // src/client/DisputeProtectionLookup.ts
13574
+ async function findDisputeProtectionIntent({
13575
+ publicClient,
13576
+ chainId,
13577
+ environment = "production",
13578
+ intentHash,
13579
+ blockNumber
13580
+ }) {
13581
+ const policies = getKnownPolicies(chainId, environment);
13582
+ if (!policies.length) return null;
13583
+ const pinnedBlock = blockNumber ?? await publicClient.getBlockNumber();
13584
+ const results = await publicClient.multicall({
13585
+ allowFailure: true,
13586
+ blockNumber: pinnedBlock,
13587
+ contracts: policies.flatMap((address) => [
13588
+ {
13589
+ address,
13590
+ abi: NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI,
13591
+ functionName: "getDisputeProtectionIntent",
13592
+ args: [intentHash]
13593
+ },
13594
+ {
13595
+ address,
13596
+ abi: NO_STAKE_DISPUTE_PROTECTION_POLICY_ABI,
13597
+ functionName: "isIntentNoStake",
13598
+ args: [intentHash]
13599
+ }
13600
+ ])
13601
+ });
13602
+ let failedPolicy;
13603
+ for (const [index, policyAddress] of policies.entries()) {
13604
+ const result = results[index * 2];
13605
+ const intent = result?.status === "success" ? parseDisputeProtectionIntent(result.result) : null;
13606
+ if (!intent) {
13607
+ failedPolicy ?? (failedPolicy = policyAddress);
13608
+ continue;
13609
+ }
13610
+ if (intent.status === 0 /* None */) continue;
13611
+ const noStake = results[index * 2 + 1];
13612
+ return {
13613
+ policyAddress,
13614
+ intent,
13615
+ noStake: noStake?.status === "success" && noStake.result === true
13616
+ };
13617
+ }
13618
+ if (failedPolicy) throw new Error(`DisputeProtectionPolicy ${failedPolicy} intent read failed`);
13619
+ return null;
13620
+ }
13621
+
13622
+ export { AccessPolicyOperations, AccessPolicyUnsupportedError, BASE_BUILDER_CODE, CHAINLINK_ORACLE_ADAPTER, CHAINLINK_ORACLE_FEEDS, ContractRouter, DEFAULT_ORACLE_MAX_STALENESS_SECONDS, DisputeProtectionIntentStatus, DisputeProtectionVerifiedStack, ICloudMailCredentialError, IndexerClient, IndexerDepositService, IndexerRateManagerService, IndexerStakingService, Zkp2pClient as OfframpClient, PEER_EXTENSION_CHROME_URL, PLATFORM_METADATA, PYTH_CONTRACT_BASE, PYTH_ORACLE_ADAPTER, PYTH_ORACLE_FEEDS, REFERRAL_SIGNATURE_DOMAIN, REFERRAL_SIGNATURE_TYPES, RISK_BPS_DENOMINATOR, SDK_BUILD_METADATA, SPREAD_ORACLE_FEEDS, SUPPORTED_CHAIN_IDS, TOKEN_METADATA, VenmoGmailConnectError, ZKP2P_ANDROID_REFERRER, ZKP2P_IOS_REFERRER, Zkp2pClient, apiCreateReferralCode, apiCreateSellerCredentialBundle, apiGetDepositBundle, apiGetOrderbook, apiGetOrderbookTable, apiGetOwnerDeposits, apiGetPayeeDetails, apiGetQuote, apiGetQuotesBestByPlatform, apiGetReferralDashboard, apiGetReferralEarnings, apiGetSellerCredentialStatus, apiLookupReferralCode, apiPostDepositDetails, apiRedeemReferralCode, apiRequestIdentityAttestation, apiSignIntentV3, apiSignIntentV3Raw, apiUpdateReferralCode, apiUploadGoogleOAuthSellerCredential, apiUploadMicrosoftOAuthSellerCredential, apiUploadSellerCredentialBundle, apiValidatePayeeDetails, apiVerifyBuyerTeePayment, appendAttributionToCalldata, assertValidReferrerFeeConfig, buildStakingEntityIds, calculateRequiredCoverage, calculateStakeBackedCapacity, compareEventCursorIdsByRecency, convertDepositsForLiquidity, convertIndexerDepositToEscrowView, convertIndexerIntentsToEscrowViews, createCompositeDepositId, createEncryptedBuyerTeeSessionMaterial, createPeerExtensionSdk, decodePaymentValidationHookData, defaultIndexerEndpoint, encodePaymentValidationHookData, encodePythAdapterConfig, encodeSpreadOracleAdapterConfig, encodeWithAttribution, fetchFulfillmentAndPayment as fetchIndexerFulfillmentAndPayment, findDisputeProtectionIntent, getAmazonPaySellerIdentity, getAttributionDataSuffix, getPeerExtensionState, getSpreadOracleConfig, getVenmoGmailConnectUrl, isMailboxSellerCredentialType, isPeerExtensionAvailable, isValidReferralCode, isValidReferrerFeeBps, isValidReferrerFeeRecipient, logger, normalizeReferralCode, openPeerExtensionInstallPage, openVenmoGmailConnect, parseDisputeProtectionIntent, parseReferrerFeeConfig, parseVenmoGmailAppearance, peerExtensionSdk, readDisputeAttestationConfig, referrerFeeConfigToPreciseUnits, selectRiskMode, sendTransactionWithAttribution, setLogLevel, validateOracleFeedsOnChain };
13011
13623
  //# sourceMappingURL=index.mjs.map
13012
13624
  //# sourceMappingURL=index.mjs.map