@jsm-mit/tigi-sharded-package 0.8.0 → 0.10.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.
@@ -2,6 +2,24 @@ import type { Principal } from '@icp-sdk/core/principal';
2
2
  import type { ActorMethod } from '@icp-sdk/core/agent';
3
3
  import type { IDL } from '@icp-sdk/core/candid';
4
4
 
5
+ export interface ApkChunkArgs {
6
+ 'bytes' : Uint8Array | number[],
7
+ 'index' : number,
8
+ }
9
+ export interface ApkCommitArgs {
10
+ 'sha256' : Uint8Array | number[],
11
+ 'chunks' : number,
12
+ 'versionCode' : number,
13
+ 'versionName' : string,
14
+ }
15
+ export interface ApkInfo {
16
+ 'sha256' : Uint8Array | number[],
17
+ 'size' : bigint,
18
+ 'committedAtNs' : bigint,
19
+ 'chunks' : number,
20
+ 'versionCode' : number,
21
+ 'versionName' : string,
22
+ }
5
23
  export interface Block {
6
24
  'by' : Principal,
7
25
  'atNs' : bigint,
@@ -74,6 +92,14 @@ export interface DriverCanister {
74
92
  }
75
93
  export type DriverCanisterKind = { 'own' : null } |
76
94
  { 'pool' : null };
95
+ export interface DriverCanisterQuote {
96
+ 'accountId' : Uint8Array | number[],
97
+ 'minimumE8s' : bigint,
98
+ 'xdrPermyriadPerIcp' : bigint,
99
+ 'balanceE8s' : bigint,
100
+ 'suggestedE8s' : bigint,
101
+ 'priceCycles' : bigint,
102
+ }
77
103
  export interface DriverCanisterStatus {
78
104
  'moduleHash' : [] | [Uint8Array | number[]],
79
105
  'blocked' : boolean,
@@ -242,21 +268,23 @@ export type Result = { 'ok' : bigint } |
242
268
  { 'err' : Error };
243
269
  export type Result_1 = { 'ok' : Uint8Array | number[] } |
244
270
  { 'err' : Error };
245
- export type Result_10 = { 'ok' : ClaimCode } |
271
+ export type Result_10 = { 'ok' : FeePaid } |
246
272
  { 'err' : Error };
247
- export type Result_11 = { 'ok' : Array<DriverRoomView> } |
273
+ export type Result_11 = { 'ok' : ClaimCode } |
248
274
  { 'err' : Error };
249
- export type Result_12 = { 'ok' : Array<DriverFeeAccountView> } |
275
+ export type Result_12 = { 'ok' : Array<DriverRoomView> } |
250
276
  { 'err' : Error };
251
- export type Result_13 = { 'ok' : DriverCanistersPage } |
277
+ export type Result_13 = { 'ok' : Array<DriverFeeAccountView> } |
252
278
  { 'err' : Error };
253
- export type Result_14 = { 'ok' : Array<Block> } |
279
+ export type Result_14 = { 'ok' : DriverCanistersPage } |
254
280
  { 'err' : Error };
255
- export type Result_15 = { 'ok' : LeaseAnswer } |
281
+ export type Result_15 = { 'ok' : Array<Block> } |
256
282
  { 'err' : Error };
257
- export type Result_16 = { 'ok' : RideBatchResult } |
283
+ export type Result_16 = { 'ok' : LeaseAnswer } |
258
284
  { 'err' : Error };
259
- export type Result_17 = {
285
+ export type Result_17 = { 'ok' : RideBatchResult } |
286
+ { 'err' : Error };
287
+ export type Result_18 = {
260
288
  'ok' : {
261
289
  'subjects' : bigint,
262
290
  'headSeq' : bigint,
@@ -265,39 +293,41 @@ export type Result_17 = {
265
293
  }
266
294
  } |
267
295
  { 'err' : Error };
268
- export type Result_18 = { 'ok' : Wiring } |
269
- { 'err' : Error };
270
- export type Result_19 = { 'ok' : Array<ProfileEntry> } |
296
+ export type Result_19 = { 'ok' : Wiring } |
271
297
  { 'err' : Error };
272
298
  export type Result_2 = { 'ok' : boolean } |
273
299
  { 'err' : Error };
274
- export type Result_20 = { 'ok' : RidesPage } |
300
+ export type Result_20 = { 'ok' : Array<ProfileEntry> } |
275
301
  { 'err' : Error };
276
- export type Result_21 = { 'ok' : RideView } |
302
+ export type Result_21 = { 'ok' : RidesPage } |
277
303
  { 'err' : Error };
278
- export type Result_22 = { 'ok' : [] | [Rating] } |
304
+ export type Result_22 = { 'ok' : RideView } |
279
305
  { 'err' : Error };
280
- export type Result_23 = { 'ok' : FeeStatus } |
306
+ export type Result_23 = { 'ok' : [] | [Rating] } |
281
307
  { 'err' : Error };
282
- export type Result_24 = { 'ok' : FactoryStatus } |
308
+ export type Result_24 = { 'ok' : FeeStatus } |
283
309
  { 'err' : Error };
284
- export type Result_25 = { 'ok' : [] | [RolloutView] } |
310
+ export type Result_25 = { 'ok' : FactoryStatus } |
285
311
  { 'err' : Error };
286
- export type Result_26 = { 'ok' : FeeBillAnswer } |
312
+ export type Result_26 = { 'ok' : [] | [RolloutView] } |
287
313
  { 'err' : Error };
288
- export type Result_27 = { 'ok' : DriverFeeAccountView } |
314
+ export type Result_27 = { 'ok' : FeeBillAnswer } |
289
315
  { 'err' : Error };
290
- export type Result_28 = { 'ok' : ChatRoomsStatus } |
316
+ export type Result_28 = { 'ok' : DriverFeeAccountView } |
291
317
  { 'err' : Error };
292
- export type Result_29 = { 'ok' : Array<Principal> } |
318
+ export type Result_29 = { 'ok' : ChatRoomsStatus } |
293
319
  { 'err' : Error };
294
320
  export type Result_3 = { 'ok' : RolloutView } |
295
321
  { 'err' : Error };
296
- export type Result_30 = { 'ok' : Principal } |
322
+ export type Result_30 = { 'ok' : Array<Principal> } |
323
+ { 'err' : Error };
324
+ export type Result_31 = { 'ok' : Principal } |
297
325
  { 'err' : Error };
298
- export type Result_31 = { 'ok' : WasmInfo } |
326
+ export type Result_32 = { 'ok' : WasmInfo } |
299
327
  { 'err' : Error };
300
- export type Result_32 = { 'ok' : ChatSharesAck } |
328
+ export type Result_33 = { 'ok' : ApkInfo } |
329
+ { 'err' : Error };
330
+ export type Result_34 = { 'ok' : ChatSharesAck } |
301
331
  { 'err' : Error };
302
332
  export type Result_4 = { 'ok' : Profile } |
303
333
  { 'err' : Error };
@@ -309,7 +339,7 @@ export type Result_7 = { 'ok' : ChatConfig } |
309
339
  { 'err' : Error };
310
340
  export type Result_8 = { 'ok' : RateRideOutcome } |
311
341
  { 'err' : Error };
312
- export type Result_9 = { 'ok' : FeePaid } |
342
+ export type Result_9 = { 'ok' : DriverCanisterQuote } |
313
343
  { 'err' : Error };
314
344
  export interface RideBatch {
315
345
  'ratings' : Array<RatingEntry>,
@@ -393,7 +423,7 @@ export interface TigiCore {
393
423
  * / it; no multiplier). A pool canister's share and a room of no canister of the registry
394
424
  * / are absorbed (the coordinator keeps paying them). Once per `batchId`.
395
425
  */
396
- 'addChatShares' : ActorMethod<[ChatSharesArgs], Result_32>,
426
+ 'addChatShares' : ActorMethod<[ChatSharesArgs], Result_34>,
397
427
  /**
398
428
  * / Admins: a canister the core controls joins the demo pool (U-35).
399
429
  */
@@ -414,28 +444,29 @@ export interface TigiCore {
414
444
  */
415
445
  'claimDriverCanister' : ActorMethod<[ClaimArgs], Result_6>,
416
446
  'clearLogs' : ActorMethod<[], undefined>,
447
+ /**
448
+ * / Admins (F-24): the chunks become THE app; drivers' canisters take it at their "Aktualizuj".
449
+ */
450
+ 'commitDriverApk' : ActorMethod<[ApkCommitArgs], Result_33>,
417
451
  /**
418
452
  * / Admins: the chunks become THE module of their kind. A new driver wasm is released
419
453
  * / (F-11) and its hash goes to the workers.
420
454
  */
421
- 'commitDriverWasm' : ActorMethod<[WasmCommitArgs], Result_31>,
455
+ 'commitDriverWasm' : ActorMethod<[WasmCommitArgs], Result_32>,
422
456
  /**
423
457
  * / Admins, localTest: an empty canister from the core's cycles joins the demo pool.
424
458
  */
425
459
  'createLocalPoolCanister' : ActorMethod<[], Result_6>,
426
- /**
427
- * / F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
428
- */
429
460
  'createMyDriverCanister' : ActorMethod<[], Result_6>,
430
461
  /**
431
462
  * / Admins: the simulator, created once (F-18).
432
463
  */
433
- 'ensureSimulator' : ActorMethod<[], Result_30>,
464
+ 'ensureSimulator' : ActorMethod<[], Result_31>,
434
465
  /**
435
466
  * / F-8: 15 min more for the holder of a demo canister.
436
467
  */
437
468
  'extendDemoLease' : ActorMethod<[], Result_6>,
438
- 'getAdmins' : ActorMethod<[], Result_29>,
469
+ 'getAdmins' : ActorMethod<[], Result_30>,
439
470
  /**
440
471
  * / For the fronts (through the package): where the chat of this environment is. Null =
441
472
  * / no chat here yet. The room of a driver is `ChatRoomFunctions.driverRoomId`.
@@ -444,7 +475,15 @@ export interface TigiCore {
444
475
  /**
445
476
  * / Admins: how far the driver rooms are (C-15).
446
477
  */
447
- 'getChatRoomsStatus' : ActorMethod<[], Result_28>,
478
+ 'getChatRoomsStatus' : ActorMethod<[], Result_29>,
479
+ /**
480
+ * / F-24 (public): the current app — what a driver canister compares its own with.
481
+ */
482
+ 'getDriverApk' : ActorMethod<[], [] | [ApkInfo]>,
483
+ /**
484
+ * / F-24 (public): one chunk of the current app; a driver canister reads them in order.
485
+ */
486
+ 'getDriverApkChunk' : ActorMethod<[number], [] | [Uint8Array | number[]]>,
448
487
  /**
449
488
  * / WO-1, WO-2: what the core knows of a canister — for the workers and anybody.
450
489
  */
@@ -452,24 +491,24 @@ export interface TigiCore {
452
491
  /**
453
492
  * / Admins: the account of one driver canister (C-17 … C-20).
454
493
  */
455
- 'getDriverFeeAccount' : ActorMethod<[CanisterArgs], Result_27>,
494
+ 'getDriverFeeAccount' : ActorMethod<[CanisterArgs], Result_28>,
456
495
  /**
457
496
  * / C-19: a driver canister of the registry asks for its bill — the events since its
458
497
  * / last settlement, priced on the fee's day. Called by the canister at its first
459
498
  * / "Przyjmuję zlecenia" of a day. A pool canister owes nothing (C-18).
460
499
  */
461
- 'getDriverFeeBill' : ActorMethod<[], Result_26>,
500
+ 'getDriverFeeBill' : ActorMethod<[], Result_27>,
462
501
  /**
463
502
  * / Admins (stage 7): the aggregated rating of one driver (sum and count of stars; null =
464
503
  * / no rating yet) — the value the workers get through the outbox (C-6).
465
504
  */
466
- 'getDriverRating' : ActorMethod<[DriverRatingArgs], Result_22>,
467
- 'getDriverRollout' : ActorMethod<[], Result_25>,
468
- 'getFactoryStatus' : ActorMethod<[], Result_24>,
505
+ 'getDriverRating' : ActorMethod<[DriverRatingArgs], Result_23>,
506
+ 'getDriverRollout' : ActorMethod<[], Result_26>,
507
+ 'getFactoryStatus' : ActorMethod<[], Result_25>,
469
508
  /**
470
509
  * / C-22: the rates, the day, the multiplier cached, the totals.
471
510
  */
472
- 'getFeeStatus' : ActorMethod<[], Result_23>,
511
+ 'getFeeStatus' : ActorMethod<[], Result_24>,
473
512
  'getLogs' : ActorMethod<[], string>,
474
513
  /**
475
514
  * / The caller's own canister, or the demo canister the caller holds now.
@@ -480,22 +519,22 @@ export interface TigiCore {
480
519
  * / C-16, PF-4: the caller's own rating as a rider (sum and count of stars; null = no
481
520
  * / rating yet). Ratings reach the core in the workers' batches, up to a minute late.
482
521
  */
483
- 'getMyRating' : ActorMethod<[], Result_22>,
522
+ 'getMyRating' : ActorMethod<[], Result_23>,
484
523
  /**
485
524
  * / C-8 (KU-4, stage 7): one line of the caller's history by its requestId — for the
486
525
  * / details screen after a reload and to show the rating after `rateMyRide`. Another
487
526
  * / rider's ride → `NotAuthorized`; not in the core (yet, K-9) → `NotFound`.
488
527
  */
489
- 'getMyRide' : ActorMethod<[RequestIdArgs], Result_21>,
528
+ 'getMyRide' : ActorMethod<[RequestIdArgs], Result_22>,
490
529
  /**
491
530
  * / C-8: the caller's rides, newest first, with the places (KU-4) and whether the driver
492
531
  * / can still be rated (KU-5, C-23).
493
532
  */
494
- 'getMyRides' : ActorMethod<[RidesPageArgs], Result_20>,
533
+ 'getMyRides' : ActorMethod<[RidesPageArgs], Result_21>,
495
534
  /**
496
535
  * / C-3: the names of up to MAX_PROFILES_PER_CALL principals; unknown ones are left out.
497
536
  */
498
- 'getProfiles' : ActorMethod<[ProfilesArgs], Result_19>,
537
+ 'getProfiles' : ActorMethod<[ProfilesArgs], Result_20>,
499
538
  /**
500
539
  * / F-11: the driver wasms released so far, oldest first.
501
540
  */
@@ -507,11 +546,11 @@ export interface TigiCore {
507
546
  /**
508
547
  * / Admins: the coordinator, the workers confirmed so far, the mode.
509
548
  */
510
- 'getWiring' : ActorMethod<[], Result_18>,
549
+ 'getWiring' : ActorMethod<[], Result_19>,
511
550
  /**
512
551
  * / Admins: how far the outbox to the workers is (C-6, C-7).
513
552
  */
514
- 'getWorkerOutbox' : ActorMethod<[], Result_17>,
553
+ 'getWorkerOutbox' : ActorMethod<[], Result_18>,
515
554
  /**
516
555
  * / Workers of the group: the core asks the coordinator once and remembers the worker,
517
556
  * / which then gets the network state through the outbox. A worker calls it once after
@@ -523,7 +562,7 @@ export interface TigiCore {
523
562
  * / Idempotent: a known requestId and a counted rating count once. Invalid entries are
524
563
  * / rejected and logged; the worker drops the whole batch after an ok.
525
564
  */
526
- 'ingestRideBatch' : ActorMethod<[RideBatch], Result_16>,
565
+ 'ingestRideBatch' : ActorMethod<[RideBatch], Result_17>,
527
566
  /**
528
567
  * / C-14: the accounts gate of the chat (U-43). The chat core asks this group's
529
568
  * / coordinator WHERE (`accountsCanisterFor` → this core) and asks here: true = an
@@ -534,28 +573,33 @@ export interface TigiCore {
534
573
  * / F-5 … F-7: a demo canister for 15 min (outside prod). A fresh lease comes with a
535
574
  * / one-time claim code (F-20, U-45).
536
575
  */
537
- 'leaseDemoDriverCanister' : ActorMethod<[], Result_15>,
538
- 'listBlocks' : ActorMethod<[PageArgs], Result_14>,
539
- 'listDriverCanisters' : ActorMethod<[PageArgs], Result_13>,
576
+ 'leaseDemoDriverCanister' : ActorMethod<[], Result_16>,
577
+ 'listBlocks' : ActorMethod<[PageArgs], Result_15>,
578
+ 'listDriverCanisters' : ActorMethod<[PageArgs], Result_14>,
540
579
  /**
541
580
  * / Admins: the accounts, 100 a page at most.
542
581
  */
543
- 'listDriverFeeAccounts' : ActorMethod<[PageArgs], Result_12>,
582
+ 'listDriverFeeAccounts' : ActorMethod<[PageArgs], Result_13>,
544
583
  /**
545
584
  * / Admins: the driver rooms as the core wants them, 100 a page at most.
546
585
  */
547
- 'listDriverRooms' : ActorMethod<[PageArgs], Result_11>,
586
+ 'listDriverRooms' : ActorMethod<[PageArgs], Result_12>,
548
587
  /**
549
588
  * / F-20: a fresh claim code for the caller's running demo lease; the old one stops
550
589
  * / working.
551
590
  */
552
- 'newClaimCode' : ActorMethod<[], Result_10>,
591
+ 'newClaimCode' : ActorMethod<[], Result_11>,
553
592
  /**
554
593
  * / C-20: the driver canister pays the bill of `day` with the cycles attached to this
555
594
  * / call. The core takes exactly the bill (the rest goes back), or nothing when less is
556
595
  * / attached (`FEE_SHORT`); a day paid already answers `accepted = 0`.
557
596
  */
558
- 'payDriverFee' : ActorMethod<[FeePayArgs], Result_9>,
597
+ 'payDriverFee' : ActorMethod<[FeePayArgs], Result_10>,
598
+ /**
599
+ * / F-2 … F-4, F-10: the caller's own driver canister (localTest: from the core's cycles).
600
+ * / F-1 (user 2026-10-31): what a driver canister costs now and the caller's account to pay to.
601
+ */
602
+ 'quoteMyDriverCanister' : ActorMethod<[], Result_9>,
559
603
  /**
560
604
  * / C-23 (KU-5, stage 7): the rider rates the driver of a finished ride from the history.
561
605
  * / Only the ride's rider; a completed ride within 24 h of its end (K-8); once per ride
@@ -614,6 +658,10 @@ export interface TigiCore {
614
658
  * / Admins: the simulator gets the current simulator wasm (stop → upgrade → start).
615
659
  */
616
660
  'upgradeSimulator' : ActorMethod<[], Result_1>,
661
+ /**
662
+ * / Admins (F-24): one chunk of a new Android app.
663
+ */
664
+ 'uploadDriverApkChunk' : ActorMethod<[ApkChunkArgs], Result>,
617
665
  /**
618
666
  * / Admins: one chunk of a new driver or simulator module (gzipped: ~0.7 MB).
619
667
  */
@@ -61,7 +61,7 @@ export const idlFactory = ({ IDL }) => {
61
61
  'addedCycles' : IDL.Nat,
62
62
  'unknown' : IDL.Nat,
63
63
  });
64
- const Result_32 = IDL.Variant({ 'ok' : ChatSharesAck, 'err' : Error });
64
+ const Result_34 = IDL.Variant({ 'ok' : ChatSharesAck, 'err' : Error });
65
65
  const CanisterArgs = IDL.Record({ 'canister' : IDL.Principal });
66
66
  const DriverCanisterKind = IDL.Variant({
67
67
  'own' : IDL.Null,
@@ -91,6 +91,21 @@ export const idlFactory = ({ IDL }) => {
91
91
  'code' : IDL.Text,
92
92
  'canister' : IDL.Principal,
93
93
  });
94
+ const ApkCommitArgs = IDL.Record({
95
+ 'sha256' : IDL.Vec(IDL.Nat8),
96
+ 'chunks' : IDL.Nat32,
97
+ 'versionCode' : IDL.Nat32,
98
+ 'versionName' : IDL.Text,
99
+ });
100
+ const ApkInfo = IDL.Record({
101
+ 'sha256' : IDL.Vec(IDL.Nat8),
102
+ 'size' : IDL.Nat,
103
+ 'committedAtNs' : IDL.Int,
104
+ 'chunks' : IDL.Nat32,
105
+ 'versionCode' : IDL.Nat32,
106
+ 'versionName' : IDL.Text,
107
+ });
108
+ const Result_33 = IDL.Variant({ 'ok' : ApkInfo, 'err' : Error });
94
109
  const WasmKind = IDL.Variant({ 'simulator' : IDL.Null, 'driver' : IDL.Null });
95
110
  const WasmCommitArgs = IDL.Record({
96
111
  'sha256' : IDL.Vec(IDL.Nat8),
@@ -103,9 +118,9 @@ export const idlFactory = ({ IDL }) => {
103
118
  'size' : IDL.Nat,
104
119
  'committedAtNs' : IDL.Int,
105
120
  });
106
- const Result_31 = IDL.Variant({ 'ok' : WasmInfo, 'err' : Error });
107
- const Result_30 = IDL.Variant({ 'ok' : IDL.Principal, 'err' : Error });
108
- const Result_29 = IDL.Variant({
121
+ const Result_32 = IDL.Variant({ 'ok' : WasmInfo, 'err' : Error });
122
+ const Result_31 = IDL.Variant({ 'ok' : IDL.Principal, 'err' : Error });
123
+ const Result_30 = IDL.Variant({
109
124
  'ok' : IDL.Vec(IDL.Principal),
110
125
  'err' : Error,
111
126
  });
@@ -121,7 +136,7 @@ export const idlFactory = ({ IDL }) => {
121
136
  'pendingSinceNs' : IDL.Opt(IDL.Int),
122
137
  'rooms' : IDL.Nat,
123
138
  });
124
- const Result_28 = IDL.Variant({ 'ok' : ChatRoomsStatus, 'err' : Error });
139
+ const Result_29 = IDL.Variant({ 'ok' : ChatRoomsStatus, 'err' : Error });
125
140
  const DriverCanisterStatus = IDL.Record({
126
141
  'moduleHash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
127
142
  'blocked' : IDL.Bool,
@@ -165,7 +180,7 @@ export const idlFactory = ({ IDL }) => {
165
180
  'paidTotal' : IDL.Nat,
166
181
  'lastFee' : IDL.Opt(FeeRecord),
167
182
  });
168
- const Result_27 = IDL.Variant({ 'ok' : DriverFeeAccountView, 'err' : Error });
183
+ const Result_28 = IDL.Variant({ 'ok' : DriverFeeAccountView, 'err' : Error });
169
184
  const FeeBillAnswer = IDL.Record({
170
185
  'day' : IDL.Nat,
171
186
  'settled' : IDL.Bool,
@@ -175,14 +190,14 @@ export const idlFactory = ({ IDL }) => {
175
190
  'multiplierPermille' : IDL.Nat,
176
191
  'rates' : FeeRates,
177
192
  });
178
- const Result_26 = IDL.Variant({ 'ok' : FeeBillAnswer, 'err' : Error });
193
+ const Result_27 = IDL.Variant({ 'ok' : FeeBillAnswer, 'err' : Error });
179
194
  const DriverRatingArgs = IDL.Record({
180
195
  'driverKey' : IDL.Text,
181
196
  'canister' : IDL.Principal,
182
197
  });
183
198
  const Rating = IDL.Record({ 'sum' : IDL.Nat, 'count' : IDL.Nat });
184
- const Result_22 = IDL.Variant({ 'ok' : IDL.Opt(Rating), 'err' : Error });
185
- const Result_25 = IDL.Variant({ 'ok' : IDL.Opt(RolloutView), 'err' : Error });
199
+ const Result_23 = IDL.Variant({ 'ok' : IDL.Opt(Rating), 'err' : Error });
200
+ const Result_26 = IDL.Variant({ 'ok' : IDL.Opt(RolloutView), 'err' : Error });
186
201
  const FactoryStatus = IDL.Record({
187
202
  'simulator' : IDL.Opt(IDL.Principal),
188
203
  'mode' : Mode,
@@ -194,7 +209,7 @@ export const idlFactory = ({ IDL }) => {
194
209
  'driverWasm' : IDL.Opt(WasmInfo),
195
210
  'registered' : IDL.Nat,
196
211
  });
197
- const Result_24 = IDL.Variant({ 'ok' : FactoryStatus, 'err' : Error });
212
+ const Result_25 = IDL.Variant({ 'ok' : FactoryStatus, 'err' : Error });
198
213
  const FeeStatus = IDL.Record({
199
214
  'multiplier' : IDL.Opt(
200
215
  IDL.Record({ 'day' : IDL.Nat, 'permille' : IDL.Nat })
@@ -214,7 +229,7 @@ export const idlFactory = ({ IDL }) => {
214
229
  'paidTotal' : IDL.Nat,
215
230
  'rates' : FeeRates,
216
231
  });
217
- const Result_23 = IDL.Variant({ 'ok' : FeeStatus, 'err' : Error });
232
+ const Result_24 = IDL.Variant({ 'ok' : FeeStatus, 'err' : Error });
218
233
  const Profile = IDL.Record({
219
234
  'updatedAtNs' : IDL.Int,
220
235
  'name' : IDL.Text,
@@ -242,7 +257,7 @@ export const idlFactory = ({ IDL }) => {
242
257
  'rider' : IDL.Principal,
243
258
  'myRating' : IDL.Opt(IDL.Nat8),
244
259
  });
245
- const Result_21 = IDL.Variant({ 'ok' : RideView, 'err' : Error });
260
+ const Result_22 = IDL.Variant({ 'ok' : RideView, 'err' : Error });
246
261
  const RidesPageArgs = IDL.Record({
247
262
  'beforeIndex' : IDL.Opt(IDL.Nat),
248
263
  'limit' : IDL.Nat,
@@ -251,13 +266,13 @@ export const idlFactory = ({ IDL }) => {
251
266
  'nextBeforeIndex' : IDL.Opt(IDL.Nat),
252
267
  'rides' : IDL.Vec(RideView),
253
268
  });
254
- const Result_20 = IDL.Variant({ 'ok' : RidesPage, 'err' : Error });
269
+ const Result_21 = IDL.Variant({ 'ok' : RidesPage, 'err' : Error });
255
270
  const ProfilesArgs = IDL.Record({ 'principals' : IDL.Vec(IDL.Principal) });
256
271
  const ProfileEntry = IDL.Record({
257
272
  'principal' : IDL.Principal,
258
273
  'name' : IDL.Text,
259
274
  });
260
- const Result_19 = IDL.Variant({
275
+ const Result_20 = IDL.Variant({
261
276
  'ok' : IDL.Vec(ProfileEntry),
262
277
  'err' : Error,
263
278
  });
@@ -271,8 +286,8 @@ export const idlFactory = ({ IDL }) => {
271
286
  'knownWorkers' : IDL.Vec(IDL.Principal),
272
287
  'coordinator' : IDL.Opt(IDL.Principal),
273
288
  });
274
- const Result_18 = IDL.Variant({ 'ok' : Wiring, 'err' : Error });
275
- const Result_17 = IDL.Variant({
289
+ const Result_19 = IDL.Variant({ 'ok' : Wiring, 'err' : Error });
290
+ const Result_18 = IDL.Variant({
276
291
  'ok' : IDL.Record({
277
292
  'subjects' : IDL.Nat,
278
293
  'headSeq' : IDL.Nat64,
@@ -325,7 +340,7 @@ export const idlFactory = ({ IDL }) => {
325
340
  'rejected' : IDL.Nat,
326
341
  'ratingsCounted' : IDL.Nat,
327
342
  });
328
- const Result_16 = IDL.Variant({ 'ok' : RideBatchResult, 'err' : Error });
343
+ const Result_17 = IDL.Variant({ 'ok' : RideBatchResult, 'err' : Error });
329
344
  const ClaimCode = IDL.Record({
330
345
  'expiresAtNs' : IDL.Int,
331
346
  'code' : IDL.Text,
@@ -346,7 +361,7 @@ export const idlFactory = ({ IDL }) => {
346
361
  'busy' : IDL.Record({ 'untilNs' : IDL.Int }),
347
362
  'leased' : LeasedCanister,
348
363
  });
349
- const Result_15 = IDL.Variant({ 'ok' : LeaseAnswer, 'err' : Error });
364
+ const Result_16 = IDL.Variant({ 'ok' : LeaseAnswer, 'err' : Error });
350
365
  const PageArgs = IDL.Record({ 'offset' : IDL.Nat, 'limit' : IDL.Nat });
351
366
  const BlockTarget = IDL.Variant({
352
367
  'driverCanister' : IDL.Principal,
@@ -362,13 +377,13 @@ export const idlFactory = ({ IDL }) => {
362
377
  'target' : BlockTarget,
363
378
  'reason' : IDL.Text,
364
379
  });
365
- const Result_14 = IDL.Variant({ 'ok' : IDL.Vec(Block), 'err' : Error });
380
+ const Result_15 = IDL.Variant({ 'ok' : IDL.Vec(Block), 'err' : Error });
366
381
  const DriverCanistersPage = IDL.Record({
367
382
  'total' : IDL.Nat,
368
383
  'canisters' : IDL.Vec(DriverCanister),
369
384
  });
370
- const Result_13 = IDL.Variant({ 'ok' : DriverCanistersPage, 'err' : Error });
371
- const Result_12 = IDL.Variant({
385
+ const Result_14 = IDL.Variant({ 'ok' : DriverCanistersPage, 'err' : Error });
386
+ const Result_13 = IDL.Variant({
372
387
  'ok' : IDL.Vec(DriverFeeAccountView),
373
388
  'err' : Error,
374
389
  });
@@ -380,18 +395,27 @@ export const idlFactory = ({ IDL }) => {
380
395
  'roomId' : IDL.Text,
381
396
  'synced' : IDL.Bool,
382
397
  });
383
- const Result_11 = IDL.Variant({
398
+ const Result_12 = IDL.Variant({
384
399
  'ok' : IDL.Vec(DriverRoomView),
385
400
  'err' : Error,
386
401
  });
387
- const Result_10 = IDL.Variant({ 'ok' : ClaimCode, 'err' : Error });
402
+ const Result_11 = IDL.Variant({ 'ok' : ClaimCode, 'err' : Error });
388
403
  const FeePayArgs = IDL.Record({ 'day' : IDL.Nat });
389
404
  const FeePaid = IDL.Record({
390
405
  'day' : IDL.Nat,
391
406
  'accepted' : IDL.Nat,
392
407
  'amount' : IDL.Nat,
393
408
  });
394
- const Result_9 = IDL.Variant({ 'ok' : FeePaid, 'err' : Error });
409
+ const Result_10 = IDL.Variant({ 'ok' : FeePaid, 'err' : Error });
410
+ const DriverCanisterQuote = IDL.Record({
411
+ 'accountId' : IDL.Vec(IDL.Nat8),
412
+ 'minimumE8s' : IDL.Nat,
413
+ 'xdrPermyriadPerIcp' : IDL.Nat,
414
+ 'balanceE8s' : IDL.Nat,
415
+ 'suggestedE8s' : IDL.Nat,
416
+ 'priceCycles' : IDL.Nat,
417
+ });
418
+ const Result_9 = IDL.Variant({ 'ok' : DriverCanisterQuote, 'err' : Error });
395
419
  const RateRideArgs = IDL.Record({
396
420
  'requestId' : IDL.Text,
397
421
  'stars' : IDL.Nat8,
@@ -419,6 +443,10 @@ export const idlFactory = ({ IDL }) => {
419
443
  });
420
444
  const UnblockRiderArgs = IDL.Record({ 'rider' : IDL.Principal });
421
445
  const Result_1 = IDL.Variant({ 'ok' : IDL.Vec(IDL.Nat8), 'err' : Error });
446
+ const ApkChunkArgs = IDL.Record({
447
+ 'bytes' : IDL.Vec(IDL.Nat8),
448
+ 'index' : IDL.Nat32,
449
+ });
422
450
  const WasmChunkArgs = IDL.Record({
423
451
  'kind' : WasmKind,
424
452
  'bytes' : IDL.Vec(IDL.Nat8),
@@ -427,52 +455,60 @@ export const idlFactory = ({ IDL }) => {
427
455
  const TigiCore = IDL.Service({
428
456
  'abortDriverRollout' : IDL.Func([], [Result_3], []),
429
457
  'addAdmin' : IDL.Func([PrincipalArgs], [Result_2], []),
430
- 'addChatShares' : IDL.Func([ChatSharesArgs], [Result_32], []),
458
+ 'addChatShares' : IDL.Func([ChatSharesArgs], [Result_34], []),
431
459
  'addPoolCanister' : IDL.Func([CanisterArgs], [Result_6], []),
432
460
  'blockDriver' : IDL.Func([BlockDriverArgs], [Result_2], []),
433
461
  'blockRider' : IDL.Func([BlockRiderArgs], [Result_2], []),
434
462
  'claimDriverCanister' : IDL.Func([ClaimArgs], [Result_6], []),
435
463
  'clearLogs' : IDL.Func([], [], []),
436
- 'commitDriverWasm' : IDL.Func([WasmCommitArgs], [Result_31], []),
464
+ 'commitDriverApk' : IDL.Func([ApkCommitArgs], [Result_33], []),
465
+ 'commitDriverWasm' : IDL.Func([WasmCommitArgs], [Result_32], []),
437
466
  'createLocalPoolCanister' : IDL.Func([], [Result_6], []),
438
467
  'createMyDriverCanister' : IDL.Func([], [Result_6], []),
439
- 'ensureSimulator' : IDL.Func([], [Result_30], []),
468
+ 'ensureSimulator' : IDL.Func([], [Result_31], []),
440
469
  'extendDemoLease' : IDL.Func([], [Result_6], []),
441
- 'getAdmins' : IDL.Func([], [Result_29], ['query']),
470
+ 'getAdmins' : IDL.Func([], [Result_30], ['query']),
442
471
  'getChatConfig' : IDL.Func([], [IDL.Opt(ChatConfig)], ['query']),
443
- 'getChatRoomsStatus' : IDL.Func([], [Result_28], ['query']),
472
+ 'getChatRoomsStatus' : IDL.Func([], [Result_29], ['query']),
473
+ 'getDriverApk' : IDL.Func([], [IDL.Opt(ApkInfo)], ['query']),
474
+ 'getDriverApkChunk' : IDL.Func(
475
+ [IDL.Nat32],
476
+ [IDL.Opt(IDL.Vec(IDL.Nat8))],
477
+ ['query'],
478
+ ),
444
479
  'getDriverCanisterStatus' : IDL.Func(
445
480
  [CanisterArgs],
446
481
  [DriverCanisterStatus],
447
482
  ['query'],
448
483
  ),
449
- 'getDriverFeeAccount' : IDL.Func([CanisterArgs], [Result_27], ['query']),
450
- 'getDriverFeeBill' : IDL.Func([], [Result_26], []),
451
- 'getDriverRating' : IDL.Func([DriverRatingArgs], [Result_22], ['query']),
452
- 'getDriverRollout' : IDL.Func([], [Result_25], ['query']),
453
- 'getFactoryStatus' : IDL.Func([], [Result_24], ['query']),
454
- 'getFeeStatus' : IDL.Func([], [Result_23], ['query']),
484
+ 'getDriverFeeAccount' : IDL.Func([CanisterArgs], [Result_28], ['query']),
485
+ 'getDriverFeeBill' : IDL.Func([], [Result_27], []),
486
+ 'getDriverRating' : IDL.Func([DriverRatingArgs], [Result_23], ['query']),
487
+ 'getDriverRollout' : IDL.Func([], [Result_26], ['query']),
488
+ 'getFactoryStatus' : IDL.Func([], [Result_25], ['query']),
489
+ 'getFeeStatus' : IDL.Func([], [Result_24], ['query']),
455
490
  'getLogs' : IDL.Func([], [IDL.Text], ['query']),
456
491
  'getMyDriverCanister' : IDL.Func([], [Result_6], ['query']),
457
492
  'getMyProfile' : IDL.Func([], [Result_4], ['query']),
458
- 'getMyRating' : IDL.Func([], [Result_22], ['query']),
459
- 'getMyRide' : IDL.Func([RequestIdArgs], [Result_21], ['query']),
460
- 'getMyRides' : IDL.Func([RidesPageArgs], [Result_20], ['query']),
461
- 'getProfiles' : IDL.Func([ProfilesArgs], [Result_19], ['query']),
493
+ 'getMyRating' : IDL.Func([], [Result_23], ['query']),
494
+ 'getMyRide' : IDL.Func([RequestIdArgs], [Result_22], ['query']),
495
+ 'getMyRides' : IDL.Func([RidesPageArgs], [Result_21], ['query']),
496
+ 'getProfiles' : IDL.Func([ProfilesArgs], [Result_20], ['query']),
462
497
  'getReleasedDriverWasms' : IDL.Func([], [IDL.Vec(ReleasedWasm)], ['query']),
463
498
  'getSimulator' : IDL.Func([], [IDL.Opt(IDL.Principal)], ['query']),
464
- 'getWiring' : IDL.Func([], [Result_18], ['query']),
465
- 'getWorkerOutbox' : IDL.Func([], [Result_17], ['query']),
499
+ 'getWiring' : IDL.Func([], [Result_19], ['query']),
500
+ 'getWorkerOutbox' : IDL.Func([], [Result_18], ['query']),
466
501
  'helloFromWorker' : IDL.Func([], [Result_2], []),
467
- 'ingestRideBatch' : IDL.Func([RideBatch], [Result_16], []),
502
+ 'ingestRideBatch' : IDL.Func([RideBatch], [Result_17], []),
468
503
  'isUser' : IDL.Func([IDL.Principal], [IDL.Bool], ['query']),
469
- 'leaseDemoDriverCanister' : IDL.Func([], [Result_15], []),
470
- 'listBlocks' : IDL.Func([PageArgs], [Result_14], ['query']),
471
- 'listDriverCanisters' : IDL.Func([PageArgs], [Result_13], ['query']),
472
- 'listDriverFeeAccounts' : IDL.Func([PageArgs], [Result_12], ['query']),
473
- 'listDriverRooms' : IDL.Func([PageArgs], [Result_11], ['query']),
474
- 'newClaimCode' : IDL.Func([], [Result_10], []),
475
- 'payDriverFee' : IDL.Func([FeePayArgs], [Result_9], []),
504
+ 'leaseDemoDriverCanister' : IDL.Func([], [Result_16], []),
505
+ 'listBlocks' : IDL.Func([PageArgs], [Result_15], ['query']),
506
+ 'listDriverCanisters' : IDL.Func([PageArgs], [Result_14], ['query']),
507
+ 'listDriverFeeAccounts' : IDL.Func([PageArgs], [Result_13], ['query']),
508
+ 'listDriverRooms' : IDL.Func([PageArgs], [Result_12], ['query']),
509
+ 'newClaimCode' : IDL.Func([], [Result_11], []),
510
+ 'payDriverFee' : IDL.Func([FeePayArgs], [Result_10], []),
511
+ 'quoteMyDriverCanister' : IDL.Func([], [Result_9], []),
476
512
  'rateMyRide' : IDL.Func([RateRideArgs], [Result_8], []),
477
513
  'removeAdmin' : IDL.Func([PrincipalArgs], [Result_2], []),
478
514
  'resumeDriverRollout' : IDL.Func([], [Result_3], []),
@@ -489,6 +525,7 @@ export const idlFactory = ({ IDL }) => {
489
525
  'unblockDriver' : IDL.Func([UnblockDriverArgs], [Result_2], []),
490
526
  'unblockRider' : IDL.Func([UnblockRiderArgs], [Result_2], []),
491
527
  'upgradeSimulator' : IDL.Func([], [Result_1], []),
528
+ 'uploadDriverApkChunk' : IDL.Func([ApkChunkArgs], [Result], []),
492
529
  'uploadDriverWasmChunk' : IDL.Func([WasmChunkArgs], [Result], []),
493
530
  });
494
531
  return TigiCore;