@forgezero/runtime 0.1.13 → 0.1.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/README.md +60 -1133
- package/dist/notify-templates.js +1 -1
- package/dist/schema-typebox.js +116 -7
- package/dist/schema.d.ts +14 -1
- package/dist/schema.js +116 -7
- package/package.json +2 -58
- package/dist/compliance.d.ts +0 -172
- package/dist/compliance.js +0 -168
- package/dist/finance/chain-addresses.d.ts +0 -130
- package/dist/finance/chain-addresses.js +0 -462
- package/dist/finance/chain-deposits.d.ts +0 -193
- package/dist/finance/chain-deposits.js +0 -600
- package/dist/finance/chain-reconcile.d.ts +0 -112
- package/dist/finance/chain-reconcile.js +0 -76
- package/dist/finance/chain-withdrawals.d.ts +0 -223
- package/dist/finance/chain-withdrawals.js +0 -635
- package/dist/finance/chain.d.ts +0 -116
- package/dist/finance/chain.js +0 -316
- package/dist/finance/commission.d.ts +0 -155
- package/dist/finance/commission.js +0 -423
- package/dist/finance/custody.d.ts +0 -68
- package/dist/finance/custody.js +0 -107
- package/dist/finance/derive.d.ts +0 -115
- package/dist/finance/derive.js +0 -116
- package/dist/finance/ledger.d.ts +0 -227
- package/dist/finance/ledger.js +0 -313
- package/dist/finance/market.d.ts +0 -209
- package/dist/finance/market.js +0 -112
- package/dist/finance/rates.d.ts +0 -178
- package/dist/finance/rates.js +0 -292
- package/dist/finance/transfers.d.ts +0 -153
- package/dist/finance/transfers.js +0 -292
- package/dist/finance/venues.d.ts +0 -190
- package/dist/finance/venues.js +0 -251
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
# @forgezero/runtime
|
|
9
9
|
|
|
10
|
-
The machinery behind a request handler — jobs, queues, an outbox, a hash-chained audit trail, mail, backups, schema validation and exact money.
|
|
10
|
+
The machinery behind a request handler — jobs, queues, an outbox, a hash-chained audit trail, mail, backups, schema validation and exact money. 30 public modules, each imported on its own.
|
|
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
|
|---|---|---|---|
|
|
@@ -44,7 +44,6 @@ Every row links to the detailed explanation and named-import/example area below.
|
|
|
44
44
|
| @forgezero/runtime/notify | Render a named template to text and HTML, escaped per part, refusing to send with a blank where a value should be. | portable | [Reference + usage](#forgezero-runtime-notify) |
|
|
45
45
|
| @forgezero/runtime/notify/templates | The six transactional messages ForgeZero sends. | portable | [Reference + usage](#forgezero-runtime-notify-templates) |
|
|
46
46
|
| @forgezero/runtime/calendar | Billing periods computed from an anchor, working days, holidays and due dates. | portable | [Reference + usage](#forgezero-runtime-calendar) |
|
|
47
|
-
| @forgezero/runtime/compliance | Screening as a decision record — tiers, rules and lists, failing closed when a list is unreachable. | portable | [Reference + usage](#forgezero-runtime-compliance) |
|
|
48
47
|
| @forgezero/runtime/totp | RFC 6238 TOTP on the existing HMAC — base32, an asymmetric window, and replay left to the caller. | portable | [Reference + usage](#forgezero-runtime-totp) |
|
|
49
48
|
| @forgezero/runtime/passkey | 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. | portable | [Reference + usage](#forgezero-runtime-passkey) |
|
|
50
49
|
| @forgezero/runtime/phrase | BIP-39 recovery phrases, and the salted verifier that proves one without being able to reconstruct it. | portable | [Reference + usage](#forgezero-runtime-phrase) |
|
|
@@ -58,25 +57,12 @@ Every row links to the detailed explanation and named-import/example area below.
|
|
|
58
57
|
| @forgezero/runtime/schema/typebox | The TypeBox validator behind that interface. | portable | [Reference + usage](#forgezero-runtime-schema-typebox) |
|
|
59
58
|
| @forgezero/runtime/finance/discounts | 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. | portable | [Reference + usage](#forgezero-runtime-finance-discounts) |
|
|
60
59
|
| @forgezero/runtime/finance/money | Exact amounts in minor units with the asset attached, so two currencies cannot be added. | portable | [Reference + usage](#forgezero-runtime-finance-money) |
|
|
61
|
-
| @forgezero/runtime/finance/venues | Trading venues, market types and symbols as data — spot, margin and futures behind one order model. | portable | [Reference + usage](#forgezero-runtime-finance-venues) |
|
|
62
|
-
| @forgezero/runtime/finance/ledger | Double-entry postings and derived balances. A hold is a posting, not a lock — the queue does the ordering. | portable | [Reference + usage](#forgezero-runtime-finance-ledger) |
|
|
63
|
-
| @forgezero/runtime/finance/commission | Profit net of flows, a high-water mark, the tier split and the referral share of our income. | portable | [Reference + usage](#forgezero-runtime-finance-commission) |
|
|
64
|
-
| @forgezero/runtime/finance/rates | What an asset is worth in USD, and how old that answer is. A peg never ages; a quote always does. | portable | [Reference + usage](#forgezero-runtime-finance-rates) |
|
|
65
|
-
| @forgezero/runtime/finance/transfers | Deposits and withdrawals as ordered pipelines, with screening reserved at position zero. | portable | [Reference + usage](#forgezero-runtime-finance-transfers) |
|
|
66
|
-
| @forgezero/runtime/finance/chain | Which chains exist, their confirmation depth by value band, assets and explorers — as data an admin edits. | portable | [Reference + usage](#forgezero-runtime-finance-chain) |
|
|
67
|
-
| @forgezero/runtime/finance/custody | Derive CREATE2 deposit addresses and EIP-712 custody digests — arithmetic over a seed and a salt, needing no credential and no node. | portable | [Reference + usage](#forgezero-runtime-finance-custody) |
|
|
68
|
-
| @forgezero/runtime/finance/derive | 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. | portable | [Reference + usage](#forgezero-runtime-finance-derive) |
|
|
69
60
|
| @forgezero/runtime/finance/tax | Which jurisdiction may tax a sale, who accounts for it, and the three ways to be zero that report differently. Rates are data. | portable | [Reference + usage](#forgezero-runtime-finance-tax) |
|
|
70
61
|
| @forgezero/runtime/finance/storage | Write an amount so it is both exact and sortable: an authoritative string, and a number that is only an index. | portable | [Reference + usage](#forgezero-runtime-finance-storage) |
|
|
71
62
|
| @forgezero/runtime/realtime | Provider-neutral realtime audience, shard, event and delivery contracts. | portable | [Reference + usage](#forgezero-runtime-realtime) |
|
|
72
63
|
| @forgezero/runtime/passkey-hybrid | Versioned WebAuthn PRF plus ML-DSA companion proof construction and verification. | portable | [Reference + usage](#forgezero-runtime-passkey-hybrid) |
|
|
73
64
|
| @forgezero/runtime/otpauth | Parse and render otpauth URIs without binding enrolment to a UI framework. | portable | [Reference + usage](#forgezero-runtime-otpauth) |
|
|
74
65
|
| @forgezero/runtime/pipeline | Typed ordered application-pipeline execution with explicit evidence. | portable | [Reference + usage](#forgezero-runtime-pipeline) |
|
|
75
|
-
| @forgezero/runtime/finance/chain-addresses | Chain-address derivation records and validation independent of a node provider. | portable | [Reference + usage](#forgezero-runtime-finance-chain-addresses) |
|
|
76
|
-
| @forgezero/runtime/finance/chain-deposits | Provider-neutral deposit observation, confirmation and credit transitions. | portable | [Reference + usage](#forgezero-runtime-finance-chain-deposits) |
|
|
77
|
-
| @forgezero/runtime/finance/chain-withdrawals | Provider-neutral withdrawal approval, broadcast and finality transitions. | portable | [Reference + usage](#forgezero-runtime-finance-chain-withdrawals) |
|
|
78
|
-
| @forgezero/runtime/finance/chain-reconcile | Deterministic reconciliation between chain observations and durable transfer state. | portable | [Reference + usage](#forgezero-runtime-finance-chain-reconcile) |
|
|
79
|
-
| @forgezero/runtime/finance/market | Market order, fill and quote contracts independent of any exchange adapter. | portable | [Reference + usage](#forgezero-runtime-finance-market) |
|
|
80
66
|
| @forgezero/runtime/custody-share | Threshold-share parsing, validation and reconstruction. | portable | [Reference + usage](#forgezero-runtime-custody-share) |
|
|
81
67
|
| @forgezero/runtime/custody-crypto | Hybrid ML-KEM-768 plus X25519 custody-share sealing and opening. | portable | [Reference + usage](#forgezero-runtime-custody-crypto) |
|
|
82
68
|
|
|
@@ -91,24 +77,11 @@ bun add @forgezero/runtime
|
|
|
91
77
|
<a id="forgezero-runtime-query"></a>
|
|
92
78
|
## @forgezero/runtime/query
|
|
93
79
|
|
|
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
|
|
80
|
+
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
81
|
|
|
96
82
|
```text
|
|
97
83
|
import {
|
|
98
84
|
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
85
|
} from '@forgezero/runtime/query';
|
|
113
86
|
```
|
|
114
87
|
|
|
@@ -148,39 +121,11 @@ const order = await runFindOrder.execute(stores, { orderKey: 'ord_123' });
|
|
|
148
121
|
<a id="forgezero-runtime-jobs"></a>
|
|
149
122
|
## @forgezero/runtime/jobs
|
|
150
123
|
|
|
151
|
-
Background work that never overlaps itself, advances a cursor only on success, and can be paused and inspected. This
|
|
124
|
+
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
125
|
|
|
153
126
|
```text
|
|
154
127
|
import {
|
|
155
128
|
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
129
|
} from '@forgezero/runtime/jobs';
|
|
185
130
|
```
|
|
186
131
|
|
|
@@ -199,24 +144,11 @@ export const selectedCapability = JobFenceLostError;
|
|
|
199
144
|
<a id="forgezero-runtime-queue"></a>
|
|
200
145
|
## @forgezero/runtime/queue
|
|
201
146
|
|
|
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
|
|
147
|
+
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
148
|
|
|
204
149
|
```text
|
|
205
150
|
import {
|
|
206
151
|
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
152
|
} from '@forgezero/runtime/queue';
|
|
221
153
|
```
|
|
222
154
|
|
|
@@ -235,31 +167,11 @@ export const selectedCapability = QueueKeyStoppedError;
|
|
|
235
167
|
<a id="forgezero-runtime-outbox"></a>
|
|
236
168
|
## @forgezero/runtime/outbox
|
|
237
169
|
|
|
238
|
-
Write the event with the record, deliver it after, in order per key with backoff and a dead-letter queue. This
|
|
170
|
+
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
171
|
|
|
240
172
|
```text
|
|
241
173
|
import {
|
|
242
174
|
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
175
|
} from '@forgezero/runtime/outbox';
|
|
264
176
|
```
|
|
265
177
|
|
|
@@ -278,37 +190,11 @@ export const selectedCapability = DEFAULT_POLICY;
|
|
|
278
190
|
<a id="forgezero-runtime-audit"></a>
|
|
279
191
|
## @forgezero/runtime/audit
|
|
280
192
|
|
|
281
|
-
Append-only records chained by hash, with a verifier that names the first altered entry. This
|
|
193
|
+
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
194
|
|
|
283
195
|
```text
|
|
284
196
|
import {
|
|
285
197
|
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
198
|
} from '@forgezero/runtime/audit';
|
|
313
199
|
```
|
|
314
200
|
|
|
@@ -327,34 +213,11 @@ export const selectedCapability = AuditChainError;
|
|
|
327
213
|
<a id="forgezero-runtime-backup"></a>
|
|
328
214
|
## @forgezero/runtime/backup
|
|
329
215
|
|
|
330
|
-
Encrypted, chunked, verified snapshots to object storage — and the restore that reads them back. This
|
|
216
|
+
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
217
|
|
|
332
218
|
```text
|
|
333
219
|
import {
|
|
334
220
|
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
221
|
} from '@forgezero/runtime/backup';
|
|
359
222
|
```
|
|
360
223
|
|
|
@@ -373,32 +236,11 @@ export const selectedCapability = BackupError;
|
|
|
373
236
|
<a id="forgezero-runtime-notify"></a>
|
|
374
237
|
## @forgezero/runtime/notify
|
|
375
238
|
|
|
376
|
-
Render a named template to text and HTML, escaped per part, refusing to send with a blank where a value should be. This
|
|
239
|
+
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
240
|
|
|
378
241
|
```text
|
|
379
242
|
import {
|
|
380
243
|
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
244
|
} from '@forgezero/runtime/notify';
|
|
403
245
|
```
|
|
404
246
|
|
|
@@ -417,22 +259,11 @@ export const selectedCapability = CHANNELS;
|
|
|
417
259
|
<a id="forgezero-runtime-notify-templates"></a>
|
|
418
260
|
## @forgezero/runtime/notify/templates
|
|
419
261
|
|
|
420
|
-
The six transactional messages ForgeZero sends. This
|
|
262
|
+
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
263
|
|
|
422
264
|
```text
|
|
423
265
|
import {
|
|
424
266
|
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
267
|
} from '@forgezero/runtime/notify/templates';
|
|
437
268
|
```
|
|
438
269
|
|
|
@@ -451,32 +282,11 @@ export const selectedCapability = TEMPLATES;
|
|
|
451
282
|
<a id="forgezero-runtime-calendar"></a>
|
|
452
283
|
## @forgezero/runtime/calendar
|
|
453
284
|
|
|
454
|
-
Billing periods computed from an anchor, working days, holidays and due dates. This
|
|
285
|
+
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
286
|
|
|
456
287
|
```text
|
|
457
288
|
import {
|
|
458
289
|
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
290
|
} from '@forgezero/runtime/calendar';
|
|
481
291
|
```
|
|
482
292
|
|
|
@@ -492,78 +302,14 @@ import {
|
|
|
492
302
|
export const selectedCapability = CalendarError;
|
|
493
303
|
```
|
|
494
304
|
|
|
495
|
-
<a id="forgezero-runtime-compliance"></a>
|
|
496
|
-
## @forgezero/runtime/compliance
|
|
497
|
-
|
|
498
|
-
Screening as a decision record — tiers, rules and lists, failing closed when a list is unreachable. This entry exposes 11 named value exports and 10 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
499
|
-
|
|
500
|
-
```text
|
|
501
|
-
import {
|
|
502
|
-
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
|
-
} from '@forgezero/runtime/compliance';
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
## @forgezero/runtime/compliance — Use this entry point
|
|
530
|
-
|
|
531
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
532
|
-
|
|
533
|
-
```text
|
|
534
|
-
import {
|
|
535
|
-
ComplianceError,
|
|
536
|
-
} from '@forgezero/runtime/compliance';
|
|
537
|
-
|
|
538
|
-
export const selectedCapability = ComplianceError;
|
|
539
|
-
```
|
|
540
|
-
|
|
541
305
|
<a id="forgezero-runtime-totp"></a>
|
|
542
306
|
## @forgezero/runtime/totp
|
|
543
307
|
|
|
544
|
-
RFC 6238 TOTP on the existing HMAC — base32, an asymmetric window, and replay left to the caller. This
|
|
308
|
+
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
309
|
|
|
546
310
|
```text
|
|
547
311
|
import {
|
|
548
312
|
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
313
|
} from '@forgezero/runtime/totp';
|
|
568
314
|
```
|
|
569
315
|
|
|
@@ -582,27 +328,11 @@ export const selectedCapability = DEFAULT_DIGITS;
|
|
|
582
328
|
<a id="forgezero-runtime-passkey"></a>
|
|
583
329
|
## @forgezero/runtime/passkey
|
|
584
330
|
|
|
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
|
|
331
|
+
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
332
|
|
|
587
333
|
```text
|
|
588
334
|
import {
|
|
589
335
|
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
336
|
} from '@forgezero/runtime/passkey';
|
|
607
337
|
```
|
|
608
338
|
|
|
@@ -621,17 +351,11 @@ export const selectedCapability = FLAG_BE;
|
|
|
621
351
|
<a id="forgezero-runtime-phrase"></a>
|
|
622
352
|
## @forgezero/runtime/phrase
|
|
623
353
|
|
|
624
|
-
BIP-39 recovery phrases, and the salted verifier that proves one without being able to reconstruct it. This
|
|
354
|
+
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
355
|
|
|
626
356
|
```text
|
|
627
357
|
import {
|
|
628
358
|
PHRASE_SALT_BYTES,
|
|
629
|
-
PHRASE_WORDS,
|
|
630
|
-
generatePhrase,
|
|
631
|
-
newSalt,
|
|
632
|
-
phraseToKey,
|
|
633
|
-
phraseVerifier,
|
|
634
|
-
validatePhrase,
|
|
635
359
|
} from '@forgezero/runtime/phrase';
|
|
636
360
|
```
|
|
637
361
|
|
|
@@ -650,21 +374,11 @@ export const selectedCapability = PHRASE_SALT_BYTES;
|
|
|
650
374
|
<a id="forgezero-runtime-snp"></a>
|
|
651
375
|
## @forgezero/runtime/snp
|
|
652
376
|
|
|
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
|
|
377
|
+
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
378
|
|
|
655
379
|
```text
|
|
656
380
|
import {
|
|
657
381
|
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
382
|
} from '@forgezero/runtime/snp';
|
|
669
383
|
```
|
|
670
384
|
|
|
@@ -683,24 +397,11 @@ export const selectedCapability = REPORT_BYTES;
|
|
|
683
397
|
<a id="forgezero-runtime-importers"></a>
|
|
684
398
|
## @forgezero/runtime/importers
|
|
685
399
|
|
|
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
|
|
400
|
+
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
401
|
|
|
688
402
|
```text
|
|
689
403
|
import {
|
|
690
404
|
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
405
|
} from '@forgezero/runtime/importers';
|
|
705
406
|
```
|
|
706
407
|
|
|
@@ -719,16 +420,11 @@ export const selectedCapability = IMPORT_FORMATS;
|
|
|
719
420
|
<a id="forgezero-runtime-openssh"></a>
|
|
720
421
|
## @forgezero/runtime/openssh
|
|
721
422
|
|
|
722
|
-
OpenSSH wire encoding, so a derived ed25519 key becomes a line that pastes into authorized_keys. This
|
|
423
|
+
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
424
|
|
|
724
425
|
```text
|
|
725
426
|
import {
|
|
726
427
|
OpenSshError,
|
|
727
|
-
authorizedKey,
|
|
728
|
-
fingerprint,
|
|
729
|
-
parseAuthorizedKey,
|
|
730
|
-
publicKeyBlob,
|
|
731
|
-
signatureBlob,
|
|
732
428
|
} from '@forgezero/runtime/openssh';
|
|
733
429
|
```
|
|
734
430
|
|
|
@@ -747,24 +443,11 @@ export const selectedCapability = OpenSshError;
|
|
|
747
443
|
<a id="forgezero-runtime-ssh-cert"></a>
|
|
748
444
|
## @forgezero/runtime/ssh-cert
|
|
749
445
|
|
|
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
|
|
446
|
+
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
447
|
|
|
752
448
|
```text
|
|
753
449
|
import {
|
|
754
450
|
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
451
|
} from '@forgezero/runtime/ssh-cert';
|
|
769
452
|
```
|
|
770
453
|
|
|
@@ -783,19 +466,11 @@ export const selectedCapability = CERT_TYPE_HOST;
|
|
|
783
466
|
<a id="forgezero-runtime-slip10"></a>
|
|
784
467
|
## @forgezero/runtime/slip10
|
|
785
468
|
|
|
786
|
-
SLIP-0010 derivation for ed25519, hardened-only — BIP-32 does not work on this curve and produces halves that do not correspond. This
|
|
469
|
+
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
470
|
|
|
788
471
|
```text
|
|
789
472
|
import {
|
|
790
473
|
HARDENED_OFFSET,
|
|
791
|
-
Slip10Error,
|
|
792
|
-
deriveChild,
|
|
793
|
-
derivePath,
|
|
794
|
-
masterFromSeed,
|
|
795
|
-
} from '@forgezero/runtime/slip10';
|
|
796
|
-
|
|
797
|
-
import type {
|
|
798
|
-
Slip10Node,
|
|
799
474
|
} from '@forgezero/runtime/slip10';
|
|
800
475
|
```
|
|
801
476
|
|
|
@@ -814,35 +489,11 @@ export const selectedCapability = HARDENED_OFFSET;
|
|
|
814
489
|
<a id="forgezero-runtime-identity"></a>
|
|
815
490
|
## @forgezero/runtime/identity
|
|
816
491
|
|
|
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
|
|
492
|
+
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
493
|
|
|
819
494
|
```text
|
|
820
495
|
import {
|
|
821
496
|
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
497
|
} from '@forgezero/runtime/identity';
|
|
847
498
|
```
|
|
848
499
|
|
|
@@ -861,26 +512,11 @@ export const selectedCapability = CLOCK_SKEW_SECONDS;
|
|
|
861
512
|
<a id="forgezero-runtime-schema"></a>
|
|
862
513
|
## @forgezero/runtime/schema
|
|
863
514
|
|
|
864
|
-
Validate against JSON Schema, restrict what a caller may declare, and describe a schema as a form. This
|
|
515
|
+
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
516
|
|
|
866
517
|
```text
|
|
867
518
|
import {
|
|
868
519
|
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
520
|
} from '@forgezero/runtime/schema';
|
|
885
521
|
```
|
|
886
522
|
|
|
@@ -910,19 +546,11 @@ const secretFields = writeOnlyPaths(fields);
|
|
|
910
546
|
<a id="forgezero-runtime-schema-typebox"></a>
|
|
911
547
|
## @forgezero/runtime/schema/typebox
|
|
912
548
|
|
|
913
|
-
The TypeBox validator behind that interface. This
|
|
549
|
+
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
550
|
|
|
915
551
|
```text
|
|
916
552
|
import {
|
|
917
553
|
T,
|
|
918
|
-
parse,
|
|
919
|
-
typebox,
|
|
920
|
-
typeboxQueryCodec,
|
|
921
|
-
} from '@forgezero/runtime/schema/typebox';
|
|
922
|
-
|
|
923
|
-
import type {
|
|
924
|
-
Static,
|
|
925
|
-
TSchema,
|
|
926
554
|
} from '@forgezero/runtime/schema/typebox';
|
|
927
555
|
```
|
|
928
556
|
|
|
@@ -950,24 +578,11 @@ const codec = typeboxQueryCodec(User);
|
|
|
950
578
|
<a id="forgezero-runtime-finance-discounts"></a>
|
|
951
579
|
## @forgezero/runtime/finance/discounts
|
|
952
580
|
|
|
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
|
|
581
|
+
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
582
|
|
|
955
583
|
```text
|
|
956
584
|
import {
|
|
957
585
|
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
586
|
} from '@forgezero/runtime/finance/discounts';
|
|
972
587
|
```
|
|
973
588
|
|
|
@@ -986,38 +601,11 @@ export const selectedCapability = DiscountError;
|
|
|
986
601
|
<a id="forgezero-runtime-finance-money"></a>
|
|
987
602
|
## @forgezero/runtime/finance/money
|
|
988
603
|
|
|
989
|
-
Exact amounts in minor units with the asset attached, so two currencies cannot be added. This
|
|
604
|
+
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
605
|
|
|
991
606
|
```text
|
|
992
607
|
import {
|
|
993
608
|
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
609
|
} from '@forgezero/runtime/finance/money';
|
|
1022
610
|
```
|
|
1023
611
|
|
|
@@ -1033,364 +621,14 @@ import {
|
|
|
1033
621
|
export const selectedCapability = ASSETS;
|
|
1034
622
|
```
|
|
1035
623
|
|
|
1036
|
-
<a id="forgezero-runtime-finance-venues"></a>
|
|
1037
|
-
## @forgezero/runtime/finance/venues
|
|
1038
|
-
|
|
1039
|
-
Trading venues, market types and symbols as data — spot, margin and futures behind one order model. This entry exposes 14 named value exports and 10 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1040
|
-
|
|
1041
|
-
```text
|
|
1042
|
-
import {
|
|
1043
|
-
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
|
-
} from '@forgezero/runtime/finance/venues';
|
|
1071
|
-
```
|
|
1072
|
-
|
|
1073
|
-
## @forgezero/runtime/finance/venues — Use this entry point
|
|
1074
|
-
|
|
1075
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1076
|
-
|
|
1077
|
-
```text
|
|
1078
|
-
import {
|
|
1079
|
-
MARKET_TYPES,
|
|
1080
|
-
} from '@forgezero/runtime/finance/venues';
|
|
1081
|
-
|
|
1082
|
-
export const selectedCapability = MARKET_TYPES;
|
|
1083
|
-
```
|
|
1084
|
-
|
|
1085
|
-
<a id="forgezero-runtime-finance-ledger"></a>
|
|
1086
|
-
## @forgezero/runtime/finance/ledger
|
|
1087
|
-
|
|
1088
|
-
Double-entry postings and derived balances. A hold is a posting, not a lock — the queue does the ordering. This entry exposes 21 named value exports and 6 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1089
|
-
|
|
1090
|
-
```text
|
|
1091
|
-
import {
|
|
1092
|
-
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
|
-
} from '@forgezero/runtime/finance/ledger';
|
|
1123
|
-
```
|
|
1124
|
-
|
|
1125
|
-
## @forgezero/runtime/finance/ledger — Use this entry point
|
|
1126
|
-
|
|
1127
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1128
|
-
|
|
1129
|
-
```text
|
|
1130
|
-
import {
|
|
1131
|
-
ACCOUNT_KINDS,
|
|
1132
|
-
} from '@forgezero/runtime/finance/ledger';
|
|
1133
|
-
|
|
1134
|
-
export const selectedCapability = ACCOUNT_KINDS;
|
|
1135
|
-
```
|
|
1136
|
-
|
|
1137
|
-
<a id="forgezero-runtime-finance-commission"></a>
|
|
1138
|
-
## @forgezero/runtime/finance/commission
|
|
1139
|
-
|
|
1140
|
-
Profit net of flows, a high-water mark, the tier split and the referral share of our income. This entry exposes 9 named value exports and 6 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1141
|
-
|
|
1142
|
-
```text
|
|
1143
|
-
import {
|
|
1144
|
-
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
|
-
} from '@forgezero/runtime/finance/commission';
|
|
1163
|
-
```
|
|
1164
|
-
|
|
1165
|
-
## @forgezero/runtime/finance/commission — Use this entry point
|
|
1166
|
-
|
|
1167
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1168
|
-
|
|
1169
|
-
```text
|
|
1170
|
-
import {
|
|
1171
|
-
CommissionError,
|
|
1172
|
-
} from '@forgezero/runtime/finance/commission';
|
|
1173
|
-
|
|
1174
|
-
export const selectedCapability = CommissionError;
|
|
1175
|
-
```
|
|
1176
|
-
|
|
1177
|
-
<a id="forgezero-runtime-finance-rates"></a>
|
|
1178
|
-
## @forgezero/runtime/finance/rates
|
|
1179
|
-
|
|
1180
|
-
What an asset is worth in USD, and how old that answer is. A peg never ages; a quote always does. This entry exposes 11 named value exports and 7 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1181
|
-
|
|
1182
|
-
```text
|
|
1183
|
-
import {
|
|
1184
|
-
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
|
-
} from '@forgezero/runtime/finance/rates';
|
|
1206
|
-
```
|
|
1207
|
-
|
|
1208
|
-
## @forgezero/runtime/finance/rates — Use this entry point
|
|
1209
|
-
|
|
1210
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1211
|
-
|
|
1212
|
-
```text
|
|
1213
|
-
import {
|
|
1214
|
-
BASE_ASSET,
|
|
1215
|
-
} from '@forgezero/runtime/finance/rates';
|
|
1216
|
-
|
|
1217
|
-
export const selectedCapability = BASE_ASSET;
|
|
1218
|
-
```
|
|
1219
|
-
|
|
1220
|
-
<a id="forgezero-runtime-finance-transfers"></a>
|
|
1221
|
-
## @forgezero/runtime/finance/transfers
|
|
1222
|
-
|
|
1223
|
-
Deposits and withdrawals as ordered pipelines, with screening reserved at position zero. This entry exposes 9 named value exports and 6 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1224
|
-
|
|
1225
|
-
```text
|
|
1226
|
-
import {
|
|
1227
|
-
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
|
-
} from '@forgezero/runtime/finance/transfers';
|
|
1246
|
-
```
|
|
1247
|
-
|
|
1248
|
-
## @forgezero/runtime/finance/transfers — Use this entry point
|
|
1249
|
-
|
|
1250
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1251
|
-
|
|
1252
|
-
```text
|
|
1253
|
-
import {
|
|
1254
|
-
DIRECTIONS,
|
|
1255
|
-
} from '@forgezero/runtime/finance/transfers';
|
|
1256
|
-
|
|
1257
|
-
export const selectedCapability = DIRECTIONS;
|
|
1258
|
-
```
|
|
1259
|
-
|
|
1260
|
-
<a id="forgezero-runtime-finance-chain"></a>
|
|
1261
|
-
## @forgezero/runtime/finance/chain
|
|
1262
|
-
|
|
1263
|
-
Which chains exist, their confirmation depth by value band, assets and explorers — as data an admin edits. This entry exposes 9 named value exports and 5 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1264
|
-
|
|
1265
|
-
```text
|
|
1266
|
-
import {
|
|
1267
|
-
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
|
-
} from '@forgezero/runtime/finance/chain';
|
|
1285
|
-
```
|
|
1286
|
-
|
|
1287
|
-
## @forgezero/runtime/finance/chain — Use this entry point
|
|
1288
|
-
|
|
1289
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1290
|
-
|
|
1291
|
-
```text
|
|
1292
|
-
import {
|
|
1293
|
-
ADDRESS_SCHEMES,
|
|
1294
|
-
} from '@forgezero/runtime/finance/chain';
|
|
1295
|
-
|
|
1296
|
-
export const selectedCapability = ADDRESS_SCHEMES;
|
|
1297
|
-
```
|
|
1298
|
-
|
|
1299
|
-
<a id="forgezero-runtime-finance-custody"></a>
|
|
1300
|
-
## @forgezero/runtime/finance/custody
|
|
1301
|
-
|
|
1302
|
-
Derive CREATE2 deposit addresses and EIP-712 custody digests — arithmetic over a seed and a salt, needing no credential and no node. This entry exposes 8 named value exports and 0 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1303
|
-
|
|
1304
|
-
```text
|
|
1305
|
-
import {
|
|
1306
|
-
CustodyError,
|
|
1307
|
-
VERSION,
|
|
1308
|
-
depositAddress,
|
|
1309
|
-
domainSeparator,
|
|
1310
|
-
orderSignatures,
|
|
1311
|
-
saltFor,
|
|
1312
|
-
toChecksumAddress,
|
|
1313
|
-
withdrawDigest,
|
|
1314
|
-
} from '@forgezero/runtime/finance/custody';
|
|
1315
|
-
```
|
|
1316
|
-
|
|
1317
|
-
## @forgezero/runtime/finance/custody — Use this entry point
|
|
1318
|
-
|
|
1319
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1320
|
-
|
|
1321
|
-
```text
|
|
1322
|
-
import {
|
|
1323
|
-
CustodyError,
|
|
1324
|
-
} from '@forgezero/runtime/finance/custody';
|
|
1325
|
-
|
|
1326
|
-
export const selectedCapability = CustodyError;
|
|
1327
|
-
```
|
|
1328
|
-
|
|
1329
|
-
<a id="forgezero-runtime-finance-derive"></a>
|
|
1330
|
-
## @forgezero/runtime/finance/derive
|
|
1331
|
-
|
|
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 entry exposes 11 named value exports and 4 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1333
|
-
|
|
1334
|
-
```text
|
|
1335
|
-
import {
|
|
1336
|
-
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
|
-
} from '@forgezero/runtime/finance/derive';
|
|
1355
|
-
```
|
|
1356
|
-
|
|
1357
|
-
## @forgezero/runtime/finance/derive — Use this entry point
|
|
1358
|
-
|
|
1359
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1360
|
-
|
|
1361
|
-
```text
|
|
1362
|
-
import {
|
|
1363
|
-
CUSTODY,
|
|
1364
|
-
} from '@forgezero/runtime/finance/derive';
|
|
1365
|
-
|
|
1366
|
-
export const selectedCapability = CUSTODY;
|
|
1367
|
-
```
|
|
1368
|
-
|
|
1369
624
|
<a id="forgezero-runtime-finance-tax"></a>
|
|
1370
625
|
## @forgezero/runtime/finance/tax
|
|
1371
626
|
|
|
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
|
|
627
|
+
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
628
|
|
|
1374
629
|
```text
|
|
1375
630
|
import {
|
|
1376
631
|
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
632
|
} from '@forgezero/runtime/finance/tax';
|
|
1395
633
|
```
|
|
1396
634
|
|
|
@@ -1409,22 +647,11 @@ export const selectedCapability = TREATMENTS;
|
|
|
1409
647
|
<a id="forgezero-runtime-finance-storage"></a>
|
|
1410
648
|
## @forgezero/runtime/finance/storage
|
|
1411
649
|
|
|
1412
|
-
Write an amount so it is both exact and sortable: an authoritative string, and a number that is only an index. This
|
|
650
|
+
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
651
|
|
|
1414
652
|
```text
|
|
1415
653
|
import {
|
|
1416
654
|
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
655
|
} from '@forgezero/runtime/finance/storage';
|
|
1429
656
|
```
|
|
1430
657
|
|
|
@@ -1443,33 +670,11 @@ export const selectedCapability = SORT_FIELD;
|
|
|
1443
670
|
<a id="forgezero-runtime-realtime"></a>
|
|
1444
671
|
## @forgezero/runtime/realtime
|
|
1445
672
|
|
|
1446
|
-
Provider-neutral realtime audience, shard, event and delivery contracts. This
|
|
673
|
+
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
674
|
|
|
1448
675
|
```text
|
|
1449
676
|
import {
|
|
1450
677
|
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
678
|
} from '@forgezero/runtime/realtime';
|
|
1474
679
|
```
|
|
1475
680
|
|
|
@@ -1488,25 +693,11 @@ export const selectedCapability = REALTIME_MAX_BATCH_BYTES;
|
|
|
1488
693
|
<a id="forgezero-runtime-passkey-hybrid"></a>
|
|
1489
694
|
## @forgezero/runtime/passkey-hybrid
|
|
1490
695
|
|
|
1491
|
-
Versioned WebAuthn PRF plus ML-DSA companion proof construction and verification. This
|
|
696
|
+
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
697
|
|
|
1493
698
|
```text
|
|
1494
699
|
import {
|
|
1495
700
|
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
701
|
} from '@forgezero/runtime/passkey-hybrid';
|
|
1511
702
|
```
|
|
1512
703
|
|
|
@@ -1525,18 +716,11 @@ export const selectedCapability = PASSKEY_HYBRID_SUITE;
|
|
|
1525
716
|
<a id="forgezero-runtime-otpauth"></a>
|
|
1526
717
|
## @forgezero/runtime/otpauth
|
|
1527
718
|
|
|
1528
|
-
Parse and render otpauth URIs without binding enrolment to a UI framework. This
|
|
719
|
+
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
720
|
|
|
1530
721
|
```text
|
|
1531
722
|
import {
|
|
1532
723
|
formatOtpAuth,
|
|
1533
|
-
fromManualSecret,
|
|
1534
|
-
newOtpAuth,
|
|
1535
|
-
parseOtpAuth,
|
|
1536
|
-
} from '@forgezero/runtime/otpauth';
|
|
1537
|
-
|
|
1538
|
-
import type {
|
|
1539
|
-
OtpAuth,
|
|
1540
724
|
} from '@forgezero/runtime/otpauth';
|
|
1541
725
|
```
|
|
1542
726
|
|
|
@@ -1555,22 +739,11 @@ export const selectedCapability = formatOtpAuth;
|
|
|
1555
739
|
<a id="forgezero-runtime-pipeline"></a>
|
|
1556
740
|
## @forgezero/runtime/pipeline
|
|
1557
741
|
|
|
1558
|
-
Typed ordered application-pipeline execution with explicit evidence. This
|
|
742
|
+
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
743
|
|
|
1560
744
|
```text
|
|
1561
745
|
import {
|
|
1562
746
|
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
747
|
} from '@forgezero/runtime/pipeline';
|
|
1575
748
|
```
|
|
1576
749
|
|
|
@@ -1586,225 +759,14 @@ import {
|
|
|
1586
759
|
export const selectedCapability = GIT_PROVIDERS;
|
|
1587
760
|
```
|
|
1588
761
|
|
|
1589
|
-
<a id="forgezero-runtime-finance-chain-addresses"></a>
|
|
1590
|
-
## @forgezero/runtime/finance/chain-addresses
|
|
1591
|
-
|
|
1592
|
-
Chain-address derivation records and validation independent of a node provider. This entry exposes 10 named value exports and 2 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1593
|
-
|
|
1594
|
-
```text
|
|
1595
|
-
import {
|
|
1596
|
-
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
|
-
} from '@forgezero/runtime/finance/chain-addresses';
|
|
1612
|
-
```
|
|
1613
|
-
|
|
1614
|
-
## @forgezero/runtime/finance/chain-addresses — Use this entry point
|
|
1615
|
-
|
|
1616
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1617
|
-
|
|
1618
|
-
```text
|
|
1619
|
-
import {
|
|
1620
|
-
AddressError,
|
|
1621
|
-
} from '@forgezero/runtime/finance/chain-addresses';
|
|
1622
|
-
|
|
1623
|
-
export const selectedCapability = AddressError;
|
|
1624
|
-
```
|
|
1625
|
-
|
|
1626
|
-
<a id="forgezero-runtime-finance-chain-deposits"></a>
|
|
1627
|
-
## @forgezero/runtime/finance/chain-deposits
|
|
1628
|
-
|
|
1629
|
-
Provider-neutral deposit observation, confirmation and credit transitions. This entry exposes 8 named value exports and 5 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1630
|
-
|
|
1631
|
-
```text
|
|
1632
|
-
import {
|
|
1633
|
-
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
|
-
} from '@forgezero/runtime/finance/chain-deposits';
|
|
1650
|
-
```
|
|
1651
|
-
|
|
1652
|
-
## @forgezero/runtime/finance/chain-deposits — Use this entry point
|
|
1653
|
-
|
|
1654
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1655
|
-
|
|
1656
|
-
```text
|
|
1657
|
-
import {
|
|
1658
|
-
DepositError,
|
|
1659
|
-
} from '@forgezero/runtime/finance/chain-deposits';
|
|
1660
|
-
|
|
1661
|
-
export const selectedCapability = DepositError;
|
|
1662
|
-
```
|
|
1663
|
-
|
|
1664
|
-
<a id="forgezero-runtime-finance-chain-withdrawals"></a>
|
|
1665
|
-
## @forgezero/runtime/finance/chain-withdrawals
|
|
1666
|
-
|
|
1667
|
-
Provider-neutral withdrawal approval, broadcast and finality transitions. This entry exposes 14 named value exports and 5 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1668
|
-
|
|
1669
|
-
```text
|
|
1670
|
-
import {
|
|
1671
|
-
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
|
-
} from '@forgezero/runtime/finance/chain-withdrawals';
|
|
1694
|
-
```
|
|
1695
|
-
|
|
1696
|
-
## @forgezero/runtime/finance/chain-withdrawals — Use this entry point
|
|
1697
|
-
|
|
1698
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1699
|
-
|
|
1700
|
-
```text
|
|
1701
|
-
import {
|
|
1702
|
-
WITHDRAWAL_STATES,
|
|
1703
|
-
} from '@forgezero/runtime/finance/chain-withdrawals';
|
|
1704
|
-
|
|
1705
|
-
export const selectedCapability = WITHDRAWAL_STATES;
|
|
1706
|
-
```
|
|
1707
|
-
|
|
1708
|
-
<a id="forgezero-runtime-finance-chain-reconcile"></a>
|
|
1709
|
-
## @forgezero/runtime/finance/chain-reconcile
|
|
1710
|
-
|
|
1711
|
-
Deterministic reconciliation between chain observations and durable transfer state. This entry exposes 5 named value exports and 5 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1712
|
-
|
|
1713
|
-
```text
|
|
1714
|
-
import {
|
|
1715
|
-
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
|
-
} from '@forgezero/runtime/finance/chain-reconcile';
|
|
1729
|
-
```
|
|
1730
|
-
|
|
1731
|
-
## @forgezero/runtime/finance/chain-reconcile — Use this entry point
|
|
1732
|
-
|
|
1733
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1734
|
-
|
|
1735
|
-
```text
|
|
1736
|
-
import {
|
|
1737
|
-
DISCREPANCY_KINDS,
|
|
1738
|
-
} from '@forgezero/runtime/finance/chain-reconcile';
|
|
1739
|
-
|
|
1740
|
-
export const selectedCapability = DISCREPANCY_KINDS;
|
|
1741
|
-
```
|
|
1742
|
-
|
|
1743
|
-
<a id="forgezero-runtime-finance-market"></a>
|
|
1744
|
-
## @forgezero/runtime/finance/market
|
|
1745
|
-
|
|
1746
|
-
Market order, fill and quote contracts independent of any exchange adapter. This entry exposes 8 named value exports and 7 named type exports. The generated import block lists one name per line for scanning and copying; keep only the names used by your file.
|
|
1747
|
-
|
|
1748
|
-
```text
|
|
1749
|
-
import {
|
|
1750
|
-
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
|
-
} from '@forgezero/runtime/finance/market';
|
|
1769
|
-
```
|
|
1770
|
-
|
|
1771
|
-
## @forgezero/runtime/finance/market — Use this entry point
|
|
1772
|
-
|
|
1773
|
-
This minimal executable use imports one concrete value from this exact entry point without a wildcard or package-root detour. Keep the value or values the application actually needs; the full named inventory remains directly above it.
|
|
1774
|
-
|
|
1775
|
-
```text
|
|
1776
|
-
import {
|
|
1777
|
-
MarketError,
|
|
1778
|
-
} from '@forgezero/runtime/finance/market';
|
|
1779
|
-
|
|
1780
|
-
export const selectedCapability = MarketError;
|
|
1781
|
-
```
|
|
1782
|
-
|
|
1783
762
|
<a id="forgezero-runtime-custody-share"></a>
|
|
1784
763
|
## @forgezero/runtime/custody-share
|
|
1785
764
|
|
|
1786
|
-
Threshold-share parsing, validation and reconstruction. This
|
|
765
|
+
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
766
|
|
|
1788
767
|
```text
|
|
1789
768
|
import {
|
|
1790
769
|
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
770
|
} from '@forgezero/runtime/custody-share';
|
|
1809
771
|
```
|
|
1810
772
|
|
|
@@ -1823,21 +785,11 @@ export const selectedCapability = PROBE_BYTES;
|
|
|
1823
785
|
<a id="forgezero-runtime-custody-crypto"></a>
|
|
1824
786
|
## @forgezero/runtime/custody-crypto
|
|
1825
787
|
|
|
1826
|
-
Hybrid ML-KEM-768 plus X25519 custody-share sealing and opening. This
|
|
788
|
+
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
789
|
|
|
1828
790
|
```text
|
|
1829
791
|
import {
|
|
1830
792
|
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
793
|
} from '@forgezero/runtime/custody-crypto';
|
|
1842
794
|
```
|
|
1843
795
|
|
|
@@ -1873,51 +825,38 @@ import {
|
|
|
1873
825
|
|
|
1874
826
|
## What is in it
|
|
1875
827
|
|
|
1876
|
-
Four groups. The service spine
|
|
828
|
+
Four groups. The service spine keeps work ordered after a response; record modules preserve evidence and recovery; identity modules provide portable security primitives; finance modules provide exact USD and multi-currency representation without importing a trading product.
|
|
1877
829
|
|
|
1878
830
|
```text
|
|
1879
|
-
SPINE jobs scheduled work
|
|
1880
|
-
queue
|
|
1881
|
-
outbox
|
|
831
|
+
SPINE jobs fenced scheduled work
|
|
832
|
+
queue parallel keys, sequential within one key
|
|
833
|
+
outbox transactional intent, bounded draining
|
|
1882
834
|
|
|
1883
|
-
RECORD audit append-only
|
|
1884
|
-
backup encrypted
|
|
1885
|
-
|
|
1886
|
-
calendar billing periods, working days, holidays, due dates
|
|
835
|
+
RECORD audit append-only hash-chain verification
|
|
836
|
+
backup encrypted snapshots and verified restore
|
|
837
|
+
calendar periods, working days and due dates
|
|
1887
838
|
|
|
1888
|
-
IDENTITY identity hybrid Ed25519 + ML-DSA-65
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
839
|
+
IDENTITY identity hybrid Ed25519 + ML-DSA-65 signing
|
|
840
|
+
passkey WebAuthn and recovery primitives
|
|
841
|
+
totp bounded RFC 6238 verification
|
|
842
|
+
notify escaped named notification templates
|
|
843
|
+
schema restricted validation and form descriptors
|
|
1892
844
|
|
|
1893
|
-
FINANCE money minor
|
|
1894
|
-
storage
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
rates what an asset is worth, and how old that answer is
|
|
1898
|
-
transfers deposits and withdrawals as ordered pipelines
|
|
1899
|
-
tax who may tax a sale, and who accounts for it
|
|
1900
|
-
chain chains, assets, confirmation depth by value band
|
|
1901
|
-
custody CREATE2 deposit addresses and EIP-712 digests
|
|
1902
|
-
derive declare a key ForgeZero generates, not the tenant
|
|
1903
|
-
venues trading venues, market types and symbols as data
|
|
1904
|
-
binance Binance behind the venue adapter
|
|
845
|
+
FINANCE money exact minor-unit strings with currency and scale
|
|
846
|
+
storage exact authority plus coarse indexed projection
|
|
847
|
+
discounts bounded price adjustments
|
|
848
|
+
tax jurisdiction and accounting decisions
|
|
1905
849
|
```
|
|
1906
850
|
|
|
1907
851
|
## Optional peers — install only what your subpath needs
|
|
1908
852
|
|
|
1909
|
-
Nothing third-party is bundled. Vendoring a crypto library means a fix
|
|
853
|
+
Nothing third-party is bundled. Vendoring a crypto library means a fix cannot reach you until this package republishes, so optional peer imports remain explicit. Most subpaths need nothing.
|
|
1910
854
|
|
|
1911
855
|
```text
|
|
1912
|
-
#
|
|
1913
|
-
|
|
1914
|
-
# finance/custody — CREATE2 and EIP-712 digests
|
|
1915
|
-
bun add @noble/hashes
|
|
1916
|
-
|
|
1917
|
-
# identity — hybrid post-quantum signing
|
|
856
|
+
# identity and hybrid passkeys
|
|
1918
857
|
bun add @noble/curves @noble/post-quantum
|
|
1919
858
|
|
|
1920
|
-
# schema/typebox
|
|
859
|
+
# schema/typebox — only if you validate with TypeBox
|
|
1921
860
|
bun add @sinclair/typebox
|
|
1922
861
|
```
|
|
1923
862
|
|
|
@@ -1946,18 +885,6 @@ const row = toStored(fee);
|
|
|
1946
885
|
rangeBounds(parseAmount('10', 'USD'), null); // { gte: 10 }
|
|
1947
886
|
```
|
|
1948
887
|
|
|
1949
|
-
## The contracts ship with it
|
|
1950
|
-
|
|
1951
|
-
The Solidity behind `finance/custody` is in the package rather than in a repository you have to go find. `finance/custody` computes the counterfactual address; `DepositFactory` is what makes that address real on first sweep, and `ColdVault` is the M-of-N EIP-712 approval the digests are built for. Address arithmetic without the contract that honours it is half an answer.
|
|
1952
|
-
|
|
1953
|
-
```text
|
|
1954
|
-
node_modules/@forgezero/runtime/contracts/src/
|
|
1955
|
-
DepositProxy.sol lazily deployed at first sweep — no key, no gas per address
|
|
1956
|
-
DepositFactory.sol CREATE2, salt opaque to the contract
|
|
1957
|
-
ColdVault.sol M-of-N, signatures ordered by ascending signer
|
|
1958
|
-
SafeTransferLib.sol tokens that do not return a bool
|
|
1959
|
-
```
|
|
1960
|
-
|
|
1961
888
|
## Jobs — background work that never overlaps
|
|
1962
889
|
|
|
1963
890
|
The lock and the cursor store are interfaces, so this runs against a database, Redis, or nothing at all in a test.
|
|
@@ -2001,13 +928,13 @@ Fetch a batch, process every item, then write the cursor — never per item and
|
|
|
2001
928
|
|
|
2002
929
|
```text
|
|
2003
930
|
cursorJob({
|
|
2004
|
-
key: '
|
|
2005
|
-
label: '
|
|
2006
|
-
every: '
|
|
931
|
+
key: 'rotate-provider-credentials',
|
|
932
|
+
label: 'Rotate provider credentials',
|
|
933
|
+
every: '1m',
|
|
2007
934
|
store: cursors,
|
|
2008
935
|
from: '0',
|
|
2009
|
-
fetch: (cursor) =>
|
|
2010
|
-
process: (
|
|
936
|
+
fetch: (cursor) => dueRotations(cursor),
|
|
937
|
+
process: (record) => rotateOnce(record) // keyed and idempotent
|
|
2011
938
|
});
|
|
2012
939
|
```
|
|
2013
940
|
|
|
@@ -2018,7 +945,7 @@ Returning from stop() before in-flight work settles is how a deploy leaves a rec
|
|
|
2018
945
|
```text
|
|
2019
946
|
await scheduler.stop(); // clears timers, aborts, awaits in-flight
|
|
2020
947
|
scheduler.pause(); // stop scheduling, let in-flight finish
|
|
2021
|
-
await scheduler.runNow('
|
|
948
|
+
await scheduler.runNow('rotate-provider-credentials');
|
|
2022
949
|
```
|
|
2023
950
|
|
|
2024
951
|
## Status somebody can read during an incident
|
|
@@ -2027,7 +954,7 @@ Last run, duration, result, error and consecutive failures per job. Without it a
|
|
|
2027
954
|
|
|
2028
955
|
```text
|
|
2029
956
|
scheduler.status();
|
|
2030
|
-
// [{ key: '
|
|
957
|
+
// [{ key: 'rotate-provider-credentials', state: 'idle', runs: 412,
|
|
2031
958
|
// lastDurationMs: 840, lastResult: { processed: 17, batches: 2 },
|
|
2032
959
|
// consecutiveFailures: 0, skippedLocked: 0 }]
|
|
2033
960
|
```
|