@ocap/tx-pipeline 1.31.4 → 1.31.6
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/esm/bridge-release-keys.d.mts +17 -1
- package/esm/bridge-release-keys.mjs +35 -20
- package/esm/bridge-reserves.d.mts +48 -9
- package/esm/bridge-reserves.mjs +66 -16
- package/esm/helpers/bridge-withdraw.d.mts +22 -38
- package/esm/helpers/bridge-withdraw.mjs +57 -77
- package/esm/helpers/replay-guard.d.mts +29 -12
- package/esm/helpers/replay-guard.mjs +68 -22
- package/esm/index.d.mts +3 -3
- package/esm/index.mjs +3 -3
- package/esm/legacy-protocol-sunset.d.mts +35 -21
- package/esm/legacy-protocol-sunset.mjs +124 -70
- package/esm/legacy-rollup-archive.d.mts +44 -7
- package/esm/legacy-rollup-archive.mjs +78 -13
- package/esm/library.d.mts +3 -3
- package/esm/library.mjs +3 -3
- package/esm/pipes/bridge-release-gate.d.mts +3 -2
- package/esm/pipes/bridge-release-gate.mjs +90 -35
- package/esm/pipes/bridge-reserve-v2-gate.d.mts +2 -0
- package/esm/pipes/bridge-reserve-v2-gate.mjs +31 -13
- package/esm/pipes/decode-tx.mjs +1 -1
- package/esm/pipes/post-execution-invariant-gate.mjs +5 -4
- package/esm/pipes/pre-flight-waf.mjs +6 -3
- package/esm/pipes/verify-multisig-v2.mjs +1 -1
- package/esm/pipes/verify-multisig.mjs +1 -1
- package/esm/pipes/verify-tx-size.mjs +8 -2
- package/esm/pipes/verify-tx.mjs +1 -1
- package/esm/transaction-block.mjs +11 -0
- package/lib/bridge-release-keys.cjs +35 -18
- package/lib/bridge-release-keys.d.cts +17 -1
- package/lib/bridge-reserves.cjs +73 -18
- package/lib/bridge-reserves.d.cts +48 -9
- package/lib/helpers/bridge-withdraw.cjs +60 -80
- package/lib/helpers/bridge-withdraw.d.cts +22 -38
- package/lib/helpers/replay-guard.cjs +64 -17
- package/lib/helpers/replay-guard.d.cts +29 -12
- package/lib/index.cjs +2 -2
- package/lib/index.d.cts +3 -3
- package/lib/legacy-protocol-sunset.cjs +122 -69
- package/lib/legacy-protocol-sunset.d.cts +35 -21
- package/lib/legacy-rollup-archive.cjs +82 -14
- package/lib/legacy-rollup-archive.d.cts +44 -7
- package/lib/library.cjs +1 -2
- package/lib/library.d.cts +3 -3
- package/lib/pipes/bridge-release-gate.cjs +89 -33
- package/lib/pipes/bridge-release-gate.d.cts +3 -2
- package/lib/pipes/bridge-reserve-v2-gate.cjs +30 -12
- package/lib/pipes/bridge-reserve-v2-gate.d.cts +2 -0
- package/lib/pipes/decode-tx.cjs +1 -1
- package/lib/pipes/post-execution-invariant-gate.cjs +3 -2
- package/lib/pipes/pre-flight-waf.cjs +6 -3
- package/lib/pipes/verify-multisig-v2.cjs +1 -1
- package/lib/pipes/verify-multisig.cjs +1 -1
- package/lib/pipes/verify-tx-size.cjs +8 -2
- package/lib/pipes/verify-tx.cjs +1 -1
- package/lib/transaction-block.cjs +11 -0
- package/package.json +10 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Hasher } from "@ocap/mcrypto";
|
|
2
2
|
import { CustomError } from "@ocap/util/lib/error";
|
|
3
|
+
import { rollup } from "@ocap/state";
|
|
3
4
|
|
|
4
5
|
//#region src/legacy-rollup-archive.ts
|
|
5
6
|
/**
|
|
@@ -13,7 +14,6 @@ const ErrorCode = {
|
|
|
13
14
|
ForbiddenBridge: "FORBIDDEN_EVM_SIMPLIFIED_BRIDGE"
|
|
14
15
|
};
|
|
15
16
|
const DEFAULT_MAX_ROLLUP_BLOCK_SIZE = 256;
|
|
16
|
-
const DEFAULT_ROLLUP_SUNSET_ACTIVATION_HEIGHT = 1;
|
|
17
17
|
const DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS = Object.freeze([
|
|
18
18
|
"fg:t:create_rollup",
|
|
19
19
|
"fg:t:update_rollup",
|
|
@@ -24,6 +24,60 @@ const DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS = Object.freeze([
|
|
|
24
24
|
"fg:t:pause_rollup",
|
|
25
25
|
"fg:t:resume_rollup"
|
|
26
26
|
]);
|
|
27
|
+
/**
|
|
28
|
+
* #1720 (S4b): the branch of a tx whose `itx.rollup` names `rollupRow`, derived exactly as the protocols do
|
|
29
|
+
* (`peekBridgeFailClosed` -> `rollup.isBridgeV2(row)`, `data.value.version == 2`). No row is the v1 branch: the
|
|
30
|
+
* protocols refuse a bridge kind on a v1 row or on no row.
|
|
31
|
+
*/
|
|
32
|
+
function rollupBranchOf(rollupRow, itx) {
|
|
33
|
+
return {
|
|
34
|
+
isBridgeV2: rollup.isBridgeV2(rollupRow),
|
|
35
|
+
itx: itx ?? null
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* #1720 (S4b): the branch information every guard call must carry. Missing or malformed is a programming error, never a
|
|
40
|
+
* default: allowing would skip the sunset, treating it as v1 would turn the bridge off once a guard is wired (§7.1, M-5).
|
|
41
|
+
*/
|
|
42
|
+
function assertRollupBranchInfo(branch) {
|
|
43
|
+
if (!branch || typeof branch !== "object" || typeof branch.isBridgeV2 !== "boolean") throw new CustomError(ErrorCode.InvalidBridge, "SimplifiedEvmBridge: branch information must be { isBridgeV2: boolean, itx? }");
|
|
44
|
+
}
|
|
45
|
+
/** #1720 (S4b): the guards take no blockHeight (CHAIN_DESIGN §1 item 2); a caller still passing one is refused. */
|
|
46
|
+
const REMOVED_BLOCK_HEIGHT_KEYS = [
|
|
47
|
+
"currentBlockHeight",
|
|
48
|
+
"sunsetActivationHeight",
|
|
49
|
+
"rollupSunsetActivationHeight"
|
|
50
|
+
];
|
|
51
|
+
function assertNoBlockHeightParams(params, label) {
|
|
52
|
+
if (!params || typeof params !== "object") return;
|
|
53
|
+
const stale = REMOVED_BLOCK_HEIGHT_KEYS.filter((k) => Object.prototype.hasOwnProperty.call(params, k));
|
|
54
|
+
if (stale.length) throw new CustomError(ErrorCode.InvalidBridge, `${label}: blockHeight parameters were removed (${stale.join(", ")}); there is no blockHeight on chain`);
|
|
55
|
+
}
|
|
56
|
+
/** Rollup governance types a v2 bridge uses (ocap-protocols.md §v2.2): bridge governance when the row is v2. */
|
|
57
|
+
const BRIDGE_GOVERNANCE_TYPE_URLS = new Set([
|
|
58
|
+
"fg:t:create_rollup",
|
|
59
|
+
"fg:t:update_rollup",
|
|
60
|
+
"fg:t:join_rollup",
|
|
61
|
+
"fg:t:leave_rollup",
|
|
62
|
+
"fg:t:pause_rollup",
|
|
63
|
+
"fg:t:resume_rollup"
|
|
64
|
+
]);
|
|
65
|
+
const BRIDGE_RELEASE_KINDS = new Set([
|
|
66
|
+
1,
|
|
67
|
+
2,
|
|
68
|
+
3
|
|
69
|
+
]);
|
|
70
|
+
/**
|
|
71
|
+
* Whether a tx of `canonicalTypeUrl` (`fg:t:...`) with `branch` is the bridge branch: a deposit with a bridge kind on a
|
|
72
|
+
* v2 row, a withdraw on a v2 row, or bridge governance on a v2 row. Both keys must agree for a deposit (the protocol
|
|
73
|
+
* refuses any other pairing). Throws on malformed branch information (a programming error, never a default).
|
|
74
|
+
*/
|
|
75
|
+
function isBridgeBranch(canonicalTypeUrl, branch) {
|
|
76
|
+
assertRollupBranchInfo(branch);
|
|
77
|
+
if (!branch.isBridgeV2) return false;
|
|
78
|
+
if (canonicalTypeUrl === "fg:t:deposit_token_v2") return BRIDGE_RELEASE_KINDS.has(branch.itx?.kind);
|
|
79
|
+
return canonicalTypeUrl === "fg:t:withdraw_token_v2" || BRIDGE_GOVERNANCE_TYPE_URLS.has(canonicalTypeUrl);
|
|
80
|
+
}
|
|
27
81
|
const ZERO_BYTES32_HASH = "0x0000000000000000000000000000000000000000000000000000000000000000";
|
|
28
82
|
const BYTES32_HEX_REGEX = /^0x[0-9a-fA-F]{64}$/;
|
|
29
83
|
const CANONICAL_UINT256_DECIMAL_REGEX = /^(0|[1-9]\d{0,77})$/;
|
|
@@ -92,21 +146,22 @@ function isDeprecatedRollupWriteProtocol(typeUrl) {
|
|
|
92
146
|
/**
|
|
93
147
|
* Issue #1245:
|
|
94
148
|
* Sunset guard for active transaction pipeline execution:
|
|
95
|
-
* - Blocks all 8 deprecated Rollup write protocols
|
|
96
|
-
* - Allows historical block replay when `
|
|
149
|
+
* - Blocks all 8 deprecated Rollup write protocols of the v1 branch.
|
|
150
|
+
* - Allows historical block replay when `readOnlyArchiveMode === true`.
|
|
151
|
+
*
|
|
152
|
+
* #1720 (S4b, bridge/docs/deposit-withdraw-v2-unification.md §7.1): `branch` is required (missing throws) and the
|
|
153
|
+
* blockHeight parameters are gone (CHAIN_DESIGN §1 item 2): the switch is whether the guard is wired, plus
|
|
154
|
+
* `readOnlyArchiveMode` for replay. Governance of a v2 bridge is bridge governance, never sunset.
|
|
97
155
|
*/
|
|
98
156
|
function assertRollupProtocolNotSunset(params) {
|
|
99
157
|
if (!params || typeof params !== "object") throw new CustomError(ErrorCode.InvalidBridge, "SimplifiedEvmBridge: sunset guard params must be an object");
|
|
158
|
+
assertNoBlockHeightParams(params, "SimplifiedEvmBridge");
|
|
100
159
|
if (typeof params.typeUrl !== "string" || params.typeUrl.trim().length === 0) throw new CustomError(ErrorCode.InvalidBridge, "SimplifiedEvmBridge: typeUrl must be a non-empty string");
|
|
101
|
-
|
|
102
|
-
const activationHeight = params.rollupSunsetActivationHeight ?? DEFAULT_ROLLUP_SUNSET_ACTIVATION_HEIGHT;
|
|
103
|
-
if (!Number.isSafeInteger(activationHeight) || activationHeight < 1) throw new CustomError(ErrorCode.InvalidBridge, "SimplifiedEvmBridge: rollupSunsetActivationHeight must be a positive safe integer (>= 1)");
|
|
160
|
+
assertRollupBranchInfo(params.branch);
|
|
104
161
|
if (isDeprecatedRollupWriteProtocol(params.typeUrl)) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
return;
|
|
162
|
+
const canonicalTypeUrl = normalizeRollupProtocolTypeUrl(params.typeUrl);
|
|
163
|
+
if (params.readOnlyArchiveMode === true || isBridgeBranch(canonicalTypeUrl, params.branch)) return;
|
|
164
|
+
throw new CustomError(ErrorCode.ForbiddenBridge, `SimplifiedEvmBridge: legacy Rollup write protocol ${canonicalTypeUrl} is deprecated and disabled; use Zero-Rollup-Block EIP-712 DirectWithdrawVoucher instead`);
|
|
110
165
|
}
|
|
111
166
|
assertCleanString(params.typeUrl, "typeUrl");
|
|
112
167
|
}
|
|
@@ -116,11 +171,19 @@ function assertRollupProtocolNotSunset(params) {
|
|
|
116
171
|
* and `withdraw_token_v2` records so block explorers, indexers, and audit tools can inspect historical
|
|
117
172
|
* chain data after the active Rollup write protocols are removed.
|
|
118
173
|
*/
|
|
119
|
-
function parseLegacyRollupReadOnlyRecord(rawRecord) {
|
|
174
|
+
function parseLegacyRollupReadOnlyRecord(rawRecord, branch) {
|
|
175
|
+
assertRollupBranchInfo(branch);
|
|
120
176
|
if (!rawRecord || typeof rawRecord !== "object" || Array.isArray(rawRecord)) throw new CustomError(ErrorCode.InvalidBridge, "SimplifiedEvmBridge: legacy Rollup record must be a plain object");
|
|
121
177
|
if (Object.prototype.hasOwnProperty.call(rawRecord, "__proto__") || Object.prototype.hasOwnProperty.call(rawRecord, "constructor") || Object.prototype.hasOwnProperty.call(rawRecord, "prototype")) throw new CustomError(ErrorCode.ForbiddenBridge, "SimplifiedEvmBridge: prototype pollution keys rejected in legacy Rollup record");
|
|
122
178
|
const rawKind = String(rawRecord.recordKind ?? rawRecord.typeUrl ?? "").trim();
|
|
123
179
|
const normalizedKind = rawKind.startsWith("fg:t:") ? rawKind.slice(5) : rawKind;
|
|
180
|
+
if (branch.isBridgeV2 && [
|
|
181
|
+
"RollupState",
|
|
182
|
+
"RollupBlock",
|
|
183
|
+
"create_rollup_block",
|
|
184
|
+
"deposit_token_v2",
|
|
185
|
+
"withdraw_token_v2"
|
|
186
|
+
].includes(normalizedKind)) throw new CustomError(ErrorCode.ForbiddenBridge, `SimplifiedEvmBridge: ${normalizedKind} of the bridge branch (v2 bridge) is not a legacy Rollup record`);
|
|
124
187
|
if (normalizedKind === "RollupState") {
|
|
125
188
|
const rollupAddress = assertCleanString(String(rawRecord.rollupAddress ?? rawRecord.address ?? ""), "rollupAddress");
|
|
126
189
|
const tokenAddress = assertCleanString(String(rawRecord.tokenAddress ?? ""), "tokenAddress");
|
|
@@ -174,6 +237,8 @@ function parseLegacyRollupReadOnlyRecord(rawRecord) {
|
|
|
174
237
|
});
|
|
175
238
|
}
|
|
176
239
|
if (normalizedKind === "deposit_token_v2" || normalizedKind === "withdraw_token_v2") {
|
|
240
|
+
const kind = rawRecord.kind ?? rawRecord.itx?.kind ?? branch.itx?.kind;
|
|
241
|
+
if (rawRecord.isBridgeV2 === true || normalizedKind === "deposit_token_v2" && kind !== void 0 && kind !== null && kind !== 0 && kind !== "0") throw new CustomError(ErrorCode.ForbiddenBridge, `SimplifiedEvmBridge: ${normalizedKind} of the bridge branch (kind ${String(kind ?? "-")}, v2 bridge) is not a legacy Rollup record`);
|
|
177
242
|
const rollupAddress = assertCleanString(String(rawRecord.rollupAddress ?? rawRecord.rollup ?? ""), "rollupAddress");
|
|
178
243
|
const tokenAddress = assertCleanString(String(rawRecord.tokenAddress ?? ""), "tokenAddress");
|
|
179
244
|
const fromDid = rawRecord.fromDid ? assertCleanString(String(rawRecord.fromDid), "fromDid") : void 0;
|
|
@@ -196,4 +261,4 @@ function parseLegacyRollupReadOnlyRecord(rawRecord) {
|
|
|
196
261
|
}
|
|
197
262
|
|
|
198
263
|
//#endregion
|
|
199
|
-
export { DEFAULT_MAX_ROLLUP_BLOCK_SIZE,
|
|
264
|
+
export { DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, ZERO_BYTES32_HASH, assertNoBlockHeightParams, assertRollupBranchInfo, assertRollupProtocolNotSunset, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, isBridgeBranch, isDeprecatedRollupWriteProtocol, parseLegacyRollupReadOnlyRecord, rollupBranchOf };
|
package/esm/library.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CrowdloanContributorPosition, MAX_FREE_RELAY_CREDITS_PER_EPOCH, OcapSovereignAppChainHubEngine, PfmCrossSpokePacketInput, SovereignReserveState, SpokeCrowdloanState, VLedgerCheckpointInput, computeVLedgerCheckpointStateRoot, deriveSovereignVaultDid } from "./appchain-sovereign-hub.mjs";
|
|
2
2
|
import { ArcVaultLiquidityState, ArcVaultShareholderPosition, ExternalSwapHookInput, ExternalSwapHookResult, FORBIDDEN_EXTERNAL_CALL_SELECTORS, MAX_HARVEST_YIELD_BPS, MAX_VAULT_STRATEGY_DEPLOYED_BPS, MAX_ZAP_ABT_PER_SETTLEMENT_SCALAR, MAX_ZAP_PRICE_IMPACT_BPS, MIN_VAULT_LIQUID_BUFFER_BPS, OcapArcVaultExternalAdapterEngine, UniversalAbtZapInInput, UniversalAbtZapInResult } from "./arcvault-external-adapter.mjs";
|
|
3
3
|
import { AcknowledgeNftPayloadCustodyInput, AppreciationMedalKind, ArcSpaceKarmaCheckpointInput, ArcSpaceKarmaCheckpointResult, ArcSpaceKarmaVoucherItem, CompanionAppreciationMedalNft, ConfigureNftPayloadVisibilityInput, CreateGiveToMintTokenInput, CreationSocialObject, CreatorThankYouBadge, DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_KARMA_TOKEN_ADDRESS, DEFAULT_MAX_HISTORICAL_KARMA_CLAIM, DEFAULT_SPONSORED_BADGE_MINT_QUOTA, DidKarmaIdentityState, GIVE_TO_MINT_TOKEN_TYPE, GiveToMintDistributionEntry, GiveToMintRequest, GiveToMintResult, GiveToMintTokenConfig, HISTORICAL_CLAIM_TRUST_BOOST_BPS, HistoricalKarmaClaimInput, HistoricalKarmaClaimResult, HistoricalSourcePlatform, KarmaCitationShare, KarmaIndexedPoolSettlementInput, KarmaIndexedPoolSettlementResult, KarmaStakeLock, MAX_ACTIVE_SPONSORED_BADGE_MINT_QUOTA, MAX_CHECKPOINT_VOUCHERS_PER_BATCH, MAX_CUSTOM_TOKEN_EPOCH_ALLOWANCE, MAX_CUSTOM_TOKEN_HISTORICAL_CLAIM_CAP, MAX_EPOCH_FORWARD_DRIFT, MAX_HISTORICAL_KARMA_PER_VERIFIED_ITEM, MAX_SPONSORED_BADGE_MINT_QUOTA_PER_GRANT, MAX_TOTAL_CITATION_SHARE_BPS, MAX_UPSTREAM_CITATIONS, MIN_GIVE_TO_MINT_DUST_FLOOR, MIN_GIVE_TO_MINT_TOKEN_CREATION_FEE, MIN_KARMA_FOR_THANK_YOU_BADGE, NftPayloadAccessResolution, NftPayloadCustodyState, NftPayloadVisibility, OcapGiveToMintEngine, PerTokenAccountKarmaState, RECIPROCAL_RING_DAMPING_BPS, VerifiableEpochArchiveCheckpoint, computeArcSpaceCheckpointRoot, computeArcSpaceVoucherDigest, computeHistoricalClaimNullifier, computeNftPayloadCommitmentDigest, deriveCompanionMedalDid, deriveThankYouBadgeDid } from "./give-to-mint-karma.mjs";
|
|
4
|
-
import { DEFAULT_MAX_ROLLUP_BLOCK_SIZE,
|
|
4
|
+
import { DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, DeprecatedRollupProtocolTypeUrl, LegacyRollupReadOnlySummary, LegacyRollupRecordKind, RollupBranchInfo, RollupBranchResolver, ZERO_BYTES32_HASH, assertRollupProtocolNotSunset, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, isDeprecatedRollupWriteProtocol, parseLegacyRollupReadOnlyRecord, rollupBranchOf } from "./legacy-rollup-archive.mjs";
|
|
5
5
|
import { CONTRACT_NFT_KIND, ContractGuardPredicate, ContractNftPayload, CrossChainDepositSpec, CrossChainPurchaseInput, DEFAULT_MAX_STATEMENTS_PER_HOT_KEY_PER_BLOCK, HARD_MAX_TX_BLOCK_STATEMENTS, MAX_CONTRACT_ARGS_BYTES, MAX_CONTRACT_FOOTPRINT_KEYS, MAX_CONTRACT_NFT_STATEMENTS, MAX_EXECUTE_ASSET_CALLS_PER_BLOCK, MAX_EXECUTE_ASSET_DEPTH, MAX_TX_BLOCK_BYTES, MAX_TX_BLOCK_READ_KEYS, MAX_TX_BLOCK_STATE_DIFF_ENTRIES, MAX_TX_BLOCK_TOP_LEVEL_STATEMENTS, MAX_TX_BLOCK_TOTAL_EXPANDED_STATEMENTS, MAX_TX_BLOCK_WRITE_KEYS, OverlayStateDB, PendingTransferRecord, PreparedTransactionBlock, ResolvedTransactionBlockBudget, StagedSyncPipeline, StateDiffEntry, StateFootprint, StatementExecutor, SyncStage, TransactionBlockInput, TransactionBlockPostConditions, TransactionBlockResourceBudget, TransactionBlockResult, TransactionStatement, TwoPhaseCommitCoordinator, TwoPhaseTransferLedger, WalletClearSigningPreview, assertLeafStatementTemplateOnly, assertTransactionBlockResourceBudget, buildWalletClearSigningPreview, computeAccountAndAssetNetEffects, createOverlayStateDB, executeContractNft, executeCrossChainPurchaseBlock, executeTransactionBlock, extractStateFootprint, hasStateConflict, isExecuteAssetStatement, resolveEffectiveResourceBudget, resolveStatementReferences, scheduleParallelBatches, verifyTransactionBlockPostConditions } from "./transaction-block.mjs";
|
|
6
|
-
import { CompatibilityAddonMetrics, CompatibilityAddonMode, CompatibilityDeprecationWarning, CompatibilityTranslationResult,
|
|
6
|
+
import { CompatibilityAddonMetrics, CompatibilityAddonMode, CompatibilityDeprecationWarning, CompatibilityTranslationResult, DEPRECATED_LEGACY_PROTOCOL_TYPE_URLS, DEPRECATED_MIOTX_AND_TRADE_TYPE_URLS, DEPRECATED_MIOTX_PROTOCOL_TYPE_URLS, DEPRECATED_ROLLUP_AND_BRIDGE_TYPE_URLS, DEPRECATED_VERSIONED_ASSET_TYPE_URLS, DOMAIN_COUPLED_PROTOCOL_ALIAS_MAP, DeprecatedLegacyProtocolTypeUrl, DomainCoupledProtocolAliasTypeUrl, LegacyMiotxParticipantEntry, LegacyProtocolCompatibilityAddon, LegacyProtocolReplacementSpec, LegacyProtocolSunsetCategory, LegacyTokenAmountEntry, LegacyTxReadOnlyArchiveSummary, MAX_LEGACY_MIOTX_ASSETS_PER_ENTRY, MAX_LEGACY_MIOTX_PARTICIPANTS, MAX_LEGACY_MIOTX_TOKENS_PER_ENTRY, VNEXT_CANONICAL_WRITE_PROTOCOL_TYPE_URLS, VNextCanonicalWriteProtocolTypeUrl, assertLegacyProtocolNotSunset, assertTransactionBlockVNextPure, compileLegacyTxToVNextTransactionBlock, executeVNextTransactionBlock, getLegacyProtocolReplacementSpec, isDeprecatedLegacyWriteProtocol, isDomainCoupledProtocolAlias, isMiotxLegacyProtocol, isVNextCanonicalWriteProtocol, normalizeProtocolTypeUrl, parseLegacyTxReadOnlyArchiveRecord, resolveDomainAgnosticVNextProtocol } from "./legacy-protocol-sunset.mjs";
|
|
7
7
|
import { AcceptNftBuyOfferInput, AddAmmLiquidityInput, AttributionHopSplit, AuthorizeValueCardSpenderInput, BundleComponentAllocationInput, BurnCirculatingUserTokenInput, CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, CategoryDemandBountyRecord, CategorySupplyDemandMetrics, ChallengeDefectiveSkuInput, ChallengeDefectiveSkuResult, ClawbackUnmaturedCardSettlementInput, ClawbackUnmaturedDistributorRebateInput, ClosePostpaidCreditCardInput, ComposePermissionlessBundleValueCardInput, ComposePermissionlessBundleValueCardResult, ConfigureEscalatingPromoterPolicyInput, CreateBondingCurveFactoryInput, CreateConstantProductPoolInput, CreateNativeNftListingInput, CreateNftBuyOfferInput, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_GRADUATION_RESERVE_ABT, DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS, DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT, DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, DEFAULT_NFT_PROTOCOL_FEE_BPS, DEFAULT_NFT_UI_REFERRER_FEE_BPS, DEFAULT_OFFICIAL_TOKEN_ADDRESS, DEFAULT_PROTOCOL_FEE_SHARE_BPS, DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT, DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, DEFAULT_SKU_QUALITY_BASE_STAKE_ABT, DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS, DynamicCategoryStakeFloorResult, EscalatingPromoterTier, ExchangeFactoryMode, ExecuteProgrammaticPolRebalanceInput, ExecuteProgrammaticPolRebalanceResult, ExecuteUnifiedSkuCheckoutInput, FulfillNativeNftListingInput, GovernanceExchangePolicy, HARD_MAX_SWAP_PRICE_IMPACT_BPS, IssuePermissionlessTokenInput, IssuePostpaidCreditCardInput, IssuePrepaidValueCardInput, LiquidateDefaultedPostpaidCardInput, MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR, MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS, MAX_ESCALATING_PROMOTER_REBATE_BPS, MAX_ESCALATING_PROMOTER_TIERS, MAX_EXCHANGE_SWAP_FEE_BPS, MAX_FT_ISSUANCE_FEE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PROTOCOL_FEE_SHARE_BPS, MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT, MAX_TRACKED_CURVE_HOLDERS, MAX_VALUE_CARD_ALLOWED_MERCHANTS, MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS, MAX_VALUE_CARD_ATTRIBUTION_HOPS, MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS, MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, MINIMUM_LOCKED_AMM_LIQUIDITY, MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MIN_FT_ISSUANCE_FEE_ABT, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, MaturingCardSettlementRecord, MaturingDistributorRebateRecord, MinerRevenueTier, MinerShopPersonaPublicRecord, NativeNftBuyOfferRecord, NativeNftListingMode, NativeNftListingRecord, NativeNftOfferSettlementResult, NativeNftSettlementResult, NativeSwapExecutionResult, NftAttributePredicate, NftAttributePredicateOperator, OcapNativeAbtExchangeEngine, OcapNativeExchangeEngine, OpenComposingRuleClaims, PathPaymentCheckoutInput, PlaceEnglishNftBidInput, PostCategoryDemandBountyInput, PurchaseDedicatedValueCardInput, PurchaseDedicatedValueCardResult, RecalibrateDynamicStakeFloorInput, RecalibrateDynamicStakeFloorResult, RedeemPrepaidValueCardInput, RegisterMinerShopPersonaInput, RegisterSelfOperatedBridgeInput, RegisterSkuFactoryListingInput, ReleaseMaturedCardSettlementInput, ReleaseMaturedDistributorRebateInput, RemoveAmmLiquidityInput, RetireDestroyedTokenInput, RewardCoalitionValueCardInput, RewardCoalitionValueCardResult, SelfOperatedSubTokenBridgeRecord, SettlePostpaidValueCardInput, SignedOpenComposingRuleVc, SingleHopAbtSwapInput, SkuFactoryListingRecord, SkuGranularMetricsView, SkuOrderSettlementRecord, SpendValueCardInput, SpendValueCardResult, StakeForValueCardDistributorInput, StakeForValueCardDistributorResult, TopUpPrepaidValueCardInput, TwoHopTokenSwapInput, UnifiedAbtExchangePoolState, UnstakeValueCardDistributorInput, UnstakeValueCardDistributorResult, UpdateGovernanceExchangePolicyInput, UserIssuedTokenRecord, ValueCardDistributorStakeRecord, ValueCardFundingLineage, ValueCardMode, ValueCardPolicyEnvelope, ValueCardRecord, VerifiableMinerRevenueBadge, computeOpenComposingRuleVcDigest, computeSelfBridgeDisclaimerDigest, computeStakeAddress, deriveSkuQualityStakeAddress, deriveValueCardDistributorStakeAddress, evaluateNftAttributePredicates, integerSqrtBn, issueOpenComposingRuleVc, resolveEscalatingPromoterBps, verifyOpenComposingRuleVc } from "./native-abt-exchange.mjs";
|
|
8
8
|
import { DEFAULT_ISSUER_STAGING_TTL_EPOCHS, FactoryBlueprintRolloutResult, FactoryBlueprintSafetyReport, FactorySafetyInvariant, KarmaSettlementPoolFactoryRecord, KarmaSettlementPoolFactorySpec, MAX_ISSUER_STAGING_TTL_EPOCHS, MAX_SOVEREIGN_NFT_FACTORY_SUPPLY, MintSovereignNftInput, OcapSocialEconomyFactoryRegistry, PilotPrivateCircleDeliveryInput, PilotPrivateCircleDeliveryResult, PilotPublicContentAppreciationInput, PilotPublicContentAppreciationResult, ReputationTokenFactoryInput, ReputationTokenFactoryRecord, SocialEconomyFactoryBlueprint, SocialEconomyFactoryKind, SovereignNftAccessResolution, SovereignNftCategory, SovereignNftFactoryRecord, SovereignNftFactorySpec, SovereignNftInstance, deriveSovereignNftDid } from "./social-economy-factories.mjs";
|
|
9
9
|
import { AcceptStickerOfferInput, AcceptStickerOfferResult, AnchorSpaceManifestInput, ArcadeMachineState, ArcadeSettlementMode, AttentionStampRecord, AttentionStampResolutionMode, BPS_DENOMINATOR, CreateSponsorBudgetPoolInput, DEFAULT_ABT_TOKEN_ADDRESS, GrantSpaceAssetDelegationInput, IBO_DIVIDEND_PRECISION, IboOrganizationState, IboPartnerPosition, IssuePrepaidBudgetCardInput, LockAttentionStampInput, MAX_ARCADE_HOUSE_SPLIT_BPS, MAX_ARCADE_WINNERS_PER_ROUND, MAX_ATTENTION_STAMP_TTL_EPOCHS, MAX_IBO_TOTAL_FEE_SPLIT_BPS, MAX_PREPAID_CARD_ALLOWED_PROVIDERS, MAX_SPACE_DISPLAYED_STICKERS, MAX_SPACE_PLACED_MACHINES, MAX_STICKER_ROYALTY_BPS, MIN_ARCADE_HOUSE_SPLIT_BPS, MIN_ATTENTION_STAMP_ABT, MakeStickerOfferInput, OcapSuperSuitesFoundationEngine, PlayArcadeMachineTicketInput, PlayArcadeMachineTicketResult, PrepaidBudgetCardNft, RedeemPrepaidBudgetCardInput, RedeemPrepaidBudgetCardResult, RegisterArcadeMachineInput, RegisterIboOrganizationInput, RegisterStickerNftInput, ResolveAttentionStampInput, ResolveAttentionStampResult, SettleArcadeMachineWinnersInput, SettleArcadeMachineWinnersResult, SettleIboServiceCheckoutInput, SettleIboServiceCheckoutResult, SpaceAssetDelegationGrant, SpaceManifestAnchorRecord, SponsorBudgetPoolState, StickerNftRecord, StickerOfferRecord, computeArcadeCommitDigest, computeSpaceManifestRootDigest } from "./super-suites-foundation.mjs";
|
|
@@ -13,4 +13,4 @@ import { CHAINALYSIS_OFAC_ORACLE_ADDRESS, assertNotOfacSanctioned, normalizeScre
|
|
|
13
13
|
import { ABT_DECIMALS_SCALE, AbtUtilityPassThroughInput, AbtUtilityPassThroughPlan, DEFAULT_OCAP_INTEGRATOR_ID, DEFAULT_SELECTED_TREASURY_CURRENCY_SYMBOLS, DEFAULT_USD_QUOTE_TTL_SECONDS, DirectBuyExternalSettlementMode, DirectBuyOcapFulfillmentMode, DirectBuyPricingPolicyMode, DirectBuyTreasuryCashier, DirectBuyTreasuryCashierConfig, DirectBuyTreasuryCashierInput, DirectBuyTreasuryCashierPlan, ExternalPaymentChainFamily, MAX_ALLOWED_ZAP_SLIPPAGE_BPS, MAX_ROUTE_PATH_LENGTH, MAX_TRACKED_DIRECT_BUY_EVIDENCES, MAX_USD_QUOTE_TTL_SECONDS, OutboundWithdrawAndSwapInput, OutboundWithdrawAndSwapPlan, Permit2SingleSpec, SelectedTreasuryCurrencySpec, SelectedTreasuryCurrencySymbol, UNIVERSAL_ROUTER_COMMANDS, UniversalRouterCrossChainZapInput, UniversalRouterCrossChainZapPayload, UnlistedTokenExternalSwapSpec, UsdAnchoredAbtQuote, UsdAnchoredAbtQuoteInput, VerifyUsdAnchoredAbtQuoteInput, buildAbtUtilityPassThroughPlan, buildDirectBuyTreasuryCashierPlan, buildOutboundWithdrawAndSwapPlan, buildUniversalRouterCrossChainPayload, createUsdAnchoredAbtQuote, verifyUsdAnchoredAbtQuote } from "./uniswap-router.mjs";
|
|
14
14
|
import { BaseV4GraduationMigrationProof, CANONICAL_LP_BURN_DEAD_ADDRESS, FunctionalUtilityCategory, FunctionalUtilityCharter, IncubatedTokenFactoryRecord, IncubatedTokenFactorySpec, MAX_MINT_RATIO_PER_RESERVE_UNIT, MIN_CREATOR_VESTING_CLIFF_BLOCKS, OcapTokenFactoryGraduationEngine, TokenFactoryGraduationStatus, VerifiedCreatorCredential, computeDeterministicV4GraduationPoolId } from "./uniswap-token-factory-graduation.mjs";
|
|
15
15
|
import { BeforeSwapEvaluationResult, DEFAULT_MIN_HOLDING_BLOCKS, HookFeeTierName, MAX_HOOK_TICKET_TTL_SECONDS, MAX_V4_DYNAMIC_FEE_BPS, MIN_LP_MEV_REBATE_SHARE_BPS, OCAP_VERIFIED_HOOK_SOLIDITY_SPEC, OcapHookTicketClaims, OcapVerifiedHookEngine, SignedOcapHookTicket, V4PoolComplianceMode, V4PoolHookConfig, assertZeroPiiInHookData, computeOcapHookTicketDigest, issueOcapHookTicket, verifyOcapHookTicketSignature } from "./uniswap-v4-hook.mjs";
|
|
16
|
-
export { ABT_DECIMALS_SCALE, type AbtUtilityPassThroughInput, type AbtUtilityPassThroughPlan, type AcceptNftBuyOfferInput, type AcceptStickerOfferInput, type AcceptStickerOfferResult, type AcknowledgeNftPayloadCustodyInput, type AddAmmLiquidityInput, type AnchorSpaceManifestInput, type AppreciationMedalKind, type ArcSpaceKarmaCheckpointInput, type ArcSpaceKarmaCheckpointResult, type ArcSpaceKarmaVoucherItem, type ArcVaultLiquidityState, type ArcVaultShareholderPosition, type ArcadeMachineState, type ArcadeSettlementMode, type AttentionStampRecord, type AttentionStampResolutionMode, type AttributionHopSplit, type AuthorizeValueCardSpenderInput, BPS_DENOMINATOR, type BaseV4GraduationMigrationProof, type BeforeSwapEvaluationResult, type BundleComponentAllocationInput, type BurnCirculatingUserTokenInput, CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_LP_BURN_DEAD_ADDRESS, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, CHAINALYSIS_OFAC_ORACLE_ADDRESS, CONTRACT_NFT_KIND, type CategoryDemandBountyRecord, type CategorySupplyDemandMetrics, type ChallengeDefectiveSkuInput, type ChallengeDefectiveSkuResult, type ClawbackUnmaturedCardSettlementInput, type ClawbackUnmaturedDistributorRebateInput, type ClosePostpaidCreditCardInput, type CompanionAppreciationMedalNft, type CompatibilityAddonMetrics, type CompatibilityAddonMode, type CompatibilityDeprecationWarning, type CompatibilityTranslationResult, type ComposePermissionlessBundleValueCardInput, type ComposePermissionlessBundleValueCardResult, type ConfigureEscalatingPromoterPolicyInput, type ConfigureNftPayloadVisibilityInput, type ContractGuardPredicate, type ContractNftPayload, type CreateBondingCurveFactoryInput, type CreateConstantProductPoolInput, type CreateGiveToMintTokenInput, type CreateNativeNftListingInput, type CreateNftBuyOfferInput, type CreateSponsorBudgetPoolInput, type CreationSocialObject, type CreatorThankYouBadge, type CrossChainDepositSpec, type CrossChainPurchaseInput, type CrossChainSettlementProof, type CrowdloanContributorPosition, DEFAULT_ABT_TOKEN_ADDRESS, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_ISSUER_STAGING_TTL_EPOCHS, DEFAULT_KARMA_TOKEN_ADDRESS, DEFAULT_LEGACY_PROTOCOL_SUNSET_HEIGHT, DEFAULT_LP_JITTER_WINDOW_BLOCKS, DEFAULT_LP_REBALANCE_COOLDOWN_BLOCKS, DEFAULT_MAX_HISTORICAL_KARMA_CLAIM, DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEFAULT_MAX_STATEMENTS_PER_HOT_KEY_PER_BLOCK, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MAX_SWEEP_BATCH_SIZE, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_GRADUATION_RESERVE_ABT, DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS, DEFAULT_MIN_HOLDING_BLOCKS, DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT, DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, DEFAULT_NFT_PROTOCOL_FEE_BPS, DEFAULT_NFT_UI_REFERRER_FEE_BPS, DEFAULT_OCAP_INTEGRATOR_ID, DEFAULT_OFFICIAL_TOKEN_ADDRESS, DEFAULT_PROTOCOL_FEE_SHARE_BPS, DEFAULT_ROLLUP_SUNSET_ACTIVATION_HEIGHT, DEFAULT_SELECTED_TREASURY_CURRENCY_SYMBOLS, DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT, DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, DEFAULT_SKU_QUALITY_BASE_STAKE_ABT, DEFAULT_SPONSORED_BADGE_MINT_QUOTA, DEFAULT_USD_QUOTE_TTL_SECONDS, DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS, DEPRECATED_LEGACY_PROTOCOL_TYPE_URLS, DEPRECATED_MIOTX_AND_TRADE_TYPE_URLS, DEPRECATED_MIOTX_PROTOCOL_TYPE_URLS, DEPRECATED_ROLLUP_AND_BRIDGE_TYPE_URLS, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, DEPRECATED_VERSIONED_ASSET_TYPE_URLS, DOMAIN_COUPLED_PROTOCOL_ALIAS_MAP, type DeprecatedLegacyProtocolTypeUrl, type DeprecatedRollupProtocolTypeUrl, type DidKarmaIdentityState, type DirectBuyExternalSettlementMode, type DirectBuyOcapFulfillmentMode, type DirectBuyPricingPolicyMode, DirectBuyTreasuryCashier, type DirectBuyTreasuryCashierConfig, type DirectBuyTreasuryCashierInput, type DirectBuyTreasuryCashierPlan, type DomainCoupledProtocolAliasTypeUrl, type DynamicCategoryStakeFloorResult, type Erc7683FillInstruction, type Erc7683Output, type Erc7683ResolvedCrossChainOrder, type EscalatingPromoterTier, type ExchangeFactoryMode, type ExecuteProgrammaticPolRebalanceInput, type ExecuteProgrammaticPolRebalanceResult, type ExecuteUnifiedSkuCheckoutInput, type ExternalPaymentChainFamily, type ExternalSwapHookInput, type ExternalSwapHookResult, FORBIDDEN_EXTERNAL_CALL_SELECTORS, type FactoryBlueprintRolloutResult, type FactoryBlueprintSafetyReport, type FactorySafetyInvariant, type FulfillNativeNftListingInput, type FunctionalUtilityCategory, type FunctionalUtilityCharter, GIVE_TO_MINT_TOKEN_TYPE, type GiveToMintDistributionEntry, type GiveToMintRequest, type GiveToMintResult, type GiveToMintTokenConfig, type GovernanceExchangePolicy, type GrantSpaceAssetDelegationInput, HARD_MAX_SWAP_PRICE_IMPACT_BPS, HARD_MAX_TX_BLOCK_STATEMENTS, HISTORICAL_CLAIM_TRUST_BOOST_BPS, type HistoricalKarmaClaimInput, type HistoricalKarmaClaimResult, type HistoricalSourcePlatform, type HookFeeTierName, IBO_DIVIDEND_PRECISION, type IboOrganizationState, type IboPartnerPosition, type IncubatedTokenFactoryRecord, type IncubatedTokenFactorySpec, type IssuePermissionlessTokenInput, type IssuePostpaidCreditCardInput, type IssuePrepaidBudgetCardInput, type IssuePrepaidValueCardInput, type KarmaCitationShare, type KarmaIndexedPoolSettlementInput, type KarmaIndexedPoolSettlementResult, type KarmaSettlementPoolFactoryRecord, type KarmaSettlementPoolFactorySpec, type KarmaStakeLock, type LegacyMiotxParticipantEntry, LegacyProtocolCompatibilityAddon, type LegacyProtocolReplacementSpec, type LegacyProtocolSunsetCategory, type LegacyRollupReadOnlySummary, type LegacyRollupRecordKind, type LegacyTokenAmountEntry, type LegacyTxReadOnlyArchiveSummary, type LiquidateDefaultedPostpaidCardInput, type LockAttentionStampInput, type LpRebalanceProposalInput, MAX_ACTIVE_INTENTS_PER_USER, MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR, MAX_ACTIVE_SPONSORED_BADGE_MINT_QUOTA, MAX_ALLOWED_ZAP_SLIPPAGE_BPS, MAX_ARCADE_HOUSE_SPLIT_BPS, MAX_ARCADE_WINNERS_PER_ROUND, MAX_ATTENTION_STAMP_TTL_EPOCHS, MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MAX_CHECKPOINT_VOUCHERS_PER_BATCH, MAX_CONTRACT_ARGS_BYTES, MAX_CONTRACT_FOOTPRINT_KEYS, MAX_CONTRACT_NFT_STATEMENTS, MAX_CUSTOM_TOKEN_EPOCH_ALLOWANCE, MAX_CUSTOM_TOKEN_HISTORICAL_CLAIM_CAP, MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS, MAX_EPOCH_FORWARD_DRIFT, MAX_ESCALATING_PROMOTER_REBATE_BPS, MAX_ESCALATING_PROMOTER_TIERS, MAX_EXCHANGE_SWAP_FEE_BPS, MAX_EXECUTE_ASSET_CALLS_PER_BLOCK, MAX_EXECUTE_ASSET_DEPTH, MAX_FREE_RELAY_CREDITS_PER_EPOCH, MAX_FT_ISSUANCE_FEE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_HARVEST_YIELD_BPS, MAX_HISTORICAL_KARMA_PER_VERIFIED_ITEM, MAX_HOOK_TICKET_TTL_SECONDS, MAX_IBO_TOTAL_FEE_SPLIT_BPS, MAX_INTENT_TIMEOUT_BLOCKS, MAX_ISSUER_STAGING_TTL_EPOCHS, MAX_LEGACY_MIOTX_ASSETS_PER_ENTRY, MAX_LEGACY_MIOTX_PARTICIPANTS, MAX_LEGACY_MIOTX_TOKENS_PER_ENTRY, MAX_LP_REBALANCE_SLIPPAGE_BPS, MAX_MINT_RATIO_PER_RESERVE_UNIT, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PREPAID_CARD_ALLOWED_PROVIDERS, MAX_PROTOCOL_FEE_SHARE_BPS, MAX_ROUTE_PATH_LENGTH, MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT, MAX_SOVEREIGN_NFT_FACTORY_SUPPLY, MAX_SPACE_DISPLAYED_STICKERS, MAX_SPACE_PLACED_MACHINES, MAX_SPONSORED_BADGE_MINT_QUOTA_PER_GRANT, MAX_STICKER_ROYALTY_BPS, MAX_TOTAL_CITATION_SHARE_BPS, MAX_TRACKED_CURVE_HOLDERS, MAX_TRACKED_DIRECT_BUY_EVIDENCES, MAX_TX_BLOCK_BYTES, MAX_TX_BLOCK_READ_KEYS, MAX_TX_BLOCK_STATE_DIFF_ENTRIES, MAX_TX_BLOCK_TOP_LEVEL_STATEMENTS, MAX_TX_BLOCK_TOTAL_EXPANDED_STATEMENTS, MAX_TX_BLOCK_WRITE_KEYS, MAX_UNISWAP_TICK, MAX_UPSTREAM_CITATIONS, MAX_USD_QUOTE_TTL_SECONDS, MAX_V4_DYNAMIC_FEE_BPS, MAX_VALUE_CARD_ALLOWED_MERCHANTS, MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS, MAX_VALUE_CARD_ATTRIBUTION_HOPS, MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS, MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, MAX_VAULT_STRATEGY_DEPLOYED_BPS, MAX_ZAP_ABT_PER_SETTLEMENT_SCALAR, MAX_ZAP_PRICE_IMPACT_BPS, MINIMUM_LOCKED_AMM_LIQUIDITY, MIN_ARCADE_HOUSE_SPLIT_BPS, MIN_ATTENTION_STAMP_ABT, MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MIN_CREATOR_VESTING_CLIFF_BLOCKS, MIN_FT_ISSUANCE_FEE_ABT, MIN_GIVE_TO_MINT_DUST_FLOOR, MIN_GIVE_TO_MINT_TOKEN_CREATION_FEE, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, MIN_KARMA_FOR_THANK_YOU_BADGE, MIN_LP_MEV_REBATE_SHARE_BPS, MIN_RECOMMENDED_SOLVER_SHARDS, MIN_UNISWAP_TICK, MIN_VAULT_LIQUID_BUFFER_BPS, type MakeStickerOfferInput, type ManagedIntentRecord, type MaturingCardSettlementRecord, type MaturingDistributorRebateRecord, type MinerRevenueTier, type MinerShopPersonaPublicRecord, type MintSovereignNftInput, type NativeNftBuyOfferRecord, type NativeNftListingMode, type NativeNftListingRecord, type NativeNftOfferSettlementResult, type NativeNftSettlementResult, type NativeSwapExecutionResult, type NftAttributePredicate, type NftAttributePredicateOperator, type NftPayloadAccessResolution, type NftPayloadCustodyState, type NftPayloadVisibility, type NonCustodialLpContractNftAsset, type NonCustodialLpGuardSpec, OCAP_VERIFIED_HOOK_SOLIDITY_SPEC, OcapArcVaultExternalAdapterEngine, OcapErc7683SolverEngine, OcapGiveToMintEngine, type OcapHookTicketClaims, OcapNativeAbtExchangeEngine, OcapNativeExchangeEngine, OcapSocialEconomyFactoryRegistry, OcapSovereignAppChainHubEngine, OcapSuperSuitesFoundationEngine, OcapTokenFactoryGraduationEngine, OcapVerifiedHookEngine, type OpenComposingRuleClaims, type OriginEscrowProof, type OutboundWithdrawAndSwapInput, type OutboundWithdrawAndSwapPlan, OverlayStateDB, type PathPaymentCheckoutInput, type PendingTransferRecord, type PerTokenAccountKarmaState, type Permit2SingleSpec, type PfmCrossSpokePacketInput, type PilotPrivateCircleDeliveryInput, type PilotPrivateCircleDeliveryResult, type PilotPublicContentAppreciationInput, type PilotPublicContentAppreciationResult, type PlaceEnglishNftBidInput, type PlayArcadeMachineTicketInput, type PlayArcadeMachineTicketResult, type PostCategoryDemandBountyInput, type PrepaidBudgetCardNft, type PreparedTransactionBlock, type PurchaseDedicatedValueCardInput, type PurchaseDedicatedValueCardResult, RECIPROCAL_RING_DAMPING_BPS, type RecalibrateDynamicStakeFloorInput, type RecalibrateDynamicStakeFloorResult, type RedeemPrepaidBudgetCardInput, type RedeemPrepaidBudgetCardResult, type RedeemPrepaidValueCardInput, type RegisterArcadeMachineInput, type RegisterIboOrganizationInput, type RegisterMinerShopPersonaInput, type RegisterSelfOperatedBridgeInput, type RegisterSkuFactoryListingInput, type RegisterStickerNftInput, type ReleaseMaturedCardSettlementInput, type ReleaseMaturedDistributorRebateInput, type RemoveAmmLiquidityInput, type ReputationTokenFactoryInput, type ReputationTokenFactoryRecord, type ResolveAttentionStampInput, type ResolveAttentionStampResult, type ResolvedTransactionBlockBudget, type RetireDestroyedTokenInput, type RewardCoalitionValueCardInput, type RewardCoalitionValueCardResult, type SelectedTreasuryCurrencySpec, type SelectedTreasuryCurrencySymbol, type SelfOperatedSubTokenBridgeRecord, type SettleArcadeMachineWinnersInput, type SettleArcadeMachineWinnersResult, type SettleIboServiceCheckoutInput, type SettleIboServiceCheckoutResult, type SettlePostpaidValueCardInput, type SignedOcapHookTicket, type SignedOpenComposingRuleVc, type SingleHopAbtSwapInput, type SkuFactoryListingRecord, type SkuGranularMetricsView, type SkuOrderSettlementRecord, type SocialEconomyFactoryBlueprint, type SocialEconomyFactoryKind, type SolverEngineConfig, type SolverExecutionMode, type SovereignNftAccessResolution, type SovereignNftCategory, type SovereignNftFactoryRecord, type SovereignNftFactorySpec, type SovereignNftInstance, type SovereignReserveState, type SpaceAssetDelegationGrant, type SpaceManifestAnchorRecord, type SpendValueCardInput, type SpendValueCardResult, type SpokeCrowdloanState, type SponsorBudgetPoolState, StagedSyncPipeline, type StakeForValueCardDistributorInput, type StakeForValueCardDistributorResult, type StateDiffEntry, type StateFootprint, type StatementExecutor, type StickerNftRecord, type StickerOfferRecord, type SyncStage, type TokenFactoryGraduationStatus, type TopUpPrepaidValueCardInput, type TransactionBlockInput, type TransactionBlockPostConditions, type TransactionBlockResourceBudget, type TransactionBlockResult, type TransactionStatement, type TwoHopTokenSwapInput, TwoPhaseCommitCoordinator, TwoPhaseTransferLedger, UNIVERSAL_ROUTER_COMMANDS, type UnifiedAbtExchangePoolState, type UniversalAbtZapInInput, type UniversalAbtZapInResult, type UniversalRouterCrossChainZapInput, type UniversalRouterCrossChainZapPayload, type UnlistedTokenExternalSwapSpec, type UnstakeValueCardDistributorInput, type UnstakeValueCardDistributorResult, type UpdateGovernanceExchangePolicyInput, type UsdAnchoredAbtQuote, type UsdAnchoredAbtQuoteInput, type UserIssuedTokenRecord, type V4PoolComplianceMode, type V4PoolHookConfig, type VLedgerCheckpointInput, VNEXT_CANONICAL_WRITE_PROTOCOL_TYPE_URLS, type VNextCanonicalWriteProtocolTypeUrl, type ValueCardDistributorStakeRecord, type ValueCardFundingLineage, type ValueCardMode, type ValueCardPolicyEnvelope, type ValueCardRecord, type VerifiableEpochArchiveCheckpoint, type VerifiableMinerRevenueBadge, type VerifiedCreatorCredential, type VerifyUsdAnchoredAbtQuoteInput, type WalletClearSigningPreview, ZERO_BYTES32_HASH, assertLeafStatementTemplateOnly, assertLegacyProtocolNotSunset, assertNotOfacSanctioned, assertRollupProtocolNotSunset, assertTransactionBlockResourceBudget, assertTransactionBlockVNextPure, assertZeroPiiInHookData, buildAbtUtilityPassThroughPlan, buildDirectBuyTreasuryCashierPlan, buildNonCustodialLpContractNft, buildOutboundWithdrawAndSwapPlan, buildUniversalRouterCrossChainPayload, buildWalletClearSigningPreview, compileLegacyTxToVNextTransactionBlock, computeAccountAndAssetNetEffects, computeArcSpaceCheckpointRoot, computeArcSpaceVoucherDigest, computeArcadeCommitDigest, computeDeterministicRebalanceSlot, computeDeterministicV4GraduationPoolId, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, computeHistoricalClaimNullifier, computeNftPayloadCommitmentDigest, computeOcapHookTicketDigest, computeOpenComposingRuleVcDigest, computeSelfBridgeDisclaimerDigest, computeSpaceManifestRootDigest, computeStakeAddress, computeVLedgerCheckpointStateRoot, createOverlayStateDB, createUsdAnchoredAbtQuote, deriveCompanionMedalDid, deriveSkuQualityStakeAddress, deriveSovereignNftDid, deriveSovereignVaultDid, deriveThankYouBadgeDid, deriveValueCardDistributorStakeAddress, evaluateNftAttributePredicates, executeContractNft, executeCrossChainPurchaseBlock, executeNonCustodialLpRebalance, executeTransactionBlock, executeVNextTransactionBlock, extractStateFootprint, getLegacyProtocolReplacementSpec, hasStateConflict, integerSqrtBn, isDeprecatedLegacyWriteProtocol, isDeprecatedRollupWriteProtocol, isDomainCoupledProtocolAlias, isExecuteAssetStatement, isMiotxLegacyProtocol, isVNextCanonicalWriteProtocol, issueOcapHookTicket, issueOpenComposingRuleVc, normalizeProtocolTypeUrl, normalizeScreeningAddress, parseLegacyRollupReadOnlyRecord, parseLegacyTxReadOnlyArchiveRecord, resolveDomainAgnosticVNextProtocol, resolveEffectiveResourceBudget, resolveEscalatingPromoterBps, resolveStatementReferences, scheduleParallelBatches, selectSolverSubVaultShard, verifyOcapHookTicketSignature, verifyOpenComposingRuleVc, verifyTransactionBlockPostConditions, verifyUsdAnchoredAbtQuote };
|
|
16
|
+
export { ABT_DECIMALS_SCALE, type AbtUtilityPassThroughInput, type AbtUtilityPassThroughPlan, type AcceptNftBuyOfferInput, type AcceptStickerOfferInput, type AcceptStickerOfferResult, type AcknowledgeNftPayloadCustodyInput, type AddAmmLiquidityInput, type AnchorSpaceManifestInput, type AppreciationMedalKind, type ArcSpaceKarmaCheckpointInput, type ArcSpaceKarmaCheckpointResult, type ArcSpaceKarmaVoucherItem, type ArcVaultLiquidityState, type ArcVaultShareholderPosition, type ArcadeMachineState, type ArcadeSettlementMode, type AttentionStampRecord, type AttentionStampResolutionMode, type AttributionHopSplit, type AuthorizeValueCardSpenderInput, BPS_DENOMINATOR, type BaseV4GraduationMigrationProof, type BeforeSwapEvaluationResult, type BundleComponentAllocationInput, type BurnCirculatingUserTokenInput, CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_LP_BURN_DEAD_ADDRESS, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, CHAINALYSIS_OFAC_ORACLE_ADDRESS, CONTRACT_NFT_KIND, type CategoryDemandBountyRecord, type CategorySupplyDemandMetrics, type ChallengeDefectiveSkuInput, type ChallengeDefectiveSkuResult, type ClawbackUnmaturedCardSettlementInput, type ClawbackUnmaturedDistributorRebateInput, type ClosePostpaidCreditCardInput, type CompanionAppreciationMedalNft, type CompatibilityAddonMetrics, type CompatibilityAddonMode, type CompatibilityDeprecationWarning, type CompatibilityTranslationResult, type ComposePermissionlessBundleValueCardInput, type ComposePermissionlessBundleValueCardResult, type ConfigureEscalatingPromoterPolicyInput, type ConfigureNftPayloadVisibilityInput, type ContractGuardPredicate, type ContractNftPayload, type CreateBondingCurveFactoryInput, type CreateConstantProductPoolInput, type CreateGiveToMintTokenInput, type CreateNativeNftListingInput, type CreateNftBuyOfferInput, type CreateSponsorBudgetPoolInput, type CreationSocialObject, type CreatorThankYouBadge, type CrossChainDepositSpec, type CrossChainPurchaseInput, type CrossChainSettlementProof, type CrowdloanContributorPosition, DEFAULT_ABT_TOKEN_ADDRESS, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_ISSUER_STAGING_TTL_EPOCHS, DEFAULT_KARMA_TOKEN_ADDRESS, DEFAULT_LP_JITTER_WINDOW_BLOCKS, DEFAULT_LP_REBALANCE_COOLDOWN_BLOCKS, DEFAULT_MAX_HISTORICAL_KARMA_CLAIM, DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEFAULT_MAX_STATEMENTS_PER_HOT_KEY_PER_BLOCK, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MAX_SWEEP_BATCH_SIZE, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_GRADUATION_RESERVE_ABT, DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS, DEFAULT_MIN_HOLDING_BLOCKS, DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT, DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, DEFAULT_NFT_PROTOCOL_FEE_BPS, DEFAULT_NFT_UI_REFERRER_FEE_BPS, DEFAULT_OCAP_INTEGRATOR_ID, DEFAULT_OFFICIAL_TOKEN_ADDRESS, DEFAULT_PROTOCOL_FEE_SHARE_BPS, DEFAULT_SELECTED_TREASURY_CURRENCY_SYMBOLS, DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT, DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, DEFAULT_SKU_QUALITY_BASE_STAKE_ABT, DEFAULT_SPONSORED_BADGE_MINT_QUOTA, DEFAULT_USD_QUOTE_TTL_SECONDS, DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS, DEPRECATED_LEGACY_PROTOCOL_TYPE_URLS, DEPRECATED_MIOTX_AND_TRADE_TYPE_URLS, DEPRECATED_MIOTX_PROTOCOL_TYPE_URLS, DEPRECATED_ROLLUP_AND_BRIDGE_TYPE_URLS, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, DEPRECATED_VERSIONED_ASSET_TYPE_URLS, DOMAIN_COUPLED_PROTOCOL_ALIAS_MAP, type DeprecatedLegacyProtocolTypeUrl, type DeprecatedRollupProtocolTypeUrl, type DidKarmaIdentityState, type DirectBuyExternalSettlementMode, type DirectBuyOcapFulfillmentMode, type DirectBuyPricingPolicyMode, DirectBuyTreasuryCashier, type DirectBuyTreasuryCashierConfig, type DirectBuyTreasuryCashierInput, type DirectBuyTreasuryCashierPlan, type DomainCoupledProtocolAliasTypeUrl, type DynamicCategoryStakeFloorResult, type Erc7683FillInstruction, type Erc7683Output, type Erc7683ResolvedCrossChainOrder, type EscalatingPromoterTier, type ExchangeFactoryMode, type ExecuteProgrammaticPolRebalanceInput, type ExecuteProgrammaticPolRebalanceResult, type ExecuteUnifiedSkuCheckoutInput, type ExternalPaymentChainFamily, type ExternalSwapHookInput, type ExternalSwapHookResult, FORBIDDEN_EXTERNAL_CALL_SELECTORS, type FactoryBlueprintRolloutResult, type FactoryBlueprintSafetyReport, type FactorySafetyInvariant, type FulfillNativeNftListingInput, type FunctionalUtilityCategory, type FunctionalUtilityCharter, GIVE_TO_MINT_TOKEN_TYPE, type GiveToMintDistributionEntry, type GiveToMintRequest, type GiveToMintResult, type GiveToMintTokenConfig, type GovernanceExchangePolicy, type GrantSpaceAssetDelegationInput, HARD_MAX_SWAP_PRICE_IMPACT_BPS, HARD_MAX_TX_BLOCK_STATEMENTS, HISTORICAL_CLAIM_TRUST_BOOST_BPS, type HistoricalKarmaClaimInput, type HistoricalKarmaClaimResult, type HistoricalSourcePlatform, type HookFeeTierName, IBO_DIVIDEND_PRECISION, type IboOrganizationState, type IboPartnerPosition, type IncubatedTokenFactoryRecord, type IncubatedTokenFactorySpec, type IssuePermissionlessTokenInput, type IssuePostpaidCreditCardInput, type IssuePrepaidBudgetCardInput, type IssuePrepaidValueCardInput, type KarmaCitationShare, type KarmaIndexedPoolSettlementInput, type KarmaIndexedPoolSettlementResult, type KarmaSettlementPoolFactoryRecord, type KarmaSettlementPoolFactorySpec, type KarmaStakeLock, type LegacyMiotxParticipantEntry, LegacyProtocolCompatibilityAddon, type LegacyProtocolReplacementSpec, type LegacyProtocolSunsetCategory, type LegacyRollupReadOnlySummary, type LegacyRollupRecordKind, type LegacyTokenAmountEntry, type LegacyTxReadOnlyArchiveSummary, type LiquidateDefaultedPostpaidCardInput, type LockAttentionStampInput, type LpRebalanceProposalInput, MAX_ACTIVE_INTENTS_PER_USER, MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR, MAX_ACTIVE_SPONSORED_BADGE_MINT_QUOTA, MAX_ALLOWED_ZAP_SLIPPAGE_BPS, MAX_ARCADE_HOUSE_SPLIT_BPS, MAX_ARCADE_WINNERS_PER_ROUND, MAX_ATTENTION_STAMP_TTL_EPOCHS, MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MAX_CHECKPOINT_VOUCHERS_PER_BATCH, MAX_CONTRACT_ARGS_BYTES, MAX_CONTRACT_FOOTPRINT_KEYS, MAX_CONTRACT_NFT_STATEMENTS, MAX_CUSTOM_TOKEN_EPOCH_ALLOWANCE, MAX_CUSTOM_TOKEN_HISTORICAL_CLAIM_CAP, MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS, MAX_EPOCH_FORWARD_DRIFT, MAX_ESCALATING_PROMOTER_REBATE_BPS, MAX_ESCALATING_PROMOTER_TIERS, MAX_EXCHANGE_SWAP_FEE_BPS, MAX_EXECUTE_ASSET_CALLS_PER_BLOCK, MAX_EXECUTE_ASSET_DEPTH, MAX_FREE_RELAY_CREDITS_PER_EPOCH, MAX_FT_ISSUANCE_FEE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_HARVEST_YIELD_BPS, MAX_HISTORICAL_KARMA_PER_VERIFIED_ITEM, MAX_HOOK_TICKET_TTL_SECONDS, MAX_IBO_TOTAL_FEE_SPLIT_BPS, MAX_INTENT_TIMEOUT_BLOCKS, MAX_ISSUER_STAGING_TTL_EPOCHS, MAX_LEGACY_MIOTX_ASSETS_PER_ENTRY, MAX_LEGACY_MIOTX_PARTICIPANTS, MAX_LEGACY_MIOTX_TOKENS_PER_ENTRY, MAX_LP_REBALANCE_SLIPPAGE_BPS, MAX_MINT_RATIO_PER_RESERVE_UNIT, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PREPAID_CARD_ALLOWED_PROVIDERS, MAX_PROTOCOL_FEE_SHARE_BPS, MAX_ROUTE_PATH_LENGTH, MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT, MAX_SOVEREIGN_NFT_FACTORY_SUPPLY, MAX_SPACE_DISPLAYED_STICKERS, MAX_SPACE_PLACED_MACHINES, MAX_SPONSORED_BADGE_MINT_QUOTA_PER_GRANT, MAX_STICKER_ROYALTY_BPS, MAX_TOTAL_CITATION_SHARE_BPS, MAX_TRACKED_CURVE_HOLDERS, MAX_TRACKED_DIRECT_BUY_EVIDENCES, MAX_TX_BLOCK_BYTES, MAX_TX_BLOCK_READ_KEYS, MAX_TX_BLOCK_STATE_DIFF_ENTRIES, MAX_TX_BLOCK_TOP_LEVEL_STATEMENTS, MAX_TX_BLOCK_TOTAL_EXPANDED_STATEMENTS, MAX_TX_BLOCK_WRITE_KEYS, MAX_UNISWAP_TICK, MAX_UPSTREAM_CITATIONS, MAX_USD_QUOTE_TTL_SECONDS, MAX_V4_DYNAMIC_FEE_BPS, MAX_VALUE_CARD_ALLOWED_MERCHANTS, MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS, MAX_VALUE_CARD_ATTRIBUTION_HOPS, MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS, MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, MAX_VAULT_STRATEGY_DEPLOYED_BPS, MAX_ZAP_ABT_PER_SETTLEMENT_SCALAR, MAX_ZAP_PRICE_IMPACT_BPS, MINIMUM_LOCKED_AMM_LIQUIDITY, MIN_ARCADE_HOUSE_SPLIT_BPS, MIN_ATTENTION_STAMP_ABT, MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MIN_CREATOR_VESTING_CLIFF_BLOCKS, MIN_FT_ISSUANCE_FEE_ABT, MIN_GIVE_TO_MINT_DUST_FLOOR, MIN_GIVE_TO_MINT_TOKEN_CREATION_FEE, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, MIN_KARMA_FOR_THANK_YOU_BADGE, MIN_LP_MEV_REBATE_SHARE_BPS, MIN_RECOMMENDED_SOLVER_SHARDS, MIN_UNISWAP_TICK, MIN_VAULT_LIQUID_BUFFER_BPS, type MakeStickerOfferInput, type ManagedIntentRecord, type MaturingCardSettlementRecord, type MaturingDistributorRebateRecord, type MinerRevenueTier, type MinerShopPersonaPublicRecord, type MintSovereignNftInput, type NativeNftBuyOfferRecord, type NativeNftListingMode, type NativeNftListingRecord, type NativeNftOfferSettlementResult, type NativeNftSettlementResult, type NativeSwapExecutionResult, type NftAttributePredicate, type NftAttributePredicateOperator, type NftPayloadAccessResolution, type NftPayloadCustodyState, type NftPayloadVisibility, type NonCustodialLpContractNftAsset, type NonCustodialLpGuardSpec, OCAP_VERIFIED_HOOK_SOLIDITY_SPEC, OcapArcVaultExternalAdapterEngine, OcapErc7683SolverEngine, OcapGiveToMintEngine, type OcapHookTicketClaims, OcapNativeAbtExchangeEngine, OcapNativeExchangeEngine, OcapSocialEconomyFactoryRegistry, OcapSovereignAppChainHubEngine, OcapSuperSuitesFoundationEngine, OcapTokenFactoryGraduationEngine, OcapVerifiedHookEngine, type OpenComposingRuleClaims, type OriginEscrowProof, type OutboundWithdrawAndSwapInput, type OutboundWithdrawAndSwapPlan, OverlayStateDB, type PathPaymentCheckoutInput, type PendingTransferRecord, type PerTokenAccountKarmaState, type Permit2SingleSpec, type PfmCrossSpokePacketInput, type PilotPrivateCircleDeliveryInput, type PilotPrivateCircleDeliveryResult, type PilotPublicContentAppreciationInput, type PilotPublicContentAppreciationResult, type PlaceEnglishNftBidInput, type PlayArcadeMachineTicketInput, type PlayArcadeMachineTicketResult, type PostCategoryDemandBountyInput, type PrepaidBudgetCardNft, type PreparedTransactionBlock, type PurchaseDedicatedValueCardInput, type PurchaseDedicatedValueCardResult, RECIPROCAL_RING_DAMPING_BPS, type RecalibrateDynamicStakeFloorInput, type RecalibrateDynamicStakeFloorResult, type RedeemPrepaidBudgetCardInput, type RedeemPrepaidBudgetCardResult, type RedeemPrepaidValueCardInput, type RegisterArcadeMachineInput, type RegisterIboOrganizationInput, type RegisterMinerShopPersonaInput, type RegisterSelfOperatedBridgeInput, type RegisterSkuFactoryListingInput, type RegisterStickerNftInput, type ReleaseMaturedCardSettlementInput, type ReleaseMaturedDistributorRebateInput, type RemoveAmmLiquidityInput, type ReputationTokenFactoryInput, type ReputationTokenFactoryRecord, type ResolveAttentionStampInput, type ResolveAttentionStampResult, type ResolvedTransactionBlockBudget, type RetireDestroyedTokenInput, type RewardCoalitionValueCardInput, type RewardCoalitionValueCardResult, type RollupBranchInfo, type RollupBranchResolver, type SelectedTreasuryCurrencySpec, type SelectedTreasuryCurrencySymbol, type SelfOperatedSubTokenBridgeRecord, type SettleArcadeMachineWinnersInput, type SettleArcadeMachineWinnersResult, type SettleIboServiceCheckoutInput, type SettleIboServiceCheckoutResult, type SettlePostpaidValueCardInput, type SignedOcapHookTicket, type SignedOpenComposingRuleVc, type SingleHopAbtSwapInput, type SkuFactoryListingRecord, type SkuGranularMetricsView, type SkuOrderSettlementRecord, type SocialEconomyFactoryBlueprint, type SocialEconomyFactoryKind, type SolverEngineConfig, type SolverExecutionMode, type SovereignNftAccessResolution, type SovereignNftCategory, type SovereignNftFactoryRecord, type SovereignNftFactorySpec, type SovereignNftInstance, type SovereignReserveState, type SpaceAssetDelegationGrant, type SpaceManifestAnchorRecord, type SpendValueCardInput, type SpendValueCardResult, type SpokeCrowdloanState, type SponsorBudgetPoolState, StagedSyncPipeline, type StakeForValueCardDistributorInput, type StakeForValueCardDistributorResult, type StateDiffEntry, type StateFootprint, type StatementExecutor, type StickerNftRecord, type StickerOfferRecord, type SyncStage, type TokenFactoryGraduationStatus, type TopUpPrepaidValueCardInput, type TransactionBlockInput, type TransactionBlockPostConditions, type TransactionBlockResourceBudget, type TransactionBlockResult, type TransactionStatement, type TwoHopTokenSwapInput, TwoPhaseCommitCoordinator, TwoPhaseTransferLedger, UNIVERSAL_ROUTER_COMMANDS, type UnifiedAbtExchangePoolState, type UniversalAbtZapInInput, type UniversalAbtZapInResult, type UniversalRouterCrossChainZapInput, type UniversalRouterCrossChainZapPayload, type UnlistedTokenExternalSwapSpec, type UnstakeValueCardDistributorInput, type UnstakeValueCardDistributorResult, type UpdateGovernanceExchangePolicyInput, type UsdAnchoredAbtQuote, type UsdAnchoredAbtQuoteInput, type UserIssuedTokenRecord, type V4PoolComplianceMode, type V4PoolHookConfig, type VLedgerCheckpointInput, VNEXT_CANONICAL_WRITE_PROTOCOL_TYPE_URLS, type VNextCanonicalWriteProtocolTypeUrl, type ValueCardDistributorStakeRecord, type ValueCardFundingLineage, type ValueCardMode, type ValueCardPolicyEnvelope, type ValueCardRecord, type VerifiableEpochArchiveCheckpoint, type VerifiableMinerRevenueBadge, type VerifiedCreatorCredential, type VerifyUsdAnchoredAbtQuoteInput, type WalletClearSigningPreview, ZERO_BYTES32_HASH, assertLeafStatementTemplateOnly, assertLegacyProtocolNotSunset, assertNotOfacSanctioned, assertRollupProtocolNotSunset, assertTransactionBlockResourceBudget, assertTransactionBlockVNextPure, assertZeroPiiInHookData, buildAbtUtilityPassThroughPlan, buildDirectBuyTreasuryCashierPlan, buildNonCustodialLpContractNft, buildOutboundWithdrawAndSwapPlan, buildUniversalRouterCrossChainPayload, buildWalletClearSigningPreview, compileLegacyTxToVNextTransactionBlock, computeAccountAndAssetNetEffects, computeArcSpaceCheckpointRoot, computeArcSpaceVoucherDigest, computeArcadeCommitDigest, computeDeterministicRebalanceSlot, computeDeterministicV4GraduationPoolId, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, computeHistoricalClaimNullifier, computeNftPayloadCommitmentDigest, computeOcapHookTicketDigest, computeOpenComposingRuleVcDigest, computeSelfBridgeDisclaimerDigest, computeSpaceManifestRootDigest, computeStakeAddress, computeVLedgerCheckpointStateRoot, createOverlayStateDB, createUsdAnchoredAbtQuote, deriveCompanionMedalDid, deriveSkuQualityStakeAddress, deriveSovereignNftDid, deriveSovereignVaultDid, deriveThankYouBadgeDid, deriveValueCardDistributorStakeAddress, evaluateNftAttributePredicates, executeContractNft, executeCrossChainPurchaseBlock, executeNonCustodialLpRebalance, executeTransactionBlock, executeVNextTransactionBlock, extractStateFootprint, getLegacyProtocolReplacementSpec, hasStateConflict, integerSqrtBn, isDeprecatedLegacyWriteProtocol, isDeprecatedRollupWriteProtocol, isDomainCoupledProtocolAlias, isExecuteAssetStatement, isMiotxLegacyProtocol, isVNextCanonicalWriteProtocol, issueOcapHookTicket, issueOpenComposingRuleVc, normalizeProtocolTypeUrl, normalizeScreeningAddress, parseLegacyRollupReadOnlyRecord, parseLegacyTxReadOnlyArchiveRecord, resolveDomainAgnosticVNextProtocol, resolveEffectiveResourceBudget, resolveEscalatingPromoterBps, resolveStatementReferences, rollupBranchOf, scheduleParallelBatches, selectSolverSubVaultShard, verifyOcapHookTicketSignature, verifyOpenComposingRuleVc, verifyTransactionBlockPostConditions, verifyUsdAnchoredAbtQuote };
|
package/esm/library.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { ABT_DECIMALS_SCALE, DEFAULT_OCAP_INTEGRATOR_ID, DEFAULT_SELECTED_TREASU
|
|
|
3
3
|
import { MAX_FREE_RELAY_CREDITS_PER_EPOCH, OcapSovereignAppChainHubEngine, computeVLedgerCheckpointStateRoot, deriveSovereignVaultDid } from "./appchain-sovereign-hub.mjs";
|
|
4
4
|
import { FORBIDDEN_EXTERNAL_CALL_SELECTORS, MAX_HARVEST_YIELD_BPS, MAX_VAULT_STRATEGY_DEPLOYED_BPS, MAX_ZAP_ABT_PER_SETTLEMENT_SCALAR, MAX_ZAP_PRICE_IMPACT_BPS, MIN_VAULT_LIQUID_BUFFER_BPS, OcapArcVaultExternalAdapterEngine } from "./arcvault-external-adapter.mjs";
|
|
5
5
|
import { DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_KARMA_TOKEN_ADDRESS, DEFAULT_MAX_HISTORICAL_KARMA_CLAIM, DEFAULT_SPONSORED_BADGE_MINT_QUOTA, GIVE_TO_MINT_TOKEN_TYPE, HISTORICAL_CLAIM_TRUST_BOOST_BPS, MAX_ACTIVE_SPONSORED_BADGE_MINT_QUOTA, MAX_CHECKPOINT_VOUCHERS_PER_BATCH, MAX_CUSTOM_TOKEN_EPOCH_ALLOWANCE, MAX_CUSTOM_TOKEN_HISTORICAL_CLAIM_CAP, MAX_EPOCH_FORWARD_DRIFT, MAX_HISTORICAL_KARMA_PER_VERIFIED_ITEM, MAX_SPONSORED_BADGE_MINT_QUOTA_PER_GRANT, MAX_TOTAL_CITATION_SHARE_BPS, MAX_UPSTREAM_CITATIONS, MIN_GIVE_TO_MINT_DUST_FLOOR, MIN_GIVE_TO_MINT_TOKEN_CREATION_FEE, MIN_KARMA_FOR_THANK_YOU_BADGE, OcapGiveToMintEngine, RECIPROCAL_RING_DAMPING_BPS, computeArcSpaceCheckpointRoot, computeArcSpaceVoucherDigest, computeHistoricalClaimNullifier, computeNftPayloadCommitmentDigest, deriveCompanionMedalDid, deriveThankYouBadgeDid } from "./give-to-mint-karma.mjs";
|
|
6
|
-
import { DEFAULT_MAX_ROLLUP_BLOCK_SIZE,
|
|
6
|
+
import { DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, ZERO_BYTES32_HASH, assertRollupProtocolNotSunset, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, isDeprecatedRollupWriteProtocol, parseLegacyRollupReadOnlyRecord, rollupBranchOf } from "./legacy-rollup-archive.mjs";
|
|
7
7
|
import { CONTRACT_NFT_KIND, DEFAULT_MAX_STATEMENTS_PER_HOT_KEY_PER_BLOCK, HARD_MAX_TX_BLOCK_STATEMENTS, MAX_CONTRACT_ARGS_BYTES, MAX_CONTRACT_FOOTPRINT_KEYS, MAX_CONTRACT_NFT_STATEMENTS, MAX_EXECUTE_ASSET_CALLS_PER_BLOCK, MAX_EXECUTE_ASSET_DEPTH, MAX_TX_BLOCK_BYTES, MAX_TX_BLOCK_READ_KEYS, MAX_TX_BLOCK_STATE_DIFF_ENTRIES, MAX_TX_BLOCK_TOP_LEVEL_STATEMENTS, MAX_TX_BLOCK_TOTAL_EXPANDED_STATEMENTS, MAX_TX_BLOCK_WRITE_KEYS, OverlayStateDB, StagedSyncPipeline, TwoPhaseCommitCoordinator, TwoPhaseTransferLedger, assertLeafStatementTemplateOnly, assertTransactionBlockResourceBudget, buildWalletClearSigningPreview, computeAccountAndAssetNetEffects, createOverlayStateDB, executeContractNft, executeCrossChainPurchaseBlock, executeTransactionBlock, extractStateFootprint, hasStateConflict, isExecuteAssetStatement, resolveEffectiveResourceBudget, resolveStatementReferences, scheduleParallelBatches, verifyTransactionBlockPostConditions } from "./transaction-block.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { DEPRECATED_LEGACY_PROTOCOL_TYPE_URLS, DEPRECATED_MIOTX_AND_TRADE_TYPE_URLS, DEPRECATED_MIOTX_PROTOCOL_TYPE_URLS, DEPRECATED_ROLLUP_AND_BRIDGE_TYPE_URLS, DEPRECATED_VERSIONED_ASSET_TYPE_URLS, DOMAIN_COUPLED_PROTOCOL_ALIAS_MAP, LegacyProtocolCompatibilityAddon, MAX_LEGACY_MIOTX_ASSETS_PER_ENTRY, MAX_LEGACY_MIOTX_PARTICIPANTS, MAX_LEGACY_MIOTX_TOKENS_PER_ENTRY, VNEXT_CANONICAL_WRITE_PROTOCOL_TYPE_URLS, assertLegacyProtocolNotSunset, assertTransactionBlockVNextPure, compileLegacyTxToVNextTransactionBlock, executeVNextTransactionBlock, getLegacyProtocolReplacementSpec, isDeprecatedLegacyWriteProtocol, isDomainCoupledProtocolAlias, isMiotxLegacyProtocol, isVNextCanonicalWriteProtocol, normalizeProtocolTypeUrl, parseLegacyTxReadOnlyArchiveRecord, resolveDomainAgnosticVNextProtocol } from "./legacy-protocol-sunset.mjs";
|
|
9
9
|
import { CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_GRADUATION_RESERVE_ABT, DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS, DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT, DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, DEFAULT_NFT_PROTOCOL_FEE_BPS, DEFAULT_NFT_UI_REFERRER_FEE_BPS, DEFAULT_OFFICIAL_TOKEN_ADDRESS, DEFAULT_PROTOCOL_FEE_SHARE_BPS, DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT, DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, DEFAULT_SKU_QUALITY_BASE_STAKE_ABT, DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS, HARD_MAX_SWAP_PRICE_IMPACT_BPS, MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR, MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS, MAX_ESCALATING_PROMOTER_REBATE_BPS, MAX_ESCALATING_PROMOTER_TIERS, MAX_EXCHANGE_SWAP_FEE_BPS, MAX_FT_ISSUANCE_FEE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PROTOCOL_FEE_SHARE_BPS, MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT, MAX_TRACKED_CURVE_HOLDERS, MAX_VALUE_CARD_ALLOWED_MERCHANTS, MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS, MAX_VALUE_CARD_ATTRIBUTION_HOPS, MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS, MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, MINIMUM_LOCKED_AMM_LIQUIDITY, MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MIN_FT_ISSUANCE_FEE_ABT, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, OcapNativeAbtExchangeEngine, OcapNativeExchangeEngine, computeOpenComposingRuleVcDigest, computeSelfBridgeDisclaimerDigest, computeStakeAddress, deriveSkuQualityStakeAddress, deriveValueCardDistributorStakeAddress, evaluateNftAttributePredicates, integerSqrtBn, issueOpenComposingRuleVc, resolveEscalatingPromoterBps, verifyOpenComposingRuleVc } from "./native-abt-exchange.mjs";
|
|
10
10
|
import { DEFAULT_ISSUER_STAGING_TTL_EPOCHS, MAX_ISSUER_STAGING_TTL_EPOCHS, MAX_SOVEREIGN_NFT_FACTORY_SUPPLY, OcapSocialEconomyFactoryRegistry, deriveSovereignNftDid } from "./social-economy-factories.mjs";
|
|
11
11
|
import { BPS_DENOMINATOR, DEFAULT_ABT_TOKEN_ADDRESS, IBO_DIVIDEND_PRECISION, MAX_ARCADE_HOUSE_SPLIT_BPS, MAX_ARCADE_WINNERS_PER_ROUND, MAX_ATTENTION_STAMP_TTL_EPOCHS, MAX_IBO_TOTAL_FEE_SPLIT_BPS, MAX_PREPAID_CARD_ALLOWED_PROVIDERS, MAX_SPACE_DISPLAYED_STICKERS, MAX_SPACE_PLACED_MACHINES, MAX_STICKER_ROYALTY_BPS, MIN_ARCADE_HOUSE_SPLIT_BPS, MIN_ATTENTION_STAMP_ABT, OcapSuperSuitesFoundationEngine, computeArcadeCommitDigest, computeSpaceManifestRootDigest } from "./super-suites-foundation.mjs";
|
|
@@ -14,4 +14,4 @@ import { DEFAULT_LP_JITTER_WINDOW_BLOCKS, DEFAULT_LP_REBALANCE_COOLDOWN_BLOCKS,
|
|
|
14
14
|
import { CANONICAL_LP_BURN_DEAD_ADDRESS, MAX_MINT_RATIO_PER_RESERVE_UNIT, MIN_CREATOR_VESTING_CLIFF_BLOCKS, OcapTokenFactoryGraduationEngine, computeDeterministicV4GraduationPoolId } from "./uniswap-token-factory-graduation.mjs";
|
|
15
15
|
import { DEFAULT_MIN_HOLDING_BLOCKS, MAX_HOOK_TICKET_TTL_SECONDS, MAX_V4_DYNAMIC_FEE_BPS, MIN_LP_MEV_REBATE_SHARE_BPS, OCAP_VERIFIED_HOOK_SOLIDITY_SPEC, OcapVerifiedHookEngine, assertZeroPiiInHookData, computeOcapHookTicketDigest, issueOcapHookTicket, verifyOcapHookTicketSignature } from "./uniswap-v4-hook.mjs";
|
|
16
16
|
|
|
17
|
-
export { ABT_DECIMALS_SCALE, BPS_DENOMINATOR, CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_LP_BURN_DEAD_ADDRESS, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, CHAINALYSIS_OFAC_ORACLE_ADDRESS, CONTRACT_NFT_KIND, DEFAULT_ABT_TOKEN_ADDRESS, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_ISSUER_STAGING_TTL_EPOCHS, DEFAULT_KARMA_TOKEN_ADDRESS,
|
|
17
|
+
export { ABT_DECIMALS_SCALE, BPS_DENOMINATOR, CANONICAL_ABT_EXCHANGE_BURN_SINK_DID, CANONICAL_LP_BURN_DEAD_ADDRESS, CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER, CHAINALYSIS_OFAC_ORACLE_ADDRESS, CONTRACT_NFT_KIND, DEFAULT_ABT_TOKEN_ADDRESS, DEFAULT_ANTI_SNIPE_WINDOW_SECONDS, DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, DEFAULT_EPOCH_KARMA_ALLOWANCE, DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_ISSUER_STAGING_TTL_EPOCHS, DEFAULT_KARMA_TOKEN_ADDRESS, DEFAULT_LP_JITTER_WINDOW_BLOCKS, DEFAULT_LP_REBALANCE_COOLDOWN_BLOCKS, DEFAULT_MAX_HISTORICAL_KARMA_CLAIM, DEFAULT_MAX_ROLLUP_BLOCK_SIZE, DEFAULT_MAX_STATEMENTS_PER_HOT_KEY_PER_BLOCK, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MAX_SWEEP_BATCH_SIZE, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_GRADUATION_RESERVE_ABT, DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS, DEFAULT_MIN_HOLDING_BLOCKS, DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT, DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, DEFAULT_NFT_PROTOCOL_FEE_BPS, DEFAULT_NFT_UI_REFERRER_FEE_BPS, DEFAULT_OCAP_INTEGRATOR_ID, DEFAULT_OFFICIAL_TOKEN_ADDRESS, DEFAULT_PROTOCOL_FEE_SHARE_BPS, DEFAULT_SELECTED_TREASURY_CURRENCY_SYMBOLS, DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT, DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, DEFAULT_SKU_QUALITY_BASE_STAKE_ABT, DEFAULT_SPONSORED_BADGE_MINT_QUOTA, DEFAULT_USD_QUOTE_TTL_SECONDS, DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS, DEPRECATED_LEGACY_PROTOCOL_TYPE_URLS, DEPRECATED_MIOTX_AND_TRADE_TYPE_URLS, DEPRECATED_MIOTX_PROTOCOL_TYPE_URLS, DEPRECATED_ROLLUP_AND_BRIDGE_TYPE_URLS, DEPRECATED_ROLLUP_PROTOCOL_TYPE_URLS, DEPRECATED_VERSIONED_ASSET_TYPE_URLS, DOMAIN_COUPLED_PROTOCOL_ALIAS_MAP, DirectBuyTreasuryCashier, FORBIDDEN_EXTERNAL_CALL_SELECTORS, GIVE_TO_MINT_TOKEN_TYPE, HARD_MAX_SWAP_PRICE_IMPACT_BPS, HARD_MAX_TX_BLOCK_STATEMENTS, HISTORICAL_CLAIM_TRUST_BOOST_BPS, IBO_DIVIDEND_PRECISION, LegacyProtocolCompatibilityAddon, MAX_ACTIVE_INTENTS_PER_USER, MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR, MAX_ACTIVE_SPONSORED_BADGE_MINT_QUOTA, MAX_ALLOWED_ZAP_SLIPPAGE_BPS, MAX_ARCADE_HOUSE_SPLIT_BPS, MAX_ARCADE_WINNERS_PER_ROUND, MAX_ATTENTION_STAMP_TTL_EPOCHS, MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MAX_CHECKPOINT_VOUCHERS_PER_BATCH, MAX_CONTRACT_ARGS_BYTES, MAX_CONTRACT_FOOTPRINT_KEYS, MAX_CONTRACT_NFT_STATEMENTS, MAX_CUSTOM_TOKEN_EPOCH_ALLOWANCE, MAX_CUSTOM_TOKEN_HISTORICAL_CLAIM_CAP, MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS, MAX_EPOCH_FORWARD_DRIFT, MAX_ESCALATING_PROMOTER_REBATE_BPS, MAX_ESCALATING_PROMOTER_TIERS, MAX_EXCHANGE_SWAP_FEE_BPS, MAX_EXECUTE_ASSET_CALLS_PER_BLOCK, MAX_EXECUTE_ASSET_DEPTH, MAX_FREE_RELAY_CREDITS_PER_EPOCH, MAX_FT_ISSUANCE_FEE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_HARVEST_YIELD_BPS, MAX_HISTORICAL_KARMA_PER_VERIFIED_ITEM, MAX_HOOK_TICKET_TTL_SECONDS, MAX_IBO_TOTAL_FEE_SPLIT_BPS, MAX_INTENT_TIMEOUT_BLOCKS, MAX_ISSUER_STAGING_TTL_EPOCHS, MAX_LEGACY_MIOTX_ASSETS_PER_ENTRY, MAX_LEGACY_MIOTX_PARTICIPANTS, MAX_LEGACY_MIOTX_TOKENS_PER_ENTRY, MAX_LP_REBALANCE_SLIPPAGE_BPS, MAX_MINT_RATIO_PER_RESERVE_UNIT, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PREPAID_CARD_ALLOWED_PROVIDERS, MAX_PROTOCOL_FEE_SHARE_BPS, MAX_ROUTE_PATH_LENGTH, MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS, MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT, MAX_SOVEREIGN_NFT_FACTORY_SUPPLY, MAX_SPACE_DISPLAYED_STICKERS, MAX_SPACE_PLACED_MACHINES, MAX_SPONSORED_BADGE_MINT_QUOTA_PER_GRANT, MAX_STICKER_ROYALTY_BPS, MAX_TOTAL_CITATION_SHARE_BPS, MAX_TRACKED_CURVE_HOLDERS, MAX_TRACKED_DIRECT_BUY_EVIDENCES, MAX_TX_BLOCK_BYTES, MAX_TX_BLOCK_READ_KEYS, MAX_TX_BLOCK_STATE_DIFF_ENTRIES, MAX_TX_BLOCK_TOP_LEVEL_STATEMENTS, MAX_TX_BLOCK_TOTAL_EXPANDED_STATEMENTS, MAX_TX_BLOCK_WRITE_KEYS, MAX_UNISWAP_TICK, MAX_UPSTREAM_CITATIONS, MAX_USD_QUOTE_TTL_SECONDS, MAX_V4_DYNAMIC_FEE_BPS, MAX_VALUE_CARD_ALLOWED_MERCHANTS, MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS, MAX_VALUE_CARD_ATTRIBUTION_HOPS, MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS, MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT, MAX_VAULT_STRATEGY_DEPLOYED_BPS, MAX_ZAP_ABT_PER_SETTLEMENT_SCALAR, MAX_ZAP_PRICE_IMPACT_BPS, MINIMUM_LOCKED_AMM_LIQUIDITY, MIN_ARCADE_HOUSE_SPLIT_BPS, MIN_ATTENTION_STAMP_ABT, MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT, MIN_CREATOR_VESTING_CLIFF_BLOCKS, MIN_FT_ISSUANCE_FEE_ABT, MIN_GIVE_TO_MINT_DUST_FLOOR, MIN_GIVE_TO_MINT_TOKEN_CREATION_FEE, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, MIN_KARMA_FOR_THANK_YOU_BADGE, MIN_LP_MEV_REBATE_SHARE_BPS, MIN_RECOMMENDED_SOLVER_SHARDS, MIN_UNISWAP_TICK, MIN_VAULT_LIQUID_BUFFER_BPS, OCAP_VERIFIED_HOOK_SOLIDITY_SPEC, OcapArcVaultExternalAdapterEngine, OcapErc7683SolverEngine, OcapGiveToMintEngine, OcapNativeAbtExchangeEngine, OcapNativeExchangeEngine, OcapSocialEconomyFactoryRegistry, OcapSovereignAppChainHubEngine, OcapSuperSuitesFoundationEngine, OcapTokenFactoryGraduationEngine, OcapVerifiedHookEngine, OverlayStateDB, RECIPROCAL_RING_DAMPING_BPS, StagedSyncPipeline, TwoPhaseCommitCoordinator, TwoPhaseTransferLedger, UNIVERSAL_ROUTER_COMMANDS, VNEXT_CANONICAL_WRITE_PROTOCOL_TYPE_URLS, ZERO_BYTES32_HASH, assertLeafStatementTemplateOnly, assertLegacyProtocolNotSunset, assertNotOfacSanctioned, assertRollupProtocolNotSunset, assertTransactionBlockResourceBudget, assertTransactionBlockVNextPure, assertZeroPiiInHookData, buildAbtUtilityPassThroughPlan, buildDirectBuyTreasuryCashierPlan, buildNonCustodialLpContractNft, buildOutboundWithdrawAndSwapPlan, buildUniversalRouterCrossChainPayload, buildWalletClearSigningPreview, compileLegacyTxToVNextTransactionBlock, computeAccountAndAssetNetEffects, computeArcSpaceCheckpointRoot, computeArcSpaceVoucherDigest, computeArcadeCommitDigest, computeDeterministicRebalanceSlot, computeDeterministicV4GraduationPoolId, computeEvmBridgeBlockHash, computeEvmBridgeTxsHash, computeHistoricalClaimNullifier, computeNftPayloadCommitmentDigest, computeOcapHookTicketDigest, computeOpenComposingRuleVcDigest, computeSelfBridgeDisclaimerDigest, computeSpaceManifestRootDigest, computeStakeAddress, computeVLedgerCheckpointStateRoot, createOverlayStateDB, createUsdAnchoredAbtQuote, deriveCompanionMedalDid, deriveSkuQualityStakeAddress, deriveSovereignNftDid, deriveSovereignVaultDid, deriveThankYouBadgeDid, deriveValueCardDistributorStakeAddress, evaluateNftAttributePredicates, executeContractNft, executeCrossChainPurchaseBlock, executeNonCustodialLpRebalance, executeTransactionBlock, executeVNextTransactionBlock, extractStateFootprint, getLegacyProtocolReplacementSpec, hasStateConflict, integerSqrtBn, isDeprecatedLegacyWriteProtocol, isDeprecatedRollupWriteProtocol, isDomainCoupledProtocolAlias, isExecuteAssetStatement, isMiotxLegacyProtocol, isVNextCanonicalWriteProtocol, issueOcapHookTicket, issueOpenComposingRuleVc, normalizeProtocolTypeUrl, normalizeScreeningAddress, parseLegacyRollupReadOnlyRecord, parseLegacyTxReadOnlyArchiveRecord, resolveDomainAgnosticVNextProtocol, resolveEffectiveResourceBudget, resolveEscalatingPromoterBps, resolveStatementReferences, rollupBranchOf, scheduleParallelBatches, selectSolverSubVaultShard, verifyOcapHookTicketSignature, verifyOpenComposingRuleVc, verifyTransactionBlockPostConditions, verifyUsdAnchoredAbtQuote };
|
|
@@ -2,7 +2,6 @@ import { BridgeReserveResolution } from "../bridge-reserves.mjs";
|
|
|
2
2
|
import { BN } from "@ocap/util";
|
|
3
3
|
|
|
4
4
|
//#region src/pipes/bridge-release-gate.d.ts
|
|
5
|
-
|
|
6
5
|
type Rec = Record<string, unknown>;
|
|
7
6
|
type Bn = InstanceType<typeof BN>;
|
|
8
7
|
interface BridgeReleaseGateInput {
|
|
@@ -25,6 +24,8 @@ interface BridgeReleaseGateInput {
|
|
|
25
24
|
vaults: Set<string>;
|
|
26
25
|
resolution?: BridgeReserveResolution | null;
|
|
27
26
|
}
|
|
27
|
+
/** the bridge record kind a row reads as, or null */
|
|
28
|
+
declare const bridgeRecordKind: (row: Rec | null | undefined) => string | null;
|
|
28
29
|
declare function assertBridgeReleaseProtected(input: BridgeReleaseGateInput): void;
|
|
29
30
|
//#endregion
|
|
30
|
-
export { BridgeReleaseGateInput, assertBridgeReleaseProtected };
|
|
31
|
+
export { BridgeReleaseGateInput, assertBridgeReleaseProtected, bridgeRecordKind };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getReleaseTombstoneKey, identifyBucketRow } from "../bridge-release-keys.mjs";
|
|
2
|
-
import { bareAddress } from "../bridge-reserves.mjs";
|
|
1
|
+
import { getReleaseTombstoneKey, identifyBucketRow, isV1EvidenceRow } from "../bridge-release-keys.mjs";
|
|
2
|
+
import { bareAddress, isNamedBridgeRelease } from "../bridge-reserves.mjs";
|
|
3
|
+
import { inBridgeReleaseKeySpace } from "@ocap/mcrypto";
|
|
3
4
|
import { BN } from "@ocap/util";
|
|
4
5
|
import isEqual from "lodash/isEqual.js";
|
|
5
6
|
|
|
@@ -7,13 +8,20 @@ import isEqual from "lodash/isEqual.js";
|
|
|
7
8
|
/**
|
|
8
9
|
* Gate rules of the release primitive (#1466, bridge/docs/ocap-protocols.md §3 and §v2.4): R4 and the ownership of the
|
|
9
10
|
* release-window buckets. R1-R3 and R5 for the reserves themselves live in `bridge-reserve-v2-gate.ts`; this file only
|
|
10
|
-
* adds what is specific to `
|
|
11
|
+
* adds what is specific to a bridge release (`deposit_token_v2` with kind 1/2/3).
|
|
11
12
|
*
|
|
12
|
-
* - **Ownership
|
|
13
|
-
*
|
|
14
|
-
* bridge
|
|
15
|
-
*
|
|
16
|
-
*
|
|
13
|
+
* - **Ownership of the release key space (#1680).** Tombstones (`rt:`) and buckets (`rb:`) live in a self-identifying key
|
|
14
|
+
* space no `patterns.txHash` key can reach (`@ocap/mcrypto` `inBridgeReleaseKeySpace`). Every tx type but
|
|
15
|
+
* a bridge release is refused any write in it, recognised by the KEY alone, whatever the row's data; a bucket is
|
|
16
|
+
* also recognised by what it says about itself (`identifyBucketRow`). A release writes in that space only its own
|
|
17
|
+
* tombstone and the one bucket it uses.
|
|
18
|
+
* - **Ownership of the other bridge records (#1680, #1505 L2).** Membership tombstones and the gateway / token / reserve
|
|
19
|
+
* index rows keep keccak `0x` keys, which a legacy v1 tx CAN name. They are safe because a row there counts only when
|
|
20
|
+
* it reads as a genuine bridge record (`data.type = json`, a bridge `kind`); any other row is overwritten by its owner.
|
|
21
|
+
* So no protocol may write caller-supplied data at a caller-supplied key that reads as one: a row that reads as a
|
|
22
|
+
* bridge record may be written (or overwritten) only by the tx types that own that record.
|
|
23
|
+
* - **R4, accounting.** A release debits exactly the reserve it is entitled to (the reserve of `itx.rollup`; for a REFUND
|
|
24
|
+
* of a migrated bridge the reserve that holds the funds now) by exactly `itx.token.value` of the bridge token, and credits
|
|
17
25
|
* exactly one account, `itx.to`, by the same amount. The only other balance movement is the gas: the vaults gain it and
|
|
18
26
|
* the sender (`tx.from`) pays it, to the unit.
|
|
19
27
|
* - **Records.** A release creates its tombstone and writes exactly one bucket of the ring of its kind, for its own
|
|
@@ -23,6 +31,40 @@ import isEqual from "lodash/isEqual.js";
|
|
|
23
31
|
*/
|
|
24
32
|
const ZERO = new BN(0);
|
|
25
33
|
const CANONICAL_UINT = /^(?:0|[1-9]\d*)$/;
|
|
34
|
+
/**
|
|
35
|
+
* Whether `txType` / `itx` is a release that owns the release key space and is accounted by R4: `deposit_token_v2` with
|
|
36
|
+
* `kind ∈ {1,2,3}` naming its bridge in `itx.rollup` (`isNamedBridgeRelease`). A v1 deposit (`kind == 0`), or a bridge
|
|
37
|
+
* kind that names no bridge, owns nothing here.
|
|
38
|
+
*/
|
|
39
|
+
const isReleaseForm = (txType, itx) => isNamedBridgeRelease(txType, itx);
|
|
40
|
+
/** The release fields: the deposit fields, reused (`rollup`, `token.value`, `evidence.hash`, `token.address`). */
|
|
41
|
+
const releaseFieldsOf = (itx) => {
|
|
42
|
+
const token = itx.token ?? {};
|
|
43
|
+
const evidence = itx.evidence ?? {};
|
|
44
|
+
return {
|
|
45
|
+
label: "deposit_token_v2 (bridge release)",
|
|
46
|
+
bridge: itx.rollup,
|
|
47
|
+
amount: token.value,
|
|
48
|
+
evidence: evidence.hash,
|
|
49
|
+
token: token.address
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
/** owners of the hex-keyed bridge records, by `data.value.kind` (#1505 L2 rows, membership tombstones) */
|
|
53
|
+
const BRIDGE_RECORD_OWNERS = {
|
|
54
|
+
"bridge-join": new Set(["join_rollup", "leave_rollup"]),
|
|
55
|
+
"bridge-leave": new Set(["join_rollup", "leave_rollup"]),
|
|
56
|
+
"bridge-gateway": new Set(["create_rollup", "close_rollup"]),
|
|
57
|
+
"bridge-token": new Set(["create_rollup", "close_rollup"]),
|
|
58
|
+
"bridge-reserve": new Set(["create_rollup"])
|
|
59
|
+
};
|
|
60
|
+
const MEMBERSHIP_KINDS = new Set(["bridge-join", "bridge-leave"]);
|
|
61
|
+
/** the bridge record kind a row reads as, or null */
|
|
62
|
+
const bridgeRecordKind = (row) => {
|
|
63
|
+
const data = row?.data;
|
|
64
|
+
if (!data || typeof data !== "object" || data.type !== "json") return null;
|
|
65
|
+
const kind = data.value && typeof data.value === "object" ? data.value.kind : void 0;
|
|
66
|
+
return typeof kind === "string" && Object.prototype.hasOwnProperty.call(BRIDGE_RECORD_OWNERS, kind) ? kind : null;
|
|
67
|
+
};
|
|
26
68
|
const bodyOf = (row) => {
|
|
27
69
|
const v = (row?.data)?.value;
|
|
28
70
|
return v && typeof v === "object" ? v : null;
|
|
@@ -31,34 +73,45 @@ function assertBridgeReleaseProtected(input) {
|
|
|
31
73
|
const { txType, itx, norm, createGateError } = input;
|
|
32
74
|
const violation = (code, message) => createGateError(code, `Post-Execution Invariant Gate: ${message}`);
|
|
33
75
|
const writtenEvidence = input.written("evidence") ?? /* @__PURE__ */ new Set();
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
76
|
+
for (const key of writtenEvidence) {
|
|
77
|
+
const row = input.after.get("evidence")?.get(key) ?? input.before.get("evidence")?.get(key) ?? null;
|
|
78
|
+
const prior = input.before.get("evidence")?.get(key) ?? null;
|
|
79
|
+
const rowKind = bridgeRecordKind(row);
|
|
80
|
+
const priorKind = bridgeRecordKind(prior);
|
|
81
|
+
for (const kind$1 of [rowKind, priorKind]) if (kind$1 && !BRIDGE_RECORD_OWNERS[kind$1]?.has(txType)) throw violation("BRIDGE_RECORD_FORBIDDEN", `evidence ${key} reads as a ${kind$1} record, which a ${txType || "unknown"} tx may not write`);
|
|
82
|
+
if (priorKind && !rowKind) throw violation("BRIDGE_RECORD_FORBIDDEN", `the ${priorKind} record ${key} may only be replaced by a record of its own kind, never by other data`);
|
|
83
|
+
if (rowKind && prior) {
|
|
84
|
+
if (!(priorKind === rowKind && !MEMBERSHIP_KINDS.has(rowKind)) && !isV1EvidenceRow(prior)) throw violation("BRIDGE_RECORD_FORBIDDEN", `a ${rowKind} record may not replace the existing evidence row ${key} (only a v1-planted row or a ${rowKind} index entry)`);
|
|
39
85
|
}
|
|
40
|
-
|
|
86
|
+
if (isReleaseForm(txType, itx)) continue;
|
|
87
|
+
if (identifyBucketRow(row) || identifyBucketRow(prior) || /^rb:/i.test(String(key).trim())) throw violation("BRIDGE_RELEASE_BUCKET_FORBIDDEN", `release-window bucket ${key} may only be written by a deposit_token_v2 bridge release, not a ${txType || "unknown"} tx`);
|
|
88
|
+
if (inBridgeReleaseKeySpace(key)) throw violation("BRIDGE_RELEASE_TOMBSTONE_FORBIDDEN", `release tombstone ${key} may only be written by a deposit_token_v2 bridge release, not a ${txType || "unknown"} tx`);
|
|
41
89
|
}
|
|
90
|
+
if (!isReleaseForm(txType, itx)) return;
|
|
42
91
|
const R4 = (message) => violation("BRIDGE_RELEASE_ACCOUNTING_VIOLATION", message);
|
|
92
|
+
const fields = releaseFieldsOf(itx);
|
|
93
|
+
const label = fields.label;
|
|
43
94
|
const release = input.resolution?.release ?? null;
|
|
44
|
-
if (!release) throw R4(
|
|
95
|
+
if (!release) throw R4(`${label} names no existing bridge (itx.rollup)`);
|
|
96
|
+
if (typeof fields.bridge !== "string" || release.bridge.address !== fields.bridge) throw R4(`${label} names bridge ${String(fields.bridge)}, not the resolved bridge ${release.bridge.address}`);
|
|
45
97
|
const kind = Number(itx.kind);
|
|
46
98
|
if (![
|
|
47
99
|
1,
|
|
48
100
|
2,
|
|
49
101
|
3
|
|
50
|
-
].includes(kind)) throw R4(
|
|
51
|
-
if (typeof
|
|
52
|
-
const amount = new BN(
|
|
53
|
-
if (amount.isZero()) throw R4(
|
|
102
|
+
].includes(kind)) throw R4(`${label} has an unknown kind`);
|
|
103
|
+
if (typeof fields.amount !== "string" || !CANONICAL_UINT.test(fields.amount)) throw R4(`${label} amount must be a canonical decimal string`);
|
|
104
|
+
const amount = new BN(fields.amount, 10);
|
|
105
|
+
if (amount.isZero()) throw R4(`${label} amount must be positive`);
|
|
54
106
|
const toKey = norm(itx.to);
|
|
55
|
-
if (!toKey || input.isReserveAddress(toKey)) throw R4(
|
|
56
|
-
if (input.vaults.has(toKey)) throw R4(
|
|
107
|
+
if (!toKey || input.isReserveAddress(toKey)) throw R4(`${label} recipient must not be a bridge reserve`);
|
|
108
|
+
if (input.vaults.has(toKey)) throw R4(`${label} recipient must not be a vault`);
|
|
57
109
|
const expectedReserve = norm(kind === 2 ? release.fundsReserve : release.reserve);
|
|
58
110
|
const owner = release.debitable.get(bareAddress(kind === 2 ? release.fundsReserve : release.reserve));
|
|
59
|
-
if (!owner) throw R4(
|
|
111
|
+
if (!owner) throw R4(`${label} does not resolve the reserve it must debit`);
|
|
60
112
|
const tokenKey = norm(owner.token);
|
|
61
|
-
if (!tokenKey) throw R4(
|
|
113
|
+
if (!tokenKey) throw R4(`${label} has no bridge token`);
|
|
114
|
+
if (typeof fields.token !== "string" || fields.token !== release.bridge.token) throw R4(`${label} names token ${String(fields.token)}, not the bridge token ${release.bridge.token}`);
|
|
62
115
|
for (const table of [
|
|
63
116
|
"stake",
|
|
64
117
|
"token",
|
|
@@ -67,8 +120,8 @@ function assertBridgeReleaseProtected(input) {
|
|
|
67
120
|
"factory",
|
|
68
121
|
"delegation",
|
|
69
122
|
"rollupBlock"
|
|
70
|
-
]) if ((input.written(table)?.size || 0) > 0) throw R4(
|
|
71
|
-
if (input.directBalanceWrites.length > 0 || (input.written("balance")?.size || 0) > 0) throw R4(
|
|
123
|
+
]) if ((input.written(table)?.size || 0) > 0) throw R4(`${label} must not write ${table} records`);
|
|
124
|
+
if (input.directBalanceWrites.length > 0 || (input.written("balance")?.size || 0) > 0) throw R4(`${label} must not write the balance table directly`);
|
|
72
125
|
const officialKey = input.officialToken;
|
|
73
126
|
const beforeAccounts = input.before.get("account") ?? /* @__PURE__ */ new Map();
|
|
74
127
|
const afterAccounts = input.after.get("account") ?? /* @__PURE__ */ new Map();
|
|
@@ -86,7 +139,7 @@ function assertBridgeReleaseProtected(input) {
|
|
|
86
139
|
const deltaOf = (addr, tok) => actual.get(addr)?.get(tok) ?? ZERO;
|
|
87
140
|
let gas = ZERO;
|
|
88
141
|
for (const vault of input.vaults) for (const [tok, d] of actual.get(vault) ?? []) {
|
|
89
|
-
if (tok !== officialKey || d.isNeg()) throw R4(
|
|
142
|
+
if (tok !== officialKey || d.isNeg()) throw R4(`${label} may only credit vault ${vault} with the gas`);
|
|
90
143
|
gas = gas.add(d);
|
|
91
144
|
}
|
|
92
145
|
const expected = /* @__PURE__ */ new Map();
|
|
@@ -102,19 +155,21 @@ function assertBridgeReleaseProtected(input) {
|
|
|
102
155
|
if (input.vaults.has(addr)) continue;
|
|
103
156
|
for (const tok of new Set([...actual.get(addr)?.keys() ?? [], ...expected.get(addr)?.keys() ?? []])) {
|
|
104
157
|
const want = expected.get(addr)?.get(tok) ?? ZERO;
|
|
105
|
-
if (!deltaOf(addr, tok).eq(want)) throw R4(
|
|
158
|
+
if (!deltaOf(addr, tok).eq(want)) throw R4(`${label} moved ${deltaOf(addr, tok).toString(10)} of ${tok} for ${addr}, expected ${want.toString(10)} (reserve -${amount.toString(10)}, recipient +${amount.toString(10)}, sender -gas)`);
|
|
106
159
|
}
|
|
107
160
|
}
|
|
108
|
-
const tombstone = getReleaseTombstoneKey(String(
|
|
109
|
-
if (!writtenEvidence.has(tombstone) || input.before.get("evidence")?.get(tombstone)) throw R4(
|
|
161
|
+
const tombstone = getReleaseTombstoneKey(String(fields.bridge), kind, String(fields.evidence || ""), Number(itx.ordinal));
|
|
162
|
+
if (!writtenEvidence.has(tombstone) || input.before.get("evidence")?.get(tombstone)) throw R4(`${label} must create its tombstone`);
|
|
110
163
|
const ring = kind === 2 ? "refund" : "deposit";
|
|
111
164
|
const buckets = [...writtenEvidence].filter((k) => identifyBucketRow(input.after.get("evidence")?.get(k)) !== null);
|
|
112
165
|
const bucket = buckets.length === 1 ? identifyBucketRow(input.after.get("evidence")?.get(buckets[0])) : null;
|
|
113
|
-
if (!bucket || bucket.bridge !== String(
|
|
166
|
+
if (!bucket || bucket.bridge !== String(fields.bridge) || bucket.ring !== ring) throw R4(`${label} must write exactly one ${ring} release-window bucket of bridge ${String(fields.bridge)}, wrote ${buckets.length}`);
|
|
167
|
+
const stray = [...writtenEvidence].filter((k) => inBridgeReleaseKeySpace(k) && k !== tombstone && k !== buckets[0]);
|
|
168
|
+
if (stray.length > 0) throw R4(`${label} may write only its tombstone and one bucket in the release key space, also wrote ${stray[0]}`);
|
|
114
169
|
const ledgerBridges = kind === 2 ? [...release.debitable.values()].filter((b) => b.reserve !== release.fundsReserve).map((b) => b.address) : [];
|
|
115
170
|
const writtenRollups = [...input.written("rollup") ?? []];
|
|
116
171
|
const expectedRows = new Set(ledgerBridges.map((a) => bareAddress(a)));
|
|
117
|
-
if (writtenRollups.length !== expectedRows.size || writtenRollups.some((k) => !expectedRows.has(bareAddress(k)))) throw R4(
|
|
172
|
+
if (writtenRollups.length !== expectedRows.size || writtenRollups.some((k) => !expectedRows.has(bareAddress(k)))) throw R4(`${label} may write only the refund ledger of the migrated bridges it draws through`);
|
|
118
173
|
for (const key of writtenRollups) {
|
|
119
174
|
const prior = [...input.before.get("rollup")?.entries() ?? []].find(([k]) => bareAddress(k) === bareAddress(key));
|
|
120
175
|
const next = [...input.after.get("rollup")?.entries() ?? []].find(([k]) => bareAddress(k) === bareAddress(key));
|
|
@@ -122,8 +177,8 @@ function assertBridgeReleaseProtected(input) {
|
|
|
122
177
|
const nb = bodyOf(next?.[1]);
|
|
123
178
|
const oldAmount = pb?.migratedAmount;
|
|
124
179
|
const newAmount = nb?.migratedAmount;
|
|
125
|
-
if (!pb || !nb || typeof oldAmount !== "string" || typeof newAmount !== "string") throw R4(
|
|
126
|
-
if (!CANONICAL_UINT.test(oldAmount) || !CANONICAL_UINT.test(newAmount) || !new BN(oldAmount, 10).sub(amount).eq(new BN(newAmount, 10)) || new BN(oldAmount, 10).lt(amount)) throw R4(
|
|
180
|
+
if (!pb || !nb || typeof oldAmount !== "string" || typeof newAmount !== "string") throw R4(`${label} needs a recorded refund ledger (migratedAmount) on migrated bridge ${key}`);
|
|
181
|
+
if (!CANONICAL_UINT.test(oldAmount) || !CANONICAL_UINT.test(newAmount) || !new BN(oldAmount, 10).sub(amount).eq(new BN(newAmount, 10)) || new BN(oldAmount, 10).lt(amount)) throw R4(`${label} must lower the refund ledger of ${key} by exactly ${amount.toString(10)}`);
|
|
127
182
|
const strip = (row) => {
|
|
128
183
|
const { context: _context, data, ...rest } = row ?? {};
|
|
129
184
|
const { migratedAmount: _ma, ...body } = bodyOf(row) ?? {};
|
|
@@ -135,9 +190,9 @@ function assertBridgeReleaseProtected(input) {
|
|
|
135
190
|
}
|
|
136
191
|
};
|
|
137
192
|
};
|
|
138
|
-
if (!isEqual(strip(prior?.[1]), strip(next?.[1]))) throw R4(
|
|
193
|
+
if (!isEqual(strip(prior?.[1]), strip(next?.[1]))) throw R4(`${label} may change only the refund ledger of bridge ${key}`);
|
|
139
194
|
}
|
|
140
195
|
}
|
|
141
196
|
|
|
142
197
|
//#endregion
|
|
143
|
-
export { assertBridgeReleaseProtected };
|
|
198
|
+
export { assertBridgeReleaseProtected, bridgeRecordKind };
|
|
@@ -33,6 +33,8 @@ interface BridgeReserveV2GateInput {
|
|
|
33
33
|
resolution?: BridgeReserveResolution | null;
|
|
34
34
|
/** `itx.kind` of a release (2 = REFUND may follow the `migratedTo` chain) */
|
|
35
35
|
releaseKind?: unknown;
|
|
36
|
+
/** the itx: a `deposit_token_v2` is a release only with `kind ∈ {1,2,3}` (`isBridgeRelease`) */
|
|
37
|
+
itx?: Rec | null;
|
|
36
38
|
/**
|
|
37
39
|
* Defence in depth for R2 (#1465): validates the transaction as a withdraw into `bridge` (shape, range, recipient) and
|
|
38
40
|
* returns a message when it is not, or when the reserve grew by anything other than the withdrawn amount.
|