@dexterai/vault 0.4.2 → 0.5.0

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.
@@ -124,6 +124,15 @@
124
124
  "name": "vault",
125
125
  "writable": true
126
126
  },
127
+ {
128
+ "name": "vault_usdc_ata",
129
+ "docs": [
130
+ "The swig wallet's USDC ATA — read live to enforce the reservation",
131
+ "invariant per V0.3 Decision 1: post-withdrawal balance must remain",
132
+ "at or above `vault.outstanding_locked_amount`. The token account's",
133
+ "`owner` field must match the swig_wallet_address PDA."
134
+ ]
135
+ },
127
136
  {
128
137
  "name": "instructions_sysvar",
129
138
  "address": "Sysvar1nstructions1111111111111111111111111"
@@ -224,6 +233,279 @@
224
233
  }
225
234
  ]
226
235
  },
236
+ {
237
+ "name": "lock_voucher",
238
+ "discriminator": [
239
+ 91,
240
+ 138,
241
+ 5,
242
+ 227,
243
+ 119,
244
+ 239,
245
+ 48,
246
+ 254
247
+ ],
248
+ "accounts": [
249
+ {
250
+ "name": "vault",
251
+ "writable": true
252
+ },
253
+ {
254
+ "name": "vault_usdc_ata",
255
+ "docs": [
256
+ "The swig wallet's USDC ATA — read to enforce the vault-balance",
257
+ "self-check per V0.3 Decision 1. The handler cross-checks that this",
258
+ "token account's `owner` field equals the canonical swig wallet PDA",
259
+ "derived below so a caller cannot pass an unrelated funded ATA."
260
+ ]
261
+ },
262
+ {
263
+ "name": "swig"
264
+ },
265
+ {
266
+ "name": "swig_wallet_address",
267
+ "pda": {
268
+ "seeds": [
269
+ {
270
+ "kind": "const",
271
+ "value": [
272
+ 115,
273
+ 119,
274
+ 105,
275
+ 103,
276
+ 45,
277
+ 119,
278
+ 97,
279
+ 108,
280
+ 108,
281
+ 101,
282
+ 116,
283
+ 45,
284
+ 97,
285
+ 100,
286
+ 100,
287
+ 114,
288
+ 101,
289
+ 115,
290
+ 115
291
+ ]
292
+ },
293
+ {
294
+ "kind": "account",
295
+ "path": "swig"
296
+ }
297
+ ],
298
+ "program": {
299
+ "kind": "const",
300
+ "value": [
301
+ 13,
302
+ 12,
303
+ 233,
304
+ 66,
305
+ 225,
306
+ 231,
307
+ 197,
308
+ 6,
309
+ 226,
310
+ 24,
311
+ 223,
312
+ 13,
313
+ 125,
314
+ 241,
315
+ 197,
316
+ 47,
317
+ 175,
318
+ 220,
319
+ 53,
320
+ 41,
321
+ 228,
322
+ 141,
323
+ 103,
324
+ 77,
325
+ 29,
326
+ 178,
327
+ 76,
328
+ 117,
329
+ 181,
330
+ 76,
331
+ 204,
332
+ 190
333
+ ]
334
+ }
335
+ }
336
+ },
337
+ {
338
+ "name": "claim",
339
+ "docs": [
340
+ "Claim PDA created in this instruction."
341
+ ],
342
+ "writable": true
343
+ },
344
+ {
345
+ "name": "seller_holder",
346
+ "docs": [
347
+ "Holder at creation — the seller who collected the voucher."
348
+ ],
349
+ "signer": true
350
+ },
351
+ {
352
+ "name": "dexter_authority",
353
+ "docs": [
354
+ "Fee gate (matches settle_tab_voucher's discipline). Recorded on the",
355
+ "vault at init; only this key authorizes the accumulator mutation."
356
+ ],
357
+ "signer": true,
358
+ "relations": [
359
+ "vault"
360
+ ]
361
+ },
362
+ {
363
+ "name": "payer",
364
+ "docs": [
365
+ "Pays rent for the claim PDA. May be dexter_authority, may be a",
366
+ "separate funder. Not security-load-bearing."
367
+ ],
368
+ "writable": true,
369
+ "signer": true
370
+ },
371
+ {
372
+ "name": "system_program",
373
+ "address": "11111111111111111111111111111111"
374
+ },
375
+ {
376
+ "name": "instructions_sysvar",
377
+ "address": "Sysvar1nstructions1111111111111111111111111"
378
+ }
379
+ ],
380
+ "args": [
381
+ {
382
+ "name": "args",
383
+ "type": {
384
+ "defined": {
385
+ "name": "LockVoucherArgs"
386
+ }
387
+ }
388
+ }
389
+ ]
390
+ },
391
+ {
392
+ "name": "migrate_v2_to_v3",
393
+ "discriminator": [
394
+ 25,
395
+ 157,
396
+ 17,
397
+ 205,
398
+ 179,
399
+ 34,
400
+ 196,
401
+ 207
402
+ ],
403
+ "accounts": [
404
+ {
405
+ "name": "vault",
406
+ "docs": [
407
+ "V3 struct, so it CANNOT be loaded as `Account<'info, Vault>` (the",
408
+ "auto-deserialize would over-run the buffer on the `active_session`",
409
+ "field). We validate it manually in the handler: discriminator match,",
410
+ "version == 2, and `dexter_authority` ownership. We also require it be",
411
+ "owned by this program before touching its bytes."
412
+ ],
413
+ "writable": true
414
+ },
415
+ {
416
+ "name": "dexter_authority",
417
+ "docs": [
418
+ "Must equal the vault's recorded `dexter_authority`. Same authority that",
419
+ "gates `settle_voucher` / `rotate_dexter_authority`. Validated by hand",
420
+ "against the raw buffer (no `has_one`, since the vault is untyped here)."
421
+ ],
422
+ "signer": true
423
+ },
424
+ {
425
+ "name": "payer",
426
+ "docs": [
427
+ "Funds the rent for the 16 extra bytes the realloc adds. A separate",
428
+ "signer so the authority key need not hold lamports."
429
+ ],
430
+ "writable": true,
431
+ "signer": true
432
+ },
433
+ {
434
+ "name": "system_program",
435
+ "address": "11111111111111111111111111111111"
436
+ }
437
+ ],
438
+ "args": [
439
+ {
440
+ "name": "args",
441
+ "type": {
442
+ "defined": {
443
+ "name": "MigrateV2ToV3Args"
444
+ }
445
+ }
446
+ }
447
+ ]
448
+ },
449
+ {
450
+ "name": "migrate_v3_to_v4",
451
+ "discriminator": [
452
+ 28,
453
+ 136,
454
+ 16,
455
+ 88,
456
+ 66,
457
+ 176,
458
+ 223,
459
+ 54
460
+ ],
461
+ "accounts": [
462
+ {
463
+ "name": "vault",
464
+ "docs": [
465
+ "(305 bytes on mainnet). We deliberately do NOT load it as",
466
+ "`Account<'info, Vault>`, because Anchor would auto-deserialize it against",
467
+ "the CURRENT (larger, V4) struct and over-run the still-V3-sized buffer. We",
468
+ "validate it by hand in the handler: discriminator match, version == 3, and",
469
+ "`dexter_authority` ownership. We also require it be owned by this program",
470
+ "before touching its bytes."
471
+ ],
472
+ "writable": true
473
+ },
474
+ {
475
+ "name": "dexter_authority",
476
+ "docs": [
477
+ "Must equal the vault's recorded `dexter_authority`. Same authority that",
478
+ "gates `settle_voucher` / `rotate_dexter_authority`. Validated by hand",
479
+ "against the decoded V3 struct (no `has_one`, since the vault is untyped",
480
+ "here)."
481
+ ],
482
+ "signer": true
483
+ },
484
+ {
485
+ "name": "payer",
486
+ "docs": [
487
+ "Funds the rent for the 36 extra bytes the realloc adds. A separate signer",
488
+ "so the authority key need not hold lamports."
489
+ ],
490
+ "writable": true,
491
+ "signer": true
492
+ },
493
+ {
494
+ "name": "system_program",
495
+ "address": "11111111111111111111111111111111"
496
+ }
497
+ ],
498
+ "args": [
499
+ {
500
+ "name": "args",
501
+ "type": {
502
+ "defined": {
503
+ "name": "MigrateV3ToV4Args"
504
+ }
505
+ }
506
+ }
507
+ ]
508
+ },
227
509
  {
228
510
  "name": "prove_passkey",
229
511
  "discriminator": [
@@ -262,6 +544,43 @@
262
544
  }
263
545
  ]
264
546
  },
547
+ {
548
+ "name": "recover_abandoned_lock",
549
+ "discriminator": [
550
+ 169,
551
+ 213,
552
+ 107,
553
+ 64,
554
+ 229,
555
+ 49,
556
+ 43,
557
+ 234
558
+ ],
559
+ "accounts": [
560
+ {
561
+ "name": "claim",
562
+ "writable": true
563
+ },
564
+ {
565
+ "name": "vault",
566
+ "writable": true
567
+ },
568
+ {
569
+ "name": "instructions_sysvar",
570
+ "address": "Sysvar1nstructions1111111111111111111111111"
571
+ }
572
+ ],
573
+ "args": [
574
+ {
575
+ "name": "args",
576
+ "type": {
577
+ "defined": {
578
+ "name": "RecoverAbandonedLockArgs"
579
+ }
580
+ }
581
+ }
582
+ ]
583
+ },
265
584
  {
266
585
  "name": "register_session_key",
267
586
  "discriminator": [
@@ -284,6 +603,91 @@
284
603
  ],
285
604
  "writable": true
286
605
  },
606
+ {
607
+ "name": "vault_usdc_ata",
608
+ "docs": [
609
+ "The swig wallet's USDC ATA — read live to enforce the overcommit",
610
+ "invariant per V0.3 Decision 1: the new session's max_amount plus",
611
+ "the existing outstanding_locked_amount must fit within actual USDC",
612
+ "balance. The ATA's `owner` field is verified against the canonical",
613
+ "swig wallet PDA."
614
+ ]
615
+ },
616
+ {
617
+ "name": "swig"
618
+ },
619
+ {
620
+ "name": "swig_wallet_address",
621
+ "pda": {
622
+ "seeds": [
623
+ {
624
+ "kind": "const",
625
+ "value": [
626
+ 115,
627
+ 119,
628
+ 105,
629
+ 103,
630
+ 45,
631
+ 119,
632
+ 97,
633
+ 108,
634
+ 108,
635
+ 101,
636
+ 116,
637
+ 45,
638
+ 97,
639
+ 100,
640
+ 100,
641
+ 114,
642
+ 101,
643
+ 115,
644
+ 115
645
+ ]
646
+ },
647
+ {
648
+ "kind": "account",
649
+ "path": "swig"
650
+ }
651
+ ],
652
+ "program": {
653
+ "kind": "const",
654
+ "value": [
655
+ 13,
656
+ 12,
657
+ 233,
658
+ 66,
659
+ 225,
660
+ 231,
661
+ 197,
662
+ 6,
663
+ 226,
664
+ 24,
665
+ 223,
666
+ 13,
667
+ 125,
668
+ 241,
669
+ 197,
670
+ 47,
671
+ 175,
672
+ 220,
673
+ 53,
674
+ 41,
675
+ 228,
676
+ 141,
677
+ 103,
678
+ 77,
679
+ 29,
680
+ 178,
681
+ 76,
682
+ 117,
683
+ 181,
684
+ 76,
685
+ 204,
686
+ 190
687
+ ]
688
+ }
689
+ }
690
+ },
287
691
  {
288
692
  "name": "instructions_sysvar",
289
693
  "docs": [
@@ -543,7 +947,13 @@
543
947
  {
544
948
  "name": "system_program",
545
949
  "docs": [
546
- "System program Swig CreateV1 needs it to create the state account."
950
+ "System program. Declared readonly at the outer-ix level Solana's",
951
+ "runtime demotes the System Program to readonly anyway (program-id",
952
+ "accounts cannot be writable in the outer transaction). All inner CPIs",
953
+ "(both CreateV1 and AddAuthority) therefore pass System Program as",
954
+ "`AccountMeta::new_readonly(...)` to avoid privilege escalation.",
955
+ "`system_program::CreateAccount` itself doesn't require the System",
956
+ "Program account to be writable — it operates on `from`/`to`."
547
957
  ],
548
958
  "address": "11111111111111111111111111111111"
549
959
  },
@@ -566,6 +976,140 @@
566
976
  }
567
977
  ]
568
978
  },
979
+ {
980
+ "name": "settle_locked_voucher",
981
+ "discriminator": [
982
+ 44,
983
+ 80,
984
+ 216,
985
+ 43,
986
+ 247,
987
+ 253,
988
+ 101,
989
+ 45
990
+ ],
991
+ "accounts": [
992
+ {
993
+ "name": "swig",
994
+ "docs": [
995
+ "Position 0 — required at this index by Swig's ProgramExec validator."
996
+ ]
997
+ },
998
+ {
999
+ "name": "swig_wallet_address",
1000
+ "docs": [
1001
+ "Position 1 — required by Swig's ProgramExec validator."
1002
+ ],
1003
+ "pda": {
1004
+ "seeds": [
1005
+ {
1006
+ "kind": "const",
1007
+ "value": [
1008
+ 115,
1009
+ 119,
1010
+ 105,
1011
+ 103,
1012
+ 45,
1013
+ 119,
1014
+ 97,
1015
+ 108,
1016
+ 108,
1017
+ 101,
1018
+ 116,
1019
+ 45,
1020
+ 97,
1021
+ 100,
1022
+ 100,
1023
+ 114,
1024
+ 101,
1025
+ 115,
1026
+ 115
1027
+ ]
1028
+ },
1029
+ {
1030
+ "kind": "account",
1031
+ "path": "swig"
1032
+ }
1033
+ ],
1034
+ "program": {
1035
+ "kind": "const",
1036
+ "value": [
1037
+ 13,
1038
+ 12,
1039
+ 233,
1040
+ 66,
1041
+ 225,
1042
+ 231,
1043
+ 197,
1044
+ 6,
1045
+ 226,
1046
+ 24,
1047
+ 223,
1048
+ 13,
1049
+ 125,
1050
+ 241,
1051
+ 197,
1052
+ 47,
1053
+ 175,
1054
+ 220,
1055
+ 53,
1056
+ 41,
1057
+ 228,
1058
+ 141,
1059
+ 103,
1060
+ 77,
1061
+ 29,
1062
+ 178,
1063
+ 76,
1064
+ 117,
1065
+ 181,
1066
+ 76,
1067
+ 204,
1068
+ 190
1069
+ ]
1070
+ }
1071
+ }
1072
+ },
1073
+ {
1074
+ "name": "claim",
1075
+ "writable": true
1076
+ },
1077
+ {
1078
+ "name": "vault",
1079
+ "docs": [
1080
+ "Accumulator vault. Mutated to decrement outstanding_locked_amount",
1081
+ "and advance total_settled_amount. Per V0.3 Decision 7, the",
1082
+ "`active_session` field is NOT read here."
1083
+ ],
1084
+ "writable": true
1085
+ },
1086
+ {
1087
+ "name": "holder",
1088
+ "docs": [
1089
+ "Must equal claim.current_holder. This signature is the sole",
1090
+ "authority for the settlement."
1091
+ ],
1092
+ "signer": true
1093
+ },
1094
+ {
1095
+ "name": "dexter_authority",
1096
+ "docs": [
1097
+ "Fee gate (matches settle_tab_voucher's discipline)."
1098
+ ],
1099
+ "signer": true
1100
+ }
1101
+ ],
1102
+ "args": [
1103
+ {
1104
+ "name": "args",
1105
+ "type": {
1106
+ "defined": {
1107
+ "name": "SettleLockedVoucherArgs"
1108
+ }
1109
+ }
1110
+ }
1111
+ ]
1112
+ },
569
1113
  {
570
1114
  "name": "settle_tab_voucher",
571
1115
  "discriminator": [
@@ -751,9 +1295,60 @@
751
1295
  }
752
1296
  }
753
1297
  ]
1298
+ },
1299
+ {
1300
+ "name": "transfer_lock_ownership",
1301
+ "discriminator": [
1302
+ 193,
1303
+ 13,
1304
+ 131,
1305
+ 134,
1306
+ 95,
1307
+ 25,
1308
+ 229,
1309
+ 157
1310
+ ],
1311
+ "accounts": [
1312
+ {
1313
+ "name": "claim",
1314
+ "writable": true
1315
+ },
1316
+ {
1317
+ "name": "current_holder",
1318
+ "docs": [
1319
+ "Must equal the claim's current_holder. This is the sole authority",
1320
+ "for transferring the claim per the reservation semantics doc",
1321
+ "(Reservation 2)."
1322
+ ],
1323
+ "signer": true
1324
+ }
1325
+ ],
1326
+ "args": [
1327
+ {
1328
+ "name": "args",
1329
+ "type": {
1330
+ "defined": {
1331
+ "name": "TransferLockOwnershipArgs"
1332
+ }
1333
+ }
1334
+ }
1335
+ ]
754
1336
  }
755
1337
  ],
756
1338
  "accounts": [
1339
+ {
1340
+ "name": "LockedClaim",
1341
+ "discriminator": [
1342
+ 146,
1343
+ 227,
1344
+ 254,
1345
+ 205,
1346
+ 9,
1347
+ 82,
1348
+ 6,
1349
+ 245
1350
+ ]
1351
+ },
757
1352
  {
758
1353
  "name": "Vault",
759
1354
  "discriminator": [
@@ -833,6 +1428,41 @@
833
1428
  "code": 6012,
834
1429
  "name": "SessionPubkeyMismatch",
835
1430
  "msg": "Revocation message session pubkey does not match the active session"
1431
+ },
1432
+ {
1433
+ "code": 6013,
1434
+ "name": "RevolvingCapacityExceeded",
1435
+ "msg": "Opening this tab would exceed the session's revolving capacity"
1436
+ },
1437
+ {
1438
+ "code": 6014,
1439
+ "name": "RevolvingCapacityZero",
1440
+ "msg": "max_revolving_capacity must be greater than zero"
1441
+ },
1442
+ {
1443
+ "code": 6015,
1444
+ "name": "LockRangeAlreadyClaimed",
1445
+ "msg": "Voucher's cumulative_amount does not advance the XOR frontier (already covered by spent or crystallized_cumulative)"
1446
+ },
1447
+ {
1448
+ "code": 6016,
1449
+ "name": "LockWouldOvercommitVault",
1450
+ "msg": "Locking this voucher would push outstanding_locked_amount above vault USDC balance"
1451
+ },
1452
+ {
1453
+ "code": 6017,
1454
+ "name": "WithdrawalWouldViolateReservation",
1455
+ "msg": "Finalizing this withdrawal would bring vault balance below outstanding_locked_amount"
1456
+ },
1457
+ {
1458
+ "code": 6018,
1459
+ "name": "SessionWouldOvercommitVault",
1460
+ "msg": "Registering this session would push max_amount + outstanding_locked_amount above vault USDC balance"
1461
+ },
1462
+ {
1463
+ "code": 6019,
1464
+ "name": "RecoveryBeforeMaturity",
1465
+ "msg": "holder_recovery_at must be strictly greater than maturity_at when both are set"
836
1466
  }
837
1467
  ],
838
1468
  "types": [
@@ -913,6 +1543,246 @@
913
1543
  ]
914
1544
  }
915
1545
  },
1546
+ {
1547
+ "name": "LockVoucherArgs",
1548
+ "type": {
1549
+ "kind": "struct",
1550
+ "fields": [
1551
+ {
1552
+ "name": "channel_id",
1553
+ "docs": [
1554
+ "Channel id from the voucher payload (first 32 bytes of the 44-byte",
1555
+ "signed message)."
1556
+ ],
1557
+ "type": {
1558
+ "array": [
1559
+ "u8",
1560
+ 32
1561
+ ]
1562
+ }
1563
+ },
1564
+ {
1565
+ "name": "cumulative_amount",
1566
+ "docs": [
1567
+ "Voucher's cumulative amount. Must strictly exceed the XOR frontier",
1568
+ "`max(session.spent, session.crystallized_cumulative)`."
1569
+ ],
1570
+ "type": "u64"
1571
+ },
1572
+ {
1573
+ "name": "sequence_number",
1574
+ "docs": [
1575
+ "Sequence number from the voucher payload. Updates",
1576
+ "`session.last_locked_sequence` but is NOT load-bearing for replay",
1577
+ "defense (the frontier guard is)."
1578
+ ],
1579
+ "type": "u32"
1580
+ },
1581
+ {
1582
+ "name": "voucher_hash",
1583
+ "docs": [
1584
+ "sha256(voucher_message) — used as the third PDA seed for the claim.",
1585
+ "The handler verifies this matches the actually-signed message before",
1586
+ "trusting it as a seed."
1587
+ ],
1588
+ "type": {
1589
+ "array": [
1590
+ "u8",
1591
+ 32
1592
+ ]
1593
+ }
1594
+ },
1595
+ {
1596
+ "name": "maturity_at",
1597
+ "docs": [
1598
+ "Optional settlement maturity. If set, settle_locked_voucher rejects",
1599
+ "before this time."
1600
+ ],
1601
+ "type": {
1602
+ "option": "i64"
1603
+ }
1604
+ },
1605
+ {
1606
+ "name": "holder_recovery_at",
1607
+ "docs": [
1608
+ "Optional buyer-recovery deadline. If set with `maturity_at`, the",
1609
+ "handler enforces `holder_recovery_at > maturity_at` per V0.3",
1610
+ "Decision 4."
1611
+ ],
1612
+ "type": {
1613
+ "option": "i64"
1614
+ }
1615
+ }
1616
+ ]
1617
+ }
1618
+ },
1619
+ {
1620
+ "name": "LockedClaim",
1621
+ "docs": [
1622
+ "Crystallized claim against vault USDC. Created by `lock_voucher`,",
1623
+ "transferable via `transfer_lock_ownership`, settled by",
1624
+ "`settle_locked_voucher`, reclaimed by `recover_abandoned_lock`. Independent",
1625
+ "of `active_session` after creation — see V0.3 Decision 7. State machine",
1626
+ "per V0.3 Decision 6: pending → {settled, abandoned}, both terminal one-way."
1627
+ ],
1628
+ "type": {
1629
+ "kind": "struct",
1630
+ "fields": [
1631
+ {
1632
+ "name": "version",
1633
+ "docs": [
1634
+ "Layout version. v0.3 is the first version."
1635
+ ],
1636
+ "type": "u8"
1637
+ },
1638
+ {
1639
+ "name": "bump",
1640
+ "type": "u8"
1641
+ },
1642
+ {
1643
+ "name": "vault",
1644
+ "docs": [
1645
+ "Vault PDA this claim is reserved against. All reservation invariants",
1646
+ "gate on this vault's `outstanding_locked_amount`."
1647
+ ],
1648
+ "type": "pubkey"
1649
+ },
1650
+ {
1651
+ "name": "session_pubkey_at_lock",
1652
+ "docs": [
1653
+ "Session pubkey that signed the voucher being crystallized. Snapshot at",
1654
+ "lock time per V0.3 Decision 7; never re-read at settlement."
1655
+ ],
1656
+ "type": {
1657
+ "array": [
1658
+ "u8",
1659
+ 32
1660
+ ]
1661
+ }
1662
+ },
1663
+ {
1664
+ "name": "voucher_hash",
1665
+ "docs": [
1666
+ "Voucher payload hash — sha256 of the 44-byte canonical voucher message.",
1667
+ "For audit / indexer correlation; not re-verified at settle."
1668
+ ],
1669
+ "type": {
1670
+ "array": [
1671
+ "u8",
1672
+ 32
1673
+ ]
1674
+ }
1675
+ },
1676
+ {
1677
+ "name": "amount",
1678
+ "docs": [
1679
+ "USDC amount this claim reserves against the vault. `delta` from",
1680
+ "`voucher.cumulative_amount - session.crystallized_cumulative` at lock."
1681
+ ],
1682
+ "type": "u64"
1683
+ },
1684
+ {
1685
+ "name": "created_at",
1686
+ "docs": [
1687
+ "Wall-clock time the lock instruction landed."
1688
+ ],
1689
+ "type": "i64"
1690
+ },
1691
+ {
1692
+ "name": "maturity_at",
1693
+ "docs": [
1694
+ "Earliest time settlement may run. If None, claim is instantly",
1695
+ "settleable."
1696
+ ],
1697
+ "type": {
1698
+ "option": "i64"
1699
+ }
1700
+ },
1701
+ {
1702
+ "name": "holder_recovery_at",
1703
+ "docs": [
1704
+ "Earliest time the buyer's passkey may reclaim. If None, claim is",
1705
+ "indefinitely buyer-irrevocable. Invariant: when both set, MUST satisfy",
1706
+ "`holder_recovery_at > maturity_at` per V0.3 Decision 4."
1707
+ ],
1708
+ "type": {
1709
+ "option": "i64"
1710
+ }
1711
+ },
1712
+ {
1713
+ "name": "current_holder",
1714
+ "docs": [
1715
+ "Current owner. Set at creation to the seller; mutated by",
1716
+ "`transfer_lock_ownership` signed by the previous holder."
1717
+ ],
1718
+ "type": "pubkey"
1719
+ },
1720
+ {
1721
+ "name": "status",
1722
+ "docs": [
1723
+ "State machine status per V0.3 Decision 6."
1724
+ ],
1725
+ "type": {
1726
+ "defined": {
1727
+ "name": "LockedClaimStatus"
1728
+ }
1729
+ }
1730
+ },
1731
+ {
1732
+ "name": "settled_at",
1733
+ "docs": [
1734
+ "Set when status == Settled. None otherwise."
1735
+ ],
1736
+ "type": {
1737
+ "option": "i64"
1738
+ }
1739
+ },
1740
+ {
1741
+ "name": "recovered_at",
1742
+ "docs": [
1743
+ "Set when status == Abandoned. None otherwise."
1744
+ ],
1745
+ "type": {
1746
+ "option": "i64"
1747
+ }
1748
+ }
1749
+ ]
1750
+ }
1751
+ },
1752
+ {
1753
+ "name": "LockedClaimStatus",
1754
+ "docs": [
1755
+ "Claim state per V0.3 Decision 6 state machine."
1756
+ ],
1757
+ "type": {
1758
+ "kind": "enum",
1759
+ "variants": [
1760
+ {
1761
+ "name": "Pending"
1762
+ },
1763
+ {
1764
+ "name": "Settled"
1765
+ },
1766
+ {
1767
+ "name": "Abandoned"
1768
+ }
1769
+ ]
1770
+ }
1771
+ },
1772
+ {
1773
+ "name": "MigrateV2ToV3Args",
1774
+ "type": {
1775
+ "kind": "struct",
1776
+ "fields": []
1777
+ }
1778
+ },
1779
+ {
1780
+ "name": "MigrateV3ToV4Args",
1781
+ "type": {
1782
+ "kind": "struct",
1783
+ "fields": []
1784
+ }
1785
+ },
916
1786
  {
917
1787
  "name": "PendingWithdrawal",
918
1788
  "type": {
@@ -966,6 +1836,25 @@
966
1836
  ]
967
1837
  }
968
1838
  },
1839
+ {
1840
+ "name": "RecoverAbandonedLockArgs",
1841
+ "type": {
1842
+ "kind": "struct",
1843
+ "fields": [
1844
+ {
1845
+ "name": "client_data_json",
1846
+ "docs": [
1847
+ "WebAuthn clientDataJSON; challenge must be sha256(operation_message)."
1848
+ ],
1849
+ "type": "bytes"
1850
+ },
1851
+ {
1852
+ "name": "authenticator_data",
1853
+ "type": "bytes"
1854
+ }
1855
+ ]
1856
+ }
1857
+ },
969
1858
  {
970
1859
  "name": "RegisterSessionKeyArgs",
971
1860
  "type": {
@@ -1018,6 +1907,13 @@
1018
1907
  ],
1019
1908
  "type": "u32"
1020
1909
  },
1910
+ {
1911
+ "name": "max_revolving_capacity",
1912
+ "docs": [
1913
+ "Cap the revolving meter (`current_outstanding`) is checked against."
1914
+ ],
1915
+ "type": "u64"
1916
+ },
1021
1917
  {
1022
1918
  "name": "client_data_json",
1023
1919
  "docs": [
@@ -1174,6 +2070,41 @@
1174
2070
  {
1175
2071
  "name": "spent",
1176
2072
  "type": "u64"
2073
+ },
2074
+ {
2075
+ "name": "current_outstanding",
2076
+ "docs": [
2077
+ "Live unsettled exposure. Rises at tab-open (settle_voucher increment),",
2078
+ "falls at confirmed settle (settle_tab_voucher). This is the field that",
2079
+ "REVOLVES — the credex meter."
2080
+ ],
2081
+ "type": "u64"
2082
+ },
2083
+ {
2084
+ "name": "max_revolving_capacity",
2085
+ "docs": [
2086
+ "Admission cap the revolving meter is checked against. Set + passkey-",
2087
+ "endorsed at register_session_key. May be <= max_amount."
2088
+ ],
2089
+ "type": "u64"
2090
+ },
2091
+ {
2092
+ "name": "crystallized_cumulative",
2093
+ "docs": [
2094
+ "Session-scope monotonic locked-into-claim odometer; mirror of `spent`",
2095
+ "for the lock terminal path. Rises at `lock_voucher`. Never decremented.",
2096
+ "The XOR frontier `max(spent, crystallized_cumulative)` gates both",
2097
+ "terminal paths (seam spec section 4). (Seam spec section 1.)"
2098
+ ],
2099
+ "type": "u64"
2100
+ },
2101
+ {
2102
+ "name": "last_locked_sequence",
2103
+ "docs": [
2104
+ "Last voucher sequence number that was locked. Reserved for future",
2105
+ "out-of-order lock detection — NOT the XOR guard (the frontier is)."
2106
+ ],
2107
+ "type": "u32"
1177
2108
  }
1178
2109
  ]
1179
2110
  }
@@ -1260,6 +2191,13 @@
1260
2191
  ]
1261
2192
  }
1262
2193
  },
2194
+ {
2195
+ "name": "SettleLockedVoucherArgs",
2196
+ "type": {
2197
+ "kind": "struct",
2198
+ "fields": []
2199
+ }
2200
+ },
1263
2201
  {
1264
2202
  "name": "SettleTabVoucherArgs",
1265
2203
  "type": {
@@ -1316,6 +2254,18 @@
1316
2254
  ]
1317
2255
  }
1318
2256
  },
2257
+ {
2258
+ "name": "TransferLockOwnershipArgs",
2259
+ "type": {
2260
+ "kind": "struct",
2261
+ "fields": [
2262
+ {
2263
+ "name": "new_holder",
2264
+ "type": "pubkey"
2265
+ }
2266
+ ]
2267
+ }
2268
+ },
1319
2269
  {
1320
2270
  "name": "Vault",
1321
2271
  "type": {
@@ -1409,6 +2359,31 @@
1409
2359
  }
1410
2360
  }
1411
2361
  }
2362
+ },
2363
+ {
2364
+ "name": "outstanding_locked_amount",
2365
+ "docs": [
2366
+ "Sum of unsettled LockedClaim amounts for this vault. Rises at",
2367
+ "`lock_voucher`, falls at `settle_locked_voucher` / `recover_abandoned_lock`.",
2368
+ "The crystallized (buyer-irrevocable) reservation tier. Read by",
2369
+ "`finalize_withdrawal` to reject withdrawals that would violate the",
2370
+ "reservation. (Seam spec section 1.)"
2371
+ ],
2372
+ "type": "u64"
2373
+ },
2374
+ {
2375
+ "name": "total_crystallized_amount",
2376
+ "docs": [
2377
+ "Lifetime monotonic locked-into-claim odometer at vault scope. Never decremented."
2378
+ ],
2379
+ "type": "u64"
2380
+ },
2381
+ {
2382
+ "name": "total_settled_amount",
2383
+ "docs": [
2384
+ "Lifetime monotonic settled-from-claim odometer at vault scope. Never decremented."
2385
+ ],
2386
+ "type": "u64"
1412
2387
  }
1413
2388
  ]
1414
2389
  }