@agoric/inter-protocol 0.16.2-dev-89cb9d4.0.89cb9d4 → 0.16.2-dev-1c96426.0.1c96426

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 (95) hide show
  1. package/package.json +16 -16
  2. package/src/auction/auctionBook.d.ts +1 -0
  3. package/src/auction/auctionBook.d.ts.map +1 -1
  4. package/src/auction/auctionBook.js +1 -0
  5. package/src/auction/auctionMath.d.ts +1 -0
  6. package/src/auction/auctionMath.d.ts.map +1 -1
  7. package/src/auction/auctionMath.js +1 -0
  8. package/src/auction/auctioneer.d.ts +6 -5
  9. package/src/auction/auctioneer.d.ts.map +1 -1
  10. package/src/auction/auctioneer.js +1 -0
  11. package/src/auction/offerBook.d.ts +1 -0
  12. package/src/auction/offerBook.d.ts.map +1 -1
  13. package/src/auction/offerBook.js +1 -0
  14. package/src/auction/params.d.ts +5 -2
  15. package/src/auction/params.d.ts.map +1 -1
  16. package/src/auction/params.js +2 -1
  17. package/src/auction/scheduleMath.d.ts +1 -0
  18. package/src/auction/scheduleMath.d.ts.map +1 -1
  19. package/src/auction/scheduleMath.js +1 -0
  20. package/src/auction/scheduler.d.ts +3 -1
  21. package/src/auction/scheduler.d.ts.map +1 -1
  22. package/src/auction/scheduler.js +8 -1
  23. package/src/auction/sortedOffers.d.ts +1 -0
  24. package/src/auction/sortedOffers.d.ts.map +1 -1
  25. package/src/auction/sortedOffers.js +4 -0
  26. package/src/auction/util.d.ts +2 -1
  27. package/src/auction/util.d.ts.map +1 -1
  28. package/src/auction/util.js +1 -0
  29. package/src/contractSupport.d.ts +1 -1
  30. package/src/contractSupport.d.ts.map +1 -1
  31. package/src/econCommitteeCharter.d.ts +3 -3
  32. package/src/feeDistributor.d.ts +17 -17
  33. package/src/interest-math.d.ts +1 -0
  34. package/src/interest-math.d.ts.map +1 -1
  35. package/src/interest-math.js +1 -0
  36. package/src/interest.d.ts +6 -0
  37. package/src/interest.d.ts.map +1 -1
  38. package/src/interest.js +3 -0
  39. package/src/price/fluxAggregatorContract.d.ts +2 -2
  40. package/src/price/fluxAggregatorKit.d.ts +1 -1
  41. package/src/price/roundsManager.d.ts +1 -1
  42. package/src/proposals/replace-fee-distributor.js +1 -0
  43. package/src/proposals/startPSM.js +1 -0
  44. package/src/proposals/upgrade-vaults.js +2 -2
  45. package/src/proposals/utils.d.ts +2 -1
  46. package/src/proposals/utils.d.ts.map +1 -1
  47. package/src/proposals/utils.js +4 -0
  48. package/src/provisionPool.d.ts +2 -2
  49. package/src/provisionPoolKit.d.ts +2 -2
  50. package/src/psm/psm.d.ts +4 -2
  51. package/src/psm/psm.d.ts.map +1 -1
  52. package/src/psm/psm.js +1 -0
  53. package/src/psm/types-ambient.d.ts +1 -1
  54. package/src/psm/types-ambient.d.ts.map +1 -1
  55. package/src/reserve/assetReserveKit.d.ts +2 -2
  56. package/src/vaultFactory/liquidation.d.ts +2 -0
  57. package/src/vaultFactory/liquidation.d.ts.map +1 -1
  58. package/src/vaultFactory/liquidation.js +2 -0
  59. package/src/vaultFactory/math.d.ts +1 -0
  60. package/src/vaultFactory/math.d.ts.map +1 -1
  61. package/src/vaultFactory/math.js +4 -1
  62. package/src/vaultFactory/orderedVaultStore.d.ts +12 -12
  63. package/src/vaultFactory/params.d.ts +6 -0
  64. package/src/vaultFactory/params.d.ts.map +1 -1
  65. package/src/vaultFactory/params.js +6 -1
  66. package/src/vaultFactory/prioritizedVaults.d.ts +31 -29
  67. package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -1
  68. package/src/vaultFactory/prioritizedVaults.js +2 -0
  69. package/src/vaultFactory/proceeds.d.ts +1 -0
  70. package/src/vaultFactory/proceeds.d.ts.map +1 -1
  71. package/src/vaultFactory/proceeds.js +4 -1
  72. package/src/vaultFactory/storeUtils.d.ts +7 -3
  73. package/src/vaultFactory/storeUtils.d.ts.map +1 -1
  74. package/src/vaultFactory/storeUtils.js +8 -2
  75. package/src/vaultFactory/types-ambient.d.ts +39 -46
  76. package/src/vaultFactory/types-ambient.d.ts.map +1 -1
  77. package/src/vaultFactory/types-ambient.js +23 -16
  78. package/src/vaultFactory/vault.d.ts +10 -4
  79. package/src/vaultFactory/vault.d.ts.map +1 -1
  80. package/src/vaultFactory/vault.js +8 -2
  81. package/src/vaultFactory/vaultDirector.d.ts +39 -33
  82. package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
  83. package/src/vaultFactory/vaultDirector.js +6 -1
  84. package/src/vaultFactory/vaultFactory.d.ts +23 -22
  85. package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
  86. package/src/vaultFactory/vaultFactory.js +1 -0
  87. package/src/vaultFactory/vaultHolder.d.ts +10 -8
  88. package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
  89. package/src/vaultFactory/vaultHolder.js +1 -0
  90. package/src/vaultFactory/vaultKit.d.ts +4 -3
  91. package/src/vaultFactory/vaultKit.d.ts.map +1 -1
  92. package/src/vaultFactory/vaultKit.js +1 -0
  93. package/src/vaultFactory/vaultManager.d.ts +46 -36
  94. package/src/vaultFactory/vaultManager.d.ts.map +1 -1
  95. package/src/vaultFactory/vaultManager.js +13 -6
@@ -1,13 +1,13 @@
1
1
  export function currentDebtToCollateral(vault: Vault): Ratio;
2
2
  export function makePrioritizedVaults(store: MapStore<string, Vault>): {
3
3
  addVault: (vaultId: VaultId, vault: Vault) => string;
4
- entries: (keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<[string, import("@endo/exo").Guarded<{
4
+ entries: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => Iterable<[string, import("@endo/exo").Guarded<{
5
5
  getVaultSeat(): globalThis.ZCFSeat;
6
6
  initVaultKit(seat: ZCFSeat, storageNode: import("@agoric/internal").Remote<StorageNode>): Promise<{
7
7
  publicSubscribers: {
8
8
  vault: {
9
9
  description: string;
10
- subscriber: globalThis.Subscriber<VaultNotification>;
10
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
11
11
  storagePath: Promise<string>;
12
12
  };
13
13
  };
@@ -20,7 +20,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
20
20
  getPublicTopics(): {
21
21
  vault: {
22
22
  description: string;
23
- subscriber: globalThis.Subscriber<VaultNotification>;
23
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
24
24
  storagePath: Promise<string>;
25
25
  };
26
26
  };
@@ -31,19 +31,19 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
31
31
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
32
32
  getNormalizedDebt(): NormalizedDebt;
33
33
  }>;
34
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
34
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
35
35
  }>;
36
36
  liquidating(): void;
37
37
  liquidated(): void;
38
38
  abortLiquidation(): string;
39
39
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
40
40
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
41
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
41
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
42
42
  getCollateralAmount(): Amount<"nat">;
43
43
  getCurrentDebt(): Amount<"nat">;
44
44
  getNormalizedDebt(): NormalizedDebt;
45
45
  }>]>;
46
- getCount: (keyPatt?: Pattern, valuePatt?: Pattern) => number;
46
+ getCount: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => number;
47
47
  hasVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<"nat">, vaultId: string) => boolean;
48
48
  highestRatio: () => Ratio | undefined;
49
49
  removeVault: (key: string) => Vault;
@@ -53,7 +53,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
53
53
  publicSubscribers: {
54
54
  vault: {
55
55
  description: string;
56
- subscriber: globalThis.Subscriber<VaultNotification>;
56
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
57
57
  storagePath: Promise<string>;
58
58
  };
59
59
  };
@@ -66,7 +66,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
66
66
  getPublicTopics(): {
67
67
  vault: {
68
68
  description: string;
69
- subscriber: globalThis.Subscriber<VaultNotification>;
69
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
70
70
  storagePath: Promise<string>;
71
71
  };
72
72
  };
@@ -77,14 +77,14 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
77
77
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
78
78
  getNormalizedDebt(): NormalizedDebt;
79
79
  }>;
80
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
80
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
81
81
  }>;
82
82
  liquidating(): void;
83
83
  liquidated(): void;
84
84
  abortLiquidation(): string;
85
85
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
86
86
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
87
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
87
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
88
88
  getCollateralAmount(): Amount<"nat">;
89
89
  getCurrentDebt(): Amount<"nat">;
90
90
  getNormalizedDebt(): NormalizedDebt;
@@ -99,7 +99,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
99
99
  publicSubscribers: {
100
100
  vault: {
101
101
  description: string;
102
- subscriber: globalThis.Subscriber<VaultNotification>;
102
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
103
103
  storagePath: Promise<string>;
104
104
  };
105
105
  };
@@ -112,7 +112,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
112
112
  getPublicTopics(): {
113
113
  vault: {
114
114
  description: string;
115
- subscriber: globalThis.Subscriber<VaultNotification>;
115
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
116
116
  storagePath: Promise<string>;
117
117
  };
118
118
  };
@@ -123,28 +123,28 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
123
123
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
124
124
  getNormalizedDebt(): NormalizedDebt;
125
125
  }>;
126
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
126
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
127
127
  }>;
128
128
  liquidating(): void;
129
129
  liquidated(): void;
130
130
  abortLiquidation(): string;
131
131
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
132
132
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
133
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
133
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
134
134
  getCollateralAmount(): Amount<"nat">;
135
135
  getCurrentDebt(): Amount<"nat">;
136
136
  getNormalizedDebt(): NormalizedDebt;
137
137
  }>>;
138
138
  countVaultsBelow: (crKey: any) => number;
139
- } & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
139
+ } & import("@endo/marshal").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
140
140
  addVault: (vaultId: VaultId, vault: Vault) => string;
141
- entries: (keyPatt?: Pattern, valuePatt?: Pattern) => Iterable<[string, import("@endo/exo").Guarded<{
141
+ entries: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => Iterable<[string, import("@endo/exo").Guarded<{
142
142
  getVaultSeat(): globalThis.ZCFSeat;
143
143
  initVaultKit(seat: ZCFSeat, storageNode: import("@agoric/internal").Remote<StorageNode>): Promise<{
144
144
  publicSubscribers: {
145
145
  vault: {
146
146
  description: string;
147
- subscriber: globalThis.Subscriber<VaultNotification>;
147
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
148
148
  storagePath: Promise<string>;
149
149
  };
150
150
  };
@@ -157,7 +157,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
157
157
  getPublicTopics(): {
158
158
  vault: {
159
159
  description: string;
160
- subscriber: globalThis.Subscriber<VaultNotification>;
160
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
161
161
  storagePath: Promise<string>;
162
162
  };
163
163
  };
@@ -168,19 +168,19 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
168
168
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
169
169
  getNormalizedDebt(): NormalizedDebt;
170
170
  }>;
171
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
171
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
172
172
  }>;
173
173
  liquidating(): void;
174
174
  liquidated(): void;
175
175
  abortLiquidation(): string;
176
176
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
177
177
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
178
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
178
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
179
179
  getCollateralAmount(): Amount<"nat">;
180
180
  getCurrentDebt(): Amount<"nat">;
181
181
  getNormalizedDebt(): NormalizedDebt;
182
182
  }>]>;
183
- getCount: (keyPatt?: Pattern, valuePatt?: Pattern) => number;
183
+ getCount: (keyPatt?: import("@endo/patterns").Pattern, valuePatt?: import("@endo/patterns").Pattern) => number;
184
184
  hasVaultByAttributes: (oldDebt: NormalizedDebt, oldCollateral: Amount<"nat">, vaultId: string) => boolean;
185
185
  highestRatio: () => Ratio | undefined;
186
186
  removeVault: (key: string) => Vault;
@@ -190,7 +190,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
190
190
  publicSubscribers: {
191
191
  vault: {
192
192
  description: string;
193
- subscriber: globalThis.Subscriber<VaultNotification>;
193
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
194
194
  storagePath: Promise<string>;
195
195
  };
196
196
  };
@@ -203,7 +203,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
203
203
  getPublicTopics(): {
204
204
  vault: {
205
205
  description: string;
206
- subscriber: globalThis.Subscriber<VaultNotification>;
206
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
207
207
  storagePath: Promise<string>;
208
208
  };
209
209
  };
@@ -214,14 +214,14 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
214
214
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
215
215
  getNormalizedDebt(): NormalizedDebt;
216
216
  }>;
217
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
217
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
218
218
  }>;
219
219
  liquidating(): void;
220
220
  liquidated(): void;
221
221
  abortLiquidation(): string;
222
222
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
223
223
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
224
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
224
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
225
225
  getCollateralAmount(): Amount<"nat">;
226
226
  getCurrentDebt(): Amount<"nat">;
227
227
  getNormalizedDebt(): NormalizedDebt;
@@ -236,7 +236,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
236
236
  publicSubscribers: {
237
237
  vault: {
238
238
  description: string;
239
- subscriber: globalThis.Subscriber<VaultNotification>;
239
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
240
240
  storagePath: Promise<string>;
241
241
  };
242
242
  };
@@ -249,7 +249,7 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
249
249
  getPublicTopics(): {
250
250
  vault: {
251
251
  description: string;
252
- subscriber: globalThis.Subscriber<VaultNotification>;
252
+ subscriber: globalThis.Subscriber<import("./vault.js").VaultNotification>;
253
253
  storagePath: Promise<string>;
254
254
  };
255
255
  };
@@ -260,14 +260,14 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
260
260
  getCurrentDebt(): import("@agoric/ertp").NatAmount;
261
261
  getNormalizedDebt(): NormalizedDebt;
262
262
  }>;
263
- vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<VaultNotification>;
263
+ vaultUpdater: import("@agoric/zoe/src/contractSupport/recorder.js").Recorder<import("./vault.js").VaultNotification>;
264
264
  }>;
265
265
  liquidating(): void;
266
266
  liquidated(): void;
267
267
  abortLiquidation(): string;
268
268
  makeAdjustBalancesInvitation(): Promise<globalThis.Invitation<string, undefined>>;
269
269
  makeCloseInvitation(): Promise<globalThis.Invitation<string, undefined>>;
270
- makeTransferInvitation(): Promise<Invitation<VaultKit>>;
270
+ makeTransferInvitation(): Promise<Invitation<import("./vaultKit.js").VaultKit>>;
271
271
  getCollateralAmount(): Amount<"nat">;
272
272
  getCurrentDebt(): Amount<"nat">;
273
273
  getNormalizedDebt(): NormalizedDebt;
@@ -275,6 +275,8 @@ export function makePrioritizedVaults(store: MapStore<string, Vault>): {
275
275
  countVaultsBelow: (crKey: any) => number;
276
276
  }>;
277
277
  import type { Vault } from './vault.js';
278
+ import type { Ratio } from '@agoric/ertp';
278
279
  import type { MapStore } from '@agoric/store';
280
+ import type { VaultId } from './types-ambient.js';
279
281
  import type { NormalizedDebt } from './storeUtils.js';
280
282
  //# sourceMappingURL=prioritizedVaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prioritizedVaults.d.ts","sourceRoot":"","sources":["prioritizedVaults.js"],"names":[],"mappings":"AA0CO,+CAHI,KAAK,G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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAQN,OAAO,SACP,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA9BL,cAAc,iBACd,MAAM,CAAC,KAAK,CAAC,WACb,MAAM;wBAlBJ,KAAK,GAAG,SAAS;uBA0BnB,MAAM,KACJ,KAAK;uCAQP,cAAc,iBACd,MAAM,CAAC,KAAK,CAAC,WACb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDlB;2BA1IuB,YAAY;2BAEZ,cAAc;8BAHX,eAAe;6BAIhB,oBAAoB;oCAFb,iBAAiB"}
@@ -17,6 +17,8 @@ import {
17
17
  * @import {MapStore} from '@agoric/store';
18
18
  * @import {Vault} from './vault.js';
19
19
  * @import {NormalizedDebt} from './storeUtils.js';
20
+ * @import {Ratio} from '@agoric/ertp';
21
+ * @import {VaultId} from './types-ambient.js';
20
22
  */
21
23
 
22
24
  const trace = makeTracer('PVaults', true);
@@ -32,4 +32,5 @@ export type VaultBalances = {
32
32
  currentDebt: Amount<"nat">;
33
33
  };
34
34
  import type { PriceDescription } from '@agoric/zoe/tools/types.js';
35
+ import type { Ratio } from '@agoric/ertp';
35
36
  //# sourceMappingURL=proceeds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"proceeds.d.ts","sourceRoot":"","sources":["proceeds.js"],"names":[],"mappings":"AA4DO,sIATJ;IAAoC,QAAQ,EAApC,mBAAmB;IACG,SAAS,EAA/B,MAAM,CAAC,KAAK,CAAC;IACS,eAAe,EAArC,MAAM,CAAC,KAAK,CAAC;IACY,kBAAkB,EAA3C,gBAAgB;IACQ,cAAc,EAAtC,aAAa,EAAE;IAED,WAAW,EAAzB,KAAK;CACb,GAAU,gBAAgB,CA8N5B;;;;;;+BA1QY;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AC,KAAK,CAAC,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,gBAAgB,EAAE,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE,CAAC;IAClD,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;4BAOS;IACR,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;CAC5B;sCA9ByF,4BAA4B;2BACjG,cAAc"}
@@ -9,7 +9,10 @@ import {
9
9
  import { quoteAsRatio, subtractToEmpty } from '../contractSupport.js';
10
10
  import { liquidationResults } from './liquidation.js';
11
11
 
12
- /** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */
12
+ /**
13
+ * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
14
+ * @import {Ratio} from '@agoric/ertp';
15
+ */
13
16
 
14
17
  /**
15
18
  * @typedef {{
@@ -1,15 +1,17 @@
1
1
  /** @import {PureData} from '@endo/marshal' */
2
- /** @typedef {[normalizedCollateralization: number, vaultId: VaultId]} CompositeKey */
2
+ /**
3
+ * @typedef {[normalizedCollateralization: number, vaultId: VaultId]} CompositeKey
4
+ */
3
5
  /**
4
6
  * @param {PureData} key
5
7
  * @returns {string}
6
8
  */
7
- export const encodeData: (p: Passable) => string;
9
+ export const encodeData: (p: import("@endo/marshal").Passable) => string;
8
10
  /**
9
11
  * @param {string} encoded
10
12
  * @returns {PureData}
11
13
  */
12
- export const decodeData: (encoded: string, skip?: number) => Passable;
14
+ export const decodeData: (encoded: string, skip?: number) => import("@endo/marshal").Passable;
13
15
  export function toVaultKey(normalizedDebt: NormalizedDebt, collateral: Amount<"nat">, vaultId: VaultId): string;
14
16
  export function fromVaultKey(key: string): [normalizedCollateralization: number, vaultId: VaultId];
15
17
  export function normalizedCollRatio(quote: PriceQuote, compoundedInterest: Ratio, margin: Ratio): number;
@@ -21,5 +23,7 @@ export type NormalizedDebt = Amount<"nat"> & {
21
23
  export type ActualDebt = Amount<"nat"> & {
22
24
  normalized: false;
23
25
  };
26
+ import type { VaultId } from './types-ambient.js';
24
27
  import type { PriceQuote } from '@agoric/zoe/tools/types.js';
28
+ import type { Ratio } from '@agoric/ertp';
25
29
  //# sourceMappingURL=storeUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storeUtils.d.ts","sourceRoot":"","sources":["storeUtils.js"],"names":[],"mappings":"AAuBA,8CAA8C;AAE9C,sFAAsF;AAOtF;;;GAGG;AACH,iDAA+C;AAO/C;;;GAGG;AACH,sEAA+C;AAkDxC,2CANI,cAAc,cACd,MAAM,CAAC,KAAK,CAAC,WACb,OAAO,GACL,MAAM,CAelB;AAOM,kCAHI,MAAM,GACJ,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAKnE;AAgBM,2CALI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAiBlB;AAcM,8CANI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAMlB;2BA9Ia,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;6BA4CvD,MAAM,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;yBACpC,MAAM,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,KAAK,CAAA;CAAE;gCA/D2C,4BAA4B"}
1
+ {"version":3,"file":"storeUtils.d.ts","sourceRoot":"","sources":["storeUtils.js"],"names":[],"mappings":"AA2BA,8CAA8C;AAE9C;;GAEG;AAOH;;;GAGG;AACH,yEAA+C;AAO/C;;;GAGG;AACH,8FAA+C;AAkDxC,2CANI,cAAc,cACd,MAAM,CAAC,KAAK,CAAC,WACb,OAAO,GACL,MAAM,CAelB;AAOM,kCAHI,MAAM,GACJ,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAKnE;AAgBM,2CALI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAiBlB;AAcM,8CANI,UAAU,sBACV,KAAK,UACL,KAAK,GACH,MAAM,CAMlB;2BA/IY,CAAC,2BAA2B,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC;6BA6CtD,MAAM,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;yBACpC,MAAM,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,EAAE,KAAK,CAAA;CAAE;6BAlEzB,oBAAoB;gCAF+C,4BAA4B;2BACjG,cAAc"}
@@ -5,7 +5,11 @@
5
5
  * API supports them.
6
6
  */
7
7
 
8
- /** @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js'; */
8
+ /**
9
+ * @import {PriceAuthority, PriceDescription, PriceQuote, PriceQuoteValue, PriceQuery,} from '@agoric/zoe/tools/types.js';
10
+ * @import {Ratio} from '@agoric/ertp';
11
+ * @import {VaultId} from './types-ambient.js';
12
+ */
9
13
 
10
14
  // XXX importing these that are declared to be used only for testing
11
15
  // until @agoric/store supports composite keys
@@ -23,7 +27,9 @@ const trace = makeTracer('Store', true);
23
27
 
24
28
  /** @import {PureData} from '@endo/marshal' */
25
29
 
26
- /** @typedef {[normalizedCollateralization: number, vaultId: VaultId]} CompositeKey */
30
+ /**
31
+ * @typedef {[normalizedCollateralization: number, vaultId: VaultId]} CompositeKey
32
+ */
27
33
 
28
34
  // `makeEncodePassable` has three named options:
29
35
  // `encodeRemotable`, `encodeError`, and `encodePromise`.
@@ -1,38 +1,38 @@
1
- type VaultFactoryPublicFacet = import("./vaultFactory.js").VaultFactoryContract["publicFacet"];
2
- type AutoswapLocal = {
1
+ export type VaultFactoryPublicFacet = import("./vaultFactory.js").VaultFactoryContract["publicFacet"];
2
+ export type AutoswapLocal = {
3
3
  getInputPrice: (amount: Amount, brand: Brand) => Amount;
4
4
  makeSwapInvitation: () => Invitation;
5
5
  };
6
- type VaultManagerParamValues = {
6
+ export type VaultManagerParamValues = {
7
7
  /**
8
- * - margin below which collateral will be
9
- * liquidated to satisfy the debt.
8
+ * - margin below
9
+ * which collateral will be liquidated to satisfy the debt.
10
10
  */
11
- liquidationMargin: Ratio;
11
+ liquidationMargin: import("@agoric/ertp").Ratio;
12
12
  /**
13
- * - penalty charged upon liquidation as
14
- * proportion of debt
13
+ * - penalty charged
14
+ * upon liquidation as proportion of debt
15
15
  */
16
- liquidationPenalty: Ratio;
16
+ liquidationPenalty: import("@agoric/ertp").Ratio;
17
17
  /**
18
- * - annual interest rate charged on debt
19
- * positions
18
+ * - annual interest rate
19
+ * charged on debt positions
20
20
  */
21
- interestRate: Ratio;
21
+ interestRate: import("@agoric/ertp").Ratio;
22
22
  /**
23
- * - The fee (in BasisPoints) charged when creating or
24
- * increasing a debt position.
23
+ * - The fee (in BasisPoints)
24
+ * charged when creating or increasing a debt position.
25
25
  */
26
- mintFee: Ratio;
26
+ mintFee: import("@agoric/ertp").Ratio;
27
27
  debtLimit: Amount<"nat">;
28
28
  /**
29
- * - vault must maintain this in order to
30
- * remove collateral or add debt
29
+ * - vault must
30
+ * maintain this in order to remove collateral or add debt
31
31
  */
32
- liquidationPadding?: Ratio | undefined;
32
+ liquidationPadding?: import("@agoric/ertp").Ratio | undefined;
33
33
  };
34
- type AddVaultType = (collateralIssuer: Issuer, collateralKeyword: Keyword, params: VaultManagerParamValues) => Promise<VaultManager>;
35
- type VaultFactoryCreatorFacet = {
34
+ export type AddVaultType = (collateralIssuer: Issuer, collateralKeyword: Keyword, params: VaultManagerParamValues) => Promise<VaultManager>;
35
+ export type VaultFactoryCreatorFacet = {
36
36
  addVaultType: AddVaultType;
37
37
  getRewardAllocation: () => import("@agoric/zoe").Allocation;
38
38
  makeCollectFeesInvitation: () => Promise<Invitation<string, never>>;
@@ -45,21 +45,21 @@ type VaultFactoryCreatorFacet = {
45
45
  * seat arguments and the rewardPoolSeat. Update the `totalDebt` if the
46
46
  * reallocate succeeds.
47
47
  */
48
- type MintAndTransfer = (mintReceiver: ZCFSeat, toMint: Amount<"nat">, fee: Amount<"nat">, transfers: TransferPart[]) => void;
48
+ export type MintAndTransfer = (mintReceiver: ZCFSeat, toMint: Amount<"nat">, fee: Amount<"nat">, transfers: TransferPart[]) => void;
49
49
  /**
50
50
  * Burn debt tokens off a seat and update the `totalDebt` if
51
51
  * the reallocate succeeds.
52
52
  */
53
- type BurnDebt = (toBurn: Amount, fromSeat: ZCFSeat) => void;
54
- type GetVaultParams = {
55
- getLiquidationMargin: () => Ratio;
56
- getMintFee: () => Ratio;
53
+ export type BurnDebt = (toBurn: Amount, fromSeat: ZCFSeat) => void;
54
+ export type GetVaultParams = {
55
+ getLiquidationMargin: () => import("@agoric/ertp").Ratio;
56
+ getMintFee: () => import("@agoric/ertp").Ratio;
57
57
  getCollateralQuote: () => Promise<import("@agoric/zoe/tools/types.js").PriceQuote>;
58
58
  /**
59
- * - The annual interest rate on a debt
60
- * position
59
+ * - The annual
60
+ * interest rate on a debt position
61
61
  */
62
- getInterestRate: () => Ratio;
62
+ getInterestRate: () => import("@agoric/ertp").Ratio;
63
63
  /**
64
64
  * - The period (in seconds) at
65
65
  * which interest is charged to the debt position.
@@ -71,8 +71,8 @@ type GetVaultParams = {
71
71
  */
72
72
  getRecordingPeriod: () => RelativeTime;
73
73
  };
74
- type VaultId = string;
75
- type InterestTiming = {
74
+ export type VaultId = string;
75
+ export type InterestTiming = {
76
76
  /**
77
77
  * in seconds
78
78
  */
@@ -82,18 +82,18 @@ type InterestTiming = {
82
82
  */
83
83
  recordingPeriod: RelativeTime;
84
84
  };
85
- type LiquidationStrategy = {
86
- keywordMapping: () => KeywordKeywordRecord;
85
+ export type LiquidationStrategy = {
86
+ keywordMapping: () => import("@agoric/zoe/src/contractSupport/types-ambient.js").KeywordKeywordRecord;
87
87
  makeProposal: (collateral: Amount, run: Amount) => import("@agoric/zoe").Proposal;
88
88
  makeInvitation: (debt: Amount) => Promise<Invitation>;
89
89
  };
90
- type Liquidator = {
90
+ export type Liquidator = {
91
91
  makeLiquidateInvitation: () => Promise<Invitation<void, {
92
92
  debt: Amount<"nat">;
93
- penaltyRate: Ratio;
93
+ penaltyRate: import("@agoric/ertp").Ratio;
94
94
  }>>;
95
95
  };
96
- type DebtStatus = {
96
+ export type DebtStatus = {
97
97
  latestInterestUpdate: Timestamp;
98
98
  /**
99
99
  * interest accrued since latestInterestUpdate
@@ -104,8 +104,8 @@ type DebtStatus = {
104
104
  */
105
105
  newDebt: NatValue;
106
106
  };
107
- type Calculate = (debtStatus: DebtStatus, currentTime: Timestamp) => DebtStatus;
108
- type CalculatorKit = {
107
+ export type Calculate = (debtStatus: DebtStatus, currentTime: Timestamp) => DebtStatus;
108
+ export type CalculatorKit = {
109
109
  /**
110
110
  * calculate new debt for charging periods up to
111
111
  * the present.
@@ -119,19 +119,12 @@ type CalculatorKit = {
119
119
  */
120
120
  calculateReportingPeriod: Calculate;
121
121
  };
122
- type VaultFactoryParamPath = {
122
+ export type VaultFactoryParamPath = {
123
123
  key: "governedParams" | {
124
124
  collateralBrand: Brand;
125
125
  };
126
126
  };
127
- import type { VaultNotification } from './vault.js';
128
- import type { Vault } from './vault.js';
129
- import type { VaultKit } from './vaultKit.js';
130
127
  import type { VaultManager } from './vaultManager.js';
131
- import type { CollateralManager } from './vaultManager.js';
132
- import type { AssetReserveLimitedCreatorFacet } from '../reserve/assetReserve.js';
133
- import type { AssetReservePublicFacet } from '../reserve/assetReserve.js';
134
- import type { AuctioneerPublicFacet } from '../auction/auctioneer.js';
135
- import type { Timestamp } from '@agoric/time';
136
128
  import type { RelativeTime } from '@agoric/time';
129
+ import type { Timestamp } from '@agoric/time';
137
130
  //# sourceMappingURL=types-ambient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-ambient.d.ts","sourceRoot":"","sources":["types-ambient.js"],"names":[],"mappings":"+BAIa,OAAO,mBAAmB,EAAE,oBAAoB,CAAC,aAAa,CAAC;;mBAe9D,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,MAAM;wBACxC,MAAM,UAAU;;;;;;;uBAKhB,KAAK;;;;;wBAEL,KAAK;;;;;kBAEL,KAAK;;;;;aAEL,KAAK;eAEL,MAAM,CAAC,KAAK,CAAC;;;;;;;uCAOhB,MAAM,qBACN,OAAO,UACP,uBAAuB,KACrB,OAAO,CAAC,YAAY,CAAC;;kBAKpB,YAAY;yBACZ,MAAM,OAAO,aAAa,EAAE,UAAU;+BACtC,MAAM,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;0BACxC,MAAM,OAAO,cAAc,EAAE,UAAU;wBACvC,MAAM,OAAO,cAAc,EAAE,UAAU;;;;;;;;sCAQ1C,OAAO,UACP,MAAM,CAAC,KAAK,CAAC,OACb,MAAM,CAAC,KAAK,CAAC,aACb,YAAY,EAAE,KACZ,IAAI;;;;;yBAMN,MAAM,YACN,OAAO,KACL,IAAI;;0BAKH,MAAM,KAAK;gBACX,MAAM,KAAK;wBACX,MAAM,OAAO,CAAC,OAAO,4BAA4B,EAAE,UAAU,CA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rC,mBAAmB;kCAMnB,cAAc;+BADjB,cAAc"}
@@ -1,6 +1,10 @@
1
1
  /* eslint-disable @agoric/group-jsdoc-imports */
2
2
  // @jessie-check
3
3
 
4
+ // XXX filename is still "ambient" but this module is not
5
+ // Make this a module
6
+ export {};
7
+
4
8
  /**
5
9
  * @typedef {import('./vaultFactory.js').VaultFactoryContract['publicFacet']} VaultFactoryPublicFacet
6
10
  * @import {VaultNotification} from './vault.js'
@@ -23,17 +27,17 @@
23
27
 
24
28
  /**
25
29
  * @typedef {object} VaultManagerParamValues
26
- * @property {Ratio} liquidationMargin - margin below which collateral will be
27
- * liquidated to satisfy the debt.
28
- * @property {Ratio} liquidationPenalty - penalty charged upon liquidation as
29
- * proportion of debt
30
- * @property {Ratio} interestRate - annual interest rate charged on debt
31
- * positions
32
- * @property {Ratio} mintFee - The fee (in BasisPoints) charged when creating or
33
- * increasing a debt position.
30
+ * @property {import('@agoric/ertp').Ratio} liquidationMargin - margin below
31
+ * which collateral will be liquidated to satisfy the debt.
32
+ * @property {import('@agoric/ertp').Ratio} liquidationPenalty - penalty charged
33
+ * upon liquidation as proportion of debt
34
+ * @property {import('@agoric/ertp').Ratio} interestRate - annual interest rate
35
+ * charged on debt positions
36
+ * @property {import('@agoric/ertp').Ratio} mintFee - The fee (in BasisPoints)
37
+ * charged when creating or increasing a debt position.
34
38
  * @property {Amount<'nat'>} debtLimit
35
- * @property {Ratio} [liquidationPadding] - vault must maintain this in order to
36
- * remove collateral or add debt
39
+ * @property {import('@agoric/ertp').Ratio} [liquidationPadding] - vault must
40
+ * maintain this in order to remove collateral or add debt
37
41
  */
38
42
 
39
43
  /**
@@ -75,11 +79,11 @@
75
79
 
76
80
  /**
77
81
  * @typedef {object} GetVaultParams
78
- * @property {() => Ratio} getLiquidationMargin
79
- * @property {() => Ratio} getMintFee
82
+ * @property {() => import('@agoric/ertp').Ratio} getLiquidationMargin
83
+ * @property {() => import('@agoric/ertp').Ratio} getMintFee
80
84
  * @property {() => Promise<import('@agoric/zoe/tools/types.js').PriceQuote>} getCollateralQuote
81
- * @property {() => Ratio} getInterestRate - The annual interest rate on a debt
82
- * position
85
+ * @property {() => import('@agoric/ertp').Ratio} getInterestRate - The annual
86
+ * interest rate on a debt position
83
87
  * @property {() => RelativeTime} getChargingPeriod - The period (in seconds) at
84
88
  * which interest is charged to the debt position.
85
89
  * @property {() => RelativeTime} getRecordingPeriod - The period (in seconds)
@@ -96,7 +100,7 @@
96
100
 
97
101
  /**
98
102
  * @typedef {object} LiquidationStrategy
99
- * @property {() => KeywordKeywordRecord} keywordMapping
103
+ * @property {() => import('@agoric/zoe/src/contractSupport/types-ambient.js').KeywordKeywordRecord} keywordMapping
100
104
  * @property {(
101
105
  * collateral: Amount,
102
106
  * run: Amount,
@@ -107,7 +111,10 @@
107
111
  /**
108
112
  * @typedef {object} Liquidator
109
113
  * @property {() => Promise<
110
- * Invitation<void, { debt: Amount<'nat'>; penaltyRate: Ratio }>
114
+ * Invitation<
115
+ * void,
116
+ * { debt: Amount<'nat'>; penaltyRate: import('@agoric/ertp').Ratio }
117
+ * >
111
118
  * >} makeLiquidateInvitation
112
119
  */
113
120
 
@@ -22,8 +22,11 @@ export namespace Phase {
22
22
  /**
23
23
  * @typedef {object} VaultNotification
24
24
  * @property {Amount<'nat'>} locked Amount of Collateral locked
25
- * @property {{ debt: Amount<'nat'>; interest: Ratio }} debtSnapshot 'debt' at
26
- * the point the compounded interest was 'interest'
25
+ * @property {{
26
+ * debt: Amount<'nat'>;
27
+ * interest: Ratio;
28
+ * }} debtSnapshot
29
+ * 'debt' at the point the compounded interest was 'interest'
27
30
  * @property {Phase} vaultState
28
31
  */
29
32
  /**
@@ -296,8 +299,7 @@ export type VaultNotification = {
296
299
  */
297
300
  locked: Amount<"nat">;
298
301
  /**
299
- * 'debt' at
300
- * the point the compounded interest was 'interest'
302
+ * 'debt' at the point the compounded interest was 'interest'
301
303
  */
302
304
  debtSnapshot: {
303
305
  debt: Amount<"nat">;
@@ -339,9 +341,13 @@ import type { MakeRecorderKit } from '@agoric/zoe/src/contractSupport/recorder.j
339
341
  import type { Remote } from '@agoric/internal';
340
342
  import type { Brand } from '@agoric/ertp/src/types.js';
341
343
  import type { NormalizedDebt } from './storeUtils.js';
344
+ import type { Ratio } from '@agoric/ertp/src/ratio.js';
342
345
  import { calculateDebtCosts } from './math.js';
346
+ import type { VaultKit } from './vaultKit.js';
343
347
  import type { Recorder } from '@agoric/zoe/src/contractSupport/recorder.js';
344
348
  import type { AssetState } from './vaultManager.js';
349
+ import type { MintAndTransfer } from './types-ambient.js';
350
+ import type { VaultId } from './types-ambient.js';
345
351
  import type { GovernedParamGetters } from './vaultManager.js';
346
352
  import type { EReturn } from '@endo/far';
347
353
  //# sourceMappingURL=vault.d.ts.map