@propxchain/core-client 0.2.1 → 0.3.0-canary.23

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.
Files changed (63) hide show
  1. package/README.md +2 -3
  2. package/dist/auth.d.ts +7 -7
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +5 -5
  5. package/dist/auth.js.map +1 -1
  6. package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -1
  7. package/dist/canisters/document_storage/document_storage.did.js +90 -21
  8. package/dist/canisters/document_storage/document_storage.did.js.map +1 -1
  9. package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -1
  10. package/dist/canisters/document_verification/document_verification.did.js +132 -0
  11. package/dist/canisters/document_verification/document_verification.did.js.map +1 -1
  12. package/dist/canisters/email_service/email_service.did.d.ts.map +1 -1
  13. package/dist/canisters/email_service/email_service.did.js +40 -0
  14. package/dist/canisters/email_service/email_service.did.js.map +1 -1
  15. package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -1
  16. package/dist/canisters/land_registry_integration/land_registry_integration.did.js +186 -12
  17. package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -1
  18. package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -1
  19. package/dist/canisters/ledger_manager/ledger_manager.did.js +55 -0
  20. package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -1
  21. package/dist/canisters/transaction_manager/transaction_manager.did.d.ts.map +1 -1
  22. package/dist/canisters/transaction_manager/transaction_manager.did.js +42 -4
  23. package/dist/canisters/transaction_manager/transaction_manager.did.js.map +1 -1
  24. package/dist/canisters/user_management/user_management.did.d.ts.map +1 -1
  25. package/dist/canisters/user_management/user_management.did.js +122 -2
  26. package/dist/canisters/user_management/user_management.did.js.map +1 -1
  27. package/dist/client.js +1 -1
  28. package/dist/client.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/mock.js +1 -1
  34. package/dist/mock.js.map +1 -1
  35. package/dist/types.d.ts +1 -1
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +3 -6
  38. package/src/auth.ts +8 -9
  39. package/src/canisters/document_storage/document_storage.did +82 -12
  40. package/src/canisters/document_storage/document_storage.did.d.ts +86 -9
  41. package/src/canisters/document_storage/document_storage.did.js +128 -19
  42. package/src/canisters/document_verification/document_verification.did +150 -0
  43. package/src/canisters/document_verification/document_verification.did.d.ts +125 -1
  44. package/src/canisters/document_verification/document_verification.did.js +160 -0
  45. package/src/canisters/email_service/email_service.did +49 -0
  46. package/src/canisters/email_service/email_service.did.d.ts +49 -2
  47. package/src/canisters/email_service/email_service.did.js +68 -0
  48. package/src/canisters/land_registry_integration/land_registry_integration.did +118 -19
  49. package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +89 -19
  50. package/src/canisters/land_registry_integration/land_registry_integration.did.js +213 -11
  51. package/src/canisters/ledger_manager/ledger_manager.did +78 -0
  52. package/src/canisters/ledger_manager/ledger_manager.did.d.ts +66 -0
  53. package/src/canisters/ledger_manager/ledger_manager.did.js +75 -0
  54. package/src/canisters/transaction_manager/transaction_manager.did +98 -5
  55. package/src/canisters/transaction_manager/transaction_manager.did.d.ts +102 -4
  56. package/src/canisters/transaction_manager/transaction_manager.did.js +50 -4
  57. package/src/canisters/user_management/user_management.did +153 -3
  58. package/src/canisters/user_management/user_management.did.d.ts +121 -2
  59. package/src/canisters/user_management/user_management.did.js +166 -6
  60. package/src/client.ts +1 -1
  61. package/src/index.ts +2 -2
  62. package/src/mock.ts +1 -1
  63. package/src/types.ts +1 -1
@@ -1,3 +1,9 @@
1
+ type Urgency =
2
+ variant {
3
+ blocking;
4
+ later;
5
+ soon;
6
+ };
1
7
  type TransactionTimeline =
2
8
  record {
3
9
  blockchainCompletedAt: opt int;
@@ -271,7 +277,7 @@ type Result_2 =
271
277
  err: text;
272
278
  ok: TransactionParty;
273
279
  };
274
- type Result_18 =
280
+ type Result_19 =
275
281
  variant {
276
282
  err: text;
277
283
  ok: record {
@@ -279,11 +285,16 @@ type Result_18 =
279
285
  text;
280
286
  };
281
287
  };
282
- type Result_17 =
288
+ type Result_18 =
283
289
  variant {
284
290
  err: text;
285
291
  ok: Phase;
286
292
  };
293
+ type Result_17 =
294
+ variant {
295
+ err: text;
296
+ ok: NextStepRecommendation;
297
+ };
287
298
  type Result_16 =
288
299
  variant {
289
300
  err: text;
@@ -392,6 +403,22 @@ type Notification =
392
403
  transactionId: text;
393
404
  uploadedBy: principal;
394
405
  };
406
+ type NextStepRecommendation =
407
+ record {
408
+ blocker: text;
409
+ blockerLabel: text;
410
+ options: vec NextStepOption;
411
+ partial: bool;
412
+ urgency: Urgency;
413
+ why: text;
414
+ };
415
+ type NextStepOption =
416
+ record {
417
+ action: text;
418
+ displayLabel: text;
419
+ estimatedDelayIfSkipped: opt nat;
420
+ whyThis: text;
421
+ };
395
422
  type LandRegistryStatus =
396
423
  variant {
397
424
  application_received;
@@ -492,7 +519,7 @@ service : {
492
519
  postcode: text, titleNumber: text, seller: principal, previousOwner:
493
520
  text, amount: nat64, transactionType: text, userRole: text, propertyType:
494
521
  text, propertyCategory: text, mode: text, deposit: nat64, mortgageAmount:
495
- nat64, completionDate: text) -> (Result_18);
522
+ nat64, completionDate: text) -> (Result_19);
496
523
  deleteTransaction: (transactionId: text) -> (Result);
497
524
  disconnectBot: (transactionId: text, botPrincipal: principal) -> (Result_1);
498
525
  doesTransactionExist: (transactionId: text) -> (bool) query;
@@ -501,17 +528,20 @@ service : {
501
528
  text;
502
529
  }) query;
503
530
  getAllTransactions: () -> (vec Transaction) query;
504
- getCurrentPhase: (transactionId: text) -> (Result_17) query;
531
+ getCurrentPhase: (transactionId: text) -> (Result_18) query;
505
532
  getCycles: () -> (nat) query;
506
533
  getDocumentStorageCanister: () -> (opt principal) query;
507
534
  getExpiringSearches: (withinDays: nat) -> (vec Transaction) query;
508
535
  getFlowState: (transactionId: text) -> (opt text) query;
509
536
  getInviteCode: (transactionId: text) -> (Result) query;
537
+ getLandRegistryCanister: () -> (text) query;
510
538
  getLandRegistryDetail: (transactionID: text) ->
511
539
  (opt LandRegistryIntegration) query;
540
+ getLedgerManagerCanister: () -> (text) query;
512
541
  getListingData: (transactionId: text) -> (opt text) query;
513
542
  getMyNotifications: () -> (vec Notification) query;
514
543
  getMyTransactions: () -> (vec Transaction) query;
544
+ getNextStep: (id: text) -> (Result_17) composite_query;
515
545
  getOutstandingRequisitions: () -> (vec record {
516
546
  text;
517
547
  Requisition;
@@ -519,6 +549,7 @@ service : {
519
549
  getPartyProgress: (transactionId: text) -> (Result_16) query;
520
550
  getPendingLRApplications: () -> (vec Transaction) query;
521
551
  getPhaseMilestones: (transactionId: text) -> (Result_15) query;
552
+ getPropertyRegistryCanister: () -> (text) query;
522
553
  getSolicitorStatus: (transactionId: text) -> (Result_14) query;
523
554
  getTA10: (txId: text) -> (Result_13) query;
524
555
  getTA6: (txId: text) -> (Result_12) query;
@@ -542,27 +573,83 @@ service : {
542
573
  (opt TransactionTimeline) query;
543
574
  initiate_blockchain_completion: (transactionID: text, buyerFundsHash:
544
575
  text, completionStatementHash: text) -> (Result);
576
+ joinAsBotByInviteCode: (inviteCode: text, botName: text) -> (Result_6);
545
577
  joinTransactionByInviteCode: (inviteCode: text) -> (Result_6);
578
+ joinTransactionByInviteCodeAsBuyer: (inviteCode: text) -> (Result_6);
579
+ /// Caller-initiated removal from a transaction they joined but didn't
580
+ /// create. Counterpart to `removeParty` (which is seller/admin-driven and
581
+ /// gated against primary parties) — this is the "I want out" path for a
582
+ /// joined buyer or any other access-list member.
583
+ ///
584
+ /// Gates:
585
+ /// - Anonymous callers rejected outright.
586
+ /// - Seller / createdBy cannot leave their own transaction (they
587
+ /// dispose via deleteTransaction).
588
+ /// - Caller must currently have access to the transaction.
589
+ /// - Locked after contract exchange (same posture as assignBuyer):
590
+ /// once the deal is signed nobody walks away by toggling a button.
591
+ ///
592
+ /// Effects:
593
+ /// - Caller is removed from `accessList`.
594
+ /// - If the caller is the assigned buyer (`txn.buyer == msg.caller`),
595
+ /// the buyer slot is reset to the seller placeholder, matching the
596
+ /// sentinel state that `assignBuyer` checks for. The transaction
597
+ /// re-enters the "Awaiting buyer" state and the invite code is
598
+ /// reusable by a new joiner.
599
+ /// - Audit event `buyer_left` (or `party_left` for non-buyer leavers)
600
+ /// is logged via the existing ledger pattern.
601
+ ///
602
+ /// Concurrency: uses the same acquireTxLock/finally releaseTxLock
603
+ /// posture as assignBuyer so a leave can't race against an in-flight
604
+ /// stage write.
605
+ leaveTransaction: (transactionId: text) -> (Result);
546
606
  linkTransactionToChain: (myTransactionId: text, buyingTransactionId:
547
607
  text) -> (Result_1);
548
608
  markAllNotificationsRead: () -> (nat);
549
609
  markContractDrafted: (transactionId: text) -> (Result_1);
550
610
  markNotificationRead: (notificationId: nat) -> (Result_1);
551
611
  markSearchesOrdered: (transactionId: text) -> (Result_1);
612
+ /// Heal developer-plot transactions whose `seller` doesn't match the
613
+ /// org's current developer principal. Two cases this addresses:
614
+ /// 1. Pre-migration txs (seller = buyer placeholder) created before the
615
+ /// developer-on-chain work landed.
616
+ /// 2. Stale-pin txs where the org's pinned principal changed after the
617
+ /// tx was created (e.g. admin password reset → new ICP key, or org
618
+ /// ownership transferred to a different admin).
619
+ ///
620
+ /// Idempotent over the target: re-running with the same developerPrincipal
621
+ /// returns an error (already at target), so admin-driven backfill scripts
622
+ /// don't silently re-touch state. Always rejects:
623
+ /// - non-development mode txs
624
+ /// - developerPrincipal == buyer (would break Principal.equal checks)
625
+ /// - anonymous principal
626
+ migrateDevPlotSeller: (transactionId: text, developerPrincipal:
627
+ principal) -> (Result);
552
628
  onDocumentRegistered: (transactionId: text, docType: text, documentHash:
553
629
  text, uploadedBy: principal) -> ();
554
630
  on_blockchain_completion_success: (transactionID: text) -> (Result);
555
631
  pollAllPendingApplications: () -> (Result_5);
556
632
  pollApplicationStatus: (transactionID: text) -> (Result_4);
633
+ /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent solicitors
634
+ /// from racing to record exchange while canModifyTransaction await is in flight.
557
635
  recordContractExchange: (transactionID: text, buyerSolicitorSignature:
558
636
  text, sellerSolicitorSignature: text) -> (Result);
637
+ recordConveyancerSelected: (txId: text, conveyancerId: text,
638
+ acceptedQuoteHash: text, finalAmountPence: nat) -> (Result_1);
559
639
  recordFormUpload: (txId: text, formType: text, fileHash: text, fileName:
560
640
  text) -> (Result_1);
561
641
  /// Record a single party's signature on-chain.
562
642
  /// The canister identifies the caller as buyer or seller from the transaction principals.
563
643
  /// When both parties have signed, the status auto-advances to #exchanged.
644
+ /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
645
+ /// (buyer + seller racing to sign) while canModifyTransaction await is in flight.
564
646
  recordPartySignature: (transactionID: text, signatureHash: text,
565
647
  signingRole: text) -> (Result);
648
+ recordQuoteReceived: (txId: text, conveyancerId: text, quoteHash: text,
649
+ quotedAmountPence: nat) -> (Result_1);
650
+ recordQuoteRequested: (txId: text, conveyancerId: text) -> (Result_1);
651
+ /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
652
+ /// while the isAdmin await is in flight.
566
653
  recordRequisition: (transactionID: text, requisition: Requisition) ->
567
654
  (Result_1);
568
655
  removeParty: (transactionId: text, partyPrincipal: principal) -> (Result_1);
@@ -571,12 +658,17 @@ service : {
571
658
  seller;
572
659
  }) -> (Result_1);
573
660
  requestOfficialSearch: (transactionID: text) -> (Result_3);
661
+ /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
662
+ /// while canModifyTransaction await is in flight.
574
663
  respondToRequisition: (transactionID: text, requisitionId: text,
575
664
  responseText: text, _supportingDocumentHashes: vec text) -> (Result_1);
576
665
  revokeBuyer: (transactionId: text, buyerPrincipal: principal) -> (Result);
577
666
  setDocumentStorageCanister: (canisterId: principal) -> (Result);
578
667
  setFlowState: (transactionId: text, jsonData: text) -> (Result);
668
+ setLandRegistryCanister: (canisterId: text) -> (Result);
669
+ setLedgerManagerCanister: (canisterId: text) -> (Result);
579
670
  setListingData: (transactionId: text, jsonData: text) -> (Result);
671
+ setPropertyRegistryCanister: (canisterId: text) -> (Result);
580
672
  setUserManagementCanister: (canisterId: text) -> (Result);
581
673
  trigger_land_registry_submission: (transactionID: text) -> (Result);
582
674
  updatePartyAMLDoc: (transactionId: text, partyPrincipal: principal,
@@ -592,7 +684,8 @@ service : {
592
684
  updateTA10: (txId: text, data: TA10FittingsAndContents) -> (Result_1);
593
685
  updateTA6: (txId: text, data: TA6PropertyInformation) -> (Result_1);
594
686
  updateTA7: (txId: text, data: TA7LeaseholdInformation) -> (Result_1);
595
- updateTransactionStatus: (transactionId: nat, newStatus: text) -> (bool);
687
+ updateTitleNumber: (transactionId: text, newTitleNumber: text) -> (Result);
688
+ updateTransactionStatus: (_transactionId: nat, _newStatus: text) -> (bool);
596
689
  update_land_registry_status: (transactionID: text, lrStatus:
597
690
  LandRegistryStatus, confirmationNumber: opt text, estimatedCompletionTime:
598
691
  opt int) -> (Result);
@@ -65,6 +65,20 @@ export type LandRegistryStatus = { 'cancelled' : null } |
65
65
  { 'official_search_expired' : null } |
66
66
  { 'failed' : null } |
67
67
  { 'registered' : null };
68
+ export interface NextStepOption {
69
+ 'action' : string,
70
+ 'displayLabel' : string,
71
+ 'estimatedDelayIfSkipped' : [] | [bigint],
72
+ 'whyThis' : string,
73
+ }
74
+ export interface NextStepRecommendation {
75
+ 'why' : string,
76
+ 'urgency' : Urgency,
77
+ 'blocker' : string,
78
+ 'blockerLabel' : string,
79
+ 'options' : Array<NextStepOption>,
80
+ 'partial' : boolean,
81
+ }
68
82
  export interface Notification {
69
83
  'id' : bigint,
70
84
  'documentHash' : string,
@@ -136,9 +150,11 @@ export type Result_15 = { 'ok' : PhaseMilestones } |
136
150
  { 'err' : string };
137
151
  export type Result_16 = { 'ok' : TransactionPartyProgress } |
138
152
  { 'err' : string };
139
- export type Result_17 = { 'ok' : Phase } |
153
+ export type Result_17 = { 'ok' : NextStepRecommendation } |
154
+ { 'err' : string };
155
+ export type Result_18 = { 'ok' : Phase } |
140
156
  { 'err' : string };
141
- export type Result_18 = { 'ok' : [string, string] } |
157
+ export type Result_19 = { 'ok' : [string, string] } |
142
158
  { 'err' : string };
143
159
  export type Result_2 = { 'ok' : TransactionParty } |
144
160
  { 'err' : string };
@@ -355,6 +371,9 @@ export interface TransactionTimeline {
355
371
  'totalTimeToCompletion' : bigint,
356
372
  'totalTimeIncludingLR' : bigint,
357
373
  }
374
+ export type Urgency = { 'blocking' : null } |
375
+ { 'soon' : null } |
376
+ { 'later' : null };
358
377
  export interface _SERVICE {
359
378
  'addParty' : ActorMethod<[string, string, string, string, boolean], Result_2>,
360
379
  'adminForceDeleteTransaction' : ActorMethod<[string], Result>,
@@ -406,30 +425,34 @@ export interface _SERVICE {
406
425
  bigint,
407
426
  string,
408
427
  ],
409
- Result_18
428
+ Result_19
410
429
  >,
411
430
  'deleteTransaction' : ActorMethod<[string], Result>,
412
431
  'disconnectBot' : ActorMethod<[string, Principal], Result_1>,
413
432
  'doesTransactionExist' : ActorMethod<[string], boolean>,
414
433
  'getAllInviteCodes' : ActorMethod<[], Array<[string, string]>>,
415
434
  'getAllTransactions' : ActorMethod<[], Array<Transaction>>,
416
- 'getCurrentPhase' : ActorMethod<[string], Result_17>,
435
+ 'getCurrentPhase' : ActorMethod<[string], Result_18>,
417
436
  'getCycles' : ActorMethod<[], bigint>,
418
437
  'getDocumentStorageCanister' : ActorMethod<[], [] | [Principal]>,
419
438
  'getExpiringSearches' : ActorMethod<[bigint], Array<Transaction>>,
420
439
  'getFlowState' : ActorMethod<[string], [] | [string]>,
421
440
  'getInviteCode' : ActorMethod<[string], Result>,
441
+ 'getLandRegistryCanister' : ActorMethod<[], string>,
422
442
  'getLandRegistryDetail' : ActorMethod<
423
443
  [string],
424
444
  [] | [LandRegistryIntegration]
425
445
  >,
446
+ 'getLedgerManagerCanister' : ActorMethod<[], string>,
426
447
  'getListingData' : ActorMethod<[string], [] | [string]>,
427
448
  'getMyNotifications' : ActorMethod<[], Array<Notification>>,
428
449
  'getMyTransactions' : ActorMethod<[], Array<Transaction>>,
450
+ 'getNextStep' : ActorMethod<[string], Result_17>,
429
451
  'getOutstandingRequisitions' : ActorMethod<[], Array<[string, Requisition]>>,
430
452
  'getPartyProgress' : ActorMethod<[string], Result_16>,
431
453
  'getPendingLRApplications' : ActorMethod<[], Array<Transaction>>,
432
454
  'getPhaseMilestones' : ActorMethod<[string], Result_15>,
455
+ 'getPropertyRegistryCanister' : ActorMethod<[], string>,
433
456
  'getSolicitorStatus' : ActorMethod<[string], Result_14>,
434
457
  'getTA10' : ActorMethod<[string], Result_13>,
435
458
  'getTA6' : ActorMethod<[string], Result_12>,
@@ -457,12 +480,60 @@ export interface _SERVICE {
457
480
  [string, string, string],
458
481
  Result
459
482
  >,
483
+ 'joinAsBotByInviteCode' : ActorMethod<[string, string], Result_6>,
460
484
  'joinTransactionByInviteCode' : ActorMethod<[string], Result_6>,
485
+ 'joinTransactionByInviteCodeAsBuyer' : ActorMethod<[string], Result_6>,
486
+ /**
487
+ * / Caller-initiated removal from a transaction they joined but didn't
488
+ * / create. Counterpart to `removeParty` (which is seller/admin-driven and
489
+ * / gated against primary parties) — this is the "I want out" path for a
490
+ * / joined buyer or any other access-list member.
491
+ * /
492
+ * / Gates:
493
+ * / - Anonymous callers rejected outright.
494
+ * / - Seller / createdBy cannot leave their own transaction (they
495
+ * / dispose via deleteTransaction).
496
+ * / - Caller must currently have access to the transaction.
497
+ * / - Locked after contract exchange (same posture as assignBuyer):
498
+ * / once the deal is signed nobody walks away by toggling a button.
499
+ * /
500
+ * / Effects:
501
+ * / - Caller is removed from `accessList`.
502
+ * / - If the caller is the assigned buyer (`txn.buyer == msg.caller`),
503
+ * / the buyer slot is reset to the seller placeholder, matching the
504
+ * / sentinel state that `assignBuyer` checks for. The transaction
505
+ * / re-enters the "Awaiting buyer" state and the invite code is
506
+ * / reusable by a new joiner.
507
+ * / - Audit event `buyer_left` (or `party_left` for non-buyer leavers)
508
+ * / is logged via the existing ledger pattern.
509
+ * /
510
+ * / Concurrency: uses the same acquireTxLock/finally releaseTxLock
511
+ * / posture as assignBuyer so a leave can't race against an in-flight
512
+ * / stage write.
513
+ */
514
+ 'leaveTransaction' : ActorMethod<[string], Result>,
461
515
  'linkTransactionToChain' : ActorMethod<[string, string], Result_1>,
462
516
  'markAllNotificationsRead' : ActorMethod<[], bigint>,
463
517
  'markContractDrafted' : ActorMethod<[string], Result_1>,
464
518
  'markNotificationRead' : ActorMethod<[bigint], Result_1>,
465
519
  'markSearchesOrdered' : ActorMethod<[string], Result_1>,
520
+ /**
521
+ * / Heal developer-plot transactions whose `seller` doesn't match the
522
+ * / org's current developer principal. Two cases this addresses:
523
+ * / 1. Pre-migration txs (seller = buyer placeholder) created before the
524
+ * / developer-on-chain work landed.
525
+ * / 2. Stale-pin txs where the org's pinned principal changed after the
526
+ * / tx was created (e.g. admin password reset → new ICP key, or org
527
+ * / ownership transferred to a different admin).
528
+ * /
529
+ * / Idempotent over the target: re-running with the same developerPrincipal
530
+ * / returns an error (already at target), so admin-driven backfill scripts
531
+ * / don't silently re-touch state. Always rejects:
532
+ * / - non-development mode txs
533
+ * / - developerPrincipal == buyer (would break Principal.equal checks)
534
+ * / - anonymous principal
535
+ */
536
+ 'migrateDevPlotSeller' : ActorMethod<[string, Principal], Result>,
466
537
  'onDocumentRegistered' : ActorMethod<
467
538
  [string, string, string, Principal],
468
539
  undefined
@@ -470,14 +541,33 @@ export interface _SERVICE {
470
541
  'on_blockchain_completion_success' : ActorMethod<[string], Result>,
471
542
  'pollAllPendingApplications' : ActorMethod<[], Result_5>,
472
543
  'pollApplicationStatus' : ActorMethod<[string], Result_4>,
544
+ /**
545
+ * / Closes #31 (TOCTOU): per-transaction lock blocks concurrent solicitors
546
+ * / from racing to record exchange while canModifyTransaction await is in flight.
547
+ */
473
548
  'recordContractExchange' : ActorMethod<[string, string, string], Result>,
549
+ 'recordConveyancerSelected' : ActorMethod<
550
+ [string, string, string, bigint],
551
+ Result_1
552
+ >,
474
553
  'recordFormUpload' : ActorMethod<[string, string, string, string], Result_1>,
475
554
  /**
476
555
  * / Record a single party's signature on-chain.
477
556
  * / The canister identifies the caller as buyer or seller from the transaction principals.
478
557
  * / When both parties have signed, the status auto-advances to #exchanged.
558
+ * / Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
559
+ * / (buyer + seller racing to sign) while canModifyTransaction await is in flight.
479
560
  */
480
561
  'recordPartySignature' : ActorMethod<[string, string, string], Result>,
562
+ 'recordQuoteReceived' : ActorMethod<
563
+ [string, string, string, bigint],
564
+ Result_1
565
+ >,
566
+ 'recordQuoteRequested' : ActorMethod<[string, string], Result_1>,
567
+ /**
568
+ * / Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
569
+ * / while the isAdmin await is in flight.
570
+ */
481
571
  'recordRequisition' : ActorMethod<[string, Requisition], Result_1>,
482
572
  'removeParty' : ActorMethod<[string, Principal], Result_1>,
483
573
  'removeSolicitor' : ActorMethod<
@@ -485,6 +575,10 @@ export interface _SERVICE {
485
575
  Result_1
486
576
  >,
487
577
  'requestOfficialSearch' : ActorMethod<[string], Result_3>,
578
+ /**
579
+ * / Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
580
+ * / while canModifyTransaction await is in flight.
581
+ */
488
582
  'respondToRequisition' : ActorMethod<
489
583
  [string, string, string, Array<string>],
490
584
  Result_1
@@ -492,7 +586,10 @@ export interface _SERVICE {
492
586
  'revokeBuyer' : ActorMethod<[string, Principal], Result>,
493
587
  'setDocumentStorageCanister' : ActorMethod<[Principal], Result>,
494
588
  'setFlowState' : ActorMethod<[string, string], Result>,
589
+ 'setLandRegistryCanister' : ActorMethod<[string], Result>,
590
+ 'setLedgerManagerCanister' : ActorMethod<[string], Result>,
495
591
  'setListingData' : ActorMethod<[string, string], Result>,
592
+ 'setPropertyRegistryCanister' : ActorMethod<[string], Result>,
496
593
  'setUserManagementCanister' : ActorMethod<[string], Result>,
497
594
  'trigger_land_registry_submission' : ActorMethod<[string], Result>,
498
595
  'updatePartyAMLDoc' : ActorMethod<[string, Principal, string], Result_2>,
@@ -507,6 +604,7 @@ export interface _SERVICE {
507
604
  'updateTA10' : ActorMethod<[string, TA10FittingsAndContents], Result_1>,
508
605
  'updateTA6' : ActorMethod<[string, TA6PropertyInformation], Result_1>,
509
606
  'updateTA7' : ActorMethod<[string, TA7LeaseholdInformation], Result_1>,
607
+ 'updateTitleNumber' : ActorMethod<[string, string], Result>,
510
608
  'updateTransactionStatus' : ActorMethod<[bigint, string], boolean>,
511
609
  'update_land_registry_status' : ActorMethod<
512
610
  [string, LandRegistryStatus, [] | [string], [] | [bigint]],
@@ -72,7 +72,7 @@ export const idlFactory = ({ IDL }) => {
72
72
  'regulatoryBody' : RegulatoryBody,
73
73
  });
74
74
  const Result_1 = IDL.Variant({ 'ok' : IDL.Null, 'err' : IDL.Text });
75
- const Result_18 = IDL.Variant({
75
+ const Result_19 = IDL.Variant({
76
76
  'ok' : IDL.Tuple(IDL.Text, IDL.Text),
77
77
  'err' : IDL.Text,
78
78
  });
@@ -193,7 +193,7 @@ export const idlFactory = ({ IDL }) => {
193
193
  'preCompletion' : IDL.Null,
194
194
  'searches' : IDL.Null,
195
195
  });
196
- const Result_17 = IDL.Variant({ 'ok' : Phase, 'err' : IDL.Text });
196
+ const Result_18 = IDL.Variant({ 'ok' : Phase, 'err' : IDL.Text });
197
197
  const Notification = IDL.Record({
198
198
  'id' : IDL.Nat,
199
199
  'documentHash' : IDL.Text,
@@ -205,6 +205,29 @@ export const idlFactory = ({ IDL }) => {
205
205
  'uploadedBy' : IDL.Principal,
206
206
  'transactionId' : IDL.Text,
207
207
  });
208
+ const Urgency = IDL.Variant({
209
+ 'blocking' : IDL.Null,
210
+ 'soon' : IDL.Null,
211
+ 'later' : IDL.Null,
212
+ });
213
+ const NextStepOption = IDL.Record({
214
+ 'action' : IDL.Text,
215
+ 'displayLabel' : IDL.Text,
216
+ 'estimatedDelayIfSkipped' : IDL.Opt(IDL.Nat),
217
+ 'whyThis' : IDL.Text,
218
+ });
219
+ const NextStepRecommendation = IDL.Record({
220
+ 'why' : IDL.Text,
221
+ 'urgency' : Urgency,
222
+ 'blocker' : IDL.Text,
223
+ 'blockerLabel' : IDL.Text,
224
+ 'options' : IDL.Vec(NextStepOption),
225
+ 'partial' : IDL.Bool,
226
+ });
227
+ const Result_17 = IDL.Variant({
228
+ 'ok' : NextStepRecommendation,
229
+ 'err' : IDL.Text,
230
+ });
208
231
  const PartyProgress = IDL.Record({
209
232
  'completedParties' : IDL.Nat,
210
233
  'overallProgress' : IDL.Nat,
@@ -461,7 +484,7 @@ export const idlFactory = ({ IDL }) => {
461
484
  IDL.Nat64,
462
485
  IDL.Text,
463
486
  ],
464
- [Result_18],
487
+ [Result_19],
465
488
  [],
466
489
  ),
467
490
  'deleteTransaction' : IDL.Func([IDL.Text], [Result], []),
@@ -473,7 +496,7 @@ export const idlFactory = ({ IDL }) => {
473
496
  ['query'],
474
497
  ),
475
498
  'getAllTransactions' : IDL.Func([], [IDL.Vec(Transaction)], ['query']),
476
- 'getCurrentPhase' : IDL.Func([IDL.Text], [Result_17], ['query']),
499
+ 'getCurrentPhase' : IDL.Func([IDL.Text], [Result_18], ['query']),
477
500
  'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
478
501
  'getDocumentStorageCanister' : IDL.Func(
479
502
  [],
@@ -487,14 +510,17 @@ export const idlFactory = ({ IDL }) => {
487
510
  ),
488
511
  'getFlowState' : IDL.Func([IDL.Text], [IDL.Opt(IDL.Text)], ['query']),
489
512
  'getInviteCode' : IDL.Func([IDL.Text], [Result], ['query']),
513
+ 'getLandRegistryCanister' : IDL.Func([], [IDL.Text], ['query']),
490
514
  'getLandRegistryDetail' : IDL.Func(
491
515
  [IDL.Text],
492
516
  [IDL.Opt(LandRegistryIntegration)],
493
517
  ['query'],
494
518
  ),
519
+ 'getLedgerManagerCanister' : IDL.Func([], [IDL.Text], ['query']),
495
520
  'getListingData' : IDL.Func([IDL.Text], [IDL.Opt(IDL.Text)], ['query']),
496
521
  'getMyNotifications' : IDL.Func([], [IDL.Vec(Notification)], ['query']),
497
522
  'getMyTransactions' : IDL.Func([], [IDL.Vec(Transaction)], ['query']),
523
+ 'getNextStep' : IDL.Func([IDL.Text], [Result_17], ['composite_query']),
498
524
  'getOutstandingRequisitions' : IDL.Func(
499
525
  [],
500
526
  [IDL.Vec(IDL.Tuple(IDL.Text, Requisition))],
@@ -507,6 +533,7 @@ export const idlFactory = ({ IDL }) => {
507
533
  ['query'],
508
534
  ),
509
535
  'getPhaseMilestones' : IDL.Func([IDL.Text], [Result_15], ['query']),
536
+ 'getPropertyRegistryCanister' : IDL.Func([], [IDL.Text], ['query']),
510
537
  'getSolicitorStatus' : IDL.Func([IDL.Text], [Result_14], ['query']),
511
538
  'getTA10' : IDL.Func([IDL.Text], [Result_13], ['query']),
512
539
  'getTA6' : IDL.Func([IDL.Text], [Result_12], ['query']),
@@ -553,12 +580,16 @@ export const idlFactory = ({ IDL }) => {
553
580
  [Result],
554
581
  [],
555
582
  ),
583
+ 'joinAsBotByInviteCode' : IDL.Func([IDL.Text, IDL.Text], [Result_6], []),
556
584
  'joinTransactionByInviteCode' : IDL.Func([IDL.Text], [Result_6], []),
585
+ 'joinTransactionByInviteCodeAsBuyer' : IDL.Func([IDL.Text], [Result_6], []),
586
+ 'leaveTransaction' : IDL.Func([IDL.Text], [Result], []),
557
587
  'linkTransactionToChain' : IDL.Func([IDL.Text, IDL.Text], [Result_1], []),
558
588
  'markAllNotificationsRead' : IDL.Func([], [IDL.Nat], []),
559
589
  'markContractDrafted' : IDL.Func([IDL.Text], [Result_1], []),
560
590
  'markNotificationRead' : IDL.Func([IDL.Nat], [Result_1], []),
561
591
  'markSearchesOrdered' : IDL.Func([IDL.Text], [Result_1], []),
592
+ 'migrateDevPlotSeller' : IDL.Func([IDL.Text, IDL.Principal], [Result], []),
562
593
  'onDocumentRegistered' : IDL.Func(
563
594
  [IDL.Text, IDL.Text, IDL.Text, IDL.Principal],
564
595
  [],
@@ -572,6 +603,11 @@ export const idlFactory = ({ IDL }) => {
572
603
  [Result],
573
604
  [],
574
605
  ),
606
+ 'recordConveyancerSelected' : IDL.Func(
607
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Nat],
608
+ [Result_1],
609
+ [],
610
+ ),
575
611
  'recordFormUpload' : IDL.Func(
576
612
  [IDL.Text, IDL.Text, IDL.Text, IDL.Text],
577
613
  [Result_1],
@@ -582,6 +618,12 @@ export const idlFactory = ({ IDL }) => {
582
618
  [Result],
583
619
  [],
584
620
  ),
621
+ 'recordQuoteReceived' : IDL.Func(
622
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Nat],
623
+ [Result_1],
624
+ [],
625
+ ),
626
+ 'recordQuoteRequested' : IDL.Func([IDL.Text, IDL.Text], [Result_1], []),
585
627
  'recordRequisition' : IDL.Func([IDL.Text, Requisition], [Result_1], []),
586
628
  'removeParty' : IDL.Func([IDL.Text, IDL.Principal], [Result_1], []),
587
629
  'removeSolicitor' : IDL.Func(
@@ -598,7 +640,10 @@ export const idlFactory = ({ IDL }) => {
598
640
  'revokeBuyer' : IDL.Func([IDL.Text, IDL.Principal], [Result], []),
599
641
  'setDocumentStorageCanister' : IDL.Func([IDL.Principal], [Result], []),
600
642
  'setFlowState' : IDL.Func([IDL.Text, IDL.Text], [Result], []),
643
+ 'setLandRegistryCanister' : IDL.Func([IDL.Text], [Result], []),
644
+ 'setLedgerManagerCanister' : IDL.Func([IDL.Text], [Result], []),
601
645
  'setListingData' : IDL.Func([IDL.Text, IDL.Text], [Result], []),
646
+ 'setPropertyRegistryCanister' : IDL.Func([IDL.Text], [Result], []),
602
647
  'setUserManagementCanister' : IDL.Func([IDL.Text], [Result], []),
603
648
  'trigger_land_registry_submission' : IDL.Func([IDL.Text], [Result], []),
604
649
  'updatePartyAMLDoc' : IDL.Func(
@@ -627,6 +672,7 @@ export const idlFactory = ({ IDL }) => {
627
672
  ),
628
673
  'updateTA6' : IDL.Func([IDL.Text, TA6PropertyInformation], [Result_1], []),
629
674
  'updateTA7' : IDL.Func([IDL.Text, TA7LeaseholdInformation], [Result_1], []),
675
+ 'updateTitleNumber' : IDL.Func([IDL.Text, IDL.Text], [Result], []),
630
676
  'updateTransactionStatus' : IDL.Func([IDL.Nat, IDL.Text], [IDL.Bool], []),
631
677
  'update_land_registry_status' : IDL.Func(
632
678
  [IDL.Text, LandRegistryStatus, IDL.Opt(IDL.Text), IDL.Opt(IDL.Int)],