@inversealtruism/cairnx-core 0.2.9 → 0.2.11
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 +51 -1
- package/CONVENTION.md +5 -0
- package/README.md +14 -0
- package/dist/index.cjs +265 -160
- package/dist/index.d.cts +49 -17
- package/dist/index.d.ts +49 -17
- package/dist/index.js +257 -156
- package/dist/mm/index.d.cts +1 -1
- package/dist/mm/index.d.ts +1 -1
- package/package.json +2 -2
- package/test/vectors/cases-rules.json +671 -0
package/dist/index.d.cts
CHANGED
|
@@ -137,6 +137,10 @@ declare const DOMAIN = "cairnx:v1";
|
|
|
137
137
|
declare const ACTIVATION_HEIGHT = 29860;
|
|
138
138
|
/** True below ACTIVATION_HEIGHT, where resolve() skips every event without a note. */
|
|
139
139
|
declare const beforeActivation: (height: number) => boolean;
|
|
140
|
+
/** Whether an event height or a tip lies in the domain the replay's expiry batches are proven for (CONVENTION section
|
|
141
|
+
* 5): a safe integer. The chain produces non-negative ones; a negative one is skipped below activation. The fold's
|
|
142
|
+
* split and a held context's refusal both read this one rule. */
|
|
143
|
+
declare const isChainHeight: (height: unknown) => height is number;
|
|
140
144
|
declare const V11_HEIGHT = 29960;
|
|
141
145
|
declare const V12_HEIGHT = 30300;
|
|
142
146
|
declare const V13_HEIGHT = 31100;
|
|
@@ -150,7 +154,7 @@ declare const NAME_GRACE_EPOCHS = 720;
|
|
|
150
154
|
declare const NAME_PREMIUM_START = 20n;
|
|
151
155
|
declare const NAME_PREMIUM_DECAY_EPOCHS = 720;
|
|
152
156
|
/** Fee to claim a name whose lease lapsed (grace over): nameRegFee × a linearly-decaying
|
|
153
|
-
* premium. Pure in (name, epochsPastGraceEnd)
|
|
157
|
+
* premium. Pure in (name, epochsPastGraceEnd): deterministic for every resolver. */
|
|
154
158
|
declare function expiredClaimFee(name: string, epochsPastGraceEnd: number, height: number): bigint;
|
|
155
159
|
declare const MAX_RECORD_BYTES = 512;
|
|
156
160
|
declare const MAX_AMOUNT: bigint;
|
|
@@ -393,9 +397,9 @@ interface NameState {
|
|
|
393
397
|
effectiveHeight: number;
|
|
394
398
|
addr?: string;
|
|
395
399
|
locked: boolean;
|
|
396
|
-
/** v1.3: ownership basis is a paid fill
|
|
400
|
+
/** v1.3: ownership basis is a paid fill: record is displacement-immune (claimId/heights = the fill) */
|
|
397
401
|
viaFill?: true;
|
|
398
|
-
/** v1.5: the lease
|
|
402
|
+
/** v1.5: the lease: owned through this epoch; +grace for owner-only renewal; then premium re-claim */
|
|
399
403
|
paidThroughEpoch?: number;
|
|
400
404
|
/** v1.5: true once the lease + grace lapsed (record kept for history; name is claimable) */
|
|
401
405
|
expired?: true;
|
|
@@ -404,7 +408,7 @@ interface NameState {
|
|
|
404
408
|
* only, so every pre-v2.5 canonical hash stays byte-identical. */
|
|
405
409
|
pending?: true;
|
|
406
410
|
finalizeBy?: number;
|
|
407
|
-
/** v1.9: ENS-class identity
|
|
411
|
+
/** v1.9: ENS-class identity: a charset-locked string→string map (doc 36). INERT cosmetic metadata
|
|
408
412
|
* (NOT a send target; the verified address is `addr`). Materialized at v1.9+ tips only, cleared on
|
|
409
413
|
* every ownership change, absent when empty. */
|
|
410
414
|
profile?: Record<string, string>;
|
|
@@ -444,7 +448,7 @@ interface OfferState {
|
|
|
444
448
|
fills?: FillEntry[];
|
|
445
449
|
/** v1.2: the bid this offer responds to */
|
|
446
450
|
bid?: string;
|
|
447
|
-
/** v1.7 claim-to-fill: the current exclusive claimer + the height their window ends. Lazy lapse
|
|
451
|
+
/** v1.7 claim-to-fill: the current exclusive claimer + the height their window ends. Lazy lapse:
|
|
448
452
|
* a past claimUntilHeight just means no live claim (the fields persist as the last-claim record). */
|
|
449
453
|
claimedBy?: string;
|
|
450
454
|
claimUntilHeight?: number;
|
|
@@ -613,6 +617,30 @@ declare function resolve(events: ChainEvent[], tipHeight: number): CairnXState;
|
|
|
613
617
|
* history.) Keys sort in ordinal (code-unit) order at every depth. */
|
|
614
618
|
declare function canonicalState(s: CairnXState): string;
|
|
615
619
|
|
|
620
|
+
type ReplayContextRefusalCode = "domain" | "order" | "tip" | "broken" | "sloppy";
|
|
621
|
+
/** A call the context does not take, thrown before it writes anything. "domain": a target height or an event height
|
|
622
|
+
* outside isChainHeight, an event position that is not a safe integer >= 0, or an event id (a Propose's id, an
|
|
623
|
+
* Attest's txid) that is not a string; "order": a target below the context's height, or an event at or below it or
|
|
624
|
+
* above the target (a negative height, for a new context); "tip": an answer asked off the context's height;
|
|
625
|
+
* "broken": any call after the replay threw inside advance or stateAt; "sloppy": a context started where a write to a
|
|
626
|
+
* frozen object does not throw. */
|
|
627
|
+
declare class ReplayContextRefusal extends Error {
|
|
628
|
+
readonly code: ReplayContextRefusalCode;
|
|
629
|
+
constructor(code: ReplayContextRefusalCode, message: string);
|
|
630
|
+
}
|
|
631
|
+
interface ReplayContext {
|
|
632
|
+
/** Every event at or below this height has been given; -1, below the chain's first block, for a new context. */
|
|
633
|
+
readonly height: number;
|
|
634
|
+
/** Applies all events of the blocks in (height, toHeight], in apply order, and moves the height to toHeight. Reads
|
|
635
|
+
* `events` once and keeps a copy of each event's own fields, so a later write into a fed event changes no later
|
|
636
|
+
* answer. The copy is one level deep: `paidTo` stays the caller's object, read only during this call. */
|
|
637
|
+
advance(toHeight: number, events: readonly ChainEvent[]): void;
|
|
638
|
+
/** resolve() over the events given so far at tipHeight, which must equal the context's height. The result shares
|
|
639
|
+
* nothing a later advance writes; what it shares is frozen. */
|
|
640
|
+
stateAt(tipHeight: number): CairnXState;
|
|
641
|
+
}
|
|
642
|
+
declare function newReplayContext(): ReplayContext;
|
|
643
|
+
|
|
616
644
|
declare const CLAIM_ATTACKER_Q = 0.2;
|
|
617
645
|
declare const CLAIM_MIN_DEPTH = 3;
|
|
618
646
|
declare const COMMIT_REVEAL_MIN_DEPTH = 3;
|
|
@@ -642,12 +670,12 @@ declare function requiredClaimDepth(valueSats: number | bigint, height: number):
|
|
|
642
670
|
|
|
643
671
|
/** What a payment of `pay` (base units of CSD, the seller-paid amount to `want.payto`) would DELIVER
|
|
644
672
|
* against a CSD-priced offer, computed with the resolver's exact expressions. Returns the delivered
|
|
645
|
-
* token `got`, the treasury `fee`, and the maker `rebate
|
|
673
|
+
* token `got`, the treasury `fee`, and the maker `rebate`, plus a `deliverable` flag that is false
|
|
646
674
|
* exactly when the resolver would reject the fill AFTER the CSD moved (the C3 zero-delivery trap).
|
|
647
675
|
*
|
|
648
676
|
* Only meaningful for CSD-priced token offers (a `want.value`). For a name give, `got` is 1 (a name is
|
|
649
677
|
* indivisible) when `pay >= want.value`. Token-for-token offers (`want.ticker`) return deliverable:false
|
|
650
|
-
* with reason "not-csd-priced"
|
|
678
|
+
* with reason "not-csd-priced": their deliverability depends on the buyer's balance, out of scope here. */
|
|
651
679
|
interface FillPreview {
|
|
652
680
|
deliverable: boolean;
|
|
653
681
|
reason?: "not-open" | "not-csd-priced" | "below-min" | "zero-delivery" | "ok";
|
|
@@ -667,9 +695,9 @@ declare function previewFill(offer: OfferState, payRaw: bigint | string | number
|
|
|
667
695
|
* seller, zero-value entries omitted (a 0 output is unbuildable and the resolver requires nothing).
|
|
668
696
|
*
|
|
669
697
|
* Returns [] for a token-priced offer (a token⇄token fill carries NO CSD outputs) and null when the
|
|
670
|
-
* payment is undeliverable
|
|
698
|
+
* payment is undeliverable: gate with fillIsSafe FIRST; this sizes outputs, it does not re-judge
|
|
671
699
|
* claims/takers. Until 2026-07-06 this map was hand-mirrored in the wallet's fillOffer, the cairnx
|
|
672
|
-
* service txbuild, and TWICE in the cairn trade UI
|
|
700
|
+
* service txbuild, and TWICE in the cairn trade UI: four copies of fund-loss-class math with no
|
|
673
701
|
* cross-repo lock. This is now the only place it lives; test/preflight.test.ts pins it against the
|
|
674
702
|
* real resolver (outputs accepted; any single-unit per-address underpayment refused).
|
|
675
703
|
*
|
|
@@ -723,7 +751,7 @@ declare function fillOutputPlan(offer: OfferState, payRaw: bigint | string | num
|
|
|
723
751
|
* forfeit. Within FEE_GATE_MARGIN_BLOCKS below ANY upcoming fee gate, price the BUILD at that gate:
|
|
724
752
|
* overpay is always accepted (the resolver gate is strict `<`), so this only ever PREVENTS a forfeit,
|
|
725
753
|
* never causes one. Display paths must pass the SAME buildFeeHeight(tip) so the quoted price matches
|
|
726
|
-
* what gets signed. Owns the gate list: a future fee tier (V28+) is added HERE, once
|
|
754
|
+
* what gets signed. Owns the gate list: a future fee tier (V28+) is added HERE, once: the wallet and
|
|
727
755
|
* the trade UI import this (they each hand-carried a copy of this function + list until 2026-07-06). */
|
|
728
756
|
declare const FEE_GATE_MARGIN_BLOCKS = 5;
|
|
729
757
|
declare const buildFeeHeight: (tip: number) => number;
|
|
@@ -765,7 +793,8 @@ declare function fillIsSafe(offer: OfferState, me: string, pay: bigint | string
|
|
|
765
793
|
/** B6b (REBIND W10): the DISCRIMINATED successor to fillIsSafe. Three verdicts, and consuming them
|
|
766
794
|
* correctly is part of the contract:
|
|
767
795
|
* "endorsed" - every deterministic gate a payer can verify at signing time passes (status, taker,
|
|
768
|
-
* open-lane holdership, deliverability,
|
|
796
|
+
* open-lane holdership, deliverability, the v2.8 fill-target routing, and from
|
|
797
|
+
* LEGACY_HOLD_SUNSET_HEIGHT the routing of an open CSD offer through a reservation).
|
|
769
798
|
* "refused" - the chain WILL reject this fill after the payment moved. Do not sign.
|
|
770
799
|
* "not-endorsable" - a TOKEN-priced want: deliverability is the attester's token balance, which this
|
|
771
800
|
* pure predicate cannot see. This is HONEST NON-ENDORSEMENT, not refusal: proceed
|
|
@@ -800,22 +829,22 @@ declare function fillEndorsement(offer: OfferState, me: string, pay: bigint | st
|
|
|
800
829
|
*
|
|
801
830
|
* TRUST SCOPE (read before relying on this): this is a STALE-STATE and displacement-race guard under an
|
|
802
831
|
* HONEST resolver, NOT a Byzantine-resolver defense. Its safety rests on `commitHeight` coming from a
|
|
803
|
-
* source INDEPENDENT of `nameState
|
|
832
|
+
* source INDEPENDENT of `nameState`: then `effectiveHeight !== commitHeight` genuinely detects a
|
|
804
833
|
* displaced/forged reservation. A caller that passes `nameState.effectiveHeight` AS `commitHeight` makes
|
|
805
834
|
* that guard a tautology (`X !== X`), so `eff` becomes resolver-controlled and this helper gives
|
|
806
835
|
* window-SHAPE correctness only, not protection against a resolver that lies about `effectiveHeight`.
|
|
807
836
|
* No field arithmetic here can defeat a resolver that forges the whole record (owner/pending/eff at once);
|
|
808
837
|
* that closure is registration-state SPV (roadmapped), the same posture the fill path documents (a
|
|
809
838
|
* coherently lying resolver is the fill-SPV item, not this guard). Pass the AUTHORITATIVE (freshly
|
|
810
|
-
* re-fetched) name record
|
|
839
|
+
* re-fetched) name record, never a cached one, as `nameState` (undefined = 404 / unregistered = loss).
|
|
811
840
|
*
|
|
812
841
|
* Pass `tip` to ALSO gate the finalize WINDOW, both sides, mirroring the resolver's authoritative checks
|
|
813
842
|
* (`applyNfinalize` in src/resolve/names.ts rejects unless `ev.height > effHeight + REG_COMMIT_MAX_BLOCKS`, and rejects when
|
|
814
843
|
* `ev.height > finalizeBy`) with the client-side FINALIZE_TIP_MARGIN band the site's finalizeReady applies:
|
|
815
844
|
* the tx signs at `tip` but mines at tip+1 or later, so the margin keeps a boundary-signed finalize from
|
|
816
|
-
* mining outside the window (too early: rejected as unfrozen; too late: past the deadline
|
|
845
|
+
* mining outside the window (too early: rejected as unfrozen; too late: past the deadline; either way the
|
|
817
846
|
* fee burns). The window is derived purely from `eff` (never the resolver's `finalizeBy`), so a lying
|
|
818
|
-
* `finalizeBy` cannot widen it
|
|
847
|
+
* `finalizeBy` cannot widen it; but per the trust scope above, a lying `eff` still can for a caller that
|
|
819
848
|
* does not supply an independent `commitHeight`. `tip` is optional; without it the winner-only path runs. A
|
|
820
849
|
* supplied `tip` that is not a non-negative safe integer is refused. */
|
|
821
850
|
declare function finalizeWinnerCheck(nameState: NameState | null | undefined, me: string, commitHeight: number, tip?: number | null): {
|
|
@@ -862,7 +891,7 @@ declare function nameView(names: Record<string, NameState>, name: string): NameV
|
|
|
862
891
|
|
|
863
892
|
/** This package's version, for a host that names the core it loaded (cairnx-api's `rev`, a replica's report). Equal to
|
|
864
893
|
* package.json's version (test/version.test.ts). */
|
|
865
|
-
declare const CAIRNX_CORE_VERSION = "0.2.
|
|
894
|
+
declare const CAIRNX_CORE_VERSION = "0.2.11";
|
|
866
895
|
|
|
867
896
|
/** Gate name to height: `ACTIVATION_HEIGHT` and each `V<n>_HEIGHT`, frozen. test/gates.test.ts keeps it equal to the
|
|
868
897
|
* individual exports and complete. It leaves out the one other exported height, `LEGACY_HOLD_SUNSET_HEIGHT`, which is
|
|
@@ -1095,6 +1124,9 @@ interface EventMember<T extends EventRuleTx> {
|
|
|
1095
1124
|
readonly kind: "propose" | "attest";
|
|
1096
1125
|
readonly item: T;
|
|
1097
1126
|
}
|
|
1127
|
+
/** A position or height the rule takes: a safe integer >= 0. A held replay context and a reader of served positions
|
|
1128
|
+
* (the replica's Scanner) check an event's position with it. */
|
|
1129
|
+
declare const isIndex: (v: unknown) => v is number;
|
|
1098
1130
|
/** The event of one transaction at `height`, or null when it carries no app payload, lies below the activation height
|
|
1099
1131
|
* or is a Propose in another domain. Attest membership needs the block and is not decided here: an Attest maps to an
|
|
1100
1132
|
* event whatever its proposal, and a per-transaction caller decides membership itself (resolve() ignores an Attest on
|
|
@@ -1192,4 +1224,4 @@ interface ProvenOfferTx {
|
|
|
1192
1224
|
* rules; the resolver writes no note below activation), or null when it passes. */
|
|
1193
1225
|
declare function provenOfferRefusal(rec: OfferRecord, tx: ProvenOfferTx): string | null;
|
|
1194
1226
|
|
|
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 };
|
|
1227
|
+
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 ReplayContext, ReplayContextRefusal, type ReplayContextRefusalCode, 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, isChainHeight, isIndex, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameView, nameXfer, newReplayContext, 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
|
@@ -137,6 +137,10 @@ declare const DOMAIN = "cairnx:v1";
|
|
|
137
137
|
declare const ACTIVATION_HEIGHT = 29860;
|
|
138
138
|
/** True below ACTIVATION_HEIGHT, where resolve() skips every event without a note. */
|
|
139
139
|
declare const beforeActivation: (height: number) => boolean;
|
|
140
|
+
/** Whether an event height or a tip lies in the domain the replay's expiry batches are proven for (CONVENTION section
|
|
141
|
+
* 5): a safe integer. The chain produces non-negative ones; a negative one is skipped below activation. The fold's
|
|
142
|
+
* split and a held context's refusal both read this one rule. */
|
|
143
|
+
declare const isChainHeight: (height: unknown) => height is number;
|
|
140
144
|
declare const V11_HEIGHT = 29960;
|
|
141
145
|
declare const V12_HEIGHT = 30300;
|
|
142
146
|
declare const V13_HEIGHT = 31100;
|
|
@@ -150,7 +154,7 @@ declare const NAME_GRACE_EPOCHS = 720;
|
|
|
150
154
|
declare const NAME_PREMIUM_START = 20n;
|
|
151
155
|
declare const NAME_PREMIUM_DECAY_EPOCHS = 720;
|
|
152
156
|
/** Fee to claim a name whose lease lapsed (grace over): nameRegFee × a linearly-decaying
|
|
153
|
-
* premium. Pure in (name, epochsPastGraceEnd)
|
|
157
|
+
* premium. Pure in (name, epochsPastGraceEnd): deterministic for every resolver. */
|
|
154
158
|
declare function expiredClaimFee(name: string, epochsPastGraceEnd: number, height: number): bigint;
|
|
155
159
|
declare const MAX_RECORD_BYTES = 512;
|
|
156
160
|
declare const MAX_AMOUNT: bigint;
|
|
@@ -393,9 +397,9 @@ interface NameState {
|
|
|
393
397
|
effectiveHeight: number;
|
|
394
398
|
addr?: string;
|
|
395
399
|
locked: boolean;
|
|
396
|
-
/** v1.3: ownership basis is a paid fill
|
|
400
|
+
/** v1.3: ownership basis is a paid fill: record is displacement-immune (claimId/heights = the fill) */
|
|
397
401
|
viaFill?: true;
|
|
398
|
-
/** v1.5: the lease
|
|
402
|
+
/** v1.5: the lease: owned through this epoch; +grace for owner-only renewal; then premium re-claim */
|
|
399
403
|
paidThroughEpoch?: number;
|
|
400
404
|
/** v1.5: true once the lease + grace lapsed (record kept for history; name is claimable) */
|
|
401
405
|
expired?: true;
|
|
@@ -404,7 +408,7 @@ interface NameState {
|
|
|
404
408
|
* only, so every pre-v2.5 canonical hash stays byte-identical. */
|
|
405
409
|
pending?: true;
|
|
406
410
|
finalizeBy?: number;
|
|
407
|
-
/** v1.9: ENS-class identity
|
|
411
|
+
/** v1.9: ENS-class identity: a charset-locked string→string map (doc 36). INERT cosmetic metadata
|
|
408
412
|
* (NOT a send target; the verified address is `addr`). Materialized at v1.9+ tips only, cleared on
|
|
409
413
|
* every ownership change, absent when empty. */
|
|
410
414
|
profile?: Record<string, string>;
|
|
@@ -444,7 +448,7 @@ interface OfferState {
|
|
|
444
448
|
fills?: FillEntry[];
|
|
445
449
|
/** v1.2: the bid this offer responds to */
|
|
446
450
|
bid?: string;
|
|
447
|
-
/** v1.7 claim-to-fill: the current exclusive claimer + the height their window ends. Lazy lapse
|
|
451
|
+
/** v1.7 claim-to-fill: the current exclusive claimer + the height their window ends. Lazy lapse:
|
|
448
452
|
* a past claimUntilHeight just means no live claim (the fields persist as the last-claim record). */
|
|
449
453
|
claimedBy?: string;
|
|
450
454
|
claimUntilHeight?: number;
|
|
@@ -613,6 +617,30 @@ declare function resolve(events: ChainEvent[], tipHeight: number): CairnXState;
|
|
|
613
617
|
* history.) Keys sort in ordinal (code-unit) order at every depth. */
|
|
614
618
|
declare function canonicalState(s: CairnXState): string;
|
|
615
619
|
|
|
620
|
+
type ReplayContextRefusalCode = "domain" | "order" | "tip" | "broken" | "sloppy";
|
|
621
|
+
/** A call the context does not take, thrown before it writes anything. "domain": a target height or an event height
|
|
622
|
+
* outside isChainHeight, an event position that is not a safe integer >= 0, or an event id (a Propose's id, an
|
|
623
|
+
* Attest's txid) that is not a string; "order": a target below the context's height, or an event at or below it or
|
|
624
|
+
* above the target (a negative height, for a new context); "tip": an answer asked off the context's height;
|
|
625
|
+
* "broken": any call after the replay threw inside advance or stateAt; "sloppy": a context started where a write to a
|
|
626
|
+
* frozen object does not throw. */
|
|
627
|
+
declare class ReplayContextRefusal extends Error {
|
|
628
|
+
readonly code: ReplayContextRefusalCode;
|
|
629
|
+
constructor(code: ReplayContextRefusalCode, message: string);
|
|
630
|
+
}
|
|
631
|
+
interface ReplayContext {
|
|
632
|
+
/** Every event at or below this height has been given; -1, below the chain's first block, for a new context. */
|
|
633
|
+
readonly height: number;
|
|
634
|
+
/** Applies all events of the blocks in (height, toHeight], in apply order, and moves the height to toHeight. Reads
|
|
635
|
+
* `events` once and keeps a copy of each event's own fields, so a later write into a fed event changes no later
|
|
636
|
+
* answer. The copy is one level deep: `paidTo` stays the caller's object, read only during this call. */
|
|
637
|
+
advance(toHeight: number, events: readonly ChainEvent[]): void;
|
|
638
|
+
/** resolve() over the events given so far at tipHeight, which must equal the context's height. The result shares
|
|
639
|
+
* nothing a later advance writes; what it shares is frozen. */
|
|
640
|
+
stateAt(tipHeight: number): CairnXState;
|
|
641
|
+
}
|
|
642
|
+
declare function newReplayContext(): ReplayContext;
|
|
643
|
+
|
|
616
644
|
declare const CLAIM_ATTACKER_Q = 0.2;
|
|
617
645
|
declare const CLAIM_MIN_DEPTH = 3;
|
|
618
646
|
declare const COMMIT_REVEAL_MIN_DEPTH = 3;
|
|
@@ -642,12 +670,12 @@ declare function requiredClaimDepth(valueSats: number | bigint, height: number):
|
|
|
642
670
|
|
|
643
671
|
/** What a payment of `pay` (base units of CSD, the seller-paid amount to `want.payto`) would DELIVER
|
|
644
672
|
* against a CSD-priced offer, computed with the resolver's exact expressions. Returns the delivered
|
|
645
|
-
* token `got`, the treasury `fee`, and the maker `rebate
|
|
673
|
+
* token `got`, the treasury `fee`, and the maker `rebate`, plus a `deliverable` flag that is false
|
|
646
674
|
* exactly when the resolver would reject the fill AFTER the CSD moved (the C3 zero-delivery trap).
|
|
647
675
|
*
|
|
648
676
|
* Only meaningful for CSD-priced token offers (a `want.value`). For a name give, `got` is 1 (a name is
|
|
649
677
|
* indivisible) when `pay >= want.value`. Token-for-token offers (`want.ticker`) return deliverable:false
|
|
650
|
-
* with reason "not-csd-priced"
|
|
678
|
+
* with reason "not-csd-priced": their deliverability depends on the buyer's balance, out of scope here. */
|
|
651
679
|
interface FillPreview {
|
|
652
680
|
deliverable: boolean;
|
|
653
681
|
reason?: "not-open" | "not-csd-priced" | "below-min" | "zero-delivery" | "ok";
|
|
@@ -667,9 +695,9 @@ declare function previewFill(offer: OfferState, payRaw: bigint | string | number
|
|
|
667
695
|
* seller, zero-value entries omitted (a 0 output is unbuildable and the resolver requires nothing).
|
|
668
696
|
*
|
|
669
697
|
* Returns [] for a token-priced offer (a token⇄token fill carries NO CSD outputs) and null when the
|
|
670
|
-
* payment is undeliverable
|
|
698
|
+
* payment is undeliverable: gate with fillIsSafe FIRST; this sizes outputs, it does not re-judge
|
|
671
699
|
* claims/takers. Until 2026-07-06 this map was hand-mirrored in the wallet's fillOffer, the cairnx
|
|
672
|
-
* service txbuild, and TWICE in the cairn trade UI
|
|
700
|
+
* service txbuild, and TWICE in the cairn trade UI: four copies of fund-loss-class math with no
|
|
673
701
|
* cross-repo lock. This is now the only place it lives; test/preflight.test.ts pins it against the
|
|
674
702
|
* real resolver (outputs accepted; any single-unit per-address underpayment refused).
|
|
675
703
|
*
|
|
@@ -723,7 +751,7 @@ declare function fillOutputPlan(offer: OfferState, payRaw: bigint | string | num
|
|
|
723
751
|
* forfeit. Within FEE_GATE_MARGIN_BLOCKS below ANY upcoming fee gate, price the BUILD at that gate:
|
|
724
752
|
* overpay is always accepted (the resolver gate is strict `<`), so this only ever PREVENTS a forfeit,
|
|
725
753
|
* never causes one. Display paths must pass the SAME buildFeeHeight(tip) so the quoted price matches
|
|
726
|
-
* what gets signed. Owns the gate list: a future fee tier (V28+) is added HERE, once
|
|
754
|
+
* what gets signed. Owns the gate list: a future fee tier (V28+) is added HERE, once: the wallet and
|
|
727
755
|
* the trade UI import this (they each hand-carried a copy of this function + list until 2026-07-06). */
|
|
728
756
|
declare const FEE_GATE_MARGIN_BLOCKS = 5;
|
|
729
757
|
declare const buildFeeHeight: (tip: number) => number;
|
|
@@ -765,7 +793,8 @@ declare function fillIsSafe(offer: OfferState, me: string, pay: bigint | string
|
|
|
765
793
|
/** B6b (REBIND W10): the DISCRIMINATED successor to fillIsSafe. Three verdicts, and consuming them
|
|
766
794
|
* correctly is part of the contract:
|
|
767
795
|
* "endorsed" - every deterministic gate a payer can verify at signing time passes (status, taker,
|
|
768
|
-
* open-lane holdership, deliverability,
|
|
796
|
+
* open-lane holdership, deliverability, the v2.8 fill-target routing, and from
|
|
797
|
+
* LEGACY_HOLD_SUNSET_HEIGHT the routing of an open CSD offer through a reservation).
|
|
769
798
|
* "refused" - the chain WILL reject this fill after the payment moved. Do not sign.
|
|
770
799
|
* "not-endorsable" - a TOKEN-priced want: deliverability is the attester's token balance, which this
|
|
771
800
|
* pure predicate cannot see. This is HONEST NON-ENDORSEMENT, not refusal: proceed
|
|
@@ -800,22 +829,22 @@ declare function fillEndorsement(offer: OfferState, me: string, pay: bigint | st
|
|
|
800
829
|
*
|
|
801
830
|
* TRUST SCOPE (read before relying on this): this is a STALE-STATE and displacement-race guard under an
|
|
802
831
|
* HONEST resolver, NOT a Byzantine-resolver defense. Its safety rests on `commitHeight` coming from a
|
|
803
|
-
* source INDEPENDENT of `nameState
|
|
832
|
+
* source INDEPENDENT of `nameState`: then `effectiveHeight !== commitHeight` genuinely detects a
|
|
804
833
|
* displaced/forged reservation. A caller that passes `nameState.effectiveHeight` AS `commitHeight` makes
|
|
805
834
|
* that guard a tautology (`X !== X`), so `eff` becomes resolver-controlled and this helper gives
|
|
806
835
|
* window-SHAPE correctness only, not protection against a resolver that lies about `effectiveHeight`.
|
|
807
836
|
* No field arithmetic here can defeat a resolver that forges the whole record (owner/pending/eff at once);
|
|
808
837
|
* that closure is registration-state SPV (roadmapped), the same posture the fill path documents (a
|
|
809
838
|
* coherently lying resolver is the fill-SPV item, not this guard). Pass the AUTHORITATIVE (freshly
|
|
810
|
-
* re-fetched) name record
|
|
839
|
+
* re-fetched) name record, never a cached one, as `nameState` (undefined = 404 / unregistered = loss).
|
|
811
840
|
*
|
|
812
841
|
* Pass `tip` to ALSO gate the finalize WINDOW, both sides, mirroring the resolver's authoritative checks
|
|
813
842
|
* (`applyNfinalize` in src/resolve/names.ts rejects unless `ev.height > effHeight + REG_COMMIT_MAX_BLOCKS`, and rejects when
|
|
814
843
|
* `ev.height > finalizeBy`) with the client-side FINALIZE_TIP_MARGIN band the site's finalizeReady applies:
|
|
815
844
|
* the tx signs at `tip` but mines at tip+1 or later, so the margin keeps a boundary-signed finalize from
|
|
816
|
-
* mining outside the window (too early: rejected as unfrozen; too late: past the deadline
|
|
845
|
+
* mining outside the window (too early: rejected as unfrozen; too late: past the deadline; either way the
|
|
817
846
|
* fee burns). The window is derived purely from `eff` (never the resolver's `finalizeBy`), so a lying
|
|
818
|
-
* `finalizeBy` cannot widen it
|
|
847
|
+
* `finalizeBy` cannot widen it; but per the trust scope above, a lying `eff` still can for a caller that
|
|
819
848
|
* does not supply an independent `commitHeight`. `tip` is optional; without it the winner-only path runs. A
|
|
820
849
|
* supplied `tip` that is not a non-negative safe integer is refused. */
|
|
821
850
|
declare function finalizeWinnerCheck(nameState: NameState | null | undefined, me: string, commitHeight: number, tip?: number | null): {
|
|
@@ -862,7 +891,7 @@ declare function nameView(names: Record<string, NameState>, name: string): NameV
|
|
|
862
891
|
|
|
863
892
|
/** This package's version, for a host that names the core it loaded (cairnx-api's `rev`, a replica's report). Equal to
|
|
864
893
|
* package.json's version (test/version.test.ts). */
|
|
865
|
-
declare const CAIRNX_CORE_VERSION = "0.2.
|
|
894
|
+
declare const CAIRNX_CORE_VERSION = "0.2.11";
|
|
866
895
|
|
|
867
896
|
/** Gate name to height: `ACTIVATION_HEIGHT` and each `V<n>_HEIGHT`, frozen. test/gates.test.ts keeps it equal to the
|
|
868
897
|
* individual exports and complete. It leaves out the one other exported height, `LEGACY_HOLD_SUNSET_HEIGHT`, which is
|
|
@@ -1095,6 +1124,9 @@ interface EventMember<T extends EventRuleTx> {
|
|
|
1095
1124
|
readonly kind: "propose" | "attest";
|
|
1096
1125
|
readonly item: T;
|
|
1097
1126
|
}
|
|
1127
|
+
/** A position or height the rule takes: a safe integer >= 0. A held replay context and a reader of served positions
|
|
1128
|
+
* (the replica's Scanner) check an event's position with it. */
|
|
1129
|
+
declare const isIndex: (v: unknown) => v is number;
|
|
1098
1130
|
/** The event of one transaction at `height`, or null when it carries no app payload, lies below the activation height
|
|
1099
1131
|
* or is a Propose in another domain. Attest membership needs the block and is not decided here: an Attest maps to an
|
|
1100
1132
|
* event whatever its proposal, and a per-transaction caller decides membership itself (resolve() ignores an Attest on
|
|
@@ -1192,4 +1224,4 @@ interface ProvenOfferTx {
|
|
|
1192
1224
|
* rules; the resolver writes no note below activation), or null when it passes. */
|
|
1193
1225
|
declare function provenOfferRefusal(rec: OfferRecord, tx: ProvenOfferTx): string | null;
|
|
1194
1226
|
|
|
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 };
|
|
1227
|
+
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 ReplayContext, ReplayContextRefusal, type ReplayContextRefusalCode, 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, isChainHeight, isIndex, isName, isNameGive, isOpenClaimLane, isTokenWant, makerRebate, mint, myProvenFillClosedOffer, nameClaim, nameCommit, nameCommitRecord, nameFinalize, nameProfile, nameRegFee, nameRenew, nameSet, nameView, nameXfer, newReplayContext, offer, offerCancelAll, offerExpiryHeightOf, offerFillTooLate, paidToFromOutputs, parseAmount, parseRecord, pickPrimaryName, previewFill, primaryRankBefore, provenOfferRefusal, provenOfferTerms, ptAmt, replayLiveHold, requiredClaimDepth, requiredFillOutputs, resolve, resolveNameIn, stateHash, tokenMeta, tradeFee, transfer, unsafeMintProvenOfferTerms, verifyFillSpv };
|