@forgezero/runtime 0.1.12 → 0.1.14
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/README.md +47 -759
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ The machinery behind a request handler — jobs, queues, an outbox, a hash-chain
|
|
|
11
11
|
|
|
12
12
|
## Package overview
|
|
13
13
|
|
|
14
|
-
Anyone running a service, for the work that happens outside a request. Separate from `access` because a Cloudflare Worker wants the request pipeline and cannot run a backup job. Supported runtimes: bun, node. Package root: @forgezero/runtime.
|
|
14
|
+
Anyone running a service, for the work that happens outside a request. Separate from `access` because a Cloudflare Worker wants the request pipeline and cannot run a backup job. Supported runtimes: bun, node. Package root: @forgezero/runtime. Consumer documentation is curated with each module's explicit public flag; the complete internal/export inventory remains in the typed SSOT and declaration files.
|
|
15
15
|
|
|
16
16
|
```text
|
|
17
17
|
bun add @forgezero/runtime
|
|
@@ -29,9 +29,9 @@ The five packages are installation boundaries. Choose a package by who installs
|
|
|
29
29
|
| @forgezero/runtime | Portable runtime primitives for queries, jobs, events, schemas and finance. | bun, node | [Open](https://www.forgezero.net/docs/runtime) |
|
|
30
30
|
| @forgezero/agent | Operator CLI and managed-node agent for bootstrap, deploy and lifecycle. | bun, node | [Open](https://www.forgezero.net/docs/agent) |
|
|
31
31
|
|
|
32
|
-
## @forgezero/runtime
|
|
32
|
+
## @forgezero/runtime supported imports and commands
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
These are supported consumer entry points, not every internal module shipped for ForgeZero managed installation. Each row links to its task-oriented usage.
|
|
35
35
|
|
|
36
36
|
| public entry | short description | runtime | details |
|
|
37
37
|
|---|---|---|---|
|
|
@@ -91,24 +91,11 @@ bun add @forgezero/runtime
|
|
|
91
91
|
<a id="forgezero-runtime-query"></a>
|
|
92
92
|
## @forgezero/runtime/query
|
|
93
93
|
|
|
94
|
-
Provider-neutral typed function contracts: decode untrusted input, run with caller-supplied services or storage, and strictly validate the result without coupling business logic to ForgeZero or ArangoDB. This
|
|
94
|
+
Provider-neutral typed function contracts: decode untrusted input, run with caller-supplied services or storage, and strictly validate the result without coupling business logic to ForgeZero or ArangoDB. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
95
95
|
|
|
96
96
|
```text
|
|
97
97
|
import {
|
|
98
98
|
QueryContractError,
|
|
99
|
-
defineQuery,
|
|
100
|
-
implementQuery,
|
|
101
|
-
} from '@forgezero/runtime/query';
|
|
102
|
-
|
|
103
|
-
import type {
|
|
104
|
-
QueryCodec,
|
|
105
|
-
QueryContract,
|
|
106
|
-
QueryDecode,
|
|
107
|
-
QueryExecution,
|
|
108
|
-
QueryImplementation,
|
|
109
|
-
QueryInput,
|
|
110
|
-
QueryIssue,
|
|
111
|
-
QueryOutput,
|
|
112
99
|
} from '@forgezero/runtime/query';
|
|
113
100
|
```
|
|
114
101
|
|
|
@@ -148,39 +135,11 @@ const order = await runFindOrder.execute(stores, { orderKey: 'ord_123' });
|
|
|
148
135
|
<a id="forgezero-runtime-jobs"></a>
|
|
149
136
|
## @forgezero/runtime/jobs
|
|
150
137
|
|
|
151
|
-
Background work that never overlaps itself, advances a cursor only on success, and can be paused and inspected. This
|
|
138
|
+
Background work that never overlaps itself, advances a cursor only on success, and can be paused and inspected. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
152
139
|
|
|
153
140
|
```text
|
|
154
141
|
import {
|
|
155
142
|
JobFenceLostError,
|
|
156
|
-
VERSION,
|
|
157
|
-
createScheduler,
|
|
158
|
-
cursorJob,
|
|
159
|
-
defineJob,
|
|
160
|
-
everyMs,
|
|
161
|
-
forEachFenced,
|
|
162
|
-
memoryLock,
|
|
163
|
-
nextWallClockAt,
|
|
164
|
-
storeLock,
|
|
165
|
-
systemClock,
|
|
166
|
-
withJobFence,
|
|
167
|
-
} from '@forgezero/runtime/jobs';
|
|
168
|
-
|
|
169
|
-
import type {
|
|
170
|
-
Clock,
|
|
171
|
-
CursorBatch,
|
|
172
|
-
CursorJobSpec,
|
|
173
|
-
CursorStore,
|
|
174
|
-
JobContext,
|
|
175
|
-
JobLock,
|
|
176
|
-
JobReport,
|
|
177
|
-
JobResult,
|
|
178
|
-
JobSpec,
|
|
179
|
-
Lease,
|
|
180
|
-
LockStore,
|
|
181
|
-
Scheduler,
|
|
182
|
-
SchedulerOptions,
|
|
183
|
-
WallClockSchedule,
|
|
184
143
|
} from '@forgezero/runtime/jobs';
|
|
185
144
|
```
|
|
186
145
|
|
|
@@ -199,24 +158,11 @@ export const selectedCapability = JobFenceLostError;
|
|
|
199
158
|
<a id="forgezero-runtime-queue"></a>
|
|
200
159
|
## @forgezero/runtime/queue
|
|
201
160
|
|
|
202
|
-
Memory-only keyed work queue — awaited results, parallel across keys and strictly sequential within one; clustered callers atomically claim ownership in their own business store before submitting. This
|
|
161
|
+
Memory-only keyed work queue — awaited results, parallel across keys and strictly sequential within one; clustered callers atomically claim ownership in their own business store before submitting. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
203
162
|
|
|
204
163
|
```text
|
|
205
164
|
import {
|
|
206
165
|
QueueKeyStoppedError,
|
|
207
|
-
QueueStoppedError,
|
|
208
|
-
TaskCancelledError,
|
|
209
|
-
createQueue,
|
|
210
|
-
queueWidthFor,
|
|
211
|
-
} from '@forgezero/runtime/queue';
|
|
212
|
-
|
|
213
|
-
import type {
|
|
214
|
-
DrainReport,
|
|
215
|
-
Queue,
|
|
216
|
-
QueueOptions,
|
|
217
|
-
QueueResourcePolicy,
|
|
218
|
-
QueueTask,
|
|
219
|
-
RetryPolicy,
|
|
220
166
|
} from '@forgezero/runtime/queue';
|
|
221
167
|
```
|
|
222
168
|
|
|
@@ -235,31 +181,11 @@ export const selectedCapability = QueueKeyStoppedError;
|
|
|
235
181
|
<a id="forgezero-runtime-outbox"></a>
|
|
236
182
|
## @forgezero/runtime/outbox
|
|
237
183
|
|
|
238
|
-
Write the event with the record, deliver it after, in order per key with backoff and a dead-letter queue. This
|
|
184
|
+
Write the event with the record, deliver it after, in order per key with backoff and a dead-letter queue. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
239
185
|
|
|
240
186
|
```text
|
|
241
187
|
import {
|
|
242
188
|
DEFAULT_POLICY,
|
|
243
|
-
EVENT_STATES,
|
|
244
|
-
OutboxError,
|
|
245
|
-
VERSION,
|
|
246
|
-
backoffMs,
|
|
247
|
-
createOutbox,
|
|
248
|
-
memoryStore,
|
|
249
|
-
outboxJob,
|
|
250
|
-
} from '@forgezero/runtime/outbox';
|
|
251
|
-
|
|
252
|
-
import type {
|
|
253
|
-
DeliveryPolicy,
|
|
254
|
-
DeliveryResult,
|
|
255
|
-
DrainReport,
|
|
256
|
-
EventState,
|
|
257
|
-
Outbox,
|
|
258
|
-
OutboxEvent,
|
|
259
|
-
OutboxOptions,
|
|
260
|
-
OutboxStore,
|
|
261
|
-
PublishInput,
|
|
262
|
-
Transport,
|
|
263
189
|
} from '@forgezero/runtime/outbox';
|
|
264
190
|
```
|
|
265
191
|
|
|
@@ -278,37 +204,11 @@ export const selectedCapability = DEFAULT_POLICY;
|
|
|
278
204
|
<a id="forgezero-runtime-audit"></a>
|
|
279
205
|
## @forgezero/runtime/audit
|
|
280
206
|
|
|
281
|
-
Append-only records chained by hash, with a verifier that names the first altered entry. This
|
|
207
|
+
Append-only records chained by hash, with a verifier that names the first altered entry. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
282
208
|
|
|
283
209
|
```text
|
|
284
210
|
import {
|
|
285
211
|
AuditChainError,
|
|
286
|
-
GENESIS_DIGEST,
|
|
287
|
-
VERSION,
|
|
288
|
-
appendRecord,
|
|
289
|
-
canonicalise,
|
|
290
|
-
createAuditChain,
|
|
291
|
-
exportRange,
|
|
292
|
-
hashDigester,
|
|
293
|
-
memoryStore,
|
|
294
|
-
sealedDigester,
|
|
295
|
-
verifyChain,
|
|
296
|
-
verifyExport,
|
|
297
|
-
} from '@forgezero/runtime/audit';
|
|
298
|
-
|
|
299
|
-
import type {
|
|
300
|
-
AppendOptions,
|
|
301
|
-
AuditChain,
|
|
302
|
-
AuditChainOptions,
|
|
303
|
-
AuditDigesterResolver,
|
|
304
|
-
AuditEntry,
|
|
305
|
-
AuditExport,
|
|
306
|
-
AuditRecord,
|
|
307
|
-
AuditStore,
|
|
308
|
-
AuditVerifyOptions,
|
|
309
|
-
ChainVerdict,
|
|
310
|
-
Digester,
|
|
311
|
-
EffectAuditRecord,
|
|
312
212
|
} from '@forgezero/runtime/audit';
|
|
313
213
|
```
|
|
314
214
|
|
|
@@ -327,34 +227,11 @@ export const selectedCapability = AuditChainError;
|
|
|
327
227
|
<a id="forgezero-runtime-backup"></a>
|
|
328
228
|
## @forgezero/runtime/backup
|
|
329
229
|
|
|
330
|
-
Encrypted, chunked, verified snapshots to object storage — and the restore that reads them back. This
|
|
230
|
+
Encrypted, chunked, verified snapshots to object storage — and the restore that reads them back. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
331
231
|
|
|
332
232
|
```text
|
|
333
233
|
import {
|
|
334
234
|
BackupError,
|
|
335
|
-
DEFAULT_RETENTION,
|
|
336
|
-
SNAPSHOT_FORMAT,
|
|
337
|
-
VERSION,
|
|
338
|
-
backupJob,
|
|
339
|
-
listSnapshots,
|
|
340
|
-
prune,
|
|
341
|
-
restore,
|
|
342
|
-
selectForDeletion,
|
|
343
|
-
snapshot,
|
|
344
|
-
verifySnapshot,
|
|
345
|
-
} from '@forgezero/runtime/backup';
|
|
346
|
-
|
|
347
|
-
import type {
|
|
348
|
-
ChunkRecord,
|
|
349
|
-
ObjectStore,
|
|
350
|
-
RestoreOptions,
|
|
351
|
-
RestoreReport,
|
|
352
|
-
RetentionPolicy,
|
|
353
|
-
RowSink,
|
|
354
|
-
RowSource,
|
|
355
|
-
SnapshotManifest,
|
|
356
|
-
SnapshotOptions,
|
|
357
|
-
VerifyReport,
|
|
358
235
|
} from '@forgezero/runtime/backup';
|
|
359
236
|
```
|
|
360
237
|
|
|
@@ -373,32 +250,11 @@ export const selectedCapability = BackupError;
|
|
|
373
250
|
<a id="forgezero-runtime-notify"></a>
|
|
374
251
|
## @forgezero/runtime/notify
|
|
375
252
|
|
|
376
|
-
Render a named template to text and HTML, escaped per part, refusing to send with a blank where a value should be. This
|
|
253
|
+
Render a named template to text and HTML, escaped per part, refusing to send with a blank where a value should be. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
377
254
|
|
|
378
255
|
```text
|
|
379
256
|
import {
|
|
380
257
|
CHANNELS,
|
|
381
|
-
NotifyError,
|
|
382
|
-
VERSION,
|
|
383
|
-
assertHeaderSafe,
|
|
384
|
-
button,
|
|
385
|
-
codeBlock,
|
|
386
|
-
createNotifier,
|
|
387
|
-
defineTemplate,
|
|
388
|
-
escapeHtml,
|
|
389
|
-
layout,
|
|
390
|
-
preview,
|
|
391
|
-
render,
|
|
392
|
-
} from '@forgezero/runtime/notify';
|
|
393
|
-
|
|
394
|
-
import type {
|
|
395
|
-
Channel,
|
|
396
|
-
Notification,
|
|
397
|
-
Notifier,
|
|
398
|
-
NotifierOptions,
|
|
399
|
-
Rendered,
|
|
400
|
-
TemplateSpec,
|
|
401
|
-
Transport,
|
|
402
258
|
} from '@forgezero/runtime/notify';
|
|
403
259
|
```
|
|
404
260
|
|
|
@@ -417,22 +273,11 @@ export const selectedCapability = CHANNELS;
|
|
|
417
273
|
<a id="forgezero-runtime-notify-templates"></a>
|
|
418
274
|
## @forgezero/runtime/notify/templates
|
|
419
275
|
|
|
420
|
-
The six transactional messages ForgeZero sends. This
|
|
276
|
+
The six transactional messages ForgeZero sends. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
421
277
|
|
|
422
278
|
```text
|
|
423
279
|
import {
|
|
424
280
|
TEMPLATES,
|
|
425
|
-
ceremonyProposed,
|
|
426
|
-
custodianEnrolment,
|
|
427
|
-
escapeHtml,
|
|
428
|
-
invitation,
|
|
429
|
-
newDevice,
|
|
430
|
-
signInCode,
|
|
431
|
-
vaultLocked,
|
|
432
|
-
} from '@forgezero/runtime/notify/templates';
|
|
433
|
-
|
|
434
|
-
import type {
|
|
435
|
-
TemplateKey,
|
|
436
281
|
} from '@forgezero/runtime/notify/templates';
|
|
437
282
|
```
|
|
438
283
|
|
|
@@ -451,32 +296,11 @@ export const selectedCapability = TEMPLATES;
|
|
|
451
296
|
<a id="forgezero-runtime-calendar"></a>
|
|
452
297
|
## @forgezero/runtime/calendar
|
|
453
298
|
|
|
454
|
-
Billing periods computed from an anchor, working days, holidays and due dates. This
|
|
299
|
+
Billing periods computed from an anchor, working days, holidays and due dates. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
455
300
|
|
|
456
301
|
```text
|
|
457
302
|
import {
|
|
458
303
|
CalendarError,
|
|
459
|
-
DAY_MS,
|
|
460
|
-
DEFAULT_WORKING_DAYS,
|
|
461
|
-
closedPeriods,
|
|
462
|
-
dayOfWeek,
|
|
463
|
-
daysOverdue,
|
|
464
|
-
fromDay,
|
|
465
|
-
isOverdue,
|
|
466
|
-
isWorkingDay,
|
|
467
|
-
nextWorkingDay,
|
|
468
|
-
periodAt,
|
|
469
|
-
periodIndexOn,
|
|
470
|
-
periodOn,
|
|
471
|
-
toDay,
|
|
472
|
-
workingDaysBetween,
|
|
473
|
-
} from '@forgezero/runtime/calendar';
|
|
474
|
-
|
|
475
|
-
import type {
|
|
476
|
-
BillingSchedule,
|
|
477
|
-
Calendar,
|
|
478
|
-
IsoDate,
|
|
479
|
-
Period,
|
|
480
304
|
} from '@forgezero/runtime/calendar';
|
|
481
305
|
```
|
|
482
306
|
|
|
@@ -495,34 +319,11 @@ export const selectedCapability = CalendarError;
|
|
|
495
319
|
<a id="forgezero-runtime-compliance"></a>
|
|
496
320
|
## @forgezero/runtime/compliance
|
|
497
321
|
|
|
498
|
-
Screening as a decision record — tiers, rules and lists, failing closed when a list is unreachable. This
|
|
322
|
+
Screening as a decision record — tiers, rules and lists, failing closed when a list is unreachable. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
499
323
|
|
|
500
324
|
```text
|
|
501
325
|
import {
|
|
502
326
|
ComplianceError,
|
|
503
|
-
RISK_LEVELS,
|
|
504
|
-
VERIFICATION_TIERS,
|
|
505
|
-
combineLists,
|
|
506
|
-
countryRule,
|
|
507
|
-
newCounterpartyRule,
|
|
508
|
-
screen,
|
|
509
|
-
screeningStage,
|
|
510
|
-
staticList,
|
|
511
|
-
tierLimitRule,
|
|
512
|
-
unavailableList,
|
|
513
|
-
} from '@forgezero/runtime/compliance';
|
|
514
|
-
|
|
515
|
-
import type {
|
|
516
|
-
ListEntry,
|
|
517
|
-
RiskLevel,
|
|
518
|
-
Rule,
|
|
519
|
-
RuleHit,
|
|
520
|
-
ScreenOptions,
|
|
521
|
-
ScreeningList,
|
|
522
|
-
StageOptions,
|
|
523
|
-
Subject,
|
|
524
|
-
Verdict,
|
|
525
|
-
VerificationTier,
|
|
526
327
|
} from '@forgezero/runtime/compliance';
|
|
527
328
|
```
|
|
528
329
|
|
|
@@ -541,29 +342,11 @@ export const selectedCapability = ComplianceError;
|
|
|
541
342
|
<a id="forgezero-runtime-totp"></a>
|
|
542
343
|
## @forgezero/runtime/totp
|
|
543
344
|
|
|
544
|
-
RFC 6238 TOTP on the existing HMAC — base32, an asymmetric window, and replay left to the caller. This
|
|
345
|
+
RFC 6238 TOTP on the existing HMAC — base32, an asymmetric window, and replay left to the caller. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
545
346
|
|
|
546
347
|
```text
|
|
547
348
|
import {
|
|
548
349
|
DEFAULT_DIGITS,
|
|
549
|
-
DEFAULT_STEP_SECONDS,
|
|
550
|
-
TotpError,
|
|
551
|
-
assertCode,
|
|
552
|
-
codeAt,
|
|
553
|
-
codeFor,
|
|
554
|
-
counterAt,
|
|
555
|
-
enrolmentUri,
|
|
556
|
-
fromBase32,
|
|
557
|
-
generateSecret,
|
|
558
|
-
secondsRemaining,
|
|
559
|
-
toBase32,
|
|
560
|
-
verifyCode,
|
|
561
|
-
} from '@forgezero/runtime/totp';
|
|
562
|
-
|
|
563
|
-
import type {
|
|
564
|
-
TotpOptions,
|
|
565
|
-
VerifyOptions,
|
|
566
|
-
VerifyResult,
|
|
567
350
|
} from '@forgezero/runtime/totp';
|
|
568
351
|
```
|
|
569
352
|
|
|
@@ -582,27 +365,11 @@ export const selectedCapability = DEFAULT_DIGITS;
|
|
|
582
365
|
<a id="forgezero-runtime-passkey"></a>
|
|
583
366
|
## @forgezero/runtime/passkey
|
|
584
367
|
|
|
585
|
-
Passkeys for sites that are not us. A vault-held credential is as unphishable as one in a security chip provided the RP ID check never slips — `evil-example.com` ends with `example.com` and is a different site. This
|
|
368
|
+
Passkeys for sites that are not us. A vault-held credential is as unphishable as one in a security chip provided the RP ID check never slips — `evil-example.com` ends with `example.com` and is a different site. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
586
369
|
|
|
587
370
|
```text
|
|
588
371
|
import {
|
|
589
372
|
FLAG_BE,
|
|
590
|
-
FLAG_BS,
|
|
591
|
-
FLAG_UP,
|
|
592
|
-
FLAG_UV,
|
|
593
|
-
PasskeyError,
|
|
594
|
-
assertPasskey,
|
|
595
|
-
authenticatorData,
|
|
596
|
-
credentialIdFor,
|
|
597
|
-
passkeysFor,
|
|
598
|
-
rpIdMatches,
|
|
599
|
-
verifyAssertion,
|
|
600
|
-
} from '@forgezero/runtime/passkey';
|
|
601
|
-
|
|
602
|
-
import type {
|
|
603
|
-
Assertion,
|
|
604
|
-
AssertionRequest,
|
|
605
|
-
StoredPasskey,
|
|
606
373
|
} from '@forgezero/runtime/passkey';
|
|
607
374
|
```
|
|
608
375
|
|
|
@@ -621,17 +388,11 @@ export const selectedCapability = FLAG_BE;
|
|
|
621
388
|
<a id="forgezero-runtime-phrase"></a>
|
|
622
389
|
## @forgezero/runtime/phrase
|
|
623
390
|
|
|
624
|
-
BIP-39 recovery phrases, and the salted verifier that proves one without being able to reconstruct it. This
|
|
391
|
+
BIP-39 recovery phrases, and the salted verifier that proves one without being able to reconstruct it. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
625
392
|
|
|
626
393
|
```text
|
|
627
394
|
import {
|
|
628
395
|
PHRASE_SALT_BYTES,
|
|
629
|
-
PHRASE_WORDS,
|
|
630
|
-
generatePhrase,
|
|
631
|
-
newSalt,
|
|
632
|
-
phraseToKey,
|
|
633
|
-
phraseVerifier,
|
|
634
|
-
validatePhrase,
|
|
635
396
|
} from '@forgezero/runtime/phrase';
|
|
636
397
|
```
|
|
637
398
|
|
|
@@ -650,21 +411,11 @@ export const selectedCapability = PHRASE_SALT_BYTES;
|
|
|
650
411
|
<a id="forgezero-runtime-snp"></a>
|
|
651
412
|
## @forgezero/runtime/snp
|
|
652
413
|
|
|
653
|
-
Parse an AMD SEV-SNP attestation report at the firmware ABI offsets, and compare a TCB component by component so a microcode bump cannot mask a firmware downgrade. This
|
|
414
|
+
Parse an AMD SEV-SNP attestation report at the firmware ABI offsets, and compare a TCB component by component so a microcode bump cannot mask a firmware downgrade. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
654
415
|
|
|
655
416
|
```text
|
|
656
417
|
import {
|
|
657
418
|
REPORT_BYTES,
|
|
658
|
-
SnpError,
|
|
659
|
-
bindsNonce,
|
|
660
|
-
parseSnpReport,
|
|
661
|
-
tcbAtLeast,
|
|
662
|
-
} from '@forgezero/runtime/snp';
|
|
663
|
-
|
|
664
|
-
import type {
|
|
665
|
-
GuestPolicy,
|
|
666
|
-
SnpReport,
|
|
667
|
-
TcbVersion,
|
|
668
419
|
} from '@forgezero/runtime/snp';
|
|
669
420
|
```
|
|
670
421
|
|
|
@@ -683,24 +434,11 @@ export const selectedCapability = REPORT_BYTES;
|
|
|
683
434
|
<a id="forgezero-runtime-importers"></a>
|
|
684
435
|
## @forgezero/runtime/importers
|
|
685
436
|
|
|
686
|
-
Read secrets out of a .env, a CSV, or a Bitwarden or 1Password export — skipping what cannot be understood rather than guessing, and never putting a value in an error. This
|
|
437
|
+
Read secrets out of a .env, a CSV, or a Bitwarden or 1Password export — skipping what cannot be understood rather than guessing, and never putting a value in an error. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
687
438
|
|
|
688
439
|
```text
|
|
689
440
|
import {
|
|
690
441
|
IMPORT_FORMATS,
|
|
691
|
-
normaliseName,
|
|
692
|
-
parseBitwarden,
|
|
693
|
-
parseCsv,
|
|
694
|
-
parseEnv,
|
|
695
|
-
parseImport,
|
|
696
|
-
parseOnePassword,
|
|
697
|
-
} from '@forgezero/runtime/importers';
|
|
698
|
-
|
|
699
|
-
import type {
|
|
700
|
-
ImportFormat,
|
|
701
|
-
ImportResult,
|
|
702
|
-
ImportedSecret,
|
|
703
|
-
Skipped,
|
|
704
442
|
} from '@forgezero/runtime/importers';
|
|
705
443
|
```
|
|
706
444
|
|
|
@@ -719,16 +457,11 @@ export const selectedCapability = IMPORT_FORMATS;
|
|
|
719
457
|
<a id="forgezero-runtime-openssh"></a>
|
|
720
458
|
## @forgezero/runtime/openssh
|
|
721
459
|
|
|
722
|
-
OpenSSH wire encoding, so a derived ed25519 key becomes a line that pastes into authorized_keys. This
|
|
460
|
+
OpenSSH wire encoding, so a derived ed25519 key becomes a line that pastes into authorized_keys. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
723
461
|
|
|
724
462
|
```text
|
|
725
463
|
import {
|
|
726
464
|
OpenSshError,
|
|
727
|
-
authorizedKey,
|
|
728
|
-
fingerprint,
|
|
729
|
-
parseAuthorizedKey,
|
|
730
|
-
publicKeyBlob,
|
|
731
|
-
signatureBlob,
|
|
732
465
|
} from '@forgezero/runtime/openssh';
|
|
733
466
|
```
|
|
734
467
|
|
|
@@ -747,24 +480,11 @@ export const selectedCapability = OpenSshError;
|
|
|
747
480
|
<a id="forgezero-runtime-ssh-cert"></a>
|
|
748
481
|
## @forgezero/runtime/ssh-cert
|
|
749
482
|
|
|
750
|
-
OpenSSH certificates, so access expires instead of having to be hunted down. Takes a signing FUNCTION rather than a secret key, which is what lets the CA live in a vault that never hands it out. This
|
|
483
|
+
OpenSSH certificates, so access expires instead of having to be hunted down. Takes a signing FUNCTION rather than a secret key, which is what lets the CA live in a vault that never hands it out. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
751
484
|
|
|
752
485
|
```text
|
|
753
486
|
import {
|
|
754
487
|
CERT_TYPE_HOST,
|
|
755
|
-
CERT_TYPE_USER,
|
|
756
|
-
DEFAULT_EXTENSIONS,
|
|
757
|
-
SshCertError,
|
|
758
|
-
caFingerprint,
|
|
759
|
-
caFromSecretKey,
|
|
760
|
-
caPublicKeyLine,
|
|
761
|
-
isCurrentlyValid,
|
|
762
|
-
signCertificate,
|
|
763
|
-
} from '@forgezero/runtime/ssh-cert';
|
|
764
|
-
|
|
765
|
-
import type {
|
|
766
|
-
CertificateAuthority,
|
|
767
|
-
CertificateRequest,
|
|
768
488
|
} from '@forgezero/runtime/ssh-cert';
|
|
769
489
|
```
|
|
770
490
|
|
|
@@ -783,19 +503,11 @@ export const selectedCapability = CERT_TYPE_HOST;
|
|
|
783
503
|
<a id="forgezero-runtime-slip10"></a>
|
|
784
504
|
## @forgezero/runtime/slip10
|
|
785
505
|
|
|
786
|
-
SLIP-0010 derivation for ed25519, hardened-only — BIP-32 does not work on this curve and produces halves that do not correspond. This
|
|
506
|
+
SLIP-0010 derivation for ed25519, hardened-only — BIP-32 does not work on this curve and produces halves that do not correspond. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
787
507
|
|
|
788
508
|
```text
|
|
789
509
|
import {
|
|
790
510
|
HARDENED_OFFSET,
|
|
791
|
-
Slip10Error,
|
|
792
|
-
deriveChild,
|
|
793
|
-
derivePath,
|
|
794
|
-
masterFromSeed,
|
|
795
|
-
} from '@forgezero/runtime/slip10';
|
|
796
|
-
|
|
797
|
-
import type {
|
|
798
|
-
Slip10Node,
|
|
799
511
|
} from '@forgezero/runtime/slip10';
|
|
800
512
|
```
|
|
801
513
|
|
|
@@ -814,35 +526,11 @@ export const selectedCapability = HARDENED_OFFSET;
|
|
|
814
526
|
<a id="forgezero-runtime-identity"></a>
|
|
815
527
|
## @forgezero/runtime/identity
|
|
816
528
|
|
|
817
|
-
Hybrid Ed25519 + ML-DSA-65 request signing. One canonical string, so the compute agent that signs inside a guest and the API that verifies cannot drift — which two implementations of it certainly would. This
|
|
529
|
+
Hybrid Ed25519 + ML-DSA-65 request signing. One canonical string, so the compute agent that signs inside a guest and the API that verifies cannot drift — which two implementations of it certainly would. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
818
530
|
|
|
819
531
|
```text
|
|
820
532
|
import {
|
|
821
533
|
CLOCK_SKEW_SECONDS,
|
|
822
|
-
REQUEST_SIGNATURE_SUITE,
|
|
823
|
-
RESPONSE_KEY_HEADER,
|
|
824
|
-
RESPONSE_SEALING_SUITE,
|
|
825
|
-
canonicalString,
|
|
826
|
-
decodeSignatureHeader,
|
|
827
|
-
deriveKeysFromSeed,
|
|
828
|
-
derivePublicKeysFromSeed,
|
|
829
|
-
encodeSignatureHeader,
|
|
830
|
-
generateNodeKeys,
|
|
831
|
-
generateResponseRecipient,
|
|
832
|
-
openResponse,
|
|
833
|
-
sealResponse,
|
|
834
|
-
signRequest,
|
|
835
|
-
validResponsePublicKey,
|
|
836
|
-
verifyRequest,
|
|
837
|
-
} from '@forgezero/runtime/identity';
|
|
838
|
-
|
|
839
|
-
import type {
|
|
840
|
-
NodeKeyPair,
|
|
841
|
-
NodePublicKeys,
|
|
842
|
-
ResponseRecipient,
|
|
843
|
-
SealedResponse,
|
|
844
|
-
SignedEnvelope,
|
|
845
|
-
VerifyFailure,
|
|
846
534
|
} from '@forgezero/runtime/identity';
|
|
847
535
|
```
|
|
848
536
|
|
|
@@ -861,26 +549,11 @@ export const selectedCapability = CLOCK_SKEW_SECONDS;
|
|
|
861
549
|
<a id="forgezero-runtime-schema"></a>
|
|
862
550
|
## @forgezero/runtime/schema
|
|
863
551
|
|
|
864
|
-
Validate against JSON Schema, restrict what a caller may declare, and describe a schema as a form. This
|
|
552
|
+
Validate against JSON Schema, restrict what a caller may declare, and describe a schema as a form. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
865
553
|
|
|
866
554
|
```text
|
|
867
555
|
import {
|
|
868
556
|
DEFAULT_RESTRICTIONS,
|
|
869
|
-
SCHEMA_VERSION,
|
|
870
|
-
SchemaError,
|
|
871
|
-
VERSION,
|
|
872
|
-
describeJsonSchema,
|
|
873
|
-
readableFields,
|
|
874
|
-
restrictJsonSchema,
|
|
875
|
-
writeOnlyPaths,
|
|
876
|
-
} from '@forgezero/runtime/schema';
|
|
877
|
-
|
|
878
|
-
import type {
|
|
879
|
-
FieldKind,
|
|
880
|
-
FormField,
|
|
881
|
-
Restrictions,
|
|
882
|
-
SchemaValidator,
|
|
883
|
-
ValidationResult,
|
|
884
557
|
} from '@forgezero/runtime/schema';
|
|
885
558
|
```
|
|
886
559
|
|
|
@@ -910,19 +583,11 @@ const secretFields = writeOnlyPaths(fields);
|
|
|
910
583
|
<a id="forgezero-runtime-schema-typebox"></a>
|
|
911
584
|
## @forgezero/runtime/schema/typebox
|
|
912
585
|
|
|
913
|
-
The TypeBox validator behind that interface. This
|
|
586
|
+
The TypeBox validator behind that interface. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
914
587
|
|
|
915
588
|
```text
|
|
916
589
|
import {
|
|
917
590
|
T,
|
|
918
|
-
parse,
|
|
919
|
-
typebox,
|
|
920
|
-
typeboxQueryCodec,
|
|
921
|
-
} from '@forgezero/runtime/schema/typebox';
|
|
922
|
-
|
|
923
|
-
import type {
|
|
924
|
-
Static,
|
|
925
|
-
TSchema,
|
|
926
591
|
} from '@forgezero/runtime/schema/typebox';
|
|
927
592
|
```
|
|
928
593
|
|
|
@@ -950,24 +615,11 @@ const codec = typeboxQueryCodec(User);
|
|
|
950
615
|
<a id="forgezero-runtime-finance-discounts"></a>
|
|
951
616
|
## @forgezero/runtime/finance/discounts
|
|
952
617
|
|
|
953
|
-
Promotions as arithmetic over integer minor units. They never stack — one winner — and a percentage rounds down, because rounding a discount up gives away a unit of currency per invoice forever. This
|
|
618
|
+
Promotions as arithmetic over integer minor units. They never stack — one winner — and a percentage rounds down, because rounding a discount up gives away a unit of currency per invoice forever. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
954
619
|
|
|
955
620
|
```text
|
|
956
621
|
import {
|
|
957
622
|
DiscountError,
|
|
958
|
-
assertCode,
|
|
959
|
-
assertWindow,
|
|
960
|
-
bestDiscount,
|
|
961
|
-
discountFor,
|
|
962
|
-
ineligibility,
|
|
963
|
-
normaliseCode,
|
|
964
|
-
} from '@forgezero/runtime/finance/discounts';
|
|
965
|
-
|
|
966
|
-
import type {
|
|
967
|
-
AppliedDiscount,
|
|
968
|
-
DiscountKind,
|
|
969
|
-
Ineligibility,
|
|
970
|
-
Promotion,
|
|
971
623
|
} from '@forgezero/runtime/finance/discounts';
|
|
972
624
|
```
|
|
973
625
|
|
|
@@ -986,38 +638,11 @@ export const selectedCapability = DiscountError;
|
|
|
986
638
|
<a id="forgezero-runtime-finance-money"></a>
|
|
987
639
|
## @forgezero/runtime/finance/money
|
|
988
640
|
|
|
989
|
-
Exact amounts in minor units with the asset attached, so two currencies cannot be added. This
|
|
641
|
+
Exact amounts in minor units with the asset attached, so two currencies cannot be added. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
990
642
|
|
|
991
643
|
```text
|
|
992
644
|
import {
|
|
993
645
|
ASSETS,
|
|
994
|
-
MoneyError,
|
|
995
|
-
ROUNDING,
|
|
996
|
-
VERSION,
|
|
997
|
-
abs,
|
|
998
|
-
add,
|
|
999
|
-
allocate,
|
|
1000
|
-
assetSpec,
|
|
1001
|
-
compare,
|
|
1002
|
-
convert,
|
|
1003
|
-
defineAsset,
|
|
1004
|
-
equals,
|
|
1005
|
-
formatAmount,
|
|
1006
|
-
isNegative,
|
|
1007
|
-
isZero,
|
|
1008
|
-
money,
|
|
1009
|
-
mulRate,
|
|
1010
|
-
negate,
|
|
1011
|
-
parseAmount,
|
|
1012
|
-
subtract,
|
|
1013
|
-
toStep,
|
|
1014
|
-
zero,
|
|
1015
|
-
} from '@forgezero/runtime/finance/money';
|
|
1016
|
-
|
|
1017
|
-
import type {
|
|
1018
|
-
AssetSpec,
|
|
1019
|
-
Money,
|
|
1020
|
-
Rounding,
|
|
1021
646
|
} from '@forgezero/runtime/finance/money';
|
|
1022
647
|
```
|
|
1023
648
|
|
|
@@ -1036,37 +661,11 @@ export const selectedCapability = ASSETS;
|
|
|
1036
661
|
<a id="forgezero-runtime-finance-venues"></a>
|
|
1037
662
|
## @forgezero/runtime/finance/venues
|
|
1038
663
|
|
|
1039
|
-
Trading venues, market types and symbols as data — spot, margin and futures behind one order model. This
|
|
664
|
+
Trading venues, market types and symbols as data — spot, margin and futures behind one order model. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1040
665
|
|
|
1041
666
|
```text
|
|
1042
667
|
import {
|
|
1043
668
|
MARKET_TYPES,
|
|
1044
|
-
ORDER_SIDES,
|
|
1045
|
-
ORDER_TYPES,
|
|
1046
|
-
TIME_IN_FORCE,
|
|
1047
|
-
VENUES,
|
|
1048
|
-
VERSION,
|
|
1049
|
-
VenueError,
|
|
1050
|
-
notionalOf,
|
|
1051
|
-
parseSymbol,
|
|
1052
|
-
submitOrder,
|
|
1053
|
-
symbolOf,
|
|
1054
|
-
validateOrder,
|
|
1055
|
-
venue,
|
|
1056
|
-
venuesFor,
|
|
1057
|
-
} from '@forgezero/runtime/finance/venues';
|
|
1058
|
-
|
|
1059
|
-
import type {
|
|
1060
|
-
MarketSpec,
|
|
1061
|
-
MarketType,
|
|
1062
|
-
OrderRequest,
|
|
1063
|
-
OrderResult,
|
|
1064
|
-
OrderSide,
|
|
1065
|
-
OrderStatus,
|
|
1066
|
-
OrderType,
|
|
1067
|
-
TimeInForce,
|
|
1068
|
-
VenueAdapter,
|
|
1069
|
-
VenueSpec,
|
|
1070
669
|
} from '@forgezero/runtime/finance/venues';
|
|
1071
670
|
```
|
|
1072
671
|
|
|
@@ -1085,40 +684,11 @@ export const selectedCapability = MARKET_TYPES;
|
|
|
1085
684
|
<a id="forgezero-runtime-finance-ledger"></a>
|
|
1086
685
|
## @forgezero/runtime/finance/ledger
|
|
1087
686
|
|
|
1088
|
-
Double-entry postings and derived balances. A hold is a posting, not a lock — the queue does the ordering. This
|
|
687
|
+
Double-entry postings and derived balances. A hold is a posting, not a lock — the queue does the ordering. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1089
688
|
|
|
1090
689
|
```text
|
|
1091
690
|
import {
|
|
1092
691
|
ACCOUNT_KINDS,
|
|
1093
|
-
BUCKETS,
|
|
1094
|
-
LedgerError,
|
|
1095
|
-
MAX_LEDGER_ENTRIES,
|
|
1096
|
-
VERSION,
|
|
1097
|
-
accountId,
|
|
1098
|
-
assertAvailable,
|
|
1099
|
-
assertBalanced,
|
|
1100
|
-
availableOf,
|
|
1101
|
-
balanceOf,
|
|
1102
|
-
balancesFrom,
|
|
1103
|
-
captureHold,
|
|
1104
|
-
heldOf,
|
|
1105
|
-
parseAccount,
|
|
1106
|
-
placeHold,
|
|
1107
|
-
queueKeyFor,
|
|
1108
|
-
releaseHold,
|
|
1109
|
-
statement,
|
|
1110
|
-
totalOf,
|
|
1111
|
-
transfer,
|
|
1112
|
-
trialBalance,
|
|
1113
|
-
} from '@forgezero/runtime/finance/ledger';
|
|
1114
|
-
|
|
1115
|
-
import type {
|
|
1116
|
-
AccountKind,
|
|
1117
|
-
AccountRef,
|
|
1118
|
-
Bucket,
|
|
1119
|
-
Entry,
|
|
1120
|
-
Transaction,
|
|
1121
|
-
TrialBalance,
|
|
1122
692
|
} from '@forgezero/runtime/finance/ledger';
|
|
1123
693
|
```
|
|
1124
694
|
|
|
@@ -1137,28 +707,11 @@ export const selectedCapability = ACCOUNT_KINDS;
|
|
|
1137
707
|
<a id="forgezero-runtime-finance-commission"></a>
|
|
1138
708
|
## @forgezero/runtime/finance/commission
|
|
1139
709
|
|
|
1140
|
-
Profit net of flows, a high-water mark, the tier split and the referral share of our income. This
|
|
710
|
+
Profit net of flows, a high-water mark, the tier split and the referral share of our income. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1141
711
|
|
|
1142
712
|
```text
|
|
1143
713
|
import {
|
|
1144
714
|
CommissionError,
|
|
1145
|
-
allocate,
|
|
1146
|
-
chargeableProfit,
|
|
1147
|
-
commissionTransaction,
|
|
1148
|
-
nextHighWaterMark,
|
|
1149
|
-
periodProfit,
|
|
1150
|
-
projectPrepay,
|
|
1151
|
-
splitCommission,
|
|
1152
|
-
splitReferrals,
|
|
1153
|
-
} from '@forgezero/runtime/finance/commission';
|
|
1154
|
-
|
|
1155
|
-
import type {
|
|
1156
|
-
CommissionInput,
|
|
1157
|
-
CommissionSplit,
|
|
1158
|
-
PeriodPerformance,
|
|
1159
|
-
Prepay,
|
|
1160
|
-
PrepayInput,
|
|
1161
|
-
ReferralShare,
|
|
1162
715
|
} from '@forgezero/runtime/finance/commission';
|
|
1163
716
|
```
|
|
1164
717
|
|
|
@@ -1177,31 +730,11 @@ export const selectedCapability = CommissionError;
|
|
|
1177
730
|
<a id="forgezero-runtime-finance-rates"></a>
|
|
1178
731
|
## @forgezero/runtime/finance/rates
|
|
1179
732
|
|
|
1180
|
-
What an asset is worth in USD, and how old that answer is. A peg never ages; a quote always does. This
|
|
733
|
+
What an asset is worth in USD, and how old that answer is. A peg never ages; a quote always does. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1181
734
|
|
|
1182
735
|
```text
|
|
1183
736
|
import {
|
|
1184
737
|
BASE_ASSET,
|
|
1185
|
-
RATE_SOURCES,
|
|
1186
|
-
RateError,
|
|
1187
|
-
assertRate,
|
|
1188
|
-
createRateTable,
|
|
1189
|
-
describeRate,
|
|
1190
|
-
isRegistered,
|
|
1191
|
-
peg,
|
|
1192
|
-
rateRefreshJob,
|
|
1193
|
-
refreshRates,
|
|
1194
|
-
registerAsset,
|
|
1195
|
-
} from '@forgezero/runtime/finance/rates';
|
|
1196
|
-
|
|
1197
|
-
import type {
|
|
1198
|
-
AssetEntry,
|
|
1199
|
-
AssetRate,
|
|
1200
|
-
RateFetcher,
|
|
1201
|
-
RateSource,
|
|
1202
|
-
RateTable,
|
|
1203
|
-
RateTableOptions,
|
|
1204
|
-
RefreshReport,
|
|
1205
738
|
} from '@forgezero/runtime/finance/rates';
|
|
1206
739
|
```
|
|
1207
740
|
|
|
@@ -1220,28 +753,11 @@ export const selectedCapability = BASE_ASSET;
|
|
|
1220
753
|
<a id="forgezero-runtime-finance-transfers"></a>
|
|
1221
754
|
## @forgezero/runtime/finance/transfers
|
|
1222
755
|
|
|
1223
|
-
Deposits and withdrawals as ordered pipelines, with screening reserved at position zero. This
|
|
756
|
+
Deposits and withdrawals as ordered pipelines, with screening reserved at position zero. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1224
757
|
|
|
1225
758
|
```text
|
|
1226
759
|
import {
|
|
1227
760
|
DIRECTIONS,
|
|
1228
|
-
PipelineError,
|
|
1229
|
-
SCREENING_ORDER,
|
|
1230
|
-
approvalStage,
|
|
1231
|
-
balanceStage,
|
|
1232
|
-
createTransferPipeline,
|
|
1233
|
-
limitsStage,
|
|
1234
|
-
notFrozenStage,
|
|
1235
|
-
screeningStage,
|
|
1236
|
-
} from '@forgezero/runtime/finance/transfers';
|
|
1237
|
-
|
|
1238
|
-
import type {
|
|
1239
|
-
Direction,
|
|
1240
|
-
PipelineResult,
|
|
1241
|
-
Stage,
|
|
1242
|
-
StageOutcome,
|
|
1243
|
-
Transfer,
|
|
1244
|
-
TransferPipeline,
|
|
1245
761
|
} from '@forgezero/runtime/finance/transfers';
|
|
1246
762
|
```
|
|
1247
763
|
|
|
@@ -1260,27 +776,11 @@ export const selectedCapability = DIRECTIONS;
|
|
|
1260
776
|
<a id="forgezero-runtime-finance-chain"></a>
|
|
1261
777
|
## @forgezero/runtime/finance/chain
|
|
1262
778
|
|
|
1263
|
-
Which chains exist, their confirmation depth by value band, assets and explorers — as data an admin edits. This
|
|
779
|
+
Which chains exist, their confirmation depth by value band, assets and explorers — as data an admin edits. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1264
780
|
|
|
1265
781
|
```text
|
|
1266
782
|
import {
|
|
1267
783
|
ADDRESS_SCHEMES,
|
|
1268
|
-
ChainError,
|
|
1269
|
-
SEED_CHAINS,
|
|
1270
|
-
SEED_CHAIN_ASSETS,
|
|
1271
|
-
assertChain,
|
|
1272
|
-
confirmationsFor,
|
|
1273
|
-
createChainRegistry,
|
|
1274
|
-
estimatedSeconds,
|
|
1275
|
-
validateAddress,
|
|
1276
|
-
} from '@forgezero/runtime/finance/chain';
|
|
1277
|
-
|
|
1278
|
-
import type {
|
|
1279
|
-
AddressScheme,
|
|
1280
|
-
ChainAsset,
|
|
1281
|
-
ChainRegistry,
|
|
1282
|
-
ChainSpec,
|
|
1283
|
-
ConfirmationBand,
|
|
1284
784
|
} from '@forgezero/runtime/finance/chain';
|
|
1285
785
|
```
|
|
1286
786
|
|
|
@@ -1299,18 +799,11 @@ export const selectedCapability = ADDRESS_SCHEMES;
|
|
|
1299
799
|
<a id="forgezero-runtime-finance-custody"></a>
|
|
1300
800
|
## @forgezero/runtime/finance/custody
|
|
1301
801
|
|
|
1302
|
-
Derive CREATE2 deposit addresses and EIP-712 custody digests — arithmetic over a seed and a salt, needing no credential and no node. This
|
|
802
|
+
Derive CREATE2 deposit addresses and EIP-712 custody digests — arithmetic over a seed and a salt, needing no credential and no node. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1303
803
|
|
|
1304
804
|
```text
|
|
1305
805
|
import {
|
|
1306
806
|
CustodyError,
|
|
1307
|
-
VERSION,
|
|
1308
|
-
depositAddress,
|
|
1309
|
-
domainSeparator,
|
|
1310
|
-
orderSignatures,
|
|
1311
|
-
saltFor,
|
|
1312
|
-
toChecksumAddress,
|
|
1313
|
-
withdrawDigest,
|
|
1314
807
|
} from '@forgezero/runtime/finance/custody';
|
|
1315
808
|
```
|
|
1316
809
|
|
|
@@ -1329,28 +822,11 @@ export const selectedCapability = CustodyError;
|
|
|
1329
822
|
<a id="forgezero-runtime-finance-derive"></a>
|
|
1330
823
|
## @forgezero/runtime/finance/derive
|
|
1331
824
|
|
|
1332
|
-
Declare a field ForgeZero generates rather than the tenant supplying: BIP-44 path arithmetic, and the choice of who is capable of generating the key. This
|
|
825
|
+
Declare a field ForgeZero generates rather than the tenant supplying: BIP-44 path arithmetic, and the choice of who is capable of generating the key. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1333
826
|
|
|
1334
827
|
```text
|
|
1335
828
|
import {
|
|
1336
829
|
CUSTODY,
|
|
1337
|
-
DERIVE_KEYWORD,
|
|
1338
|
-
DeriveError,
|
|
1339
|
-
SCHEMES,
|
|
1340
|
-
assertDeriveSpec,
|
|
1341
|
-
custodyOf,
|
|
1342
|
-
deriveSpecOf,
|
|
1343
|
-
derivedFields,
|
|
1344
|
-
derivedPaths,
|
|
1345
|
-
pathFor,
|
|
1346
|
-
suppliedPaths,
|
|
1347
|
-
} from '@forgezero/runtime/finance/derive';
|
|
1348
|
-
|
|
1349
|
-
import type {
|
|
1350
|
-
Custody,
|
|
1351
|
-
DeriveSpec,
|
|
1352
|
-
DerivedField,
|
|
1353
|
-
Scheme,
|
|
1354
830
|
} from '@forgezero/runtime/finance/derive';
|
|
1355
831
|
```
|
|
1356
832
|
|
|
@@ -1369,28 +845,11 @@ export const selectedCapability = CUSTODY;
|
|
|
1369
845
|
<a id="forgezero-runtime-finance-tax"></a>
|
|
1370
846
|
## @forgezero/runtime/finance/tax
|
|
1371
847
|
|
|
1372
|
-
Which jurisdiction may tax a sale, who accounts for it, and the three ways to be zero that report differently. Rates are data. This
|
|
848
|
+
Which jurisdiction may tax a sale, who accounts for it, and the three ways to be zero that report differently. Rates are data. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1373
849
|
|
|
1374
850
|
```text
|
|
1375
851
|
import {
|
|
1376
852
|
TREATMENTS,
|
|
1377
|
-
TaxError,
|
|
1378
|
-
applyTax,
|
|
1379
|
-
assertTaxRate,
|
|
1380
|
-
decideTax,
|
|
1381
|
-
describeTax,
|
|
1382
|
-
parseRate,
|
|
1383
|
-
percent,
|
|
1384
|
-
totalWithTax,
|
|
1385
|
-
} from '@forgezero/runtime/finance/tax';
|
|
1386
|
-
|
|
1387
|
-
import type {
|
|
1388
|
-
Customer,
|
|
1389
|
-
Supplier,
|
|
1390
|
-
TaxAmounts,
|
|
1391
|
-
TaxDecision,
|
|
1392
|
-
TaxRate,
|
|
1393
|
-
Treatment,
|
|
1394
853
|
} from '@forgezero/runtime/finance/tax';
|
|
1395
854
|
```
|
|
1396
855
|
|
|
@@ -1409,22 +868,11 @@ export const selectedCapability = TREATMENTS;
|
|
|
1409
868
|
<a id="forgezero-runtime-finance-storage"></a>
|
|
1410
869
|
## @forgezero/runtime/finance/storage
|
|
1411
870
|
|
|
1412
|
-
Write an amount so it is both exact and sortable: an authoritative string, and a number that is only an index. This
|
|
871
|
+
Write an amount so it is both exact and sortable: an authoritative string, and a number that is only an index. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1413
872
|
|
|
1414
873
|
```text
|
|
1415
874
|
import {
|
|
1416
875
|
SORT_FIELD,
|
|
1417
|
-
fromStored,
|
|
1418
|
-
rangeBounds,
|
|
1419
|
-
sortExact,
|
|
1420
|
-
sortKey,
|
|
1421
|
-
storeAmount,
|
|
1422
|
-
toStored,
|
|
1423
|
-
withinRange,
|
|
1424
|
-
} from '@forgezero/runtime/finance/storage';
|
|
1425
|
-
|
|
1426
|
-
import type {
|
|
1427
|
-
StoredMoney,
|
|
1428
876
|
} from '@forgezero/runtime/finance/storage';
|
|
1429
877
|
```
|
|
1430
878
|
|
|
@@ -1443,33 +891,11 @@ export const selectedCapability = SORT_FIELD;
|
|
|
1443
891
|
<a id="forgezero-runtime-realtime"></a>
|
|
1444
892
|
## @forgezero/runtime/realtime
|
|
1445
893
|
|
|
1446
|
-
Provider-neutral realtime audience, shard, event and delivery contracts. This
|
|
894
|
+
Provider-neutral realtime audience, shard, event and delivery contracts. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1447
895
|
|
|
1448
896
|
```text
|
|
1449
897
|
import {
|
|
1450
898
|
REALTIME_MAX_BATCH_BYTES,
|
|
1451
|
-
REALTIME_MAX_EVENTS,
|
|
1452
|
-
REALTIME_MAX_EVENT_BYTES,
|
|
1453
|
-
REALTIME_MAX_SHARDS_PER_TOPIC,
|
|
1454
|
-
REALTIME_MAX_SOCKETS_PER_SHARD,
|
|
1455
|
-
canReceiveRealtimeAudience,
|
|
1456
|
-
issueRealtimeSubscriptionTicket,
|
|
1457
|
-
realtimeBatchBytes,
|
|
1458
|
-
realtimeHmac,
|
|
1459
|
-
realtimeShardKey,
|
|
1460
|
-
validateRealtimeAudience,
|
|
1461
|
-
validateRealtimeBatch,
|
|
1462
|
-
validateRealtimeSubscriptionTicket,
|
|
1463
|
-
verifyRealtimeHmac,
|
|
1464
|
-
verifyRealtimeSubscriptionToken,
|
|
1465
|
-
} from '@forgezero/runtime/realtime';
|
|
1466
|
-
|
|
1467
|
-
import type {
|
|
1468
|
-
RealtimeAudience,
|
|
1469
|
-
RealtimeBatch,
|
|
1470
|
-
RealtimeEvent,
|
|
1471
|
-
RealtimePrincipalKind,
|
|
1472
|
-
RealtimeSubscriptionTicket,
|
|
1473
899
|
} from '@forgezero/runtime/realtime';
|
|
1474
900
|
```
|
|
1475
901
|
|
|
@@ -1488,25 +914,11 @@ export const selectedCapability = REALTIME_MAX_BATCH_BYTES;
|
|
|
1488
914
|
<a id="forgezero-runtime-passkey-hybrid"></a>
|
|
1489
915
|
## @forgezero/runtime/passkey-hybrid
|
|
1490
916
|
|
|
1491
|
-
Versioned WebAuthn PRF plus ML-DSA companion proof construction and verification. This
|
|
917
|
+
Versioned WebAuthn PRF plus ML-DSA companion proof construction and verification. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1492
918
|
|
|
1493
919
|
```text
|
|
1494
920
|
import {
|
|
1495
921
|
PASSKEY_HYBRID_SUITE,
|
|
1496
|
-
PASSKEY_HYBRID_VERSION,
|
|
1497
|
-
PASSKEY_ML_DSA_PUBLIC_KEY_BYTES,
|
|
1498
|
-
PASSKEY_ML_DSA_SIGNATURE_BYTES,
|
|
1499
|
-
PASSKEY_PRF_SALT,
|
|
1500
|
-
createPasskeyHybridProof,
|
|
1501
|
-
passkeyHybridMessage,
|
|
1502
|
-
verifyPasskeyHybridProof,
|
|
1503
|
-
} from '@forgezero/runtime/passkey-hybrid';
|
|
1504
|
-
|
|
1505
|
-
import type {
|
|
1506
|
-
PasskeyHybridBinding,
|
|
1507
|
-
PasskeyHybridProof,
|
|
1508
|
-
PasskeyHybridPurpose,
|
|
1509
|
-
PasskeyHybridRegistrationProof,
|
|
1510
922
|
} from '@forgezero/runtime/passkey-hybrid';
|
|
1511
923
|
```
|
|
1512
924
|
|
|
@@ -1525,18 +937,11 @@ export const selectedCapability = PASSKEY_HYBRID_SUITE;
|
|
|
1525
937
|
<a id="forgezero-runtime-otpauth"></a>
|
|
1526
938
|
## @forgezero/runtime/otpauth
|
|
1527
939
|
|
|
1528
|
-
Parse and render otpauth URIs without binding enrolment to a UI framework. This
|
|
940
|
+
Parse and render otpauth URIs without binding enrolment to a UI framework. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1529
941
|
|
|
1530
942
|
```text
|
|
1531
943
|
import {
|
|
1532
944
|
formatOtpAuth,
|
|
1533
|
-
fromManualSecret,
|
|
1534
|
-
newOtpAuth,
|
|
1535
|
-
parseOtpAuth,
|
|
1536
|
-
} from '@forgezero/runtime/otpauth';
|
|
1537
|
-
|
|
1538
|
-
import type {
|
|
1539
|
-
OtpAuth,
|
|
1540
945
|
} from '@forgezero/runtime/otpauth';
|
|
1541
946
|
```
|
|
1542
947
|
|
|
@@ -1555,22 +960,11 @@ export const selectedCapability = formatOtpAuth;
|
|
|
1555
960
|
<a id="forgezero-runtime-pipeline"></a>
|
|
1556
961
|
## @forgezero/runtime/pipeline
|
|
1557
962
|
|
|
1558
|
-
Typed ordered application-pipeline execution with explicit evidence. This
|
|
963
|
+
Typed ordered application-pipeline execution with explicit evidence. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1559
964
|
|
|
1560
965
|
```text
|
|
1561
966
|
import {
|
|
1562
967
|
GIT_PROVIDERS,
|
|
1563
|
-
PipelineError,
|
|
1564
|
-
parsePush,
|
|
1565
|
-
shouldDeploy,
|
|
1566
|
-
verifyWebhook,
|
|
1567
|
-
webhookPath,
|
|
1568
|
-
} from '@forgezero/runtime/pipeline';
|
|
1569
|
-
|
|
1570
|
-
import type {
|
|
1571
|
-
DeployTrigger,
|
|
1572
|
-
GitProvider,
|
|
1573
|
-
PushEvent,
|
|
1574
968
|
} from '@forgezero/runtime/pipeline';
|
|
1575
969
|
```
|
|
1576
970
|
|
|
@@ -1589,25 +983,11 @@ export const selectedCapability = GIT_PROVIDERS;
|
|
|
1589
983
|
<a id="forgezero-runtime-finance-chain-addresses"></a>
|
|
1590
984
|
## @forgezero/runtime/finance/chain-addresses
|
|
1591
985
|
|
|
1592
|
-
Chain-address derivation records and validation independent of a node provider. This
|
|
986
|
+
Chain-address derivation records and validation independent of a node provider. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1593
987
|
|
|
1594
988
|
```text
|
|
1595
989
|
import {
|
|
1596
990
|
AddressError,
|
|
1597
|
-
COUNTERFACTUAL_SCHEMES,
|
|
1598
|
-
assertDerivationMatches,
|
|
1599
|
-
create2Address,
|
|
1600
|
-
depositAddressBook,
|
|
1601
|
-
depositSaltFor,
|
|
1602
|
-
deriveDepositAddress,
|
|
1603
|
-
ownerOfAddress,
|
|
1604
|
-
toChecksumAddress,
|
|
1605
|
-
validateAddress,
|
|
1606
|
-
} from '@forgezero/runtime/finance/chain-addresses';
|
|
1607
|
-
|
|
1608
|
-
import type {
|
|
1609
|
-
AddressScheme,
|
|
1610
|
-
ChainDeployment,
|
|
1611
991
|
} from '@forgezero/runtime/finance/chain-addresses';
|
|
1612
992
|
```
|
|
1613
993
|
|
|
@@ -1626,26 +1006,11 @@ export const selectedCapability = AddressError;
|
|
|
1626
1006
|
<a id="forgezero-runtime-finance-chain-deposits"></a>
|
|
1627
1007
|
## @forgezero/runtime/finance/chain-deposits
|
|
1628
1008
|
|
|
1629
|
-
Provider-neutral deposit observation, confirmation and credit transitions. This
|
|
1009
|
+
Provider-neutral deposit observation, confirmation and credit transitions. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1630
1010
|
|
|
1631
1011
|
```text
|
|
1632
1012
|
import {
|
|
1633
1013
|
DepositError,
|
|
1634
|
-
creditDeposit,
|
|
1635
|
-
cursorFrom,
|
|
1636
|
-
depositReference,
|
|
1637
|
-
describeScan,
|
|
1638
|
-
isConfirmed,
|
|
1639
|
-
rescanRange,
|
|
1640
|
-
scanOnce,
|
|
1641
|
-
} from '@forgezero/runtime/finance/chain-deposits';
|
|
1642
|
-
|
|
1643
|
-
import type {
|
|
1644
|
-
ChainReader,
|
|
1645
|
-
ChainTransfer,
|
|
1646
|
-
DepositCursor,
|
|
1647
|
-
ScanContext,
|
|
1648
|
-
ScanReport,
|
|
1649
1014
|
} from '@forgezero/runtime/finance/chain-deposits';
|
|
1650
1015
|
```
|
|
1651
1016
|
|
|
@@ -1664,32 +1029,11 @@ export const selectedCapability = DepositError;
|
|
|
1664
1029
|
<a id="forgezero-runtime-finance-chain-withdrawals"></a>
|
|
1665
1030
|
## @forgezero/runtime/finance/chain-withdrawals
|
|
1666
1031
|
|
|
1667
|
-
Provider-neutral withdrawal approval, broadcast and finality transitions. This
|
|
1032
|
+
Provider-neutral withdrawal approval, broadcast and finality transitions. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1668
1033
|
|
|
1669
1034
|
```text
|
|
1670
1035
|
import {
|
|
1671
1036
|
WITHDRAWAL_STATES,
|
|
1672
|
-
WithdrawalError,
|
|
1673
|
-
approveWithdrawal,
|
|
1674
|
-
broadcastKeyFor,
|
|
1675
|
-
canTransition,
|
|
1676
|
-
confirmWithdrawal,
|
|
1677
|
-
describeSweep,
|
|
1678
|
-
holdReference,
|
|
1679
|
-
markFailed,
|
|
1680
|
-
processOnce,
|
|
1681
|
-
refundFailed,
|
|
1682
|
-
rejectWithdrawal,
|
|
1683
|
-
requestWithdrawal,
|
|
1684
|
-
sweepForPayout,
|
|
1685
|
-
} from '@forgezero/runtime/finance/chain-withdrawals';
|
|
1686
|
-
|
|
1687
|
-
import type {
|
|
1688
|
-
Broadcaster,
|
|
1689
|
-
SweepCandidate,
|
|
1690
|
-
SweepPlan,
|
|
1691
|
-
Withdrawal,
|
|
1692
|
-
WithdrawalState,
|
|
1693
1037
|
} from '@forgezero/runtime/finance/chain-withdrawals';
|
|
1694
1038
|
```
|
|
1695
1039
|
|
|
@@ -1708,23 +1052,11 @@ export const selectedCapability = WITHDRAWAL_STATES;
|
|
|
1708
1052
|
<a id="forgezero-runtime-finance-chain-reconcile"></a>
|
|
1709
1053
|
## @forgezero/runtime/finance/chain-reconcile
|
|
1710
1054
|
|
|
1711
|
-
Deterministic reconciliation between chain observations and durable transfer state. This
|
|
1055
|
+
Deterministic reconciliation between chain observations and durable transfer state. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1712
1056
|
|
|
1713
1057
|
```text
|
|
1714
1058
|
import {
|
|
1715
1059
|
DISCREPANCY_KINDS,
|
|
1716
|
-
ReconcileError,
|
|
1717
|
-
reconcileOnce,
|
|
1718
|
-
reconcileReport,
|
|
1719
|
-
shortfallUsd,
|
|
1720
|
-
} from '@forgezero/runtime/finance/chain-reconcile';
|
|
1721
|
-
|
|
1722
|
-
import type {
|
|
1723
|
-
Discrepancy,
|
|
1724
|
-
DiscrepancyKind,
|
|
1725
|
-
LedgerLiability,
|
|
1726
|
-
OnChainHolding,
|
|
1727
|
-
ReconcileReport,
|
|
1728
1060
|
} from '@forgezero/runtime/finance/chain-reconcile';
|
|
1729
1061
|
```
|
|
1730
1062
|
|
|
@@ -1743,28 +1075,11 @@ export const selectedCapability = DISCREPANCY_KINDS;
|
|
|
1743
1075
|
<a id="forgezero-runtime-finance-market"></a>
|
|
1744
1076
|
## @forgezero/runtime/finance/market
|
|
1745
1077
|
|
|
1746
|
-
Market order, fill and quote contracts independent of any exchange adapter. This
|
|
1078
|
+
Market order, fill and quote contracts independent of any exchange adapter. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1747
1079
|
|
|
1748
1080
|
```text
|
|
1749
1081
|
import {
|
|
1750
1082
|
MarketError,
|
|
1751
|
-
createFeed,
|
|
1752
|
-
disagreementOf,
|
|
1753
|
-
isStale,
|
|
1754
|
-
lastPrice,
|
|
1755
|
-
limitFor,
|
|
1756
|
-
stalenessOf,
|
|
1757
|
-
subscribe,
|
|
1758
|
-
} from '@forgezero/runtime/finance/market';
|
|
1759
|
-
|
|
1760
|
-
import type {
|
|
1761
|
-
Feed,
|
|
1762
|
-
FeedEvent,
|
|
1763
|
-
FeedOptions,
|
|
1764
|
-
PriceResult,
|
|
1765
|
-
Quote,
|
|
1766
|
-
StalenessPolicy,
|
|
1767
|
-
VenueSource,
|
|
1768
1083
|
} from '@forgezero/runtime/finance/market';
|
|
1769
1084
|
```
|
|
1770
1085
|
|
|
@@ -1783,28 +1098,11 @@ export const selectedCapability = MarketError;
|
|
|
1783
1098
|
<a id="forgezero-runtime-custody-share"></a>
|
|
1784
1099
|
## @forgezero/runtime/custody-share
|
|
1785
1100
|
|
|
1786
|
-
Threshold-share parsing, validation and reconstruction. This
|
|
1101
|
+
Threshold-share parsing, validation and reconstruction. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1787
1102
|
|
|
1788
1103
|
```text
|
|
1789
1104
|
import {
|
|
1790
1105
|
PROBE_BYTES,
|
|
1791
|
-
factorWrapAad,
|
|
1792
|
-
joinProbeAndShare,
|
|
1793
|
-
openFactorEnvelope,
|
|
1794
|
-
openSealedToFactor,
|
|
1795
|
-
openShareWithPasskey,
|
|
1796
|
-
openShareWithPhrase,
|
|
1797
|
-
passkeyWrappingKey,
|
|
1798
|
-
phraseWrappingKey,
|
|
1799
|
-
sealShare,
|
|
1800
|
-
shareIndexOf,
|
|
1801
|
-
splitProbeAndShare,
|
|
1802
|
-
wrappingKeysFor,
|
|
1803
|
-
} from '@forgezero/runtime/custody-share';
|
|
1804
|
-
|
|
1805
|
-
import type {
|
|
1806
|
-
SealedShare,
|
|
1807
|
-
WrappingKeys,
|
|
1808
1106
|
} from '@forgezero/runtime/custody-share';
|
|
1809
1107
|
```
|
|
1810
1108
|
|
|
@@ -1823,21 +1121,11 @@ export const selectedCapability = PROBE_BYTES;
|
|
|
1823
1121
|
<a id="forgezero-runtime-custody-crypto"></a>
|
|
1824
1122
|
## @forgezero/runtime/custody-crypto
|
|
1825
1123
|
|
|
1826
|
-
Hybrid ML-KEM-768 plus X25519 custody-share sealing and opening. This
|
|
1124
|
+
Hybrid ML-KEM-768 plus X25519 custody-share sealing and opening. This is a supported entry point. Import only the named values used by the adjacent task example; the declaration file remains the complete API reference.
|
|
1827
1125
|
|
|
1828
1126
|
```text
|
|
1829
1127
|
import {
|
|
1830
1128
|
deriveKey,
|
|
1831
|
-
openFromKey,
|
|
1832
|
-
openWithKey,
|
|
1833
|
-
sealToKey,
|
|
1834
|
-
sealWithKey,
|
|
1835
|
-
wrappingKeyPair,
|
|
1836
|
-
} from '@forgezero/runtime/custody-crypto';
|
|
1837
|
-
|
|
1838
|
-
import type {
|
|
1839
|
-
CipherBox,
|
|
1840
|
-
SealedToKey,
|
|
1841
1129
|
} from '@forgezero/runtime/custody-crypto';
|
|
1842
1130
|
```
|
|
1843
1131
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgezero/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
"prepublishOnly": "bun ../tools/package-task.ts prepublish runtime"
|
|
191
191
|
},
|
|
192
192
|
"dependencies": {
|
|
193
|
-
"@forgezero/access": "^0.1.
|
|
193
|
+
"@forgezero/access": "^0.1.9"
|
|
194
194
|
},
|
|
195
195
|
"peerDependencies": {
|
|
196
196
|
"@noble/ciphers": "^2.2.0",
|