@moonbeam-foundation/sdk 0.12.0 → 0.13.1
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 +79 -18
- package/bin/moonbeam.mjs +4 -1
- package/dist/actors/track-record.d.ts +1 -1
- package/dist/actors/track-record.js +1 -1
- package/dist/arbitration/index.d.ts +10 -4
- package/dist/arbitration/index.d.ts.map +1 -1
- package/dist/arbitration/index.js +14 -2
- package/dist/arbitration/index.js.map +1 -1
- package/dist/assurance/assurance-shared.d.ts +85 -132
- package/dist/assurance/assurance-shared.js +46 -90
- package/dist/core/keyed.d.ts +17 -0
- package/dist/core/keyed.d.ts.map +1 -0
- package/dist/core/keyed.js +36 -0
- package/dist/core/keyed.js.map +1 -0
- package/dist/cover/index.d.ts +3 -3
- package/dist/cover/index.d.ts.map +1 -1
- package/dist/cover/index.js +2 -1
- package/dist/cover/index.js.map +1 -1
- package/dist/devnet/index.d.ts +3 -3
- package/dist/devnet/index.d.ts.map +1 -1
- package/dist/devnet/index.js +7 -6
- package/dist/devnet/index.js.map +1 -1
- package/dist/devnet/profile.d.ts +1 -1
- package/dist/devnet/profile.d.ts.map +1 -1
- package/dist/devnet/profile.js +3 -2
- package/dist/devnet/profile.js.map +1 -1
- package/dist/economy/index.d.ts +264 -0
- package/dist/economy/index.d.ts.map +1 -0
- package/dist/economy/index.js +376 -0
- package/dist/economy/index.js.map +1 -0
- package/dist/erc8183/index.d.ts +1 -1
- package/dist/errors/index.d.ts +5 -5
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +3 -3
- package/dist/jobs/index.d.ts +4 -4
- package/dist/jobs/index.d.ts.map +1 -1
- package/dist/jobs/index.js +3 -2
- package/dist/jobs/index.js.map +1 -1
- package/dist/market/cohorts.d.ts +112 -0
- package/dist/market/cohorts.d.ts.map +1 -0
- package/dist/market/cohorts.js +72 -0
- package/dist/market/cohorts.js.map +1 -0
- package/dist/market/http.d.ts.map +1 -1
- package/dist/market/http.js +2 -1
- package/dist/market/http.js.map +1 -1
- package/dist/market/index.d.ts +27 -17
- package/dist/market/index.d.ts.map +1 -1
- package/dist/market/index.js +16 -9
- package/dist/market/index.js.map +1 -1
- package/dist/market/journey.d.ts +7 -7
- package/dist/market/journey.d.ts.map +1 -1
- package/dist/market/journey.js +10 -9
- package/dist/market/journey.js.map +1 -1
- package/dist/market/listed.d.ts +228 -0
- package/dist/market/listed.d.ts.map +1 -0
- package/dist/market/listed.js +169 -0
- package/dist/market/listed.js.map +1 -0
- package/dist/market/reads.d.ts +124 -0
- package/dist/market/reads.d.ts.map +1 -0
- package/dist/market/reads.js +99 -0
- package/dist/market/reads.js.map +1 -0
- package/dist/market/sale-stops.d.ts +2 -2
- package/dist/market/sale-stops.d.ts.map +1 -1
- package/dist/market/states-data.d.ts +491 -0
- package/dist/market/states-data.d.ts.map +1 -0
- package/dist/market/states-data.js +4 -0
- package/dist/market/states-data.js.map +1 -0
- package/dist/market/states.d.ts +40 -0
- package/dist/market/states.d.ts.map +1 -0
- package/dist/market/states.js +36 -0
- package/dist/market/states.js.map +1 -0
- package/dist/market/venues-data.d.ts.map +1 -1
- package/dist/market/venues-data.js +808 -40
- package/dist/market/venues-data.js.map +1 -1
- package/dist/market/venues.d.ts +50 -5
- package/dist/market/venues.d.ts.map +1 -1
- package/dist/market/venues.js +23 -7
- package/dist/market/venues.js.map +1 -1
- package/dist/onboard/index.d.ts +215 -33
- package/dist/onboard/index.d.ts.map +1 -1
- package/dist/onboard/index.js +344 -34
- package/dist/onboard/index.js.map +1 -1
- package/dist/onboard/send.d.ts +43 -0
- package/dist/onboard/send.d.ts.map +1 -0
- package/dist/onboard/send.js +65 -0
- package/dist/onboard/send.js.map +1 -0
- package/dist/playground/cases.d.ts +72 -0
- package/dist/playground/cases.d.ts.map +1 -0
- package/dist/playground/cases.js +115 -0
- package/dist/playground/cases.js.map +1 -0
- package/dist/playground/doc.d.ts +2 -0
- package/dist/playground/doc.d.ts.map +1 -0
- package/dist/playground/doc.js +52 -0
- package/dist/playground/doc.js.map +1 -0
- package/dist/playground/index.d.ts +172 -0
- package/dist/playground/index.d.ts.map +1 -0
- package/dist/playground/index.js +246 -0
- package/dist/playground/index.js.map +1 -0
- package/dist/playground/nets.d.ts +79 -0
- package/dist/playground/nets.d.ts.map +1 -0
- package/dist/playground/nets.js +147 -0
- package/dist/playground/nets.js.map +1 -0
- package/dist/playground/ports.d.ts +93 -0
- package/dist/playground/ports.d.ts.map +1 -0
- package/dist/playground/ports.js +72 -0
- package/dist/playground/ports.js.map +1 -0
- package/dist/playground/stream.d.ts +106 -0
- package/dist/playground/stream.d.ts.map +1 -0
- package/dist/playground/stream.js +269 -0
- package/dist/playground/stream.js.map +1 -0
- package/dist/pools/index.d.ts +18 -7
- package/dist/pools/index.d.ts.map +1 -1
- package/dist/pools/index.js +31 -9
- package/dist/pools/index.js.map +1 -1
- package/dist/proof/index.d.ts +5 -5
- package/dist/proof/index.d.ts.map +1 -1
- package/dist/proof/index.js +3 -2
- package/dist/proof/index.js.map +1 -1
- package/dist/resale/index.d.ts +13 -13
- package/dist/resale/index.d.ts.map +1 -1
- package/dist/resale/index.js +20 -19
- package/dist/resale/index.js.map +1 -1
- package/dist/resale/payment-scheme.d.mts +2 -5
- package/dist/resale/payment-scheme.mjs +16 -116
- package/dist/resale/payment-scheme.pin.json +1 -2
- package/dist/resale/settle-rule.d.ts +3 -3
- package/dist/resale/settle-rule.d.ts.map +1 -1
- package/dist/resale/settle-rule.js +3 -3
- package/dist/resale/settle-rule.js.map +1 -1
- package/dist/rpc/index.js +1 -1
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/steps.d.ts +4 -4
- package/dist/workflows/steps.d.ts.map +1 -1
- package/dist/workflows/steps.js +4 -4
- package/dist/workflows/steps.js.map +1 -1
- package/dist/workflows/types.d.ts +1 -1
- package/dist/x402/index.d.ts +2 -2
- package/dist/x402/index.d.ts.map +1 -1
- package/dist/x402/index.js +5 -4
- package/dist/x402/index.js.map +1 -1
- package/docs/PATHS.md +96 -0
- package/docs/REFERENCE.md +52 -19
- package/docs/VENUES.md +85 -36
- package/docs/WORKFLOWS.md +3 -3
- package/docs/io-coverage.md +206 -0
- package/docs/playground.md +220 -0
- package/examples/24-resell-on-base.mjs +1 -1
- package/examples/50-x402-pay-a-wall.mjs +1 -1
- package/examples/51-read-a-proof.mjs +2 -2
- package/examples/README.md +1 -1
- package/examples/data/cross-list.recorded.json +1 -1
- package/examples/data/x402-wall-402.json +6 -6
- package/package.json +28 -4
- package/dist/assurance/assurance-shared.d.ts.map +0 -1
- package/dist/assurance/assurance-shared.js.map +0 -1
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @taifoon/assurance: the assurance product's core. _ASSURANCE_CORE_v1_
|
|
3
|
-
*
|
|
4
|
-
* ONE file with NO imports, pure and browser-safe, so a project that cannot install this package (the site, the SDKs)
|
|
5
|
-
* carries a byte-identical copy and pins its hash (scripts/sync.mjs). What is in it:
|
|
6
|
-
*
|
|
7
|
-
* machine the coordination state machine, generated from schemas/transitions.json: every state, every transition
|
|
8
|
-
* with its trigger and actor per lane, every timeout, ending and exclusion, the source vocabularies, the money
|
|
9
|
-
* effects, the external-cover policy machine, and the revenue hooks of schemas/phase-map.json.
|
|
10
|
-
* next next(state, event, ctx): one step of a job, from a named transition, a source event or the clock.
|
|
11
|
-
* endings endingOf(job): how a job ended, the verdict it writes into the seller's record, and what external cover
|
|
12
|
-
* does with it; whoCanEnd(state): who may end each held state, and when.
|
|
13
|
-
* the job the venue-neutral assured job: price, deposit, cover, evaluator, deadlines, terms.
|
|
14
|
-
* flows quote, buy, settle, claim, composed from an Economy the caller passes in (jev-wilson's economy); this file
|
|
15
|
-
* computes no premium, leg or compensation itself: it picks, checks and refuses.
|
|
16
|
-
*
|
|
17
|
-
* Nothing here reads a network, signs or holds a key. Amounts are bigint smallest units.
|
|
18
|
-
*/
|
|
19
1
|
export declare const MACHINE: {
|
|
20
2
|
readonly version: "coordination.transitions.v1";
|
|
21
3
|
readonly initial: "Open";
|
|
@@ -1320,7 +1302,7 @@ export type Transition = {
|
|
|
1320
1302
|
} | null;
|
|
1321
1303
|
by: Partial<Record<Lane, Trigger>>;
|
|
1322
1304
|
};
|
|
1323
|
-
|
|
1305
|
+
|
|
1324
1306
|
export type HookVersion = 'V1' | 'V2' | 'V3' | 'V4' | 'V5';
|
|
1325
1307
|
export type Ctx = {
|
|
1326
1308
|
lane: Lane;
|
|
@@ -1381,17 +1363,17 @@ export declare const ENDINGS: readonly [{
|
|
|
1381
1363
|
export declare const isState: (s: unknown) => s is State;
|
|
1382
1364
|
export declare const isTerminal: (s: State) => boolean;
|
|
1383
1365
|
export declare const holdsFunds: (s: State) => boolean;
|
|
1384
|
-
|
|
1366
|
+
|
|
1385
1367
|
export declare function lanesOf(lane: Lane): Lane[];
|
|
1386
|
-
|
|
1368
|
+
|
|
1387
1369
|
export declare function runsOn(t: Transition, ctx: Ctx): boolean;
|
|
1388
|
-
|
|
1370
|
+
|
|
1389
1371
|
export declare function triggerOf(t: Transition, lane: Lane): Trigger | null;
|
|
1390
|
-
|
|
1372
|
+
|
|
1391
1373
|
export declare const exits: (from: State, ctx: Ctx) => Transition[];
|
|
1392
|
-
|
|
1374
|
+
|
|
1393
1375
|
export declare function reachable(ctx: Ctx): State[];
|
|
1394
|
-
|
|
1376
|
+
|
|
1395
1377
|
export type Clock = {
|
|
1396
1378
|
expiredAt?: number;
|
|
1397
1379
|
deadline?: number;
|
|
@@ -1399,18 +1381,11 @@ export type Clock = {
|
|
|
1399
1381
|
disputeDeadline?: number;
|
|
1400
1382
|
arbitrationDeadline?: number;
|
|
1401
1383
|
};
|
|
1402
|
-
|
|
1384
|
+
|
|
1403
1385
|
export declare function clockKeys(after: string): (keyof Clock)[];
|
|
1404
|
-
|
|
1386
|
+
|
|
1405
1387
|
export declare function dueAt(t: Transition, clock: Clock): number | null;
|
|
1406
|
-
|
|
1407
|
-
* What happened to a job:
|
|
1408
|
-
* transition a named transition (what a plan or a contract call says it does)
|
|
1409
|
-
* event an event a venue emitted, in transitions.json's vocabulary (JobFunded, RejectProposed …); an effect that
|
|
1410
|
-
* decides no state (Refunded, EvaluatorFeePaid) leaves the state as it is
|
|
1411
|
-
* state a source that reports the state itself (memo-ACP's phase, the hook's State enum, a handshake state)
|
|
1412
|
-
* tick time passed: the default timeout transition whose deadline came first fires
|
|
1413
|
-
*/
|
|
1388
|
+
|
|
1414
1389
|
export type AssuranceEvent = {
|
|
1415
1390
|
kind: 'transition';
|
|
1416
1391
|
id: TransitionId;
|
|
@@ -1439,13 +1414,13 @@ export type Next = {
|
|
|
1439
1414
|
error: string;
|
|
1440
1415
|
};
|
|
1441
1416
|
export declare function next(state: State, ev: AssuranceEvent, ctx: Ctx): Next;
|
|
1442
|
-
|
|
1417
|
+
|
|
1443
1418
|
export declare const stateOf: {
|
|
1444
|
-
|
|
1419
|
+
|
|
1445
1420
|
hook: (n: number) => State | null;
|
|
1446
|
-
|
|
1421
|
+
|
|
1447
1422
|
memoPhase: (n: number) => State | null;
|
|
1448
|
-
|
|
1423
|
+
|
|
1449
1424
|
handshake: (s: string, delivered?: boolean) => State | null;
|
|
1450
1425
|
};
|
|
1451
1426
|
export type PathStep = {
|
|
@@ -1453,7 +1428,7 @@ export type PathStep = {
|
|
|
1453
1428
|
to: State;
|
|
1454
1429
|
transition: TransitionId;
|
|
1455
1430
|
};
|
|
1456
|
-
|
|
1431
|
+
|
|
1457
1432
|
export declare function run(events: AssuranceEvent[], ctx: Ctx, start?: State): {
|
|
1458
1433
|
ok: true;
|
|
1459
1434
|
state: State;
|
|
@@ -1473,21 +1448,21 @@ export type Exit = {
|
|
|
1473
1448
|
after: string | null;
|
|
1474
1449
|
isDefault: boolean;
|
|
1475
1450
|
};
|
|
1476
|
-
|
|
1451
|
+
|
|
1477
1452
|
export declare function whoCanEnd(state: State, ctx: Ctx): Exit[];
|
|
1478
|
-
|
|
1453
|
+
|
|
1479
1454
|
export declare function unblockable(state: State, ctx: Ctx): Exit | null;
|
|
1480
1455
|
export type Token = {
|
|
1481
1456
|
symbol: string;
|
|
1482
1457
|
decimals: number;
|
|
1483
1458
|
};
|
|
1484
|
-
|
|
1459
|
+
|
|
1485
1460
|
export type Attachment = 'hook' | 'external-cover' | 'none';
|
|
1486
1461
|
export type Compensation = {
|
|
1487
1462
|
noShow: bigint;
|
|
1488
1463
|
rejection: bigint;
|
|
1489
1464
|
};
|
|
1490
|
-
|
|
1465
|
+
|
|
1491
1466
|
export type Terms = {
|
|
1492
1467
|
token: Token;
|
|
1493
1468
|
price: bigint;
|
|
@@ -1513,14 +1488,14 @@ export type AssuredJob = {
|
|
|
1513
1488
|
clock: Clock;
|
|
1514
1489
|
state: State;
|
|
1515
1490
|
path: PathStep[];
|
|
1516
|
-
|
|
1491
|
+
|
|
1517
1492
|
paid?: boolean;
|
|
1518
|
-
|
|
1493
|
+
|
|
1519
1494
|
finding?: string | null;
|
|
1520
1495
|
};
|
|
1521
|
-
|
|
1496
|
+
|
|
1522
1497
|
export declare const deliveredOf: (job: Pick<AssuredJob, 'path' | 'state'>) => boolean;
|
|
1523
|
-
|
|
1498
|
+
|
|
1524
1499
|
export declare const fundedOf: (job: Pick<AssuredJob, 'path' | 'state'>) => boolean;
|
|
1525
1500
|
export type Ending = {
|
|
1526
1501
|
id: EndingId;
|
|
@@ -1530,9 +1505,9 @@ export type Ending = {
|
|
|
1530
1505
|
jevCase: boolean;
|
|
1531
1506
|
excluded: string | null;
|
|
1532
1507
|
};
|
|
1533
|
-
|
|
1508
|
+
|
|
1534
1509
|
export declare function endingOf(job: Pick<AssuredJob, 'path' | 'state' | 'ctx' | 'paid'>): Ending;
|
|
1535
|
-
|
|
1510
|
+
|
|
1536
1511
|
export declare function coverEndingOf(ending: EndingId, o: {
|
|
1537
1512
|
price: bigint;
|
|
1538
1513
|
refunded: bigint;
|
|
@@ -1546,7 +1521,7 @@ export declare function coverEndingOf(ending: EndingId, o: {
|
|
|
1546
1521
|
pays: boolean;
|
|
1547
1522
|
premium: string;
|
|
1548
1523
|
};
|
|
1549
|
-
|
|
1524
|
+
|
|
1550
1525
|
export type SellerRecord = {
|
|
1551
1526
|
correct: number;
|
|
1552
1527
|
incorrect: number;
|
|
@@ -1560,7 +1535,7 @@ export type EconomyInput = {
|
|
|
1560
1535
|
cover?: bigint;
|
|
1561
1536
|
attachment: Attachment;
|
|
1562
1537
|
};
|
|
1563
|
-
|
|
1538
|
+
|
|
1564
1539
|
export type Legs = {
|
|
1565
1540
|
buyer: bigint;
|
|
1566
1541
|
seller: bigint;
|
|
@@ -1568,7 +1543,7 @@ export type Legs = {
|
|
|
1568
1543
|
layer: bigint;
|
|
1569
1544
|
evaluator: bigint;
|
|
1570
1545
|
};
|
|
1571
|
-
|
|
1546
|
+
|
|
1572
1547
|
export type MoneyEnding = 'completed' | 'auto_completed' | 'rejected' | 'no_show' | 'expired_delivered' | 'unaccepted' | 'cheated';
|
|
1573
1548
|
export type EconomyQuote = {
|
|
1574
1549
|
insurable: boolean;
|
|
@@ -1580,22 +1555,22 @@ export type EconomyQuote = {
|
|
|
1580
1555
|
deposit: bigint;
|
|
1581
1556
|
cover: bigint;
|
|
1582
1557
|
compensation: Compensation;
|
|
1583
|
-
|
|
1558
|
+
|
|
1584
1559
|
legs: Partial<Record<MoneyEnding, Legs>>;
|
|
1585
1560
|
};
|
|
1586
|
-
|
|
1561
|
+
|
|
1587
1562
|
export type Economy = (i: EconomyInput) => EconomyQuote;
|
|
1588
1563
|
export type Refused = {
|
|
1589
1564
|
ok: false;
|
|
1590
1565
|
why: string[];
|
|
1591
1566
|
};
|
|
1592
|
-
|
|
1567
|
+
|
|
1593
1568
|
export declare function quote(i: EconomyInput, economy: Economy): {
|
|
1594
1569
|
ok: true;
|
|
1595
1570
|
terms: Terms;
|
|
1596
1571
|
quote: EconomyQuote;
|
|
1597
1572
|
} | Refused;
|
|
1598
|
-
|
|
1573
|
+
|
|
1599
1574
|
export declare function buy(job: Omit<AssuredJob, 'state' | 'path' | 'terms'>, terms: Terms, opts?: {
|
|
1600
1575
|
open?: boolean;
|
|
1601
1576
|
}): {
|
|
@@ -1603,16 +1578,16 @@ export declare function buy(job: Omit<AssuredJob, 'state' | 'path' | 'terms'>, t
|
|
|
1603
1578
|
job: AssuredJob;
|
|
1604
1579
|
transition: TransitionId;
|
|
1605
1580
|
} | Refused;
|
|
1606
|
-
|
|
1581
|
+
|
|
1607
1582
|
export declare function moneyEndingOf(job: Pick<AssuredJob, 'path' | 'state' | 'ctx'>): MoneyEnding | null;
|
|
1608
|
-
|
|
1583
|
+
|
|
1609
1584
|
export declare function settle(job: AssuredJob, q: EconomyQuote): {
|
|
1610
1585
|
ok: true;
|
|
1611
1586
|
ending: Ending;
|
|
1612
1587
|
money: MoneyEnding;
|
|
1613
1588
|
legs: Legs;
|
|
1614
1589
|
} | Refused;
|
|
1615
|
-
|
|
1590
|
+
|
|
1616
1591
|
export declare function claim(job: AssuredJob, q: EconomyQuote): {
|
|
1617
1592
|
ok: true;
|
|
1618
1593
|
claims: {
|
|
@@ -1620,7 +1595,7 @@ export declare function claim(job: AssuredJob, q: EconomyQuote): {
|
|
|
1620
1595
|
amount: bigint;
|
|
1621
1596
|
}[];
|
|
1622
1597
|
} | Refused;
|
|
1623
|
-
|
|
1598
|
+
|
|
1624
1599
|
export declare const revenueOf: (hooks: readonly RevenueHook[]) => ({
|
|
1625
1600
|
readonly hook: "grades_pay_to_key";
|
|
1626
1601
|
readonly phase: 1;
|
|
@@ -1667,33 +1642,14 @@ export declare const revenueOf: (hooks: readonly RevenueHook[]) => ({
|
|
|
1667
1642
|
readonly lane: "an enterprise partner's bond and its members' hires";
|
|
1668
1643
|
readonly gate: null;
|
|
1669
1644
|
})[];
|
|
1670
|
-
|
|
1671
|
-
* attest: the attested mark, the on-chain attestation and the stamp of one step (a grade, an assurance settle, a resale
|
|
1672
|
-
* step), as UNSIGNED calls aimed at a default network chosen by profile. _ATTEST_BY_DEFAULT_v1_
|
|
1673
|
-
*
|
|
1674
|
-
* ONE file with NO imports, pure and browser-safe, like assurance.ts: @taifoon/jev, @taifoon/assurance (and through its
|
|
1675
|
-
* sync, taifoon-sdk and moonbeam-sdk) carry a byte-identical copy and pin its hash. The addresses come from the address
|
|
1676
|
-
* registry (packages/addresses) through scripts/gen-attest.mjs; nothing below the generated block names an address.
|
|
1677
|
-
*
|
|
1678
|
-
* mark what is attested, offline: the step's kind, the subject ids (decision log + stamp registry) and the
|
|
1679
|
-
* digest = keccak256 of the canonical JSON body (or the digest the caller already has, e.g. Jev's).
|
|
1680
|
-
* attestation JevDecisionLog.record(subject, kind, digest, confidenceBps, model, uri) on every target network, after
|
|
1681
|
-
* JevAnswerLog.record(...) when the step carries Jev's answers.
|
|
1682
|
-
* stamp GradeStampRegistry.stamp(subject, digest, verdict, mode, model, uri) when the step has a verdict.
|
|
1683
|
-
*
|
|
1684
|
-
* Recording is ON by default (the owner's rule of 2026-10-14): profile taifoon → the Taifoon devnet 36927 and the Taifoon
|
|
1685
|
-
* mainnet 3692781 (GRID); profile moonbeam → Base 8453. Any network can be named instead; `networks: 'none'` opts out
|
|
1686
|
-
* (the mark is still returned). A contract the registry does not have on a target network is listed in `missing`, with
|
|
1687
|
-
* no call: nothing is faked. Nothing here signs or sends; the caller signs the calls.
|
|
1688
|
-
*/
|
|
1689
|
-
/** The attestation contracts on every chain the address registry has one on (superseded deploys left out). */
|
|
1645
|
+
|
|
1690
1646
|
export declare const ATTEST_TARGETS: Readonly<Record<number, {
|
|
1691
1647
|
name: string;
|
|
1692
1648
|
decisionLog: string | null;
|
|
1693
1649
|
answerLog: string | null;
|
|
1694
1650
|
stampRegistry: string | null;
|
|
1695
1651
|
}>>;
|
|
1696
|
-
|
|
1652
|
+
|
|
1697
1653
|
export declare const ATTEST_PROFILES: {
|
|
1698
1654
|
readonly taifoon: readonly [36927, 3692781];
|
|
1699
1655
|
readonly moonbeam: readonly [8453];
|
|
@@ -1713,30 +1669,30 @@ export type AttestMissing = {
|
|
|
1713
1669
|
contract: 'JevDecisionLog' | 'JevAnswerLog' | 'GradeStampRegistry';
|
|
1714
1670
|
why: string;
|
|
1715
1671
|
};
|
|
1716
|
-
|
|
1672
|
+
|
|
1717
1673
|
export type StampVerdict = 1 | 2 | 3 | 4;
|
|
1718
1674
|
export type AttestInput = {
|
|
1719
|
-
|
|
1675
|
+
|
|
1720
1676
|
kind: string;
|
|
1721
|
-
|
|
1677
|
+
|
|
1722
1678
|
subject: {
|
|
1723
1679
|
chainId: number;
|
|
1724
1680
|
contract: string;
|
|
1725
1681
|
jobId: string | number | bigint;
|
|
1726
1682
|
};
|
|
1727
|
-
|
|
1683
|
+
|
|
1728
1684
|
body?: unknown | undefined;
|
|
1729
1685
|
digest?: AttestHex | undefined;
|
|
1730
|
-
|
|
1686
|
+
|
|
1731
1687
|
confidenceBps?: number | undefined;
|
|
1732
|
-
|
|
1688
|
+
|
|
1733
1689
|
model: string;
|
|
1734
|
-
|
|
1690
|
+
|
|
1735
1691
|
uri?: string | undefined;
|
|
1736
|
-
|
|
1692
|
+
|
|
1737
1693
|
verdict?: StampVerdict | null | undefined;
|
|
1738
1694
|
mode?: 1 | 2 | undefined;
|
|
1739
|
-
|
|
1695
|
+
|
|
1740
1696
|
answers?: {
|
|
1741
1697
|
useCase: string;
|
|
1742
1698
|
inputDigest: AttestHex;
|
|
@@ -1745,11 +1701,11 @@ export type AttestInput = {
|
|
|
1745
1701
|
} | undefined;
|
|
1746
1702
|
};
|
|
1747
1703
|
export type AttestOptions = {
|
|
1748
|
-
|
|
1704
|
+
|
|
1749
1705
|
profile?: AttestProfile | undefined;
|
|
1750
|
-
|
|
1706
|
+
|
|
1751
1707
|
networks?: readonly number[] | 'none' | undefined;
|
|
1752
|
-
|
|
1708
|
+
|
|
1753
1709
|
targets?: Readonly<Record<number, Partial<{
|
|
1754
1710
|
name: string;
|
|
1755
1711
|
decisionLog: string | null;
|
|
@@ -1769,41 +1725,40 @@ export type Attested = {
|
|
|
1769
1725
|
model: string;
|
|
1770
1726
|
uri: string;
|
|
1771
1727
|
};
|
|
1772
|
-
|
|
1728
|
+
|
|
1773
1729
|
recorded: boolean;
|
|
1774
1730
|
networks: number[];
|
|
1775
1731
|
calls: AttestCall[];
|
|
1776
1732
|
missing: AttestMissing[];
|
|
1777
|
-
|
|
1733
|
+
|
|
1778
1734
|
status: 'ready' | 'partial' | 'missing' | 'none';
|
|
1779
1735
|
};
|
|
1780
1736
|
export declare function attestKeccak(input: Uint8Array | string): AttestHex;
|
|
1781
1737
|
export declare const DECISION_LOG_RECORD_SIG = "record(bytes32,bytes32,bytes32,uint16,string,string)";
|
|
1782
1738
|
export declare const ANSWER_LOG_RECORD_SIG = "record(bytes32,bytes32,bytes32,bytes32,bytes32,string,string)";
|
|
1783
1739
|
export declare const STAMP_SIG = "stamp(bytes32,bytes32,uint8,uint8,string,string)";
|
|
1784
|
-
|
|
1740
|
+
|
|
1785
1741
|
export declare function attestCanonical(v: unknown): string;
|
|
1786
|
-
|
|
1742
|
+
|
|
1787
1743
|
export declare const decisionSubjectOf: (chainId: number, at: string, ref: string | number | bigint) => AttestHex;
|
|
1788
|
-
|
|
1744
|
+
|
|
1789
1745
|
export declare const stampSubjectOf: (chainId: number, jobContract: string, jobId: string | number | bigint) => AttestHex;
|
|
1790
|
-
|
|
1791
|
-
* a Jev case (rejected or expired after delivery) → 4, it takes a grade to say more; incorrect → 3; excluded → no stamp */
|
|
1746
|
+
|
|
1792
1747
|
export declare function stampVerdictOfEnding(e: {
|
|
1793
1748
|
verdict: string;
|
|
1794
1749
|
jevCase: boolean;
|
|
1795
1750
|
excluded: string | null;
|
|
1796
1751
|
}): StampVerdict | null;
|
|
1797
|
-
|
|
1752
|
+
|
|
1798
1753
|
export declare function attest(input: AttestInput, opts?: AttestOptions): Attested;
|
|
1799
1754
|
export type SettleAttestOptions = AttestOptions & {
|
|
1800
|
-
|
|
1755
|
+
|
|
1801
1756
|
contract: string;
|
|
1802
|
-
|
|
1757
|
+
|
|
1803
1758
|
model?: string | undefined;
|
|
1804
1759
|
uri?: string | undefined;
|
|
1805
1760
|
};
|
|
1806
|
-
|
|
1761
|
+
|
|
1807
1762
|
export declare const settleBodyOf: (job: AssuredJob, contract: string, s: {
|
|
1808
1763
|
ending: Ending;
|
|
1809
1764
|
money: MoneyEnding;
|
|
@@ -1819,7 +1774,7 @@ export declare const settleBodyOf: (job: AssuredJob, contract: string, s: {
|
|
|
1819
1774
|
money: MoneyEnding;
|
|
1820
1775
|
legs: Legs;
|
|
1821
1776
|
};
|
|
1822
|
-
|
|
1777
|
+
|
|
1823
1778
|
export declare function settleAttested(job: AssuredJob, q: EconomyQuote, opts: SettleAttestOptions): {
|
|
1824
1779
|
ok: true;
|
|
1825
1780
|
ending: Ending;
|
|
@@ -1827,16 +1782,16 @@ export declare function settleAttested(job: AssuredJob, q: EconomyQuote, opts: S
|
|
|
1827
1782
|
legs: Legs;
|
|
1828
1783
|
attest: Attested;
|
|
1829
1784
|
} | Refused;
|
|
1830
|
-
|
|
1785
|
+
|
|
1831
1786
|
export type Ref = {
|
|
1832
1787
|
system: string;
|
|
1833
1788
|
chain: number;
|
|
1834
1789
|
name: string;
|
|
1835
1790
|
};
|
|
1836
|
-
|
|
1791
|
+
|
|
1837
1792
|
export type Attach = 'hook-cover' | 'external-cover' | 'evaluator-seat' | 'grade' | 'proof';
|
|
1838
1793
|
export type VenueId = 'taifoon-hook' | 'moonbeam' | 'virtuals-acp' | 'memo-acp' | 'bitagent' | 'erc8183' | 'x402' | 'olas-mech';
|
|
1839
|
-
|
|
1794
|
+
|
|
1840
1795
|
export type NativeStep = {
|
|
1841
1796
|
name: string;
|
|
1842
1797
|
phase?: number;
|
|
@@ -1848,20 +1803,20 @@ export type VenueAdapter = {
|
|
|
1848
1803
|
id: VenueId;
|
|
1849
1804
|
name: string;
|
|
1850
1805
|
status: 'live' | 'devnet' | 'observed' | 'prepared' | 'read-only';
|
|
1851
|
-
|
|
1806
|
+
|
|
1852
1807
|
ctx: Ctx | null;
|
|
1853
1808
|
observedLane?: string;
|
|
1854
|
-
|
|
1809
|
+
|
|
1855
1810
|
chains: {
|
|
1856
1811
|
chainId: number;
|
|
1857
1812
|
escrow: Ref | null;
|
|
1858
1813
|
status: 'live' | 'devnet' | 'prepared' | 'read-only';
|
|
1859
1814
|
line?: AssetLineId;
|
|
1860
1815
|
}[];
|
|
1861
|
-
|
|
1816
|
+
|
|
1862
1817
|
payment: string;
|
|
1863
1818
|
asset: string;
|
|
1864
|
-
|
|
1819
|
+
|
|
1865
1820
|
moneyAt: Partial<Record<State, string>>;
|
|
1866
1821
|
refund: {
|
|
1867
1822
|
rule: 'hook' | 'claim' | 'claim-if-deployed' | 'none';
|
|
@@ -1871,54 +1826,52 @@ export type VenueAdapter = {
|
|
|
1871
1826
|
kind: Attach;
|
|
1872
1827
|
how: string;
|
|
1873
1828
|
}[];
|
|
1874
|
-
|
|
1829
|
+
|
|
1875
1830
|
revenue: {
|
|
1876
1831
|
hook: RevenueHook;
|
|
1877
1832
|
how: string;
|
|
1878
1833
|
}[];
|
|
1879
|
-
|
|
1834
|
+
|
|
1880
1835
|
observe: {
|
|
1881
1836
|
index: string;
|
|
1882
1837
|
adapter: string;
|
|
1883
1838
|
reads: string[];
|
|
1884
1839
|
};
|
|
1885
|
-
|
|
1840
|
+
|
|
1886
1841
|
coverVenue: 'erc8183' | 'bitagent' | 'memo-acp' | 'olas-mech' | 'x402' | null;
|
|
1887
|
-
|
|
1842
|
+
|
|
1888
1843
|
publicWrites: boolean;
|
|
1889
|
-
|
|
1844
|
+
|
|
1890
1845
|
needs: string[];
|
|
1891
1846
|
};
|
|
1892
|
-
|
|
1893
|
-
* that asset, with pools in that asset; a pool covers only jobs in its own asset. Every line walks the hook lane. */
|
|
1847
|
+
|
|
1894
1848
|
export type AssetLineId = 'grid';
|
|
1895
1849
|
export type AssetLine = {
|
|
1896
1850
|
id: AssetLineId;
|
|
1897
|
-
|
|
1851
|
+
name: string;
|
|
1898
1852
|
chainId: number;
|
|
1899
1853
|
asset: {
|
|
1900
1854
|
symbol: string;
|
|
1901
1855
|
decimals: number;
|
|
1902
1856
|
pegUsd: number | null;
|
|
1903
1857
|
};
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1858
|
+
status: 'live' | 'prepared';
|
|
1859
|
+
opens: string | null;
|
|
1860
|
+
promise: string;
|
|
1861
|
+
never: string;
|
|
1862
|
+
|
|
1909
1863
|
economy: {
|
|
1910
1864
|
calibration: string;
|
|
1911
1865
|
maxPremiumBps: number;
|
|
1912
1866
|
minBackersAprBps: number;
|
|
1913
1867
|
};
|
|
1914
|
-
|
|
1915
|
-
|
|
1868
|
+
revenue: RevenueHook;
|
|
1869
|
+
needs: string[];
|
|
1916
1870
|
};
|
|
1917
|
-
|
|
1871
|
+
|
|
1918
1872
|
export declare function eventsOf(trail: NativeStep[]): AssuranceEvent[];
|
|
1919
|
-
|
|
1873
|
+
|
|
1920
1874
|
export declare const knownHook: (h: string) => boolean;
|
|
1921
1875
|
export declare const moonbeamVenue: VenueAdapter;
|
|
1922
|
-
|
|
1876
|
+
|
|
1923
1877
|
export declare const VENUES: Partial<Record<VenueId, VenueAdapter>>;
|
|
1924
|
-
//# sourceMappingURL=assurance-shared.d.ts.map
|