@agoric/inter-protocol 0.16.2-upgrade-14-dev-0169c7e.0 → 0.16.2-upgrade-16-dev-8879538.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.
Files changed (175) hide show
  1. package/package.json +41 -34
  2. package/scripts/build-bundles.js +5 -21
  3. package/src/auction/auctionBook.d.ts +84 -0
  4. package/src/auction/auctionBook.d.ts.map +1 -0
  5. package/src/auction/auctionBook.js +135 -103
  6. package/src/auction/auctioneer.d.ts +83 -0
  7. package/src/auction/auctioneer.d.ts.map +1 -0
  8. package/src/auction/auctioneer.js +63 -49
  9. package/src/auction/offerBook.d.ts +45 -0
  10. package/src/auction/offerBook.d.ts.map +1 -0
  11. package/src/auction/offerBook.js +13 -12
  12. package/src/auction/params.d.ts +149 -0
  13. package/src/auction/params.d.ts.map +1 -0
  14. package/src/auction/params.js +10 -9
  15. package/src/auction/scheduleMath.d.ts +5 -0
  16. package/src/auction/scheduleMath.d.ts.map +1 -0
  17. package/src/auction/scheduleMath.js +17 -15
  18. package/src/auction/scheduler.d.ts +49 -0
  19. package/src/auction/scheduler.d.ts.map +1 -0
  20. package/src/auction/scheduler.js +51 -43
  21. package/src/auction/sortedOffers.d.ts +8 -0
  22. package/src/auction/sortedOffers.d.ts.map +1 -0
  23. package/src/auction/sortedOffers.js +9 -7
  24. package/src/auction/util.d.ts +32 -0
  25. package/src/auction/util.d.ts.map +1 -0
  26. package/src/auction/util.js +6 -4
  27. package/src/clientSupport.d.ts +167 -0
  28. package/src/clientSupport.d.ts.map +1 -0
  29. package/src/clientSupport.js +97 -40
  30. package/src/collectFees.d.ts +2 -0
  31. package/src/collectFees.d.ts.map +1 -0
  32. package/src/contractSupport.d.ts +28 -0
  33. package/src/contractSupport.d.ts.map +1 -0
  34. package/src/contractSupport.js +14 -12
  35. package/src/econCommitteeCharter.d.ts +39 -0
  36. package/src/econCommitteeCharter.d.ts.map +1 -0
  37. package/src/econCommitteeCharter.js +21 -20
  38. package/src/feeDistributor.d.ts +224 -0
  39. package/src/feeDistributor.d.ts.map +1 -0
  40. package/src/feeDistributor.js +37 -33
  41. package/src/index.d.ts +2 -0
  42. package/src/index.d.ts.map +1 -0
  43. package/src/index.js +1 -0
  44. package/src/interest-math.d.ts +3 -0
  45. package/src/interest-math.d.ts.map +1 -0
  46. package/src/interest.d.ts +28 -0
  47. package/src/interest.d.ts.map +1 -0
  48. package/src/interest.js +21 -16
  49. package/src/price/README.md +13 -0
  50. package/src/price/fluxAggregatorContract.d.ts +70 -0
  51. package/src/price/fluxAggregatorContract.d.ts.map +1 -0
  52. package/src/price/fluxAggregatorContract.js +62 -55
  53. package/src/price/fluxAggregatorKit.d.ts +103 -0
  54. package/src/price/fluxAggregatorKit.d.ts.map +1 -0
  55. package/src/price/fluxAggregatorKit.js +50 -37
  56. package/src/price/priceOracleKit.d.ts +38 -0
  57. package/src/price/priceOracleKit.d.ts.map +1 -0
  58. package/src/price/priceOracleKit.js +11 -13
  59. package/src/price/roundsManager.d.ts +238 -0
  60. package/src/price/roundsManager.d.ts.map +1 -0
  61. package/src/price/roundsManager.js +77 -82
  62. package/src/proposals/README.md +2 -3
  63. package/src/proposals/add-auction.d.ts +69 -0
  64. package/src/proposals/add-auction.d.ts.map +1 -0
  65. package/src/proposals/add-auction.js +181 -0
  66. package/src/proposals/addAssetToVault.d.ts +160 -0
  67. package/src/proposals/addAssetToVault.d.ts.map +1 -0
  68. package/src/proposals/addAssetToVault.js +172 -38
  69. package/src/proposals/committee-proposal.d.ts +113 -0
  70. package/src/proposals/committee-proposal.d.ts.map +1 -0
  71. package/src/proposals/committee-proposal.js +25 -31
  72. package/src/proposals/core-proposal.d.ts +149 -0
  73. package/src/proposals/core-proposal.d.ts.map +1 -0
  74. package/src/proposals/core-proposal.js +9 -11
  75. package/src/proposals/econ-behaviors.d.ts +1169 -0
  76. package/src/proposals/econ-behaviors.d.ts.map +1 -0
  77. package/src/proposals/econ-behaviors.js +66 -45
  78. package/src/proposals/price-feed-proposal.d.ts +84 -0
  79. package/src/proposals/price-feed-proposal.d.ts.map +1 -0
  80. package/src/proposals/price-feed-proposal.js +108 -51
  81. package/src/proposals/startEconCommittee.d.ts +34 -0
  82. package/src/proposals/startEconCommittee.d.ts.map +1 -0
  83. package/src/proposals/startEconCommittee.js +2 -2
  84. package/src/proposals/startPSM.d.ts +59 -0
  85. package/src/proposals/startPSM.d.ts.map +1 -0
  86. package/src/proposals/startPSM.js +38 -27
  87. package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +24 -0
  88. package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +1 -0
  89. package/src/proposals/upgrade-scaledPriceAuthorities.js +78 -0
  90. package/src/proposals/upgrade-vaults.d.ts +35 -0
  91. package/src/proposals/upgrade-vaults.d.ts.map +1 -0
  92. package/src/proposals/upgrade-vaults.js +202 -0
  93. package/src/proposals/utils.d.ts +17 -0
  94. package/src/proposals/utils.d.ts.map +1 -0
  95. package/src/proposals/utils.js +34 -7
  96. package/src/provisionPool.d.ts +167 -0
  97. package/src/provisionPool.d.ts.map +1 -0
  98. package/src/provisionPool.js +122 -0
  99. package/src/provisionPoolKit.d.ts +770 -0
  100. package/src/provisionPoolKit.d.ts.map +1 -0
  101. package/src/provisionPoolKit.js +463 -0
  102. package/src/psm/psm.d.ts +122 -0
  103. package/src/psm/psm.d.ts.map +1 -0
  104. package/src/psm/psm.js +73 -69
  105. package/src/psm/types-ambient.d.ts +2 -0
  106. package/src/psm/types-ambient.d.ts.map +1 -0
  107. package/src/psm/types-ambient.js +3 -0
  108. package/src/reserve/assetReserve.d.ts +47 -0
  109. package/src/reserve/assetReserve.d.ts.map +1 -0
  110. package/src/reserve/assetReserve.js +28 -19
  111. package/src/reserve/assetReserveKit.d.ts +74 -0
  112. package/src/reserve/assetReserveKit.d.ts.map +1 -0
  113. package/src/reserve/assetReserveKit.js +18 -24
  114. package/src/reserve/params.d.ts +10 -0
  115. package/src/reserve/params.d.ts.map +1 -0
  116. package/src/tokens.d.ts +3 -0
  117. package/src/tokens.d.ts.map +1 -0
  118. package/src/tokens.js +5 -0
  119. package/src/vaultFactory/burn.d.ts +2 -0
  120. package/src/vaultFactory/burn.d.ts.map +1 -0
  121. package/src/vaultFactory/burn.js +1 -1
  122. package/src/vaultFactory/liquidation.d.ts +163 -0
  123. package/src/vaultFactory/liquidation.d.ts.map +1 -0
  124. package/src/vaultFactory/liquidation.js +36 -22
  125. package/src/vaultFactory/math.d.ts +11 -0
  126. package/src/vaultFactory/math.d.ts.map +1 -0
  127. package/src/vaultFactory/math.js +10 -9
  128. package/src/vaultFactory/orderedVaultStore.d.ts +360 -0
  129. package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -0
  130. package/src/vaultFactory/orderedVaultStore.js +8 -11
  131. package/src/vaultFactory/params.d.ts +145 -0
  132. package/src/vaultFactory/params.d.ts.map +1 -0
  133. package/src/vaultFactory/params.js +52 -24
  134. package/src/vaultFactory/prioritizedVaults.d.ts +992 -0
  135. package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -0
  136. package/src/vaultFactory/prioritizedVaults.js +4 -4
  137. package/src/vaultFactory/proceeds.d.ts +35 -0
  138. package/src/vaultFactory/proceeds.d.ts.map +1 -0
  139. package/src/vaultFactory/proceeds.js +26 -18
  140. package/src/vaultFactory/storeUtils.d.ts +25 -0
  141. package/src/vaultFactory/storeUtils.d.ts.map +1 -0
  142. package/src/vaultFactory/storeUtils.js +10 -12
  143. package/src/vaultFactory/types-ambient.d.ts +234 -0
  144. package/src/vaultFactory/types-ambient.d.ts.map +1 -0
  145. package/src/vaultFactory/{types.js → types-ambient.js} +42 -42
  146. package/src/vaultFactory/vault.d.ts +402 -0
  147. package/src/vaultFactory/vault.d.ts.map +1 -0
  148. package/src/vaultFactory/vault.js +99 -93
  149. package/src/vaultFactory/vaultDirector.d.ts +388 -0
  150. package/src/vaultFactory/vaultDirector.d.ts.map +1 -0
  151. package/src/vaultFactory/vaultDirector.js +61 -50
  152. package/src/vaultFactory/vaultFactory.d.ts +277 -0
  153. package/src/vaultFactory/vaultFactory.d.ts.map +1 -0
  154. package/src/vaultFactory/vaultFactory.js +49 -32
  155. package/src/vaultFactory/vaultHolder.d.ts +270 -0
  156. package/src/vaultFactory/vaultHolder.d.ts.map +1 -0
  157. package/src/vaultFactory/vaultHolder.js +10 -14
  158. package/src/vaultFactory/vaultKit.d.ts +102 -0
  159. package/src/vaultFactory/vaultKit.d.ts.map +1 -0
  160. package/src/vaultFactory/vaultKit.js +5 -4
  161. package/src/vaultFactory/vaultManager.d.ts +819 -0
  162. package/src/vaultFactory/vaultManager.d.ts.map +1 -0
  163. package/src/vaultFactory/vaultManager.js +248 -151
  164. package/CHANGELOG.md +0 -1066
  165. package/exported.js +0 -2
  166. package/scripts/add-collateral-core.js +0 -113
  167. package/scripts/deploy-contracts.js +0 -100
  168. package/scripts/init-core.js +0 -200
  169. package/scripts/invite-committee-core.js +0 -42
  170. package/scripts/manual-price-feed.js +0 -117
  171. package/scripts/price-feed-core.js +0 -104
  172. package/scripts/start-local-chain.sh +0 -84
  173. package/src/psm/types.js +0 -3
  174. package/src/typeGuards.js +0 -13
  175. package/src/vaultFactory/type-imports.js +0 -4
@@ -0,0 +1,224 @@
1
+ /** @type {ContractMeta} */
2
+ export const meta: ContractMeta;
3
+ export function makeContractFeeCollector(zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>): {
4
+ collectFees: () => Promise<globalThis.Payment<any>>;
5
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
6
+ collectFees: () => Promise<globalThis.Payment<any>>;
7
+ }>;
8
+ export function startDistributing(schedulePayments: () => Promise<unknown>, timerService: globalThis.ERef<TimerService>, collectionInterval?: RelativeTime | undefined): void;
9
+ export function makeShareConfig(destinations?: Record<string, globalThis.ERef<FeeDestination>> | undefined, keywordShares?: Record<string, bigint> | undefined): {
10
+ shares: {
11
+ share: bigint;
12
+ destination: globalThis.ERef<FeeDestination>;
13
+ }[];
14
+ totalShares: bigint;
15
+ };
16
+ export function sharePayment(payment: Payment<"nat">, issuer: ERef<Issuer<"nat">>, { shares, totalShares }: ShareConfig): Promise<void>;
17
+ export function makeFeeDistributor(feeIssuer: ERef<Issuer<"nat">>, terms: {
18
+ keywordShares: Record<Keyword, NatValue>;
19
+ timerService: globalThis.ERef<TimerService>;
20
+ collectionInterval: RelativeTime;
21
+ }): {
22
+ creatorFacet: {
23
+ makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
24
+ collectFees: () => Promise<globalThis.Payment<any>>;
25
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
26
+ collectFees: () => Promise<globalThis.Payment<any>>;
27
+ }>;
28
+ /**
29
+ * Start distributing fees from this collector.
30
+ *
31
+ * @param {string} debugName
32
+ * @param {ERef<FeeCollector>} collectorP
33
+ */
34
+ startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
35
+ /**
36
+ * @param {import('@endo/far').EOnly<
37
+ * import('@agoric/ertp/src/types.js').DepositFacet
38
+ * >} depositFacet
39
+ */
40
+ makeDepositFacetDestination: (depositFacet: import("@endo/far").EOnly<import("@agoric/ertp/src/types.js").DepositFacet>) => {
41
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
42
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
43
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
44
+ }>;
45
+ /**
46
+ * Create a destination that generates invitations and makes Zoe offers.
47
+ *
48
+ * @param {ERef<ZoeService>} zoe
49
+ * @param {string} keyword
50
+ * @param {unknown} target
51
+ * @param {PropertyKey} makeInvitationMethod
52
+ * @param {unknown[]} [args]
53
+ */
54
+ makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
55
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
56
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
57
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
58
+ }>;
59
+ /** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
60
+ setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
61
+ /** @param {Record<Keyword, bigint>} newShares */
62
+ setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
63
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
64
+ makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
65
+ collectFees: () => Promise<globalThis.Payment<any>>;
66
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
67
+ collectFees: () => Promise<globalThis.Payment<any>>;
68
+ }>;
69
+ /**
70
+ * Start distributing fees from this collector.
71
+ *
72
+ * @param {string} debugName
73
+ * @param {ERef<FeeCollector>} collectorP
74
+ */
75
+ startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
76
+ /**
77
+ * @param {import('@endo/far').EOnly<
78
+ * import('@agoric/ertp/src/types.js').DepositFacet
79
+ * >} depositFacet
80
+ */
81
+ makeDepositFacetDestination: (depositFacet: import("@endo/far").EOnly<import("@agoric/ertp/src/types.js").DepositFacet>) => {
82
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
83
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
84
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
85
+ }>;
86
+ /**
87
+ * Create a destination that generates invitations and makes Zoe offers.
88
+ *
89
+ * @param {ERef<ZoeService>} zoe
90
+ * @param {string} keyword
91
+ * @param {unknown} target
92
+ * @param {PropertyKey} makeInvitationMethod
93
+ * @param {unknown[]} [args]
94
+ */
95
+ makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
96
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
97
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
98
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
99
+ }>;
100
+ /** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
101
+ setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
102
+ /** @param {Record<Keyword, bigint>} newShares */
103
+ setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
104
+ }>;
105
+ publicFacet: {
106
+ distributeFees: (payment: Payment<"nat">) => Promise<void>;
107
+ getKeywordShares: () => Record<string, bigint>;
108
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
109
+ distributeFees: (payment: Payment<"nat">) => Promise<void>;
110
+ getKeywordShares: () => Record<string, bigint>;
111
+ }>;
112
+ };
113
+ export function start(zcf: ZCF<Parameters<typeof makeFeeDistributor>[1]>): Promise<{
114
+ creatorFacet: {
115
+ makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
116
+ collectFees: () => Promise<globalThis.Payment<any>>;
117
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
118
+ collectFees: () => Promise<globalThis.Payment<any>>;
119
+ }>;
120
+ /**
121
+ * Start distributing fees from this collector.
122
+ *
123
+ * @param {string} debugName
124
+ * @param {ERef<FeeCollector>} collectorP
125
+ */
126
+ startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
127
+ /**
128
+ * @param {import('@endo/far').EOnly<
129
+ * import('@agoric/ertp/src/types.js').DepositFacet
130
+ * >} depositFacet
131
+ */
132
+ makeDepositFacetDestination: (depositFacet: import("@endo/far").EOnly<import("@agoric/ertp/src/types.js").DepositFacet>) => {
133
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
134
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
135
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
136
+ }>;
137
+ /**
138
+ * Create a destination that generates invitations and makes Zoe offers.
139
+ *
140
+ * @param {ERef<ZoeService>} zoe
141
+ * @param {string} keyword
142
+ * @param {unknown} target
143
+ * @param {PropertyKey} makeInvitationMethod
144
+ * @param {unknown[]} [args]
145
+ */
146
+ makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
147
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
148
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
149
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
150
+ }>;
151
+ /** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
152
+ setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
153
+ /** @param {Record<Keyword, bigint>} newShares */
154
+ setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
155
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
156
+ makeContractFeeCollector: (zoe: ERef<ZoeService>, creatorFacet: ERef<CollectibleContractFacet>) => {
157
+ collectFees: () => Promise<globalThis.Payment<any>>;
158
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
159
+ collectFees: () => Promise<globalThis.Payment<any>>;
160
+ }>;
161
+ /**
162
+ * Start distributing fees from this collector.
163
+ *
164
+ * @param {string} debugName
165
+ * @param {ERef<FeeCollector>} collectorP
166
+ */
167
+ startPeriodicCollection: (debugName: string, collectorP: ERef<FeeCollector>) => Promise<PeriodicFeeCollector>;
168
+ /**
169
+ * @param {import('@endo/far').EOnly<
170
+ * import('@agoric/ertp/src/types.js').DepositFacet
171
+ * >} depositFacet
172
+ */
173
+ makeDepositFacetDestination: (depositFacet: import("@endo/far").EOnly<import("@agoric/ertp/src/types.js").DepositFacet>) => {
174
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
175
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
176
+ pushPayment: (payment: any, _issuer: any) => Promise<globalThis.Amount>;
177
+ }>;
178
+ /**
179
+ * Create a destination that generates invitations and makes Zoe offers.
180
+ *
181
+ * @param {ERef<ZoeService>} zoe
182
+ * @param {string} keyword
183
+ * @param {unknown} target
184
+ * @param {PropertyKey} makeInvitationMethod
185
+ * @param {unknown[]} [args]
186
+ */
187
+ makeOfferDestination: (zoe: ERef<ZoeService>, keyword: string, target: unknown, makeInvitationMethod: PropertyKey, args?: unknown[] | undefined) => {
188
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
189
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
190
+ pushPayment: (payment: any, issuer: any) => Promise<any>;
191
+ }>;
192
+ /** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
193
+ setDestinations: (newDestinations: Record<Keyword, ERef<FeeDestination>>) => Promise<void>;
194
+ /** @param {Record<Keyword, bigint>} newShares */
195
+ setKeywordShares: (newShares: Record<Keyword, bigint>) => void;
196
+ }>;
197
+ publicFacet: {
198
+ distributeFees: (payment: Payment<"nat">) => Promise<void>;
199
+ getKeywordShares: () => Record<string, bigint>;
200
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
201
+ distributeFees: (payment: Payment<"nat">) => Promise<void>;
202
+ getKeywordShares: () => Record<string, bigint>;
203
+ }>;
204
+ }>;
205
+ export type FeeCollector = {
206
+ collectFees: () => ERef<Payment<"nat">>;
207
+ };
208
+ export type PeriodicFeeCollector = {
209
+ getCollector: () => FeeCollector;
210
+ collectAndDistributeNow: () => Promise<void>;
211
+ stop: () => void;
212
+ };
213
+ export type CollectibleContractFacet = {
214
+ makeCollectFeesInvitation: () => Promise<Invitation<string, never>>;
215
+ };
216
+ export type FeeDestination = {
217
+ pushPayment: (payment: Payment, issuer: ERef<Issuer>) => Promise<Amount>;
218
+ };
219
+ export type ShareConfig = ReturnType<typeof makeShareConfig>;
220
+ export type FeeDistributorCreatorFacet = ReturnType<typeof makeFeeDistributor>["creatorFacet"];
221
+ export type FeeDistributorPublicFacet = ReturnType<typeof makeFeeDistributor>["publicFacet"];
222
+ import type { TimerService } from '@agoric/time';
223
+ import type { RelativeTime } from '@agoric/time';
224
+ //# sourceMappingURL=feeDistributor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feeDistributor.d.ts","sourceRoot":"","sources":["feeDistributor.js"],"names":[],"mappings":"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"}
@@ -9,23 +9,23 @@ import { KeywordShape } from '@agoric/zoe/src/typeGuards.js';
9
9
 
10
10
  const KeywordSharesShape = M.recordOf(KeywordShape, M.nat());
11
11
 
12
- /**
13
- * A pattern for Zoe to check custom terms before `start()`ing the contract.
14
- */
15
- export const customTermsShape = harden({
16
- keywordShares: KeywordSharesShape,
17
- timerService: M.eref(M.remotable('TimerService')),
18
- collectionInterval: RelativeTimeShape,
19
- });
12
+ /** @type {ContractMeta} */
13
+ export const meta = {
14
+ customTermsShape: {
15
+ keywordShares: KeywordSharesShape,
16
+ timerService: M.eref(M.remotable('TimerService')),
17
+ collectionInterval: RelativeTimeShape,
18
+ },
19
+ };
20
+ harden(meta);
20
21
 
21
22
  /**
22
- * @typedef {import('@agoric/time/src/types').RelativeTime} RelativeTime
23
- * @typedef {import('@agoric/time/src/types').TimerService} TimerService
23
+ * @import {RelativeTime} from '@agoric/time'
24
+ * @import {TimerService} from '@agoric/time'
24
25
  */
25
26
 
26
27
  /**
27
28
  * @typedef {object} FeeCollector
28
- *
29
29
  * @property {() => ERef<Payment<'nat'>>} collectFees
30
30
  */
31
31
 
@@ -65,10 +65,12 @@ export const makeContractFeeCollector = (zoe, creatorFacet) => {
65
65
  * for fees that have been collected to date and send that payment to the
66
66
  * depositFacet.
67
67
  *
68
- * @param {() => Promise<unknown>} schedulePayments - distribute to the destinations
69
- * @param {ERef<TimerService>} timerService - timer that is used to schedule collections
68
+ * @param {() => Promise<unknown>} schedulePayments - distribute to the
69
+ * destinations
70
+ * @param {ERef<TimerService>} timerService - timer that is used to schedule
71
+ * collections
70
72
  * @param {RelativeTime} [collectionInterval] - how often to collect fees in the
71
- * `timerService` unit
73
+ * `timerService` unit
72
74
  */
73
75
  export const startDistributing = (
74
76
  schedulePayments,
@@ -99,8 +101,9 @@ export const startDistributing = (
99
101
  };
100
102
 
101
103
  /**
102
- * @typedef {{ pushPayment: (payment: Payment, issuer: ERef<Issuer>) => Promise<Amount>}} FeeDestination
103
- *
104
+ * @typedef {{
105
+ * pushPayment: (payment: Payment, issuer: ERef<Issuer>) => Promise<Amount>;
106
+ * }} FeeDestination
104
107
  * @param {Record<Keyword, ERef<FeeDestination>>} [destinations]
105
108
  * @param {Record<Keyword, NatValue>} [keywordShares]
106
109
  */
@@ -161,17 +164,16 @@ export const sharePayment = async (
161
164
  .filter(([_, amt]) => !AmountMath.isEmpty(amt));
162
165
 
163
166
  /**
164
- * If the `sharedPayment[i]` payments that are sent to the fee
165
- * `destination` with `pushPayment` never arrive, or never get deposited
166
- * (or otherwise used up), then they remain in the recovery set of the
167
- * `recoveryPurse`. The purpose of this, and of recovery sets in general,
168
- * is to be able, in emergencies, to recover the assets of payments in flight
169
- * that seem to be stuck. This is much like cancelling a check that may still
170
- * be undeposited.
167
+ * If the `sharedPayment[i]` payments that are sent to the fee `destination`
168
+ * with `pushPayment` never arrive, or never get deposited (or otherwise used
169
+ * up), then they remain in the recovery set of the `recoveryPurse`. The
170
+ * purpose of this, and of recovery sets in general, is to be able, in
171
+ * emergencies, to recover the assets of payments in flight that seem to be
172
+ * stuck. This is much like cancelling a check that may still be undeposited.
171
173
  *
172
174
  * TODO: However, for this to be possible, the `recoveryPurse` holding that
173
- * recovery set must remain accessible to someone that should legitimately
174
- * be able to recover those payments. But this `recoveryPurse` is currently
175
+ * recovery set must remain accessible to someone that should legitimately be
176
+ * able to recover those payments. But this `recoveryPurse` is currently
175
177
  * dropped on the floor instead.
176
178
  */
177
179
  const recoveryPurse = E(issuer).makeEmptyPurse();
@@ -193,7 +195,11 @@ export const sharePayment = async (
193
195
 
194
196
  /**
195
197
  * @param {ERef<Issuer<'nat'>>} feeIssuer
196
- * @param {{ keywordShares: Record<Keyword, NatValue>, timerService: ERef<TimerService>, collectionInterval: RelativeTime}} terms
198
+ * @param {{
199
+ * keywordShares: Record<Keyword, NatValue>;
200
+ * timerService: ERef<TimerService>;
201
+ * collectionInterval: RelativeTime;
202
+ * }} terms
197
203
  */
198
204
  export const makeFeeDistributor = (feeIssuer, terms) => {
199
205
  const { timerService, collectionInterval } = terms;
@@ -262,7 +268,9 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
262
268
  },
263
269
 
264
270
  /**
265
- * @param {import('@endo/far').EOnly<DepositFacet>} depositFacet
271
+ * @param {import('@endo/far').EOnly<
272
+ * import('@agoric/ertp/src/types.js').DepositFacet
273
+ * >} depositFacet
266
274
  */
267
275
  makeDepositFacetDestination: depositFacet => {
268
276
  return Far(`DepositFacetDestination`, {
@@ -315,9 +323,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
315
323
  });
316
324
  },
317
325
 
318
- /**
319
- * @param {Record<Keyword, ERef<FeeDestination>>} newDestinations
320
- */
326
+ /** @param {Record<Keyword, ERef<FeeDestination>>} newDestinations */
321
327
  setDestinations: async newDestinations => {
322
328
  destinations = newDestinations;
323
329
  shareConfig = makeShareConfig(destinations, keywordShares);
@@ -344,9 +350,7 @@ export const makeFeeDistributor = (feeIssuer, terms) => {
344
350
  /** @typedef {ReturnType<typeof makeFeeDistributor>['creatorFacet']} FeeDistributorCreatorFacet */
345
351
  /** @typedef {ReturnType<typeof makeFeeDistributor>['publicFacet']} FeeDistributorPublicFacet */
346
352
 
347
- /**
348
- * @param {ZCF<Parameters<typeof makeFeeDistributor>[1]>} zcf
349
- */
353
+ /** @param {ZCF<Parameters<typeof makeFeeDistributor>[1]>} zcf */
350
354
  export const start = async zcf => {
351
355
  const feeIssuer = E(zcf.getZoeService()).getFeeIssuer();
352
356
  return makeFeeDistributor(feeIssuer, zcf.getTerms());
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { calculateCurrentDebt } from "./interest-math.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  // @jessie-check
2
+ /// <reference types="@agoric/vats/src/core/types-ambient" />
2
3
 
3
4
  export { calculateCurrentDebt } from './interest-math.js';
@@ -0,0 +1,3 @@
1
+ export function calculateCurrentDebt(debtSnapshot: Amount<"nat">, interestSnapshot: Ratio, currentCompoundedInterest: Ratio): Amount<"nat">;
2
+ export function reverseInterest(debt: Amount<"nat">, interestApplied: Ratio): Amount<"nat">;
3
+ //# sourceMappingURL=interest-math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interest-math.d.ts","sourceRoot":"","sources":["interest-math.js"],"names":[],"mappings":"AAgCO,mDALI,MAAM,CAAC,KAAK,CAAC,oBACb,KAAK,6BACL,KAAK,GACH,MAAM,CAAC,KAAK,CAAC,CAiBzB;AAOM,sCAJI,MAAM,CAAC,KAAK,CAAC,mBACb,KAAK,GACH,MAAM,CAAC,KAAK,CAAC,CAIzB"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @import {Timestamp} from '@agoric/time'
3
+ * @import {RelativeTime} from '@agoric/time'
4
+ */
5
+ export const SECONDS_PER_YEAR: bigint;
6
+ export function makeInterestCalculator(annualRate: Ratio, chargingPeriod: RelativeTime, recordingPeriod: RelativeTime): CalculatorKit;
7
+ export function calculateCompoundedInterest(priorCompoundedInterest: Ratio, priorDebt: NatValue, newDebt: NatValue): Ratio;
8
+ export function chargeInterest(powers: {
9
+ mint: ZCFMint<"nat">;
10
+ mintAndTransferWithFee: MintAndTransfer;
11
+ poolIncrementSeat: ZCFSeat;
12
+ seatAllocationKeyword: Keyword;
13
+ }, params: {
14
+ interestRate: Ratio;
15
+ chargingPeriod: RelativeTime;
16
+ recordingPeriod: RelativeTime;
17
+ }, prior: {
18
+ latestInterestUpdate: Timestamp;
19
+ compoundedInterest: Ratio;
20
+ totalDebt: Amount<"nat">;
21
+ }, accruedUntil: Timestamp): {
22
+ compoundedInterest: Ratio;
23
+ latestInterestUpdate: Timestamp;
24
+ totalDebt: Amount<"nat">;
25
+ };
26
+ import type { RelativeTime } from '@agoric/time';
27
+ import type { Timestamp } from '@agoric/time';
28
+ //# sourceMappingURL=interest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interest.d.ts","sourceRoot":"","sources":["interest.js"],"names":[],"mappings":"AAYA;;;GAGG;AAEH,sCAAuD;AAchD,mDALI,KAAK,gEAGH,aAAa,CA+EzB;AASM,qEAJI,KAAK,aACL,QAAQ,WACR,QAAQ,SAalB;AAyCM,uCAvBI;IACV,IAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,sBAA0B,EAAE,eAAe,CAAC;IAC5C,iBAAqB,EAAE,OAAO,CAAC;IAC/B,qBAAyB,EAAE,OAAO,CAAC;CAChC;kBAEe,KAAK;;;;;wBAMC,KAAK;eACd,MAAM,CAAC,KAAK,CAAC;;wBAIJ,KAAK;;eAEd,MAAM,CAAC,KAAK,CAAC;EA+D5B;kCAvN8B,cAAc;+BADjB,cAAc"}
package/src/interest.js CHANGED
@@ -11,8 +11,8 @@ import { Fail } from '@agoric/assert';
11
11
  import { TimeMath } from '@agoric/time';
12
12
 
13
13
  /**
14
- * @typedef {import('@agoric/time/src/types').Timestamp} Timestamp
15
- * @typedef {import('@agoric/time/src/types').RelativeTime} RelativeTime
14
+ * @import {Timestamp} from '@agoric/time'
15
+ * @import {RelativeTime} from '@agoric/time'
16
16
  */
17
17
 
18
18
  export const SECONDS_PER_YEAR = 60n * 60n * 24n * 365n;
@@ -20,9 +20,7 @@ const BASIS_POINTS = 10000;
20
20
  // single digit APR is less than a basis point per day.
21
21
  const LARGE_DENOMINATOR = BASIS_POINTS * BASIS_POINTS;
22
22
 
23
- /**
24
- * Number chosen from 6 digits for a basis point, doubled for multiplication.
25
- */
23
+ /** Number chosen from 6 digits for a basis point, doubled for multiplication. */
26
24
  const COMPOUNDED_INTEREST_DENOMINATOR = 10n ** 20n;
27
25
 
28
26
  /**
@@ -147,20 +145,27 @@ const validatedBrand = (mint, debt) => {
147
145
  * Charge interest accrued between `latestInterestUpdate` and `accruedUntil`.
148
146
  *
149
147
  * @param {{
150
- * mint: ZCFMint<'nat'>,
151
- * mintAndTransferWithFee: MintAndTransfer,
152
- * poolIncrementSeat: ZCFSeat,
153
- * seatAllocationKeyword: Keyword }} powers
148
+ * mint: ZCFMint<'nat'>;
149
+ * mintAndTransferWithFee: MintAndTransfer;
150
+ * poolIncrementSeat: ZCFSeat;
151
+ * seatAllocationKeyword: Keyword;
152
+ * }} powers
154
153
  * @param {{
155
- * interestRate: Ratio,
156
- * chargingPeriod: RelativeTime,
157
- * recordingPeriod: RelativeTime}} params
154
+ * interestRate: Ratio;
155
+ * chargingPeriod: RelativeTime;
156
+ * recordingPeriod: RelativeTime;
157
+ * }} params
158
158
  * @param {{
159
- * latestInterestUpdate: Timestamp,
160
- * compoundedInterest: Ratio,
161
- * totalDebt: Amount<'nat'>}} prior
159
+ * latestInterestUpdate: Timestamp;
160
+ * compoundedInterest: Ratio;
161
+ * totalDebt: Amount<'nat'>;
162
+ * }} prior
162
163
  * @param {Timestamp} accruedUntil
163
- * @returns {{compoundedInterest: Ratio, latestInterestUpdate: Timestamp, totalDebt: Amount<'nat'> }}
164
+ * @returns {{
165
+ * compoundedInterest: Ratio;
166
+ * latestInterestUpdate: Timestamp;
167
+ * totalDebt: Amount<'nat'>;
168
+ * }}
164
169
  */
165
170
  export const chargeInterest = (powers, params, prior, accruedUntil) => {
166
171
  const brand = validatedBrand(powers.mint, prior.totalDebt);
@@ -4,6 +4,19 @@ This directory contains the `fluxAggregatorKit.js` contract which takes prices a
4
4
  input and outputs a best known price. There are multiple ways to get the price,
5
5
  including a PriceAuthority interface.
6
6
 
7
+ ## Design
8
+
9
+ The authorities are hierarchical. Many authorities can be registered in the priceAuthorityRegistry.
10
+
11
+ For oracles, there must be two: the negotiable brand and the _oracle_ brand (an inert one).
12
+
13
+ The intended flow is that:
14
+ 1. a negotiable brand is created (e.g. ATOM)
15
+ 2. a price provider says “i can give you quotes for that” and runs price-feed-proposal. That makes “oracleBrands” (which are inert and have a separate identity so that they don’t have the authority to say they’re the real quote for it).
16
+ 3. Some higher authority (eg EC, Stakers) decides that should be the quote source for negotiable brand so it registers it under the real brand identity in the registry (with a new instance of a scaledPriceAuthority ).
17
+
18
+ In practice we do these all in one core proposal. And each vault manager is started with a limit on minting to the EC has another way to gate transactions.
19
+
7
20
  ## Usage
8
21
 
9
22
  See the [Smart Wallet integration test](/packages/inter-protocol/test/smartWallet/test-oracle-integration.js) for how it's used.
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @import {Baggage} from '@agoric/vat-data'
3
+ * @import {TimerService} from '@agoric/time'
4
+ */
5
+ /** @type {ContractMeta} */
6
+ export const meta: ContractMeta;
7
+ export function start(zcf: ZCF<import("./fluxAggregatorKit.js").ChainlinkConfig & {
8
+ timer: TimerService;
9
+ brandIn: Brand<"nat">;
10
+ brandOut: Brand<"nat">;
11
+ description: string;
12
+ unitAmountIn?: Amount<"nat">;
13
+ }>, privateArgs: {
14
+ highPrioritySendersManager?: import("@agoric/internal/src/priority-senders.js").PrioritySendersManager;
15
+ initialPoserInvitation: Invitation;
16
+ marshaller: ERef<Marshaller>;
17
+ namesByAddressAdmin: ERef<import("@agoric/vats").NameAdmin>;
18
+ storageNode: StorageNode;
19
+ }, baggage: Baggage): Promise<{
20
+ creatorFacet: import("@endo/exo").Guarded<{
21
+ getParamMgrRetriever: () => {
22
+ get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
23
+ Electorate: "invitation";
24
+ }>;
25
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
26
+ get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
27
+ Electorate: "invitation";
28
+ }>;
29
+ }>;
30
+ getInvitation: (name: any) => Promise<Invitation<unknown, undefined>>;
31
+ getLimitedCreatorFacet: () => import("@endo/exo").Guarded<{
32
+ makeOracleInvitation(oracleId: string): Promise<Invitation<{
33
+ invitationMakers: {
34
+ PushPrice(result: import("./roundsManager.js").PriceRound): Promise<Invitation<void, undefined>>;
35
+ } & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
36
+ PushPrice(result: import("./roundsManager.js").PriceRound): Promise<Invitation<void, undefined>>;
37
+ }>;
38
+ oracle: import("@endo/exo").Guarded<{
39
+ pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: PriceDatum): Promise<void>;
40
+ getStatus(): import("./priceOracleKit.js").OracleStatus;
41
+ }>;
42
+ }, undefined>>;
43
+ removeOracle(oracleId: string): Promise<void>;
44
+ getRoundData: (roundIdRaw: any) => Promise<import("./roundsManager.js").RoundData>;
45
+ initOracle(oracleId: string): Promise<import("@endo/exo").GuardedKit<{
46
+ admin: {
47
+ disable(): void;
48
+ };
49
+ oracle: {
50
+ pushPrice({ roundId: roundIdRaw, unitPrice: valueRaw, }: PriceDatum): Promise<void>;
51
+ getStatus(): import("./priceOracleKit.js").OracleStatus;
52
+ };
53
+ }>>;
54
+ oracleRoundState(oracleId: string, queriedRoundId: bigint): Promise<import("./fluxAggregatorKit.js").RoundState>;
55
+ }>;
56
+ getGovernedApis: () => globalThis.GovernedApis;
57
+ getGovernedApiNames: () => string[];
58
+ setOfferFilter: (strings: any) => Promise<void>;
59
+ }>;
60
+ publicFacet: import("@endo/exo").Guarded<{
61
+ getPriceAuthority(): import("@agoric/zoe/tools/types.js").PriceAuthority;
62
+ getPublicTopics(): {
63
+ quotes: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("@agoric/zoe/tools/types.js").PriceDescription>;
64
+ latestRound: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<import("./roundsManager.js").LatestRound>;
65
+ };
66
+ }>;
67
+ }>;
68
+ import type { TimerService } from '@agoric/time';
69
+ import type { Baggage } from '@agoric/vat-data';
70
+ //# sourceMappingURL=fluxAggregatorContract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fluxAggregatorContract.d.ts","sourceRoot":"","sources":["fluxAggregatorContract.js"],"names":[],"mappings":"AAcA;;;GAGG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAmBrB;AA0BK;;aAfS,KAAK,CAAC,KAAK,CAAC;cACX,KAAK,CAAC,KAAK,CAAC;iBACT,MAAM;mBACJ,MAAM,CAAC,KAAK,CAAC;iBAGxB;IACV,0BAA8B,CAAC,EAAE,OAAO,0CAA0C,EAAE,sBAAsB,CAAC;IAC3G,sBAA0B,EAAE,UAAU,CAAC;IACvC,UAAc,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACjC,mBAAuB,EAAE,IAAI,CAAC,OAAO,cAAc,EAAE,SAAS,CAAC,CAAC;IAChE,WAAe,EAAE,WAAW,CAAC;CAC1B;;;;;;;;;;;;;;;sCAwI45F,OAAO,oBAAoB,EAAE,UAAU;;mEAAV,UAAU;;;6EA5It8F,UAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0IR;kCAnL8B,cAAc;6BADnB,kBAAkB"}