yggio 0.0.14 → 0.0.15

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/benchmarks/fix.js CHANGED
@@ -116,15 +116,11 @@ const order = fields.struct(
116
116
  { nullable: false },
117
117
  )
118
118
  // `PartyRole(452)` states a code set, so it holds its wire code as text.
119
- const message = fix.MarketMessage.fromFixRecord(
120
- order,
121
- {
119
+ const message = fix.MarketMessage.fromFixRecord(order, {
122
120
  symbol: 'AAPL',
123
121
  orderqty: Scalar.decimal(100n * 10n ** 18n, 18),
124
122
  parties: [{ partyid: 'BROKER', partyidsource: 'D', partyrole: '1' }],
125
- },
126
- registry,
127
- )
123
+ }, new fix.MarketMessagesOptions(registry))
128
124
 
129
125
  const catalog = new fix.FixRegistry()
130
126
  const counter = Field.from('NoPartyIDs: int32')
@@ -157,8 +153,8 @@ arrivingField.fix.tag = 55
157
153
  if (catalog.clone().addField(foldingField) !== false) throw new Error('party_id should fold')
158
154
  if (catalog.clone().addField(arrivingField) !== true) throw new Error('Symbol should arrive')
159
155
  const singleton = catalog.msgtype('D')
160
- const codec = new fix.FixCodec(catalog)
161
- const snapshotCodec = new fix.FixCodec(catalog, { snapshotNs: 1_000_000_000n })
156
+ const catalogOptions = new fix.MarketMessagesOptions(catalog)
157
+ const snapshotOptions = new fix.MarketMessagesOptions(catalog, { snapshotNs: 1_000_000_000n })
162
158
 
163
159
  function drain(values) {
164
160
  let count = 0
@@ -168,14 +164,14 @@ function drain(values) {
168
164
 
169
165
  // The stream and Arrow doors, over a capture of wide orders: what is measured
170
166
  // is the crossing - one pull per line, one batch per pull - beside the parse.
171
- const seedCodec = new fix.FixCodec(registry)
167
+ const seedOptions = new fix.MarketMessagesOptions(registry)
172
168
  const fixedSchema = fix.MarketMessage.field()
173
169
  const encoder = new TextEncoder()
174
170
  const LINES = Array.from({ length: 256 }, (_, index) =>
175
171
  encoder.encode(`8=FIX.4.4|35=D|11=ORDER-${String(index).padStart(6, '0')}|55=AAPL|54=1|38=100|58=${'x'.repeat(200)}|10=0|`),
176
172
  )
177
173
  const capture = new arrow.Table({ body: arrow.vectorFromArray(LINES, new arrow.Binary()) })
178
- const parsed = seedCodec.parseLine(Buffer.from(LINES[0])).next().value
174
+ const parsed = fix.MarketMessage.fromLine(Buffer.from(LINES[0]), seedOptions)
179
175
  const orderType = registry.msgtype('D')
180
176
  const orderDeclaration = orderType.asField()
181
177
  if (parsed.identifiers.get('clordid') !== 'ORDER-000000') {
@@ -188,7 +184,7 @@ if (orderType.marketdatakind !== 'OPER' || parsed.marketdatakind !== 'OPER' || s
188
184
  throw new Error('FIX category and exact snapshot boundary mismatch')
189
185
  }
190
186
  const parsedRow = parsed.intoRow(fixedSchema)
191
- const parsedIpc = seedCodec.parseTextArrowReader(capture).intoIpc()
187
+ const parsedIpc = new fix.MarketMessages(seedOptions).fromTextArrowReader(capture).intoArrowReader().intoIpc()
192
188
  // The line door, each line as a text reader answers it.
193
189
  const TEXT_LINES = LINES.map((body, index) => new TextLine(BigInt(index), Buffer.from(body)))
194
190
  // The same door with a `msgpluginid` capture on every line: the capture fills
@@ -203,14 +199,14 @@ const msgpluginidRegistry = (() => {
203
199
  held.insert(venue)
204
200
  return held
205
201
  })()
206
- const msgpluginidCodec = new fix.FixCodec(msgpluginidRegistry, { captureNames: ['msgpluginid'] })
202
+ const msgpluginidOptions = new fix.MarketMessagesOptions(msgpluginidRegistry, { captureNames: ['msgpluginid'] })
207
203
  const MSGPLUGINID_LINES = LINES.map((body, index) =>
208
204
  new TextLine(BigInt(index), Buffer.from(body), [index % 2 === 0 ? VENDOR_DIALECT : 'OMS_X1_TradeCapture']),
209
205
  )
210
- if (drain(msgpluginidCodec.parseTextLines(MSGPLUGINID_LINES)) !== LINES.length) {
206
+ if (drain(new fix.MarketMessages(msgpluginidOptions).fromTextLines(MSGPLUGINID_LINES)) !== LINES.length) {
211
207
  throw new Error('msgpluginid line cardinality mismatch')
212
208
  }
213
- if (drain(seedCodec.parseLines(LINES)) !== LINES.length) throw new Error('line cardinality mismatch')
209
+ if (drain(new fix.MarketMessages(seedOptions).fromLines(LINES)) !== LINES.length) throw new Error('line cardinality mismatch')
214
210
  const sink = { write() {} }
215
211
 
216
212
  try {
@@ -244,7 +240,7 @@ try {
244
240
  benchmark('fix/field_msgcat', () => orderDeclaration.fix.msgcat)
245
241
  benchmark('fix/msgtype_marketdatakind', () => orderType.marketdatakind)
246
242
  benchmark('fix/message_marketdatakind', () => parsed.marketdatakind)
247
- benchmark('fix/codec_snapshot_ns', () => snapshotCodec.snapshotNs)
243
+ benchmark('fix/options_snapshot_ns', () => snapshotOptions.snapshotNs)
248
244
  benchmark('fix/identifier_values', () => orderType.identifierValues(parsed))
249
245
  // The typed holders, each read once into the plain object it crosses as.
250
246
  benchmark('fix/message_header', () => parsed.header())
@@ -262,7 +258,7 @@ try {
262
258
  benchmark('fix/message_get_by_name', () => message.getByName('ticker'))
263
259
  benchmark('fix/message_get_by_path', () => message.getByPath('Parties.0.PartyID'))
264
260
  benchmark('fix/infer_fixml_protocol', () => MimeType.inferBytes(FIXML_LINE))
265
- benchmark('fix/infer_ullink_msgtype', () => fix.FixCodec.inferMsgtypeText(ULLINK_LINE))
261
+ benchmark('fix/infer_ullink_msgtype', () => fix.MarketMessagesOptions.inferMsgtypeText(ULLINK_LINE))
266
262
  benchmark('fix/fields_first', () => {
267
263
  const iterator = catalog.keys()[Symbol.iterator]()
268
264
  const first = iterator.next().value
@@ -302,41 +298,41 @@ try {
302
298
  copy.insert(empty)
303
299
  return copy.remove('NewMessage')
304
300
  })
305
- benchmark('fix/numeric_group_parse', () => drain(codec.parseLine(Buffer.from('35=D|453=2|448=ONE|448=TWO|'))))
301
+ benchmark('fix/numeric_group_parse', () => drain(new fix.MarketMessages(catalogOptions).fromLines([Buffer.from('35=D|453=2|448=ONE|448=TWO|')])))
306
302
  benchmark('fix/message_into_row', () => message.intoRow(order))
307
303
  benchmark('fix/message_into_bytes', () => message.intoBytes(124))
308
304
  benchmark('fix/message_set', () => parsed.clone().set(55, 'MSFT'))
309
305
  benchmark('fix/message_remove', () => parsed.clone().remove(55))
310
- benchmark('fix/message_from_row', () => fix.MarketMessage.fromRow(fixedSchema, parsedRow, registry))
306
+ benchmark('fix/message_from_row', () => fix.MarketMessage.fromRow(fixedSchema, parsedRow, seedOptions))
311
307
  benchmark('fix/message_into_text', () => message.intoText('|'))
312
308
  benchmark('fix/identified_message_arrow', () =>
313
- seedCodec.arrowReader(fixedSchema, [parsed]).intoTable().numRows,
309
+ new fix.MarketMessages(seedOptions).fromItems([parsed]).intoArrowReader(fixedSchema).intoTable().numRows,
314
310
  )
315
311
  const streams = Math.max(1, Math.round(iterations / 50))
316
- benchmarkStreams(`fix/parse_lines_drain/${LINES.length}`, streams, () => drain(seedCodec.parseLines(LINES)))
312
+ benchmarkStreams(`fix/parse_lines_drain/${LINES.length}`, streams, () => drain(new fix.MarketMessages(seedOptions).fromLines(LINES)))
317
313
  benchmarkStreams(`fix/parse_text_lines_drain/${LINES.length}`, streams, () =>
318
- drain(seedCodec.parseTextLines(TEXT_LINES)),
314
+ drain(new fix.MarketMessages(seedOptions).fromTextLines(TEXT_LINES)),
319
315
  )
320
316
  benchmarkStreams(`fix/parse_text_lines_msgpluginid_drain/${LINES.length}`, streams, () =>
321
- drain(msgpluginidCodec.parseTextLines(MSGPLUGINID_LINES)),
317
+ drain(new fix.MarketMessages(msgpluginidOptions).fromTextLines(MSGPLUGINID_LINES)),
322
318
  )
323
319
  benchmarkStreams(`fix/parse_text_arrow_reader/${LINES.length}`, streams, () =>
324
- seedCodec.parseTextArrowReader(capture).intoTable().numRows,
320
+ new fix.MarketMessages(seedOptions).fromTextArrowReader(capture).intoArrowReader().intoTable().numRows,
325
321
  )
326
322
  benchmarkStreams(`fix/lifecycle_drain/${LINES.length}`, streams, () =>
327
- drain(seedCodec.lifecycle(seedCodec.parseLines(LINES))),
323
+ drain(new fix.MarketMessages(seedOptions).fromLines(LINES).intoLifecycle()),
328
324
  )
329
325
  benchmarkStreams(`fix/lifecycle_arrow_reader/${LINES.length}`, streams, () =>
330
- seedCodec.lifecycleArrowReader(BatchReader.fromIpc(parsedIpc)).intoTable().numRows,
326
+ new fix.MarketMessages(seedOptions).fromArrowReader(BatchReader.fromIpc(parsedIpc)).intoLifecycle().intoArrowReader().intoTable().numRows,
331
327
  )
332
328
  benchmarkStreams(`fix/messages_drain/${LINES.length}`, streams, () =>
333
- drain(seedCodec.messages(BatchReader.fromIpc(parsedIpc))),
329
+ drain(new fix.MarketMessages(seedOptions).fromArrowReader(BatchReader.fromIpc(parsedIpc))),
334
330
  )
335
331
  benchmarkStreams(`fix/arrow_reader_over_parse_lines/${LINES.length}`, streams, () =>
336
- seedCodec.arrowReader(fixedSchema, seedCodec.parseLines(LINES)).intoTable().numRows,
332
+ new fix.MarketMessages(seedOptions).fromLines(LINES).intoArrowReader(fixedSchema).intoTable().numRows,
337
333
  )
338
334
  benchmarkStreams(`fix/write_arrow_reader/${LINES.length}`, streams, () =>
339
- seedCodec.writeArrowReader(BatchReader.fromIpc(parsedIpc), sink),
335
+ new fix.MarketMessages(seedOptions).fromArrowReader(BatchReader.fromIpc(parsedIpc)).intoWriter(sink),
340
336
  )
341
337
  benchmarkLoad('fix/from_handle_seed', () => fix.FixRegistry.fromHandle(SEED))
342
338
  benchmarkLoad(`fix/from_handle_${WIDE_FIELDS}_fields`, () =>
package/binding.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export {
2
2
  ai,
3
+ distance,
3
4
  Arn,
4
5
  BatchReader,
5
6
  CellRange,
@@ -65,6 +66,9 @@ export {
65
66
  type FixDirection,
66
67
  type FixEntryView,
67
68
  type FixHeaderView,
69
+ type FixReport,
70
+ type FixReportParameter,
71
+ type FixRule,
68
72
  type FixSourceOptions,
69
73
  type FixSourceView,
70
74
  type HttpContentRange,
@@ -108,6 +112,8 @@ import type {
108
112
  Field,
109
113
  FieldPath,
110
114
  Filter,
115
+ FixReport,
116
+ FixRule,
111
117
  IOBase,
112
118
  IOCursor,
113
119
  IOResult,
@@ -174,9 +180,9 @@ import {
174
180
  Compaction,
175
181
  DataFile,
176
182
  MarketMessage,
177
- FixCodec,
183
+ MarketMessagesOptions,
178
184
  FixRegistry,
179
- FixMessages,
185
+ MarketMessages,
180
186
  MsgType,
181
187
  Underlyings,
182
188
  IcebergOptions,
@@ -324,9 +330,9 @@ export type {
324
330
  Compaction,
325
331
  DataFile,
326
332
  MarketMessage,
327
- FixCodec,
333
+ MarketMessagesOptions,
328
334
  FixRegistry,
329
- FixMessages,
335
+ MarketMessages,
330
336
  MsgType,
331
337
  Underlyings,
332
338
  IcebergOptions,
@@ -850,6 +856,12 @@ declare module './index' {
850
856
  interface Plan extends ArrowAppliers, RecordAppliers {
851
857
  /** Return the structural document for JavaScript JSON serialization. */
852
858
  toJSON(): unknown
859
+ /**
860
+ * This plan with every parameter it names - in every section and every
861
+ * plan it holds - replaced by the value the record holds for it; the
862
+ * record names exactly the plan's parameters, ASCII case-insensitively.
863
+ */
864
+ bind(parameters?: Readonly<Record<string, unknown>> | Scalar | null): Plan
853
865
  }
854
866
 
855
867
  interface Expression extends ArrowAppliers, RecordAppliers {
@@ -890,6 +902,11 @@ declare module './index' {
890
902
  * order, then the components and the groups.
891
903
  */
892
904
  [Symbol.iterator](): Generator<Field>
905
+ /**
906
+ * The plugin dictionary's rows: one `Serie` under `fixPluginField()`,
907
+ * in id order - what a store keeps as `plugins.json`. A copy.
908
+ */
909
+ plugins(): Serie
893
910
  }
894
911
 
895
912
  interface MarketMessage {
@@ -897,54 +914,49 @@ declare module './index' {
897
914
  [Symbol.iterator](): IterableIterator<FixEntryView>
898
915
  }
899
916
 
900
- interface FixMessages extends IterableIterator<MarketMessage> {
917
+ interface MarketMessages extends IterableIterator<MarketMessage> {
901
918
  next(): IteratorResult<MarketMessage>
902
- }
903
- interface FixCodec {
904
919
  /**
905
- * A stream of captured lines, pulled one line at a time as the stream is
906
- * read; each line is read as `parseLine` reads it.
920
+ * The messages a stream of captured lines states, pulled one line at a
921
+ * time as the stream is read: each line's format sniffed and its
922
+ * messages split and placed. A line that is not a row at all is passed
923
+ * over with a warning; a failure of the iterable ends the stream after
924
+ * the messages before it, and `next` throws it as itself.
907
925
  */
908
- parseLines(lines: Iterable<string | ArrayBufferLike | ArrayBufferView>): FixMessages
909
- /** A stream of lines, pulled one at a time; each as `parseTextLine` reads it. */
910
- parseTextLines(lines: Iterable<TextLine>): FixMessages
926
+ fromLines(lines: Iterable<string | ArrayBufferLike | ArrayBufferView>): MarketMessages
927
+ /** A stream of decoded lines, pulled one at a time; each as `MarketMessage.fromTextLine` reads it. */
928
+ fromTextLines(lines: Iterable<TextLine>): MarketMessages
929
+ /** The messages in hand, pulled one at a time. */
930
+ fromItems(messages: Iterable<MarketMessage>): MarketMessages
911
931
  /**
912
- * The one walk over a whole stream of messages, lazily: sorted by
913
- * instant, every message but a batch container and the session
914
- * administration walked as the statement after the version its chain -
915
- * its market data kind and cross hash code - holds, through
916
- * `withPrevious` (its `prevuuid`, `prevtransunix` and `prevstate`), and
917
- * yielded only where its content code or state moved; a copy folds into
918
- * the held version by content code. The capture is collected and sorted
919
- * whole, unless `sortedLifecycle` states it arrives in instant order:
920
- * then it is read as it comes, one epoch hour held at a time.
932
+ * The messages a stream of batches of rows holds, each row one message
933
+ * rebuilt with no line parsed again, under `field`, else the reader's
934
+ * own root. The source is whatever `BatchReader.from` accepts.
921
935
  */
922
- lifecycle(messages: Iterable<MarketMessage>): FixMessages
936
+ fromArrowReader(source: BatchSource, field?: FieldLike | null): MarketMessages
937
+ /** A stream of batches of capture rows, each row read as a line, its own columns carried. */
938
+ fromTextArrowReader(source: BatchSource): MarketMessages
939
+ /** The stream as batches of rows under `field`, else under its own root. */
940
+ intoArrowReader(field?: FieldLike | null): BatchReader
941
+ /** The stream's messages as rows, a `Serie` read lazily, under `field`, else its own root. */
942
+ intoSerie(field?: FieldLike | null): Serie
943
+ }
944
+
945
+ interface Underlyings {
923
946
  /**
924
- * A stream of messages as batches of FIX rows under `schema`, closed on
925
- * the codec's `batchRowSize` rows or its `batchByteSize` laid bytes,
926
- * whichever a batch reaches first.
947
+ * Every row the table holds now, in code order: the seed's and every
948
+ * row a parse given the table filled or created, under
949
+ * `fixUnderlyingField()`.
927
950
  */
928
- arrowReader(schema: Field, messages: Iterable<MarketMessage>): BatchReader
951
+ rows(): Serie
929
952
  /**
930
- * A stream of messages as the rows one message field holds them.
931
- *
932
- * The third verb, and the one a consumer reads by: `parse*` turns a
933
- * capture into messages, `lifecycle` states what each follows, and this
934
- * answers them under whatever field a consumer reads by - a venue's own
935
- * message type, `MarketMessage.field()`, the message row, or any Struct
936
- * root a caller built. Each column binds as a
937
- * lookup binds its name, so a column the message does not state is
938
- * null, and a message leaving a column that cannot be null empty is
939
- * passed over with a warning.
953
+ * The one message search: `text` read against this table, the plugins
954
+ * of `options.registry` where one is given and the root `field` - any
955
+ * `FieldLike` - into one plan over the message rows, the window
956
+ * `[since, until)` on `markettimestamp` at the top, newest first; `null` for
957
+ * a blank text.
940
958
  */
941
- formatMessages(messages: Iterable<MarketMessage>, field: Field): Scalar[]
942
- /** The batch twins take whatever `BatchReader.from` accepts. */
943
- parseTextArrowReader(source: BatchSource): BatchReader
944
- lifecycleArrowReader(source: BatchSource): BatchReader
945
- formatArrowReader(source: BatchSource, field: Field): BatchReader
946
- messages(source: BatchSource): FixMessages
947
- writeArrowReader(source: BatchSource, sink: { write(chunk: Uint8Array): unknown }): number
959
+ messageSearch(text: string, field: FieldLike, options?: MessageSearchOptions): Plan | null
948
960
  }
949
961
 
950
962
  interface Field {
@@ -3805,24 +3817,24 @@ export declare const enums: {
3805
3817
  /**
3806
3818
  * The six element column names every generated schema opens with, in
3807
3819
  * schema order: `uuid`, `crossuuid`, `crosscode`, `hashcode`,
3808
- * `crosshashcode`, `srcuuids`.
3820
+ * `crosshashcode`, `sourceuuids`.
3809
3821
  */
3810
3822
  readonly elementColumns: readonly string[]
3811
3823
  /**
3812
3824
  * The ten event column names that follow them, in schema order:
3813
- * `transunix`, `creaunix`, `techunix`, `exprunix`, `prevtransunix`,
3814
- * `snapunix`, `seqnum`, `prevuuid`, `state`, `prevstate`.
3825
+ * `markettimestamp`, `creationtimestamp`, `technicaltimestamp`, `expirytimestamp`, `previousmarkettimestamp`,
3826
+ * `snapshottimestamp`, `sequencenumber`, `previousuuid`, `state`, `previousstate`.
3815
3827
  */
3816
3828
  readonly eventColumns: readonly string[]
3817
3829
  /**
3818
3830
  * The forty-two market column names, in schema order:
3819
- * `marketdatakind`, `marketdatatype`, `ack`, `conversationid`,
3820
- * `securityids`, `cficode`, `mic`, `undcode`, `undcat`, `side`, `quantity`,
3821
- * `prevqty`, `displayqty`, `hiddenqty`, `unitofmeasure`, `roundlot`, `currency`,
3822
- * `origccy`, `price`, `prevpx`, `stoppx`, `strikeprice`, `execunix`,
3831
+ * `marketdatakind`, `marketdatatype`, `acknowledgement`, `conversationid`,
3832
+ * `securityids`, `cficode`, `mic`, `underlyingcode`, `underlyingcategory`, `side`, `quantity`,
3833
+ * `previousquantity`, `displayqty`, `hiddenqty`, `unitofmeasure`, `roundlot`, `currency`,
3834
+ * `origincurrency`, `price`, `previousprice`, `stoppx`, `strikeprice`, `lastexecutiontimestamp`,
3823
3835
  * `lastpx`, `lastqty`, `avgpx`, `cumqty`, `leavesqty`, `cxlqty`,
3824
- * `lastspotrate`, `lastforwardpoints`, `bidpx`, `bidsize`, `bidccy`, `offerpx`,
3825
- * `offersize`, `offerccy`, `bidspotrate`, `bidforwardpoints`, `offerspotrate`,
3836
+ * `lastspotrate`, `lastforwardpoints`, `bidpx`, `bidsize`, `bidcurrency`, `offerpx`,
3837
+ * `offersize`, `offercurrency`, `bidspotrate`, `bidforwardpoints`, `offerspotrate`,
3826
3838
  * `offerforwardpoints`, `targetfxrates`.
3827
3839
  */
3828
3840
  readonly marketColumns: readonly string[]
@@ -4516,10 +4528,19 @@ declare module './index' {
4516
4528
  streamBytes(batchSize?: number | null): ByteIterator
4517
4529
  }
4518
4530
 
4519
- /** Iterating a reader yields one Apache Arrow JS record batch at a time. */
4520
- interface BatchReader extends Iterable<ArrowRecordBatch> {
4531
+ /**
4532
+ * Iterating a reader yields one Apache Arrow JS record batch at a time:
4533
+ * `for...of` pulls each on the calling thread, `for await` on the libuv
4534
+ * pool - one stream, read once by either.
4535
+ */
4536
+ interface BatchReader extends Iterable<ArrowRecordBatch>, AsyncIterable<ArrowRecordBatch> {
4521
4537
  /** Drain every remaining batch into one Apache Arrow JS table. */
4522
4538
  intoTable(): ArrowTable
4539
+ /**
4540
+ * Each batch as its own Arrow IPC stream (schema, batch, end of stream),
4541
+ * pulled on the libuv pool, for a server to forward without decoding.
4542
+ */
4543
+ ipcBatches(): AsyncIterableIterator<Buffer>
4523
4544
  }
4524
4545
  namespace BatchReader {
4525
4546
  /** Build a reader from a reader, an Arrow JS value, or Arrow IPC bytes. */
@@ -5194,9 +5215,42 @@ export type FixValueInput =
5194
5215
  * built by a factory, never by `new`.
5195
5216
  */
5196
5217
  export interface MarketMessageStatic extends Function {
5218
+ /**
5219
+ * The one message a captured line states, its format sniffed, under
5220
+ * `options`, `MarketMessagesOptions.fromEnv()` when none are given. A
5221
+ * line stating no message, and a line carrying a second frame, throws:
5222
+ * `MarketMessages.fromLines` reads a line's every message.
5223
+ */
5224
+ fromLine(
5225
+ row: string | ArrayBufferLike | ArrayBufferView,
5226
+ options?: MarketMessagesOptions | null,
5227
+ ): MarketMessage
5228
+ /**
5229
+ * The one message a line a text reader answered states: its body and its
5230
+ * row-header captures, named by the options' `captureNames`.
5231
+ */
5232
+ fromTextLine(line: TextLine, options?: MarketMessagesOptions | null): MarketMessage
5233
+ /** One numeric FIX frame, read by the pairs it states. */
5234
+ fromFixMessage(
5235
+ body: string | ArrayBufferLike | ArrayBufferView,
5236
+ options?: MarketMessagesOptions | null,
5237
+ ): MarketMessage
5238
+ /** One bridge frame, whose keys are names rather than tags. */
5239
+ fromUllinkLine(
5240
+ body: string | ArrayBufferLike | ArrayBufferView,
5241
+ options?: MarketMessagesOptions | null,
5242
+ ): MarketMessage
5243
+ /** One FIXML message, whose fields are XML attributes. */
5244
+ fromFixmlMessage(
5245
+ body: string | ArrayBufferLike | ArrayBufferView,
5246
+ options?: MarketMessagesOptions | null,
5247
+ ): MarketMessage
5248
+ /** Pairs a caller already holds, in the order they arrived. */
5249
+ fromPairs(pairs: Array<[string, string]>, options?: MarketMessagesOptions | null): MarketMessage
5197
5250
  /**
5198
5251
  * A FIX record - a struct root and its row - read as the parse reads one,
5199
- * under the process default registry when none is named. A child stating
5252
+ * under `options`, `MarketMessagesOptions.fromEnv()` when none are given.
5253
+ * A child stating
5200
5254
  * a typed fact - one of the FIX fields a message lifts, a crate column -
5201
5255
  * fills the fact that owns it and keeps its statement at its place;
5202
5256
  * `SendingTime` reads the Unix epoch when the value states none, and the
@@ -5205,14 +5259,14 @@ export interface MarketMessageStatic extends Function {
5205
5259
  fromFixRecord(
5206
5260
  field: Field,
5207
5261
  value: FixValueInput,
5208
- registry?: FixRegistry | null,
5262
+ options?: MarketMessagesOptions | null,
5209
5263
  ): MarketMessage
5210
5264
  /**
5211
5265
  * The message a row holds: the inverse of `intoRow`, each column bound as
5212
5266
  * a lookup binds its name and the residual `entries` restored without a
5213
5267
  * parse. No clock is read, and a supplied row identity is retained.
5214
5268
  */
5215
- fromRow(schema: Field, row: FixValueInput, registry?: FixRegistry | null): MarketMessage
5269
+ fromRow(schema: Field, row: FixValueInput, options?: MarketMessagesOptions | null): MarketMessage
5216
5270
  /**
5217
5271
  * The one message row, `fixmsg`: the element, event, market, operation,
5218
5272
  * source and session columns, the `trdregtimestamps` and `parties`
@@ -5230,7 +5284,7 @@ export interface Fix {
5230
5284
  * The row header a ULBridge log writes in front of every line, as a
5231
5285
  * `rowheader` for a text read. Its clock is `mtime`, so the header dates
5232
5286
  * each line it matches: the capture is consumed into the line's
5233
- * `transunix` - the `techunix` of its messages and the sending clock of one
5287
+ * `markettimestamp` - the `technicaltimestamp` of its messages and the sending clock of one
5234
5288
  * stating no `SendingTime(52)` - read at nanoseconds UTC under the text
5235
5289
  * options' `timezone`, never the file's modification time. The other
5236
5290
  * captures are `msgthreadid`, `msgeventkey` - the bracket's session,
@@ -5261,18 +5315,24 @@ export interface Fix {
5261
5315
  */
5262
5316
  readonly MarketMessage: MarketMessageStatic
5263
5317
  /**
5264
- * One dictionary, reading captured lines into settled messages, walking
5265
- * them through one lifecycle, and the Arrow twin of each - a pin is on the
5266
- * codec, a stage is a call.
5318
+ * The options a message stream reads under: one dictionary and every pin
5319
+ * a parse, a walk and a sink read. They hold no stream.
5267
5320
  */
5268
- readonly FixCodec: typeof FixCodec
5321
+ readonly MarketMessagesOptions: typeof MarketMessagesOptions
5269
5322
  /**
5270
5323
  * Immutable registry-owned message definitions; `identifierValues` returns
5271
5324
  * independent mutable declaration Fields beside native Scalar values.
5272
5325
  */
5273
5326
  readonly MsgType: abstract new () => MsgType
5274
- /** A lazy stream of messages: what every stage of `FixCodec` answers. */
5275
- readonly FixMessages: abstract new () => FixMessages
5327
+ /**
5328
+ * The handler over a stream of messages: `new MarketMessages(options?)`
5329
+ * is idle; a source (`fromLines`, `fromTextLines`, `fromItems`,
5330
+ * `fromArrowReader`, `fromTextArrowReader`) answers a new handler over its
5331
+ * stream, a stage (`intoLifecycle`, `intoLineage`) the handler over what
5332
+ * it makes of it, and a sink (`intoArrowReader`, `intoSerie`,
5333
+ * `intoWriter`) drains it.
5334
+ */
5335
+ readonly MarketMessages: typeof MarketMessages
5276
5336
  /**
5277
5337
  * The table of underlyings, its essential doors: `Underlyings.seeded()`,
5278
5338
  * `get(code)` - a code, an instrument key, an index key `{key}={value}` or
@@ -5281,8 +5341,9 @@ export interface Fix {
5281
5341
  * each once: the exact code, an identifier the key index answers (an ISIN,
5282
5342
  * a FIGI, a RIC, a Bloomberg code, `{ticker}@{MIC}`, `{MIC}:{ticker}`, a
5283
5343
  * currency pair in any spelling), then a ticker, a name or an alias,
5284
- * exact, prefix, substring - as a `Serie` under `underlyingField()`, and
5285
- * `length`.
5344
+ * exact, prefix, substring - as a `Serie` under `underlyingField()`,
5345
+ * `messageSearch(text, field, { registry, limit = 20, since, until })` -
5346
+ * the one plan over message rows a text names - and `length`.
5286
5347
  */
5287
5348
  readonly Underlyings: { seeded(): Underlyings; readonly prototype: Underlyings }
5288
5349
  /**
@@ -5300,8 +5361,8 @@ export interface Fix {
5300
5361
  crateFields(): Field[]
5301
5362
  /**
5302
5363
  * The row an `Underlyings` table stores, `underlying`: one instrument on
5303
- * one market or across every market, partitioned by `partunix` and sorted
5304
- * by `code`.
5364
+ * one market or across every market, partitioned by `months(endtimestamp)` - no
5365
+ * column of its own, a row with no end in the null partition - and sorted by `code`.
5305
5366
  */
5306
5367
  underlyingField(): Field
5307
5368
  /**
@@ -5314,10 +5375,27 @@ export interface Fix {
5314
5375
  micEntryField(): Field
5315
5376
  /** The row of GLEIF's register, `legalentity`: one LEI's Level 1 record with its parents, partitioned by `country`. */
5316
5377
  legalEntityField(): Field
5317
- /** The row a rate table stores, `fxrate`: the element and event columns, `buy`, `sell`, `rate` and `partunix`. */
5378
+ /** The row a rate table stores, `fxrate`: the element and event columns, `buy`, `sell` and `rate`, partitioned by `months(markettimestamp)`. */
5318
5379
  fxRateField(): Field
5319
5380
  /** The row of the plugin dictionary, `plugin`: one plugin a bridge logs through, its `side` the side kind's code. */
5320
5381
  pluginField(): Field
5382
+ /**
5383
+ * Every audit report `yggio_market::reports` lists, in the order a page
5384
+ * lists them - `otr`, `cancels`, `rate`, `concentration`, `execution`,
5385
+ * `completeness`, `trail` - each a fresh plain object: its `name`,
5386
+ * `title`, `description`, the `plan` naming no location, which the
5387
+ * engine opens over the table it is asked of, and the `parameters` it
5388
+ * binds, each `default` absent where the caller states the value.
5389
+ */
5390
+ reports(): FixReport[]
5391
+ /**
5392
+ * Every rule the crate applies to a FIX message, in the order
5393
+ * `yggio_market::fix::rules` lists them, each a fresh plain object: its
5394
+ * `id`, `class`, `authority` (`spec` or `crate`) and the `reference` it
5395
+ * names, the `sources` it reads and `targets` it fills as tags, and an
5396
+ * `example` FIX line, `""` where none is kept.
5397
+ */
5398
+ rules(): FixRule[]
5321
5399
  }
5322
5400
 
5323
5401
  export declare const fix: Fix