@ocap/tx-pipeline 1.30.26 → 1.31.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/esm/appchain-sovereign-hub.d.mts +160 -0
- package/esm/appchain-sovereign-hub.mjs +348 -0
- package/esm/arcvault-external-adapter.d.mts +166 -0
- package/esm/arcvault-external-adapter.mjs +376 -0
- package/esm/encrypted-nft-envelope.d.mts +172 -0
- package/esm/encrypted-nft-envelope.mjs +458 -0
- package/esm/evm-simplified-bridge.d.mts +1370 -0
- package/esm/evm-simplified-bridge.mjs +3875 -0
- package/esm/give-to-mint-karma.d.mts +472 -0
- package/esm/give-to-mint-karma.mjs +1057 -0
- package/esm/helpers/replay-guard.d.mts +15 -0
- package/esm/helpers/replay-guard.mjs +23 -0
- package/esm/index.d.mts +10 -5
- package/esm/index.mjs +14 -10
- package/esm/legacy-protocol-sunset.d.mts +251 -0
- package/esm/legacy-protocol-sunset.mjs +1519 -0
- package/esm/library.d.mts +16 -0
- package/esm/library.mjs +17 -0
- package/esm/native-abt-exchange.d.mts +2055 -0
- package/esm/native-abt-exchange.mjs +7250 -0
- package/esm/ofac-screening.d.mts +17 -0
- package/esm/ofac-screening.mjs +39 -0
- package/esm/pipes/anti-land-attack.mjs +1 -1
- package/esm/pipes/decode-itx.mjs +43 -4
- package/esm/pipes/decode-tx.d.mts +2 -3
- package/esm/pipes/decode-tx.mjs +53 -115
- package/esm/pipes/extract-signer.mjs +2 -2
- package/esm/pipes/extract-state.mjs +14 -3
- package/esm/pipes/post-execution-invariant-gate.d.mts +61 -0
- package/esm/pipes/post-execution-invariant-gate.mjs +789 -0
- package/esm/pipes/pre-flight-waf.d.mts +34 -0
- package/esm/pipes/pre-flight-waf.mjs +603 -0
- package/esm/pipes/take-state-snapshot.mjs +3 -2
- package/esm/pipes/update-owner.mjs +39 -4
- package/esm/pipes/verify-account-migration.mjs +14 -4
- package/esm/pipes/verify-blocked.mjs +1 -1
- package/esm/pipes/verify-delegation.d.mts +22 -3
- package/esm/pipes/verify-delegation.mjs +259 -36
- package/esm/pipes/verify-list-size.mjs +1 -1
- package/esm/pipes/verify-multisig-v2.mjs +15 -7
- package/esm/pipes/verify-multisig.mjs +15 -7
- package/esm/pipes/verify-sender.mjs +1 -1
- package/esm/pipes/verify-signature.mjs +35 -6
- package/esm/pipes/verify-signer.mjs +2 -2
- package/esm/pipes/verify-state-diff.mjs +3 -3
- package/esm/pipes/verify-token-access.mjs +1 -1
- package/esm/pipes/verify-token-balance.mjs +13 -5
- package/esm/pipes/verify-transferrable.d.mts +8 -1
- package/esm/pipes/verify-transferrable.mjs +3 -3
- package/esm/pipes/verify-tx-input.mjs +2 -2
- package/esm/pipes/verify-tx-size.mjs +46 -2
- package/esm/pipes/verify-tx.mjs +5 -7
- package/esm/pipes/verify-updater.mjs +1 -1
- package/esm/social-economy-factories.d.mts +346 -0
- package/esm/social-economy-factories.mjs +845 -0
- package/esm/super-suites-foundation.d.mts +513 -0
- package/esm/super-suites-foundation.mjs +1241 -0
- package/esm/transaction-block.d.mts +471 -0
- package/esm/transaction-block.mjs +1906 -0
- package/esm/uniswap-erc7683-solver.d.mts +201 -0
- package/esm/uniswap-erc7683-solver.mjs +321 -0
- package/esm/uniswap-lp-copilot.d.mts +113 -0
- package/esm/uniswap-lp-copilot.mjs +320 -0
- package/esm/uniswap-router.d.mts +335 -0
- package/esm/uniswap-router.mjs +578 -0
- package/esm/uniswap-token-factory-graduation.d.mts +187 -0
- package/esm/uniswap-token-factory-graduation.mjs +426 -0
- package/esm/uniswap-v4-hook.d.mts +173 -0
- package/esm/uniswap-v4-hook.mjs +517 -0
- package/lib/appchain-sovereign-hub.cjs +352 -0
- package/lib/appchain-sovereign-hub.d.cts +160 -0
- package/lib/arcvault-external-adapter.cjs +383 -0
- package/lib/arcvault-external-adapter.d.cts +166 -0
- package/lib/encrypted-nft-envelope.cjs +477 -0
- package/lib/encrypted-nft-envelope.d.cts +172 -0
- package/lib/evm-simplified-bridge.cjs +3943 -0
- package/lib/evm-simplified-bridge.d.cts +1370 -0
- package/lib/give-to-mint-karma.cjs +1084 -0
- package/lib/give-to-mint-karma.d.cts +472 -0
- package/lib/helpers/replay-guard.cjs +27 -0
- package/lib/helpers/replay-guard.d.cts +15 -0
- package/lib/index.cjs +49 -16
- package/lib/index.d.cts +10 -5
- package/lib/legacy-protocol-sunset.cjs +1543 -0
- package/lib/legacy-protocol-sunset.d.cts +251 -0
- package/lib/library.cjs +303 -0
- package/lib/library.d.cts +16 -0
- package/lib/native-abt-exchange.cjs +7322 -0
- package/lib/native-abt-exchange.d.cts +2055 -0
- package/lib/ofac-screening.cjs +42 -0
- package/lib/ofac-screening.d.cts +17 -0
- package/lib/pipes/anti-land-attack.cjs +2 -2
- package/lib/pipes/decode-itx.cjs +43 -4
- package/lib/pipes/decode-itx.d.cts +1 -1
- package/lib/pipes/decode-tx.cjs +52 -116
- package/lib/pipes/decode-tx.d.cts +3 -4
- package/lib/pipes/extract-signer.cjs +2 -2
- package/lib/pipes/extract-state.cjs +14 -3
- package/lib/pipes/post-execution-invariant-gate.cjs +800 -0
- package/lib/pipes/post-execution-invariant-gate.d.cts +61 -0
- package/lib/pipes/pre-flight-waf.cjs +616 -0
- package/lib/pipes/pre-flight-waf.d.cts +34 -0
- package/lib/pipes/take-state-snapshot.cjs +3 -2
- package/lib/pipes/update-owner.cjs +40 -5
- package/lib/pipes/update-owner.d.cts +1 -1
- package/lib/pipes/verify-account-migration.cjs +14 -4
- package/lib/pipes/verify-blocked.cjs +1 -1
- package/lib/pipes/verify-delegation.cjs +259 -36
- package/lib/pipes/verify-delegation.d.cts +22 -3
- package/lib/pipes/verify-list-size.cjs +1 -1
- package/lib/pipes/verify-multisig-v2.cjs +15 -7
- package/lib/pipes/verify-multisig.cjs +15 -7
- package/lib/pipes/verify-sender.cjs +1 -1
- package/lib/pipes/verify-service-fee.d.cts +1 -1
- package/lib/pipes/verify-signature.cjs +35 -6
- package/lib/pipes/verify-signature.d.cts +1 -1
- package/lib/pipes/verify-signer.cjs +2 -2
- package/lib/pipes/verify-state-diff.cjs +4 -4
- package/lib/pipes/verify-token-access.cjs +2 -2
- package/lib/pipes/verify-token-balance.cjs +13 -5
- package/lib/pipes/verify-transferrable.cjs +3 -3
- package/lib/pipes/verify-transferrable.d.cts +8 -1
- package/lib/pipes/verify-tx-input.cjs +3 -3
- package/lib/pipes/verify-tx-size.cjs +46 -2
- package/lib/pipes/verify-tx-size.d.cts +1 -1
- package/lib/pipes/verify-tx.cjs +6 -8
- package/lib/pipes/verify-tx.d.cts +1 -1
- package/lib/pipes/verify-updater.cjs +1 -1
- package/lib/social-economy-factories.cjs +852 -0
- package/lib/social-economy-factories.d.cts +346 -0
- package/lib/super-suites-foundation.cjs +1257 -0
- package/lib/super-suites-foundation.d.cts +513 -0
- package/lib/transaction-block.cjs +1941 -0
- package/lib/transaction-block.d.cts +471 -0
- package/lib/uniswap-erc7683-solver.cjs +327 -0
- package/lib/uniswap-erc7683-solver.d.cts +201 -0
- package/lib/uniswap-lp-copilot.cjs +328 -0
- package/lib/uniswap-lp-copilot.d.cts +113 -0
- package/lib/uniswap-router.cjs +593 -0
- package/lib/uniswap-router.d.cts +335 -0
- package/lib/uniswap-token-factory-graduation.cjs +431 -0
- package/lib/uniswap-token-factory-graduation.d.cts +187 -0
- package/lib/uniswap-v4-hook.cjs +527 -0
- package/lib/uniswap-v4-hook.d.cts +173 -0
- package/package.json +11 -10
- package/esm/helpers/dedup-height.d.mts +0 -16
- package/esm/helpers/dedup-height.mjs +0 -61
- package/lib/helpers/dedup-height.cjs +0 -72
- package/lib/helpers/dedup-height.d.cts +0 -16
|
@@ -0,0 +1,2055 @@
|
|
|
1
|
+
import { EncryptedAssetEnvelope, EncryptedNftPrivateMetadata } from "./encrypted-nft-envelope.mjs";
|
|
2
|
+
import { TransactionBlockPostConditions, TransactionBlockResult, WalletClearSigningPreview } from "./transaction-block.mjs";
|
|
3
|
+
import { BN } from "@ocap/util";
|
|
4
|
+
|
|
5
|
+
//#region src/native-abt-exchange.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Default native chain official token address on OCAP (`config.token.address`).
|
|
9
|
+
*/
|
|
10
|
+
declare const DEFAULT_EXCHANGE_OFFICIAL_TOKEN_ADDRESS = "z35n6UoHSi9MED4326Qv71622p3v22strip";
|
|
11
|
+
declare const DEFAULT_OFFICIAL_TOKEN_ADDRESS = "z35n6UoHSi9MED4326Qv71622p3v22strip";
|
|
12
|
+
declare const DEFAULT_EXCHANGE_ABT_TOKEN_ADDRESS = "z35n6UoHSi9MED4326Qv71622p3v22strip";
|
|
13
|
+
/**
|
|
14
|
+
* Deterministic stake address helper (`toStakeAddress(sender, receiver, moniker)`).
|
|
15
|
+
*/
|
|
16
|
+
declare function computeStakeAddress(sender: string, receiver: string, moniker: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Canonical dead/burn sink DID for permanently locked AMM LP shares (`MINIMUM_LOCKED_AMM_LIQUIDITY` & POL).
|
|
19
|
+
* NOTE (`#1287` / `seq: 580`): The chain's official token (`officialTokenAddress`) has a fixed total supply and
|
|
20
|
+
* is NEVER burned; 100% of official-token protocol fees flow to `chainRevenueDid` (`treasuryVaultDid`).
|
|
21
|
+
*/
|
|
22
|
+
declare const CANONICAL_ABT_EXCHANGE_BURN_SINK_DID = "z1dead000000000000000000000000000000";
|
|
23
|
+
/**
|
|
24
|
+
* Official token burn share is permanently `0` (`seq: 580`).
|
|
25
|
+
*/
|
|
26
|
+
declare const DEFAULT_ISSUANCE_FEE_BURN_SHARE_BPS = 0;
|
|
27
|
+
/**
|
|
28
|
+
* Minimum LP shares permanently locked on initial Constant-Product AMM pool creation (`1000` units)
|
|
29
|
+
* to prevent Uniswap V2 / ERC-4626 first-depositor rounding inflation attacks (#1280).
|
|
30
|
+
*/
|
|
31
|
+
declare const MINIMUM_LOCKED_AMM_LIQUIDITY = "1000";
|
|
32
|
+
/**
|
|
33
|
+
* Default permissionless FT issuance fee: `100` official tokens in 18-decimal base units (`100 * 10^18`) (#1279, #1287).
|
|
34
|
+
* 100% of this fee is credited to `chainRevenueDid` (`treasuryVaultDid`) for circular ecosystem use.
|
|
35
|
+
*/
|
|
36
|
+
declare const DEFAULT_FT_ISSUANCE_FEE_ABT = "100000000000000000000";
|
|
37
|
+
/**
|
|
38
|
+
* Hard governance floor and ceiling for `ftIssuanceFeeAbt` (`1` .. `100,000` official tokens) (#1279).
|
|
39
|
+
*/
|
|
40
|
+
declare const MIN_FT_ISSUANCE_FEE_ABT = "1000000000000000000";
|
|
41
|
+
declare const MAX_FT_ISSUANCE_FEE_ABT = "100000000000000000000000";
|
|
42
|
+
/**
|
|
43
|
+
* Default permanent baseline token issuance stake (`Stake-for-Token`, `#1287` / `seq: 580` & `seq: 585`):
|
|
44
|
+
* `100` official tokens (`100 * 10^18`) locked in `statedb.stake` with `revocable: false` while the token is in circulation.
|
|
45
|
+
* Can only be unlocked when 100% of circulating token supply is burned/retired (`totalSupply === '0'`).
|
|
46
|
+
*/
|
|
47
|
+
declare const DEFAULT_MIN_FT_ISSUANCE_STAKE_ABT = "100000000000000000000";
|
|
48
|
+
declare const DEFAULT_BASELINE_TOKEN_ISSUANCE_STAKE_ABT = "100000000000000000000";
|
|
49
|
+
declare const MIN_FT_ISSUANCE_STAKE_ABT = "1000000000000000000";
|
|
50
|
+
declare const MIN_BASELINE_TOKEN_ISSUANCE_STAKE_ABT = "1000000000000000000";
|
|
51
|
+
declare const MAX_FT_ISSUANCE_STAKE_ABT = "100000000000000000000000";
|
|
52
|
+
declare const MAX_BASELINE_TOKEN_ISSUANCE_STAKE_ABT = "100000000000000000000000";
|
|
53
|
+
/**
|
|
54
|
+
* Default Curve-to-AMM graduation reserve threshold: `5,000` official tokens (`5000 * 10^18`) (#1282).
|
|
55
|
+
*/
|
|
56
|
+
declare const DEFAULT_MIN_GRADUATION_RESERVE_ABT = "5000000000000000000000";
|
|
57
|
+
declare const MIN_GRADUATION_RESERVE_ABT_FLOOR = "100000000000000000000";
|
|
58
|
+
declare const MAX_GRADUATION_RESERVE_ABT_CEILING = "10000000000000000000000000";
|
|
59
|
+
/**
|
|
60
|
+
* Default minimum unique non-creator holders required for Curve-to-AMM graduation (#1282).
|
|
61
|
+
* Each qualified holder must hold at least `MIN_GRADUATION_HOLDER_SHARE_BPS` (`50 bps` = 0.50%) of
|
|
62
|
+
* current curve supply to prevent Sybil 1-unit dust wash-graduation attacks.
|
|
63
|
+
*/
|
|
64
|
+
declare const DEFAULT_MIN_GRADUATION_UNIQUE_HOLDERS = 5;
|
|
65
|
+
declare const MAX_GRADUATION_UNIQUE_HOLDERS_CEILING = 10000;
|
|
66
|
+
declare const MIN_GRADUATION_HOLDER_SHARE_BPS = 50;
|
|
67
|
+
declare const MAX_TRACKED_CURVE_HOLDERS = 1000;
|
|
68
|
+
/**
|
|
69
|
+
* Default protocol graduation fee deducted from reserve upon Curve-to-AMM graduation (`50` official tokens) (#1282).
|
|
70
|
+
*/
|
|
71
|
+
declare const DEFAULT_GRADUATION_FEE_ABT = "50000000000000000000";
|
|
72
|
+
/**
|
|
73
|
+
* Default self-operated sub-token bridge registration fee (`500` official tokens) & minimum security bond (`1,000` official tokens) (#1283).
|
|
74
|
+
*/
|
|
75
|
+
declare const DEFAULT_SELF_BRIDGE_REGISTRATION_FEE_ABT = "500000000000000000000";
|
|
76
|
+
declare const DEFAULT_MIN_SELF_BRIDGE_SECURITY_BOND_ABT = "1000000000000000000000";
|
|
77
|
+
/**
|
|
78
|
+
* Issue #1296 (`seq: 627` — `Stake-for-Distributor` zero-sink-cost `ABT` bond for ValueCard & Composable Bundle distribution):
|
|
79
|
+
* - Distributors / KOLs / bundle curators lock `ABT` in `statedb.stake` at deterministic address
|
|
80
|
+
* `deriveValueCardDistributorStakeAddress(distributorDid, officialTokenAddress)` to prevent Sybil spam while freezing `ABT` for the ecosystem.
|
|
81
|
+
* - If their distribution business does not work out, they can call `unstakeValueCardDistributor` to recover 100% of their staked `ABT`
|
|
82
|
+
* once any pending maturing rebates (`ESCROW_MATURITY`) and cooldown windows clear.
|
|
83
|
+
*/
|
|
84
|
+
declare const DEFAULT_MIN_VALUE_CARD_DISTRIBUTOR_STAKE_ABT = "0";
|
|
85
|
+
declare const MAX_VALUE_CARD_DISTRIBUTOR_STAKE_ABT = "100000000000000000000000";
|
|
86
|
+
declare const MAX_DISTRIBUTOR_STAKE_COOLDOWN_SECONDS = 31536000;
|
|
87
|
+
declare const MAX_ACTIVE_MATURING_REBATES_PER_DISTRIBUTOR = 1000;
|
|
88
|
+
declare function deriveValueCardDistributorStakeAddress(distributorDid: string, officialTokenAddress?: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Default swap fee rate (`30 bps` = 0.30%), max swap fee rate (`500 bps` = 5.00%),
|
|
91
|
+
* and default protocol treasury share of swap fees (`2000 bps` = 20% of swap fee) (#1280).
|
|
92
|
+
*/
|
|
93
|
+
declare const DEFAULT_EXCHANGE_SWAP_FEE_BPS = 30;
|
|
94
|
+
declare const MAX_EXCHANGE_SWAP_FEE_BPS = 500;
|
|
95
|
+
declare const DEFAULT_PROTOCOL_FEE_SHARE_BPS = 2000;
|
|
96
|
+
declare const MAX_PROTOCOL_FEE_SHARE_BPS = 5000;
|
|
97
|
+
/**
|
|
98
|
+
* Default single-hop price impact circuit breaker (`3000 bps` = 30.00%) (#1281).
|
|
99
|
+
*/
|
|
100
|
+
declare const DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS = 3000;
|
|
101
|
+
declare const HARD_MAX_SWAP_PRICE_IMPACT_BPS = 5000;
|
|
102
|
+
/**
|
|
103
|
+
* Bounds for `Stake-for-Offer` structured attribute predicates and Escalating Promoter Rebate tiers (`#1287` / `seq: 581` & `seq: 582`).
|
|
104
|
+
*/
|
|
105
|
+
declare const MAX_NFT_ATTRIBUTE_PREDICATES = 16;
|
|
106
|
+
declare const MAX_NFT_OFFER_PREDICATES = 16;
|
|
107
|
+
declare const MAX_NFT_ATTRIBUTE_PATH_DEPTH = 4;
|
|
108
|
+
declare const MAX_PROMOTER_TIERS = 16;
|
|
109
|
+
declare const MAX_ESCALATING_PROMOTER_TIERS = 16;
|
|
110
|
+
declare const MAX_PROMOTER_REBATE_BPS = 8000;
|
|
111
|
+
declare const MAX_ESCALATING_PROMOTER_REBATE_BPS = 8000;
|
|
112
|
+
/**
|
|
113
|
+
* Bounds for Enshrined Programmable Value Card NFT (`Stake-for-Card` & `Stake-for-Credit`, `#1289` / `seq: 602` & `seq: 604`).
|
|
114
|
+
*/
|
|
115
|
+
declare const MAX_VALUE_CARD_ALLOWED_MERCHANTS = 32;
|
|
116
|
+
declare const MAX_VALUE_CARD_ALLOWED_SERVICE_TAGS = 32;
|
|
117
|
+
declare const MAX_VALUE_CARD_ATTRIBUTION_HOPS = 8;
|
|
118
|
+
declare const MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS = 9000;
|
|
119
|
+
declare const DEFAULT_VALUE_CARD_PROTOCOL_FEE_BPS = 100;
|
|
120
|
+
/**
|
|
121
|
+
* Canonical liability disclaimer required when a token issuer registers a self-operated bridge (#1283).
|
|
122
|
+
*/
|
|
123
|
+
declare const CANONICAL_SELF_BRIDGE_LIABILITY_DISCLAIMER = "I_ACKNOWLEDGE_THIS_SUB_TOKEN_BRIDGE_IS_100_PERCENT_SELF_OPERATED_AND_ISOLATED_FROM_OFFICIAL_ABT_BRIDGE_RESERVES";
|
|
124
|
+
/**
|
|
125
|
+
* Deterministic integer floor square-root (`floor(sqrt(n))`) using Newton-Raphson iteration on `BN`.
|
|
126
|
+
*/
|
|
127
|
+
declare function integerSqrtBn(n: BN): BN;
|
|
128
|
+
interface GovernanceExchangePolicy {
|
|
129
|
+
policyEpoch: number;
|
|
130
|
+
governanceAuthorityDid: string;
|
|
131
|
+
/** Circular chain revenue recipient DID (`100%` of official-token protocol fees flow here; zero burn) (`#1287` / `seq: 580`) */
|
|
132
|
+
chainRevenueDid: string;
|
|
133
|
+
/** Backward-compatible alias for `chainRevenueDid` */
|
|
134
|
+
treasuryVaultDid: string;
|
|
135
|
+
burnSinkDid: string;
|
|
136
|
+
bondEscrowVaultDid: string;
|
|
137
|
+
/** Fixed official-token fee charged for permissionless FT creation (`default: 100`, 100% routed to `chainRevenueDid`) (#1279, #1287) */
|
|
138
|
+
ftIssuanceFeeAbt: string;
|
|
139
|
+
/**
|
|
140
|
+
* Must ALWAYS be `0` (`#1287` / `seq: 580`): the chain's official token has fixed total supply and CANNOT be burned.
|
|
141
|
+
*/
|
|
142
|
+
issuanceFeeBurnShareBps: number;
|
|
143
|
+
/**
|
|
144
|
+
* Minimum official-token baseline stake (`Stake-for-Token`) permanently locked (`revocable: false`) in `statedb.stake`
|
|
145
|
+
* while the user-issued token is in circulation (`totalSupply > 0`) (`#1287` / `seq: 580` & `seq: 585`).
|
|
146
|
+
*/
|
|
147
|
+
minIssuanceStakeAbt: string;
|
|
148
|
+
/** Minimum official-token reserve required in a `BONDING_CURVE` factory to graduate to `CONSTANT_PRODUCT_AMM` (#1282) */
|
|
149
|
+
minGraduationReserveAbt: string;
|
|
150
|
+
/** Minimum distinct non-creator holders with `>= 0.50%` supply required to graduate (#1282) */
|
|
151
|
+
minGraduationUniqueHolders: number;
|
|
152
|
+
/** Fixed official-token protocol fee deducted upon Curve-to-AMM graduation (`<= 10%` of `minGraduationReserveAbt`) (#1282) */
|
|
153
|
+
graduationFeeAbt: string;
|
|
154
|
+
/** Default swap fee in bps (`1..500`, default `30` = 0.30%) (#1280) */
|
|
155
|
+
defaultSwapFeeBps: number;
|
|
156
|
+
/** Share of swap fees routed to `chainRevenueDid` in bps (`0..5000`, default `2000` = 20%) (#1280) */
|
|
157
|
+
protocolFeeShareBps: number;
|
|
158
|
+
/** Maximum single-hop price impact in bps (`100..5000`, default `3000` = 30%) (#1281) */
|
|
159
|
+
maxSwapPriceImpactBps: number;
|
|
160
|
+
/** Fixed official-token fee to register a self-operated sub-token bridge (#1283) */
|
|
161
|
+
selfBridgeRegistrationFeeAbt: string;
|
|
162
|
+
/** Minimum official-token security bond locked in `statedb.stake` for a self-operated sub-token bridge (#1283, #1287) */
|
|
163
|
+
minSelfBridgeSecurityBondAbt: string;
|
|
164
|
+
/**
|
|
165
|
+
* Optional governance baseline `Stake-for-Distributor` (`ABT`) required for a `distributorDid` to earn ValueCard / Bundle rebates (`#1296` / `seq: 627`).
|
|
166
|
+
* Defaults to `'0'` unless configured by governance or overridden upwards by a card issuer / `OpenComposingRuleVc`.
|
|
167
|
+
*/
|
|
168
|
+
minDistributorStakeAbt?: string;
|
|
169
|
+
}
|
|
170
|
+
interface UpdateGovernanceExchangePolicyInput {
|
|
171
|
+
callerDid: string;
|
|
172
|
+
nextPolicyEpoch: number;
|
|
173
|
+
ftIssuanceFeeAbt?: string;
|
|
174
|
+
issuanceFeeBurnShareBps?: number;
|
|
175
|
+
minIssuanceStakeAbt?: string;
|
|
176
|
+
minGraduationReserveAbt?: string;
|
|
177
|
+
minGraduationUniqueHolders?: number;
|
|
178
|
+
graduationFeeAbt?: string;
|
|
179
|
+
defaultSwapFeeBps?: number;
|
|
180
|
+
protocolFeeShareBps?: number;
|
|
181
|
+
maxSwapPriceImpactBps?: number;
|
|
182
|
+
selfBridgeRegistrationFeeAbt?: string;
|
|
183
|
+
minSelfBridgeSecurityBondAbt?: string;
|
|
184
|
+
minDistributorStakeAbt?: string;
|
|
185
|
+
}
|
|
186
|
+
interface EscalatingPromoterTier {
|
|
187
|
+
/** Minimum threshold / deal amount in official token or supply (`>= 0`) */
|
|
188
|
+
minThreshold?: string;
|
|
189
|
+
/** Alias for `minThreshold` */
|
|
190
|
+
minDealAmountAbt?: string;
|
|
191
|
+
/** Minimum cumulative volume in official token (`ABT`) referred by this promoter (`>= 0`) */
|
|
192
|
+
minCumulativeVolumeAbt?: string;
|
|
193
|
+
/** Promoter rebate rate in bps (`1..MAX_PROMOTER_REBATE_BPS`) */
|
|
194
|
+
rebateBps?: number;
|
|
195
|
+
/** Alias for `rebateBps` */
|
|
196
|
+
promoterBps?: number;
|
|
197
|
+
}
|
|
198
|
+
interface ConfigureEscalatingPromoterPolicyInput {
|
|
199
|
+
/** Target scope: a `factoryAddress`, `listingId`, `offerId`, or `'GLOBAL_DEFAULT'` */
|
|
200
|
+
scopeId?: string;
|
|
201
|
+
targetDid?: string;
|
|
202
|
+
callerDid: string;
|
|
203
|
+
tiers: EscalatingPromoterTier[];
|
|
204
|
+
}
|
|
205
|
+
declare function validateEscalatingPromoterTiers(tiers?: EscalatingPromoterTier[]): EscalatingPromoterTier[];
|
|
206
|
+
/**
|
|
207
|
+
* Deterministic escalating promoter rebate resolver (`#1287` / `seq: 585` & `#1293` / `seq: 614`).
|
|
208
|
+
* Evaluates both single-deal threshold (`minThreshold` / `minDealAmountAbt`) and cumulative distributor
|
|
209
|
+
* sales volume (`minCumulativeVolumeAbt`).
|
|
210
|
+
*/
|
|
211
|
+
declare function resolveEscalatingPromoterBps(metricBn: BN, tiers: EscalatingPromoterTier[] | undefined, fallbackBps?: number, cumulativeVolumeBn?: BN): number;
|
|
212
|
+
interface UserIssuedTokenRecord {
|
|
213
|
+
tokenAddress: string;
|
|
214
|
+
symbol: string;
|
|
215
|
+
name: string;
|
|
216
|
+
decimals: number;
|
|
217
|
+
issuerDid: string;
|
|
218
|
+
totalSupply: string;
|
|
219
|
+
maxTotalSupply: string;
|
|
220
|
+
paidIssuanceFeeAbt: string;
|
|
221
|
+
/** Always `'0'` (`#1287` / `seq: 580` — official token cannot be burned) */
|
|
222
|
+
burnedFeeAbt: string;
|
|
223
|
+
/** 100% of `paidIssuanceFeeAbt` credited to `chainRevenueDid` (`treasuryVaultDid`) */
|
|
224
|
+
treasuryFeeAbt: string;
|
|
225
|
+
/** Deterministic `statedb.stake` address locking the issuer's baseline `Stake-for-Token` (`revocable: false` while circulating) */
|
|
226
|
+
stakeAddress: string;
|
|
227
|
+
/** Alias for `stakeAddress` */
|
|
228
|
+
issuanceStakeAddress: string;
|
|
229
|
+
/** Amount of official token locked in `statedb.stake` (`>= minIssuanceStakeAbt`) */
|
|
230
|
+
lockedIssuanceStakeAbt: string;
|
|
231
|
+
/** Permanently `false` while `totalSupply > 0`; can only be unlocked via `retireDestroyedTokenAndUnlockStake` when `totalSupply === '0'` */
|
|
232
|
+
stakeRevocable: boolean;
|
|
233
|
+
stakeStatus: 'LOCKED' | 'UNLOCKED_ON_RETIREMENT' | 'SLASHED';
|
|
234
|
+
status: 'ACTIVE' | 'RETIRED' | 'SLASHED';
|
|
235
|
+
factoryAddress?: string;
|
|
236
|
+
}
|
|
237
|
+
interface IssuePermissionlessTokenInput {
|
|
238
|
+
issuerDid: string;
|
|
239
|
+
tokenAddress: string;
|
|
240
|
+
symbol: string;
|
|
241
|
+
name: string;
|
|
242
|
+
decimals?: number;
|
|
243
|
+
initialSupply: string;
|
|
244
|
+
maxTotalSupply: string;
|
|
245
|
+
/** Optional explicit stake amount (`>= policy.minIssuanceStakeAbt`); defaults to `policy.minIssuanceStakeAbt` */
|
|
246
|
+
stakeAmountAbt?: string;
|
|
247
|
+
issuanceStakeAbt?: string;
|
|
248
|
+
}
|
|
249
|
+
interface BurnCirculatingUserTokenInput {
|
|
250
|
+
holderDid: string;
|
|
251
|
+
tokenAddress: string;
|
|
252
|
+
amount?: string;
|
|
253
|
+
burnAmount?: string;
|
|
254
|
+
}
|
|
255
|
+
interface RetireDestroyedTokenInput {
|
|
256
|
+
issuerDid?: string;
|
|
257
|
+
callerDid?: string;
|
|
258
|
+
tokenAddress: string;
|
|
259
|
+
}
|
|
260
|
+
type ExchangeFactoryMode = 'BONDING_CURVE' | 'CONSTANT_PRODUCT_AMM';
|
|
261
|
+
interface UnifiedAbtExchangePoolState {
|
|
262
|
+
factoryAddress: string;
|
|
263
|
+
tokenAddress: string;
|
|
264
|
+
/** Always strictly equal to `officialTokenAddress` (`abtTokenAddress`) */
|
|
265
|
+
reserveAddress: string;
|
|
266
|
+
/** Deterministic `statedb.stake` address (`Stake-for-Liquidity`) holding the pool's reserve tokens */
|
|
267
|
+
poolStakeAddress: string;
|
|
268
|
+
creatorDid: string;
|
|
269
|
+
mode: ExchangeFactoryMode;
|
|
270
|
+
status: 'ACTIVE' | 'PAUSED' | 'RETIRED';
|
|
271
|
+
feeRateBps: number;
|
|
272
|
+
/** Current official-token (`ABT`) reserve locked in the factory/pool */
|
|
273
|
+
reserveAbt: string;
|
|
274
|
+
/**
|
|
275
|
+
* For `BONDING_CURVE`: current circulating supply minted via the curve (`currentSupply`).
|
|
276
|
+
* For `CONSTANT_PRODUCT_AMM`: token reserve (`reserveToken`) held inside the `x * y = k` pool.
|
|
277
|
+
*/
|
|
278
|
+
poolTokenBalance: string;
|
|
279
|
+
/**
|
|
280
|
+
* For `BONDING_CURVE`: base tokens minted per 1 official token at zero supply.
|
|
281
|
+
*/
|
|
282
|
+
curveBaseTokensPerAbt?: number;
|
|
283
|
+
/** Total LP shares issued (for `CONSTANT_PRODUCT_AMM` mode) */
|
|
284
|
+
totalLpShares: string;
|
|
285
|
+
/** Permanently locked LP shares (`>= 1000`, or `100%` of initial shares upon Curve graduation) */
|
|
286
|
+
lockedLpShares: string;
|
|
287
|
+
/** Map of `lpHolderDid -> lpShares` */
|
|
288
|
+
lpBalances: Record<string, string>;
|
|
289
|
+
/** Whether this AMM pool graduated in-place from a `BONDING_CURVE` factory (#1282) */
|
|
290
|
+
graduatedFromCurve: boolean;
|
|
291
|
+
graduatedAtEpoch?: number;
|
|
292
|
+
/** Tracked candidate holder DIDs for graduation verification (#1282) */
|
|
293
|
+
knownHolders: string[];
|
|
294
|
+
/** Optional escalating promoter rebate tiers configured for this pool (`#1287` / `seq: 581`) */
|
|
295
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
296
|
+
escalatingPromoterTiers?: EscalatingPromoterTier[];
|
|
297
|
+
}
|
|
298
|
+
interface CreateBondingCurveFactoryInput {
|
|
299
|
+
creatorDid: string;
|
|
300
|
+
factoryAddress: string;
|
|
301
|
+
tokenAddress: string;
|
|
302
|
+
symbol: string;
|
|
303
|
+
name: string;
|
|
304
|
+
decimals?: number;
|
|
305
|
+
maxTotalSupply: string;
|
|
306
|
+
/** Positive integer `1..1000`: base tokens minted per 1 unit of net official-token reserve */
|
|
307
|
+
curveBaseTokensPerAbt: number;
|
|
308
|
+
feeRateBps?: number;
|
|
309
|
+
swapFeeBps?: number;
|
|
310
|
+
/** Optional explicit stake amount (`>= policy.minIssuanceStakeAbt`); defaults to `policy.minIssuanceStakeAbt` */
|
|
311
|
+
stakeAmountAbt?: string;
|
|
312
|
+
issuanceStakeAbt?: string;
|
|
313
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
314
|
+
escalatingPromoterTiers?: EscalatingPromoterTier[];
|
|
315
|
+
}
|
|
316
|
+
interface CreateConstantProductPoolInput {
|
|
317
|
+
creatorDid: string;
|
|
318
|
+
factoryAddress: string;
|
|
319
|
+
tokenAddress: string;
|
|
320
|
+
/** Must always be `officialTokenAddress` (`abtTokenAddress`) */
|
|
321
|
+
reserveAddress: string;
|
|
322
|
+
initialAbtAmount: string;
|
|
323
|
+
initialTokenAmount: string;
|
|
324
|
+
feeRateBps?: number;
|
|
325
|
+
swapFeeBps?: number;
|
|
326
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
327
|
+
escalatingPromoterTiers?: EscalatingPromoterTier[];
|
|
328
|
+
}
|
|
329
|
+
interface AddAmmLiquidityInput {
|
|
330
|
+
providerDid: string;
|
|
331
|
+
factoryAddress: string;
|
|
332
|
+
abtAmountIn: string;
|
|
333
|
+
tokenAmountIn: string;
|
|
334
|
+
minLpSharesOut: string;
|
|
335
|
+
}
|
|
336
|
+
interface RemoveAmmLiquidityInput {
|
|
337
|
+
providerDid: string;
|
|
338
|
+
factoryAddress: string;
|
|
339
|
+
lpSharesToBurn: string;
|
|
340
|
+
minAbtOut: string;
|
|
341
|
+
minTokenOut: string;
|
|
342
|
+
}
|
|
343
|
+
interface SingleHopAbtSwapInput {
|
|
344
|
+
traderDid: string;
|
|
345
|
+
/** Optional recipient DID (used by atomic PathPayment to credit `merchantDid` in a single TransactionBlock) */
|
|
346
|
+
recipientDid?: string;
|
|
347
|
+
factoryAddress: string;
|
|
348
|
+
direction: 'ABT_TO_TOKEN' | 'TOKEN_TO_ABT';
|
|
349
|
+
amountIn: string;
|
|
350
|
+
minAmountOut: string;
|
|
351
|
+
maxPriceImpactBps?: number;
|
|
352
|
+
/** Optional promoter / referrer DID for escalating tiered marketing rebate (`#1287` / `seq: 581`) */
|
|
353
|
+
promoterDid?: string;
|
|
354
|
+
}
|
|
355
|
+
interface TwoHopTokenSwapInput {
|
|
356
|
+
traderDid: string;
|
|
357
|
+
/** Optional recipient DID (used by atomic PathPayment to credit `merchantDid` in a single TransactionBlock) */
|
|
358
|
+
recipientDid?: string;
|
|
359
|
+
sourceFactoryAddress: string;
|
|
360
|
+
targetFactoryAddress: string;
|
|
361
|
+
tokenAmountIn: string;
|
|
362
|
+
minTokenAmountOut: string;
|
|
363
|
+
maxPriceImpactBps?: number;
|
|
364
|
+
promoterDid?: string;
|
|
365
|
+
}
|
|
366
|
+
interface PathPaymentCheckoutInput {
|
|
367
|
+
payerDid: string;
|
|
368
|
+
merchantDid: string;
|
|
369
|
+
/** Token held and spent by `payerDid` (either a user FT or official token) */
|
|
370
|
+
paymentTokenAddress: string;
|
|
371
|
+
/** Token required by `merchantDid` (either official token or another user FT) */
|
|
372
|
+
settlementTokenAddress: string;
|
|
373
|
+
paymentAmountIn: string;
|
|
374
|
+
minSettlementAmountOut: string;
|
|
375
|
+
maxPriceImpactBps?: number;
|
|
376
|
+
orderMemo?: string;
|
|
377
|
+
promoterDid?: string;
|
|
378
|
+
}
|
|
379
|
+
interface NativeSwapExecutionResult {
|
|
380
|
+
blockResult: TransactionBlockResult;
|
|
381
|
+
postConditions: TransactionBlockPostConditions;
|
|
382
|
+
clearSigningPreview: WalletClearSigningPreview;
|
|
383
|
+
amountIn: string;
|
|
384
|
+
amountOut: string;
|
|
385
|
+
intermediateAbtAmount: string;
|
|
386
|
+
totalProtocolFeeAbt: string;
|
|
387
|
+
totalLpOrCreatorFeeAbt: string;
|
|
388
|
+
/** Escalating promoter rebate paid in official token (`ABT`) (`#1287` / `seq: 581`) */
|
|
389
|
+
totalPromoterRebateAbt: string;
|
|
390
|
+
appliedPromoterRebateBps: number;
|
|
391
|
+
routeDescription: string;
|
|
392
|
+
}
|
|
393
|
+
interface SelfOperatedSubTokenBridgeRecord {
|
|
394
|
+
bridgeId: string;
|
|
395
|
+
tokenAddress: string;
|
|
396
|
+
issuerDid: string;
|
|
397
|
+
targetChainId: string;
|
|
398
|
+
targetContractAddress: string;
|
|
399
|
+
validatorDids: string[];
|
|
400
|
+
quorumThreshold: number;
|
|
401
|
+
paidRegistrationFeeAbt: string;
|
|
402
|
+
/** Deterministic `statedb.stake` address locking the self-operated bridge bond (`Stake-for-Bridge`) */
|
|
403
|
+
bondStakeAddress: string;
|
|
404
|
+
lockedSecurityBondAbt: string;
|
|
405
|
+
liabilityDisclaimerDigest: string;
|
|
406
|
+
status: 'ACTIVE' | 'SLASHED';
|
|
407
|
+
}
|
|
408
|
+
interface RegisterSelfOperatedBridgeInput {
|
|
409
|
+
bridgeId: string;
|
|
410
|
+
issuerDid: string;
|
|
411
|
+
tokenAddress: string;
|
|
412
|
+
targetChainId: string;
|
|
413
|
+
targetContractAddress: string;
|
|
414
|
+
validatorDids: string[];
|
|
415
|
+
quorumThreshold: number;
|
|
416
|
+
securityBondAbt: string;
|
|
417
|
+
liabilityDisclaimer: string;
|
|
418
|
+
}
|
|
419
|
+
type NativeNftListingMode = 'FIXED_PRICE' | 'DUTCH_AUCTION' | 'ENGLISH_TOP1_AUTO_REFUND';
|
|
420
|
+
declare const DEFAULT_NFT_PROTOCOL_FEE_BPS = 150;
|
|
421
|
+
declare const DEFAULT_NFT_UI_REFERRER_FEE_BPS = 50;
|
|
422
|
+
declare const MAX_NFT_CREATOR_ROYALTY_BPS = 2500;
|
|
423
|
+
declare const DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS = 500;
|
|
424
|
+
/** Default anti-sniping extension window in seconds (`300s` = 5 minutes) for Instant Settle chains (`seq: 576`) */
|
|
425
|
+
declare const DEFAULT_ANTI_SNIPE_WINDOW_SECONDS = 300;
|
|
426
|
+
interface NativeNftListingRecord {
|
|
427
|
+
listingId: string;
|
|
428
|
+
assetDid: string;
|
|
429
|
+
sellerDid: string;
|
|
430
|
+
creatorDid: string;
|
|
431
|
+
mode: NativeNftListingMode;
|
|
432
|
+
status: 'LISTED' | 'SETTLED' | 'CANCELLED';
|
|
433
|
+
/** Mandatory L1 creator royalty in bps (`0..2500`) */
|
|
434
|
+
royaltyBps: number;
|
|
435
|
+
/** Protocol treasury fee in bps (`default: 150` = 1.50%) */
|
|
436
|
+
protocolFeeBps: number;
|
|
437
|
+
/** Baseline UI / ArcSpace referrer rebate in bps (`default: 50` = 0.50%) */
|
|
438
|
+
uiReferrerBps: number;
|
|
439
|
+
/** Optional escalating promoter rebate tiers (`#1287` / `seq: 581`) */
|
|
440
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
441
|
+
escalatingPromoterTiers?: EscalatingPromoterTier[];
|
|
442
|
+
/** Unix timestamp in seconds when listing/auction becomes active (`seq: 576` Instant Settle, zero blockHeight) */
|
|
443
|
+
startTimeSeconds: number;
|
|
444
|
+
/** Unix timestamp in seconds when listing/auction expires (`seq: 576` Instant Settle, zero blockHeight) */
|
|
445
|
+
endTimeSeconds: number;
|
|
446
|
+
/** For `FIXED_PRICE`: exact price; for `DUTCH_AUCTION`: start price; for `ENGLISH_TOP1_AUTO_REFUND`: reserve floor price */
|
|
447
|
+
startOrReservePriceAbt: string;
|
|
448
|
+
/** For `DUTCH_AUCTION`: floor end price (`<= startOrReservePriceAbt`) */
|
|
449
|
+
dutchEndPriceAbt?: string;
|
|
450
|
+
/** For `ENGLISH_TOP1_AUTO_REFUND`: minimum bid increment in bps (`>= 100`) */
|
|
451
|
+
minBidIncrementBps?: number;
|
|
452
|
+
/** For `ENGLISH_TOP1_AUTO_REFUND`: anti-sniping time extension window in seconds (`default: 300`) */
|
|
453
|
+
antiSnipeWindowSeconds?: number;
|
|
454
|
+
/** Deterministic `statedb.stake` address locking the Top-1 English auction bid (`Stake-for-Bid`) */
|
|
455
|
+
bidStakeAddress?: string;
|
|
456
|
+
highestBidStakeAddress?: string;
|
|
457
|
+
/** Single-slot highest bidder DID (`O(1)` storage, zero losing-bid backlog) */
|
|
458
|
+
highestBidderDid?: string;
|
|
459
|
+
/** Single-slot highest bid amount in official token locked in `statedb.stake` */
|
|
460
|
+
highestBidAbt?: string;
|
|
461
|
+
highestBidUiReferrerDid?: string;
|
|
462
|
+
settledBuyerDid?: string;
|
|
463
|
+
settledPriceAbt?: string;
|
|
464
|
+
}
|
|
465
|
+
interface CreateNativeNftListingInput {
|
|
466
|
+
listingId: string;
|
|
467
|
+
assetDid: string;
|
|
468
|
+
sellerDid: string;
|
|
469
|
+
creatorDid: string;
|
|
470
|
+
mode: NativeNftListingMode;
|
|
471
|
+
royaltyBps: number;
|
|
472
|
+
startTimeSeconds: number;
|
|
473
|
+
endTimeSeconds: number;
|
|
474
|
+
startOrReservePriceAbt: string;
|
|
475
|
+
dutchEndPriceAbt?: string;
|
|
476
|
+
minBidIncrementBps?: number;
|
|
477
|
+
antiSnipeWindowSeconds?: number;
|
|
478
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
479
|
+
escalatingPromoterTiers?: EscalatingPromoterTier[];
|
|
480
|
+
}
|
|
481
|
+
interface FulfillNativeNftListingInput {
|
|
482
|
+
listingId: string;
|
|
483
|
+
buyerDid: string;
|
|
484
|
+
/** Deterministic consensus transaction Unix timestamp in seconds (`seq: 576` Instant Settle) */
|
|
485
|
+
txTimestampSeconds: number;
|
|
486
|
+
maxPriceAbt: string;
|
|
487
|
+
uiReferrerDid?: string;
|
|
488
|
+
promoterDid?: string;
|
|
489
|
+
}
|
|
490
|
+
interface PlaceEnglishNftBidInput {
|
|
491
|
+
listingId: string;
|
|
492
|
+
bidderDid: string;
|
|
493
|
+
bidAmountAbt: string;
|
|
494
|
+
/** Deterministic consensus transaction Unix timestamp in seconds (`seq: 576` Instant Settle) */
|
|
495
|
+
txTimestampSeconds: number;
|
|
496
|
+
uiReferrerDid?: string;
|
|
497
|
+
promoterDid?: string;
|
|
498
|
+
}
|
|
499
|
+
interface NativeNftSettlementResult {
|
|
500
|
+
blockResult: TransactionBlockResult;
|
|
501
|
+
listing: NativeNftListingRecord;
|
|
502
|
+
settlementPriceAbt: string;
|
|
503
|
+
creatorRoyaltyAbt: string;
|
|
504
|
+
protocolFeeAbt: string;
|
|
505
|
+
uiReferrerRebateAbt: string;
|
|
506
|
+
appliedPromoterRebateBps: number;
|
|
507
|
+
sellerNetProceedsAbt: string;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Issue #1287 (`seq: 581` & `seq: 582`):
|
|
511
|
+
* Unsolicited Buyer NFT Offer (`Stake-for-Offer`) supporting:
|
|
512
|
+
* 1. Specific NFT Offer (`targetAssetDid`);
|
|
513
|
+
* 2. Factory / Collection Floor Offer (`targetFactoryDid`);
|
|
514
|
+
* 3. On-Chain Structured Attribute & Usable-State Predicates (`attributePredicates` + `requireUnconsumed`)
|
|
515
|
+
* evaluated deterministically against `IAssetState.data` (e.g. `color == 'yellow' && species == 'dragon'`,
|
|
516
|
+
* or unused gift-card predicates `requireUnconsumed: true, status == 'unused', remainingBalance >= 100`).
|
|
517
|
+
*/
|
|
518
|
+
type NftAttributeOperator = 'eq' | 'neq' | 'in' | 'gte' | 'lte' | 'exists';
|
|
519
|
+
type NftAttributePredicateOperator = NftAttributeOperator;
|
|
520
|
+
interface NftAttributePredicate {
|
|
521
|
+
/** Dot-separated attribute path inside `IAssetState.data` (e.g. `'color'`, `'traits.species'`, `'remainingBalance'`) */
|
|
522
|
+
field?: string;
|
|
523
|
+
path?: string;
|
|
524
|
+
op: NftAttributeOperator;
|
|
525
|
+
value?: string | number | boolean | Array<string | number | boolean>;
|
|
526
|
+
}
|
|
527
|
+
interface NativeNftBuyOfferRecord {
|
|
528
|
+
offerId: string;
|
|
529
|
+
buyerDid: string;
|
|
530
|
+
offerStakeAddress: string;
|
|
531
|
+
offerPriceAbt: string;
|
|
532
|
+
targetAssetDid?: string;
|
|
533
|
+
targetFactoryDid?: string;
|
|
534
|
+
attributePredicates?: NftAttributePredicate[];
|
|
535
|
+
requireUnconsumed: boolean;
|
|
536
|
+
creatorDid?: string;
|
|
537
|
+
royaltyBps: number;
|
|
538
|
+
protocolFeeBps: number;
|
|
539
|
+
uiReferrerBps: number;
|
|
540
|
+
uiReferrerDid?: string;
|
|
541
|
+
expiresAtSeconds: number;
|
|
542
|
+
status: 'OPEN' | 'ACCEPTED' | 'CANCELLED';
|
|
543
|
+
settledSellerDid?: string;
|
|
544
|
+
settledAssetDid?: string;
|
|
545
|
+
}
|
|
546
|
+
type NftBuyOfferRecord = NativeNftBuyOfferRecord;
|
|
547
|
+
interface CreateNftBuyOfferInput {
|
|
548
|
+
offerId: string;
|
|
549
|
+
buyerDid: string;
|
|
550
|
+
offerPriceAbt: string;
|
|
551
|
+
targetAssetDid?: string;
|
|
552
|
+
targetFactoryDid?: string;
|
|
553
|
+
attributePredicates?: NftAttributePredicate[];
|
|
554
|
+
/**
|
|
555
|
+
* Defaults to `true` to protect buyers from having already-consumed / redeemed gift cards or tickets
|
|
556
|
+
* dumped into collection/trait offers (`seq: 582`).
|
|
557
|
+
*/
|
|
558
|
+
requireUnconsumed?: boolean;
|
|
559
|
+
creatorDid?: string;
|
|
560
|
+
royaltyBps?: number;
|
|
561
|
+
uiReferrerDid?: string;
|
|
562
|
+
expiresAtSeconds: number;
|
|
563
|
+
promoterTiers?: EscalatingPromoterTier[];
|
|
564
|
+
}
|
|
565
|
+
interface AcceptNftBuyOfferInput {
|
|
566
|
+
offerId: string;
|
|
567
|
+
sellerDid: string;
|
|
568
|
+
assetDid: string;
|
|
569
|
+
txTimestampSeconds: number;
|
|
570
|
+
promoterDid?: string;
|
|
571
|
+
uiReferrerDid?: string;
|
|
572
|
+
}
|
|
573
|
+
interface NativeNftOfferSettlementResult {
|
|
574
|
+
blockResult: TransactionBlockResult;
|
|
575
|
+
offer: NativeNftBuyOfferRecord;
|
|
576
|
+
assetDid: string;
|
|
577
|
+
settlementPriceAbt: string;
|
|
578
|
+
creatorRoyaltyAbt: string;
|
|
579
|
+
protocolFeeAbt: string;
|
|
580
|
+
uiReferrerRebateAbt: string;
|
|
581
|
+
appliedPromoterRebateBps: number;
|
|
582
|
+
sellerNetProceedsAbt: string;
|
|
583
|
+
}
|
|
584
|
+
type AcceptNftBuyOfferResult = NativeNftOfferSettlementResult;
|
|
585
|
+
/**
|
|
586
|
+
* Issue #1289 (`seq: 602` & `seq: 604`):
|
|
587
|
+
* Enshrined L1 Programmable Value Card NFT (`Stake-for-Card` & `Stake-for-Credit` — `FT-in-an-NFT-Policy-Shell`).
|
|
588
|
+
*/
|
|
589
|
+
type ValueCardMode = 'PREPAID' | 'POSTPAID';
|
|
590
|
+
type ValueCardFundingLineage = 'INSTANT' | 'ESCROW_MATURITY' | 'PROMO_SPEND_ONLY';
|
|
591
|
+
interface AttributionHopSplit {
|
|
592
|
+
recipientDid: string;
|
|
593
|
+
shareBps: number;
|
|
594
|
+
role?: string;
|
|
595
|
+
}
|
|
596
|
+
interface ValueCardPolicyEnvelope {
|
|
597
|
+
cardAssetDid: string;
|
|
598
|
+
factoryDid?: string;
|
|
599
|
+
issuerDid: string;
|
|
600
|
+
originalHolderDid: string;
|
|
601
|
+
holderDid: string;
|
|
602
|
+
authorizedSpenderDid?: string;
|
|
603
|
+
authorizedByOwnerDid?: string;
|
|
604
|
+
mode: ValueCardMode;
|
|
605
|
+
tokenAddress: string;
|
|
606
|
+
fundingLineage: ValueCardFundingLineage;
|
|
607
|
+
maturityUnlockTimestampSeconds?: number;
|
|
608
|
+
withdrawable: boolean;
|
|
609
|
+
transferrable: boolean;
|
|
610
|
+
cardStakeAddress: string;
|
|
611
|
+
initialBalance: string;
|
|
612
|
+
remainingBalance: string;
|
|
613
|
+
collateralAmount: string;
|
|
614
|
+
creditLimit: string;
|
|
615
|
+
usedCredit: string;
|
|
616
|
+
availableCredit: string;
|
|
617
|
+
billingCycleDueTimestampSeconds?: number;
|
|
618
|
+
allowedMerchantDids: string[];
|
|
619
|
+
allowedServiceTags: string[];
|
|
620
|
+
maxSpendPerTx?: string;
|
|
621
|
+
maxSpendPerWindow?: string;
|
|
622
|
+
windowDurationSeconds?: number;
|
|
623
|
+
currentWindowStartSeconds: number;
|
|
624
|
+
currentWindowSpent: string;
|
|
625
|
+
lastSpendTimestampSeconds?: number;
|
|
626
|
+
expiresAtSeconds?: number;
|
|
627
|
+
protocolFeeBps: number;
|
|
628
|
+
totalSpent: string;
|
|
629
|
+
/** Optional minimum secondary market resale price in official token `ABT` (MAP floor to prevent channel dumping, #1293 / seq: 614) */
|
|
630
|
+
minSecondarySalePriceAbt?: string;
|
|
631
|
+
/** Optional retail price paid in `ABT` at primary sale (#1293) */
|
|
632
|
+
retailPriceAbt?: string;
|
|
633
|
+
/** Optional distributor DID who referred the zero-inventory primary sale (#1293) */
|
|
634
|
+
distributorDid?: string;
|
|
635
|
+
/** Optional distributor rebate amount in `ABT` settled upon primary sale (#1293) */
|
|
636
|
+
distributorRebateAbt?: string;
|
|
637
|
+
/** Optional ingress channel label (e.g. `'STRIPE_FIAT'`, `'APPLE_PAY'`, `'NATIVE_ABT'`); rebate is ALWAYS settled in `ABT` (#1293) */
|
|
638
|
+
ingressChannel?: string;
|
|
639
|
+
/** Optional T-Point coalition cross-merchant traffic rebate bps paid to `lastRewardMerchantDid ?? issuerDid` when redeemed at another alliance merchant (`#1293` / `seq: 616-617`) */
|
|
640
|
+
crossMerchantIssuerRebateBps?: number;
|
|
641
|
+
/** Optional originating alliance merchant DID that funded the largest share of loyalty points onto this card (`#1293` / `seq: 616-617`) */
|
|
642
|
+
lastRewardMerchantDid?: string;
|
|
643
|
+
/** Tracks per-merchant cumulative loyalty reserve contributed (`merchantDid -> abtAmount`) to prevent 1-wei last-touch overwrite hijacking (`#1293`) */
|
|
644
|
+
coalitionMerchantContributedAbt?: Record<string, string>;
|
|
645
|
+
/** Tracks primary funder DID and remaining unspent primary reserve so chargeback clawbacks never confiscate third-party top-ups or fail on pro-rata rebated cards (`#1293`) */
|
|
646
|
+
primaryFunderDid?: string;
|
|
647
|
+
unspentPrimaryReserveAbt?: string;
|
|
648
|
+
/** Per-creator isolated reserve slots for permissionless VC-composed bundle cards (`#1293` / `seq: 624`) */
|
|
649
|
+
bundleComponentSlots?: Record<string, {
|
|
650
|
+
merchantDid: string;
|
|
651
|
+
serviceTag: string;
|
|
652
|
+
remainingNominalBalance: string;
|
|
653
|
+
remainingReserveAbt: string;
|
|
654
|
+
}>;
|
|
655
|
+
status: 'ACTIVE' | 'EXHAUSTED' | 'REDEEMED' | 'DEFAULT_LIQUIDATED' | 'REVOKED';
|
|
656
|
+
}
|
|
657
|
+
type ValueCardRecord = ValueCardPolicyEnvelope;
|
|
658
|
+
interface IssuePrepaidValueCardInput {
|
|
659
|
+
cardAssetDid: string;
|
|
660
|
+
factoryDid?: string;
|
|
661
|
+
issuerDid: string;
|
|
662
|
+
holderDid: string;
|
|
663
|
+
/** Optional payer of the initial deposit; defaults to `holderDid` (or `issuerDid` for promo/fiat-issued cards) */
|
|
664
|
+
funderDid?: string;
|
|
665
|
+
authorizedSpenderDid?: string;
|
|
666
|
+
tokenAddress?: string;
|
|
667
|
+
initialBalance: string;
|
|
668
|
+
fundingLineage?: ValueCardFundingLineage;
|
|
669
|
+
maturityUnlockTimestampSeconds?: number;
|
|
670
|
+
transferrable?: boolean;
|
|
671
|
+
minSecondarySalePriceAbt?: string;
|
|
672
|
+
/** Optional T-Point coalition cross-merchant traffic rebate bps (`0..MAX_VALUE_CARD_ATTRIBUTION_TOTAL_BPS`) */
|
|
673
|
+
crossMerchantIssuerRebateBps?: number;
|
|
674
|
+
allowedMerchantDids?: string[];
|
|
675
|
+
allowedServiceTags?: string[];
|
|
676
|
+
maxSpendPerTx?: string;
|
|
677
|
+
maxSpendPerWindow?: string;
|
|
678
|
+
windowDurationSeconds?: number;
|
|
679
|
+
expiresAtSeconds?: number;
|
|
680
|
+
protocolFeeBps?: number;
|
|
681
|
+
txTimestampSeconds: number;
|
|
682
|
+
}
|
|
683
|
+
interface TopUpPrepaidValueCardInput {
|
|
684
|
+
cardAssetDid: string;
|
|
685
|
+
funderDid: string;
|
|
686
|
+
topUpAmount: string;
|
|
687
|
+
maturityUnlockTimestampSeconds?: number;
|
|
688
|
+
txTimestampSeconds: number;
|
|
689
|
+
}
|
|
690
|
+
interface IssuePostpaidCreditCardInput {
|
|
691
|
+
cardAssetDid: string;
|
|
692
|
+
factoryDid?: string;
|
|
693
|
+
issuerDid: string;
|
|
694
|
+
holderDid: string;
|
|
695
|
+
authorizedSpenderDid?: string;
|
|
696
|
+
tokenAddress?: string;
|
|
697
|
+
collateralAmount: string;
|
|
698
|
+
creditLimit: string;
|
|
699
|
+
billingCycleDueTimestampSeconds: number;
|
|
700
|
+
allowedMerchantDids?: string[];
|
|
701
|
+
allowedServiceTags?: string[];
|
|
702
|
+
maxSpendPerTx?: string;
|
|
703
|
+
maxSpendPerWindow?: string;
|
|
704
|
+
windowDurationSeconds?: number;
|
|
705
|
+
expiresAtSeconds?: number;
|
|
706
|
+
protocolFeeBps?: number;
|
|
707
|
+
txTimestampSeconds: number;
|
|
708
|
+
}
|
|
709
|
+
interface AuthorizeValueCardSpenderInput {
|
|
710
|
+
cardAssetDid: string;
|
|
711
|
+
ownerDid: string;
|
|
712
|
+
authorizedSpenderDid?: string;
|
|
713
|
+
}
|
|
714
|
+
interface SpendValueCardInput {
|
|
715
|
+
cardAssetDid: string;
|
|
716
|
+
callerDid: string;
|
|
717
|
+
merchantDid: string;
|
|
718
|
+
spendAmount: string;
|
|
719
|
+
serviceTag?: string;
|
|
720
|
+
txTimestampSeconds: number;
|
|
721
|
+
settlementId?: string;
|
|
722
|
+
attributionHops?: AttributionHopSplit[];
|
|
723
|
+
attributionProofHash?: string;
|
|
724
|
+
}
|
|
725
|
+
interface MaturingCardSettlementRecord {
|
|
726
|
+
settlementId: string;
|
|
727
|
+
cardAssetDid: string;
|
|
728
|
+
issuerDid: string;
|
|
729
|
+
payerHolderDid: string;
|
|
730
|
+
merchantDid: string;
|
|
731
|
+
tokenAddress: string;
|
|
732
|
+
settlementStakeAddress: string;
|
|
733
|
+
grossSpendAmount: string;
|
|
734
|
+
merchantNetAmount: string;
|
|
735
|
+
protocolFeeAmount: string;
|
|
736
|
+
attributionPayouts: Array<{
|
|
737
|
+
recipientDid: string;
|
|
738
|
+
amount: string;
|
|
739
|
+
shareBps: number;
|
|
740
|
+
role?: string;
|
|
741
|
+
}>;
|
|
742
|
+
attributionProofHash?: string;
|
|
743
|
+
unlockAtTimestampSeconds: number;
|
|
744
|
+
status: 'MATURING' | 'RELEASED' | 'CLAWED_BACK';
|
|
745
|
+
}
|
|
746
|
+
interface SpendValueCardResult {
|
|
747
|
+
blockResult: TransactionBlockResult;
|
|
748
|
+
postConditions: TransactionBlockPostConditions;
|
|
749
|
+
clearSigningPreview: WalletClearSigningPreview;
|
|
750
|
+
card: ValueCardRecord;
|
|
751
|
+
settlementMode: 'INSTANT_LIQUID' | 'MATURING_ESCROW_STAKE';
|
|
752
|
+
grossSpendAmount: string;
|
|
753
|
+
merchantNetAmount: string;
|
|
754
|
+
protocolFeeAmount: string;
|
|
755
|
+
crossMerchantIssuerRebateAmount?: string;
|
|
756
|
+
crossMerchantIssuerRebateRecipientDid?: string;
|
|
757
|
+
attributionPayouts: Array<{
|
|
758
|
+
recipientDid: string;
|
|
759
|
+
amount: string;
|
|
760
|
+
shareBps: number;
|
|
761
|
+
role?: string;
|
|
762
|
+
}>;
|
|
763
|
+
maturingSettlement?: MaturingCardSettlementRecord;
|
|
764
|
+
}
|
|
765
|
+
interface ReleaseMaturedCardSettlementInput {
|
|
766
|
+
settlementId: string;
|
|
767
|
+
callerDid: string;
|
|
768
|
+
txTimestampSeconds: number;
|
|
769
|
+
}
|
|
770
|
+
interface ClawbackUnmaturedCardSettlementInput {
|
|
771
|
+
settlementId: string;
|
|
772
|
+
callerDid: string;
|
|
773
|
+
reason: string;
|
|
774
|
+
txTimestampSeconds: number;
|
|
775
|
+
revokeRemainingCardBalance?: boolean;
|
|
776
|
+
}
|
|
777
|
+
interface RedeemPrepaidValueCardInput {
|
|
778
|
+
cardAssetDid: string;
|
|
779
|
+
holderDid: string;
|
|
780
|
+
redeemAmount?: string;
|
|
781
|
+
txTimestampSeconds: number;
|
|
782
|
+
}
|
|
783
|
+
interface SettlePostpaidValueCardInput {
|
|
784
|
+
cardAssetDid: string;
|
|
785
|
+
payerDid: string;
|
|
786
|
+
repayAmount?: string;
|
|
787
|
+
nextBillingCycleDueTimestampSeconds?: number;
|
|
788
|
+
txTimestampSeconds: number;
|
|
789
|
+
}
|
|
790
|
+
interface LiquidateDefaultedPostpaidCardInput {
|
|
791
|
+
cardAssetDid: string;
|
|
792
|
+
callerDid: string;
|
|
793
|
+
txTimestampSeconds: number;
|
|
794
|
+
}
|
|
795
|
+
interface ClosePostpaidCreditCardInput {
|
|
796
|
+
cardAssetDid: string;
|
|
797
|
+
holderDid: string;
|
|
798
|
+
txTimestampSeconds: number;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Issue #1293 (`seq: 614`):
|
|
802
|
+
* Zero-Inventory JIT Dedicated ValueCard Retail Sale + Post-Sale `ABT` Rebate Settlement + Anti-Dumping MAP Floor.
|
|
803
|
+
*/
|
|
804
|
+
interface MaturingDistributorRebateRecord {
|
|
805
|
+
rebateSettlementId: string;
|
|
806
|
+
cardAssetDid: string;
|
|
807
|
+
issuerDid: string;
|
|
808
|
+
funderDid: string;
|
|
809
|
+
buyerDid: string;
|
|
810
|
+
distributorDid: string;
|
|
811
|
+
scopeId: string;
|
|
812
|
+
ingressChannel: string;
|
|
813
|
+
retailPriceAbt: string;
|
|
814
|
+
rebateBps: number;
|
|
815
|
+
rebateAmountAbt: string;
|
|
816
|
+
rebateStakeAddress: string;
|
|
817
|
+
unlockAtTimestampSeconds: number;
|
|
818
|
+
status: 'MATURING' | 'RELEASED' | 'CLAWED_BACK';
|
|
819
|
+
}
|
|
820
|
+
interface PurchaseDedicatedValueCardInput {
|
|
821
|
+
cardAssetDid: string;
|
|
822
|
+
factoryDid?: string;
|
|
823
|
+
issuerDid: string;
|
|
824
|
+
/** End retail customer receiving the ValueCard NFT (`holderDid`) */
|
|
825
|
+
buyerDid: string;
|
|
826
|
+
/** Optional payer / fiat on-ramp gateway settling `retailPriceAbt` in official token `ABT`; defaults to `buyerDid` */
|
|
827
|
+
funderDid?: string;
|
|
828
|
+
/** Channel partner / distributor / KOL receiving the post-sale `ABT` rebate */
|
|
829
|
+
distributorDid: string;
|
|
830
|
+
/** Ingress channel label (e.g. `'STRIPE_FIAT'`, `'APPLE_PAY'`, `'USDT_ONRAMP'`, `'NATIVE_ABT'`); rebate is ALWAYS paid in `ABT` */
|
|
831
|
+
ingressChannel?: string;
|
|
832
|
+
/** Nominal service value loaded onto the card (e.g. `'100'`) */
|
|
833
|
+
faceValueAmount: string;
|
|
834
|
+
/** Full retail price paid in official token `ABT` (e.g. `'100'`) */
|
|
835
|
+
retailPriceAbt: string;
|
|
836
|
+
/** Base distributor rebate in bps (`1..MAX_PROMOTER_REBATE_BPS`, e.g. `5000` = 50%) */
|
|
837
|
+
distributorRebateBps?: number;
|
|
838
|
+
/** Optional volume-escalating distributor rebate tiers (`minCumulativeVolumeAbt` / `minThreshold` -> `rebateBps`) */
|
|
839
|
+
escalatingRebateTiers?: EscalatingPromoterTier[];
|
|
840
|
+
/** Funding lineage (`'INSTANT'` or `'ESCROW_MATURITY'` for reversible fiat ingress) */
|
|
841
|
+
fundingLineage?: 'INSTANT' | 'ESCROW_MATURITY';
|
|
842
|
+
maturityUnlockTimestampSeconds?: number;
|
|
843
|
+
rebateSettlementId?: string;
|
|
844
|
+
transferrable?: boolean;
|
|
845
|
+
/** Minimum secondary market resale price in `ABT` (defaults to `retailPriceAbt`, must be `>= retailPriceAbt`) */
|
|
846
|
+
minSecondarySalePriceAbt?: string;
|
|
847
|
+
/** Mandatory non-empty merchant allowlist for dedicated service cards */
|
|
848
|
+
allowedMerchantDids: string[];
|
|
849
|
+
allowedServiceTags?: string[];
|
|
850
|
+
authorizedSpenderDid?: string;
|
|
851
|
+
maxSpendPerTx?: string;
|
|
852
|
+
maxSpendPerWindow?: string;
|
|
853
|
+
windowDurationSeconds?: number;
|
|
854
|
+
expiresAtSeconds?: number;
|
|
855
|
+
protocolFeeBps?: number;
|
|
856
|
+
crossMerchantIssuerRebateBps?: number;
|
|
857
|
+
/**
|
|
858
|
+
* Optional minimum `Stake-for-Distributor` (`ABT`) required in `statedb.stake` for `distributorDid` (`#1296` / `seq: 627`).
|
|
859
|
+
*/
|
|
860
|
+
minDistributorStakeAbt?: string;
|
|
861
|
+
txTimestampSeconds: number;
|
|
862
|
+
}
|
|
863
|
+
interface PurchaseDedicatedValueCardResult {
|
|
864
|
+
blockResult: TransactionBlockResult;
|
|
865
|
+
card: ValueCardRecord;
|
|
866
|
+
retailPriceAbt: string;
|
|
867
|
+
faceValueAmount: string;
|
|
868
|
+
appliedDistributorRebateBps: number;
|
|
869
|
+
distributorRebateAbt: string;
|
|
870
|
+
netCardReserveAbt: string;
|
|
871
|
+
rebateSettlementMode: 'INSTANT_ABT' | 'MATURING_ESCROW_ABT';
|
|
872
|
+
distributorCumulativeVolumeAbt: string;
|
|
873
|
+
maturingRebate?: MaturingDistributorRebateRecord;
|
|
874
|
+
}
|
|
875
|
+
interface ReleaseMaturedDistributorRebateInput {
|
|
876
|
+
rebateSettlementId: string;
|
|
877
|
+
callerDid: string;
|
|
878
|
+
txTimestampSeconds: number;
|
|
879
|
+
}
|
|
880
|
+
interface ClawbackUnmaturedDistributorRebateInput {
|
|
881
|
+
rebateSettlementId: string;
|
|
882
|
+
callerDid: string;
|
|
883
|
+
reason: string;
|
|
884
|
+
txTimestampSeconds: number;
|
|
885
|
+
revokeRemainingCardBalance?: boolean;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Issue #1296 (`seq: 627` — `Stake-for-Distributor` zero-sink-cost `ABT` bond for ValueCard & Composable Bundle distribution):
|
|
889
|
+
* - Distributors / KOLs / bundle curators stake `ABT` into `statedb.stake` at `deriveValueCardDistributorStakeAddress(distributorDid, officialTokenAddress)`.
|
|
890
|
+
* - Prevents Sybil spam while freezing `ABT` liquidity for the ARC ecosystem; if the distributor's business does not work out,
|
|
891
|
+
* they can call `unstakeValueCardDistributor` to recover 100% of their staked `ABT` once any pending maturing rebates and cooldowns clear.
|
|
892
|
+
*/
|
|
893
|
+
interface ValueCardDistributorStakeRecord {
|
|
894
|
+
distributorDid: string;
|
|
895
|
+
stakeAddress: string;
|
|
896
|
+
tokenAddress: string;
|
|
897
|
+
stakedAbt: string;
|
|
898
|
+
unlockCooldownSeconds: number;
|
|
899
|
+
lastStakedAtSeconds: number;
|
|
900
|
+
activeMaturingRebateIds: string[];
|
|
901
|
+
status: 'ACTIVE' | 'UNSTAKED';
|
|
902
|
+
}
|
|
903
|
+
interface StakeForValueCardDistributorInput {
|
|
904
|
+
distributorDid: string;
|
|
905
|
+
stakeAmountAbt: string;
|
|
906
|
+
unlockCooldownSeconds?: number;
|
|
907
|
+
txTimestampSeconds: number;
|
|
908
|
+
}
|
|
909
|
+
interface StakeForValueCardDistributorResult {
|
|
910
|
+
blockResult: TransactionBlockResult;
|
|
911
|
+
distributorStake: ValueCardDistributorStakeRecord;
|
|
912
|
+
addedStakeAbt: string;
|
|
913
|
+
totalStakedAbt: string;
|
|
914
|
+
}
|
|
915
|
+
interface UnstakeValueCardDistributorInput {
|
|
916
|
+
distributorDid: string;
|
|
917
|
+
/** Optional partial unstake amount; defaults to full `stakedAbt` when omitted */
|
|
918
|
+
unstakeAmountAbt?: string;
|
|
919
|
+
txTimestampSeconds: number;
|
|
920
|
+
}
|
|
921
|
+
interface UnstakeValueCardDistributorResult {
|
|
922
|
+
blockResult: TransactionBlockResult;
|
|
923
|
+
distributorStake: ValueCardDistributorStakeRecord;
|
|
924
|
+
unstakedAbt: string;
|
|
925
|
+
remainingStakedAbt: string;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* Issue #1296 (`seq: 629` & `seq: 631` — Rule-10b5-1 Style Automated Passive POL Rebalance & 5 Extreme-Case Circuit Breakers):
|
|
929
|
+
* - Passively recycles a bounded slice of `chainRevenueDid`'s accumulated `ABT` fees into passive AMM liquidity (`poolStakeAddress`),
|
|
930
|
+
* minting permanently locked LP shares (`lockedLpShares` -> `burnSinkDid`) with zero wash trading.
|
|
931
|
+
* - Protected by:
|
|
932
|
+
* 1. Dual-Window TWAP vs Spot Deviation Circuit Breaker (`TWAP_DEVIATION_CIRCUIT_BREAKER`, default max `500 bps` = 5%);
|
|
933
|
+
* 2. Asymmetric High-Water-Mark Ratchet (`ASYMMETRIC_HIGH_WATER_MARK_RATCHET`, `tickLower >= TWAP_24h * 1.05` and `TWAP_24h >= HWM * 0.90`);
|
|
934
|
+
* 3. 24h Epoch Drip Cap (`EPOCH_POL_DRIP_CAP_EXCEEDED`, default max `100 bps` = 1% of `chainRevenueDid` per 24h epoch).
|
|
935
|
+
*/
|
|
936
|
+
interface ExecuteProgrammaticPolRebalanceInput {
|
|
937
|
+
callerDid: string;
|
|
938
|
+
factoryAddress: string;
|
|
939
|
+
releaseAbtAmount: string;
|
|
940
|
+
/**
|
|
941
|
+
* Liquidity injection mode (`#1296` / `seq: 639`):
|
|
942
|
+
* - `'DUAL_SIDED_PROPORTIONAL'` (default): pairs `releaseAbtAmount` with proportional `pool.tokenAddress` from `chainRevenueDid`;
|
|
943
|
+
* - `'SINGLE_SIDED_ABT_UPPER_RANGE'`: Uniswap V3/V4 style 100% single-sided `ABT` upper-scarcity range order (`SpotPrice < tickLower < tickUpper`, `0` paired `USDC` required!).
|
|
944
|
+
*/
|
|
945
|
+
liquidityMode?: 'DUAL_SIDED_PROPORTIONAL' | 'SINGLE_SIDED_ABT_UPPER_RANGE';
|
|
946
|
+
spotPriceUsdScaled: string;
|
|
947
|
+
fastTwap1hUsdScaled: string;
|
|
948
|
+
slowTwap24hUsdScaled: string;
|
|
949
|
+
tickLowerPriceUsdScaled: string;
|
|
950
|
+
tickUpperPriceUsdScaled: string;
|
|
951
|
+
/**
|
|
952
|
+
* Optional cost-basis floor (`USD` scaled) at which the treasury/protocol acquired or bought back `ABT` (`#1296` / `seq: 634`).
|
|
953
|
+
* Enforces Strict Zero-Loss Ratchet: `tickLowerPriceUsdScaled >= max(highWaterMarkTwapUsdScaled, abtAcquisitionCostBasisUsdScaled * (1 + minProfitSpreadBps))`.
|
|
954
|
+
*/
|
|
955
|
+
abtAcquisitionCostBasisUsdScaled?: string;
|
|
956
|
+
/**
|
|
957
|
+
* Optional upper bound (`USD` scaled) of the passive lower USD buyback support wall (`#1296` / `seq: 634`).
|
|
958
|
+
* Enforces Strict Zero-Loss Ratchet: `lowerBuybackTickUpperPriceUsdScaled <= effectiveReleasePrice * (1 - minProfitSpreadBps)`
|
|
959
|
+
* so recovered `USD` is NEVER spent buying back `ABT` at a higher or equal price than it was released at.
|
|
960
|
+
*/
|
|
961
|
+
lowerBuybackTickUpperPriceUsdScaled?: string;
|
|
962
|
+
/** Minimum mandatory positive profit spread in basis points (default `500` bps = 5%, min `100` bps = 1%) between ABT release and USD buyback (`#1296` / `seq: 634`) */
|
|
963
|
+
minProfitSpreadBps?: number;
|
|
964
|
+
/**
|
|
965
|
+
* Optional total supply of the official token (`#1296` / `seq: 637` — U.S. CLARITY Act `< 20%` (`19.9%`) Decentralization Safe-Harbor Target).
|
|
966
|
+
* When provided, automatic de-allocation from `chainRevenueDid` halts (`CLARITY_RETENTION_FLOOR_REACHED`) if releasing `releaseAbtAmount`
|
|
967
|
+
* would reduce `chainRevenueDid`'s retained balance below `officialTokenTotalSupply * minTreasuryRetainedSupplyBps / 10000` (default `1990` bps = `19.9%`).
|
|
968
|
+
*/
|
|
969
|
+
officialTokenTotalSupply?: string;
|
|
970
|
+
/** Minimum retained Treasury supply share in basis points (default `1990` bps = `19.9%` under CLARITY Act safe-harbor target, `#1296` / `seq: 637`) */
|
|
971
|
+
minTreasuryRetainedSupplyBps?: number;
|
|
972
|
+
/**
|
|
973
|
+
* Optional ARC on-chain real economic activity / net `Stake-for-X` lockup delta (`ABT`) in the current epoch (`#1296` / `seq: 644`).
|
|
974
|
+
* When provided, enforces Dual-Key Release Gate: `epochCumulativeReleasedAbt <= onChainEconomicActivityAbt * maxActivityReplenishRatioBps / 10000`
|
|
975
|
+
* (default `maxActivityReplenishRatioBps = 8000` = `80%`, ensuring circulating float remains net-deflationary and zero ABT is released on pure external speculation).
|
|
976
|
+
*/
|
|
977
|
+
onChainEconomicActivityAbt?: string;
|
|
978
|
+
/** Maximum replenishment ratio in basis points relative to `onChainEconomicActivityAbt` (default `8000` bps = 80%, `#1296` / `seq: 644`) */
|
|
979
|
+
maxActivityReplenishRatioBps?: number;
|
|
980
|
+
maxTwapDeviationBps?: number;
|
|
981
|
+
maxEpochReleaseBps?: number;
|
|
982
|
+
txTimestampSeconds: number;
|
|
983
|
+
}
|
|
984
|
+
interface ExecuteProgrammaticPolRebalanceResult {
|
|
985
|
+
blockResult: TransactionBlockResult;
|
|
986
|
+
factoryAddress: string;
|
|
987
|
+
liquidityMode: 'DUAL_SIDED_PROPORTIONAL' | 'SINGLE_SIDED_ABT_UPPER_RANGE';
|
|
988
|
+
releasedAbtAmount: string;
|
|
989
|
+
pairedTokenAmount: string;
|
|
990
|
+
mintedLockedLpShares: string;
|
|
991
|
+
highWaterMarkTwapUsdScaled: string;
|
|
992
|
+
lastAbtReleasePriceUsdScaled: string;
|
|
993
|
+
minAbtReleasePriceUsdScaled: string;
|
|
994
|
+
abtAcquisitionCostBasisUsdScaled: string;
|
|
995
|
+
epochIndex: number;
|
|
996
|
+
epochCumulativeReleasedAbt: string;
|
|
997
|
+
pool: UnifiedAbtExchangePoolState;
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* Issue #1296 (`seq: 629` & `seq: 631` — Damped TWAP Purchasing-Power Stake Floor Recalibration):
|
|
1001
|
+
* - Smoothly adjusts `minDistributorStakeAbt` inversely with `slowTwap24hUsdScaled` so USD entry cost remains stable
|
|
1002
|
+
* when `ABT` appreciates due to ecosystem staking scarcity.
|
|
1003
|
+
* - Protected by Dual-Window TWAP deviation freeze (`<= 5%`), 1-per-24h epoch cooldown, max $\pm 10\%$ step damping per epoch,
|
|
1004
|
+
* and hard `[hardMinStakeAbt, hardMaxStakeAbt]` bounds.
|
|
1005
|
+
*/
|
|
1006
|
+
interface RecalibrateDynamicStakeFloorInput {
|
|
1007
|
+
callerDid: string;
|
|
1008
|
+
targetStakeUsdScaled: string;
|
|
1009
|
+
unitAbtScale?: string;
|
|
1010
|
+
spotPriceUsdScaled: string;
|
|
1011
|
+
fastTwap1hUsdScaled: string;
|
|
1012
|
+
slowTwap24hUsdScaled: string;
|
|
1013
|
+
hardMinStakeAbt: string;
|
|
1014
|
+
hardMaxStakeAbt: string;
|
|
1015
|
+
maxTwapDeviationBps?: number;
|
|
1016
|
+
maxStepBpsPerEpoch?: number;
|
|
1017
|
+
txTimestampSeconds: number;
|
|
1018
|
+
}
|
|
1019
|
+
interface RecalibrateDynamicStakeFloorResult {
|
|
1020
|
+
previousMinDistributorStakeAbt: string;
|
|
1021
|
+
rawTargetStakeAbt: string;
|
|
1022
|
+
nextMinDistributorStakeAbt: string;
|
|
1023
|
+
appliedStepBps: number;
|
|
1024
|
+
epochIndex: number;
|
|
1025
|
+
policy: GovernanceExchangePolicy;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* Issue #1293 (`seq: 616` & `seq: 617` — T-Point Coalition Loyalty Reserve Deposit):
|
|
1029
|
+
* Allows any coalition merchant A (`merchantFunderDid`) to reward a customer's Universal Loyalty `ValueCard`
|
|
1030
|
+
* by locking real `ABT` reserve (`reserveAbtAmount`) into `cardStakeAddress` (`Stake-for-Card`), so that when
|
|
1031
|
+
* the customer later redeems at Merchant B (`spendValueCard`), Merchant B is paid in real `ABT` and Merchant A
|
|
1032
|
+
* automatically receives the cross-merchant traffic rebate (`crossMerchantIssuerRebateBps`).
|
|
1033
|
+
*/
|
|
1034
|
+
interface RewardCoalitionValueCardInput {
|
|
1035
|
+
cardAssetDid: string;
|
|
1036
|
+
merchantFunderDid: string;
|
|
1037
|
+
/** Nominal loyalty balance / points added to `remainingBalance` */
|
|
1038
|
+
rewardBalanceAmount: string;
|
|
1039
|
+
/** Real `ABT` reserve locked into `cardStakeAddress` (defaults to `rewardBalanceAmount` for 1:1 T-Point reserve) */
|
|
1040
|
+
reserveAbtAmount?: string;
|
|
1041
|
+
txTimestampSeconds: number;
|
|
1042
|
+
}
|
|
1043
|
+
interface RewardCoalitionValueCardResult {
|
|
1044
|
+
blockResult: TransactionBlockResult;
|
|
1045
|
+
card: ValueCardRecord;
|
|
1046
|
+
rewardBalanceAmount: string;
|
|
1047
|
+
lockedReserveAbtAmount: string;
|
|
1048
|
+
originatingMerchantDid: string;
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Issue #1293 (`seq: 624` — Permissionless Composable Commerce via Open Rule VCs):
|
|
1052
|
+
* Any Creator / Merchant (`issuerDid`) can sign an `OpenComposingRuleVc` declaring their service component,
|
|
1053
|
+
* minimum net `ABT` reserve floor (`minNetReserveAbt`), minimum bundle retail floor (`minBundleRetailPriceAbt`),
|
|
1054
|
+
* and maximum distributor rebate (`maxDistributorRebateBps`).
|
|
1055
|
+
* Any curator / distributor (`distributorDid`) can permissionlessly combine multiple Creators' rule VCs
|
|
1056
|
+
* into a Bundle ValueCard (`composePermissionlessBundleValueCard`) with 100% automated on-chain verification,
|
|
1057
|
+
* approval, per-creator slot reserve isolation, and instant `ABT` rebate settlement.
|
|
1058
|
+
*/
|
|
1059
|
+
interface OpenComposingRuleClaims {
|
|
1060
|
+
vcId: string;
|
|
1061
|
+
issuerDid: string;
|
|
1062
|
+
serviceTag: string;
|
|
1063
|
+
componentFaceValueAbt: string;
|
|
1064
|
+
minNetReserveAbt: string;
|
|
1065
|
+
minBundleRetailPriceAbt: string;
|
|
1066
|
+
maxDistributorRebateBps: number;
|
|
1067
|
+
/** Optional minimum `Stake-for-Distributor` (`ABT`) required by this Creator for any curator/distributor bundling this component (`#1296` / `seq: 627`) */
|
|
1068
|
+
minDistributorStakeAbt?: string;
|
|
1069
|
+
escalatingRebateTiers?: EscalatingPromoterTier[];
|
|
1070
|
+
issuedAtSeconds: number;
|
|
1071
|
+
expiresAtSeconds: number;
|
|
1072
|
+
}
|
|
1073
|
+
interface SignedOpenComposingRuleVc {
|
|
1074
|
+
claims: OpenComposingRuleClaims;
|
|
1075
|
+
issuerDid: string;
|
|
1076
|
+
issuerPk: string;
|
|
1077
|
+
signature: string;
|
|
1078
|
+
digest: string;
|
|
1079
|
+
}
|
|
1080
|
+
interface BundleComponentAllocationInput {
|
|
1081
|
+
ruleVc: SignedOpenComposingRuleVc;
|
|
1082
|
+
/** Net `ABT` reserve allocated to this creator's component slot (`>= ruleVc.claims.minNetReserveAbt`) */
|
|
1083
|
+
allocatedNetReserveAbt: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface ComposePermissionlessBundleValueCardInput {
|
|
1086
|
+
cardAssetDid: string;
|
|
1087
|
+
factoryDid?: string;
|
|
1088
|
+
/** End retail customer receiving the Bundle ValueCard NFT (`holderDid`) */
|
|
1089
|
+
buyerDid: string;
|
|
1090
|
+
/** Optional payer / fiat on-ramp gateway settling `bundleRetailPriceAbt` in `ABT`; defaults to `buyerDid` */
|
|
1091
|
+
funderDid?: string;
|
|
1092
|
+
/** Permissionless curator / distributor assembling the bundle and receiving the `ABT` rebate */
|
|
1093
|
+
distributorDid: string;
|
|
1094
|
+
ingressChannel?: string;
|
|
1095
|
+
/** Total retail price paid in official token `ABT` for the composed bundle */
|
|
1096
|
+
bundleRetailPriceAbt: string;
|
|
1097
|
+
/** Signed `OpenComposingRuleVc` components + per-component net `ABT` reserve allocations */
|
|
1098
|
+
components: BundleComponentAllocationInput[];
|
|
1099
|
+
/** Optional explicit distributor rebate bps (`<= min(component.maxDistributorRebateBps)`) */
|
|
1100
|
+
distributorRebateBps?: number;
|
|
1101
|
+
/** Optional minimum `Stake-for-Distributor` (`ABT`) required for `distributorDid` (`#1296` / `seq: 627`) */
|
|
1102
|
+
minDistributorStakeAbt?: string;
|
|
1103
|
+
fundingLineage?: 'INSTANT' | 'ESCROW_MATURITY';
|
|
1104
|
+
maturityUnlockTimestampSeconds?: number;
|
|
1105
|
+
rebateSettlementId?: string;
|
|
1106
|
+
transferrable?: boolean;
|
|
1107
|
+
minSecondarySalePriceAbt?: string;
|
|
1108
|
+
authorizedSpenderDid?: string;
|
|
1109
|
+
maxSpendPerTx?: string;
|
|
1110
|
+
maxSpendPerWindow?: string;
|
|
1111
|
+
windowDurationSeconds?: number;
|
|
1112
|
+
expiresAtSeconds?: number;
|
|
1113
|
+
protocolFeeBps?: number;
|
|
1114
|
+
txTimestampSeconds: number;
|
|
1115
|
+
}
|
|
1116
|
+
interface ComposePermissionlessBundleValueCardResult {
|
|
1117
|
+
blockResult: TransactionBlockResult;
|
|
1118
|
+
card: ValueCardRecord;
|
|
1119
|
+
bundleRetailPriceAbt: string;
|
|
1120
|
+
totalBundleFaceValueAbt: string;
|
|
1121
|
+
appliedDistributorRebateBps: number;
|
|
1122
|
+
distributorRebateAbt: string;
|
|
1123
|
+
netBundleReserveAbt: string;
|
|
1124
|
+
rebateSettlementMode: 'INSTANT_ABT' | 'MATURING_ESCROW_ABT';
|
|
1125
|
+
approvedComponentCount: number;
|
|
1126
|
+
maturingRebate?: MaturingDistributorRebateRecord;
|
|
1127
|
+
}
|
|
1128
|
+
declare function computeOpenComposingRuleVcDigest(claims: OpenComposingRuleClaims): string;
|
|
1129
|
+
declare function issueOpenComposingRuleVc(claimsInput: OpenComposingRuleClaims, signerWallet: {
|
|
1130
|
+
address: string;
|
|
1131
|
+
publicKey: string;
|
|
1132
|
+
sign: (data: Uint8Array | string, hash?: boolean) => Promise<string> | string;
|
|
1133
|
+
}): Promise<SignedOpenComposingRuleVc>;
|
|
1134
|
+
declare function verifyOpenComposingRuleVc(vc: SignedOpenComposingRuleVc, currentTimestampSeconds: number): Promise<{
|
|
1135
|
+
valid: boolean;
|
|
1136
|
+
reason?: string;
|
|
1137
|
+
}>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Deterministic on-chain evaluator for `Stake-for-Offer` NFT target & structured attribute predicates (`#1287` / `seq: 581` & `seq: 582`).
|
|
1140
|
+
*/
|
|
1141
|
+
declare function evaluateNftAttributePredicates(assetState: Record<string, any>, criteriaOrPredicates?: {
|
|
1142
|
+
targetAssetDid?: string;
|
|
1143
|
+
targetFactoryDid?: string;
|
|
1144
|
+
attributePredicates?: NftAttributePredicate[];
|
|
1145
|
+
requireUnconsumed?: boolean;
|
|
1146
|
+
} | NftAttributePredicate[], requireUnconsumedArg?: boolean): {
|
|
1147
|
+
matched: boolean;
|
|
1148
|
+
reason?: string;
|
|
1149
|
+
};
|
|
1150
|
+
/**
|
|
1151
|
+
* Computes the deterministic SHA3-256 digest of the canonical self-operated bridge liability disclaimer (#1283).
|
|
1152
|
+
*/
|
|
1153
|
+
declare function computeSelfBridgeDisclaimerDigest(bridgeId: string, tokenAddress: string, issuerDid: string): string;
|
|
1154
|
+
/**
|
|
1155
|
+
* Epic #1284 (`#1279`–`#1283`, `#1285`) & Issue `#1287` (`seq: 580`–`586`):
|
|
1156
|
+
* OCAP Native Protocol-Level Exchange Engine:
|
|
1157
|
+
* - Zero Official Token Burn & 100% Circular `chainRevenueDid` (`treasuryVaultDid`);
|
|
1158
|
+
* - Configurable `officialTokenAddress` (`abtTokenAddress` alias);
|
|
1159
|
+
* - First-Class `Stake-for-X` (`statedb.stake`): `Stake-for-Token` (permanently non-revocable while `totalSupply > 0`,
|
|
1160
|
+
* unlockable only when 100% of supply is burned/retired), `Stake-for-Liquidity`, `Stake-for-Bid`, `Stake-for-Bridge`,
|
|
1161
|
+
* and `Stake-for-Offer` (Specific Item, Collection Floor, and Structured `IAssetState.data` Attribute Predicates);
|
|
1162
|
+
* - Escalating Tiered Marketing / Promoter Rebates (`EscalatingPromoterTier[]`) across FT Swaps and NFT Markets.
|
|
1163
|
+
*/
|
|
1164
|
+
declare class OcapNativeExchangeEngine {
|
|
1165
|
+
readonly officialTokenAddress: string;
|
|
1166
|
+
readonly abtTokenAddress: string;
|
|
1167
|
+
readonly governanceDid: string;
|
|
1168
|
+
private policy;
|
|
1169
|
+
private readonly officialBridgeValidators;
|
|
1170
|
+
private readonly ofacSet;
|
|
1171
|
+
private readonly tokensByAddress;
|
|
1172
|
+
private readonly tokenAddressBySymbol;
|
|
1173
|
+
private readonly poolsByFactoryAddress;
|
|
1174
|
+
private readonly factoryAddressByToken;
|
|
1175
|
+
private readonly selfBridgesById;
|
|
1176
|
+
private readonly nftListingsById;
|
|
1177
|
+
private readonly activeListingIdByAsset;
|
|
1178
|
+
private readonly nftOffersById;
|
|
1179
|
+
private readonly valueCardsByDid;
|
|
1180
|
+
private readonly maturingSettlementsById;
|
|
1181
|
+
private readonly maturingDistributorRebatesById;
|
|
1182
|
+
private readonly distributorStakesByDid;
|
|
1183
|
+
private readonly polHighWaterMarkTwapByFactory;
|
|
1184
|
+
private readonly polLastReleasePriceByFactory;
|
|
1185
|
+
private readonly polMinReleasePriceByFactory;
|
|
1186
|
+
private readonly polAbtCostBasisByFactory;
|
|
1187
|
+
private readonly polReleasedAbtByEpoch;
|
|
1188
|
+
private readonly polMaxReleaseBpsByEpoch;
|
|
1189
|
+
private lastPolRebalanceEpoch;
|
|
1190
|
+
private lastStakeRecalibrationEpoch;
|
|
1191
|
+
private readonly promoterTiersByScope;
|
|
1192
|
+
private readonly escalatingPromoterTiersByTarget;
|
|
1193
|
+
private readonly promoterCumulativeVolumeAbt;
|
|
1194
|
+
private readonly skuFactoryListingsByAddress;
|
|
1195
|
+
private readonly skuOrdersById;
|
|
1196
|
+
private readonly categoryDemandBountiesById;
|
|
1197
|
+
private readonly minerShopPersonasByDid;
|
|
1198
|
+
private readonly shopPersonaOwnerByPersonaDid;
|
|
1199
|
+
private readonly usedPersonaStakeAddresses;
|
|
1200
|
+
private readonly usedPersonaStakeNullifiers;
|
|
1201
|
+
private readonly minerRevenueBadgesById;
|
|
1202
|
+
constructor(options: {
|
|
1203
|
+
officialTokenAddress?: string;
|
|
1204
|
+
abtTokenAddress?: string;
|
|
1205
|
+
governanceAuthorityDid?: string;
|
|
1206
|
+
governanceDid?: string;
|
|
1207
|
+
chainRevenueDid?: string;
|
|
1208
|
+
treasuryVaultDid?: string;
|
|
1209
|
+
burnSinkDid?: string;
|
|
1210
|
+
bondEscrowVaultDid: string;
|
|
1211
|
+
officialBridgeValidators?: Iterable<string>;
|
|
1212
|
+
ofacBlocklist?: Iterable<string>;
|
|
1213
|
+
initialPolicyOverrides?: Partial<Pick<GovernanceExchangePolicy, 'ftIssuanceFeeAbt' | 'issuanceFeeBurnShareBps' | 'minIssuanceStakeAbt' | 'minGraduationReserveAbt' | 'minGraduationUniqueHolders' | 'graduationFeeAbt' | 'defaultSwapFeeBps' | 'protocolFeeShareBps' | 'maxSwapPriceImpactBps' | 'selfBridgeRegistrationFeeAbt' | 'minSelfBridgeSecurityBondAbt' | 'minDistributorStakeAbt'>>;
|
|
1214
|
+
});
|
|
1215
|
+
private validatePolicyBounds;
|
|
1216
|
+
getGovernancePolicy(): GovernanceExchangePolicy;
|
|
1217
|
+
/**
|
|
1218
|
+
* Issue #1279, #1282 & #1287:
|
|
1219
|
+
* Dynamically updates the on-chain Governance Exchange Policy (including `ftIssuanceFeeAbt`,
|
|
1220
|
+
* `minIssuanceStakeAbt`, `minGraduationReserveAbt`, `minGraduationUniqueHolders`, `graduationFeeAbt`,
|
|
1221
|
+
* and swap fee parameters).
|
|
1222
|
+
* Strictly requires `callerDid === governanceAuthorityDid`, monotonically increasing `nextPolicyEpoch`,
|
|
1223
|
+
* and `issuanceFeeBurnShareBps === 0`.
|
|
1224
|
+
*/
|
|
1225
|
+
updateGovernanceExchangePolicy(input: UpdateGovernanceExchangePolicyInput): GovernanceExchangePolicy;
|
|
1226
|
+
/**
|
|
1227
|
+
* Validates and normalizes an array of `EscalatingPromoterTier` items (`#1287` / `seq: 581`).
|
|
1228
|
+
*/
|
|
1229
|
+
private validatePromoterTiers;
|
|
1230
|
+
/**
|
|
1231
|
+
* Issue #1287 (`seq: 581`):
|
|
1232
|
+
* Configures escalating tiered marketing / promoter rebate tiers for a specific `factoryAddress`,
|
|
1233
|
+
* `listingId`, `offerId`, or `'GLOBAL_DEFAULT'`.
|
|
1234
|
+
*/
|
|
1235
|
+
configureEscalatingPromoterPolicy(input: ConfigureEscalatingPromoterPolicyInput): EscalatingPromoterTier[];
|
|
1236
|
+
/**
|
|
1237
|
+
* Resolves the highest matching `promoterBps` tier for a given `promoterDid` and `dealAmountAbtBn` (`#1287` / `seq: 581`).
|
|
1238
|
+
*/
|
|
1239
|
+
resolveEscalatingPromoterBps(promoterDid: string | undefined, dealAmountAbtBn: BN, scopedTiers?: EscalatingPromoterTier[], fallbackBps?: number): number;
|
|
1240
|
+
private recordPromoterVolume;
|
|
1241
|
+
getPromoterCumulativeVolumeAbt(promoterDid: string): string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Issue #1279 & #1287 (`seq: 580` & `seq: 585`):
|
|
1244
|
+
* Permissionless user FT creation (`create_token`) with:
|
|
1245
|
+
* 1. Mandatory governance-adjustable `ftIssuanceFeeAbt` (`default: 100`, 100% routed to `chainRevenueDid`, zero official token burn);
|
|
1246
|
+
* 2. Permanent baseline `Stake-for-Token` (`stakeAmountAbt >= policy.minIssuanceStakeAbt`, default `100` official tokens)
|
|
1247
|
+
* locked in `statedb.stake` at `toStakeAddress(issuerDid, officialTokenAddress, symbol)` with `revocable: false`
|
|
1248
|
+
* while the token is in circulation (`totalSupply > 0`).
|
|
1249
|
+
*/
|
|
1250
|
+
issuePermissionlessUserToken(input: IssuePermissionlessTokenInput, statedb: Record<string, any>): Promise<{
|
|
1251
|
+
blockResult: TransactionBlockResult;
|
|
1252
|
+
token: UserIssuedTokenRecord;
|
|
1253
|
+
}>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Issue #1287 (`seq: 585`):
|
|
1256
|
+
* Allows a holder of a user-issued token to burn their circulating token balance down toward `totalSupply === '0'`
|
|
1257
|
+
* so that once 100% of a token's circulating supply is retired, the issuer can call `retireDestroyedTokenAndUnlockStake`.
|
|
1258
|
+
*/
|
|
1259
|
+
burnCirculatingUserToken(input: BurnCirculatingUserTokenInput, statedb: Record<string, any>): Promise<{
|
|
1260
|
+
blockResult: TransactionBlockResult;
|
|
1261
|
+
remainingTotalSupply: string;
|
|
1262
|
+
}>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Issue #1287 (`seq: 585`):
|
|
1265
|
+
* Unlocks and returns the permanent baseline `Stake-for-Token` (`lockedIssuanceStakeAbt`) to `issuerDid`
|
|
1266
|
+
* ONLY when 100% of the token's circulating supply has been burned/retired (`totalSupply === '0'`) and
|
|
1267
|
+
* the token is permanently destroyed/retired.
|
|
1268
|
+
*/
|
|
1269
|
+
retireDestroyedTokenAndUnlockStake(input: RetireDestroyedTokenInput, statedb: Record<string, any>): Promise<{
|
|
1270
|
+
blockResult: TransactionBlockResult;
|
|
1271
|
+
unlockedStakeAbt: string;
|
|
1272
|
+
token: UserIssuedTokenRecord;
|
|
1273
|
+
}>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Issue #1287 (`seq: 580` & `seq: 585`):
|
|
1276
|
+
* Governance slashing of an issuer's `Stake-for-Token` (`lockedIssuanceStakeAbt`) to `chainRevenueDid`
|
|
1277
|
+
* upon verified malicious fraud or rug-pull violation.
|
|
1278
|
+
*/
|
|
1279
|
+
slashTokenIssuerStake(input: {
|
|
1280
|
+
callerDid: string;
|
|
1281
|
+
tokenAddress: string;
|
|
1282
|
+
reason: string;
|
|
1283
|
+
}, statedb: Record<string, any>): Promise<{
|
|
1284
|
+
blockResult: TransactionBlockResult;
|
|
1285
|
+
slashedAbt: string;
|
|
1286
|
+
token: UserIssuedTokenRecord;
|
|
1287
|
+
}>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Issue #1280 & #1287 (`seq: 580` & `seq: 585`):
|
|
1290
|
+
* Creates a `BONDING_CURVE` `TokenFactory` (zero initial LP capital required; buy = mint, sell = burn)
|
|
1291
|
+
* while charging `ftIssuanceFeeAbt` (100% to `chainRevenueDid`) and locking the baseline `Stake-for-Token`
|
|
1292
|
+
* (`revocable: false` while `totalSupply > 0`) in `statedb.stake`.
|
|
1293
|
+
*/
|
|
1294
|
+
createBondingCurveFactory(input: CreateBondingCurveFactoryInput, statedb: Record<string, any>): Promise<{
|
|
1295
|
+
blockResult: TransactionBlockResult;
|
|
1296
|
+
pool: UnifiedAbtExchangePoolState;
|
|
1297
|
+
token: UserIssuedTokenRecord;
|
|
1298
|
+
}>;
|
|
1299
|
+
/**
|
|
1300
|
+
* Issue #1280 & #1287 (`Stake-for-Liquidity`):
|
|
1301
|
+
* Creates a native `CONSTANT_PRODUCT_AMM` (`x * y = k`) liquidity pool for an existing fixed-supply FT,
|
|
1302
|
+
* enforcing `reserveAddress === officialTokenAddress`, locking reserves in `statedb.stake` (`poolStakeAddress`),
|
|
1303
|
+
* and locking `MINIMUM_LOCKED_AMM_LIQUIDITY` (`1000` shares) permanently to prevent first-depositor inflation attacks.
|
|
1304
|
+
*/
|
|
1305
|
+
createConstantProductPool(input: CreateConstantProductPoolInput, statedb: Record<string, any>): Promise<{
|
|
1306
|
+
blockResult: TransactionBlockResult;
|
|
1307
|
+
pool: UnifiedAbtExchangePoolState;
|
|
1308
|
+
mintedCreatorLpShares: string;
|
|
1309
|
+
}>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Issue #1280 & #1287 (`Stake-for-Liquidity`):
|
|
1312
|
+
* Adds proportional `officialToken + Token` liquidity to an active `CONSTANT_PRODUCT_AMM` pool (`statedb.stake`).
|
|
1313
|
+
*/
|
|
1314
|
+
addAmmLiquidity(input: AddAmmLiquidityInput, statedb: Record<string, any>): Promise<{
|
|
1315
|
+
blockResult: TransactionBlockResult;
|
|
1316
|
+
mintedLpShares: string;
|
|
1317
|
+
pool: UnifiedAbtExchangePoolState;
|
|
1318
|
+
}>;
|
|
1319
|
+
/**
|
|
1320
|
+
* Issue #1280 & #1287 (`Stake-for-Liquidity`):
|
|
1321
|
+
* Removes proportional `officialToken + Token` liquidity from a `CONSTANT_PRODUCT_AMM` pool (`statedb.stake`).
|
|
1322
|
+
* Strictly preserves `lockedLpShares` so locked POL can never be withdrawn.
|
|
1323
|
+
*/
|
|
1324
|
+
removeAmmLiquidity(input: RemoveAmmLiquidityInput, statedb: Record<string, any>): Promise<{
|
|
1325
|
+
blockResult: TransactionBlockResult;
|
|
1326
|
+
abtOut: string;
|
|
1327
|
+
tokenOut: string;
|
|
1328
|
+
pool: UnifiedAbtExchangePoolState;
|
|
1329
|
+
}>;
|
|
1330
|
+
/**
|
|
1331
|
+
* Computes deterministic state-machine pricing for a single hop (`ABT -> Token` or `Token -> ABT`)
|
|
1332
|
+
* against either a `BONDING_CURVE` factory or a `CONSTANT_PRODUCT_AMM` (`x * y = k`) pool.
|
|
1333
|
+
*
|
|
1334
|
+
* Game-Theoretic Invariant (`seq: 571` & `seq: 585`):
|
|
1335
|
+
* 1. 100% of the formula output (`amountOut`) goes directly to the user—`minAmountOut` is strictly a
|
|
1336
|
+
* revert floor, so relayers/block proposers can NEVER skim positive slippage!
|
|
1337
|
+
* 2. Supports escalating tiered promoter rebates (`EscalatingPromoterTier[]`) for `BONDING_CURVE`
|
|
1338
|
+
* launches and token pools, funded out of the creator/protocol fee split without altering user price.
|
|
1339
|
+
*/
|
|
1340
|
+
private computeHopQuote;
|
|
1341
|
+
private recordKnownCurveHolder;
|
|
1342
|
+
/**
|
|
1343
|
+
* Domain-agnostic alias (`CHAIN_DESIGN.md` §3.1) for `swapAbtAndToken`.
|
|
1344
|
+
*/
|
|
1345
|
+
swapReserveAndToken(input: SingleHopAbtSwapInput, statedb: Record<string, any>): Promise<NativeSwapExecutionResult>;
|
|
1346
|
+
/**
|
|
1347
|
+
* Issue #1281 & #1287:
|
|
1348
|
+
* Single-signature, non-interactive 1-hop swap (`ABT -> Token` or `Token -> ABT`) against either
|
|
1349
|
+
* a `BONDING_CURVE` factory or a `CONSTANT_PRODUCT_AMM` pool, updating `statedb.stake` (`poolStakeAddress`)
|
|
1350
|
+
* and settling escalating promoter rebates (`EscalatingPromoterTier[]`).
|
|
1351
|
+
*/
|
|
1352
|
+
swapAbtAndToken(input: SingleHopAbtSwapInput, statedb: Record<string, any>): Promise<NativeSwapExecutionResult>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Domain-agnostic alias (`CHAIN_DESIGN.md` §3.1) for `swapTokenForTokenViaAbtHub`.
|
|
1355
|
+
*/
|
|
1356
|
+
swapTokenForTokenViaHub(input: TwoHopTokenSwapInput, statedb: Record<string, any>): Promise<NativeSwapExecutionResult>;
|
|
1357
|
+
/**
|
|
1358
|
+
* Issue #1281 & #1287:
|
|
1359
|
+
* Single-signature, non-interactive 2-hop atomic swap (`Token_A -> ABT -> Token_B`) across any combination
|
|
1360
|
+
* of `BONDING_CURVE` and `CONSTANT_PRODUCT_AMM` pools via the `ABT` hub!
|
|
1361
|
+
*/
|
|
1362
|
+
swapTokenForTokenViaAbtHub(input: TwoHopTokenSwapInput, statedb: Record<string, any>): Promise<NativeSwapExecutionResult>;
|
|
1363
|
+
/**
|
|
1364
|
+
* Domain-agnostic alias (`CHAIN_DESIGN.md` §3.1) for `executeAbtPathPayment`.
|
|
1365
|
+
*/
|
|
1366
|
+
executePathPayment(input: PathPaymentCheckoutInput, statedb: Record<string, any>): Promise<{
|
|
1367
|
+
swapResult: NativeSwapExecutionResult;
|
|
1368
|
+
deliveredToMerchant: string;
|
|
1369
|
+
merchantDid: string;
|
|
1370
|
+
}>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Issue #1281:
|
|
1373
|
+
* Stellar-style single-signature `PathPayment` checkout:
|
|
1374
|
+
* Payer spends `paymentTokenAddress`, protocol automatically swaps via `ABT` hub into
|
|
1375
|
+
* `settlementTokenAddress`, and delivers 100% of the output directly to `merchantDid`
|
|
1376
|
+
* inside a SINGLE atomic `TransactionBlock`!
|
|
1377
|
+
*/
|
|
1378
|
+
executeAbtPathPayment(input: PathPaymentCheckoutInput, statedb: Record<string, any>): Promise<{
|
|
1379
|
+
swapResult: NativeSwapExecutionResult;
|
|
1380
|
+
deliveredToMerchant: string;
|
|
1381
|
+
merchantDid: string;
|
|
1382
|
+
}>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Issue #1282 & #1287 (`seq: 569` & `seq: 580`):
|
|
1385
|
+
* Graduates a `BONDING_CURVE` factory in-place into a native `CONSTANT_PRODUCT_AMM` (`x * y = k`) pool
|
|
1386
|
+
* once it satisfies the live Governance Exchange Policy graduation criteria:
|
|
1387
|
+
* 1. `reserveAbt >= policy.minGraduationReserveAbt`
|
|
1388
|
+
* 2. Active unique non-creator holders with `>= MIN_GRADUATION_HOLDER_SHARE_BPS` (0.50% of curve supply)
|
|
1389
|
+
* token balance in `statedb` `>= policy.minGraduationUniqueHolders`
|
|
1390
|
+
*
|
|
1391
|
+
* Permanently locks 100% of the initial graduated LP shares (`lockedLpShares = totalLpShares`) in
|
|
1392
|
+
* `statedb.stake` (`pool.poolStakeAddress`, `revocable: false`) as Protocol-Owned Liquidity (POL)
|
|
1393
|
+
* so the foundational liquidity can NEVER be rugged!
|
|
1394
|
+
*/
|
|
1395
|
+
graduateCurveToNativeAmmPool(factoryAddressInput: string, statedb: Record<string, any>): Promise<{
|
|
1396
|
+
blockResult: TransactionBlockResult;
|
|
1397
|
+
pool: UnifiedAbtExchangePoolState;
|
|
1398
|
+
paidGraduationFeeAbt: string;
|
|
1399
|
+
lockedPolLpShares: string;
|
|
1400
|
+
verifiedUniqueHolders: number;
|
|
1401
|
+
}>;
|
|
1402
|
+
/**
|
|
1403
|
+
* Domain-agnostic alias (`CHAIN_DESIGN.md` §3.1) for `assertOfficialBridgeAbtOnly`.
|
|
1404
|
+
*/
|
|
1405
|
+
assertOfficialBridgeTokenOnly(tokenAddressInput: string): void;
|
|
1406
|
+
/**
|
|
1407
|
+
* Issue #1283:
|
|
1408
|
+
* Enforces at the protocol level that the Official OCAP Bridge ONLY accepts native `ABT` (`officialTokenAddress`).
|
|
1409
|
+
* Any user-issued FT attempting to use the official bridge is rejected; users must either
|
|
1410
|
+
* swap `FT -> ABT` on the native exchange first or use an issuer's self-operated bridge.
|
|
1411
|
+
*/
|
|
1412
|
+
assertOfficialBridgeAbtOnly(tokenAddressInput: string): void;
|
|
1413
|
+
/**
|
|
1414
|
+
* Issue #1283 & #1287 (`Stake-for-Bridge`):
|
|
1415
|
+
* Allows a third-party FT issuer to register a Self-Operated Sub-Token Bridge by paying the
|
|
1416
|
+
* governance-adjustable `selfBridgeRegistrationFeeAbt` to `chainRevenueDid` + locking `securityBondAbt`
|
|
1417
|
+
* in `statedb.stake` (`bondStakeAddress`), enforcing zero validator overlap with official bridge validators,
|
|
1418
|
+
* and binding the liability disclaimer.
|
|
1419
|
+
*/
|
|
1420
|
+
registerSelfOperatedSubTokenBridge(input: RegisterSelfOperatedBridgeInput, statedb: Record<string, any>): Promise<{
|
|
1421
|
+
blockResult: TransactionBlockResult;
|
|
1422
|
+
bridge: SelfOperatedSubTokenBridgeRecord;
|
|
1423
|
+
}>;
|
|
1424
|
+
/**
|
|
1425
|
+
* Issue #1287 (`Stake-for-Bridge` Slashing):
|
|
1426
|
+
* Slashes a misbehaving Self-Operated Sub-Token Bridge's `bondStakeAddress` in `statedb.stake`
|
|
1427
|
+
* and routes 100% of the slashed security bond into `chainRevenueDid` (zero official token burn!).
|
|
1428
|
+
*/
|
|
1429
|
+
slashSelfOperatedBridgeStake(bridgeIdInput: string, governanceCallerDidInput: string, reasonInput: string, statedb: Record<string, any>): Promise<{
|
|
1430
|
+
blockResult: TransactionBlockResult;
|
|
1431
|
+
bridge: SelfOperatedSubTokenBridgeRecord;
|
|
1432
|
+
slashedBondAbt: string;
|
|
1433
|
+
}>;
|
|
1434
|
+
getPool(factoryAddress: string): UnifiedAbtExchangePoolState | undefined;
|
|
1435
|
+
/**
|
|
1436
|
+
* Issue #1285 (`seq: 573` & `seq: 576`):
|
|
1437
|
+
* Deterministic Instant Settle Unix timestamp Dutch auction price formula $P(T_{tx})$:
|
|
1438
|
+
* Linearly interpolates from `startPriceAbt` at `startTimeSeconds` down to `endPriceAbt` at `endTimeSeconds`.
|
|
1439
|
+
*/
|
|
1440
|
+
computeDutchAuctionPriceAtTime(listing: NativeNftListingRecord, txTimestampSeconds: number): BN;
|
|
1441
|
+
/**
|
|
1442
|
+
* Issue #1285 & #1287 (`seq: 573`, `seq: 576`, `seq: 585`):
|
|
1443
|
+
* Creates an Enshrined Asset-Native NFT Listing (`FIXED_PRICE`, `DUTCH_AUCTION`, or `ENGLISH_TOP1_AUTO_REFUND`)
|
|
1444
|
+
* attached directly to the NFT (`assetDid`) so all marketplaces/wallets/ArcSpaces share unified liquidity.
|
|
1445
|
+
* Uses pure Instant Settle Unix timestamps (`startTimeSeconds`, `endTimeSeconds`, `antiSnipeWindowSeconds`)
|
|
1446
|
+
* and optional escalating promoter rebate tiers (`escalatingPromoterTiers`).
|
|
1447
|
+
*/
|
|
1448
|
+
createNativeNftListing(input: CreateNativeNftListingInput, statedb: Record<string, any>): Promise<NativeNftListingRecord>;
|
|
1449
|
+
/**
|
|
1450
|
+
* Issue #1285 & #1287 (`seq: 573`, `seq: 576`, `seq: 585`):
|
|
1451
|
+
* Single-signature instant fulfillment for `FIXED_PRICE` and `DUTCH_AUCTION` NFT listings.
|
|
1452
|
+
* Atomically executes the 4-way protocol `ABT` split (`creatorRoyalty`, `protocolFee` -> `chainRevenueDid`,
|
|
1453
|
+
* `uiReferrerRebate` with escalating promoter tiers, `sellerNet`) and transfers the NFT to `buyerDid`.
|
|
1454
|
+
*/
|
|
1455
|
+
fulfillFixedOrDutchNftListing(input: FulfillNativeNftListingInput, statedb: Record<string, any>): Promise<NativeNftSettlementResult>;
|
|
1456
|
+
/**
|
|
1457
|
+
* Issue #1285 & #1287 (`Stake-for-Bid`):
|
|
1458
|
+
* Places a bid on an `ENGLISH_TOP1_AUTO_REFUND` auction:
|
|
1459
|
+
* - Enforces `bidAmountAbt >= reservePriceAbt` (for first bid) or `>= highestBidAbt * (1 + minBidIncrementBps/10000)`.
|
|
1460
|
+
* - Locks the new Top-1 bid in `statedb.stake` (`bidStakeAddress`) and atomically refunds 100% of the
|
|
1461
|
+
* previous highest bidder's `ABT` in the exact same transaction (`O(1)` slot, zero bid backlog!).
|
|
1462
|
+
* - Automatically extends `endTimeSeconds` if placed within the `antiSnipeWindowSeconds` window.
|
|
1463
|
+
*/
|
|
1464
|
+
placeEnglishAuctionTop1Bid(input: PlaceEnglishNftBidInput, statedb: Record<string, any>): Promise<{
|
|
1465
|
+
blockResult: TransactionBlockResult;
|
|
1466
|
+
listing: NativeNftListingRecord;
|
|
1467
|
+
refundedPreviousBidderDid?: string;
|
|
1468
|
+
refundedPreviousBidAbt: string;
|
|
1469
|
+
extendedEndTime: boolean;
|
|
1470
|
+
}>;
|
|
1471
|
+
/**
|
|
1472
|
+
* Issue #1285:
|
|
1473
|
+
* Cancels an active NFT listing if called by `sellerDid` and (for `ENGLISH_TOP1_AUTO_REFUND`)
|
|
1474
|
+
* no bid has been placed yet (`!listing.highestBidderDid`).
|
|
1475
|
+
*/
|
|
1476
|
+
cancelNativeNftListing(listingIdInput: string, callerDidInput: string, statedb: Record<string, any>): Promise<NativeNftListingRecord>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Issue #1285 & #1287 (`seq: 573`, `seq: 576`, `seq: 585`):
|
|
1479
|
+
* Finalizes an `ENGLISH_TOP1_AUTO_REFUND` auction once `txTimestampSeconds > listing.endTimeSeconds`,
|
|
1480
|
+
* releasing the winning `Stake-for-Bid` (`highestBidStakeAddress`), distributing `highestBidAbt`
|
|
1481
|
+
* via the 4-way protocol split (including escalating promoter rebate tiers!), and transferring NFT ownership to `highestBidderDid`.
|
|
1482
|
+
*/
|
|
1483
|
+
settleEnglishNftAuction(listingIdInput: string, txTimestampSeconds: number, statedb: Record<string, any>): Promise<NativeNftSettlementResult>;
|
|
1484
|
+
/**
|
|
1485
|
+
* Issue #1287 (`Stake-for-Offer` — `seq: 581` & `seq: 582`):
|
|
1486
|
+
* Creates an unsolicited buyer NFT offer locked in `statedb.stake` (`offerStakeAddress`).
|
|
1487
|
+
* Supports:
|
|
1488
|
+
* 1. Specific NFT Offer (`targetAssetDid`) — even if the NFT is not listed for sale!
|
|
1489
|
+
* 2. Factory/Collection Floor Offer (`targetFactoryDid`) — any NFT minted by that factory can fulfill.
|
|
1490
|
+
* 3. Structured `IAssetState.data` Attribute & Usable-State Predicate Offer (`attributePredicates` + `requireUnconsumed`)
|
|
1491
|
+
* — e.g., `color == 'yellow' && species == 'dragon'`, or an unused/unconsumed gift card (`requireUnconsumed: true`).
|
|
1492
|
+
*/
|
|
1493
|
+
createNftBuyOffer(input: CreateNftBuyOfferInput, statedb: Record<string, any>): Promise<{
|
|
1494
|
+
blockResult: TransactionBlockResult;
|
|
1495
|
+
offer: NativeNftBuyOfferRecord;
|
|
1496
|
+
}>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Issue #1287 (`Stake-for-Offer` Revocation):
|
|
1499
|
+
* Allows the buyer to cancel an open NFT buy offer and immediately unlock 100% of their staked `ABT`.
|
|
1500
|
+
*/
|
|
1501
|
+
cancelNftBuyOffer(offerIdInput: string, callerDidInput: string, statedb: Record<string, any>): Promise<{
|
|
1502
|
+
blockResult: TransactionBlockResult;
|
|
1503
|
+
offer: NativeNftBuyOfferRecord;
|
|
1504
|
+
}>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Issue #1287 (`Stake-for-Offer` Fulfillment — `seq: 581` & `seq: 582`):
|
|
1507
|
+
* Allows any holder of a matching NFT (`assetDid`) to accept an open `Stake-for-Offer` in a single signature:
|
|
1508
|
+
* - Verifies `txTimestampSeconds <= offer.expiresAtSeconds`.
|
|
1509
|
+
* - Verifies `targetAssetDid`, `targetFactoryDid`, `requireUnconsumed` (rejects consumed/redeemed/expired assets!),
|
|
1510
|
+
* and every structured `IAssetState.data` predicate (`color == 'yellow' && species == 'dragon'`, etc.).
|
|
1511
|
+
* - Releases the buyer's `offerStakeAddress` in `statedb.stake`, executes the 4-way `ABT` split
|
|
1512
|
+
* (with escalating promoter rebate support), and transfers NFT ownership to `offer.buyerDid`.
|
|
1513
|
+
*/
|
|
1514
|
+
acceptNftBuyOffer(input: AcceptNftBuyOfferInput, statedb: Record<string, any>): Promise<NativeNftOfferSettlementResult>;
|
|
1515
|
+
/**
|
|
1516
|
+
* Secondary market transfer guard for Enshrined Programmable Value Card NFTs (`#1289` & `#1293`):
|
|
1517
|
+
* - Blocks secondary-market sale of `ESCROW_MATURITY` cards before `maturityUnlockTimestampSeconds`
|
|
1518
|
+
* (preventing fiat chargeback attackers from cashing out unmatured cards via NFT buy offers or listings).
|
|
1519
|
+
* - Blocks secondary-market sale of `POSTPAID` credit cards while `usedCredit > 0`.
|
|
1520
|
+
* - Enforces `minSecondarySalePriceAbt` (MAP Floor — `#1293`) so distributors/buyers cannot harvest
|
|
1521
|
+
* a post-sale rebate and dump the card below retail price on the secondary market (`BELOW_VALUE_CARD_MAP_FLOOR`).
|
|
1522
|
+
* - Blocks secondary-market resale of partially-spent rebated dedicated service cards (`PARTIALLY_SPENT_REBATED_CARD_NON_TRANSFERRABLE`).
|
|
1523
|
+
*/
|
|
1524
|
+
private assertValueCardSecondaryMarketTransferrable;
|
|
1525
|
+
private assertValueCardNotListedOnSecondaryMarket;
|
|
1526
|
+
/**
|
|
1527
|
+
* Stateless / cold-start hydration of `ValueCardRecord` from `statedb.asset` when `this.valueCardsByDid` is cold.
|
|
1528
|
+
*/
|
|
1529
|
+
private resolveValueCardRecord;
|
|
1530
|
+
/**
|
|
1531
|
+
* Stateless / cold-start hydration of `MaturingCardSettlementRecord` from `statedb.stake` when `this.maturingSettlementsById` is cold.
|
|
1532
|
+
*/
|
|
1533
|
+
private resolveMaturingSettlementRecord;
|
|
1534
|
+
private syncValueCardOwnershipAfterMarketSale;
|
|
1535
|
+
getValueCardRecord(cardAssetDid: string): ValueCardRecord | null;
|
|
1536
|
+
getMaturingCardSettlementRecord(settlementId: string): MaturingCardSettlementRecord | null;
|
|
1537
|
+
/**
|
|
1538
|
+
* Issue #1289 (`seq: 602` & `seq: 604` — Enshrined L1 Programmable Value Card NFT: `PREPAID` / `Stake-for-Card`):
|
|
1539
|
+
* Issues a policy-bound Prepaid Value Card NFT (`FT-in-an-NFT-Shell`) whose underlying FT balance
|
|
1540
|
+
* is locked in `statedb.stake` (`toStakeAddress(cardAssetDid, tokenAddress, 'value-card-reserve')`)
|
|
1541
|
+
* and whose policy envelope (`ValueCardPolicyEnvelope`) is stored in `IAssetState.data.valueCard`.
|
|
1542
|
+
*/
|
|
1543
|
+
issuePrepaidValueCard(input: IssuePrepaidValueCardInput, statedb: Record<string, any>): Promise<{
|
|
1544
|
+
blockResult: TransactionBlockResult;
|
|
1545
|
+
card: ValueCardRecord;
|
|
1546
|
+
}>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Issue #1289 (`Top-Up Prepaid Value Card`):
|
|
1549
|
+
* Adds FT reserve to an active `PREPAID` Value Card NFT in `statedb.stake` and updates `IAssetState.data`.
|
|
1550
|
+
*/
|
|
1551
|
+
topUpPrepaidValueCard(input: TopUpPrepaidValueCardInput, statedb: Record<string, any>): Promise<{
|
|
1552
|
+
blockResult: TransactionBlockResult;
|
|
1553
|
+
card: ValueCardRecord;
|
|
1554
|
+
}>;
|
|
1555
|
+
/**
|
|
1556
|
+
* Issue #1289 (`seq: 602` & `seq: 604` — Enshrined L1 Programmable Value Card NFT: `POSTPAID` / `Stake-for-Credit`):
|
|
1557
|
+
* Issues a Postpaid Credit Card NFT backed by `Stake-for-Credit` collateral in `statedb.stake`.
|
|
1558
|
+
*/
|
|
1559
|
+
issuePostpaidCreditCard(input: IssuePostpaidCreditCardInput, statedb: Record<string, any>): Promise<{
|
|
1560
|
+
blockResult: TransactionBlockResult;
|
|
1561
|
+
card: ValueCardRecord;
|
|
1562
|
+
}>;
|
|
1563
|
+
/**
|
|
1564
|
+
* Allows the current NFT owner of a Value Card to authorize or revoke a delegated AI Agent spender (`authorizedSpenderDid`).
|
|
1565
|
+
*/
|
|
1566
|
+
authorizeValueCardSpender(input: AuthorizeValueCardSpenderInput, statedb: Record<string, any>): Promise<ValueCardRecord>;
|
|
1567
|
+
/**
|
|
1568
|
+
* Issue #1289 (`spendValueCard` — Prepay/Postpay Spend + 4D Guardrails + Escrow Maturity Inheritance + Lazy Attribution Clearing):
|
|
1569
|
+
* - Verifies caller is either the live NFT owner (`asset.owner`) or a delegated `authorizedSpenderDid` authorized by the live owner.
|
|
1570
|
+
* - Enforces merchant allowlist (`allowedMerchantDids`), service tag allowlist (`allowedServiceTags`),
|
|
1571
|
+
* expiration (`expiresAtSeconds`), per-tx cap (`maxSpendPerTx`), and rolling window quota (`maxSpendPerWindow`).
|
|
1572
|
+
* - Enforces anti-self-dealing (`merchantDid` and all `attributionHops` must be distinct from `holderDid`, `originalHolderDid`, and `callerDid`).
|
|
1573
|
+
* - Atomically clears multi-hop `ArcSpace` attribution proofs (`attributionHops` + `attributionProofHash`).
|
|
1574
|
+
* - If `fundingLineage === 'ESCROW_MATURITY'` and `txTimestampSeconds < maturityUnlockTimestampSeconds`,
|
|
1575
|
+
* locks all proceeds inside a non-revocable `MaturingCardSettlementRecord` stake (`Stake-for-Card-Maturing`)
|
|
1576
|
+
* so fiat chargebacks can be clawed back with zero cash loss!
|
|
1577
|
+
*/
|
|
1578
|
+
spendValueCard(input: SpendValueCardInput, statedb: Record<string, any>): Promise<SpendValueCardResult>;
|
|
1579
|
+
/**
|
|
1580
|
+
* Issue #1289 (`releaseMaturedCardSettlement`):
|
|
1581
|
+
* Once `txTimestampSeconds >= settlement.unlockAtTimestampSeconds`, releases a `MATURING` card settlement stake
|
|
1582
|
+
* into the liquid accounts of `merchantDid`, all `attributionPayouts` recipients, and `chainRevenueDid`.
|
|
1583
|
+
*/
|
|
1584
|
+
releaseMaturedCardSettlement(input: ReleaseMaturedCardSettlementInput, statedb: Record<string, any>): Promise<{
|
|
1585
|
+
blockResult: TransactionBlockResult;
|
|
1586
|
+
settlement: MaturingCardSettlementRecord;
|
|
1587
|
+
}>;
|
|
1588
|
+
/**
|
|
1589
|
+
* Issue #1289 (`clawbackUnmaturedCardSettlement` — Fiat Chargeback Protection):
|
|
1590
|
+
* Allows the card `issuerDid` (or `governanceDid`) to claw back an unmatured `ESCROW_MATURITY` settlement
|
|
1591
|
+
* strictly BEFORE `unlockAtTimestampSeconds` when a fiat payment chargeback occurs, optionally also revoking
|
|
1592
|
+
* any unspent balance remaining on the card.
|
|
1593
|
+
*/
|
|
1594
|
+
clawbackUnmaturedCardSettlement(input: ClawbackUnmaturedCardSettlementInput, statedb: Record<string, any>): Promise<{
|
|
1595
|
+
blockResult: TransactionBlockResult;
|
|
1596
|
+
settlement: MaturingCardSettlementRecord;
|
|
1597
|
+
clawedBackAmount: string;
|
|
1598
|
+
revokedRemainingCardBalance: string;
|
|
1599
|
+
}>;
|
|
1600
|
+
/**
|
|
1601
|
+
* Issue #1289 (`redeemPrepaidValueCard` — Direct Holder Cash-Out / Refund):
|
|
1602
|
+
* - Forbidden when `fundingLineage === 'PROMO_SPEND_ONLY'` (`CARD_WITHDRAWAL_FORBIDDEN`).
|
|
1603
|
+
* - Forbidden when `fundingLineage === 'ESCROW_MATURITY'` and `txTimestampSeconds < maturityUnlockTimestampSeconds`
|
|
1604
|
+
* (`CARD_MATURITY_LOCKED`).
|
|
1605
|
+
* - Forbidden while the card is listed for sale on the secondary market (`CANNOT_SPEND_OR_REDEEM_LISTED_VALUE_CARD`).
|
|
1606
|
+
*/
|
|
1607
|
+
redeemPrepaidValueCard(input: RedeemPrepaidValueCardInput, statedb: Record<string, any>): Promise<{
|
|
1608
|
+
blockResult: TransactionBlockResult;
|
|
1609
|
+
card: ValueCardRecord;
|
|
1610
|
+
redeemedAmount: string;
|
|
1611
|
+
}>;
|
|
1612
|
+
/**
|
|
1613
|
+
* Issue #1289 (`settlePostpaidValueCard` — Repay Postpaid Credit Bill & Restore Credit Limit):
|
|
1614
|
+
* Replenishes `cardStakeAddress` from `payerDid`'s liquid account and resets `usedCredit`.
|
|
1615
|
+
*/
|
|
1616
|
+
settlePostpaidValueCard(input: SettlePostpaidValueCardInput, statedb: Record<string, any>): Promise<{
|
|
1617
|
+
blockResult: TransactionBlockResult;
|
|
1618
|
+
card: ValueCardRecord;
|
|
1619
|
+
repaidAmount: string;
|
|
1620
|
+
}>;
|
|
1621
|
+
/**
|
|
1622
|
+
* Issue #1289 (`closePostpaidCreditCard` — Honest Holder Collateral Withdrawal When Debt === 0):
|
|
1623
|
+
* Allows a `POSTPAID` cardholder who has zero unpaid debt (`usedCredit === '0'`) to close their card
|
|
1624
|
+
* and unlock 100% of their `collateralAmount` from `statedb.stake`.
|
|
1625
|
+
*/
|
|
1626
|
+
closePostpaidCreditCard(input: ClosePostpaidCreditCardInput, statedb: Record<string, any>): Promise<{
|
|
1627
|
+
blockResult: TransactionBlockResult;
|
|
1628
|
+
card: ValueCardRecord;
|
|
1629
|
+
unlockedCollateralAmount: string;
|
|
1630
|
+
}>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Issue #1289 (`liquidateDefaultedPostpaidCard`):
|
|
1633
|
+
* If `txTimestampSeconds > billingCycleDueTimestampSeconds` and `usedCredit > 0`, closes the defaulted
|
|
1634
|
+
* postpaid card (whose drawn credit was already disbursed from `cardStakeAddress` at spend time)
|
|
1635
|
+
* and returns any remaining unspent collateral above `usedCredit` to `holderDid`.
|
|
1636
|
+
*/
|
|
1637
|
+
liquidateDefaultedPostpaidCard(input: LiquidateDefaultedPostpaidCardInput, statedb: Record<string, any>): Promise<{
|
|
1638
|
+
blockResult: TransactionBlockResult;
|
|
1639
|
+
card: ValueCardRecord;
|
|
1640
|
+
refundedRemainderCollateral: string;
|
|
1641
|
+
}>;
|
|
1642
|
+
getDistributorCumulativeVolumeAbt(scopeIdInput: string, distributorDidInput: string): string;
|
|
1643
|
+
getMaturingDistributorRebateRecord(rebateSettlementId: string): MaturingDistributorRebateRecord | null;
|
|
1644
|
+
getValueCardDistributorStakeRecord(distributorDidInput: string): ValueCardDistributorStakeRecord | null;
|
|
1645
|
+
resolveValueCardDistributorStakeRecord(distributorDidInput: string, statedb: Record<string, any>): Promise<ValueCardDistributorStakeRecord | null>;
|
|
1646
|
+
/**
|
|
1647
|
+
* Issue #1296 (`seq: 627` — `Stake-for-Distributor` zero-sink-cost `ABT` bond for ValueCard & Composable Bundle distribution):
|
|
1648
|
+
* - Locks `stakeAmountAbt` of `officialTokenAddress` from `distributorDid` into `statedb.stake` at
|
|
1649
|
+
* `deriveValueCardDistributorStakeAddress(distributorDid, officialTokenAddress)`.
|
|
1650
|
+
* - Prevents Sybil spam while freezing `ABT` liquidity for the ARC ecosystem; if the distributor's business does not work out,
|
|
1651
|
+
* they can call `unstakeValueCardDistributor` to recover 100% of their staked `ABT` once any pending maturing rebates and cooldowns clear.
|
|
1652
|
+
*/
|
|
1653
|
+
stakeForValueCardDistributor(input: StakeForValueCardDistributorInput, statedb: Record<string, any>): Promise<StakeForValueCardDistributorResult>;
|
|
1654
|
+
/**
|
|
1655
|
+
* Issue #1296 (`seq: 627` — `unstakeValueCardDistributor`):
|
|
1656
|
+
* - Allows a distributor / KOL / curator whose business did not work out (or who wishes to scale down)
|
|
1657
|
+
* to withdraw their staked `ABT` back to their account with zero principal loss (`生意做不成没损失,stake退回只花点手续费和购买其他服务的小钱`).
|
|
1658
|
+
* - Blocks unstaking while the distributor has any unmatured `ESCROW_MATURITY` rebates (`DISTRIBUTOR_HAS_UNMATURED_REBATES`)
|
|
1659
|
+
* or while `txTimestampSeconds < lastStakedAtSeconds + unlockCooldownSeconds` (`DISTRIBUTOR_STAKE_COOLDOWN_ACTIVE`).
|
|
1660
|
+
*/
|
|
1661
|
+
unstakeValueCardDistributor(input: UnstakeValueCardDistributorInput, statedb: Record<string, any>): Promise<UnstakeValueCardDistributorResult>;
|
|
1662
|
+
private resolveMaturingDistributorRebateRecord;
|
|
1663
|
+
/**
|
|
1664
|
+
* Issue #1293 (`seq: 614` — Zero-Inventory JIT Dedicated ValueCard Retail Sale + Post-Sale `ABT` Rebate Settlement):
|
|
1665
|
+
* - Eliminates upfront wholesale inventory dumping (`零库存按需直售`): distributors never pre-purchase discounted inventory.
|
|
1666
|
+
* - Mints a spend-only (`withdrawable: false`) Dedicated ValueCard NFT directly to `buyerDid` at full `retailPriceAbt`.
|
|
1667
|
+
* - Regardless of what ingress channel the buyer uses (`STRIPE_FIAT`, `APPLE_PAY`, `USDT_ONRAMP`, `NATIVE_ABT`),
|
|
1668
|
+
* 100% of the distributor rebate (`distributorRebateAbt`) and card reserve (`netCardReserveAbt`) are settled in official token `ABT`.
|
|
1669
|
+
* - Supports volume-escalating distributor rebate tiers up to `MAX_PROMOTER_REBATE_BPS` (`8000` bps = 80%).
|
|
1670
|
+
* - For `ESCROW_MATURITY` reversible fiat purchases, locks `distributorRebateAbt` inside `rebateStakeAddress`
|
|
1671
|
+
* (`Stake-for-Distributor-Rebate-Maturing`) and only increments cumulative volume upon `releaseMaturedDistributorRebate`
|
|
1672
|
+
* after maturity (preventing wash-volume tier manipulation via fiat chargebacks).
|
|
1673
|
+
* - Enforces `minSecondarySalePriceAbt >= retailPriceAbt` (MAP Floor) so buyers/distributors cannot harvest the rebate
|
|
1674
|
+
* and dump the card below retail price on the secondary market (`BELOW_VALUE_CARD_MAP_FLOOR`).
|
|
1675
|
+
*/
|
|
1676
|
+
purchaseDedicatedValueCardWithRebate(input: PurchaseDedicatedValueCardInput, statedb: Record<string, any>): Promise<PurchaseDedicatedValueCardResult>;
|
|
1677
|
+
/**
|
|
1678
|
+
* Issue #1293 (`releaseMaturedDistributorRebate`):
|
|
1679
|
+
* Releases an `ESCROW_MATURITY` distributor rebate in `ABT` once `txTimestampSeconds >= unlockAtTimestampSeconds`
|
|
1680
|
+
* and increments the distributor's cumulative volume for escalating rebate tiers.
|
|
1681
|
+
*/
|
|
1682
|
+
releaseMaturedDistributorRebate(input: ReleaseMaturedDistributorRebateInput, statedb: Record<string, any>): Promise<{
|
|
1683
|
+
blockResult: TransactionBlockResult;
|
|
1684
|
+
rebate: MaturingDistributorRebateRecord;
|
|
1685
|
+
distributorCumulativeVolumeAbt: string;
|
|
1686
|
+
}>;
|
|
1687
|
+
/**
|
|
1688
|
+
* Issue #1293 (`clawbackUnmaturedDistributorRebate`):
|
|
1689
|
+
* Claws back an unmatured `ESCROW_MATURITY` distributor rebate strictly BEFORE `unlockAtTimestampSeconds`
|
|
1690
|
+
* when a fiat payment chargeback occurs, returning the staked `ABT` (and optionally the remaining card reserve)
|
|
1691
|
+
* to `funderDid` / `issuerDid`.
|
|
1692
|
+
*/
|
|
1693
|
+
clawbackUnmaturedDistributorRebate(input: ClawbackUnmaturedDistributorRebateInput, statedb: Record<string, any>): Promise<{
|
|
1694
|
+
blockResult: TransactionBlockResult;
|
|
1695
|
+
rebate: MaturingDistributorRebateRecord;
|
|
1696
|
+
clawedBackRebateAbt: string;
|
|
1697
|
+
revokedCardReserveAbt: string;
|
|
1698
|
+
}>;
|
|
1699
|
+
/**
|
|
1700
|
+
* Issue #1293 (`seq: 616` & `seq: 617` — T-Point Style Coalition Loyalty Points Deposit):
|
|
1701
|
+
* When a customer shops at Merchant A (`merchantFunderDid`), Merchant A rewards `rewardBalanceAmount`
|
|
1702
|
+
* onto the customer's Universal Loyalty `ValueCard` (`cardAssetDid`) by locking real `ABT` reserve (`reserveAbtAmount`)
|
|
1703
|
+
* into `cardStakeAddress` (`Stake-for-Card`).
|
|
1704
|
+
* - Eliminates carrying multiple merchant punch cards (`无需怀揣一把 Punch Card`).
|
|
1705
|
+
* - Guarantees that when the customer later redeems at Merchant B (`spendValueCard`), Merchant B is paid in real `ABT`
|
|
1706
|
+
* from `cardStakeAddress`, while Merchant A (`lastRewardMerchantDid`) automatically receives the cross-merchant
|
|
1707
|
+
* originating traffic rebate (`crossMerchantIssuerRebateBps`)!
|
|
1708
|
+
*/
|
|
1709
|
+
rewardCoalitionValueCard(input: RewardCoalitionValueCardInput, statedb: Record<string, any>): Promise<RewardCoalitionValueCardResult>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Issue #1293 (`seq: 624` — Permissionless Composable Commerce via Open Rule VCs):
|
|
1712
|
+
* - Allows any permissionless curator / distributor (`distributorDid`) to combine multiple Creators' signed
|
|
1713
|
+
* `SignedOpenComposingRuleVc` credentials into a Bundle ValueCard NFT (`cardAssetDid`) without waiting for
|
|
1714
|
+
* centralized AppSumo BD negotiation.
|
|
1715
|
+
* - Atomically verifies every Creator VC's cryptographic signature, DID/publicKey binding, and validity window (`verifyOpenComposingRuleVc`),
|
|
1716
|
+
* enforces each Creator's `minBundleRetailPriceAbt`, `minNetReserveAbt`, and `maxDistributorRebateBps`,
|
|
1717
|
+
* isolates each Creator's reserve inside `bundleComponentSlots` (`${creatorDid}:${serviceTag}`),
|
|
1718
|
+
* and settles 100% of the distributor rebate in official token `ABT`.
|
|
1719
|
+
*/
|
|
1720
|
+
composePermissionlessBundleValueCard(input: ComposePermissionlessBundleValueCardInput, statedb: Record<string, any>): Promise<ComposePermissionlessBundleValueCardResult>;
|
|
1721
|
+
/**
|
|
1722
|
+
* Issue #1296 (`seq: 629` & `seq: 631` — Rule-10b5-1 Style Automated Passive POL Rebalance & 5 Extreme-Case Circuit Breakers):
|
|
1723
|
+
* - Passively recycles a bounded slice of `chainRevenueDid`'s accumulated `ABT` fees into an active `CONSTANT_PRODUCT_AMM` pool (`factoryAddress`),
|
|
1724
|
+
* locking `releaseAbtAmount` + proportional `pairedTokenAmount` in `poolStakeAddress` (`Stake-for-Liquidity`) and minting LP shares
|
|
1725
|
+
* permanently to `burnSinkDid` (`lockedLpShares`).
|
|
1726
|
+
* - Enforces 5 hard mathematical circuit breakers:
|
|
1727
|
+
* 1. Dual-Window TWAP vs Spot Deviation Freeze (`TWAP_DEVIATION_CIRCUIT_BREAKER`, default max `500 bps` = 5% spot-to-1h-TWAP and `1000 bps` = 10% 1h-to-24h-TWAP);
|
|
1728
|
+
* 2. Asymmetric High-Water-Mark Ratchet (`ASYMMETRIC_HIGH_WATER_MARK_RATCHET`, requires `slowTwap24h >= highWaterMark * 0.90` and `tickLower >= slowTwap24h * 1.05`);
|
|
1729
|
+
* 3. 24h Epoch Drip Cap (`EPOCH_POL_DRIP_CAP_EXCEEDED`, default max `100 bps` = 1% of `chainRevenueDid` balance per 24h epoch);
|
|
1730
|
+
* 4. Zero Wash Trading / Passive LP Lock (`lockedLpShares` credited exclusively to `burnSinkDid`);
|
|
1731
|
+
* 5. Strict Constant-Product & Zero-Sum TransactionBlock enforcement.
|
|
1732
|
+
*/
|
|
1733
|
+
executeProgrammaticPolRebalance(input: ExecuteProgrammaticPolRebalanceInput, statedb: Record<string, any>): Promise<ExecuteProgrammaticPolRebalanceResult>;
|
|
1734
|
+
/**
|
|
1735
|
+
* Issue #1296 (`seq: 629` & `seq: 631` — Damped TWAP Purchasing-Power Stake Floor Recalibration):
|
|
1736
|
+
* - Automatically adjusts `policy.minDistributorStakeAbt` inversely with `slowTwap24hUsdScaled` so USD entry cost
|
|
1737
|
+
* remains constant when `ABT` price rises due to ecosystem staking locks.
|
|
1738
|
+
* - Protected by:
|
|
1739
|
+
* 1. Dual-Window TWAP vs Spot Deviation Freeze (`TWAP_DEVIATION_CIRCUIT_BREAKER`, default `<= 500 bps`);
|
|
1740
|
+
* 2. 1-per-24h Epoch Cooldown (`RECALIBRATION_EPOCH_COOLDOWN_ACTIVE`);
|
|
1741
|
+
* 3. Damped Step Clamp (`DAMPED_EPOCH_STEP_CLAMP`, default max $\pm 10\%$ change per 24h epoch);
|
|
1742
|
+
* 4. Hard `[hardMinStakeAbt, hardMaxStakeAbt]` floor/ceiling clamp.
|
|
1743
|
+
*/
|
|
1744
|
+
recalibrateDynamicStakeFloorByTwap(input: RecalibrateDynamicStakeFloorInput): RecalibrateDynamicStakeFloorResult;
|
|
1745
|
+
/**
|
|
1746
|
+
* Layer 3 (Anti-Involution): Congestion-Scaled Dynamic `Stake-for-Quality` Floor (`computeDynamicCategoryListingStakeFloor`):
|
|
1747
|
+
* - Blue-ocean categories (`activeStakedSkuCount <= freeCapacitySkus`) require only `baseStakeFloorAbt` (default `50 ABT`).
|
|
1748
|
+
* - As copycat miners crowd into the same category (`excess = activeStakedSkuCount - freeCapacitySkus > 0`),
|
|
1749
|
+
* the required `Stake-for-Quality` lockup scales quadratically:
|
|
1750
|
+
* `requiredStakeAbt = min(hardMaxStakeAbt, baseStakeFloorAbt * (1 + excess^2 / congestionScaleDenominator))`
|
|
1751
|
+
* - Protects early pioneers from zero-cost race-to-the-bottom undercutting while converting gold-rush inflows
|
|
1752
|
+
* into locked `ABT` TVL in `statedb.stake`.
|
|
1753
|
+
*/
|
|
1754
|
+
computeDynamicCategoryListingStakeFloor(input: {
|
|
1755
|
+
category: string;
|
|
1756
|
+
baseStakeFloorAbt?: string;
|
|
1757
|
+
hardMaxStakeAbt?: string;
|
|
1758
|
+
freeCapacitySkus?: number;
|
|
1759
|
+
congestionScaleDenominator?: number;
|
|
1760
|
+
}): DynamicCategoryStakeFloorResult;
|
|
1761
|
+
/**
|
|
1762
|
+
* Layer 2 (Privacy Layer): Unlinkable Miner Shop Persona Registration (`registerMinerShopPersona`):
|
|
1763
|
+
* - Verifies that `ownerWalletDid` holds an active `ABT` stake in `statedb.stake` at `stakeAddress`
|
|
1764
|
+
* (`stakedAbt >= DEFAULT_SKU_QUALITY_BASE_STAKE_ABT`).
|
|
1765
|
+
* - Enforces a strict `1:1` stake address and nullifier uniqueness invariant (`usedPersonaStakeAddresses`
|
|
1766
|
+
* + `usedPersonaStakeNullifiers`) and locks the stake in `statedb.stake` (`revocable: false`, `boundPersonaDid`)
|
|
1767
|
+
* so a single small stake cannot be withdrawn/recycled to spawn Sybil shop personas.
|
|
1768
|
+
* - Publishes only the blinded `stakeCommitmentHash` and `lockedStakeTierAbt` on `MinerShopPersonaPublicRecord`
|
|
1769
|
+
* (never exposing `ownerWalletDid` in public views), while internally tracking `ownerWalletDid` to block
|
|
1770
|
+
* self-dealing (`buyerDid === ownerWalletDid` or cross-persona self-purchases) in organic GMV and revenue badges.
|
|
1771
|
+
*/
|
|
1772
|
+
registerMinerShopPersona(input: RegisterMinerShopPersonaInput, statedb: Record<string, any>): Promise<MinerShopPersonaPublicRecord>;
|
|
1773
|
+
/**
|
|
1774
|
+
* 1. Unified SKU Factory Listing (`registerSkuFactoryListing`):
|
|
1775
|
+
* - Registers a digital deliverable, AI Skill, Prompt Recipe, or limited Alpha Factory SKU on-chain.
|
|
1776
|
+
* - Enforces the category's dynamic congestion-scaled `Stake-for-Quality` floor (`computeDynamicCategoryListingStakeFloor`)
|
|
1777
|
+
* and locks `qualityStakeAbt` in `statedb.stake` at `deriveSkuQualityStakeAddress(makerDid, factoryAddress, this.abtTokenAddress)`.
|
|
1778
|
+
*/
|
|
1779
|
+
registerSkuFactoryListing(input: RegisterSkuFactoryListingInput, statedb: Record<string, any>): Promise<{
|
|
1780
|
+
blockResult: TransactionBlockResult;
|
|
1781
|
+
listing: SkuFactoryListingRecord;
|
|
1782
|
+
}>;
|
|
1783
|
+
/**
|
|
1784
|
+
* 2. Unified SKU Checkout (`executeUnifiedSkuCheckout`):
|
|
1785
|
+
* - Supports direct `ABT` checkout or `PathPayment` cross-FT routing (`paymentTokenAddress -> ABT -> SKU Checkout`);
|
|
1786
|
+
* - Enforces `maxInputAmount` and `PostConditions` (`strictZeroUnlistedOutflow: true`);
|
|
1787
|
+
* - Executes 4-way atomic `ABT` settlement split (`Maker Net + Upstream Royalty + UI/Curator Referrer Rebate + Protocol Revenue Vault`,
|
|
1788
|
+
* with **0% official token burn**);
|
|
1789
|
+
* - Mints the delivered NFT asset into `statedb.asset` owned by `buyerDid`, sealing with `sealEncryptedNftForOwner`
|
|
1790
|
+
* (`ocap.nft.encrypted.v1` / `EncryptedAssetEnvelope`) when `encryptedDeliveryMode === true`;
|
|
1791
|
+
* - Automatically tags `isOrganicSale = false` on self-dealing (`buyerDid === makerDid` or cross-persona self-purchases)
|
|
1792
|
+
* so wash-trading is 100% excluded from heatmap GMV and revenue badges.
|
|
1793
|
+
*/
|
|
1794
|
+
executeUnifiedSkuCheckout(input: ExecuteUnifiedSkuCheckoutInput, statedb: Record<string, any>): Promise<{
|
|
1795
|
+
blockResult: TransactionBlockResult;
|
|
1796
|
+
order: SkuOrderSettlementRecord;
|
|
1797
|
+
encryptedEnvelope?: EncryptedAssetEnvelope;
|
|
1798
|
+
}>;
|
|
1799
|
+
/**
|
|
1800
|
+
* 3. Fisherman / Buyer Defect Slashing (`challengeAndSlashDefectiveSku`):
|
|
1801
|
+
* - Verifies a cryptographic defect proof on a settled SKU order:
|
|
1802
|
+
* 1. `PLAINTEXT_HASH_MISMATCH`: Challenger provides `unwrappedCekHex` matching `order.committedCekCommitmentHash`,
|
|
1803
|
+
* and AES-256-GCM decryption of `order.encryptedEnvelope` either fails authentication or yields a plaintext
|
|
1804
|
+
* whose `computeEncryptedNftPlaintextHash` mismatches `order.committedPlaintextHash`.
|
|
1805
|
+
* 2. `CEK_COMMITMENT_MISMATCH`: Challenger provides `buyerSecretKeyHex` (matching `recipientPk`) or
|
|
1806
|
+
* `ephemeralSecretKeyHex` (matching `ephemeralPk`), and the ECDH-unwrapped `CEK` from `encryptedCek`
|
|
1807
|
+
* fails `computeEncryptedNftCekCommitmentHash(unwrappedCek) === order.committedCekCommitmentHash` or `cekWrapTag`.
|
|
1808
|
+
* 3. `DELIVERY_TIMEOUT`: Non-inline-encrypted order exceeded `deliveryDeadlineSeconds` without fulfillment.
|
|
1809
|
+
* - Enforces a strict per-order challenge nullifier (`SKU_ORDER_ALREADY_CHALLENGED`).
|
|
1810
|
+
* - Slashes the maker's `Stake-for-Quality` in `statedb.stake` and distributes 100% of slashed `ABT` to:
|
|
1811
|
+
* `100% Buyer Refund + Fisherman Bounty (20% of excess) + Chain Revenue Vault (80% of excess)` with **0% official token burn**.
|
|
1812
|
+
*/
|
|
1813
|
+
challengeAndSlashDefectiveSku(input: ChallengeDefectiveSkuInput, statedb: Record<string, any>): Promise<ChallengeDefectiveSkuResult>;
|
|
1814
|
+
/**
|
|
1815
|
+
* Optional demand bounty registration (`postCategoryDemandBounty`) so `getCategorySupplyDemandHeatmap`
|
|
1816
|
+
* reflects real on-chain unfilled demand bounties (`unfilledBountyPoolAbt`) and scarcity premiums.
|
|
1817
|
+
*/
|
|
1818
|
+
postCategoryDemandBounty(input: PostCategoryDemandBountyInput): CategoryDemandBountyRecord;
|
|
1819
|
+
/**
|
|
1820
|
+
* Layer 1 (Public Macro Layer): Category Supply-Demand Heatmap (`getCategorySupplyDemandHeatmap`):
|
|
1821
|
+
* - Computes real-time 24h organic GMV, organic order count, unique organic buyers, median ticket size,
|
|
1822
|
+
* active quality-staked SKU count, unfilled demand bounty pool, and scarcity premium index (`scarcityPremiumBps`).
|
|
1823
|
+
* - Strictly excludes self-dealing (`!order.isOrganicSale`) and challenged/slashed orders (`order.status !== 'SETTLED'`).
|
|
1824
|
+
*/
|
|
1825
|
+
getCategorySupplyDemandHeatmap(input: {
|
|
1826
|
+
nowTimestampSeconds: number;
|
|
1827
|
+
windowSeconds?: number;
|
|
1828
|
+
}): CategorySupplyDemandMetrics[];
|
|
1829
|
+
/**
|
|
1830
|
+
* Layer 1 (Public Macro Layer): Anti-Wash-Trading Verifiable Miner Revenue Badge (`issueVerifiableMinerRevenueBadge`):
|
|
1831
|
+
* - Aggregates a miner's (`subjectDid` = `makerDid` or `shopPersonaDid`) cumulative organic net revenue
|
|
1832
|
+
* from settled, unchallenged, non-self-dealing SKU orders (`order.isOrganicSale === true`).
|
|
1833
|
+
* - Requires at least `minUniqueOrganicBuyers` (default `2`, enforced `>= 2`) to prevent single-accomplice wash-looping.
|
|
1834
|
+
* - Issues a verifiable range-tier badge (`TIER_BRONZE` >= 100 ABT, `TIER_SILVER` >= 1,000 ABT,
|
|
1835
|
+
* `TIER_GOLD` >= 10,000 ABT, `TIER_DIAMOND` >= 100,000 ABT) without leaking exact revenue or SKU formulas.
|
|
1836
|
+
*/
|
|
1837
|
+
issueVerifiableMinerRevenueBadge(input: {
|
|
1838
|
+
badgeId: string;
|
|
1839
|
+
subjectDid: string;
|
|
1840
|
+
minUniqueOrganicBuyers?: number;
|
|
1841
|
+
txTimestampSeconds: number;
|
|
1842
|
+
}): VerifiableMinerRevenueBadge;
|
|
1843
|
+
/**
|
|
1844
|
+
* Layer 3 (Anti-Involution): Per-SKU Granular Sales Metrics with Alpha Protection Delay (`getSkuGranularMetricsWithAlphaDelay`):
|
|
1845
|
+
* - During `[listing.createdAtSeconds, listing.createdAtSeconds + listing.alphaProtectionWindowSeconds)`
|
|
1846
|
+
* and for any individual order where `nowTimestampSeconds - order.settledAtSeconds < listing.alphaProtectionWindowSeconds`,
|
|
1847
|
+
* external callers (`viewerDid` != `makerDid` and `viewerDid` != `shopPersonaDid`) receive redacted `null`
|
|
1848
|
+
* for exact real-time sales count and revenue (`alphaWindowActive: true`), plus only a coarse velocity tier.
|
|
1849
|
+
* - The maker (`viewerIsMaker: true`) always sees 100% real-time metrics, and external callers see matured
|
|
1850
|
+
* orders (`nowTimestampSeconds - order.settledAtSeconds >= listing.alphaProtectionWindowSeconds`) once the Alpha window elapses.
|
|
1851
|
+
*/
|
|
1852
|
+
getSkuGranularMetricsWithAlphaDelay(input: {
|
|
1853
|
+
factoryAddress: string;
|
|
1854
|
+
viewerDid?: string;
|
|
1855
|
+
nowTimestampSeconds: number;
|
|
1856
|
+
}): SkuGranularMetricsView;
|
|
1857
|
+
}
|
|
1858
|
+
declare const DEFAULT_SKU_QUALITY_BASE_STAKE_ABT = "50000000000000000000";
|
|
1859
|
+
declare const MAX_SKU_QUALITY_DYNAMIC_STAKE_ABT = "100000000000000000000000";
|
|
1860
|
+
declare const DEFAULT_SKU_ALPHA_PROTECTION_WINDOW_SECONDS = 259200;
|
|
1861
|
+
declare const MAX_SKU_ALPHA_PROTECTION_WINDOW_SECONDS = 604800;
|
|
1862
|
+
declare const DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS = 2000;
|
|
1863
|
+
/**
|
|
1864
|
+
* Deterministic `Stake-for-Quality` address helper (`toStakeAddress(makerDid, officialTokenAddress, 'sku-quality:' + factoryAddress)`).
|
|
1865
|
+
*/
|
|
1866
|
+
declare function deriveSkuQualityStakeAddress(makerDid: string, factoryAddress: string, officialTokenAddress?: string): string;
|
|
1867
|
+
interface SkuFactoryListingRecord {
|
|
1868
|
+
factoryAddress: string;
|
|
1869
|
+
makerDid: string;
|
|
1870
|
+
shopPersonaDid?: string;
|
|
1871
|
+
category: string;
|
|
1872
|
+
tags: string[];
|
|
1873
|
+
publicSummary: string;
|
|
1874
|
+
unitPriceAbt: string;
|
|
1875
|
+
supplyLimit: number;
|
|
1876
|
+
mintedCount: number;
|
|
1877
|
+
upstreamCreatorDid?: string;
|
|
1878
|
+
upstreamRoyaltyBps: number;
|
|
1879
|
+
curatorRebateBps: number;
|
|
1880
|
+
protocolFeeBps: number;
|
|
1881
|
+
alphaProtectionWindowSeconds: number;
|
|
1882
|
+
encryptedDeliveryMode: boolean;
|
|
1883
|
+
committedPlaintextHash?: string;
|
|
1884
|
+
arcSpaceUri?: string;
|
|
1885
|
+
qualityStakeAddress: string;
|
|
1886
|
+
lockedQualityStakeAbt: string;
|
|
1887
|
+
status: 'ACTIVE' | 'PAUSED' | 'SLASHED_DEFECTIVE';
|
|
1888
|
+
createdAtSeconds: number;
|
|
1889
|
+
}
|
|
1890
|
+
interface RegisterSkuFactoryListingInput {
|
|
1891
|
+
makerDid: string;
|
|
1892
|
+
factoryAddress: string;
|
|
1893
|
+
shopPersonaDid?: string;
|
|
1894
|
+
category: string;
|
|
1895
|
+
tags?: string[];
|
|
1896
|
+
publicSummary: string;
|
|
1897
|
+
unitPriceAbt: string;
|
|
1898
|
+
supplyLimit?: number;
|
|
1899
|
+
upstreamCreatorDid?: string;
|
|
1900
|
+
upstreamRoyaltyBps?: number;
|
|
1901
|
+
curatorRebateBps?: number;
|
|
1902
|
+
protocolFeeBps?: number;
|
|
1903
|
+
alphaProtectionWindowSeconds?: number;
|
|
1904
|
+
encryptedDeliveryMode?: boolean;
|
|
1905
|
+
committedPlaintextHash?: string;
|
|
1906
|
+
arcSpaceUri?: string;
|
|
1907
|
+
qualityStakeAbt: string;
|
|
1908
|
+
txTimestampSeconds: number;
|
|
1909
|
+
}
|
|
1910
|
+
interface ExecuteUnifiedSkuCheckoutInput {
|
|
1911
|
+
orderId: string;
|
|
1912
|
+
buyerDid: string;
|
|
1913
|
+
buyerPublicKeyHex?: string;
|
|
1914
|
+
factoryAddress: string;
|
|
1915
|
+
mintedAssetDid: string;
|
|
1916
|
+
paymentTokenAddress?: string;
|
|
1917
|
+
maxInputAmount: string;
|
|
1918
|
+
uiReferrerDid?: string;
|
|
1919
|
+
encryptedPrivateMetadata?: EncryptedNftPrivateMetadata;
|
|
1920
|
+
prebuiltEncryptedEnvelope?: EncryptedAssetEnvelope;
|
|
1921
|
+
cekHex?: string;
|
|
1922
|
+
ephemeralSecretKeyHex?: string;
|
|
1923
|
+
nonceHex?: string;
|
|
1924
|
+
deliverySlaSeconds?: number;
|
|
1925
|
+
txTimestampSeconds: number;
|
|
1926
|
+
}
|
|
1927
|
+
interface SkuOrderSettlementRecord {
|
|
1928
|
+
orderId: string;
|
|
1929
|
+
factoryAddress: string;
|
|
1930
|
+
category: string;
|
|
1931
|
+
makerDid: string;
|
|
1932
|
+
shopPersonaDid?: string;
|
|
1933
|
+
buyerDid: string;
|
|
1934
|
+
mintedAssetDid: string;
|
|
1935
|
+
paymentTokenAddress: string;
|
|
1936
|
+
paymentTokenSpent: string;
|
|
1937
|
+
grossAbtPaid: string;
|
|
1938
|
+
makerNetAbt: string;
|
|
1939
|
+
upstreamRoyaltyAbt: string;
|
|
1940
|
+
uiReferrerRebateAbt: string;
|
|
1941
|
+
protocolFeeAbt: string;
|
|
1942
|
+
encryptedEnvelope?: EncryptedAssetEnvelope;
|
|
1943
|
+
committedPlaintextHash?: string;
|
|
1944
|
+
committedCekCommitmentHash?: string;
|
|
1945
|
+
settledAtSeconds: number;
|
|
1946
|
+
deliveryDeadlineSeconds: number;
|
|
1947
|
+
isOrganicSale: boolean;
|
|
1948
|
+
challenged: boolean;
|
|
1949
|
+
status: 'SETTLED' | 'SLASHED_REFUNDED';
|
|
1950
|
+
}
|
|
1951
|
+
interface ChallengeDefectiveSkuInput {
|
|
1952
|
+
orderId: string;
|
|
1953
|
+
challengerDid: string;
|
|
1954
|
+
defectReason: 'PLAINTEXT_HASH_MISMATCH' | 'CEK_COMMITMENT_MISMATCH' | 'DELIVERY_TIMEOUT';
|
|
1955
|
+
unwrappedCekHex?: string;
|
|
1956
|
+
buyerSecretKeyHex?: string;
|
|
1957
|
+
ephemeralSecretKeyHex?: string;
|
|
1958
|
+
txTimestampSeconds: number;
|
|
1959
|
+
}
|
|
1960
|
+
interface ChallengeDefectiveSkuResult {
|
|
1961
|
+
blockResult: TransactionBlockResult;
|
|
1962
|
+
orderId: string;
|
|
1963
|
+
factoryAddress: string;
|
|
1964
|
+
defectReason: 'PLAINTEXT_HASH_MISMATCH' | 'CEK_COMMITMENT_MISMATCH' | 'DELIVERY_TIMEOUT';
|
|
1965
|
+
slashedTotalAbt: string;
|
|
1966
|
+
buyerRefundAbt: string;
|
|
1967
|
+
fishermanBountyAbt: string;
|
|
1968
|
+
treasurySlashAbt: string;
|
|
1969
|
+
order: SkuOrderSettlementRecord;
|
|
1970
|
+
}
|
|
1971
|
+
interface PostCategoryDemandBountyInput {
|
|
1972
|
+
bountyId: string;
|
|
1973
|
+
sponsorDid: string;
|
|
1974
|
+
category: string;
|
|
1975
|
+
bountyAmountAbt: string;
|
|
1976
|
+
requirementSummary: string;
|
|
1977
|
+
}
|
|
1978
|
+
interface CategoryDemandBountyRecord {
|
|
1979
|
+
bountyId: string;
|
|
1980
|
+
sponsorDid: string;
|
|
1981
|
+
category: string;
|
|
1982
|
+
bountyAmountAbt: string;
|
|
1983
|
+
requirementSummary: string;
|
|
1984
|
+
status: 'OPEN' | 'FULFILLED';
|
|
1985
|
+
}
|
|
1986
|
+
interface CategorySupplyDemandMetrics {
|
|
1987
|
+
category: string;
|
|
1988
|
+
organicGmv24hAbt: string;
|
|
1989
|
+
organicOrderCount24h: number;
|
|
1990
|
+
uniqueOrganicBuyers24h: number;
|
|
1991
|
+
medianTicketAbt: string;
|
|
1992
|
+
activeStakedSkuCount: number;
|
|
1993
|
+
totalQualityStakeLockedAbt: string;
|
|
1994
|
+
unfilledBountyPoolAbt: string;
|
|
1995
|
+
scarcityPremiumBps: number;
|
|
1996
|
+
currentDynamicStakeFloorAbt: string;
|
|
1997
|
+
}
|
|
1998
|
+
type MinerRevenueTier = 'TIER_BRONZE' | 'TIER_SILVER' | 'TIER_GOLD' | 'TIER_DIAMOND';
|
|
1999
|
+
interface VerifiableMinerRevenueBadge {
|
|
2000
|
+
badgeId: string;
|
|
2001
|
+
subjectDid: string;
|
|
2002
|
+
revenueTier: MinerRevenueTier;
|
|
2003
|
+
minTierThresholdAbt: string;
|
|
2004
|
+
verifiedOrganicOrderCount: number;
|
|
2005
|
+
verifiedUniqueOrganicBuyers: number;
|
|
2006
|
+
issuedAtSeconds: number;
|
|
2007
|
+
issuerAuthorityDid: string;
|
|
2008
|
+
badgeDigest: string;
|
|
2009
|
+
}
|
|
2010
|
+
interface RegisterMinerShopPersonaInput {
|
|
2011
|
+
ownerWalletDid: string;
|
|
2012
|
+
shopPersonaDid: string;
|
|
2013
|
+
stakeAddress: string;
|
|
2014
|
+
displayName: string;
|
|
2015
|
+
primaryCategory: string;
|
|
2016
|
+
personaSaltHex: string;
|
|
2017
|
+
txTimestampSeconds: number;
|
|
2018
|
+
}
|
|
2019
|
+
interface MinerShopPersonaPublicRecord {
|
|
2020
|
+
shopPersonaDid: string;
|
|
2021
|
+
displayName: string;
|
|
2022
|
+
primaryCategory: string;
|
|
2023
|
+
stakeCommitmentHash: string;
|
|
2024
|
+
stakeNullifierHash: string;
|
|
2025
|
+
lockedStakeTierAbt: string;
|
|
2026
|
+
registeredAtSeconds: number;
|
|
2027
|
+
status: 'ACTIVE' | 'REVOKED';
|
|
2028
|
+
}
|
|
2029
|
+
interface DynamicCategoryStakeFloorResult {
|
|
2030
|
+
category: string;
|
|
2031
|
+
activeStakedSkuCount: number;
|
|
2032
|
+
freeCapacitySkus: number;
|
|
2033
|
+
baseStakeFloorAbt: string;
|
|
2034
|
+
requiredStakeAbt: string;
|
|
2035
|
+
hardMaxStakeAbt: string;
|
|
2036
|
+
congestionMultiplierBps: number;
|
|
2037
|
+
}
|
|
2038
|
+
interface SkuGranularMetricsView {
|
|
2039
|
+
factoryAddress: string;
|
|
2040
|
+
category: string;
|
|
2041
|
+
alphaWindowActive: boolean;
|
|
2042
|
+
viewerIsMaker: boolean;
|
|
2043
|
+
visibleMintedCount: number | null;
|
|
2044
|
+
visibleOrganicRevenueAbt: string | null;
|
|
2045
|
+
coarseSalesVelocityTier: 'NEW_ALPHA_PROTECTED' | 'STEADY' | 'HIGH_VELOCITY' | 'BREAKOUT';
|
|
2046
|
+
maturedOrderCount: number;
|
|
2047
|
+
maturedOrganicRevenueAbt: string;
|
|
2048
|
+
}
|
|
2049
|
+
/**
|
|
2050
|
+
* Backward-compatible alias for `OcapNativeExchangeEngine` (`CHAIN_DESIGN.md` §3.1).
|
|
2051
|
+
*/
|
|
2052
|
+
declare const OcapNativeAbtExchangeEngine: typeof OcapNativeExchangeEngine;
|
|
2053
|
+
type OcapNativeAbtExchangeEngine = OcapNativeExchangeEngine;
|
|
2054
|
+
//#endregion
|
|
2055
|
+
export { AcceptNftBuyOfferInput, AcceptNftBuyOfferResult, 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_OFFICIAL_TOKEN_ADDRESS, DEFAULT_EXCHANGE_SWAP_FEE_BPS, DEFAULT_FISHERMAN_DEFECT_BOUNTY_BPS, DEFAULT_FT_ISSUANCE_FEE_ABT, DEFAULT_GRADUATION_FEE_ABT, DEFAULT_ISSUANCE_FEE_BURN_SHARE_BPS, DEFAULT_MAX_SWAP_PRICE_IMPACT_BPS, DEFAULT_MIN_ENGLISH_BID_INCREMENT_BPS, DEFAULT_MIN_FT_ISSUANCE_STAKE_ABT, 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_FT_ISSUANCE_STAKE_ABT, MAX_GRADUATION_RESERVE_ABT_CEILING, MAX_GRADUATION_UNIQUE_HOLDERS_CEILING, MAX_NFT_ATTRIBUTE_PATH_DEPTH, MAX_NFT_ATTRIBUTE_PREDICATES, MAX_NFT_CREATOR_ROYALTY_BPS, MAX_NFT_OFFER_PREDICATES, MAX_PROMOTER_REBATE_BPS, MAX_PROMOTER_TIERS, 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_FT_ISSUANCE_STAKE_ABT, MIN_GRADUATION_HOLDER_SHARE_BPS, MIN_GRADUATION_RESERVE_ABT_FLOOR, MaturingCardSettlementRecord, MaturingDistributorRebateRecord, MinerRevenueTier, MinerShopPersonaPublicRecord, NativeNftBuyOfferRecord, NativeNftListingMode, NativeNftListingRecord, NativeNftOfferSettlementResult, NativeNftSettlementResult, NativeSwapExecutionResult, NftAttributeOperator, NftAttributePredicate, NftAttributePredicateOperator, NftBuyOfferRecord, 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, validateEscalatingPromoterTiers, verifyOpenComposingRuleVc };
|