@inversealtruism/cairnx-core 0.2.4 → 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/dist/index.d.ts CHANGED
@@ -1,5 +1,138 @@
1
+ import { App, TxOutput } from '@inversealtruism/csd-codec';
1
2
  export { EPOCH_LEN, HALVING_INTERVAL, INITIAL_REWARD, MIN_FEE_ATTEST, MIN_FEE_PROPOSE, blockReward, canonicalJson, epochOf, payloadHash } from '@inversealtruism/csd-codec';
2
3
 
4
+ declare const TABLE: {
5
+ readonly TOKEN_DEPLOYED: "applied";
6
+ readonly TOKEN_MINTED: "applied";
7
+ readonly TOKEN_TRANSFERRED: "applied";
8
+ readonly TOKEN_META_SET: "applied";
9
+ readonly NAME_COMMITTED: "applied";
10
+ readonly NAME_REGISTERED: "applied";
11
+ readonly NAME_REGISTERED_DISPLACED: "applied";
12
+ readonly NAME_RESERVED: "applied";
13
+ readonly NAME_RESERVED_DISPLACED: "applied";
14
+ readonly NAME_RECAPTURE_RESERVED: "applied";
15
+ readonly NAME_RECAPTURE_RESERVED_DISPLACED: "applied";
16
+ readonly NAME_RECLAIMED: "applied";
17
+ readonly NAME_FINALIZED: "applied";
18
+ readonly NAME_RECAPTURE_FINALIZED: "applied";
19
+ readonly NAME_TRANSFERRED: "applied";
20
+ readonly NAME_ADDR_SET: "applied";
21
+ readonly NAME_PROFILE_SET: "applied";
22
+ readonly NAME_RENEWED: "applied";
23
+ readonly OFFER_CREATED: "applied";
24
+ readonly OFFER_BULK_CANCELLED: "applied";
25
+ readonly OFFER_CANCELLED: "applied";
26
+ readonly BID_CREATED: "applied";
27
+ readonly BID_CANCELLED: "applied";
28
+ readonly FILL_APPLIED: "applied";
29
+ readonly FILL_PARTIAL: "applied";
30
+ readonly CLAIM_GRANTED: "applied";
31
+ readonly GATE_NOT_ACTIVE: "refused";
32
+ readonly CLAIM_LEGACY_SUNSET: "refused";
33
+ readonly TOKEN_TICKER_TAKEN: "refused";
34
+ readonly TOKEN_UNKNOWN: "refused";
35
+ readonly TOKEN_NOT_ISSUER: "refused";
36
+ readonly TOKEN_SUPPLY_EXHAUSTED: "refused";
37
+ readonly TOKEN_MINT_AMOUNT_REQUIRED: "refused";
38
+ readonly TOKEN_BALANCE_LOW: "refused";
39
+ readonly TREASURY_FEE_UNPAID: "refused";
40
+ readonly NAME_NO_COMMIT: "refused";
41
+ readonly NAME_SALT_REQUIRED: "refused";
42
+ readonly NAME_TAKEN_EARLIER: "refused";
43
+ readonly NAME_TAKEN_PURCHASED: "refused";
44
+ readonly NAME_SALT_MISMATCH: "refused";
45
+ readonly NAME_FINALIZE_TOO_EARLY: "refused";
46
+ readonly NAME_RESERVATION_EXPIRED: "refused";
47
+ readonly NAME_NOT_LAPSED: "refused";
48
+ readonly NAME_NO_RESERVATION: "refused";
49
+ readonly NAME_NOT_OWNER: "refused";
50
+ readonly NAME_PENDING: "refused";
51
+ readonly NAME_LAPSED: "refused";
52
+ readonly NAME_NO_LIVE_LEASE: "refused";
53
+ readonly NAME_GRACE_OWNER_ONLY: "refused";
54
+ readonly NAME_LOCKED: "refused";
55
+ readonly NAME_TOO_YOUNG: "refused";
56
+ readonly OFFER_LEASE_TOO_SHORT: "refused";
57
+ readonly OFFER_TAKER_REQUIRED: "refused";
58
+ readonly OFFER_PAYTO_TREASURY: "refused";
59
+ readonly OFFER_UNKNOWN: "refused";
60
+ readonly OFFER_NOT_OPEN: "refused";
61
+ readonly OFFER_NOT_SELLER: "refused";
62
+ readonly OFFER_FIRM_QUOTE: "refused";
63
+ readonly OFFER_CANCEL_HOLD_LIVE: "refused";
64
+ readonly OFFER_CLOSED_BEFORE_CANCEL: "refused";
65
+ readonly BID_NOT_BIDDER: "refused";
66
+ readonly BID_NOT_OPEN: "refused";
67
+ readonly EXPIRY_UNSAFE: "refused";
68
+ readonly EXPIRY_PAST: "refused";
69
+ readonly EXPIRY_TOO_LONG: "refused";
70
+ readonly FILL_FCLAIM_NOT_CURRENT: "refused";
71
+ readonly FILL_NOT_TAKER: "refused";
72
+ readonly FILL_NO_TOKEN_MARKER: "refused";
73
+ readonly FILL_OPEN_LANE_CLOSED: "refused";
74
+ readonly FILL_WRONG_TARGET: "refused";
75
+ readonly FILL_NO_LIVE_CLAIM: "refused";
76
+ readonly FILL_BELOW_MIN: "refused";
77
+ readonly FILL_ZERO_DELIVERY: "refused";
78
+ readonly FILL_UNDERPAID: "refused";
79
+ readonly FILL_REBATE_UNPAID: "refused";
80
+ readonly CLAIM_TAKER_BOUND: "refused";
81
+ readonly CLAIM_TOKEN_PRICED: "refused";
82
+ readonly CLAIM_HOLD_LIVE: "refused";
83
+ readonly CLAIM_COOLDOWN: "refused";
84
+ readonly CLAIM_OUTLIVES_OFFER: "refused";
85
+ readonly CLAIM_TOO_FAR_AHEAD: "refused";
86
+ readonly CAP_PENDING_RESERVATIONS: "refused";
87
+ readonly CAP_PENDING_RECAPTURES: "refused";
88
+ readonly CAP_LIVE_HOLDS: "refused";
89
+ readonly INVARIANT_BROKEN: "refused";
90
+ readonly RECORD_TOO_LARGE: "refused";
91
+ readonly RECORD_NOT_OBJECT: "refused";
92
+ readonly RECORD_NOT_CANONICAL: "refused";
93
+ readonly RECORD_HASH_MISMATCH: "refused";
94
+ readonly RECORD_LONE_SURROGATE: "refused";
95
+ readonly RECORD_NOT_V1: "refused";
96
+ readonly RECORD_UNKNOWN_TYPE: "refused";
97
+ readonly RECORD_EXTRA_KEY: "refused";
98
+ readonly RECORD_BAD_SHAPE: "refused";
99
+ readonly RECORD_SAME_TOKEN: "refused";
100
+ readonly RECORD_BAD_TICKER: "refused";
101
+ readonly RECORD_BAD_NAME: "refused";
102
+ readonly RECORD_NAME_RESERVED: "refused";
103
+ readonly RECORD_BAD_ADDRESS: "refused";
104
+ readonly RECORD_BAD_AMOUNT: "refused";
105
+ readonly RECORD_AMOUNT_TOO_LARGE: "refused";
106
+ readonly RECORD_AMOUNT_ZERO: "refused";
107
+ readonly RECORD_MIN_ABOVE_WANT: "refused";
108
+ readonly RECORD_BAD_HASH: "refused";
109
+ readonly RECORD_BAD_SALT: "refused";
110
+ readonly RECORD_BAD_DECIMALS: "refused";
111
+ readonly RECORD_BAD_MINT_MODE: "refused";
112
+ readonly RECORD_BAD_TEXT: "refused";
113
+ readonly RECORD_BAD_TS: "refused";
114
+ readonly RECORD_PROFILE_TOO_MANY_KEYS: "refused";
115
+ readonly RECORD_PROFILE_BAD_KEY: "refused";
116
+ readonly RECORD_PROFILE_BAD_VALUE: "refused";
117
+ readonly RECORD_PROFILE_VALUE_TOO_LONG: "refused";
118
+ };
119
+ /** A reason code of the applied log or of record validation. */
120
+ type ReasonCode = keyof typeof TABLE;
121
+ /** The codes of an applied record (`ok: true`). */
122
+ type AppliedCode = {
123
+ [K in ReasonCode]: (typeof TABLE)[K] extends "applied" ? K : never;
124
+ }[ReasonCode];
125
+ /** The codes of a refused record (`ok: false`). */
126
+ type RefusalCode = Exclude<ReasonCode, AppliedCode>;
127
+ /** The codes of a record that does not parse (explainRecord, RecordError, the log's `invalid` entries). */
128
+ type RecordCode = Extract<ReasonCode, `RECORD_${string}`>;
129
+ /** Every code, in table order. */
130
+ declare const REASON_CODES: readonly ReasonCode[];
131
+ /** Each code's outcome. A reader meets codes added after its release, so it classifies an unknown code by the entry's `ok`. */
132
+ declare const REASON_CODE_OUTCOME: Readonly<Record<ReasonCode, "applied" | "refused">>;
133
+ /** The refusals CONVENTION §40 calls caps: per-address rules that count the proposer's other names or offers. */
134
+ declare const CAP_CODES: readonly ["CAP_PENDING_RESERVATIONS", "CAP_PENDING_RECAPTURES", "CAP_LIVE_HOLDS"];
135
+
3
136
  declare const DOMAIN = "cairnx:v1";
4
137
  declare const ACTIVATION_HEIGHT = 29860;
5
138
  /** True below ACTIVATION_HEIGHT, where resolve() skips every event without a note. */
@@ -340,13 +473,28 @@ interface BidState {
340
473
  /** offers anchored in response (tagged with this bid's id), in apply order */
341
474
  offers: string[];
342
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
+ }
343
485
  interface AppliedEvent {
344
486
  height: number;
345
487
  pos: number;
346
488
  id: string;
347
489
  kind: string;
348
490
  ok: boolean;
491
+ /** The rule that decided the record (CONVENTION §40); every entry resolve() writes carries one. Optional in the type:
492
+ * a log built by hand or by a core before 0.2.6 has none. */
493
+ code?: ReasonCode;
349
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[];
350
498
  }
351
499
  interface CairnXState {
352
500
  tipHeight: number;
@@ -410,10 +558,24 @@ declare const FCLAIM_KEYS: Set<string>;
410
558
  * Parse + validate a record from an anchored `uri`. Returns null for anything invalid —
411
559
  * per CONVENTION §3, invalid is a no-op, never an error that poisons the replay.
412
560
  * Requirements enforced here: uri is canonical JSON of the record, ≤512 bytes,
413
- * payload_hash commits to it, schema rules of §4.
561
+ * payload_hash commits to it, schema rules of §4. explainRecord says which rule refused it.
414
562
  */
415
563
  declare function parseRecord(uri: string, payloadHashHex: string): CairnXRecord | null;
416
- /** Build (and self-validate) a record → {record, uri, payloadHash} ready to anchor. */
564
+ /** parseRecord with its reason: the record, or the code of the first rule it breaks in parseRecord's order (CONVENTION
565
+ * §40). parseRecord answers null exactly when this answers ok: false: both read one implementation. */
566
+ declare function explainRecord(uri: string, payloadHashHex: string): {
567
+ ok: true;
568
+ record: CairnXRecord;
569
+ } | {
570
+ ok: false;
571
+ code: RecordCode;
572
+ };
573
+ /** A record builder's refusal: the record does not validate, and `code` names the first rule it breaks (CONVENTION §40). */
574
+ declare class RecordError extends Error {
575
+ readonly code: RecordCode;
576
+ constructor(code: RecordCode);
577
+ }
578
+ /** Build (and self-validate) a record → {record, uri, payloadHash} ready to anchor; a RecordError names the rule it breaks. */
417
579
  declare function buildRecord(record: CairnXRecord): BuiltRecord;
418
580
  declare const deploy: (r: Omit<DeployRecord, "v" | "t">) => BuiltRecord;
419
581
  declare const mint: (r: Omit<MintRecord, "v" | "t">) => BuiltRecord;
@@ -433,6 +595,14 @@ declare const fclaim: (r: Omit<FclaimRecord, "v" | "t">) => BuiltRecord;
433
595
 
434
596
  declare function ptAmt(v: unknown): bigint;
435
597
 
598
+ /** An event's id (CONVENTION §33.4): a Propose's id, an Attest's transaction id. */
599
+ declare function eventId(e: ChainEvent): string;
600
+ /** The apply order of CONVENTION §3 and §33.3, the comparator resolve() sorts its events with: height, a block's
601
+ * Proposes before its Attests, position, then the ordinal order of the id. Negative when `a` applies before `b`, zero
602
+ * when all four keys are equal (the same event, or a repeated one, which a stable sort keeps in input order).
603
+ * Defined for events the rule of §33 builds: a kind of "propose" or "attest", integer height and position, a string id.
604
+ * Outside that domain the result is unspecified: a NaN key compares as equal. */
605
+ declare function applyOrder(a: ChainEvent, b: ChainEvent): number;
436
606
  declare function resolve(events: ChainEvent[], tipHeight: number): CairnXState;
437
607
  /** Canonical serialization of state (FORMAT 2) — byte-identical across honest resolvers.
438
608
  * The canonical surface is the DATA ONLY: {tipHeight, tokens, balances, names, offers, bids,
@@ -660,6 +830,68 @@ declare const primaryRankBefore: (a: NameState, b: NameState) => boolean;
660
830
  /** The primary .csd name for address `a`, or null. Pure; no I/O. `a` may be any case. */
661
831
  declare function pickPrimaryName(names: Iterable<NameState>, a: string): string | null;
662
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
+
663
895
  declare const FCLAIM_MAX_HOLD_SPAN: number;
664
896
  declare const GAP_NEEDED: number;
665
897
  declare const SCAN_MARGIN = 30;
@@ -831,6 +1063,72 @@ declare function burnedPayment(paidTo: Readonly<Record<string, unknown>> | undef
831
1063
  counterparty: bigint;
832
1064
  };
833
1065
 
1066
+ /** The domain and the activation height the rule selects for. */
1067
+ interface EventRule {
1068
+ readonly domain: string;
1069
+ readonly activationHeight: number;
1070
+ }
1071
+ /** CairnX: `cairnx:v1` from height 29,860. */
1072
+ declare const CAIRNX_EVENT_RULE: EventRule;
1073
+ /** One mined transaction: its position in the block (the coinbase is 0), its txid, and its body decoded with u64
1074
+ * values exact (a bigint, or a number up to 2^53). csd-light's BoundTx is one. */
1075
+ interface EventRuleTx {
1076
+ readonly pos: number;
1077
+ readonly txid: string;
1078
+ readonly tx: {
1079
+ readonly app: App;
1080
+ readonly outputs: readonly TxOutput[];
1081
+ };
1082
+ }
1083
+ /** The caller's record of the events below the block it reads, rolled back with them on a reorganisation: every event
1084
+ * id (a Propose's id, an Attest's txid, `0x` and lowercase hex) and the Propose ids among them. */
1085
+ interface EventsSoFar {
1086
+ readonly eventIds: {
1087
+ has(id: string): boolean;
1088
+ };
1089
+ readonly proposeIds: {
1090
+ has(id: string): boolean;
1091
+ };
1092
+ }
1093
+ /** A transaction of a block that is an event, so its author must be bound. */
1094
+ interface EventMember<T extends EventRuleTx> {
1095
+ readonly kind: "propose" | "attest";
1096
+ readonly item: T;
1097
+ }
1098
+ /** The event of one transaction at `height`, or null when it carries no app payload, lies below the activation height
1099
+ * or is a Propose in another domain. Attest membership needs the block and is not decided here: an Attest maps to an
1100
+ * event whatever its proposal, and a per-transaction caller decides membership itself (resolve() ignores an Attest on
1101
+ * a proposal it does not hold). Throws on a field out of its consensus type, a payload at position 0, or an event's
1102
+ * author that is not an address. */
1103
+ declare function eventOfTx(t: EventRuleTx, height: number, author: string, rule?: EventRule): ChainEvent | null;
1104
+ /** The members of one block in position order: the transactions whose authors the caller binds. `txs` lists, in
1105
+ * strictly increasing position order, every transaction of the block that carries an app payload (a complete block
1106
+ * is one such list). Throws on a list that is no block of the chain: positions out of order, a txid repeated, a
1107
+ * payload at position 0. Nothing of a block below the activation height is read. */
1108
+ declare function blockMembers<T extends EventRuleTx>(height: number, txs: readonly T[], sofar: EventsSoFar, rule?: EventRule): EventMember<T>[];
1109
+ /** The block's events in apply order (Proposes by position, then Attests by position), `authors[i]` being the author
1110
+ * of `blockMembers(...)[i]`. The members are selected again here, so an author list that does not match them throws:
1111
+ * a member whose author cannot be bound leaves the block without events, never without that event. */
1112
+ declare function blockEvents(height: number, txs: readonly EventRuleTx[], sofar: EventsSoFar, authors: readonly string[], rule?: EventRule): ChainEvent[];
1113
+
1114
+ /** The fields of an event the events hash reads; a ChainEvent is one. */
1115
+ type HashedEvent = Pick<ProposeEvent, "kind" | "id" | "proposer" | "height" | "pos"> | Pick<AttestEvent, "kind" | "txid" | "attester" | "height" | "pos">;
1116
+ /** The events hash before the first block that holds an event: 32 zero bytes. */
1117
+ declare const EVENTS_HASH_START: string;
1118
+ /** How far below its tip a replica holds an epoch boundary before it publishes or compares the tuple there (§38). It
1119
+ * is the depth replicas compare at, not a bound on how deep a reorganisation can reach. */
1120
+ declare const FINAL_DEPTH = 12;
1121
+ /** sha256 of the UTF-8 bytes of canonicalState(state), `0x` and lowercase hex (§34.1). */
1122
+ declare function stateHash(state: CairnXState): string;
1123
+ /** The events hash after one block (§34.2) from the value `prev`: `events` are that block's, in any order, hashed in
1124
+ * ascending position. A block without events leaves `prev`. The previous block's height is not an input, so a caller
1125
+ * that steps block by block keeps the blocks in ascending height itself. */
1126
+ declare function eventsHashStep(prev: string, height: number, events: readonly HashedEvent[]): string;
1127
+ /** The events hash over a list from the start value (§34.2): the list is in the order of §33.3, or in one that differs
1128
+ * from it only within a block, so each height forms one run. A height below the run before it is refused, never
1129
+ * sorted: resolve() sorts its input, this function does not. */
1130
+ declare function eventsHash(events: readonly HashedEvent[]): string;
1131
+
834
1132
  /**
835
1133
  * True only when `fill` proves `me`'s own fill CLOSED the offer behind `fclaim` before `grantHeight`, so a
836
1134
  * resolver at a grant height >= V29_HEIGHT no longer counts that hold. `fill` and `offerEv` must be
@@ -894,4 +1192,4 @@ interface ProvenOfferTx {
894
1192
  * rules; the resolver writes no note below activation), or null when it passes. */
895
1193
  declare function provenOfferRefusal(rec: OfferRecord, tx: ProvenOfferTx): string | null;
896
1194
 
897
- export { ACTIVATION_HEIGHT, ADDR_RE, AMOUNT_RE, type AppliedEvent, type AttestEvent, BID_KEYS, type BalanceState, type BidRecord, type BidState, type BidStatus, type BindTermsOpts, type BuiltRecord, 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, 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, type FclaimRecord, type FillEndorsement, type FillEntry, type FillOutputPlan, type FillPreview, type FillSafety, type FillSpvIo, type FillVerdict, GAP_NEEDED, type Give, HASH_RE, 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, REBATE_BPS, REBATE_FLAT, REG_COMMIT_MAX_BLOCKS, REG_FINALIZE_GRACE_BLOCKS, RESERVED_NAMES, 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, beforeActivation, bid, bindOfferTerms, bindProvenOffer, buildFeeHeight, buildRecord, burnedPayment, canonicalState, claimGraceOf, claimWindowAt, claimWindowOf, countOtherHoldsAtGrant, deploy, expiredClaimFee, 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, 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 };