@inversealtruism/cairnx-core 0.2.7 → 0.2.8
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/CHANGELOG.md +60 -0
- package/CONVENTION.md +259 -89
- package/README.md +20 -6
- package/dist/index.cjs +79 -11
- package/dist/index.d.cts +75 -1
- package/dist/index.d.ts +75 -1
- package/dist/index.js +75 -11
- package/package.json +1 -1
- package/test/vectors/cases-convention.json +2202 -0
- package/test/vectors/forward.json +16 -0
- package/test/vectors/moves.json +15 -0
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ stateDiagram-v2
|
|
|
101
101
|
Active --> Grace: lease term ends (~1 year)
|
|
102
102
|
Grace --> Active: nrenew · OWNER ONLY, ~30-day window
|
|
103
103
|
Grace --> Lapsed: grace ends un-renewed
|
|
104
|
-
Lapsed --> Active: recapture · anyone re-claims at a DECAYING premium (
|
|
104
|
+
Lapsed --> Active: recapture · anyone re-claims at a DECAYING premium (19x stepping down to 1x over about 28 days), fresh lease
|
|
105
105
|
Active --> [*]
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -115,7 +115,7 @@ stateDiagram-v2
|
|
|
115
115
|
(`nprofile`), transfer it (`nxfer`), renew it (`nrenew`), or list it for sale.
|
|
116
116
|
3. **Grace (~30 days).** When the term ends, **only the current owner** may renew during a grace window, your name is never sniped out from under you while you still hold it.
|
|
117
117
|
4. **Lapsed → decaying-premium recapture.** If grace passes un-renewed, anyone may re-claim, but at a
|
|
118
|
-
**premium
|
|
118
|
+
**premium of 19× stepping down to 1×** over about 28 days (CONVENTION section 17; a Dutch auction back to the floor price). This prices
|
|
119
119
|
in genuine demand without a permanent squatting tax, and a recaptured name gets a fresh ownership basis
|
|
120
120
|
so a stale pre-lapse commit can't steal it.
|
|
121
121
|
|
|
@@ -137,7 +137,7 @@ stateDiagram-v2
|
|
|
137
137
|
|---|---|---|
|
|
138
138
|
| Lease term | ~1 year (`NAME_TERM_EPOCHS = 8760`) | 1 epoch ≈ 1 h (30 blocks) |
|
|
139
139
|
| Grace window | ~30 days (`NAME_GRACE_EPOCHS = 720`) | owner-only renewal |
|
|
140
|
-
| Recapture premium | **
|
|
140
|
+
| Recapture premium | **19× stepping down to 1×** over about 28 days (CONVENTION section 17) | decaying Dutch auction on lapsed names |
|
|
141
141
|
| Reveal window | ~16 min (`REG_COMMIT_MAX_BLOCKS = 8`, v2.5+; was 240 blocks below v2.5) | commit-reveal deadline; doubles as the displacement freeze |
|
|
142
142
|
| Registration fee | **15 / 10 / 5 / 3 CSD** by length (≤3 / 4 / 5-9 / ≥10 chars, v2.4) | length-graded (was flat 6.7 / 3 CSD under v1.8); paid to the treasury at finalize (v2.5+) |
|
|
143
143
|
|
|
@@ -175,6 +175,11 @@ sequenceDiagram
|
|
|
175
175
|
a name that does not resolve or whose lease lapsed, and at signing it re-checks and refuses an address change
|
|
176
176
|
or a drop from verified to not verified. The wallet's `SECURITY.md` ("What happens when the sources
|
|
177
177
|
disagree") is the full list.
|
|
178
|
+
- **The rule a resolved name follows** is `resolveNameIn(state.names, name)` (CONVENTION §35.4): the `nset` address,
|
|
179
|
+
else the owner; a pending reservation and an absent name resolve to nothing; a lapsed lease resolves with
|
|
180
|
+
`lapsed: true`, which a sender refuses. `nameView` gives what a reader shows: the class (held, pending, lapsed, free,
|
|
181
|
+
reserved), the owner, and a held name's address and profile. The reference service's `/cairnx/resolve/:name` answers
|
|
182
|
+
with the first, and `test/vectors/forward.json` pins both.
|
|
178
183
|
- **Reverse resolution (`address → primary name`, a display label) is server-trusted.** It is never a send
|
|
179
184
|
target, an identity badge only, so it is cheaper and clearly bounded as "unverified label."
|
|
180
185
|
- **Ownership has an unambiguous total order:** lowest `(effectiveHeight, position, ordinal-id)` wins, with
|
|
@@ -285,7 +290,8 @@ from a block to events, CONVENTION §33) · `src/hashes.ts` (the state and event
|
|
|
285
290
|
height-gated client selectors) · `src/client.ts` (the claim-burial depth a payer waits for, sized against a minority miner) · `src/preflight.ts`
|
|
286
291
|
(build-side helpers every host must compute identically: `requiredFillOutputs`, `previewFill`/`fillIsSafe`,
|
|
287
292
|
`buildFeeHeight` + `NAME_FEE_GATES`, `finalizeWinnerCheck`) · `src/primary.ts` (`pickPrimaryName` /
|
|
288
|
-
`primaryRankBefore`, the one primary-name selection every host must agree on) · `src/
|
|
293
|
+
`primaryRankBefore`, the one primary-name selection every host must agree on) · `src/forward.ts` (`resolveNameIn` / `nameView`, forward
|
|
294
|
+
resolution, §35.4) · `src/mm/` (the
|
|
289
295
|
`@inversealtruism/cairnx-core/mm` subpath: the market maker's bid sizer, fill notional, Sunrise spot curve and
|
|
290
296
|
order pricing, and the RFQ all-in sum; not consensus and not part of the root export) · `CONVENTION.md`
|
|
291
297
|
(normative spec, §1–§39) · `test/vectors/` (portable conformance corpus).
|
|
@@ -329,16 +335,24 @@ Why a record was applied or refused: each entry of `resolve(...).events` carries
|
|
|
329
335
|
`REASON_CODES`), and `explainRecord(uri, payloadHash)` names the rule a record breaks before it reaches the resolver.
|
|
330
336
|
Match the code, never the `note` text, which may change; a code your release does not know reads by the entry's `ok`.
|
|
331
337
|
|
|
338
|
+
Who received which tokens in which record: an applied entry that moved tokens carries `moves` (`CONVENTION.md` §41,
|
|
339
|
+
`TokenMove`), each `{ leg, ticker, from, to, amount }` with the leg `mint`, `xfer`, `sale`, `fee` or `fill`, written
|
|
340
|
+
where the resolver moves the balance. A deposit credit is a move whose `to` is the receiving address; read the amount
|
|
341
|
+
from the move, not from the record, since a mint is capped and a partial fill delivers by its floor. A server that
|
|
342
|
+
credits a listed token by ticker also pins `tokens[ticker].deployId`, since a replay of another chain can bind the
|
|
343
|
+
ticker to another deploy. Moves are outside canonical state, so they change no hash.
|
|
344
|
+
|
|
332
345
|
### Write a conformant resolver in another language
|
|
333
346
|
|
|
334
347
|
1. Implement `CONVENTION.md` §1–§34 (the events of a block, apply order, every record type, the `V*_HEIGHT`
|
|
335
348
|
activations (using the re-pinned v2.4–v2.7 heights), the canonical-state format, ordinal key ordering, data
|
|
336
349
|
surface only).
|
|
337
|
-
2. Reproduce `test/vectors/events.json` (§33.7). Replay `test/vectors/cases.json`, `cases-v29.json
|
|
338
|
-
`cases-rules.json`: your canonical state must equal `expectedState` **byte-for-byte**.
|
|
350
|
+
2. Reproduce `test/vectors/events.json` (§33.7). Replay `test/vectors/cases.json`, `cases-v29.json`,
|
|
351
|
+
`cases-rules.json` and `cases-convention.json`: your canonical state must equal `expectedState` **byte-for-byte**.
|
|
339
352
|
3. Replay the live chain and compare the state hash (§34.1) against `test/vectors/replay-hashes.json`, and reproduce
|
|
340
353
|
`test/vectors/hashes.json` (§34.4).
|
|
341
354
|
4. Only if you publish reason codes (§40): reproduce `test/vectors/codes.json`.
|
|
355
|
+
5. Only if you publish token moves (§41): reproduce `test/vectors/moves.json`.
|
|
342
356
|
|
|
343
357
|
---
|
|
344
358
|
|
package/dist/index.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
ADDR_RE: () => ADDR_RE,
|
|
25
25
|
AMOUNT_RE: () => AMOUNT_RE,
|
|
26
26
|
BID_KEYS: () => BID_KEYS,
|
|
27
|
+
CAIRNX_CORE_VERSION: () => CAIRNX_CORE_VERSION,
|
|
27
28
|
CAIRNX_EVENT_RULE: () => CAIRNX_EVENT_RULE,
|
|
28
29
|
CAP_CODES: () => CAP_CODES,
|
|
29
30
|
CLAIM_ATTACKER_Q: () => CLAIM_ATTACKER_Q,
|
|
@@ -51,6 +52,7 @@ __export(index_exports, {
|
|
|
51
52
|
FINALIZE_TIP_MARGIN: () => FINALIZE_TIP_MARGIN,
|
|
52
53
|
FINAL_DEPTH: () => FINAL_DEPTH,
|
|
53
54
|
GAP_NEEDED: () => GAP_NEEDED,
|
|
55
|
+
GATE_HEIGHTS: () => GATE_HEIGHTS,
|
|
54
56
|
HALVING_INTERVAL: () => import_csd_codec7.HALVING_INTERVAL,
|
|
55
57
|
HASH_RE: () => HASH_RE,
|
|
56
58
|
INITIAL_REWARD: () => import_csd_codec7.INITIAL_REWARD,
|
|
@@ -169,6 +171,7 @@ __export(index_exports, {
|
|
|
169
171
|
nameRegFee: () => nameRegFee,
|
|
170
172
|
nameRenew: () => nameRenew,
|
|
171
173
|
nameSet: () => nameSet,
|
|
174
|
+
nameView: () => nameView,
|
|
172
175
|
nameXfer: () => nameXfer,
|
|
173
176
|
offer: () => offer,
|
|
174
177
|
offerCancelAll: () => offerCancelAll,
|
|
@@ -188,6 +191,7 @@ __export(index_exports, {
|
|
|
188
191
|
requiredClaimDepth: () => requiredClaimDepth,
|
|
189
192
|
requiredFillOutputs: () => requiredFillOutputs,
|
|
190
193
|
resolve: () => resolve,
|
|
194
|
+
resolveNameIn: () => resolveNameIn,
|
|
191
195
|
stateHash: () => stateHash,
|
|
192
196
|
tokenMeta: () => tokenMeta,
|
|
193
197
|
tradeFee: () => tradeFee,
|
|
@@ -576,6 +580,7 @@ var fclaim = (r) => buildRecord({ v: 1, t: "fclaim", ...r });
|
|
|
576
580
|
function ptAmt(v) {
|
|
577
581
|
return typeof v === "string" && AMOUNT_RE.test(v) ? BigInt(v) : 0n;
|
|
578
582
|
}
|
|
583
|
+
var tokenMove = (leg, ticker, from, to, amount) => ({ leg, ticker, from, to, amount: amount.toString() });
|
|
579
584
|
var effExpiry = (e, height) => e.height >= V22_HEIGHT ? e.expiresEpoch : height >= V21_HEIGHT ? Math.min(e.expiresEpoch, (0, import_csd_codec.epochOf)(e.height) + MAX_OFFER_EPOCHS) : e.expiresEpoch;
|
|
580
585
|
var claimGrace = (o) => o.claimUntilHeight !== void 0 ? claimGraceOf(o.claimUntilHeight, o.claimTxid) : 0;
|
|
581
586
|
var claimHeld = (o, height) => o.claimedBy !== void 0 && o.claimUntilHeight !== void 0 && height < o.claimUntilHeight + claimGrace(o);
|
|
@@ -628,9 +633,13 @@ function createContext(store) {
|
|
|
628
633
|
bal(t, o.seller).locked -= amt;
|
|
629
634
|
bal(t, who).available += amt;
|
|
630
635
|
offerLock.delete(o.id);
|
|
636
|
+
return tokenMove("fill", t, o.seller, who, amt);
|
|
631
637
|
};
|
|
632
|
-
const entry = (e, id, kind, ok, code, why) =>
|
|
633
|
-
|
|
638
|
+
const entry = (e, id, kind, ok, code, why, moves) => {
|
|
639
|
+
const written = moves?.filter((m) => m.amount !== "0") ?? [];
|
|
640
|
+
log.push({ height: e.height, pos: e.pos, id, kind, ok, code, ...why ? { note: why } : {}, ...written.length ? { moves: written } : {} });
|
|
641
|
+
};
|
|
642
|
+
const applied = (e, id, kind, code, why, moves) => entry(e, id, kind, true, code, why, moves);
|
|
634
643
|
const refused = (e, id, kind, code, why) => entry(e, id, kind, false, code, why);
|
|
635
644
|
return {
|
|
636
645
|
tokens,
|
|
@@ -793,13 +802,17 @@ function applyTokenFill(c, ev, o, who) {
|
|
|
793
802
|
}
|
|
794
803
|
buyer.available -= amt + fee;
|
|
795
804
|
bal(o.want.ticker, o.want.payto).available += amt;
|
|
796
|
-
|
|
805
|
+
const moves = [tokenMove("sale", o.want.ticker, who, o.want.payto, amt)];
|
|
806
|
+
if (fee > 0n) {
|
|
807
|
+
bal(o.want.ticker, TREASURY_ADDR).available += fee;
|
|
808
|
+
moves.push(tokenMove("fee", o.want.ticker, who, TREASURY_ADDR, fee));
|
|
809
|
+
}
|
|
797
810
|
if (isNameGive(o.give)) deliverNameToBuyer(c, o.give.name, giveName, who, ev);
|
|
798
|
-
else releaseGiveLock(o, who, giveLock);
|
|
811
|
+
else moves.push(releaseGiveLock(o, who, giveLock));
|
|
799
812
|
setOfferStatus(o, "filled");
|
|
800
813
|
o.fill = { buyer: who, txid: ev.txid, height: ev.height, paid: amt.toString(), fee: fee.toString() };
|
|
801
814
|
markBidDone(o, who);
|
|
802
|
-
applied(ev, ev.txid, "fill", "FILL_APPLIED");
|
|
815
|
+
applied(ev, ev.txid, "fill", "FILL_APPLIED", void 0, moves);
|
|
803
816
|
}
|
|
804
817
|
function applyPartialFill(c, ev, o, who) {
|
|
805
818
|
const { offerLock, bal, applied, refused, setOfferStatus, markBidDone } = c;
|
|
@@ -849,6 +862,7 @@ function applyPartialFill(c, ev, o, who) {
|
|
|
849
862
|
}
|
|
850
863
|
bal(o.give.ticker, o.seller).locked -= out;
|
|
851
864
|
bal(o.give.ticker, who).available += out;
|
|
865
|
+
const moves = [tokenMove("fill", o.give.ticker, o.seller, who, out)];
|
|
852
866
|
offerLock.set(o.id, lock - out);
|
|
853
867
|
o.paid = newPaid.toString();
|
|
854
868
|
o.delivered = newDelivered.toString();
|
|
@@ -861,7 +875,7 @@ function applyPartialFill(c, ev, o, who) {
|
|
|
861
875
|
offerLock.delete(o.id);
|
|
862
876
|
markBidDone(o, who);
|
|
863
877
|
}
|
|
864
|
-
applied(ev, ev.txid, "fill", "FILL_PARTIAL", `partial ${x}/${want}
|
|
878
|
+
applied(ev, ev.txid, "fill", "FILL_PARTIAL", `partial ${x}/${want}`, moves);
|
|
865
879
|
}
|
|
866
880
|
function applyFill(c, ev, o, who) {
|
|
867
881
|
const { names, offerLock, applied, refused, setOfferStatus, markBidDone, releaseGiveLock } = c;
|
|
@@ -898,6 +912,7 @@ function applyFill(c, ev, o, who) {
|
|
|
898
912
|
return;
|
|
899
913
|
}
|
|
900
914
|
const paid = ptAmt(pt[o.want.payto]);
|
|
915
|
+
const moves = [];
|
|
901
916
|
if (isNameGive(o.give)) {
|
|
902
917
|
const n = names.get(o.give.name);
|
|
903
918
|
if (!n) {
|
|
@@ -911,13 +926,13 @@ function applyFill(c, ev, o, who) {
|
|
|
911
926
|
refused(ev, ev.txid, "fill", "INVARIANT_BROKEN", "offer lock missing");
|
|
912
927
|
return;
|
|
913
928
|
}
|
|
914
|
-
releaseGiveLock(o, who, amt);
|
|
929
|
+
moves.push(releaseGiveLock(o, who, amt));
|
|
915
930
|
}
|
|
916
931
|
c.feesPaid += fee;
|
|
917
932
|
setOfferStatus(o, "filled");
|
|
918
933
|
o.fill = { buyer: who, txid: ev.txid, height: ev.height, paid: paid.toString(), fee: fee.toString() };
|
|
919
934
|
markBidDone(o, who);
|
|
920
|
-
applied(ev, ev.txid, "fill", "FILL_APPLIED");
|
|
935
|
+
applied(ev, ev.txid, "fill", "FILL_APPLIED", void 0, moves);
|
|
921
936
|
}
|
|
922
937
|
function applyLegacyClaim(c, ev, o, who) {
|
|
923
938
|
const { applied, refused, store } = c;
|
|
@@ -1927,7 +1942,7 @@ function applyMint(c, ev, rec, who) {
|
|
|
1927
1942
|
}
|
|
1928
1943
|
tok.minted += credit;
|
|
1929
1944
|
bal(rec.ticker, who).available += credit;
|
|
1930
|
-
applied(ev, ev.id, "mint", "TOKEN_MINTED", credit.toString());
|
|
1945
|
+
applied(ev, ev.id, "mint", "TOKEN_MINTED", credit.toString(), [tokenMove("mint", rec.ticker, null, who, credit)]);
|
|
1931
1946
|
}
|
|
1932
1947
|
function applyTransfer(c, ev, rec, who) {
|
|
1933
1948
|
const { tokens, bal, applied, refused } = c;
|
|
@@ -1941,9 +1956,10 @@ function applyTransfer(c, ev, rec, who) {
|
|
|
1941
1956
|
refused(ev, ev.id, "transfer", "TOKEN_BALANCE_LOW", "insufficient available balance");
|
|
1942
1957
|
return;
|
|
1943
1958
|
}
|
|
1959
|
+
const to = rec.to.toLowerCase();
|
|
1944
1960
|
from.available -= amt;
|
|
1945
|
-
bal(rec.ticker,
|
|
1946
|
-
applied(ev, ev.id, "transfer", "TOKEN_TRANSFERRED");
|
|
1961
|
+
bal(rec.ticker, to).available += amt;
|
|
1962
|
+
applied(ev, ev.id, "transfer", "TOKEN_TRANSFERRED", void 0, [tokenMove("xfer", rec.ticker, who, to, amt)]);
|
|
1947
1963
|
}
|
|
1948
1964
|
function applyTmeta(c, ev, rec, who) {
|
|
1949
1965
|
const { tokens, applied, refused } = c;
|
|
@@ -2292,6 +2308,54 @@ function pickPrimaryName(names, a) {
|
|
|
2292
2308
|
return best ? best.name : null;
|
|
2293
2309
|
}
|
|
2294
2310
|
|
|
2311
|
+
// src/forward.ts
|
|
2312
|
+
function resolveNameIn(names, name) {
|
|
2313
|
+
if (!Object.hasOwn(names, name)) return null;
|
|
2314
|
+
const n = names[name];
|
|
2315
|
+
if (!n) return null;
|
|
2316
|
+
if (n.pending) return null;
|
|
2317
|
+
return { name, addr: n.addr ?? n.owner, via: n.addr ? "nset" : "owner", lapsed: n.expired === true, owner: n.owner };
|
|
2318
|
+
}
|
|
2319
|
+
function nameView(names, name) {
|
|
2320
|
+
if (typeof name !== "string" || !NAME_RE.test(name)) return null;
|
|
2321
|
+
const none = { owner: null, addr: null, profile: {}, paidThroughEpoch: null };
|
|
2322
|
+
if (RESERVED_NAMES.has(name)) return { name, state: "reserved", ...none };
|
|
2323
|
+
const n = Object.hasOwn(names, name) ? names[name] : void 0;
|
|
2324
|
+
if (!n) return { name, state: "free", ...none };
|
|
2325
|
+
const r = resolveNameIn(names, name);
|
|
2326
|
+
if (r === null) return { name, state: "pending", ...none, owner: n.owner };
|
|
2327
|
+
const paidThroughEpoch = n.paidThroughEpoch ?? null;
|
|
2328
|
+
if (r.lapsed) return { name, state: "lapsed", ...none, owner: n.owner, paidThroughEpoch };
|
|
2329
|
+
return { name, state: "held", owner: n.owner, addr: r.addr, profile: { ...n.profile }, paidThroughEpoch };
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2332
|
+
// src/version.ts
|
|
2333
|
+
var CAIRNX_CORE_VERSION = "0.2.8";
|
|
2334
|
+
|
|
2335
|
+
// src/gates.ts
|
|
2336
|
+
var GATE_HEIGHTS = Object.freeze({
|
|
2337
|
+
ACTIVATION_HEIGHT,
|
|
2338
|
+
V11_HEIGHT,
|
|
2339
|
+
V12_HEIGHT,
|
|
2340
|
+
V13_HEIGHT,
|
|
2341
|
+
V14_HEIGHT,
|
|
2342
|
+
V15_HEIGHT,
|
|
2343
|
+
V16_HEIGHT,
|
|
2344
|
+
V17_HEIGHT,
|
|
2345
|
+
V18_HEIGHT,
|
|
2346
|
+
V19_HEIGHT,
|
|
2347
|
+
V20_HEIGHT,
|
|
2348
|
+
V21_HEIGHT,
|
|
2349
|
+
V22_HEIGHT,
|
|
2350
|
+
V23_HEIGHT,
|
|
2351
|
+
V24_HEIGHT,
|
|
2352
|
+
V25_HEIGHT,
|
|
2353
|
+
V26_HEIGHT,
|
|
2354
|
+
V27_HEIGHT,
|
|
2355
|
+
V28_HEIGHT,
|
|
2356
|
+
V29_HEIGHT
|
|
2357
|
+
});
|
|
2358
|
+
|
|
2295
2359
|
// src/verifyfill.ts
|
|
2296
2360
|
var import_csd_codec4 = require("@inversealtruism/csd-codec");
|
|
2297
2361
|
var FCLAIM_MAX_HOLD_SPAN = import_csd_codec.EPOCH_LEN * (FCLAIM_MAX_EPOCH_AHEAD + 1) - 1;
|
|
@@ -2838,6 +2902,7 @@ var import_csd_codec7 = require("@inversealtruism/csd-codec");
|
|
|
2838
2902
|
ADDR_RE,
|
|
2839
2903
|
AMOUNT_RE,
|
|
2840
2904
|
BID_KEYS,
|
|
2905
|
+
CAIRNX_CORE_VERSION,
|
|
2841
2906
|
CAIRNX_EVENT_RULE,
|
|
2842
2907
|
CAP_CODES,
|
|
2843
2908
|
CLAIM_ATTACKER_Q,
|
|
@@ -2865,6 +2930,7 @@ var import_csd_codec7 = require("@inversealtruism/csd-codec");
|
|
|
2865
2930
|
FINALIZE_TIP_MARGIN,
|
|
2866
2931
|
FINAL_DEPTH,
|
|
2867
2932
|
GAP_NEEDED,
|
|
2933
|
+
GATE_HEIGHTS,
|
|
2868
2934
|
HALVING_INTERVAL,
|
|
2869
2935
|
HASH_RE,
|
|
2870
2936
|
INITIAL_REWARD,
|
|
@@ -2983,6 +3049,7 @@ var import_csd_codec7 = require("@inversealtruism/csd-codec");
|
|
|
2983
3049
|
nameRegFee,
|
|
2984
3050
|
nameRenew,
|
|
2985
3051
|
nameSet,
|
|
3052
|
+
nameView,
|
|
2986
3053
|
nameXfer,
|
|
2987
3054
|
offer,
|
|
2988
3055
|
offerCancelAll,
|
|
@@ -3002,6 +3069,7 @@ var import_csd_codec7 = require("@inversealtruism/csd-codec");
|
|
|
3002
3069
|
requiredClaimDepth,
|
|
3003
3070
|
requiredFillOutputs,
|
|
3004
3071
|
resolve,
|
|
3072
|
+
resolveNameIn,
|
|
3005
3073
|
stateHash,
|
|
3006
3074
|
tokenMeta,
|
|
3007
3075
|
tradeFee,
|
package/dist/index.d.cts
CHANGED
|
@@ -473,6 +473,15 @@ interface BidState {
|
|
|
473
473
|
/** offers anchored in response (tagged with this bid's id), in apply order */
|
|
474
474
|
offers: string[];
|
|
475
475
|
}
|
|
476
|
+
/** One token movement of an applied record (CONVENTION §41): `amount` base units of `ticker` from `from` (null for a mint)
|
|
477
|
+
* to `to`, written by the line that applies it. `amount` is a positive decimal string, the form of the state's balances. */
|
|
478
|
+
interface TokenMove {
|
|
479
|
+
leg: "xfer" | "mint" | "fill" | "sale" | "fee";
|
|
480
|
+
ticker: string;
|
|
481
|
+
from: string | null;
|
|
482
|
+
to: string;
|
|
483
|
+
amount: string;
|
|
484
|
+
}
|
|
476
485
|
interface AppliedEvent {
|
|
477
486
|
height: number;
|
|
478
487
|
pos: number;
|
|
@@ -483,6 +492,9 @@ interface AppliedEvent {
|
|
|
483
492
|
* a log built by hand or by a core before 0.2.6 has none. */
|
|
484
493
|
code?: ReasonCode;
|
|
485
494
|
note?: string;
|
|
495
|
+
/** The token moves of an applied record that moved tokens, in the order applied (CONVENTION §41); absent on every other
|
|
496
|
+
* entry and in a log from a core before 0.2.8. Outside canonical state, like the rest of the log. */
|
|
497
|
+
moves?: TokenMove[];
|
|
486
498
|
}
|
|
487
499
|
interface CairnXState {
|
|
488
500
|
tipHeight: number;
|
|
@@ -818,6 +830,68 @@ declare const primaryRankBefore: (a: NameState, b: NameState) => boolean;
|
|
|
818
830
|
/** The primary .csd name for address `a`, or null. Pure; no I/O. `a` may be any case. */
|
|
819
831
|
declare function pickPrimaryName(names: Iterable<NameState>, a: string): string | null;
|
|
820
832
|
|
|
833
|
+
/** Where a payment to `name` goes: its `nset` address, else its owner. `lapsed` is the name's `expired` (§17): the
|
|
834
|
+
* address is the record's, and a sender refuses it. */
|
|
835
|
+
interface ResolvedName {
|
|
836
|
+
name: string;
|
|
837
|
+
addr: string;
|
|
838
|
+
via: "nset" | "owner";
|
|
839
|
+
lapsed: boolean;
|
|
840
|
+
owner: string;
|
|
841
|
+
}
|
|
842
|
+
/** The address `name` receives at in `names`, or null when `names` holds no such own key or holds a pending reservation
|
|
843
|
+
* (§28), which confers no address. The key is looked up as given: a caller normalizes its input first. */
|
|
844
|
+
declare function resolveNameIn(names: Record<string, NameState>, name: string): ResolvedName | null;
|
|
845
|
+
/** The classes of `nameView`: `free` is a name absent from `names`; `reserved` one in RESERVED_NAMES, whose record does
|
|
846
|
+
* not parse (§9), so it is never in `names`. */
|
|
847
|
+
type NameViewState = "held" | "pending" | "lapsed" | "free" | "reserved";
|
|
848
|
+
/** A name as a reader shows it. `addr` and `profile` are a held name's only: a pending or lapsed name gives no address,
|
|
849
|
+
* and its profile is not the word of a current owner (§35.3). `owner` is the reserver of a pending name and the last
|
|
850
|
+
* owner of a lapsed one. `paidThroughEpoch` is null where the state carries none (a pending name, a tip below V15). */
|
|
851
|
+
interface NameView {
|
|
852
|
+
name: string;
|
|
853
|
+
state: NameViewState;
|
|
854
|
+
owner: string | null;
|
|
855
|
+
addr: string | null;
|
|
856
|
+
profile: Record<string, string>;
|
|
857
|
+
paidThroughEpoch: number | null;
|
|
858
|
+
}
|
|
859
|
+
/** The view of `name` in `names`, or null when `name` does not match NAME_RE. Built on resolveNameIn: a held name's
|
|
860
|
+
* `addr` is its address. */
|
|
861
|
+
declare function nameView(names: Record<string, NameState>, name: string): NameView | null;
|
|
862
|
+
|
|
863
|
+
/** This package's version, for a host that names the core it loaded (cairnx-api's `rev`, a replica's report). Equal to
|
|
864
|
+
* package.json's version (test/version.test.ts). */
|
|
865
|
+
declare const CAIRNX_CORE_VERSION = "0.2.8";
|
|
866
|
+
|
|
867
|
+
/** Gate name to height: `ACTIVATION_HEIGHT` and each `V<n>_HEIGHT`, frozen. test/gates.test.ts keeps it equal to the
|
|
868
|
+
* individual exports and complete. It leaves out the one other exported height, `LEGACY_HOLD_SUNSET_HEIGHT`, which is
|
|
869
|
+
* derived from `V28_HEIGHT` and the claim window and grace, and which no replay rule reads. Two equal tables show
|
|
870
|
+
* equal gate heights, not equal rules: no fee, window or reserved-name constant is in the table. */
|
|
871
|
+
declare const GATE_HEIGHTS: Readonly<{
|
|
872
|
+
ACTIVATION_HEIGHT: 29860;
|
|
873
|
+
V11_HEIGHT: 29960;
|
|
874
|
+
V12_HEIGHT: 30300;
|
|
875
|
+
V13_HEIGHT: 31100;
|
|
876
|
+
V14_HEIGHT: 31400;
|
|
877
|
+
V15_HEIGHT: 32000;
|
|
878
|
+
V16_HEIGHT: 33600;
|
|
879
|
+
V17_HEIGHT: 34000;
|
|
880
|
+
V18_HEIGHT: 40000;
|
|
881
|
+
V19_HEIGHT: 36700;
|
|
882
|
+
V20_HEIGHT: 38400;
|
|
883
|
+
V21_HEIGHT: 40100;
|
|
884
|
+
V22_HEIGHT: 41300;
|
|
885
|
+
V23_HEIGHT: 52000;
|
|
886
|
+
V24_HEIGHT: 46400;
|
|
887
|
+
V25_HEIGHT: 46440;
|
|
888
|
+
V26_HEIGHT: 46480;
|
|
889
|
+
V27_HEIGHT: 46520;
|
|
890
|
+
V28_HEIGHT: 60000;
|
|
891
|
+
V29_HEIGHT: 88000;
|
|
892
|
+
}>;
|
|
893
|
+
type GateName = keyof typeof GATE_HEIGHTS;
|
|
894
|
+
|
|
821
895
|
declare const FCLAIM_MAX_HOLD_SPAN: number;
|
|
822
896
|
declare const GAP_NEEDED: number;
|
|
823
897
|
declare const SCAN_MARGIN = 30;
|
|
@@ -1118,4 +1192,4 @@ interface ProvenOfferTx {
|
|
|
1118
1192
|
* rules; the resolver writes no note below activation), or null when it passes. */
|
|
1119
1193
|
declare function provenOfferRefusal(rec: OfferRecord, tx: ProvenOfferTx): string | null;
|
|
1120
1194
|
|
|
1121
|
-
export { ACTIVATION_HEIGHT, ADDR_RE, AMOUNT_RE, type AppliedCode, type AppliedEvent, type AttestEvent, BID_KEYS, type BalanceState, type BidRecord, type BidState, type BidStatus, type BindTermsOpts, type BuiltRecord, CAIRNX_EVENT_RULE, CAP_CODES, CLAIM_ATTACKER_Q, CLAIM_COOLDOWN_BLOCKS, CLAIM_FILL_GRACE_BLOCKS, CLAIM_MIN_DEPTH, CLAIM_WINDOW_BLOCKS, CLAIM_WINDOW_BLOCKS_V20, COMMIT_MAX_BLOCKS, COMMIT_REVEAL_MIN_DEPTH, CONF_TOKEN_FILL, type CairnXRecord, type CairnXState, type ChainEvent, DEPLOY_FEE, DEPLOY_KEYS, DOMAIN, type DeployRecord, EVENTS_HASH_START, type EventMember, type EventRule, type EventRuleTx, type EventsSoFar, FCLAIM_KEYS, FCLAIM_MAX_EPOCH_AHEAD, FCLAIM_MAX_HOLD_SPAN, FCLAIM_WINDOW_MIN, FEE_BPS, FEE_BPS_V16, FEE_GATE_MARGIN_BLOCKS, FILL_TIP_MARGIN, FINALIZE_TIP_MARGIN, FINAL_DEPTH, type FclaimRecord, type FillEndorsement, type FillEntry, type FillOutputPlan, type FillPreview, type FillSafety, type FillSpvIo, type FillVerdict, GAP_NEEDED, type Give, HASH_RE, type HashedEvent, type HoldCandidate, type HoldCount, type HoldReplay, type HoldTarget, LEGACY_HOLD_SUNSET_HEIGHT, type LegacyBindOpts, MAX_ACTIVE_CLAIMS, MAX_AMOUNT, MAX_OFFER_EPOCHS, MAX_PENDING_REG, MAX_RECORD_BYTES, MAX_SCAN, MAX_TOKEN_DECIMALS, MINT_KEYS, type MintRecord, type MintedProvenOfferTerms, NAME_FEE_LEN3_V24, NAME_FEE_LEN4_V24, NAME_FEE_LONG_V24, NAME_FEE_MID_V24, NAME_FEE_SHORT_V18, NAME_FEE_V18, NAME_GRACE_EPOCHS, NAME_KEYS, NAME_PREMIUM_DECAY_EPOCHS, NAME_PREMIUM_START, NAME_RE, NAME_TERM_EPOCHS, NFINALIZE_KEYS, NPROFILE_KEYS, type NameCommitRecord, type NameFinalizeRecord, type NameProfileRecord, type NameRecord, type NameRenewRecord, type NameSetRecord, type NameState, type NameXferRecord, OFFER_KEYS, type OfferCancelAllRecord, type OfferRecord, type OfferState, type OfferStatus, PKEY, PROFILE_MAX_KEYS, PROFILE_MAX_VALUE_BYTES, type ProposeEvent, type ProvenAttest, type ProvenEvent, type ProvenOfferTerms, type ProvenOfferTx, type ProvenPropose, REASON_CODES, REASON_CODE_OUTCOME, REBATE_BPS, REBATE_FLAT, REG_COMMIT_MAX_BLOCKS, REG_FINALIZE_GRACE_BLOCKS, RESERVED_NAMES, type ReasonCode, type RecordCode, RecordError, type RefusalCode, SALT_RE, SCAN_MARGIN, SCORE_CANCEL, SCORE_CLAIM, SCORE_FILL, TICKER_RE, TRANSFER_KEYS, TREASURY_ADDR, type TokenMetaRecord, type TokenState, type TransferRecord, V11_HEIGHT, V12_HEIGHT, V13_HEIGHT, V14_HEIGHT, V15_HEIGHT, V16_HEIGHT, V17_HEIGHT, V18_HEIGHT, V19_HEIGHT, V20_HEIGHT, V21_HEIGHT, V22_HEIGHT, V23_HEIGHT, V24_HEIGHT, V25_HEIGHT, V26_HEIGHT, V27_HEIGHT, V28_HEIGHT, V29_HEIGHT, type Want, ZERO_ADDR, applyOrder, beforeActivation, bid, bindOfferTerms, bindProvenOffer, blockEvents, blockMembers, buildFeeHeight, buildRecord, burnedPayment, canonicalState, claimGraceOf, claimWindowAt, claimWindowOf, countOtherHoldsAtGrant, deploy, eventId, eventOfTx, eventsHash, eventsHashStep, expiredClaimFee, explainRecord, fclaim, fclaimEpochFor, fclaimHoldEnd, feeBpsAt, fillEndorsement, fillIsSafe, fillOutputPlan, fillTargetId, finalizeWinnerCheck, hasLiveClaim, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameXfer, offer, offerCancelAll, offerExpiryHeightOf, offerFillTooLate, paidToFromOutputs, parseAmount, parseRecord, pickPrimaryName, previewFill, primaryRankBefore, provenOfferRefusal, provenOfferTerms, ptAmt, replayLiveHold, requiredClaimDepth, requiredFillOutputs, resolve, stateHash, tokenMeta, tradeFee, transfer, unsafeMintProvenOfferTerms, verifyFillSpv };
|
|
1195
|
+
export { ACTIVATION_HEIGHT, ADDR_RE, AMOUNT_RE, type AppliedCode, type AppliedEvent, type AttestEvent, BID_KEYS, type BalanceState, type BidRecord, type BidState, type BidStatus, type BindTermsOpts, type BuiltRecord, CAIRNX_CORE_VERSION, CAIRNX_EVENT_RULE, CAP_CODES, CLAIM_ATTACKER_Q, CLAIM_COOLDOWN_BLOCKS, CLAIM_FILL_GRACE_BLOCKS, CLAIM_MIN_DEPTH, CLAIM_WINDOW_BLOCKS, CLAIM_WINDOW_BLOCKS_V20, COMMIT_MAX_BLOCKS, COMMIT_REVEAL_MIN_DEPTH, CONF_TOKEN_FILL, type CairnXRecord, type CairnXState, type ChainEvent, DEPLOY_FEE, DEPLOY_KEYS, DOMAIN, type DeployRecord, EVENTS_HASH_START, type EventMember, type EventRule, type EventRuleTx, type EventsSoFar, FCLAIM_KEYS, FCLAIM_MAX_EPOCH_AHEAD, FCLAIM_MAX_HOLD_SPAN, FCLAIM_WINDOW_MIN, FEE_BPS, FEE_BPS_V16, FEE_GATE_MARGIN_BLOCKS, FILL_TIP_MARGIN, FINALIZE_TIP_MARGIN, FINAL_DEPTH, type FclaimRecord, type FillEndorsement, type FillEntry, type FillOutputPlan, type FillPreview, type FillSafety, type FillSpvIo, type FillVerdict, GAP_NEEDED, GATE_HEIGHTS, type GateName, type Give, HASH_RE, type HashedEvent, type HoldCandidate, type HoldCount, type HoldReplay, type HoldTarget, LEGACY_HOLD_SUNSET_HEIGHT, type LegacyBindOpts, MAX_ACTIVE_CLAIMS, MAX_AMOUNT, MAX_OFFER_EPOCHS, MAX_PENDING_REG, MAX_RECORD_BYTES, MAX_SCAN, MAX_TOKEN_DECIMALS, MINT_KEYS, type MintRecord, type MintedProvenOfferTerms, NAME_FEE_LEN3_V24, NAME_FEE_LEN4_V24, NAME_FEE_LONG_V24, NAME_FEE_MID_V24, NAME_FEE_SHORT_V18, NAME_FEE_V18, NAME_GRACE_EPOCHS, NAME_KEYS, NAME_PREMIUM_DECAY_EPOCHS, NAME_PREMIUM_START, NAME_RE, NAME_TERM_EPOCHS, NFINALIZE_KEYS, NPROFILE_KEYS, type NameCommitRecord, type NameFinalizeRecord, type NameProfileRecord, type NameRecord, type NameRenewRecord, type NameSetRecord, type NameState, type NameView, type NameViewState, type NameXferRecord, OFFER_KEYS, type OfferCancelAllRecord, type OfferRecord, type OfferState, type OfferStatus, PKEY, PROFILE_MAX_KEYS, PROFILE_MAX_VALUE_BYTES, type ProposeEvent, type ProvenAttest, type ProvenEvent, type ProvenOfferTerms, type ProvenOfferTx, type ProvenPropose, REASON_CODES, REASON_CODE_OUTCOME, REBATE_BPS, REBATE_FLAT, REG_COMMIT_MAX_BLOCKS, REG_FINALIZE_GRACE_BLOCKS, RESERVED_NAMES, type ReasonCode, type RecordCode, RecordError, type RefusalCode, type ResolvedName, SALT_RE, SCAN_MARGIN, SCORE_CANCEL, SCORE_CLAIM, SCORE_FILL, TICKER_RE, TRANSFER_KEYS, TREASURY_ADDR, type TokenMetaRecord, type TokenMove, type TokenState, type TransferRecord, V11_HEIGHT, V12_HEIGHT, V13_HEIGHT, V14_HEIGHT, V15_HEIGHT, V16_HEIGHT, V17_HEIGHT, V18_HEIGHT, V19_HEIGHT, V20_HEIGHT, V21_HEIGHT, V22_HEIGHT, V23_HEIGHT, V24_HEIGHT, V25_HEIGHT, V26_HEIGHT, V27_HEIGHT, V28_HEIGHT, V29_HEIGHT, type Want, ZERO_ADDR, applyOrder, beforeActivation, bid, bindOfferTerms, bindProvenOffer, blockEvents, blockMembers, buildFeeHeight, buildRecord, burnedPayment, canonicalState, claimGraceOf, claimWindowAt, claimWindowOf, countOtherHoldsAtGrant, deploy, eventId, eventOfTx, eventsHash, eventsHashStep, expiredClaimFee, explainRecord, fclaim, fclaimEpochFor, fclaimHoldEnd, feeBpsAt, fillEndorsement, fillIsSafe, fillOutputPlan, fillTargetId, finalizeWinnerCheck, hasLiveClaim, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameView, nameXfer, offer, offerCancelAll, offerExpiryHeightOf, offerFillTooLate, paidToFromOutputs, parseAmount, parseRecord, pickPrimaryName, previewFill, primaryRankBefore, provenOfferRefusal, provenOfferTerms, ptAmt, replayLiveHold, requiredClaimDepth, requiredFillOutputs, resolve, resolveNameIn, stateHash, tokenMeta, tradeFee, transfer, unsafeMintProvenOfferTerms, verifyFillSpv };
|
package/dist/index.d.ts
CHANGED
|
@@ -473,6 +473,15 @@ interface BidState {
|
|
|
473
473
|
/** offers anchored in response (tagged with this bid's id), in apply order */
|
|
474
474
|
offers: string[];
|
|
475
475
|
}
|
|
476
|
+
/** One token movement of an applied record (CONVENTION §41): `amount` base units of `ticker` from `from` (null for a mint)
|
|
477
|
+
* to `to`, written by the line that applies it. `amount` is a positive decimal string, the form of the state's balances. */
|
|
478
|
+
interface TokenMove {
|
|
479
|
+
leg: "xfer" | "mint" | "fill" | "sale" | "fee";
|
|
480
|
+
ticker: string;
|
|
481
|
+
from: string | null;
|
|
482
|
+
to: string;
|
|
483
|
+
amount: string;
|
|
484
|
+
}
|
|
476
485
|
interface AppliedEvent {
|
|
477
486
|
height: number;
|
|
478
487
|
pos: number;
|
|
@@ -483,6 +492,9 @@ interface AppliedEvent {
|
|
|
483
492
|
* a log built by hand or by a core before 0.2.6 has none. */
|
|
484
493
|
code?: ReasonCode;
|
|
485
494
|
note?: string;
|
|
495
|
+
/** The token moves of an applied record that moved tokens, in the order applied (CONVENTION §41); absent on every other
|
|
496
|
+
* entry and in a log from a core before 0.2.8. Outside canonical state, like the rest of the log. */
|
|
497
|
+
moves?: TokenMove[];
|
|
486
498
|
}
|
|
487
499
|
interface CairnXState {
|
|
488
500
|
tipHeight: number;
|
|
@@ -818,6 +830,68 @@ declare const primaryRankBefore: (a: NameState, b: NameState) => boolean;
|
|
|
818
830
|
/** The primary .csd name for address `a`, or null. Pure; no I/O. `a` may be any case. */
|
|
819
831
|
declare function pickPrimaryName(names: Iterable<NameState>, a: string): string | null;
|
|
820
832
|
|
|
833
|
+
/** Where a payment to `name` goes: its `nset` address, else its owner. `lapsed` is the name's `expired` (§17): the
|
|
834
|
+
* address is the record's, and a sender refuses it. */
|
|
835
|
+
interface ResolvedName {
|
|
836
|
+
name: string;
|
|
837
|
+
addr: string;
|
|
838
|
+
via: "nset" | "owner";
|
|
839
|
+
lapsed: boolean;
|
|
840
|
+
owner: string;
|
|
841
|
+
}
|
|
842
|
+
/** The address `name` receives at in `names`, or null when `names` holds no such own key or holds a pending reservation
|
|
843
|
+
* (§28), which confers no address. The key is looked up as given: a caller normalizes its input first. */
|
|
844
|
+
declare function resolveNameIn(names: Record<string, NameState>, name: string): ResolvedName | null;
|
|
845
|
+
/** The classes of `nameView`: `free` is a name absent from `names`; `reserved` one in RESERVED_NAMES, whose record does
|
|
846
|
+
* not parse (§9), so it is never in `names`. */
|
|
847
|
+
type NameViewState = "held" | "pending" | "lapsed" | "free" | "reserved";
|
|
848
|
+
/** A name as a reader shows it. `addr` and `profile` are a held name's only: a pending or lapsed name gives no address,
|
|
849
|
+
* and its profile is not the word of a current owner (§35.3). `owner` is the reserver of a pending name and the last
|
|
850
|
+
* owner of a lapsed one. `paidThroughEpoch` is null where the state carries none (a pending name, a tip below V15). */
|
|
851
|
+
interface NameView {
|
|
852
|
+
name: string;
|
|
853
|
+
state: NameViewState;
|
|
854
|
+
owner: string | null;
|
|
855
|
+
addr: string | null;
|
|
856
|
+
profile: Record<string, string>;
|
|
857
|
+
paidThroughEpoch: number | null;
|
|
858
|
+
}
|
|
859
|
+
/** The view of `name` in `names`, or null when `name` does not match NAME_RE. Built on resolveNameIn: a held name's
|
|
860
|
+
* `addr` is its address. */
|
|
861
|
+
declare function nameView(names: Record<string, NameState>, name: string): NameView | null;
|
|
862
|
+
|
|
863
|
+
/** This package's version, for a host that names the core it loaded (cairnx-api's `rev`, a replica's report). Equal to
|
|
864
|
+
* package.json's version (test/version.test.ts). */
|
|
865
|
+
declare const CAIRNX_CORE_VERSION = "0.2.8";
|
|
866
|
+
|
|
867
|
+
/** Gate name to height: `ACTIVATION_HEIGHT` and each `V<n>_HEIGHT`, frozen. test/gates.test.ts keeps it equal to the
|
|
868
|
+
* individual exports and complete. It leaves out the one other exported height, `LEGACY_HOLD_SUNSET_HEIGHT`, which is
|
|
869
|
+
* derived from `V28_HEIGHT` and the claim window and grace, and which no replay rule reads. Two equal tables show
|
|
870
|
+
* equal gate heights, not equal rules: no fee, window or reserved-name constant is in the table. */
|
|
871
|
+
declare const GATE_HEIGHTS: Readonly<{
|
|
872
|
+
ACTIVATION_HEIGHT: 29860;
|
|
873
|
+
V11_HEIGHT: 29960;
|
|
874
|
+
V12_HEIGHT: 30300;
|
|
875
|
+
V13_HEIGHT: 31100;
|
|
876
|
+
V14_HEIGHT: 31400;
|
|
877
|
+
V15_HEIGHT: 32000;
|
|
878
|
+
V16_HEIGHT: 33600;
|
|
879
|
+
V17_HEIGHT: 34000;
|
|
880
|
+
V18_HEIGHT: 40000;
|
|
881
|
+
V19_HEIGHT: 36700;
|
|
882
|
+
V20_HEIGHT: 38400;
|
|
883
|
+
V21_HEIGHT: 40100;
|
|
884
|
+
V22_HEIGHT: 41300;
|
|
885
|
+
V23_HEIGHT: 52000;
|
|
886
|
+
V24_HEIGHT: 46400;
|
|
887
|
+
V25_HEIGHT: 46440;
|
|
888
|
+
V26_HEIGHT: 46480;
|
|
889
|
+
V27_HEIGHT: 46520;
|
|
890
|
+
V28_HEIGHT: 60000;
|
|
891
|
+
V29_HEIGHT: 88000;
|
|
892
|
+
}>;
|
|
893
|
+
type GateName = keyof typeof GATE_HEIGHTS;
|
|
894
|
+
|
|
821
895
|
declare const FCLAIM_MAX_HOLD_SPAN: number;
|
|
822
896
|
declare const GAP_NEEDED: number;
|
|
823
897
|
declare const SCAN_MARGIN = 30;
|
|
@@ -1118,4 +1192,4 @@ interface ProvenOfferTx {
|
|
|
1118
1192
|
* rules; the resolver writes no note below activation), or null when it passes. */
|
|
1119
1193
|
declare function provenOfferRefusal(rec: OfferRecord, tx: ProvenOfferTx): string | null;
|
|
1120
1194
|
|
|
1121
|
-
export { ACTIVATION_HEIGHT, ADDR_RE, AMOUNT_RE, type AppliedCode, type AppliedEvent, type AttestEvent, BID_KEYS, type BalanceState, type BidRecord, type BidState, type BidStatus, type BindTermsOpts, type BuiltRecord, CAIRNX_EVENT_RULE, CAP_CODES, CLAIM_ATTACKER_Q, CLAIM_COOLDOWN_BLOCKS, CLAIM_FILL_GRACE_BLOCKS, CLAIM_MIN_DEPTH, CLAIM_WINDOW_BLOCKS, CLAIM_WINDOW_BLOCKS_V20, COMMIT_MAX_BLOCKS, COMMIT_REVEAL_MIN_DEPTH, CONF_TOKEN_FILL, type CairnXRecord, type CairnXState, type ChainEvent, DEPLOY_FEE, DEPLOY_KEYS, DOMAIN, type DeployRecord, EVENTS_HASH_START, type EventMember, type EventRule, type EventRuleTx, type EventsSoFar, FCLAIM_KEYS, FCLAIM_MAX_EPOCH_AHEAD, FCLAIM_MAX_HOLD_SPAN, FCLAIM_WINDOW_MIN, FEE_BPS, FEE_BPS_V16, FEE_GATE_MARGIN_BLOCKS, FILL_TIP_MARGIN, FINALIZE_TIP_MARGIN, FINAL_DEPTH, type FclaimRecord, type FillEndorsement, type FillEntry, type FillOutputPlan, type FillPreview, type FillSafety, type FillSpvIo, type FillVerdict, GAP_NEEDED, type Give, HASH_RE, type HashedEvent, type HoldCandidate, type HoldCount, type HoldReplay, type HoldTarget, LEGACY_HOLD_SUNSET_HEIGHT, type LegacyBindOpts, MAX_ACTIVE_CLAIMS, MAX_AMOUNT, MAX_OFFER_EPOCHS, MAX_PENDING_REG, MAX_RECORD_BYTES, MAX_SCAN, MAX_TOKEN_DECIMALS, MINT_KEYS, type MintRecord, type MintedProvenOfferTerms, NAME_FEE_LEN3_V24, NAME_FEE_LEN4_V24, NAME_FEE_LONG_V24, NAME_FEE_MID_V24, NAME_FEE_SHORT_V18, NAME_FEE_V18, NAME_GRACE_EPOCHS, NAME_KEYS, NAME_PREMIUM_DECAY_EPOCHS, NAME_PREMIUM_START, NAME_RE, NAME_TERM_EPOCHS, NFINALIZE_KEYS, NPROFILE_KEYS, type NameCommitRecord, type NameFinalizeRecord, type NameProfileRecord, type NameRecord, type NameRenewRecord, type NameSetRecord, type NameState, type NameXferRecord, OFFER_KEYS, type OfferCancelAllRecord, type OfferRecord, type OfferState, type OfferStatus, PKEY, PROFILE_MAX_KEYS, PROFILE_MAX_VALUE_BYTES, type ProposeEvent, type ProvenAttest, type ProvenEvent, type ProvenOfferTerms, type ProvenOfferTx, type ProvenPropose, REASON_CODES, REASON_CODE_OUTCOME, REBATE_BPS, REBATE_FLAT, REG_COMMIT_MAX_BLOCKS, REG_FINALIZE_GRACE_BLOCKS, RESERVED_NAMES, type ReasonCode, type RecordCode, RecordError, type RefusalCode, SALT_RE, SCAN_MARGIN, SCORE_CANCEL, SCORE_CLAIM, SCORE_FILL, TICKER_RE, TRANSFER_KEYS, TREASURY_ADDR, type TokenMetaRecord, type TokenState, type TransferRecord, V11_HEIGHT, V12_HEIGHT, V13_HEIGHT, V14_HEIGHT, V15_HEIGHT, V16_HEIGHT, V17_HEIGHT, V18_HEIGHT, V19_HEIGHT, V20_HEIGHT, V21_HEIGHT, V22_HEIGHT, V23_HEIGHT, V24_HEIGHT, V25_HEIGHT, V26_HEIGHT, V27_HEIGHT, V28_HEIGHT, V29_HEIGHT, type Want, ZERO_ADDR, applyOrder, beforeActivation, bid, bindOfferTerms, bindProvenOffer, blockEvents, blockMembers, buildFeeHeight, buildRecord, burnedPayment, canonicalState, claimGraceOf, claimWindowAt, claimWindowOf, countOtherHoldsAtGrant, deploy, eventId, eventOfTx, eventsHash, eventsHashStep, expiredClaimFee, explainRecord, fclaim, fclaimEpochFor, fclaimHoldEnd, feeBpsAt, fillEndorsement, fillIsSafe, fillOutputPlan, fillTargetId, finalizeWinnerCheck, hasLiveClaim, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameXfer, offer, offerCancelAll, offerExpiryHeightOf, offerFillTooLate, paidToFromOutputs, parseAmount, parseRecord, pickPrimaryName, previewFill, primaryRankBefore, provenOfferRefusal, provenOfferTerms, ptAmt, replayLiveHold, requiredClaimDepth, requiredFillOutputs, resolve, stateHash, tokenMeta, tradeFee, transfer, unsafeMintProvenOfferTerms, verifyFillSpv };
|
|
1195
|
+
export { ACTIVATION_HEIGHT, ADDR_RE, AMOUNT_RE, type AppliedCode, type AppliedEvent, type AttestEvent, BID_KEYS, type BalanceState, type BidRecord, type BidState, type BidStatus, type BindTermsOpts, type BuiltRecord, CAIRNX_CORE_VERSION, CAIRNX_EVENT_RULE, CAP_CODES, CLAIM_ATTACKER_Q, CLAIM_COOLDOWN_BLOCKS, CLAIM_FILL_GRACE_BLOCKS, CLAIM_MIN_DEPTH, CLAIM_WINDOW_BLOCKS, CLAIM_WINDOW_BLOCKS_V20, COMMIT_MAX_BLOCKS, COMMIT_REVEAL_MIN_DEPTH, CONF_TOKEN_FILL, type CairnXRecord, type CairnXState, type ChainEvent, DEPLOY_FEE, DEPLOY_KEYS, DOMAIN, type DeployRecord, EVENTS_HASH_START, type EventMember, type EventRule, type EventRuleTx, type EventsSoFar, FCLAIM_KEYS, FCLAIM_MAX_EPOCH_AHEAD, FCLAIM_MAX_HOLD_SPAN, FCLAIM_WINDOW_MIN, FEE_BPS, FEE_BPS_V16, FEE_GATE_MARGIN_BLOCKS, FILL_TIP_MARGIN, FINALIZE_TIP_MARGIN, FINAL_DEPTH, type FclaimRecord, type FillEndorsement, type FillEntry, type FillOutputPlan, type FillPreview, type FillSafety, type FillSpvIo, type FillVerdict, GAP_NEEDED, GATE_HEIGHTS, type GateName, type Give, HASH_RE, type HashedEvent, type HoldCandidate, type HoldCount, type HoldReplay, type HoldTarget, LEGACY_HOLD_SUNSET_HEIGHT, type LegacyBindOpts, MAX_ACTIVE_CLAIMS, MAX_AMOUNT, MAX_OFFER_EPOCHS, MAX_PENDING_REG, MAX_RECORD_BYTES, MAX_SCAN, MAX_TOKEN_DECIMALS, MINT_KEYS, type MintRecord, type MintedProvenOfferTerms, NAME_FEE_LEN3_V24, NAME_FEE_LEN4_V24, NAME_FEE_LONG_V24, NAME_FEE_MID_V24, NAME_FEE_SHORT_V18, NAME_FEE_V18, NAME_GRACE_EPOCHS, NAME_KEYS, NAME_PREMIUM_DECAY_EPOCHS, NAME_PREMIUM_START, NAME_RE, NAME_TERM_EPOCHS, NFINALIZE_KEYS, NPROFILE_KEYS, type NameCommitRecord, type NameFinalizeRecord, type NameProfileRecord, type NameRecord, type NameRenewRecord, type NameSetRecord, type NameState, type NameView, type NameViewState, type NameXferRecord, OFFER_KEYS, type OfferCancelAllRecord, type OfferRecord, type OfferState, type OfferStatus, PKEY, PROFILE_MAX_KEYS, PROFILE_MAX_VALUE_BYTES, type ProposeEvent, type ProvenAttest, type ProvenEvent, type ProvenOfferTerms, type ProvenOfferTx, type ProvenPropose, REASON_CODES, REASON_CODE_OUTCOME, REBATE_BPS, REBATE_FLAT, REG_COMMIT_MAX_BLOCKS, REG_FINALIZE_GRACE_BLOCKS, RESERVED_NAMES, type ReasonCode, type RecordCode, RecordError, type RefusalCode, type ResolvedName, SALT_RE, SCAN_MARGIN, SCORE_CANCEL, SCORE_CLAIM, SCORE_FILL, TICKER_RE, TRANSFER_KEYS, TREASURY_ADDR, type TokenMetaRecord, type TokenMove, type TokenState, type TransferRecord, V11_HEIGHT, V12_HEIGHT, V13_HEIGHT, V14_HEIGHT, V15_HEIGHT, V16_HEIGHT, V17_HEIGHT, V18_HEIGHT, V19_HEIGHT, V20_HEIGHT, V21_HEIGHT, V22_HEIGHT, V23_HEIGHT, V24_HEIGHT, V25_HEIGHT, V26_HEIGHT, V27_HEIGHT, V28_HEIGHT, V29_HEIGHT, type Want, ZERO_ADDR, applyOrder, beforeActivation, bid, bindOfferTerms, bindProvenOffer, blockEvents, blockMembers, buildFeeHeight, buildRecord, burnedPayment, canonicalState, claimGraceOf, claimWindowAt, claimWindowOf, countOtherHoldsAtGrant, deploy, eventId, eventOfTx, eventsHash, eventsHashStep, expiredClaimFee, explainRecord, fclaim, fclaimEpochFor, fclaimHoldEnd, feeBpsAt, fillEndorsement, fillIsSafe, fillOutputPlan, fillTargetId, finalizeWinnerCheck, hasLiveClaim, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameView, nameXfer, offer, offerCancelAll, offerExpiryHeightOf, offerFillTooLate, paidToFromOutputs, parseAmount, parseRecord, pickPrimaryName, previewFill, primaryRankBefore, provenOfferRefusal, provenOfferTerms, ptAmt, replayLiveHold, requiredClaimDepth, requiredFillOutputs, resolve, resolveNameIn, stateHash, tokenMeta, tradeFee, transfer, unsafeMintProvenOfferTerms, verifyFillSpv };
|